diff --git a/assets/___vite-browser-external_commonjs-proxy-DtqXsXYi.js b/assets/___vite-browser-external_commonjs-proxy-DtqXsXYi.js new file mode 100644 index 0000000..c03ca89 --- /dev/null +++ b/assets/___vite-browser-external_commonjs-proxy-DtqXsXYi.js @@ -0,0 +1 @@ +import{g as C,a as j,f as N}from"./index-B5bDTh7Y.js";var p={exports:{}},a=typeof Reflect=="object"?Reflect:null,h=a&&typeof a.apply=="function"?a.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},l;a&&typeof a.ownKeys=="function"?l=a.ownKeys:Object.getOwnPropertySymbols?l=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:l=function(e){return Object.getOwnPropertyNames(e)};function R(t){console&&console.warn&&console.warn(t)}var L=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}p.exports=o;p.exports.once=T;o.EventEmitter=o;o.prototype._events=void 0;o.prototype._eventsCount=0;o.prototype._maxListeners=void 0;var m=10;function v(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return m},set:function(t){if(typeof t!="number"||t<0||L(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");m=t}});o.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};o.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||L(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 y(t){return t._maxListeners===void 0?o.defaultMaxListeners:t._maxListeners}o.prototype.getMaxListeners=function(){return y(this)};o.prototype.emit=function(e){for(var n=[],r=1;r0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")h(c,this,n);else for(var d=c.length,O=E(c,d),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,R(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function A(){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 _(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=A.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return v(n),this.on(e,_(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return v(n),this.prependListener(e,_(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(v(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():M(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?P(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):b.call(t,e)};o.prototype.listenerCount=b;function b(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r` ${w(f)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat(),name:"OffchainLookupError"})}}class S extends p{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${g(e)}`],name:"OffchainLookupResponseMalformedError"})}}class A extends p{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}const T="0x556f1830",q={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function G(s,{blockNumber:e,blockTag:a,data:n,to:c}){const{args:d}=E({data:n,abi:[q]}),[t,i,f,r,o]=d,{ccipRead:u}=s,k=u&&typeof(u==null?void 0:u.request)=="function"?u.request:C;try{if(!R(c,t))throw new A({sender:t,to:c});const l=await k({data:f,sender:t,urls:i}),{data:L}=await O(s,{blockNumber:e,blockTag:a,data:b([r,x([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return L}catch(l){throw new $({callbackSelector:r,cause:l,data:n,extraData:o,sender:t,urls:i})}}async function C({data:s,sender:e,urls:a}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d0?this.tail.next=f:this.head=f,this.tail=f,++this.length}},{key:"unshift",value:function(x){var f={data:x,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var f=this.head,p=""+f.data;f=f.next;)p+=x+f.data;return p}},{key:"concat",value:function(x){if(this.length===0)return b.alloc(0);for(var f=b.allocUnsafe(x>>>0),p=this.head,y=0;p;)v(p.data,f,y),y+=p.data.length,p=p.next;return f}},{key:"consume",value:function(x,f){var p;return xm.length?m.length:x;if(T===m.length?y+=m:y+=m.slice(0,x),x-=T,x===0){T===m.length?(++p,f.next?this.head=f.next:this.head=this.tail=null):(this.head=f,f.data=m.slice(T));break}++p}return this.length-=p,y}},{key:"_getBuffer",value:function(x){var f=b.allocUnsafe(x),p=this.head,y=1;for(p.data.copy(f),x-=p.data.length;p=p.next;){var m=p.data,T=x>m.length?m.length:x;if(m.copy(f,f.length-x,0,T),x-=T,x===0){T===m.length?(++y,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=m.slice(T));break}++y}return this.length-=y,f}},{key:S,value:function(x,f){return l(this,t(t({},f),{},{depth:0,customInspect:!1}))}}]),R}(),Kt}function zn(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ar,this,e)):process.nextTick(ar,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(qe,r):(r._writableState.errorEmitted=!0,process.nextTick(Sr,r,s)):process.nextTick(Sr,r,s):t?(process.nextTick(qe,r),t(s)):process.nextTick(qe,r)}),this)}function Sr(e,t){ar(e,t),qe(e)}function qe(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Gn(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ar(e,t){e.emit("error",t)}function Vn(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var nn={destroy:zn,undestroy:Gn,errorOrDestroy:Vn},ve={};function Kn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var an={};function X(e,t,r){r||(r=Error);function n(s,u,c){return typeof t=="string"?t:t(s,u,c)}var i=function(s){Kn(u,s);function u(c,d,b){return s.call(this,n(c,d,b))||this}return u}(r);i.prototype.name=r.name,i.prototype.code=e,an[e]=i}function mr(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Yn(e,t,r){return e.substr(0,t.length)===t}function Xn(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Jn(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}X("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);X("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Yn(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(Xn(e," argument"))i="The ".concat(e," ").concat(n," ").concat(mr(t,"type"));else{var s=Jn(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(s," ").concat(n," ").concat(mr(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);X("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");X("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});X("ERR_STREAM_PREMATURE_CLOSE","Premature close");X("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});X("ERR_MULTIPLE_CALLBACK","Callback called multiple times");X("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");X("ERR_STREAM_WRITE_AFTER_END","write after end");X("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);X("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);X("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ve.codes=an;var Qn=ve.codes.ERR_INVALID_OPT_VALUE;function Zn(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function ei(e,t,r,n){var i=Zn(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Qn(s,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var on={getHighWaterMark:ei},or={exports:{}};typeof Object.create=="function"?or.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:or.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var J=or.exports,ti=ri;function ri(e,t){if(Yt("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Yt("throwDeprecation"))throw new Error(t);Yt("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Yt(e){try{if(!Se.localStorage)return!1}catch{return!1}var t=Se.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Xt,Rr;function sn(){if(Rr)return Xt;Rr=1,Xt=D;function e(_){var h=this;this.next=null,this.entry=null,this.finish=function(){ne(h,_)}}var t;D.WritableState=k;var r={deprecate:ti},n=rn,i=Ge.Buffer,s=(typeof Se<"u"?Se:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(_){return i.from(_)}function c(_){return i.isBuffer(_)||_ instanceof s}var d=nn,b=on,w=b.getHighWaterMark,l=ve.codes,S=l.ERR_INVALID_ARG_TYPE,v=l.ERR_METHOD_NOT_IMPLEMENTED,R=l.ERR_MULTIPLE_CALLBACK,A=l.ERR_STREAM_CANNOT_PIPE,x=l.ERR_STREAM_DESTROYED,f=l.ERR_STREAM_NULL_VALUES,p=l.ERR_STREAM_WRITE_AFTER_END,y=l.ERR_UNKNOWN_ENCODING,m=d.errorOrDestroy;J(D,n);function T(){}function k(_,h,E){t=t||me(),_=_||{},typeof E!="boolean"&&(E=h instanceof t),this.objectMode=!!_.objectMode,E&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=w(this,_,"writableHighWaterMark",E),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var B=_.decodeStrings===!1;this.decodeStrings=!B,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){le(h,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}k.prototype.getBuffer=function(){for(var h=this.bufferedRequest,E=[];h;)E.push(h),h=h.next;return E},function(){try{Object.defineProperty(k.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(h){return O.call(this,h)?!0:this!==D?!1:h&&h._writableState instanceof k}})):O=function(h){return h instanceof this};function D(_){t=t||me();var h=this instanceof t;if(!h&&!O.call(D,this))return new D(_);this._writableState=new k(_,this,h),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),n.call(this)}D.prototype.pipe=function(){m(this,new A)};function M(_,h){var E=new p;m(_,E),process.nextTick(h,E)}function $(_,h,E,B){var L;return E===null?L=new f:typeof E!="string"&&!h.objectMode&&(L=new S("chunk",["string","Buffer"],E)),L?(m(_,L),process.nextTick(B,L),!1):!0}D.prototype.write=function(_,h,E){var B=this._writableState,L=!1,a=!B.objectMode&&c(_);return a&&!i.isBuffer(_)&&(_=u(_)),typeof h=="function"&&(E=h,h=null),a?h="buffer":h||(h=B.defaultEncoding),typeof E!="function"&&(E=T),B.ending?M(this,E):(a||$(this,B,_,E))&&(B.pendingcb++,L=Z(this,B,a,_,h,E)),L},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,!_.writing&&!_.corked&&!_.bufferProcessing&&_.bufferedRequest&&Y(this,_))},D.prototype.setDefaultEncoding=function(h){if(typeof h=="string"&&(h=h.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((h+"").toLowerCase())>-1))throw new y(h);return this._writableState.defaultEncoding=h,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function W(_,h,E){return!_.objectMode&&_.decodeStrings!==!1&&typeof h=="string"&&(h=i.from(h,E)),h}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Z(_,h,E,B,L,a){if(!E){var o=W(h,B,L);B!==o&&(E=!0,L="buffer",B=o)}var g=h.objectMode?1:B.length;h.length+=g;var C=h.length */(function(e,t){var r=Ge,n=r.Buffer;function i(u,c){for(var d in u)c[d]=u[d]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s);function s(u,c,d){return n(u,c,d)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(u,c,d){if(typeof u=="number")throw new TypeError("Argument must not be a number");return n(u,c,d)},s.alloc=function(u,c,d){if(typeof u!="number")throw new TypeError("Argument must be a number");var b=n(u);return c!==void 0?typeof d=="string"?b.fill(c,d):b.fill(c):b.fill(0),b},s.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return n(u)},s.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}})(sr,sr.exports);var ce=sr.exports,Ar;function Cr(){if(Ar)return Qt;Ar=1;var e=ce.Buffer,t=e.isEncoding||function(f){switch(f=""+f,f&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(f){if(!f)return"utf8";for(var p;;)switch(f){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return f;default:if(p)return;f=(""+f).toLowerCase(),p=!0}}function n(f){var p=r(f);if(typeof p!="string"&&(e.isEncoding===t||!t(f)))throw new Error("Unknown encoding: "+f);return p||f}Qt.StringDecoder=i;function i(f){this.encoding=n(f);var p;switch(this.encoding){case"utf16le":this.text=l,this.end=S,p=4;break;case"utf8":this.fillLast=d,p=4;break;case"base64":this.text=v,this.end=R,p=3;break;default:this.write=A,this.end=x;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(p)}i.prototype.write=function(f){if(f.length===0)return"";var p,y;if(this.lastNeed){if(p=this.fillLast(f),p===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y>5===6?2:f>>4===14?3:f>>3===30?4:f>>6===2?-1:-2}function u(f,p,y){var m=p.length-1;if(m=0?(T>0&&(f.lastNeed=T-1),T):--m=0?(T>0&&(f.lastNeed=T-2),T):--m=0?(T>0&&(T===2?T=0:f.lastNeed=T-3),T):0))}function c(f,p,y){if((p[0]&192)!==128)return f.lastNeed=0,"�";if(f.lastNeed>1&&p.length>1){if((p[1]&192)!==128)return f.lastNeed=1,"�";if(f.lastNeed>2&&p.length>2&&(p[2]&192)!==128)return f.lastNeed=2,"�"}}function d(f){var p=this.lastTotal-this.lastNeed,y=c(this,f);if(y!==void 0)return y;if(this.lastNeed<=f.length)return f.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,p,0,f.length),this.lastNeed-=f.length}function b(f,p){var y=u(this,f,p);if(!this.lastNeed)return f.toString("utf8",p);this.lastTotal=y;var m=f.length-(y-this.lastNeed);return f.copy(this.lastChar,0,m),f.toString("utf8",p,m)}function w(f){var p=f&&f.length?this.write(f):"";return this.lastNeed?p+"�":p}function l(f,p){if((f.length-p)%2===0){var y=f.toString("utf16le",p);if(y){var m=y.charCodeAt(y.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",p,f.length-1)}function S(f){var p=f&&f.length?this.write(f):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return p+this.lastChar.toString("utf16le",0,y)}return p}function v(f,p){var y=(f.length-p)%3;return y===0?f.toString("base64",p):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",p,f.length-y))}function R(f){var p=f&&f.length?this.write(f):"";return this.lastNeed?p+this.lastChar.toString("base64",0,3-this.lastNeed):p}function A(f){return f.toString(this.encoding)}function x(f){return f&&f.length?this.write(f):""}return Qt}var kr=ve.codes.ERR_STREAM_PREMATURE_CLOSE;function ni(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof o!="string"&&!N.objectMode&&Object.getPrototypeOf(o)!==n.prototype&&(o=s(o)),C)N.endEmitted?T(a,new f):W(a,N,o,!0);else if(N.ended)T(a,new A);else{if(N.destroyed)return!1;N.reading=!1,N.decoder&&!g?(o=N.decoder.write(o),N.objectMode||o.length!==0?W(a,N,o,!1):Y(a,N)):W(a,N,o,!1)}else C||(N.reading=!1,Y(a,N))}return!N.ended&&(N.length=q?a=q:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function G(a,o){return a<=0||o.length===0&&o.ended?0:o.objectMode?1:a!==a?o.flowing&&o.length?o.buffer.head.data.length:o.length:(a>o.highWaterMark&&(o.highWaterMark=z(a)),a<=o.length?a:o.ended?o.length:(o.needReadable=!0,0))}M.prototype.read=function(a){d("read",a),a=parseInt(a,10);var o=this._readableState,g=a;if(a!==0&&(o.emittedReadable=!1),a===0&&o.needReadable&&((o.highWaterMark!==0?o.length>=o.highWaterMark:o.length>0)||o.ended))return d("read: emitReadable",o.length,o.ended),o.length===0&&o.ended?E(this):K(this),null;if(a=G(a,o),a===0&&o.ended)return o.length===0&&E(this),null;var C=o.needReadable;d("need readable",C),(o.length===0||o.length-a0?F=h(a,o):F=null,F===null?(o.needReadable=o.length<=o.highWaterMark,a=0):(o.length-=a,o.awaitDrain=0),o.length===0&&(o.ended||(o.needReadable=!0),g!==a&&o.ended&&E(this)),F!==null&&this.emit("data",F),F};function le(a,o){if(d("onEofChunk"),!o.ended){if(o.decoder){var g=o.decoder.end();g&&g.length&&(o.buffer.push(g),o.length+=o.objectMode?1:g.length)}o.ended=!0,o.sync?K(a):(o.needReadable=!1,o.emittedReadable||(o.emittedReadable=!0,ee(a)))}}function K(a){var o=a._readableState;d("emitReadable",o.needReadable,o.emittedReadable),o.needReadable=!1,o.emittedReadable||(d("emitReadable",o.flowing),o.emittedReadable=!0,process.nextTick(ee,a))}function ee(a){var o=a._readableState;d("emitReadable_",o.destroyed,o.length,o.ended),!o.destroyed&&(o.length||o.ended)&&(a.emit("readable"),o.emittedReadable=!1),o.needReadable=!o.flowing&&!o.ended&&o.length<=o.highWaterMark,_(a)}function Y(a,o){o.readingMore||(o.readingMore=!0,process.nextTick(te,a,o))}function te(a,o){for(;!o.reading&&!o.ended&&(o.length1&&L(C.pipes,a)!==-1)&&!Ce&&(d("false write response, pause",C.awaitDrain),C.awaitDrain++),g.pause())}function we(ae){d("onerror",ae),_e(),a.removeListener("error",we),t(a,"error")===0&&T(a,ae)}O(a,"error",we);function xe(){a.removeListener("finish",Ee),_e()}a.once("close",xe);function Ee(){d("onfinish"),a.removeListener("close",xe),_e()}a.once("finish",Ee);function _e(){d("unpipe"),g.unpipe(a)}return a.emit("pipe",g),C.flowing||(d("pipe resume"),g.resume()),a};function ue(a){return function(){var g=a._readableState;d("pipeOnDrain",g.awaitDrain),g.awaitDrain&&g.awaitDrain--,g.awaitDrain===0&&t(a,"data")&&(g.flowing=!0,_(a))}}M.prototype.unpipe=function(a){var o=this._readableState,g={hasUnpiped:!1};if(o.pipesCount===0)return this;if(o.pipesCount===1)return a&&a!==o.pipes?this:(a||(a=o.pipes),o.pipes=null,o.pipesCount=0,o.flowing=!1,a&&a.emit("unpipe",this,g),this);if(!a){var C=o.pipes,F=o.pipesCount;o.pipes=null,o.pipesCount=0,o.flowing=!1;for(var N=0;N0,C.flowing!==!1&&this.resume()):a==="readable"&&!C.endEmitted&&!C.readableListening&&(C.readableListening=C.needReadable=!0,C.flowing=!1,C.emittedReadable=!1,d("on readable",C.length,C.reading),C.length?K(this):C.reading||process.nextTick(V,this)),g},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(a,o){var g=r.prototype.removeListener.call(this,a,o);return a==="readable"&&process.nextTick(re,this),g},M.prototype.removeAllListeners=function(a){var o=r.prototype.removeAllListeners.apply(this,arguments);return(a==="readable"||a===void 0)&&process.nextTick(re,this),o};function re(a){var o=a._readableState;o.readableListening=a.listenerCount("readable")>0,o.resumeScheduled&&!o.paused?o.flowing=!0:a.listenerCount("data")>0&&a.resume()}function V(a){d("readable nexttick read 0"),a.read(0)}M.prototype.resume=function(){var a=this._readableState;return a.flowing||(d("resume"),a.flowing=!a.readableListening,he(this,a)),a.paused=!1,this};function he(a,o){o.resumeScheduled||(o.resumeScheduled=!0,process.nextTick(ne,a,o))}function ne(a,o){d("resume",o.reading),o.reading||a.read(0),o.resumeScheduled=!1,a.emit("resume"),_(a),o.flowing&&!o.reading&&a.read(0)}M.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _(a){var o=a._readableState;for(d("flow",o.flowing);o.flowing&&a.read()!==null;);}M.prototype.wrap=function(a){var o=this,g=this._readableState,C=!1;a.on("end",function(){if(d("wrapped end"),g.decoder&&!g.ended){var P=g.decoder.end();P&&P.length&&o.push(P)}o.push(null)}),a.on("data",function(P){if(d("wrapped data"),g.decoder&&(P=g.decoder.write(P)),!(g.objectMode&&P==null)&&!(!g.objectMode&&(!P||!P.length))){var ie=o.push(P);ie||(C=!0,a.pause())}});for(var F in a)this[F]===void 0&&typeof a[F]=="function"&&(this[F]=function(ie){return function(){return a[ie].apply(a,arguments)}}(F));for(var N=0;N=o.length?(o.decoder?g=o.buffer.join(""):o.buffer.length===1?g=o.buffer.first():g=o.buffer.concat(o.length),o.buffer.clear()):g=o.buffer.consume(a,o.decoder),g}function E(a){var o=a._readableState;d("endReadable",o.endEmitted),o.endEmitted||(o.ended=!0,process.nextTick(B,o,a))}function B(a,o){if(d("endReadableNT",a.endEmitted,a.length),!a.endEmitted&&a.length===0&&(a.endEmitted=!0,o.readable=!1,o.emit("end"),a.autoDestroy)){var g=o._writableState;(!g||g.autoDestroy&&g.finished)&&o.destroy()}}typeof Symbol=="function"&&(M.from=function(a,o){return m===void 0&&(m=si()),m(M,a,o)});function L(a,o){for(var g=0,C=a.length;g0;return yi(u,d,b,function(w){i||(i=w),w&&s.forEach(Pr),!d&&(s.forEach(Pr),n(i))})});return t.reduce(wi)}var Si=Ei;(function(e,t){t=e.exports=ln(),t.Stream=t,t.Readable=t,t.Writable=sn(),t.Duplex=me(),t.Transform=un,t.PassThrough=di,t.finished=br,t.pipeline=Si})(ir,ir.exports);var cn=ir.exports;const{Transform:mi}=cn;var Ri=e=>class dn extends mi{constructor(r,n,i,s,u){super(u),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=u,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(u){s=u}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new dn(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Ti}=cn;var Ai=e=>class pn extends Ti{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(u){s=u}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new pn(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Ci=Ri,ki=Ai;var Bi=function(e){const t=Ci(e),r=ki(e);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,i);case"keccak256":return new t(1088,512,null,256,i);case"keccak384":return new t(832,768,null,384,i);case"keccak512":return new t(576,1024,null,512,i);case"sha3-224":return new t(1152,448,6,224,i);case"sha3-256":return new t(1088,512,6,256,i);case"sha3-384":return new t(832,768,6,384,i);case"sha3-512":return new t(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},bn={};const Or=[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];bn.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],b=e[7]^e[17]^e[27]^e[37]^e[47],w=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49];let S=w^(i<<1|s>>>31),v=l^(s<<1|i>>>31);const R=e[0]^S,A=e[1]^v,x=e[10]^S,f=e[11]^v,p=e[20]^S,y=e[21]^v,m=e[30]^S,T=e[31]^v,k=e[40]^S,O=e[41]^v;S=r^(u<<1|c>>>31),v=n^(c<<1|u>>>31);const D=e[2]^S,M=e[3]^v,$=e[12]^S,W=e[13]^v,Z=e[22]^S,q=e[23]^v,z=e[32]^S,G=e[33]^v,le=e[42]^S,K=e[43]^v;S=i^(d<<1|b>>>31),v=s^(b<<1|d>>>31);const ee=e[4]^S,Y=e[5]^v,te=e[14]^S,ue=e[15]^v,re=e[24]^S,V=e[25]^v,he=e[34]^S,ne=e[35]^v,_=e[44]^S,h=e[45]^v;S=u^(w<<1|l>>>31),v=c^(l<<1|w>>>31);const E=e[6]^S,B=e[7]^v,L=e[16]^S,a=e[17]^v,o=e[26]^S,g=e[27]^v,C=e[36]^S,F=e[37]^v,N=e[46]^S,P=e[47]^v;S=d^(r<<1|n>>>31),v=b^(n<<1|r>>>31);const ie=e[8]^S,de=e[9]^v,Ce=e[18]^S,He=e[19]^v,ke=e[28]^S,we=e[29]^v,xe=e[38]^S,Ee=e[39]^v,_e=e[48]^S,ae=e[49]^v,Q=R,Ze=A,et=f<<4|x>>>28,tt=x<<4|f>>>28,rt=p<<3|y>>>29,nt=y<<3|p>>>29,it=T<<9|m>>>23,at=m<<9|T>>>23,ot=k<<18|O>>>14,st=O<<18|k>>>14,ft=D<<1|M>>>31,lt=M<<1|D>>>31,ut=W<<12|$>>>20,ht=$<<12|W>>>20,_t=Z<<10|q>>>22,ct=q<<10|Z>>>22,dt=G<<13|z>>>19,pt=z<<13|G>>>19,bt=le<<2|K>>>30,vt=K<<2|le>>>30,gt=Y<<30|ee>>>2,yt=ee<<30|Y>>>2,wt=te<<6|ue>>>26,xt=ue<<6|te>>>26,Et=V<<11|re>>>21,St=re<<11|V>>>21,mt=he<<15|ne>>>17,Rt=ne<<15|he>>>17,Tt=h<<29|_>>>3,At=_<<29|h>>>3,Ct=E<<28|B>>>4,kt=B<<28|E>>>4,Bt=a<<23|L>>>9,Mt=L<<23|a>>>9,Dt=o<<25|g>>>7,Nt=g<<25|o>>>7,Lt=C<<21|F>>>11,Pt=F<<21|C>>>11,Ot=P<<24|N>>>8,It=N<<24|P>>>8,$t=ie<<27|de>>>5,Ft=de<<27|ie>>>5,Ht=Ce<<20|He>>>12,Ut=He<<20|Ce>>>12,qt=we<<7|ke>>>25,jt=ke<<7|we>>>25,Wt=xe<<8|Ee>>>24,zt=Ee<<8|xe>>>24,Gt=_e<<14|ae>>>18,Vt=ae<<14|_e>>>18;e[0]=Q^~ut&Et,e[1]=Ze^~ht&St,e[10]=Ct^~Ht&rt,e[11]=kt^~Ut&nt,e[20]=ft^~wt&Dt,e[21]=lt^~xt&Nt,e[30]=$t^~et&_t,e[31]=Ft^~tt&ct,e[40]=gt^~Bt&qt,e[41]=yt^~Mt&jt,e[2]=ut^~Et&Lt,e[3]=ht^~St&Pt,e[12]=Ht^~rt&dt,e[13]=Ut^~nt&pt,e[22]=wt^~Dt&Wt,e[23]=xt^~Nt&zt,e[32]=et^~_t&mt,e[33]=tt^~ct&Rt,e[42]=Bt^~qt&it,e[43]=Mt^~jt&at,e[4]=Et^~Lt&Gt,e[5]=St^~Pt&Vt,e[14]=rt^~dt&Tt,e[15]=nt^~pt&At,e[24]=Dt^~Wt&ot,e[25]=Nt^~zt&st,e[34]=_t^~mt&Ot,e[35]=ct^~Rt&It,e[44]=qt^~it&bt,e[45]=jt^~at&vt,e[6]=Lt^~Gt&Q,e[7]=Pt^~Vt&Ze,e[16]=dt^~Tt&Ct,e[17]=pt^~At&kt,e[26]=Wt^~ot&ft,e[27]=zt^~st<,e[36]=mt^~Ot&$t,e[37]=Rt^~It&Ft,e[46]=it^~bt>,e[47]=at^~vt&yt,e[8]=Gt^~Q&ut,e[9]=Vt^~Ze&ht,e[18]=Tt^~Ct&Ht,e[19]=At^~kt&Ut,e[28]=ot^~ft&wt,e[29]=st^~lt&xt,e[38]=Ot^~$t&et,e[39]=It^~Ft&tt,e[48]=bt^~gt&Bt,e[49]=vt^~yt&Mt,e[0]^=Or[t*2],e[1]^=Or[t*2+1]}};const We=bn;function Te(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Te.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Te.prototype.absorb=function(e){for(let t=0;t>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(We.p1600(this.state),this.count=0);return t};Te.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var Mi=Te,Va=Bi(Mi),vn={exports:{}},gn=ce.Buffer;function Ye(e,t){this._block=gn.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Ye.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=gn.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,s=this._len,u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return e?s.toString(e):s};Ye.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ae=Ye,Di=J,yn=Ae,Ni=ce.Buffer,Li=[1518500249,1859775393,-1894007588,-899497514],Pi=new Array(80);function Le(){this.init(),this._w=Pi,yn.call(this,64,56)}Di(Le,yn);Le.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Oi(e){return e<<5|e>>>27}function Ii(e){return e<<30|e>>>2}function $i(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Le.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var d=0;d<80;++d){var b=~~(d/20),w=Oi(r)+$i(b,n,i,s)+u+t[d]+Li[b]|0;u=s,s=i,i=Ii(n),n=r,r=w}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0};Le.prototype._hash=function(){var e=Ni.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Fi=Le,Hi=J,wn=Ae,Ui=ce.Buffer,qi=[1518500249,1859775393,-1894007588,-899497514],ji=new Array(80);function Pe(){this.init(),this._w=ji,wn.call(this,64,56)}Hi(Pe,wn);Pe.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Wi(e){return e<<1|e>>>31}function zi(e){return e<<5|e>>>27}function Gi(e){return e<<30|e>>>2}function Vi(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Pe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,u=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=Wi(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var d=0;d<80;++d){var b=~~(d/20),w=zi(r)+Vi(b,n,i,s)+u+t[d]+qi[b]|0;u=s,s=i,i=Gi(n),n=r,r=w}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0};Pe.prototype._hash=function(){var e=Ui.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Ki=Pe,Yi=J,xn=Ae,Xi=ce.Buffer,Ji=[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],Qi=new Array(64);function Oe(){this.init(),this._w=Qi,xn.call(this,64,56)}Yi(Oe,xn);Oe.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function Zi(e,t,r){return r^e&(t^r)}function ea(e,t,r){return e&t|r&(e|t)}function ta(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function ra(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function na(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function ia(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Oe.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,u=this._e|0,c=this._f|0,d=this._g|0,b=this._h|0,w=0;w<16;++w)t[w]=e.readInt32BE(w*4);for(;w<64;++w)t[w]=ia(t[w-2])+t[w-7]+na(t[w-15])+t[w-16]|0;for(var l=0;l<64;++l){var S=b+ra(u)+Zi(u,c,d)+Ji[l]+t[l]|0,v=ta(r)+ea(r,n,i)|0;b=d,d=c,c=u,u=s+S|0,s=i,i=n,n=r,r=S+v|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=d+this._g|0,this._h=b+this._h|0};Oe.prototype._hash=function(){var e=Xi.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var En=Oe,aa=J,oa=En,sa=Ae,fa=ce.Buffer,la=new Array(64);function Xe(){this.init(),this._w=la,sa.call(this,64,56)}aa(Xe,oa);Xe.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Xe.prototype._hash=function(){var e=fa.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var ua=Xe,ha=J,Sn=Ae,_a=ce.Buffer,Ir=[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],ca=new Array(160);function Ie(){this.init(),this._w=ca,Sn.call(this,128,112)}ha(Ie,Sn);Ie.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function $r(e,t,r){return r^e&(t^r)}function Fr(e,t,r){return e&t|r&(e|t)}function Hr(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Ur(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function da(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function pa(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function ba(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function va(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function j(e,t){return e>>>0>>0?1:0}Ie.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,u=this._eh|0,c=this._fh|0,d=this._gh|0,b=this._hh|0,w=this._al|0,l=this._bl|0,S=this._cl|0,v=this._dl|0,R=this._el|0,A=this._fl|0,x=this._gl|0,f=this._hl|0,p=0;p<32;p+=2)t[p]=e.readInt32BE(p*4),t[p+1]=e.readInt32BE(p*4+4);for(;p<160;p+=2){var y=t[p-30],m=t[p-15*2+1],T=da(y,m),k=pa(m,y);y=t[p-2*2],m=t[p-2*2+1];var O=ba(y,m),D=va(m,y),M=t[p-7*2],$=t[p-7*2+1],W=t[p-16*2],Z=t[p-16*2+1],q=k+$|0,z=T+M+j(q,k)|0;q=q+D|0,z=z+O+j(q,D)|0,q=q+Z|0,z=z+W+j(q,Z)|0,t[p]=z,t[p+1]=q}for(var G=0;G<160;G+=2){z=t[G],q=t[G+1];var le=Fr(r,n,i),K=Fr(w,l,S),ee=Hr(r,w),Y=Hr(w,r),te=Ur(u,R),ue=Ur(R,u),re=Ir[G],V=Ir[G+1],he=$r(u,c,d),ne=$r(R,A,x),_=f+ue|0,h=b+te+j(_,f)|0;_=_+ne|0,h=h+he+j(_,ne)|0,_=_+V|0,h=h+re+j(_,V)|0,_=_+q|0,h=h+z+j(_,q)|0;var E=Y+K|0,B=ee+le+j(E,Y)|0;b=d,f=x,d=c,x=A,c=u,A=R,R=v+_|0,u=s+h+j(R,v)|0,s=i,v=S,i=n,S=l,n=r,l=w,w=_+E|0,r=h+B+j(w,_)|0}this._al=this._al+w|0,this._bl=this._bl+l|0,this._cl=this._cl+S|0,this._dl=this._dl+v|0,this._el=this._el+R|0,this._fl=this._fl+A|0,this._gl=this._gl+x|0,this._hl=this._hl+f|0,this._ah=this._ah+r+j(this._al,w)|0,this._bh=this._bh+n+j(this._bl,l)|0,this._ch=this._ch+i+j(this._cl,S)|0,this._dh=this._dh+s+j(this._dl,v)|0,this._eh=this._eh+u+j(this._el,R)|0,this._fh=this._fh+c+j(this._fl,A)|0,this._gh=this._gh+d+j(this._gl,x)|0,this._hh=this._hh+b+j(this._hl,f)|0};Ie.prototype._hash=function(){var e=_a.allocUnsafe(64);function t(r,n,i){e.writeInt32BE(r,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var mn=Ie,ga=J,ya=mn,wa=Ae,xa=ce.Buffer,Ea=new Array(160);function Je(){this.init(),this._w=Ea,wa.call(this,128,112)}ga(Je,ya);Je.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Je.prototype._hash=function(){var e=xa.allocUnsafe(48);function t(r,n,i){e.writeInt32BE(r,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Sa=Je,ge=vn.exports=function(t){t=t.toLowerCase();var r=ge[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};ge.sha=Fi;ge.sha1=Ki;ge.sha224=ua;ge.sha256=En;ge.sha384=Sa;ge.sha512=mn;var Ka=vn.exports;function Rn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t2&&(u.children=arguments.length>3?$e.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)u[s]===void 0&&(u[s]=e.defaultProps[s]);return Be(e,u,n,i,null)}function Be(e,t,r,n,i){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Tn,__i:-1,__u:0};return i==null&&H.vnode!=null&&H.vnode(s),s}function Ta(){return{current:null}}function Fe(e){return e.children}function Me(e,t){this.props=e,this.context=t}function be(e,t){if(t==null)return e.__?be(e.__,e.__i+1):null;for(var r;tt&&pe.sort(fr));ze.__r=0}function Nn(e,t,r,n,i,s,u,c,d,b,w){var l,S,v,R,A,x=n&&n.__k||Bn,f=t.length;for(r.__d=d,Aa(r,t,x),d=r.__d,l=0;l0?Be(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,c=Ca(i,r,u,w),i.__i=c,s=null,c!==-1&&(w--,(s=r[c])&&(s.__u|=131072)),s==null||s.__v===null?(c==-1&&l--,typeof i.type!="function"&&(i.__u|=65536)):c!==u&&(c==u-1?l--:c==u+1?l++:c>u?w>d-u?l+=c-u:l--:c(d!=null&&!(131072&d.__u)?1:0))for(;u>=0||c=0){if((d=t[u])&&!(131072&d.__u)&&i==d.key&&s===d.type)return u;u--}if(c2&&(c.children=arguments.length>3?$e.call(arguments,2):r),Be(e.type,c,n||e.key,i||e.ref,null)}function Da(e,t){var r={__c:t="__cC"+kn++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(u){this.props.value!==u.value&&i.some(function(c){c.__e=!0,_r(c)})},this.sub=function(u){i.push(u);var c=u.componentWillUnmount;u.componentWillUnmount=function(){i&&i.splice(i.indexOf(u),1),c&&c.call(u)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}$e=Bn.slice,H={__e:function(e,t,r,n){for(var i,s,u;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),u=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),u=i.__d),u)return i.__E=i}catch(c){e=c}throw e}},Tn=0,An=function(e){return e!=null&&e.constructor==null},Me.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=oe({},this.state),typeof e=="function"&&(e=e(oe({},r),this.props)),e&&oe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),_r(this))},Me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_r(this))},Me.prototype.render=Fe,pe=[],Cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fr=function(e,t){return e.__v.__b-t.__v.__b},ze.__r=0,vr=0,lr=zr(!1),ur=zr(!0),kn=0;const Na=Object.freeze(Object.defineProperty({__proto__:null,Component:Me,Fragment:Fe,cloneElement:Ma,createContext:Da,createElement:hr,createRef:Ta,h:hr,hydrate:$n,get isValidElement(){return An},get options(){return H},render:In,toChildArray:Pn},Symbol.toStringTag,{value:"Module"})),Xa=pr(Na);var fe,I,nr,Gr,Re=0,Fn=[],U=H,Vr=U.__b,Kr=U.__r,Yr=U.diffed,Xr=U.__c,Jr=U.unmount,Qr=U.__;function ye(e,t){U.__h&&U.__h(I,e,Re||t),Re=0;var r=I.__H||(I.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Hn(e){return Re=1,Un(jn,e)}function Un(e,t,r){var n=ye(fe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):jn(void 0,t),function(c){var d=n.__N?n.__N[0]:n.__[0],b=n.t(d,c);d!==b&&(n.__N=[b,n.__[1]],n.__c.setState({}))}],n.__c=I,!I.u)){var i=function(c,d,b){if(!n.__c.__H)return!0;var w=n.__c.__H.__.filter(function(S){return!!S.__c});if(w.every(function(S){return!S.__N}))return!s||s.call(this,c,d,b);var l=!1;return w.forEach(function(S){if(S.__N){var v=S.__[0];S.__=S.__N,S.__N=void 0,v!==S.__[0]&&(l=!0)}}),!(!l&&n.__c.props===c)&&(!s||s.call(this,c,d,b))};I.u=!0;var s=I.shouldComponentUpdate,u=I.componentWillUpdate;I.componentWillUpdate=function(c,d,b){if(this.__e){var w=s;s=void 0,i(c,d,b),s=w}u&&u.call(this,c,d,b)},I.shouldComponentUpdate=i}return n.__N||n.__}function La(e,t){var r=ye(fe++,3);!U.__s&&xr(r.__H,t)&&(r.__=e,r.i=t,I.__H.__h.push(r))}function qn(e,t){var r=ye(fe++,4);!U.__s&&xr(r.__H,t)&&(r.__=e,r.i=t,I.__h.push(r))}function Pa(e){return Re=5,wr(function(){return{current:e}},[])}function Oa(e,t,r){Re=6,qn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function wr(e,t){var r=ye(fe++,7);return xr(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Ia(e,t){return Re=8,wr(function(){return e},t)}function $a(e){var t=I.context[e.__c],r=ye(fe++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(I)),t.props.value):e.__}function Fa(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function Ha(e){var t=ye(fe++,10),r=Hn();return t.__=e,I.componentDidCatch||(I.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Ua(){var e=ye(fe++,11);if(!e.__){for(var t=I.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function qa(){for(var e;e=Fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(je),e.__H.__h.forEach(dr),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}U.__b=function(e){I=null,Vr&&Vr(e)},U.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Qr&&Qr(e,t)},U.__r=function(e){Kr&&Kr(e),fe=0;var t=(I=e.__c).__H;t&&(nr===I?(t.__h=[],I.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(je),t.__h.forEach(dr),t.__h=[],fe=0)),nr=I},U.diffed=function(e){Yr&&Yr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Fn.push(t)!==1&&Gr===U.requestAnimationFrame||((Gr=U.requestAnimationFrame)||ja)(qa)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),nr=I=null},U.__c=function(e,t){t.some(function(r){try{r.__h.forEach(je),r.__h=r.__h.filter(function(n){return!n.__||dr(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],U.__e(n,r.__v)}}),Xr&&Xr(e,t)},U.unmount=function(e){Jr&&Jr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{je(n)}catch(i){t=i}}),r.__H=void 0,t&&U.__e(t,r.__v))};var Zr=typeof requestAnimationFrame=="function";function ja(e){var t,r=function(){clearTimeout(n),Zr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Zr&&(t=requestAnimationFrame(r))}function je(e){var t=I,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),I=t}function dr(e){var t=I;e.__c=e.__(),I=t}function xr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function jn(e,t){return typeof t=="function"?t(e):t}const Wa=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Ia,useContext:$a,useDebugValue:Fa,useEffect:La,useErrorBoundary:Ha,useId:Ua,useImperativeHandle:Oa,useLayoutEffect:qn,useMemo:wr,useReducer:Un,useRef:Pa,useState:Hn},Symbol.toStringTag,{value:"Module"})),Ja=pr(Wa);export{Xa as a,Ja as b,Va as j,Ya as r,Ka as s}; diff --git a/assets/index-B5bDTh7Y.js b/assets/index-B5bDTh7Y.js new file mode 100644 index 0000000..9480dab --- /dev/null +++ b/assets/index-B5bDTh7Y.js @@ -0,0 +1,6265 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Y3Spvhtd.js","assets/hooks.module-D8pHM5EM.js","assets/___vite-browser-external_commonjs-proxy-DtqXsXYi.js","assets/index-BRISspn-.js","assets/index.es-D_NNZUrP.js"])))=>i.map(i=>d[i]); +var Lhe=Object.defineProperty;var ND=e=>{throw TypeError(e)};var Bhe=(e,t,n)=>t in e?Lhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t,n)=>Bhe(e,typeof t!="symbol"?t+"":t,n),cA=(e,t,n)=>t.has(e)||ND("Cannot "+n);var C=(e,t,n)=>(cA(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?ND("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(cA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),de=(e,t,n)=>(cA(e,t,"access private method"),n);var xo=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return C(e,t,r)}});function $q(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qs(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Hq={exports:{}},u7={},Vq={exports:{}},Lt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var G4=Symbol.for("react.element"),Mhe=Symbol.for("react.portal"),Dhe=Symbol.for("react.fragment"),jhe=Symbol.for("react.strict_mode"),Fhe=Symbol.for("react.profiler"),Uhe=Symbol.for("react.provider"),zhe=Symbol.for("react.context"),$he=Symbol.for("react.forward_ref"),Hhe=Symbol.for("react.suspense"),Vhe=Symbol.for("react.memo"),Whe=Symbol.for("react.lazy"),OD=Symbol.iterator;function Ghe(e){return e===null||typeof e!="object"?null:(e=OD&&e[OD]||e["@@iterator"],typeof e=="function"?e:null)}var Wq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gq=Object.assign,Kq={};function Km(e,t,n){this.props=e,this.context=t,this.refs=Kq,this.updater=n||Wq}Km.prototype.isReactComponent={};Km.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Km.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qq(){}Qq.prototype=Km.prototype;function pN(e,t,n){this.props=e,this.context=t,this.refs=Kq,this.updater=n||Wq}var gN=pN.prototype=new Qq;gN.constructor=pN;Gq(gN,Km.prototype);gN.isPureReactComponent=!0;var LD=Array.isArray,Yq=Object.prototype.hasOwnProperty,mN={current:null},qq={key:!0,ref:!0,__self:!0,__source:!0};function Zq(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Yq.call(t,r)&&!qq.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(10)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function ope(e){var t=eZ(e),n=t[0],r=t[1];return(n+r)*3/4-r}function spe(e,t,n){return(t+n)*3/4-n}function ape(e){var t,n=eZ(e),r=n[0],i=n[1],o=new rpe(spe(e,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=Ss[e.charCodeAt(c)]<<2|Ss[e.charCodeAt(c+1)]>>4,o[s++]=t&255),i===1&&(t=Ss[e.charCodeAt(c)]<<10|Ss[e.charCodeAt(c+1)]<<4|Ss[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function cpe(e){return Ec[e>>18&63]+Ec[e>>12&63]+Ec[e>>6&63]+Ec[e&63]}function upe(e,t,n){for(var r,i=[],o=t;oa?a:s+o));return r===1?(t=e[n-1],i.push(Ec[t>>2]+Ec[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Ec[t>>10]+Ec[t>>4&63]+Ec[t<<2&63]+"=")),i.join("")}var vN={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */vN.read=function(e,t,n,r,i){var o,s,a=i*8-r-1,c=(1<>1,l=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=o*256+e[t+d],d+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=s*256+e[t+d],d+=f,l-=8);if(o===0)o=1-u;else{if(o===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-u}return(h?-1:1)*s*Math.pow(2,o-r)};vN.write=function(e,t,n,r,i,o){var s,a,c,u=o*8-i-1,l=(1<>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=f/c:t+=f*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=a&255,h+=p,a/=256,i-=8);for(s=s<0;e[n+h]=s&255,h+=p,s/=256,u-=8);e[n+h-p]|=m*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=l7,n=vN,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const U=new Uint8Array(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,Uint8Array.prototype),Object.setPrototypeOf(U,T),U.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(U){if(U>i)throw new RangeError('The value "'+U+'" is invalid for option "size"');const T=new Uint8Array(U);return Object.setPrototypeOf(T,a.prototype),T}function a(U,T,B){if(typeof U=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return c(U,T,B)}a.poolSize=8192;function c(U,T,B){if(typeof U=="string")return f(U,T);if(ArrayBuffer.isView(U))return p(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Ie(U,ArrayBuffer)||U&&Ie(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(U,SharedArrayBuffer)||U&&Ie(U.buffer,SharedArrayBuffer)))return m(U,T,B);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=U.valueOf&&U.valueOf();if(Y!=null&&Y!==U)return a.from(Y,T,B);const ue=x(U);if(ue)return ue;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return a.from(U[Symbol.toPrimitive]("string"),T,B);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}a.from=function(U,T,B){return c(U,T,B)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function l(U,T,B){return u(U),U<=0?s(U):T!==void 0?typeof B=="string"?s(U).fill(T,B):s(U).fill(T):s(U)}a.alloc=function(U,T,B){return l(U,T,B)};function d(U){return u(U),s(U<0?0:y(U)|0)}a.allocUnsafe=function(U){return d(U)},a.allocUnsafeSlow=function(U){return d(U)};function f(U,T){if((typeof T!="string"||T==="")&&(T="utf8"),!a.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const B=v(U,T)|0;let Y=s(B);const ue=Y.write(U,T);return ue!==B&&(Y=Y.slice(0,ue)),Y}function h(U){const T=U.length<0?0:y(U.length)|0,B=s(T);for(let Y=0;Y=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return U|0}function b(U){return+U!=U&&(U=0),a.alloc(+U)}a.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==a.prototype},a.compare=function(T,B){if(Ie(T,Uint8Array)&&(T=a.from(T,T.offset,T.byteLength)),Ie(B,Uint8Array)&&(B=a.from(B,B.offset,B.byteLength)),!a.isBuffer(T)||!a.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===B)return 0;let Y=T.length,ue=B.length;for(let xe=0,Te=Math.min(Y,ue);xeue.length?(a.isBuffer(Te)||(Te=a.from(Te)),Te.copy(ue,xe)):Uint8Array.prototype.set.call(ue,Te,xe);else if(a.isBuffer(Te))Te.copy(ue,xe);else throw new TypeError('"list" argument must be an Array of Buffers');xe+=Te.length}return ue};function v(U,T){if(a.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Ie(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const B=U.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&B===0)return 0;let ue=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return B;case"utf8":case"utf-8":return oe(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B*2;case"hex":return B>>>1;case"base64":return qe(U).length;default:if(ue)return Y?-1:oe(U).length;T=(""+T).toLowerCase(),ue=!0}}a.byteLength=v;function w(U,T,B){let Y=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((B===void 0||B>this.length)&&(B=this.length),B<=0)||(B>>>=0,T>>>=0,B<=T))return"";for(U||(U="utf8");;)switch(U){case"hex":return H(this,T,B);case"utf8":case"utf-8":return z(this,T,B);case"ascii":return W(this,T,B);case"latin1":case"binary":return G(this,T,B);case"base64":return M(this,T,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,T,B);default:if(Y)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),Y=!0}}a.prototype._isBuffer=!0;function E(U,T,B){const Y=U[T];U[T]=U[B],U[B]=Y}a.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let B=0;BB&&(T+=" ... "),""},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(T,B,Y,ue,xe){if(Ie(T,Uint8Array)&&(T=a.from(T,T.offset,T.byteLength)),!a.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(B===void 0&&(B=0),Y===void 0&&(Y=T?T.length:0),ue===void 0&&(ue=0),xe===void 0&&(xe=this.length),B<0||Y>T.length||ue<0||xe>this.length)throw new RangeError("out of range index");if(ue>=xe&&B>=Y)return 0;if(ue>=xe)return-1;if(B>=Y)return 1;if(B>>>=0,Y>>>=0,ue>>>=0,xe>>>=0,this===T)return 0;let Te=xe-ue,dt=Y-B;const vt=Math.min(Te,dt),mt=this.slice(ue,xe),Tt=T.slice(B,Y);for(let Et=0;Et2147483647?B=2147483647:B<-2147483648&&(B=-2147483648),B=+B,ie(B)&&(B=ue?0:U.length-1),B<0&&(B=U.length+B),B>=U.length){if(ue)return-1;B=U.length-1}else if(B<0)if(ue)B=0;else return-1;if(typeof T=="string"&&(T=a.from(T,Y)),a.isBuffer(T))return T.length===0?-1:I(U,T,B,Y,ue);if(typeof T=="number")return T=T&255,typeof Uint8Array.prototype.indexOf=="function"?ue?Uint8Array.prototype.indexOf.call(U,T,B):Uint8Array.prototype.lastIndexOf.call(U,T,B):I(U,[T],B,Y,ue);throw new TypeError("val must be string, number or Buffer")}function I(U,T,B,Y,ue){let xe=1,Te=U.length,dt=T.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(U.length<2||T.length<2)return-1;xe=2,Te/=2,dt/=2,B/=2}function vt(Tt,Et){return xe===1?Tt[Et]:Tt.readUInt16BE(Et*xe)}let mt;if(ue){let Tt=-1;for(mt=B;mtTe&&(B=Te-dt),mt=B;mt>=0;mt--){let Tt=!0;for(let Et=0;Etue&&(Y=ue)):Y=ue;const xe=T.length;Y>xe/2&&(Y=xe/2);let Te;for(Te=0;Te>>0,isFinite(Y)?(Y=Y>>>0,ue===void 0&&(ue="utf8")):(ue=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const xe=this.length-B;if((Y===void 0||Y>xe)&&(Y=xe),T.length>0&&(Y<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");ue||(ue="utf8");let Te=!1;for(;;)switch(ue){case"hex":return A(this,T,B,Y);case"utf8":case"utf-8":return O(this,T,B,Y);case"ascii":case"latin1":case"binary":return N(this,T,B,Y);case"base64":return R(this,T,B,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,T,B,Y);default:if(Te)throw new TypeError("Unknown encoding: "+ue);ue=(""+ue).toLowerCase(),Te=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(U,T,B){return T===0&&B===U.length?t.fromByteArray(U):t.fromByteArray(U.slice(T,B))}function z(U,T,B){B=Math.min(U.length,B);const Y=[];let ue=T;for(;ue239?4:xe>223?3:xe>191?2:1;if(ue+dt<=B){let vt,mt,Tt,Et;switch(dt){case 1:xe<128&&(Te=xe);break;case 2:vt=U[ue+1],(vt&192)===128&&(Et=(xe&31)<<6|vt&63,Et>127&&(Te=Et));break;case 3:vt=U[ue+1],mt=U[ue+2],(vt&192)===128&&(mt&192)===128&&(Et=(xe&15)<<12|(vt&63)<<6|mt&63,Et>2047&&(Et<55296||Et>57343)&&(Te=Et));break;case 4:vt=U[ue+1],mt=U[ue+2],Tt=U[ue+3],(vt&192)===128&&(mt&192)===128&&(Tt&192)===128&&(Et=(xe&15)<<18|(vt&63)<<12|(mt&63)<<6|Tt&63,Et>65535&&Et<1114112&&(Te=Et))}}Te===null?(Te=65533,dt=1):Te>65535&&(Te-=65536,Y.push(Te>>>10&1023|55296),Te=56320|Te&1023),Y.push(Te),ue+=dt}return $(Y)}const F=4096;function $(U){const T=U.length;if(T<=F)return String.fromCharCode.apply(String,U);let B="",Y=0;for(;YY)&&(B=Y);let ue="";for(let xe=T;xeY&&(T=Y),B<0?(B+=Y,B<0&&(B=0)):B>Y&&(B=Y),BB)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(T,B,Y){T=T>>>0,B=B>>>0,Y||q(T,B,this.length);let ue=this[T],xe=1,Te=0;for(;++Te>>0,B=B>>>0,Y||q(T,B,this.length);let ue=this[T+--B],xe=1;for(;B>0&&(xe*=256);)ue+=this[T+--B]*xe;return ue},a.prototype.readUint8=a.prototype.readUInt8=function(T,B){return T=T>>>0,B||q(T,1,this.length),this[T]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(T,B){return T=T>>>0,B||q(T,2,this.length),this[T]|this[T+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(T,B){return T=T>>>0,B||q(T,2,this.length),this[T]<<8|this[T+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(T,B){return T=T>>>0,B||q(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(T,B){return T=T>>>0,B||q(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},a.prototype.readBigUInt64LE=ve(function(T){T=T>>>0,Me(T,"offset");const B=this[T],Y=this[T+7];(B===void 0||Y===void 0)&&re(T,this.length-8);const ue=B+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,xe=this[++T]+this[++T]*2**8+this[++T]*2**16+Y*2**24;return BigInt(ue)+(BigInt(xe)<>>0,Me(T,"offset");const B=this[T],Y=this[T+7];(B===void 0||Y===void 0)&&re(T,this.length-8);const ue=B*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],xe=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Y;return(BigInt(ue)<>>0,B=B>>>0,Y||q(T,B,this.length);let ue=this[T],xe=1,Te=0;for(;++Te=xe&&(ue-=Math.pow(2,8*B)),ue},a.prototype.readIntBE=function(T,B,Y){T=T>>>0,B=B>>>0,Y||q(T,B,this.length);let ue=B,xe=1,Te=this[T+--ue];for(;ue>0&&(xe*=256);)Te+=this[T+--ue]*xe;return xe*=128,Te>=xe&&(Te-=Math.pow(2,8*B)),Te},a.prototype.readInt8=function(T,B){return T=T>>>0,B||q(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},a.prototype.readInt16LE=function(T,B){T=T>>>0,B||q(T,2,this.length);const Y=this[T]|this[T+1]<<8;return Y&32768?Y|4294901760:Y},a.prototype.readInt16BE=function(T,B){T=T>>>0,B||q(T,2,this.length);const Y=this[T+1]|this[T]<<8;return Y&32768?Y|4294901760:Y},a.prototype.readInt32LE=function(T,B){return T=T>>>0,B||q(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},a.prototype.readInt32BE=function(T,B){return T=T>>>0,B||q(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},a.prototype.readBigInt64LE=ve(function(T){T=T>>>0,Me(T,"offset");const B=this[T],Y=this[T+7];(B===void 0||Y===void 0)&&re(T,this.length-8);const ue=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(Y<<24);return(BigInt(ue)<>>0,Me(T,"offset");const B=this[T],Y=this[T+7];(B===void 0||Y===void 0)&&re(T,this.length-8);const ue=(B<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(ue)<>>0,B||q(T,4,this.length),n.read(this,T,!0,23,4)},a.prototype.readFloatBE=function(T,B){return T=T>>>0,B||q(T,4,this.length),n.read(this,T,!1,23,4)},a.prototype.readDoubleLE=function(T,B){return T=T>>>0,B||q(T,8,this.length),n.read(this,T,!0,52,8)},a.prototype.readDoubleBE=function(T,B){return T=T>>>0,B||q(T,8,this.length),n.read(this,T,!1,52,8)};function V(U,T,B,Y,ue,xe){if(!a.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>ue||TU.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(T,B,Y,ue){if(T=+T,B=B>>>0,Y=Y>>>0,!ue){const dt=Math.pow(2,8*Y)-1;V(this,T,B,Y,dt,0)}let xe=1,Te=0;for(this[B]=T&255;++Te>>0,Y=Y>>>0,!ue){const dt=Math.pow(2,8*Y)-1;V(this,T,B,Y,dt,0)}let xe=Y-1,Te=1;for(this[B+xe]=T&255;--xe>=0&&(Te*=256);)this[B+xe]=T/Te&255;return B+Y},a.prototype.writeUint8=a.prototype.writeUInt8=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,1,255,0),this[B]=T&255,B+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,2,65535,0),this[B]=T&255,this[B+1]=T>>>8,B+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,2,65535,0),this[B]=T>>>8,this[B+1]=T&255,B+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,4,4294967295,0),this[B+3]=T>>>24,this[B+2]=T>>>16,this[B+1]=T>>>8,this[B]=T&255,B+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,4,4294967295,0),this[B]=T>>>24,this[B+1]=T>>>16,this[B+2]=T>>>8,this[B+3]=T&255,B+4};function P(U,T,B,Y,ue){Ne(T,Y,ue,U,B,7);let xe=Number(T&BigInt(4294967295));U[B++]=xe,xe=xe>>8,U[B++]=xe,xe=xe>>8,U[B++]=xe,xe=xe>>8,U[B++]=xe;let Te=Number(T>>BigInt(32)&BigInt(4294967295));return U[B++]=Te,Te=Te>>8,U[B++]=Te,Te=Te>>8,U[B++]=Te,Te=Te>>8,U[B++]=Te,B}function K(U,T,B,Y,ue){Ne(T,Y,ue,U,B,7);let xe=Number(T&BigInt(4294967295));U[B+7]=xe,xe=xe>>8,U[B+6]=xe,xe=xe>>8,U[B+5]=xe,xe=xe>>8,U[B+4]=xe;let Te=Number(T>>BigInt(32)&BigInt(4294967295));return U[B+3]=Te,Te=Te>>8,U[B+2]=Te,Te=Te>>8,U[B+1]=Te,Te=Te>>8,U[B]=Te,B+8}a.prototype.writeBigUInt64LE=ve(function(T,B=0){return P(this,T,B,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ve(function(T,B=0){return K(this,T,B,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(T,B,Y,ue){if(T=+T,B=B>>>0,!ue){const vt=Math.pow(2,8*Y-1);V(this,T,B,Y,vt-1,-vt)}let xe=0,Te=1,dt=0;for(this[B]=T&255;++xe>0)-dt&255;return B+Y},a.prototype.writeIntBE=function(T,B,Y,ue){if(T=+T,B=B>>>0,!ue){const vt=Math.pow(2,8*Y-1);V(this,T,B,Y,vt-1,-vt)}let xe=Y-1,Te=1,dt=0;for(this[B+xe]=T&255;--xe>=0&&(Te*=256);)T<0&&dt===0&&this[B+xe+1]!==0&&(dt=1),this[B+xe]=(T/Te>>0)-dt&255;return B+Y},a.prototype.writeInt8=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,1,127,-128),T<0&&(T=255+T+1),this[B]=T&255,B+1},a.prototype.writeInt16LE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,2,32767,-32768),this[B]=T&255,this[B+1]=T>>>8,B+2},a.prototype.writeInt16BE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,2,32767,-32768),this[B]=T>>>8,this[B+1]=T&255,B+2},a.prototype.writeInt32LE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,4,2147483647,-2147483648),this[B]=T&255,this[B+1]=T>>>8,this[B+2]=T>>>16,this[B+3]=T>>>24,B+4},a.prototype.writeInt32BE=function(T,B,Y){return T=+T,B=B>>>0,Y||V(this,T,B,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[B]=T>>>24,this[B+1]=T>>>16,this[B+2]=T>>>8,this[B+3]=T&255,B+4},a.prototype.writeBigInt64LE=ve(function(T,B=0){return P(this,T,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ve(function(T,B=0){return K(this,T,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ce(U,T,B,Y,ue,xe){if(B+Y>U.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("Index out of range")}function X(U,T,B,Y,ue){return T=+T,B=B>>>0,ue||ce(U,T,B,4),n.write(U,T,B,Y,23,4),B+4}a.prototype.writeFloatLE=function(T,B,Y){return X(this,T,B,!0,Y)},a.prototype.writeFloatBE=function(T,B,Y){return X(this,T,B,!1,Y)};function ke(U,T,B,Y,ue){return T=+T,B=B>>>0,ue||ce(U,T,B,8),n.write(U,T,B,Y,52,8),B+8}a.prototype.writeDoubleLE=function(T,B,Y){return ke(this,T,B,!0,Y)},a.prototype.writeDoubleBE=function(T,B,Y){return ke(this,T,B,!1,Y)},a.prototype.copy=function(T,B,Y,ue){if(!a.isBuffer(T))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!ue&&ue!==0&&(ue=this.length),B>=T.length&&(B=T.length),B||(B=0),ue>0&&ue=this.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("sourceEnd out of bounds");ue>this.length&&(ue=this.length),T.length-B>>0,Y=Y===void 0?this.length:Y>>>0,T||(T=0);let xe;if(typeof T=="number")for(xe=B;xe2**32?ue=Be(String(B)):typeof B=="bigint"&&(ue=String(B),(B>BigInt(2)**BigInt(32)||B<-(BigInt(2)**BigInt(32)))&&(ue=Be(ue)),ue+="n"),Y+=` It must be ${T}. Received ${ue}`,Y},RangeError);function Be(U){let T="",B=U.length;const Y=U[0]==="-"?1:0;for(;B>=Y+4;B-=3)T=`_${U.slice(B-3,B)}${T}`;return`${U.slice(0,B)}${T}`}function Le(U,T,B){Me(T,"offset"),(U[T]===void 0||U[T+B]===void 0)&&re(T,U.length-(B+1))}function Ne(U,T,B,Y,ue,xe){if(U>B||U= 0${Te} and < 2${Te} ** ${(xe+1)*8}${Te}`:dt=`>= -(2${Te} ** ${(xe+1)*8-1}${Te}) and < 2 ** ${(xe+1)*8-1}${Te}`,new me.ERR_OUT_OF_RANGE("value",dt,U)}Le(Y,ue,xe)}function Me(U,T){if(typeof U!="number")throw new me.ERR_INVALID_ARG_TYPE(T,"number",U)}function re(U,T,B){throw Math.floor(U)!==U?(Me(U,B),new me.ERR_OUT_OF_RANGE("offset","an integer",U)):T<0?new me.ERR_BUFFER_OUT_OF_BOUNDS:new me.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${T}`,U)}const Q=/[^+/0-9A-Za-z-_]/g;function se(U){if(U=U.split("=")[0],U=U.trim().replace(Q,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function oe(U,T){T=T||1/0;let B;const Y=U.length;let ue=null;const xe=[];for(let Te=0;Te55295&&B<57344){if(!ue){if(B>56319){(T-=3)>-1&&xe.push(239,191,189);continue}else if(Te+1===Y){(T-=3)>-1&&xe.push(239,191,189);continue}ue=B;continue}if(B<56320){(T-=3)>-1&&xe.push(239,191,189),ue=B;continue}B=(ue-55296<<10|B-56320)+65536}else ue&&(T-=3)>-1&&xe.push(239,191,189);if(ue=null,B<128){if((T-=1)<0)break;xe.push(B)}else if(B<2048){if((T-=2)<0)break;xe.push(B>>6|192,B&63|128)}else if(B<65536){if((T-=3)<0)break;xe.push(B>>12|224,B>>6&63|128,B&63|128)}else if(B<1114112){if((T-=4)<0)break;xe.push(B>>18|240,B>>12&63|128,B>>6&63|128,B&63|128)}else throw new Error("Invalid code point")}return xe}function Ce(U){const T=[];for(let B=0;B>8,ue=B%256,xe.push(ue),xe.push(Y);return xe}function qe(U){return t.toByteArray(se(U))}function Ge(U,T,B,Y){let ue;for(ue=0;ue=T.length||ue>=U.length);++ue)T[ue+B]=U[ue];return ue}function Ie(U,T){return U instanceof T||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===T.name}function ie(U){return U!==U}const te=function(){const U="0123456789abcdef",T=new Array(256);for(let B=0;B<16;++B){const Y=B*16;for(let ue=0;ue<16;++ue)T[Y+ue]=U[B]+U[ue]}return T}();function ve(U){return typeof BigInt>"u"?fe:U}function fe(){throw new Error("BigInt not supported")}})(bN);var Qm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zg=typeof window>"u"||"Deno"in globalThis;function Ns(){}function dpe(e,t){return typeof e=="function"?e(t):e}function LT(e){return typeof e=="number"&&e>=0&&e!==1/0}function tZ(e,t){return Math.max(e+(t||0)-Date.now(),0)}function I1(e,t){return typeof e=="function"?e(t):e}function MD(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==xN(s,t.options))return!1}else if(!Y3(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function DD(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ch(t.options.mutationKey)!==Ch(o))return!1}else if(!Y3(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xN(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ch)(e)}function Ch(e){return JSON.stringify(e,(t,n)=>BT(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Y3(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Y3(e[n],t[n])):!1}function wN(e,t){if(e===t)return e;const n=jD(e)&&jD(t);if(n||BT(e)&&BT(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let c=0;for(let u=0;u{setTimeout(t,e)})}function MT(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?wN(e,t):t}function hpe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ppe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nZ=Symbol(),rZ=(e,t)=>!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===nZ?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn,F0,gd,X1,Rq,gpe=(Rq=class extends Qm{constructor(){super();J(this,F0);J(this,gd);J(this,X1);D(this,X1,t=>{if(!Zg&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,gd)||this.setEventListener(C(this,X1))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,gd))==null||t.call(this),D(this,gd,void 0))}setEventListener(t){var n;D(this,X1,t),(n=C(this,gd))==null||n.call(this),D(this,gd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,F0)!==t&&(D(this,F0,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,F0)=="boolean"?C(this,F0):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},F0=new WeakMap,gd=new WeakMap,X1=new WeakMap,Rq),EN=new gpe,eg,md,tg,Nq,mpe=(Nq=class extends Qm{constructor(){super();J(this,eg,!0);J(this,md);J(this,tg);D(this,tg,t=>{if(!Zg&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,md)||this.setEventListener(C(this,tg))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,md))==null||t.call(this),D(this,md,void 0))}setEventListener(t){var n;D(this,tg,t),(n=C(this,md))==null||n.call(this),D(this,md,t(this.setOnline.bind(this)))}setOnline(t){C(this,eg)!==t&&(D(this,eg,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,eg)}},eg=new WeakMap,md=new WeakMap,tg=new WeakMap,Nq),ow=new mpe;function ype(e){return Math.min(1e3*2**e,3e4)}function iZ(e){return(e??"online")==="online"?ow.isOnline():!0}var oZ=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dA(e){return e instanceof oZ}function sZ(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((y,b)=>{o=y,s=b}),c=y=>{var b;r||(p(new oZ(y)),(b=e.abort)==null||b.call(e))},u=()=>{t=!0},l=()=>{t=!1},d=()=>EN.isFocused()&&(e.networkMode==="always"||ow.isOnline())&&e.canRun(),f=()=>iZ(e.networkMode)&&e.canRun(),h=y=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,y),i==null||i(),o(y))},p=y=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,y),i==null||i(),s(y))},m=()=>new Promise(y=>{var b;i=v=>{(r||d())&&y(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;i=void 0,r||(y=e.onContinue)==null||y.call(e)}),x=()=>{if(r)return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var A;if(r)return;const w=e.retry??(Zg?0:3),E=e.retryDelay??ype,S=typeof E=="function"?E(n,v):E,I=w===!0||typeof w=="number"&&nd()?void 0:m()).then(()=>{t?p(v):x()})})};return{promise:a,cancel:c,continue:()=>(i==null||i(),a),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?x():m().then(x),a)}}function bpe(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=f=>setTimeout(f,0);const o=f=>{i=f},s=f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},a=f=>{t?e.push(f):i(()=>{n(f)})},c=f=>(...h)=>{a(()=>{f(...h)})},u=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(h=>{n(h)})})})};return{batch:s,batchCalls:c,schedule:a,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:o}}var Ar=bpe(),U0,Oq,aZ=(Oq=class{constructor(){J(this,U0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),LT(this.gcTime)&&D(this,U0,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zg?1/0:5*60*1e3))}clearGcTimeout(){C(this,U0)&&(clearTimeout(C(this,U0)),D(this,U0,void 0))}},U0=new WeakMap,Oq),ng,rg,Ts,ai,k4,z0,ma,lu,Lq,vpe=(Lq=class extends aZ{constructor(t){super();J(this,ma);J(this,ng);J(this,rg);J(this,Ts);J(this,ai);J(this,k4);J(this,z0);D(this,z0,!1),D(this,k4,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Ts,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,ng,t.state||xpe(this.options)),this.state=C(this,ng),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,ai))==null?void 0:t.promise}setOptions(t){this.options={...C(this,k4),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Ts).remove(this)}setData(t,n){const r=MT(this.state.data,t,this.options);return de(this,ma,lu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){de(this,ma,lu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,ai))==null?void 0:r.promise;return(i=C(this,ai))==null||i.cancel(t),n?n.then(Ns).catch(Ns):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,ng))}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!tZ(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ai))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ai))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Ts).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,ai)&&(C(this,z0)?C(this,ai).cancel({revert:!0}):C(this,ai).cancelRetry()),this.scheduleGc()),C(this,Ts).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,ma,lu).call(this,{type:"invalidate"})}fetch(t,n){var c,u,l;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,ai))return C(this,ai).continueRetry(),C(this,ai).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(D(this,z0,!0),r.signal)})},o=()=>{const d=rZ(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),D(this,z0,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(c=this.options.behavior)==null||c.onFetch(s,this),D(this,rg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&de(this,ma,lu).call(this,{type:"fetch",meta:(l=s.fetchOptions)==null?void 0:l.meta});const a=d=>{var f,h,p,m;dA(d)&&d.silent||de(this,ma,lu).call(this,{type:"error",error:d}),dA(d)||((h=(f=C(this,Ts).config).onError)==null||h.call(f,d,this),(m=(p=C(this,Ts).config).onSettled)==null||m.call(p,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return D(this,ai,sZ({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,p,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(h=(f=C(this,Ts).config).onSuccess)==null||h.call(f,d,this),(m=(p=C(this,Ts).config).onSettled)==null||m.call(p,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(d,f)=>{de(this,ma,lu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{de(this,ma,lu).call(this,{type:"pause"})},onContinue:()=>{de(this,ma,lu).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),C(this,ai).start()}},ng=new WeakMap,rg=new WeakMap,Ts=new WeakMap,ai=new WeakMap,k4=new WeakMap,z0=new WeakMap,ma=new WeakSet,lu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...cZ(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return dA(i)&&i.revert&&C(this,rg)?{...C(this,rg),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ar.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,Ts).notify({query:this,type:"updated",action:t})})},Lq);function cZ(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iZ(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xpe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var uc,Bq,wpe=(Bq=class extends Qm{constructor(t={}){super();J(this,uc);this.config=t,D(this,uc,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??xN(i,n);let s=this.get(o);return s||(s=new vpe({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){C(this,uc).has(t.queryHash)||(C(this,uc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,uc).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,uc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ar.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,uc).get(t)}getAll(){return[...C(this,uc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>MD(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>MD(t,r)):n}notify(t){Ar.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ar.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ar.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},uc=new WeakMap,Bq),lc,Ii,$0,dc,Ql,Mq,Epe=(Mq=class extends aZ{constructor(t){super();J(this,dc);J(this,lc);J(this,Ii);J(this,$0);this.mutationId=t.mutationId,D(this,Ii,t.mutationCache),D(this,lc,[]),this.state=t.state||uZ(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,lc).includes(t)||(C(this,lc).push(t),this.clearGcTimeout(),C(this,Ii).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,lc,C(this,lc).filter(n=>n!==t)),this.scheduleGc(),C(this,Ii).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,lc).length||(this.state.status==="pending"?this.scheduleGc():C(this,Ii).remove(this))}continue(){var t;return((t=C(this,$0))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,c,u,l,d,f,h,p,m,x,y,b,v,w,E,S,I;D(this,$0,sZ({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{de(this,dc,Ql).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{de(this,dc,Ql).call(this,{type:"pause"})},onContinue:()=>{de(this,dc,Ql).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Ii).canRun(this)}));const n=this.state.status==="pending",r=!C(this,$0).canStart();try{if(!n){de(this,dc,Ql).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=C(this,Ii).config).onMutate)==null?void 0:o.call(i,t,this));const O=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));O!==this.state.context&&de(this,dc,Ql).call(this,{type:"pending",context:O,variables:t,isPaused:r})}const A=await C(this,$0).start();return await((u=(c=C(this,Ii).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this)),await((d=(l=this.options).onSuccess)==null?void 0:d.call(l,A,t,this.state.context)),await((h=(f=C(this,Ii).config).onSettled)==null?void 0:h.call(f,A,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,A,null,t,this.state.context)),de(this,dc,Ql).call(this,{type:"success",data:A}),A}catch(A){try{throw await((y=(x=C(this,Ii).config).onError)==null?void 0:y.call(x,A,t,this.state.context,this)),await((v=(b=this.options).onError)==null?void 0:v.call(b,A,t,this.state.context)),await((E=(w=C(this,Ii).config).onSettled)==null?void 0:E.call(w,void 0,A,this.state.variables,this.state.context,this)),await((I=(S=this.options).onSettled)==null?void 0:I.call(S,void 0,A,t,this.state.context)),A}finally{de(this,dc,Ql).call(this,{type:"error",error:A})}}finally{C(this,Ii).runNext(this)}}},lc=new WeakMap,Ii=new WeakMap,$0=new WeakMap,dc=new WeakSet,Ql=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ar.batch(()=>{C(this,lc).forEach(r=>{r.onMutationUpdate(t)}),C(this,Ii).notify({mutation:this,type:"updated",action:t})})},Mq);function uZ(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Io,T4,Dq,Cpe=(Dq=class extends Qm{constructor(t={}){super();J(this,Io);J(this,T4);this.config=t,D(this,Io,new Map),D(this,T4,Date.now())}build(t,n,r){const i=new Epe({mutationCache:this,mutationId:++xo(this,T4)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=fx(t),r=C(this,Io).get(n)??[];r.push(t),C(this,Io).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=fx(t);if(C(this,Io).has(n)){const i=(r=C(this,Io).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?C(this,Io).delete(n):C(this,Io).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=C(this,Io).get(fx(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=C(this,Io).get(fx(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ar.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...C(this,Io).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>DD(n,r))}findAll(t={}){return this.getAll().filter(n=>DD(t,n))}notify(t){Ar.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ar.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ns))))}},Io=new WeakMap,T4=new WeakMap,Dq);function fx(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Ape(e){return{onFetch:(t,n)=>{const r=async()=>{var p,m,x,y,b;const i=t.options,o=(x=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:x.direction,s=((y=t.state.data)==null?void 0:y.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[],c={pages:[],pageParams:[]};let u=!1;const l=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},d=rZ(t.options,t.fetchOptions),f=async(v,w,E)=>{if(u)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const S={queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};l(S);const I=await d(S),{maxPages:A}=t.options,O=E?ppe:hpe;return{pages:O(v.pages,I,A),pageParams:O(v.pageParams,w,A)}};let h;if(o&&s.length){const v=o==="backward",w=v?Spe:UD,E={pages:s,pageParams:a},S=w(i,E);h=await f(E,S,v)}else{h=await f(c,a[0]??i.initialPageParam);const v=e??s.length;for(let w=1;w{var i,o;return(o=(i=t.options).persister)==null?void 0:o.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function UD(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Spe(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var ir,yd,bd,ig,og,vd,sg,ag,jq,kpe=(jq=class{constructor(e={}){J(this,ir);J(this,yd);J(this,bd);J(this,ig);J(this,og);J(this,vd);J(this,sg);J(this,ag);D(this,ir,e.queryCache||new wpe),D(this,yd,e.mutationCache||new Cpe),D(this,bd,e.defaultOptions||{}),D(this,ig,new Map),D(this,og,new Map),D(this,vd,0)}mount(){xo(this,vd)._++,C(this,vd)===1&&(D(this,sg,EN.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ir).onFocus())})),D(this,ag,ow.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ir).onOnline())})))}unmount(){var e,t;xo(this,vd)._--,C(this,vd)===0&&((e=C(this,sg))==null||e.call(this),D(this,sg,void 0),(t=C(this,ag))==null||t.call(this),D(this,ag,void 0))}isFetching(e){return C(this,ir).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,yd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,ir).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=C(this,ir).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(I1(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return C(this,ir).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,ir).get(r.queryHash),o=i==null?void 0:i.state.data,s=dpe(t,o);if(s!==void 0)return C(this,ir).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ar.batch(()=>C(this,ir).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,ir).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,ir);Ar.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,ir),r={type:"active",...e};return Ar.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ar.batch(()=>C(this,ir).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ns).catch(Ns)}invalidateQueries(e={},t={}){return Ar.batch(()=>{if(C(this,ir).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ar.batch(()=>C(this,ir).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ns)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ns)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,ir).build(this,t);return n.isStaleByTime(I1(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ns).catch(Ns)}fetchInfiniteQuery(e){return e.behavior=Ape(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ns).catch(Ns)}resumePausedMutations(){return ow.isOnline()?C(this,yd).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ir)}getMutationCache(){return C(this,yd)}getDefaultOptions(){return C(this,bd)}setDefaultOptions(e){D(this,bd,e)}setQueryDefaults(e,t){C(this,ig).set(Ch(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,ig).values()];let n={};return t.forEach(r=>{Y3(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){C(this,og).set(Ch(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,og).values()];let n={};return t.forEach(r=>{Y3(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,bd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xN(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===nZ&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,bd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,ir).clear(),C(this,yd).clear()}},ir=new WeakMap,yd=new WeakMap,bd=new WeakMap,ig=new WeakMap,og=new WeakMap,vd=new WeakMap,sg=new WeakMap,ag=new WeakMap,jq),Zi,fn,_4,Ri,H0,cg,fc,P4,ug,lg,V0,W0,xd,dg,ln,vb,DT,jT,FT,UT,zT,$T,HT,lZ,Fq,Tpe=(Fq=class extends Qm{constructor(t,n){super();J(this,ln);J(this,Zi);J(this,fn);J(this,_4);J(this,Ri);J(this,H0);J(this,cg);J(this,fc);J(this,P4);J(this,ug);J(this,lg);J(this,V0);J(this,W0);J(this,xd);J(this,dg,new Set);this.options=n,D(this,Zi,t),D(this,fc,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,fn).addObserver(this),zD(C(this,fn),this.options)?de(this,ln,vb).call(this):this.updateResult(),de(this,ln,UT).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return VT(C(this,fn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return VT(C(this,fn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,ln,zT).call(this),de(this,ln,$T).call(this),C(this,fn).removeObserver(this)}setOptions(t,n){const r=this.options,i=C(this,fn);if(this.options=C(this,Zi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");de(this,ln,HT).call(this),C(this,fn).setOptions(this.options),r._defaulted&&!iw(this.options,r)&&C(this,Zi).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,fn),observer:this});const o=this.hasListeners();o&&$D(C(this,fn),i,this.options,r)&&de(this,ln,vb).call(this),this.updateResult(n),o&&(C(this,fn)!==i||this.options.enabled!==r.enabled||I1(this.options.staleTime,C(this,fn))!==I1(r.staleTime,C(this,fn)))&&de(this,ln,DT).call(this);const s=de(this,ln,jT).call(this);o&&(C(this,fn)!==i||this.options.enabled!==r.enabled||s!==C(this,xd))&&de(this,ln,FT).call(this,s)}getOptimisticResult(t){const n=C(this,Zi).getQueryCache().build(C(this,Zi),t),r=this.createResult(n,t);return Ppe(this,r)&&(D(this,Ri,r),D(this,cg,this.options),D(this,H0,C(this,fn).state)),r}getCurrentResult(){return C(this,Ri)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){C(this,dg).add(t)}getCurrentQuery(){return C(this,fn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Zi).defaultQueryOptions(t),r=C(this,Zi).getQueryCache().build(C(this,Zi),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return de(this,ln,vb).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ri)))}createResult(t,n){var I;const r=C(this,fn),i=this.options,o=C(this,Ri),s=C(this,H0),a=C(this,cg),u=t!==r?t.state:C(this,_4),{state:l}=t;let d={...l},f=!1,h;if(n._optimisticResults){const A=this.hasListeners(),O=!A&&zD(t,n),N=A&&$D(t,r,n,i);(O||N)&&(d={...d,...cZ(l.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:x}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===C(this,P4))h=C(this,ug);else try{D(this,P4,n.select),h=n.select(d.data),h=MT(o==null?void 0:o.data,h,n),D(this,ug,h),D(this,fc,null)}catch(A){D(this,fc,A)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&x==="pending"){let A;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=o.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((I=C(this,lg))==null?void 0:I.state.data,C(this,lg)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),D(this,fc,null)}catch(O){D(this,fc,O)}A!==void 0&&(x="success",h=MT(o==null?void 0:o.data,A,n),f=!0)}C(this,fc)&&(p=C(this,fc),h=C(this,ug),m=Date.now(),x="error");const y=d.fetchStatus==="fetching",b=x==="pending",v=x==="error",w=b&&y,E=h!==void 0;return{status:x,fetchStatus:d.fetchStatus,isPending:b,isSuccess:x==="success",isError:v,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:v&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:v&&E,isStale:CN(t,n),refetch:this.refetch}}updateResult(t){const n=C(this,Ri),r=this.createResult(C(this,fn),this.options);if(D(this,H0,C(this,fn).state),D(this,cg,this.options),C(this,H0).data!==void 0&&D(this,lg,C(this,fn)),iw(r,n))return;D(this,Ri,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!C(this,dg).size)return!0;const c=new Set(a??C(this,dg));return this.options.throwOnError&&c.add("error"),Object.keys(C(this,Ri)).some(u=>{const l=u;return C(this,Ri)[l]!==n[l]&&c.has(l)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),de(this,ln,lZ).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,ln,UT).call(this)}},Zi=new WeakMap,fn=new WeakMap,_4=new WeakMap,Ri=new WeakMap,H0=new WeakMap,cg=new WeakMap,fc=new WeakMap,P4=new WeakMap,ug=new WeakMap,lg=new WeakMap,V0=new WeakMap,W0=new WeakMap,xd=new WeakMap,dg=new WeakMap,ln=new WeakSet,vb=function(t){de(this,ln,HT).call(this);let n=C(this,fn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ns)),n},DT=function(){de(this,ln,zT).call(this);const t=I1(this.options.staleTime,C(this,fn));if(Zg||C(this,Ri).isStale||!LT(t))return;const r=tZ(C(this,Ri).dataUpdatedAt,t)+1;D(this,V0,setTimeout(()=>{C(this,Ri).isStale||this.updateResult()},r))},jT=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,fn)):this.options.refetchInterval)??!1},FT=function(t){de(this,ln,$T).call(this),D(this,xd,t),!(Zg||this.options.enabled===!1||!LT(C(this,xd))||C(this,xd)===0)&&D(this,W0,setInterval(()=>{(this.options.refetchIntervalInBackground||EN.isFocused())&&de(this,ln,vb).call(this)},C(this,xd)))},UT=function(){de(this,ln,DT).call(this),de(this,ln,FT).call(this,de(this,ln,jT).call(this))},zT=function(){C(this,V0)&&(clearTimeout(C(this,V0)),D(this,V0,void 0))},$T=function(){C(this,W0)&&(clearInterval(C(this,W0)),D(this,W0,void 0))},HT=function(){const t=C(this,Zi).getQueryCache().build(C(this,Zi),this.options);if(t===C(this,fn))return;const n=C(this,fn);D(this,fn,t),D(this,_4,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lZ=function(t){Ar.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ri))}),C(this,Zi).getQueryCache().notify({query:C(this,fn),type:"observerResultsUpdated"})})},Fq);function _pe(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zD(e,t){return _pe(e,t)||e.state.data!==void 0&&VT(e,t,t.refetchOnMount)}function VT(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&CN(e,t)}return!1}function $D(e,t,n,r){return(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&CN(e,n)}function CN(e,t){return t.enabled!==!1&&e.isStaleByTime(I1(t.staleTime,e))}function Ppe(e,t){return!iw(e.getCurrentResult(),t)}var wd,Ed,Ji,xu,tl,V6,WT,Uq,Ipe=(Uq=class extends Qm{constructor(n,r){super();J(this,tl);J(this,wd);J(this,Ed);J(this,Ji);J(this,xu);D(this,wd,n),this.setOptions(r),this.bindMethods(),de(this,tl,V6).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,wd).defaultMutationOptions(n),iw(this.options,r)||C(this,wd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Ji),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ch(r.mutationKey)!==Ch(this.options.mutationKey)?this.reset():((i=C(this,Ji))==null?void 0:i.state.status)==="pending"&&C(this,Ji).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Ji))==null||n.removeObserver(this)}onMutationUpdate(n){de(this,tl,V6).call(this),de(this,tl,WT).call(this,n)}getCurrentResult(){return C(this,Ed)}reset(){var n;(n=C(this,Ji))==null||n.removeObserver(this),D(this,Ji,void 0),de(this,tl,V6).call(this),de(this,tl,WT).call(this)}mutate(n,r){var i;return D(this,xu,r),(i=C(this,Ji))==null||i.removeObserver(this),D(this,Ji,C(this,wd).getMutationCache().build(C(this,wd),this.options)),C(this,Ji).addObserver(this),C(this,Ji).execute(n)}},wd=new WeakMap,Ed=new WeakMap,Ji=new WeakMap,xu=new WeakMap,tl=new WeakSet,V6=function(){var r;const n=((r=C(this,Ji))==null?void 0:r.state)??uZ();D(this,Ed,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},WT=function(n){Ar.batch(()=>{var r,i,o,s,a,c,u,l;if(C(this,xu)&&this.hasListeners()){const d=C(this,Ed).variables,f=C(this,Ed).context;(n==null?void 0:n.type)==="success"?((i=(r=C(this,xu)).onSuccess)==null||i.call(r,n.data,d,f),(s=(o=C(this,xu)).onSettled)==null||s.call(o,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((c=(a=C(this,xu)).onError)==null||c.call(a,n.error,d,f),(l=(u=C(this,xu)).onSettled)==null||l.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(C(this,Ed))})})},Uq),dZ=j.createContext(void 0),fZ=e=>{const t=j.useContext(dZ);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rpe=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(dZ.Provider,{value:e,children:t})),hZ=j.createContext(!1),Npe=()=>j.useContext(hZ);hZ.Provider;function Ope(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Lpe=j.createContext(Ope()),Bpe=()=>j.useContext(Lpe);function pZ(e,t){return typeof e=="function"?e(...t):!!e}function Mpe(){}var Dpe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},jpe=e=>{j.useEffect(()=>{e.clearReset()},[e])},Fpe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&pZ(n,[e.error,r]),Upe=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},zpe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,$pe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Hpe(e,t,n){const r=fZ(),i=Npe(),o=Bpe(),s=r.defaultQueryOptions(e);s._optimisticResults=i?"isRestoring":"optimistic",Upe(s),Dpe(s,o),jpe(o);const[a]=j.useState(()=>new t(r,s)),c=a.getOptimisticResult(s);if(j.useSyncExternalStore(j.useCallback(u=>{const l=i?()=>{}:a.subscribe(Ar.batchCalls(u));return a.updateResult(),l},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),j.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),zpe(s,c))throw $pe(s,a,o);if(Fpe({result:c,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw c.error;return s.notifyOnChangeProps?c:a.trackResult(c)}function Vpe(e,t){return Hpe(e,Tpe)}function AN(e,t){const n=fZ(),[r]=j.useState(()=>new Ipe(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const i=j.useSyncExternalStore(j.useCallback(s=>r.subscribe(Ar.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=j.useCallback((s,a)=>{r.mutate(s,a).catch(Mpe)},[r]);if(i.error&&pZ(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var GT={},gZ={exports:{}},Zo={},mZ={exports:{}},yZ={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(G,H){var L=G.length;G.push(H);e:for(;0>>1,V=G[q];if(0>>1;qi(ce,L))Xi(ke,ce)?(G[q]=ke,G[X]=L,q=X):(G[q]=ce,G[K]=L,q=K);else if(Xi(ke,L))G[q]=ke,G[X]=L,q=X;else break e}}return H}function i(G,H){var L=G.sortIndex-H.sortIndex;return L!==0?L:G.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],l=1,d=null,f=3,h=!1,p=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(G){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=G)r(u),H.sortIndex=H.expirationTime,t(c,H);else break;H=n(u)}}function w(G){if(m=!1,v(G),!p)if(n(c)!==null)p=!0,$(E);else{var H=n(u);H!==null&&W(w,H.startTime-G)}}function E(G,H){p=!1,m&&(m=!1,y(A),A=-1),h=!0;var L=f;try{for(v(H),d=n(c);d!==null&&(!(d.expirationTime>H)||G&&!R());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var V=q(d.expirationTime<=H);H=e.unstable_now(),typeof V=="function"?d.callback=V:d===n(c)&&r(c),v(H)}else r(c);d=n(c)}if(d!==null)var P=!0;else{var K=n(u);K!==null&&W(w,K.startTime-H),P=!1}return P}finally{d=null,f=L,h=!1}}var S=!1,I=null,A=-1,O=5,N=-1;function R(){return!(e.unstable_now()-NG||125q?(G.sortIndex=L,t(u,G),n(c)===null&&G===n(u)&&(m?(y(A),A=-1):m=!0,W(w,L-q))):(G.sortIndex=V,t(c,G),p||h||(p=!0,$(E))),G},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(G){var H=f;return function(){var L=f;f=H;try{return G.apply(this,arguments)}finally{f=L}}}})(yZ);mZ.exports=yZ;var Wpe=mZ.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gpe=j,Qo=Wpe;function $e(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),KT=Object.prototype.hasOwnProperty,Kpe=/^[: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]*$/,HD={},VD={};function Qpe(e){return KT.call(VD,e)?!0:KT.call(HD,e)?!1:Kpe.test(e)?VD[e]=!0:(HD[e]=!0,!1)}function Ype(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qpe(e,t,n,r){if(t===null||typeof t>"u"||Ype(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Wi(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Zr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zr[e]=new Wi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Zr[t]=new Wi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zr[e]=new Wi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zr[e]=new Wi(e,2,!1,e,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(e){Zr[e]=new Wi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zr[e]=new Wi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zr[e]=new Wi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zr[e]=new Wi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zr[e]=new Wi(e,5,!1,e.toLowerCase(),null,!1,!1)});var SN=/[\-:]([a-z])/g;function kN(e){return e[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(e){var t=e.replace(SN,kN);Zr[t]=new Wi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(SN,kN);Zr[t]=new Wi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(SN,kN);Zr[t]=new Wi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zr[e]=new Wi(e,1,!1,e.toLowerCase(),null,!1,!1)});Zr.xlinkHref=new Wi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zr[e]=new Wi(e,1,!1,e.toLowerCase(),null,!0,!0)});function TN(e,t,n,r){var i=Zr.hasOwnProperty(t)?Zr[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var c=` +`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{hA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xb(e):""}function Zpe(e){switch(e.tag){case 5:return xb(e.type);case 16:return xb("Lazy");case 13:return xb("Suspense");case 19:return xb("SuspenseList");case 0:case 2:case 15:return e=pA(e.type,!1),e;case 11:return e=pA(e.type.render,!1),e;case 1:return e=pA(e.type,!0),e;default:return""}}function ZT(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yp:return"Fragment";case Qp:return"Portal";case QT:return"Profiler";case _N:return"StrictMode";case YT:return"Suspense";case qT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xZ:return(e.displayName||"Context")+".Consumer";case vZ:return(e._context.displayName||"Context")+".Provider";case PN:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case IN:return t=e.displayName||null,t!==null?t:ZT(e.type)||"Memo";case rd:t=e._payload,e=e._init;try{return ZT(e(t))}catch{}}return null}function Jpe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ZT(t);case 8:return t===_N?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function lf(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function EZ(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xpe(e){var t=EZ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function px(e){e._valueTracker||(e._valueTracker=Xpe(e))}function CZ(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=EZ(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function sw(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function JT(e,t){var n=t.checked;return nr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function GD(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lf(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function AZ(e,t){t=t.checked,t!=null&&TN(e,"checked",t,!1)}function XT(e,t){AZ(e,t);var n=lf(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?e_(e,t.type,n):t.hasOwnProperty("defaultValue")&&e_(e,t.type,lf(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function KD(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function e_(e,t,n){(t!=="number"||sw(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wb=Array.isArray;function R1(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=gx.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Z3(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jb={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},e1e=["Webkit","ms","Moz","O"];Object.keys(Jb).forEach(function(e){e1e.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jb[t]=Jb[e]})});function _Z(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jb.hasOwnProperty(e)&&Jb[e]?(""+t).trim():t+"px"}function PZ(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_Z(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var t1e=nr({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 r_(e,t){if(t){if(t1e[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($e(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($e(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($e(61))}if(t.style!=null&&typeof t.style!="object")throw Error($e(62))}}function i_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 o_=null;function RN(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var s_=null,N1=null,O1=null;function qD(e){if(e=Y4(e)){if(typeof s_!="function")throw Error($e(280));var t=e.stateNode;t&&(t=g7(t),s_(e.stateNode,e.type,t))}}function IZ(e){N1?O1?O1.push(e):O1=[e]:N1=e}function RZ(){if(N1){var e=N1,t=O1;if(O1=N1=null,qD(e),t)for(e=0;e>>=0,e===0?32:31-(f1e(e)/h1e|0)|0}var mx=64,yx=4194304;function Eb(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lw(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Eb(a):(o&=s,o!==0&&(r=Eb(o)))}else s=n&~i,s!==0?r=Eb(s):o!==0&&(r=Eb(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function K4(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-La(t),e[t]=n}function y1e(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=e3),oj=" ",sj=!1;function ZZ(e,t){switch(e){case"keyup":return W1e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JZ(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qp=!1;function K1e(e,t){switch(e){case"compositionend":return JZ(t);case"keypress":return t.which!==32?null:(sj=!0,oj);case"textInput":return e=t.data,e===oj&&sj?null:e;default:return null}}function Q1e(e,t){if(qp)return e==="compositionend"||!FN&&ZZ(e,t)?(e=YZ(),G6=MN=Dd=null,qp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lj(n)}}function nJ(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nJ(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rJ(){for(var e=window,t=sw();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sw(e.document)}return t}function UN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rge(e){var t=rJ(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nJ(n.ownerDocument.documentElement,n)){if(r!==null&&UN(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dj(n,o);var s=dj(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Zp=null,f_=null,n3=null,h_=!1;function fj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;h_||Zp==null||Zp!==sw(r)||(r=Zp,"selectionStart"in r&&UN(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),n3&&rv(n3,r)||(n3=r,r=hw(f_,"onSelect"),0e1||(e.current=v_[e1],v_[e1]=null,e1--)}function Tn(e,t){e1++,v_[e1]=e.current,e.current=t}var df={},Ei=bf(df),uo=bf(!1),Ah=df;function Xg(e,t){var n=e.type.contextTypes;if(!n)return df;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function lo(e){return e=e.childContextTypes,e!=null}function gw(){Mn(uo),Mn(Ei)}function vj(e,t,n){if(Ei.current!==df)throw Error($e(168));Tn(Ei,t),Tn(uo,n)}function fJ(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($e(108,Jpe(e)||"Unknown",i));return nr({},n,r)}function mw(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||df,Ah=Ei.current,Tn(Ei,e),Tn(uo,uo.current),!0}function xj(e,t,n){var r=e.stateNode;if(!r)throw Error($e(169));n?(e=fJ(e,t,Ah),r.__reactInternalMemoizedMergedChildContext=e,Mn(uo),Mn(Ei),Tn(Ei,e)):Mn(uo),Tn(uo,n)}var bu=null,m7=!1,_A=!1;function hJ(e){bu===null?bu=[e]:bu.push(e)}function gge(e){m7=!0,hJ(e)}function vf(){if(!_A&&bu!==null){_A=!0;var e=0,t=hn;try{var n=bu;for(hn=1;e>=s,i-=s,ju=1<<32-La(t)+i|n<A?(O=I,I=null):O=I.sibling;var N=f(y,I,v[A],w);if(N===null){I===null&&(I=O);break}e&&I&&N.alternate===null&&t(y,I),b=o(N,b,A),S===null?E=N:S.sibling=N,S=N,I=O}if(A===v.length)return n(y,I),Wn&&a0(y,A),E;if(I===null){for(;AA?(O=I,I=null):O=I.sibling;var R=f(y,I,N.value,w);if(R===null){I===null&&(I=O);break}e&&I&&R.alternate===null&&t(y,I),b=o(R,b,A),S===null?E=R:S.sibling=R,S=R,I=O}if(N.done)return n(y,I),Wn&&a0(y,A),E;if(I===null){for(;!N.done;A++,N=v.next())N=d(y,N.value,w),N!==null&&(b=o(N,b,A),S===null?E=N:S.sibling=N,S=N);return Wn&&a0(y,A),E}for(I=r(y,I);!N.done;A++,N=v.next())N=h(I,y,A,N.value,w),N!==null&&(e&&N.alternate!==null&&I.delete(N.key===null?A:N.key),b=o(N,b,A),S===null?E=N:S.sibling=N,S=N);return e&&I.forEach(function(_){return t(y,_)}),Wn&&a0(y,A),E}function x(y,b,v,w){if(typeof v=="object"&&v!==null&&v.type===Yp&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case hx:e:{for(var E=v.key,S=b;S!==null;){if(S.key===E){if(E=v.type,E===Yp){if(S.tag===7){n(y,S.sibling),b=i(S,v.props.children),b.return=y,y=b;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===rd&&Cj(E)===S.type){n(y,S.sibling),b=i(S,v.props),b.ref=z2(y,S,v),b.return=y,y=b;break e}n(y,S);break}else t(y,S);S=S.sibling}v.type===Yp?(b=fh(v.props.children,y.mode,w,v.key),b.return=y,y=b):(w=e8(v.type,v.key,v.props,null,y.mode,w),w.ref=z2(y,b,v),w.return=y,y=w)}return s(y);case Qp:e:{for(S=v.key;b!==null;){if(b.key===S)if(b.tag===4&&b.stateNode.containerInfo===v.containerInfo&&b.stateNode.implementation===v.implementation){n(y,b.sibling),b=i(b,v.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else t(y,b);b=b.sibling}b=MA(v,y.mode,w),b.return=y,y=b}return s(y);case rd:return S=v._init,x(y,b,S(v._payload),w)}if(wb(v))return p(y,b,v,w);if(M2(v))return m(y,b,v,w);Ax(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,b!==null&&b.tag===6?(n(y,b.sibling),b=i(b,v),b.return=y,y=b):(n(y,b),b=BA(v,y.mode,w),b.return=y,y=b),s(y)):n(y,b)}return x}var tm=yJ(!0),bJ=yJ(!1),vw=bf(null),xw=null,r1=null,VN=null;function WN(){VN=r1=xw=null}function GN(e){var t=vw.current;Mn(vw),e._currentValue=t}function E_(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function B1(e,t){xw=e,VN=r1=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(oo=!0),e.firstContext=null)}function Vs(e){var t=e._currentValue;if(VN!==e)if(e={context:e,memoizedValue:t,next:null},r1===null){if(xw===null)throw Error($e(308));r1=e,xw.dependencies={lanes:0,firstContext:e}}else r1=r1.next=e;return t}var T0=null;function KN(e){T0===null?T0=[e]:T0.push(e)}function vJ(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,KN(t)):(n.next=i.next,i.next=n),t.interleaved=n,il(e,r)}function il(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var id=!1;function QN(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xJ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Vu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qd(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,il(e,n)}return i=r.interleaved,i===null?(t.next=t,KN(r)):(t.next=i.next,i.next=t),r.interleaved=t,il(e,n)}function Q6(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ON(e,n)}}function Aj(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ww(e,t,n,r){var i=e.updateQueue;id=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,s===null?o=u:s.next=u,s=c;var l=e.alternate;l!==null&&(l=l.updateQueue,a=l.lastBaseUpdate,a!==s&&(a===null?l.firstBaseUpdate=u:a.next=u,l.lastBaseUpdate=c))}if(o!==null){var d=i.baseState;s=0,l=u=c=null,a=o;do{var f=a.lane,h=a.eventTime;if((r&f)===f){l!==null&&(l=l.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(f=t,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=nr({},d,f);break e;case 2:id=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},l===null?(u=l=h,c=d):l=l.next=h,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(l===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=l,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Th|=s,e.lanes=s,e.memoizedState=d}}function Sj(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=IA.transition;IA.transition={};try{e(!1),t()}finally{hn=n,IA.transition=r}}function DJ(){return Ws().memoizedState}function vge(e,t,n){var r=qd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jJ(e))FJ(t,n);else if(n=vJ(e,t,n,r),n!==null){var i=Ui();Ba(n,e,r,i),UJ(n,t,r)}}function xge(e,t,n){var r=qd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jJ(e))FJ(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Da(a,s)){var c=t.interleaved;c===null?(i.next=i,KN(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=vJ(e,t,i,r),n!==null&&(i=Ui(),Ba(n,e,r,i),UJ(n,t,r))}}function jJ(e){var t=e.alternate;return e===tr||t!==null&&t===tr}function FJ(e,t){r3=Cw=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function UJ(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ON(e,n)}}var Aw={readContext:Vs,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri,unstable_isNewReconciler:!1},wge={readContext:Vs,useCallback:function(e,t){return ic().memoizedState=[e,t===void 0?null:t],e},useContext:Vs,useEffect:Tj,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,q6(4194308,4,NJ.bind(null,t,e),n)},useLayoutEffect:function(e,t){return q6(4194308,4,e,t)},useInsertionEffect:function(e,t){return q6(4,2,e,t)},useMemo:function(e,t){var n=ic();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ic();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vge.bind(null,tr,e),[r.memoizedState,e]},useRef:function(e){var t=ic();return e={current:e},t.memoizedState=e},useState:kj,useDebugValue:nO,useDeferredValue:function(e){return ic().memoizedState=e},useTransition:function(){var e=kj(!1),t=e[0];return e=bge.bind(null,e[1]),ic().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tr,i=ic();if(Wn){if(n===void 0)throw Error($e(407));n=n()}else{if(n=t(),Br===null)throw Error($e(349));kh&30||AJ(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Tj(kJ.bind(null,r,o,e),[e]),r.flags|=2048,dv(9,SJ.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ic(),t=Br.identifierPrefix;if(Wn){var n=Fu,r=ju;n=(r&~(1<<32-La(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=uv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Cc]=t,e[sv]=r,qJ(e,t,!1,!1),t.stateNode=e;e:{switch(s=i_(n,r),n){case"dialog":On("cancel",e),On("close",e),i=r;break;case"iframe":case"object":case"embed":On("load",e),i=r;break;case"video":case"audio":for(i=0;iim&&(t.flags|=128,r=!0,$2(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ew(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),$2(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Wn)return ii(t),null}else 2*lr()-o.renderingStartTime>im&&n!==1073741824&&(t.flags|=128,r=!0,$2(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=lr(),t.sibling=null,n=qn.current,Tn(qn,r?n&1|2:n&1),t):(ii(t),null);case 22:case 23:return cO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Lo&1073741824&&(ii(t),t.subtreeFlags&6&&(t.flags|=8192)):ii(t),null;case 24:return null;case 25:return null}throw Error($e(156,t.tag))}function Pge(e,t){switch($N(t),t.tag){case 1:return lo(t.type)&&gw(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nm(),Mn(uo),Mn(Ei),ZN(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qN(t),null;case 13:if(Mn(qn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($e(340));em()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mn(qn),null;case 4:return nm(),null;case 10:return GN(t.type._context),null;case 22:case 23:return cO(),null;case 24:return null;default:return null}}var kx=!1,pi=!1,Ige=typeof WeakSet=="function"?WeakSet:Set,et=null;function i1(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){or(e,t,r)}else n.current=null}function R_(e,t,n){try{n()}catch(r){or(e,t,r)}}var jj=!1;function Rge(e,t){if(p_=dw,e=rJ(),UN(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,l=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(c=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++l===r&&(c=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(g_={focusedElem:e,selectionRange:n},dw=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){t=et;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,x=p.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:pa(t.type,m),x);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($e(163))}}catch(w){or(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}return p=jj,jj=!1,p}function i3(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&R_(t,n,o)}i=i.next}while(i!==r)}}function v7(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function N_(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XJ(e){var t=e.alternate;t!==null&&(e.alternate=null,XJ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cc],delete t[sv],delete t[b_],delete t[hge],delete t[pge])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function eX(e){return e.tag===5||e.tag===3||e.tag===4}function Fj(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eX(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function O_(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pw));else if(r!==4&&(e=e.child,e!==null))for(O_(e,t,n),e=e.sibling;e!==null;)O_(e,t,n),e=e.sibling}function L_(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(L_(e,t,n),e=e.sibling;e!==null;)L_(e,t,n),e=e.sibling}var Hr=null,wa=!1;function Rl(e,t,n){for(n=n.child;n!==null;)tX(e,t,n),n=n.sibling}function tX(e,t,n){if(Lc&&typeof Lc.onCommitFiberUnmount=="function")try{Lc.onCommitFiberUnmount(d7,n)}catch{}switch(n.tag){case 5:pi||i1(n,t);case 6:var r=Hr,i=wa;Hr=null,Rl(e,t,n),Hr=r,wa=i,Hr!==null&&(wa?(e=Hr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Hr.removeChild(n.stateNode));break;case 18:Hr!==null&&(wa?(e=Hr,n=n.stateNode,e.nodeType===8?TA(e.parentNode,n):e.nodeType===1&&TA(e,n),tv(e)):TA(Hr,n.stateNode));break;case 4:r=Hr,i=wa,Hr=n.stateNode.containerInfo,wa=!0,Rl(e,t,n),Hr=r,wa=i;break;case 0:case 11:case 14:case 15:if(!pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&R_(n,t,s),i=i.next}while(i!==r)}Rl(e,t,n);break;case 1:if(!pi&&(i1(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){or(n,t,a)}Rl(e,t,n);break;case 21:Rl(e,t,n);break;case 22:n.mode&1?(pi=(r=pi)||n.memoizedState!==null,Rl(e,t,n),pi=r):Rl(e,t,n);break;default:Rl(e,t,n)}}function Uj(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ige),t.forEach(function(r){var i=Uge.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function na(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=lr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Oge(r/1960))-r,10e?16:e,jd===null)var r=!1;else{if(e=jd,jd=null,Tw=0,Wt&6)throw Error($e(331));var i=Wt;for(Wt|=4,et=e.current;et!==null;){var o=et,s=o.child;if(et.flags&16){var a=o.deletions;if(a!==null){for(var c=0;clr()-sO?dh(e,0):oO|=n),fo(e,t)}function uX(e,t){t===0&&(e.mode&1?(t=yx,yx<<=1,!(yx&130023424)&&(yx=4194304)):t=1);var n=Ui();e=il(e,t),e!==null&&(K4(e,t,n),fo(e,n))}function Fge(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uX(e,n)}function Uge(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($e(314))}r!==null&&r.delete(t),uX(e,n)}var lX;lX=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||uo.current)oo=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return oo=!1,Tge(e,t,n);oo=!!(e.flags&131072)}else oo=!1,Wn&&t.flags&1048576&&pJ(t,bw,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Z6(e,t),e=t.pendingProps;var i=Xg(t,Ei.current);B1(t,n),i=XN(null,t,r,e,i,n);var o=eO();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lo(r)?(o=!0,mw(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,QN(t),i.updater=b7,t.stateNode=i,i._reactInternals=t,A_(t,r,e,n),t=T_(null,t,r,!0,o,n)):(t.tag=0,Wn&&o&&zN(t),Li(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Z6(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=$ge(r),e=pa(r,e),i){case 0:t=k_(null,t,r,e,n);break e;case 1:t=Bj(null,t,r,e,n);break e;case 11:t=Oj(null,t,r,e,n);break e;case 14:t=Lj(null,t,r,pa(r.type,e),n);break e}throw Error($e(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pa(r,i),k_(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pa(r,i),Bj(e,t,r,i,n);case 3:e:{if(KJ(t),e===null)throw Error($e(387));r=t.pendingProps,o=t.memoizedState,i=o.element,xJ(e,t),ww(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=rm(Error($e(423)),t),t=Mj(e,t,r,n,i);break e}else if(r!==i){i=rm(Error($e(424)),t),t=Mj(e,t,r,n,i);break e}else for(Fo=Kd(t.stateNode.containerInfo.firstChild),$o=t,Wn=!0,Aa=null,n=bJ(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(em(),r===i){t=ol(e,t,n);break e}Li(e,t,r,n)}t=t.child}return t;case 5:return wJ(t),e===null&&w_(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,m_(r,i)?s=null:o!==null&&m_(r,o)&&(t.flags|=32),GJ(e,t),Li(e,t,s,n),t.child;case 6:return e===null&&w_(t),null;case 13:return QJ(e,t,n);case 4:return YN(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tm(t,null,r,n):Li(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pa(r,i),Oj(e,t,r,i,n);case 7:return Li(e,t,t.pendingProps,n),t.child;case 8:return Li(e,t,t.pendingProps.children,n),t.child;case 12:return Li(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Tn(vw,r._currentValue),r._currentValue=s,o!==null)if(Da(o.value,s)){if(o.children===i.children&&!uo.current){t=ol(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Vu(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var l=u.pending;l===null?c.next=c:(c.next=l.next,l.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),E_(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error($e(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),E_(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Li(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,B1(t,n),i=Vs(i),r=r(i),t.flags|=1,Li(e,t,r,n),t.child;case 14:return r=t.type,i=pa(r,t.pendingProps),i=pa(r.type,i),Lj(e,t,r,i,n);case 15:return VJ(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pa(r,i),Z6(e,t),t.tag=1,lo(r)?(e=!0,mw(t)):e=!1,B1(t,n),zJ(t,r,i),A_(t,r,i,n),T_(null,t,r,!0,e,n);case 19:return YJ(e,t,n);case 22:return WJ(e,t,n)}throw Error($e(156,t.tag))};function dX(e,t){return jZ(e,t)}function zge(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function js(e,t,n,r){return new zge(e,t,n,r)}function lO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $ge(e){if(typeof e=="function")return lO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===PN)return 11;if(e===IN)return 14}return 2}function Zd(e,t){var n=e.alternate;return n===null?(n=js(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function e8(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")lO(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yp:return fh(n.children,i,o,t);case _N:s=8,i|=8;break;case QT:return e=js(12,n,t,i|2),e.elementType=QT,e.lanes=o,e;case YT:return e=js(13,n,t,i),e.elementType=YT,e.lanes=o,e;case qT:return e=js(19,n,t,i),e.elementType=qT,e.lanes=o,e;case wZ:return w7(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vZ:s=10;break e;case xZ:s=9;break e;case PN:s=11;break e;case IN:s=14;break e;case rd:s=16,r=null;break e}throw Error($e(130,e==null?e:typeof e,""))}return t=js(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function fh(e,t,n,r){return e=js(7,e,r,t),e.lanes=n,e}function w7(e,t,n,r){return e=js(22,e,r,t),e.elementType=wZ,e.lanes=n,e.stateNode={isHidden:!1},e}function BA(e,t,n){return e=js(6,e,null,t),e.lanes=n,e}function MA(e,t,n){return t=js(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hge(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mA(0),this.expirationTimes=mA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mA(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function dO(e,t,n,r,i,o,s,a,c){return e=new Hge(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=js(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},QN(o),e}function Vge(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gX)}catch(e){console.error(e)}}gX(),gZ.exports=Zo;var Zm=gZ.exports;const Yge=wl(Zm),qge=$q({__proto__:null,default:Yge},[Zm]);var Qj=Zm;GT.createRoot=Qj.createRoot,GT.hydrateRoot=Qj.hydrateRoot;const mX="2.21.9";let Px={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:mX},We=class F_ extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof F_?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),i=n.cause instanceof F_&&n.cause.docsPath||n.docsPath,o=(a=Px.getDocsUrl)==null?void 0:a.call(Px,{...n,docsPath:i}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],`Version: ${Px.version}`].join(` +`);super(s,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=mX}walk(t){return yX(this,t)}};function yX(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?yX(e.cause,t):t?null:e}let Zge=class extends We{constructor({max:t,min:n,signed:r,size:i,value:o}){super(`Number "${o}" is not in safe ${i?`${i*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}};class Jge extends We{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}let Xge=class extends We{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}},bX=class extends We{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},vX=class extends We{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Yj extends We{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function Jm(e,{dir:t,size:n=32}={}){return typeof e=="string"?Jd(e,{dir:t,size:n}):eme(e,{dir:t,size:n})}function Jd(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new vX({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function eme(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new vX({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;i=qc.zero&&e<=qc.nine)return e-qc.zero;if(e>=qc.A&&e<=qc.F)return e-(qc.A-10);if(e>=qc.a&&e<=qc.f)return e-(qc.a-10)}function sl(e,t={}){let n=e;t.size&&($a(n,{size:t.size}),n=Jm(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;st)throw new Xge({givenSize:Or(e),maxSize:t})}function g0(e,t={}){const{signed:n}=t;t.size&&$a(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function kt(e,t={}){return typeof e=="number"||typeof e=="bigint"?sn(e,t):typeof e=="string"?gO(e,t):typeof e=="boolean"?xX(e,t):Mr(e,t)}function xX(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?($a(n,{size:t.size}),Jm(n,{size:t.size})):n}function Mr(e,t={}){let n="";for(let i=0;io||iame(n,{includeName:t})).join(t?", ":","):""}function ame(e,{includeName:t}){return e.type.startsWith("tuple")?`(${mO(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class cme extends We{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Zj extends We{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class ume extends We{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${mO(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class T7 extends We{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}let lme=class extends We{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(` +`),{name:"AbiEncodingArrayLengthMismatchError"})}},dme=class extends We{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Or(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},fme=class extends We{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(` +`),{name:"AbiEncodingLengthMismatchError"})}};class wX extends We{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class Iw extends We{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class hme extends We{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class pme extends We{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${om(t.abiItem)}\`, and`,`\`${n.type}\` in \`${om(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let gme=class extends We{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:n,name:"InvalidAbiEncodingType"})}};class mme extends We{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:n,name:"InvalidAbiDecodingType"})}}let yme=class extends We{constructor(t){super([`Value "${t}" is not a valid array.`].join(` +`),{name:"InvalidArrayError"})}};class bme extends We{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`),{name:"InvalidDefinitionTypeError"})}}function Ph(e){return typeof e[0]=="string"?xf(e):vme(e)}function vme(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function xf(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}let Gs=class extends We{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},yO=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};function Jj(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function xme(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function bO(e,...t){if(!xme(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Rw(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function EX(e,t){bO(e);const n=t.outputLen;if(e.length>Xj&Ix)}:{h:Number(e>>Xj&Ix)|0,l:Number(e&Ix)|0}}function Eme(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;ie<>>32-n,Ame=(e,t,n)=>t<>>32-n,Sme=(e,t,n)=>t<>>64-n,kme=(e,t,n)=>e<>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tme=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),DA=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ya=(e,t)=>e<<32-t|e>>>t,eF=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,_me=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function tF(e){for(let t=0;te().update(vO(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const SX=[],kX=[],TX=[],Ime=BigInt(0),V2=BigInt(1),Rme=BigInt(2),Nme=BigInt(7),Ome=BigInt(256),Lme=BigInt(113);for(let e=0,t=V2,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],SX.push(2*(5*r+n)),kX.push((e+1)*(e+2)/2%64);let i=Ime;for(let o=0;o<7;o++)t=(t<>Nme)*Lme)%Ome,t&Rme&&(i^=V2<<(V2<n>32?Sme(e,t,n):Cme(e,t,n),rF=(e,t,n)=>n>32?kme(e,t,n):Ame(e,t,n);function Dme(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const a=(s+8)%10,c=(s+2)%10,u=n[c],l=n[c+1],d=nF(u,l,1)^n[a],f=rF(u,l,1)^n[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){const a=kX[s],c=nF(i,o,a),u=rF(i,o,a),l=SX[s];i=e[l],o=e[l+1],e[l]=c,e[l+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Bme[r],e[1]^=Mme[r]}n.fill(0)}let jme=class _X extends CX{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Jj(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Tme(this.state)}keccak(){eF||tF(this.state32),Dme(this.state32,this.rounds),eF||tF(this.state32),this.posOut=0,this.pos=0}update(t){Rw(this);const{blockLen:n,state:r}=this;t=vO(t);const i=t.length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Jj(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(EX(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new _X(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};const Fme=(e,t,n)=>AX(()=>new jme(t,e,n)),Ume=Fme(1,136,256/8);function sm(e,t){const n=t||"hex",r=Ume(Xh(e,{strict:!1})?k7(e):e);return n==="bytes"?r:kt(r)}const jA=new yO(8192);function xO(e,t){if(jA.has(`${e}.${t}`))return jA.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=sm(hh(n),"bytes"),i=n.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(r[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());const o=`0x${i.join("")}`;return jA.set(`${e}.${t}`,o),o}function Uo(e,t){if(!Hi(e,{strict:!1}))throw new Gs({address:e});return xO(e,t)}const zme=/^0x[a-fA-F0-9]{40}$/,FA=new yO(8192);function Hi(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(FA.has(r))return FA.get(r);const i=zme.test(e)?e.toLowerCase()===e?!0:n?xO(e)===e:!0:!1;return FA.set(r,i),i}function pv(e,t,n,{strict:r}={}){return Xh(e,{strict:!1})?$me(e,t,n,{strict:r}):RX(e,t,n,{strict:r})}function PX(e,t){if(typeof t=="number"&&t>0&&t>Or(e)-1)throw new bX({offset:t,position:"start",size:Or(e)})}function IX(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Or(e)!==n-t)throw new bX({offset:n,position:"end",size:Or(e)})}function RX(e,t,n,{strict:r}={}){PX(e,t);const i=e.slice(t,n);return r&&IX(i,t,n),i}function $me(e,t,n,{strict:r}={}){PX(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&IX(i,t,n),i}function NX(e,t){if(e.length!==t.length)throw new fme({expectedLength:e.length,givenLength:t.length});const n=Hme({params:e,values:t}),r=EO(n);return r.length===0?"0x":r}function Hme({params:e,values:t}){const n=[];for(let r=0;r0?Ph([a,s]):a}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:Ph(o.map(({encoded:s})=>s))}}function Gme(e,{param:t}){const[,n]=t.type.split("bytes"),r=Or(e);if(!n){let i=e;return r%32!==0&&(i=Jd(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Ph([Jd(sn(r,{size:32})),i])}}if(r!==Number.parseInt(n))throw new dme({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:Jd(e,{dir:"right"})}}function Kme(e){if(typeof e!="boolean")throw new We(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Jd(xX(e))}}function Qme(e,{signed:t}){return{dynamic:!1,encoded:sn(e,{size:32,signed:t})}}function Yme(e){const t=gO(e),n=Math.ceil(Or(t)/32),r=[];for(let i=0;ii))}}function CO(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const UA="/docs/contract/encodeDeployData";function OX(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new cme({docsPath:UA});if(!("inputs"in i))throw new Zj({docsPath:UA});if(!i.inputs||i.inputs.length===0)throw new Zj({docsPath:UA});const o=NX(i.inputs,n);return xf([r,o])}function _7(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const Zme="modulepreload",Jme=function(e){return"/"+e},iF={},P7=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=Jme(a),a in iF)return;iF[a]=!0;const c=a.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const l=document.createElement("link");if(l.rel=c?"stylesheet":Zme,c||(l.as="script",l.crossOrigin=""),l.href=a,s&&l.setAttribute("nonce",s),document.head.appendChild(l),c)return new Promise((d,f)=>{l.addEventListener("load",d),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};let oF=class extends We{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Xme=class extends We{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},e2e=class extends We{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const t2e={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e2e({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Xme({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new oF({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new oF({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function AO(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(t2e);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Ih(e,t="hex"){const n=LX(e),r=AO(new Uint8Array(n.length));return n.encode(r),t==="hex"?Mr(r.bytes):r.bytes}function LX(e){return Array.isArray(e)?n2e(e.map(t=>LX(t))):r2e(e)}function n2e(e){const t=e.reduce((i,o)=>i+o.length,0),n=BX(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function r2e(e){const t=typeof e=="string"?sl(e):e,n=BX(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function BX(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new We("Length is too large.")}class U_ extends We{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class MX extends We{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let I7=class extends We{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};const i2e={gwei:9,wei:18},o2e={ether:-9,wei:9},s2e={ether:-18,gwei:-9};function R7(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function ph(e,t="wei"){return R7(e,o2e[t])}class s1 extends We{constructor({cause:t,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(s1,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(s1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});let Rh=class extends We{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${ph(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(Rh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class z_ extends We{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${ph(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(z_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class $_ extends We{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty($_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class H_ extends We{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(H_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class V_ extends We{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(V_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class W_ extends We{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(W_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class G_ extends We{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(G_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class K_ extends We{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(K_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Q_ extends We{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Q_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});let gv=class extends We{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${ph(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${ph(r)} gwei`:""}).`].join(` +`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(gv,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class DX extends We{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function a2e(e,t="wei"){return R7(e,i2e[t])}function SO(e){const t=Object.entries(e).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=t.reduce((r,[i])=>Math.max(r,i.length),0);return t.map(([r,i])=>` ${`${r}:`.padEnd(n+1)} ${i}`).join(` +`)}class c2e extends We{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`),{name:"FeeConflictError"})}}let u2e=class extends We{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}},l2e=class extends We{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",SO(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}},d2e=class extends We{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}};const Xd=(e,t,n)=>JSON.stringify(e,(r,i)=>typeof i=="bigint"?i.toString():i,n),f2e=e=>e,kO=e=>e;class a3 extends We{constructor({body:t,cause:n,details:r,headers:i,status:o,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[o&&`Status: ${o}`,`URL: ${kO(s)}`,t&&`Request body: ${Xd(t)}`].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=t,this.headers=i,this.status=o,this.url=s}}class jX extends We{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${kO(r)}`,`Request body: ${Xd(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code}}class sF extends We{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${kO(n)}`,`Request body: ${Xd(t)}`],name:"TimeoutError"})}}const h2e=-1;class yo extends We{constructor(t,{code:n,docsPath:r,metaMessages:i,name:o,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:i||(t==null?void 0:t.metaMessages),name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||t.name,this.code=t instanceof jX?t.code:n??h2e}}class Xm extends yo{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class mv extends yo{constructor(t){super(t,{code:mv.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(mv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class yv extends yo{constructor(t){super(t,{code:yv.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(yv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class bv extends yo{constructor(t,{method:n}={}){super(t,{code:bv.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(bv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class vv extends yo{constructor(t){super(t,{code:vv.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)})}}Object.defineProperty(vv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Nh extends yo{constructor(t){super(t,{code:Nh.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Nh,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class xv extends yo{constructor(t){super(t,{code:xv.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)})}}Object.defineProperty(xv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class wv extends yo{constructor(t){super(t,{code:wv.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(wv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class ef extends yo{constructor(t){super(t,{code:ef.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ev extends yo{constructor(t){super(t,{code:Ev.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ev,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Cv extends yo{constructor(t,{method:n}={}){super(t,{code:Cv.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(Cv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class am extends yo{constructor(t){super(t,{code:am.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(am,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Av extends yo{constructor(t){super(t,{code:Av.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Av,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Vn extends Xm{constructor(t){super(t,{code:Vn.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Vn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sv extends Xm{constructor(t){super(t,{code:Sv.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class kv extends Xm{constructor(t,{method:n}={}){super(t,{code:kv.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(kv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Tv extends Xm{constructor(t){super(t,{code:Tv.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Tv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class _v extends Xm{constructor(t){super(t,{code:_v.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(_v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Ks extends Xm{constructor(t){super(t,{code:Ks.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Ks,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class p2e extends yo{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function g2e(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof We?e.walk(i=>i.code===s1.code):e;return r instanceof We?new s1({cause:e,message:r.details}):s1.nodeMessage.test(n)?new s1({cause:e,message:e.details}):Rh.nodeMessage.test(n)?new Rh({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):z_.nodeMessage.test(n)?new z_({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$_.nodeMessage.test(n)?new $_({cause:e,nonce:t==null?void 0:t.nonce}):H_.nodeMessage.test(n)?new H_({cause:e,nonce:t==null?void 0:t.nonce}):V_.nodeMessage.test(n)?new V_({cause:e,nonce:t==null?void 0:t.nonce}):W_.nodeMessage.test(n)?new W_({cause:e}):G_.nodeMessage.test(n)?new G_({cause:e,gas:t==null?void 0:t.gas}):K_.nodeMessage.test(n)?new K_({cause:e,gas:t==null?void 0:t.gas}):Q_.nodeMessage.test(n)?new Q_({cause:e}):gv.nodeMessage.test(n)?new gv({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new DX({cause:e})}function m2e(e,{format:t}){if(!t)return{};const n={};function r(o){const s=Object.keys(o);for(const a of s)a in e&&(n[a]=e[a]),o[a]&&typeof o[a]=="object"&&!Array.isArray(o[a])&&r(o[a])}const i=t(e||{});return r(i),n}function TO(e,t){return({exclude:n,format:r})=>({exclude:n,format:i=>{const o=t(i);if(n)for(const s of n)delete o[s];return{...o,...r(i)}},type:e})}const y2e={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function b2e(e){const t={};return typeof e.authorizationList<"u"&&(t.authorizationList=v2e(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>Mr(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=sn(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=sn(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=sn(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=sn(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=sn(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=sn(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=y2e[e.type]),typeof e.value<"u"&&(t.value=sn(e.value)),t}function v2e(e){return e.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:sn(t.chainId),nonce:sn(t.nonce),...typeof t.yParity<"u"?{yParity:sn(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:sn(t.v)}:{}}))}function e2(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const i=e[n];return typeof i=="function"?i:o=>t(e,o)}const N7=2n**256n-1n;function x2e(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:o}=e,s=t?_7(t):void 0;if(s&&!Hi(s.address))throw new Gs({address:s.address});if(o&&!Hi(o))throw new Gs({address:o});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new c2e;if(r&&r>N7)throw new Rh({maxFeePerGas:r});if(i&&r&&i>r)throw new gv({maxFeePerGas:r,maxPriorityFeePerGas:i})}const FX={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function _O(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?hv(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?hv(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?FX[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=E2e(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}const w2e=TO("transaction",_O);function E2e(e){return e.map(t=>({contractAddress:t.address,r:t.r,s:t.s,chainId:Number(t.chainId),nonce:Number(t.nonce),...typeof t.yParity<"u"?{yParity:Number(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Number(t.v)}:{}}))}function C2e(e){var n;const t=(n=e.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:_O(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const A2e=TO("block",C2e);class S2e extends We{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class k2e extends We{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function aF(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r} +`,"")}function T2e(e){return e.reduce((t,{address:n,...r})=>{let i=`${t} ${n}: +`;return r.nonce&&(i+=` nonce: ${r.nonce} +`),r.balance&&(i+=` balance: ${r.balance} +`),r.code&&(i+=` code: ${r.code} +`),r.state&&(i+=` state: +`,i+=aF(r.state)),r.stateDiff&&(i+=` stateDiff: +`,i+=aF(r.stateDiff)),i},` State Override: +`).slice(0,-1)}function cF(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Yj({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Yj({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function _2e(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:o}=e,s={};if(o!==void 0&&(s.code=o),t!==void 0&&(s.balance=sn(t)),n!==void 0&&(s.nonce=sn(n)),r!==void 0&&(s.state=cF(r)),i!==void 0){if(s.state)throw new k2e;s.stateDiff=cF(i)}return s}function P2e(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!Hi(n,{strict:!1}))throw new Gs({address:n});if(t[n])throw new S2e({address:n});t[n]=_2e(r)}return t}async function I2e(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n?sn(n):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||r]});return BigInt(o)}function UX(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>sl(o)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?i:i.map(o=>Mr(o))}function zX(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>sl(s)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(s=>sl(s)):e.commitments,o=[];for(let s=0;sMr(s))}function R2e(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}const N2e=(e,t,n)=>e&t^~e&n,O2e=(e,t,n)=>e&t^e&n^t&n;let L2e=class extends CX{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=DA(this.buffer)}update(t){Rw(this);const{view:n,buffer:r,blockLen:i}=this;t=vO(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let d=s;dl.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d>>3,m=Ya(h,17)^Ya(h,19)^h>>>10;Ol[d]=m+Ol[d-7]+p+Ol[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const f=Ya(a,6)^Ya(a,11)^Ya(a,25),h=l+f+N2e(a,c,u)+B2e[d]+Ol[d]|0,m=(Ya(r,2)^Ya(r,13)^Ya(r,22))+O2e(r,i,o)|0;l=u,u=c,c=a,a=s+h|0,s=o,o=i,i=r,r=h+m|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(r,i,o,s,a,c,u,l)}roundClean(){Ol.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const D2e=AX(()=>new M2e);function j2e(e,t){return D2e(Xh(e,{strict:!1})?k7(e):e)}function F2e(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=j2e(t);return i.set([n],0),r==="bytes"?i:Mr(i)}function U2e(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const o of t)i.push(F2e({commitment:o,to:r,version:n}));return i}const uF=6,$X=32,PO=4096,HX=$X*PO,lF=HX*uF-1-1*PO*uF,VX=1;let z2e=class extends We{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}},WX=class extends We{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}},$2e=class extends We{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}},H2e=class extends We{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${VX}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}};function V2e(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?sl(e.data):e.data,r=Or(n);if(!r)throw new WX;if(r>lF)throw new z2e({maxSize:lF,size:r});const i=[];let o=!0,s=0;for(;o;){const a=AO(new Uint8Array(HX));let c=0;for(;ca.bytes):i.map(a=>Mr(a.bytes))}function W2e(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??V2e({data:t,to:r}),o=e.commitments??UX({blobs:i,kzg:n,to:r}),s=e.proofs??zX({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let c=0;c1||n[0]>1)throw new Jge(n);return!!n[0]}function Wu(e,t={}){typeof t.size<"u"&&$a(e,{size:t.size});const n=Mr(e,t);return hv(n,t)}function q2e(e,t={}){let n=e;return typeof t.size<"u"&&($a(n,{size:t.size}),n=$c(n,{dir:"right"})),new TextDecoder().decode(n)}function QX(e,t){const n=typeof t=="string"?sl(t):t,r=AO(n);if(Or(n)===0&&e.length>0)throw new T7;if(Or(t)&&Or(t)<32)throw new ume({data:typeof t=="string"?t:Mr(t),params:e,size:Or(t)});let i=0;const o=[];for(let s=0;s48?Q2e(i,{signed:n}):Wu(i,{signed:n}),32]}function nye(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:s})=>!s),i=r?[]:{};let o=0;if(Pv(t)){const s=Wu(e.readBytes(q_)),a=n+s;for(let c=0;csm(k7(e));function oye(e){return iye(e)}const sye="1.0.5";let Ys=class Z_ extends Error{constructor(t,n={}){var s;const r=n.cause instanceof Z_?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,i=n.cause instanceof Z_&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${sye}`].join(` +`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}};function wf(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const YX=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,qX=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,ZX=/^\(.+?\).*?$/,pF=/^tuple(?(\[(\d*)\])*)$/;function J_(e){let t=e.type;if(pF.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function cye(e){return JX.test(e)}function uye(e){return wf(JX,e)}const XX=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function lye(e){return XX.test(e)}function dye(e){return wf(XX,e)}const eee=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function fye(e){return eee.test(e)}function hye(e){return wf(eee,e)}const tee=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function nee(e){return tee.test(e)}function pye(e){return wf(tee,e)}const ree=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function gye(e){return ree.test(e)}function mye(e){return wf(ree,e)}const yye=/^fallback\(\) external(?:\s(?payable{1}))?$/;function bye(e){return yye.test(e)}const vye=/^receive\(\) external payable$/;function xye(e){return vye.test(e)}const wye=new Set(["indexed"]),X_=new Set(["calldata","memory","storage"]);class Eye extends Ys{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Cye extends Ys{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class Aye extends Ys{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class Sye extends Ys{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class kye extends Ys{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class Tye extends Ys{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class _ye extends Ys{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Ab extends Ys{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Pye extends Ys{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Iye extends Ys{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class Rye extends Ys{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class Nye extends Ys{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function Oye(e,t){return t?`${t}:${e}`:e}const zA=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Lye(e,t={}){if(fye(e)){const n=hye(e);if(!n)throw new Ab({signature:e,type:"function"});const r=Pa(n.parameters),i=[],o=r.length;for(let a=0;a[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Mye=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Dye=/^u?int$/;function m0(e,t){var d,f;const n=Oye(e,t==null?void 0:t.type);if(zA.has(n))return zA.get(n);const r=ZX.test(e),i=wf(r?Mye:Bye,e);if(!i)throw new Aye({param:e});if(i.name&&Fye(i.name))throw new Sye({param:e,name:i.name});const o=i.name?{name:i.name}:{},s=i.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let c,u={};if(r){c="tuple";const h=Pa(i.type),p=[],m=h.length;for(let x=0;x[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function oee(e,t,n=new Set){const r=[],i=e.length;for(let o=0;o{const t=typeof e=="string"?e:aye(e);return Hye(t)};function aee(e){return oye(Vye(e))}const Wye=aee,IO=e=>pv(aee(e),0,4);function RO(e){const{abi:t,args:n=[],name:r}=e,i=Xh(r,{strict:!1}),o=t.filter(a=>i?a.type==="function"?IO(a)===r:a.type==="event"?Wye(a)===r:!1:"name"in a&&a.name===r);if(o.length===0)return;if(o.length===1)return o[0];let s;for(const a of o){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((u,l)=>{const d="inputs"in a&&a.inputs[l];return d?eP(u,d):!1})){if(s&&"inputs"in s&&s.inputs){const u=cee(a.inputs,s.inputs,n);if(u)throw new pme({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a}}return s||o[0]}function eP(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Hi(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((i,o)=>eP(Object.values(e)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(i=>eP(i,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function cee(e,t,n){for(const r in e){const i=e[r],o=t[r];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return cee(i.components,o.components,n[r]);const s=[i.type,o.type];if(s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")?Hi(n[r],{strict:!1}):s.includes("address")&&s.includes("bytes")?Hi(n[r],{strict:!1}):!1)return s}}const $A="/docs/contract/decodeFunctionResult";function Z4(e){const{abi:t,args:n,functionName:r,data:i}=e;let o=t[0];if(r){const a=RO({abi:t,args:n,name:r});if(!a)throw new Iw(r,{docsPath:$A});o=a}if(o.type!=="function")throw new Iw(void 0,{docsPath:$A});if(!o.outputs)throw new hme(o.name,{docsPath:$A});const s=QX(o.outputs,i);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const gF="/docs/contract/encodeFunctionData";function Gye(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const o=RO({abi:t,args:n,name:r});if(!o)throw new Iw(r,{docsPath:gF});i=o}if(i.type!=="function")throw new Iw(void 0,{docsPath:gF});return{abi:[i],functionName:IO(om(i))}}function t2(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:Gye(e)})(),i=n[0],o=r,s="inputs"in i&&i.inputs?NX(i.inputs,t??[]):void 0;return xf([o,s??"0x"])}function J4({blockNumber:e,chain:t,contract:n}){var i;const r=(i=t==null?void 0:t.contracts)==null?void 0:i[n];if(!r)throw new U_({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new U_({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}const uee={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Kye={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Qye={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Yye(e){const{abi:t,data:n}=e,r=pv(n,0,4);if(r==="0x")throw new T7;const o=[...t||[],Kye,Qye].find(s=>s.type==="error"&&r===IO(om(s)));if(!o)throw new wX(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:o,args:"inputs"in o&&o.inputs&&o.inputs.length>0?QX(o.inputs,pv(n,4)):void 0,errorName:o.name}}function lee({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((i,o)=>`${r&&i.name?`${i.name}: `:""}${typeof t[o]=="object"?Xd(t[o]):t[o]}`).join(", ")})`}class qye extends We{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,to:d,value:f,stateOverride:h}){var x;const p=n?_7(n):void 0;let m=SO({from:p==null?void 0:p.address,to:d,value:typeof f<"u"&&`${a2e(f)} ${((x=i==null?void 0:i.nativeCurrency)==null?void 0:x.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${ph(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ph(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ph(u)} gwei`,nonce:l});h&&(m+=` +${T2e(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",m].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class NO extends We{constructor(t,{abi:n,args:r,contractAddress:i,docsPath:o,functionName:s,sender:a}){const c=RO({abi:n,args:r,name:s}),u=c?lee({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,l=c?om(c,{includeName:!0}):void 0,d=SO({address:i&&f2e(i),function:l,args:u&&u!=="()"&&`${[...Array((s==null?void 0:s.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=i,this.functionName=s,this.sender=a}}class tP extends We{constructor({abi:t,data:n,functionName:r,message:i}){let o,s,a,c;if(n&&n!=="0x")try{s=Yye({abi:t,data:n});const{abiItem:l,errorName:d,args:f}=s;if(d==="Error")c=f[0];else if(d==="Panic"){const[h]=f;c=uee[h]}else{const h=l?om(l,{includeName:!0}):void 0,p=l&&f?lee({abiItem:l,args:f,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",p&&p!=="()"?` ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(l){o=l}else i&&(c=i);let u;o instanceof wX&&(u=o.signature,a=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(c&&c!=="execution reverted"||u?[`The contract function "${r}" reverted with the following ${u?"signature":"reason"}:`,c||u].join(` +`):`The contract function "${r}" reverted.`,{cause:o,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=c,this.signature=u}}class Zye extends We{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class Jye extends We{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class OO extends We{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}function LO(e,t){var r,i,o,s,a,c;if(!(e instanceof We))return!1;const n=e.walk(u=>u instanceof tP);return n instanceof tP?!!(((r=n.data)==null?void 0:r.errorName)==="ResolverNotFound"||((i=n.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((o=n.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=n.data)==null?void 0:s.errorName)==="ResolverError"||((a=n.data)==null?void 0:a.errorName)==="HttpError"||(c=n.reason)!=null&&c.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&n.reason===uee[50]):!1}function dee(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Xh(t)?t:null}function t8(e){let t=new Uint8Array(32).fill(0);if(!e)return Mr(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const i=dee(n[r]),o=i?k7(i):sm(hh(n[r]),"bytes");t=sm(Ph([t,o]),"bytes")}return Mr(t)}function Xye(e){return`[${e.slice(2)}]`}function ebe(e){const t=new Uint8Array(32).fill(0);return e?dee(e)||sm(hh(e)):Mr(t)}function BO(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(hh(t).byteLength+2);let r=0;const i=t.split(".");for(let o=0;o255&&(s=hh(Xye(ebe(i[o])))),n[r]=s.length,n.set(s,r+1),r+=s.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}const tbe=3;function nP(e,{abi:t,address:n,args:r,docsPath:i,functionName:o,sender:s}){const{code:a,data:c,message:u,shortMessage:l}=e instanceof OO?e:e instanceof We?e.walk(f=>"data"in f)||e.walk():{},d=e instanceof T7?new Zye({functionName:o}):[tbe,Nh.code].includes(a)&&(c||u||l)?new tP({abi:t,data:typeof c=="object"?c.data:c,functionName:o,message:l??u}):e;return new NO(d,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:s})}const nbe="0x82ad56cb",rbe="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",ibe="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";function obe(e,{docsPath:t,...n}){const r=(()=>{const i=g2e(e,n);return i instanceof DX?e:i})();return new qye(r,{docsPath:t,...n})}const HA=new Map;function fee({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const o=async()=>{const l=c();s();const d=l.map(({args:f})=>f);d.length!==0&&e(d).then(f=>{var h;i&&Array.isArray(f)&&f.sort(i);for(let p=0;p{var h;for(let p=0;pHA.delete(t),a=()=>c().map(({args:l})=>l),c=()=>HA.get(t)||[],u=l=>HA.set(t,[...c(),l]);return{flush:s,async schedule(l){const d={},f=new Promise((m,x)=>{d.resolve=m,d.reject=x});return(n==null?void 0:n([...a(),l]))&&o(),c().length>0?(u({args:l,pendingPromise:d}),f):(u({args:l,pendingPromise:d}),setTimeout(o,r),f)}}}async function sbe(e,t){var R,_,M,z;const{account:n=e.account,batch:r=!!((R=e.batch)!=null&&R.multicall),blockNumber:i,blockTag:o="latest",accessList:s,blobs:a,code:c,data:u,factory:l,factoryData:d,gas:f,gasPrice:h,maxFeePerBlobGas:p,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:y,to:b,value:v,stateOverride:w,...E}=t,S=n?_7(n):void 0;if(c&&(l||d))throw new We("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&b)throw new We("Cannot provide both `code` & `to` as parameters.");const I=c&&u,A=l&&d&&b&&u,O=I||A,N=I?ube({code:c,data:u}):A?lbe({data:u,factory:l,factoryData:d,to:b}):u;try{x2e(t);const $=(i?sn(i):void 0)||o,W=P2e(w),G=(z=(M=(_=e.chain)==null?void 0:_.formatters)==null?void 0:M.transactionRequest)==null?void 0:z.format,L=(G||b2e)({...m2e(E,{format:G}),from:S==null?void 0:S.address,accessList:s,blobs:a,data:N,gas:f,gasPrice:h,maxFeePerBlobGas:p,maxFeePerGas:m,maxPriorityFeePerGas:x,nonce:y,to:O?void 0:b,value:v});if(r&&abe({request:L})&&!W)try{return await cbe(e,{...L,blockNumber:i,blockTag:o})}catch(V){if(!(V instanceof MX)&&!(V instanceof U_))throw V}const q=await e.request({method:"eth_call",params:W?[L,$,W]:[L,$]});return q==="0x"?{data:void 0}:{data:q}}catch(F){const $=dbe(F),{offchainLookup:W,offchainLookupSignature:G}=await P7(async()=>{const{offchainLookup:H,offchainLookupSignature:L}=await import("./ccip-Ckq3nNGb.js");return{offchainLookup:H,offchainLookupSignature:L}},[]);if(e.ccipRead!==!1&&($==null?void 0:$.slice(0,10))===G&&b)return{data:await W(e,{data:$,to:b})};throw O&&($==null?void 0:$.slice(0,10))==="0x101bb98d"?new Jye({factory:l}):obe(F,{...t,account:S,chain:e.chain})}}function abe({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(nbe)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function cbe(e,t){var m;const{batchSize:n=1024,wait:r=0}=typeof((m=e.batch)==null?void 0:m.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:a,to:c}=t;let u=a;if(!u){if(!e.chain)throw new MX;u=J4({blockNumber:i,chain:e.chain,contract:"multicall3"})}const d=(i?sn(i):void 0)||o,{schedule:f}=fee({id:`${e.uid}.${d}`,wait:r,shouldSplitBatch(x){return x.reduce((b,{data:v})=>b+(v.length-2),0)>n*2},fn:async x=>{const y=x.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),b=t2({abi:Y_,args:[y],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{data:b,to:u},d]});return Z4({abi:Y_,args:[y],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:h,success:p}]=await f({data:s,to:c});if(!p)throw new OO({data:h});return h==="0x"?{data:void 0}:{data:h}}function ube(e){const{code:t,data:n}=e;return OX({abi:see(["constructor(bytes, bytes)"]),bytecode:rbe,args:[t,n]})}function lbe(e){const{data:t,factory:n,factoryData:r,to:i}=e;return OX({abi:see(["constructor(address, bytes, address, bytes)"]),bytecode:ibe,args:[i,t,n,r]})}function dbe(e){var n;if(!(e instanceof We))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function Oh(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=t2({abi:n,args:i,functionName:o});try{const{data:c}=await e2(e,sbe,"call")({...s,data:a,to:r});return Z4({abi:n,args:i,functionName:o,data:c||"0x"})}catch(c){throw nP(c,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function fbe(e,{blockNumber:t,blockTag:n,coinType:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let c=a;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=J4({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u=t2({abi:fF,functionName:"addr",...r!=null?{args:[t8(i),BigInt(r)]}:{args:[t8(i)]}}),l={address:c,abi:KX,functionName:"resolve",args:[kt(BO(i)),u],blockNumber:t,blockTag:n},d=e2(e,Oh,"readContract"),f=o?await d({...l,args:[...l.args,o]}):await d(l);if(f[0]==="0x")return null;const h=Z4({abi:fF,args:r!=null?[t8(i),BigInt(r)]:void 0,functionName:"addr",data:f[0]});return h==="0x"||$c(h)==="0x00"?null:h}catch(u){if(s)throw u;if(LO(u,"resolve"))return null;throw u}}class hbe extends We{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class G2 extends We{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class MO extends We{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class pbe extends We{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const gbe=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,mbe=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,ybe=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,bbe=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function vbe(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function mF(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function hee({uri:e,gatewayUrls:t}){const n=ybe.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=mF(t==null?void 0:t.ipfs,"https://ipfs.io"),i=mF(t==null?void 0:t.arweave,"https://arweave.net"),o=e.match(gbe),{protocol:s,subpath:a,target:c,subtarget:u=""}=(o==null?void 0:o.groups)||{},l=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||mbe.test(e);if(e.startsWith("http")&&!l&&!d){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((l||d)&&c)return{uri:`${r}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&c)return{uri:`${i}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(bbe,"");if(f.startsWith("i.json());return await DO({gatewayUrls:e,uri:pee(n)})}catch{throw new MO({uri:t})}}async function DO({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=hee({uri:t,gatewayUrls:e});if(r||await vbe(n))return n;throw new MO({uri:t})}function wbe(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=t.split("/"),[o,s]=n.split(":"),[a,c]=r.split(":");if(!o||o.toLowerCase()!=="eip155")throw new G2({reason:"Only EIP-155 supported"});if(!s)throw new G2({reason:"Chain ID not found"});if(!c)throw new G2({reason:"Contract address not found"});if(!i)throw new G2({reason:"Token ID not found"});if(!a)throw new G2({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function Ebe(e,{nft:t}){if(t.namespace==="erc721")return Oh(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Oh(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new pbe({namespace:t.namespace})}async function Cbe(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?Abe(e,{gatewayUrls:t,record:n}):DO({uri:n,gatewayUrls:t})}async function Abe(e,{gatewayUrls:t,record:n}){const r=wbe(n),i=await Ebe(e,{nft:r}),{uri:o,isOnChain:s,isEncoded:a}=hee({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const u=a?atob(o.replace("data:application/json;base64,","")):o,l=JSON.parse(u);return DO({uri:pee(l),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),xbe({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,c)})}async function Sbe(e,{blockNumber:t,blockTag:n,name:r,key:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let c=a;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=J4({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u={address:c,abi:KX,functionName:"resolve",args:[kt(BO(r)),t2({abi:dF,functionName:"text",args:[t8(r),i]})],blockNumber:t,blockTag:n},l=e2(e,Oh,"readContract"),d=o?await l({...u,args:[...u.args,o]}):await l(u);if(d[0]==="0x")return null;const f=Z4({abi:dF,functionName:"text",data:d[0]});return f===""?null:f}catch(u){if(s)throw u;if(LO(u,"resolve"))return null;throw u}}async function kbe(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){const c=await e2(e,Sbe,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:o,strict:s});if(!c)return null;try{return await Cbe(e,{record:c,gatewayUrls:r})}catch{return null}}async function Tbe(e,{address:t,blockNumber:n,blockTag:r,gatewayUrls:i,strict:o,universalResolverAddress:s}){let a=s;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=J4({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const u={address:a,abi:K2e,functionName:"reverse",args:[kt(BO(c))],blockNumber:n,blockTag:r},l=e2(e,Oh,"readContract"),[d,f]=i?await l({...u,args:[...u.args,i]}):await l(u);return t.toLowerCase()!==f.toLowerCase()?null:d}catch(u){if(o)throw u;if(LO(u,"reverse"))return null;throw u}}function _be(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const Pbe={"0x0":"reverted","0x1":"success"};function Ibe(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>_be(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?hv(e.transactionIndex):null,status:e.status?Pbe[e.status]:null,type:e.type?FX[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const Rbe=TO("transactionReceipt",Ibe);async function Nbe(e,t){var x;const{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:o,multicallAddress:s,stateOverride:a}=t,c=t.contracts,u=r??(typeof((x=e.batch)==null?void 0:x.multicall)=="object"&&e.batch.multicall.batchSize||1024);let l=s;if(!l){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");l=J4({blockNumber:i,chain:e.chain,contract:"multicall3"})}const d=[[]];let f=0,h=0;for(let y=0;y0&&h>u&&d[f].length>0&&(f++,h=(S.length-2)/2,d[f]=[]),d[f]=[...d[f],{allowFailure:!0,callData:S,target:v}]}catch(S){const I=nP(S,{abi:b,address:v,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!n)throw I;d[f]=[...d[f],{allowFailure:!0,callData:"0x",target:v}]}}const p=await Promise.allSettled(d.map(y=>e2(e,Oh,"readContract")({abi:Y_,address:l,args:[y],blockNumber:i,blockTag:o,functionName:"aggregate3",stateOverride:a}))),m=[];for(let y=0;ysetTimeout(t,e))}const Rx=new yO(8192);function Lbe(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Rx.get(n))return Rx.get(n);const r=e().finally(()=>Rx.delete(n));return Rx.set(n,r),r}function gee(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:a=0}={})=>{const c=async({error:u})=>{const l=typeof t=="function"?t({count:a,error:u}):t;l&&await Obe(l),s({count:a+1})};try{const u=await e();i(u)}catch(u){if(a{const{dedupe:i=!1,retryDelay:o=150,retryCount:s=3,uid:a}={...t,...r},c=i?sm(gO(`${a}.${Xd(n)}`)):void 0;return Lbe(()=>gee(async()=>{try{return await e(n)}catch(u){const l=u;switch(l.code){case mv.code:throw new mv(l);case yv.code:throw new yv(l);case bv.code:throw new bv(l,{method:n.method});case vv.code:throw new vv(l);case Nh.code:throw new Nh(l);case xv.code:throw new xv(l);case wv.code:throw new wv(l);case ef.code:throw new ef(l);case Ev.code:throw new Ev(l);case Cv.code:throw new Cv(l,{method:n.method});case am.code:throw new am(l);case Av.code:throw new Av(l);case Vn.code:throw new Vn(l);case Sv.code:throw new Sv(l);case kv.code:throw new kv(l);case Tv.code:throw new Tv(l);case _v.code:throw new _v(l);case Ks.code:throw new Ks(l);case 5e3:throw new Vn(l);default:throw u instanceof We?u:new p2e(l)}}},{delay:({count:u,error:l})=>{var d;if(l&&l instanceof a3){const f=(d=l==null?void 0:l.headers)==null?void 0:d.get("Retry-After");if(f!=null&&f.match(/\d/))return Number.parseInt(f)*1e3}return~~(1<Mbe(u)}),{enabled:i,id:c})}}function Mbe(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===am.code||e.code===Nh.code:e instanceof a3&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function mee(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function yee(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,o)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout(()=>{r?a.abort():o(t)},n)),i(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&o(t),o(a)}finally{clearTimeout(s)}})()})}function Dbe(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const yF=Dbe();function jbe(e,t={}){return{async request(n){var d;const{body:r,onRequest:i=t.onRequest,onResponse:o=t.onResponse,timeout:s=t.timeout??1e4}=n,a={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:c,method:u,signal:l}=a;try{const f=await yee(async({signal:p})=>{const m={...a,body:Array.isArray(r)?Xd(r.map(b=>({jsonrpc:"2.0",id:b.id??yF.take(),...b}))):Xd({jsonrpc:"2.0",id:r.id??yF.take(),...r}),headers:{"Content-Type":"application/json",...c},method:u||"POST",signal:l||(s>0?p:null)},x=new Request(e,m);return i&&await i(x),await fetch(e,m)},{errorInstance:new sF({body:r,url:e}),timeout:s,signal:!0});o&&await o(f);let h;if((d=f.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?h=await f.json():(h=await f.text(),h=JSON.parse(h||"{}")),!f.ok)throw new a3({body:r,details:Xd(h.error)||f.statusText,headers:f.headers,status:f.status,url:e});return h}catch(f){throw f instanceof a3||f instanceof sF?f:new a3({body:r,cause:f,url:e})}}}}function Fbe(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:r,chainId:i}=n;if(!Hi(r))throw new Gs({address:r});if(i<=0)throw new I7({chainId:i})}jO(e)}function Ube(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new WX;for(const n of t){const r=Or(n),i=hv(pv(n,0,1));if(r!==32)throw new $2e({hash:n,size:r});if(i!==VX)throw new H2e({hash:n,version:i})}}jO(e)}function jO(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new I7({chainId:t});if(i&&!Hi(i))throw new Gs({address:i});if(r&&r>N7)throw new Rh({maxFeePerGas:r});if(n&&r&&n>r)throw new gv({maxFeePerGas:r,maxPriorityFeePerGas:n})}function zbe(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new I7({chainId:t});if(o&&!Hi(o))throw new Gs({address:o});if(n||i)throw new We("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>N7)throw new Rh({maxFeePerGas:r})}function $be(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!Hi(o))throw new Gs({address:o});if(typeof t<"u"&&t<=0)throw new I7({chainId:t});if(n||i)throw new We("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>N7)throw new Rh({maxFeePerGas:r})}function Hbe(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:r,chainId:i,nonce:o,...s}=n;t.push([kt(i),r,o?kt(o):"0x",...X4({},s)])}return t}function O7(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n"u"||typeof h>"u")){const v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(S=>Mr(S)),w=e.kzg,E=UX({blobs:v,kzg:w});if(typeof f>"u"&&(f=U2e({commitments:E})),typeof h>"u"){const S=zX({blobs:v,commitments:E,kzg:w});h=W2e({blobs:v,commitments:E,proofs:S})}}const p=O7(l),m=[kt(n),i?kt(i):"0x",u?kt(u):"0x",c?kt(c):"0x",r?kt(r):"0x",o??"0x",s?kt(s):"0x",d??"0x",p,a?kt(a):"0x",f??[],...X4(e,t)],x=[],y=[],b=[];if(h)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new u2e({v:t.v});return h})(),d=$c(t.r),f=$c(t.s);u=[...u,kt(l),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else n>0&&(u=[...u,kt(n),"0x","0x"]);return Ih(u)}function X4(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const o=$c(n.r),s=$c(n.s);return[typeof i=="number"?i?kt(1):"0x":r===0n?"0x":r===1n?kt(1):r===27n?"0x":kt(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}function n2(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const i=e[n];return typeof i=="function"?i:o=>t(e,o)}const n8="2.13.4",qbe=()=>`@wagmi/core@${n8}`;var bee=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Nw,vee;let e5=class rP extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return qbe()}constructor(t,n={}){var o;super(),Nw.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof rP?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof rP&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` +`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return bee(this,Nw,"m",vee).call(this,this,t)}};Nw=new WeakSet,vee=function e(t,n){return n!=null&&n(t)?t:t.cause?bee(this,Nw,"m",e).call(this,t.cause,n):t};class Lh extends e5{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class Zbe extends e5{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}async function Jbe(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new Zbe;try{e.setState(s=>({...s,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const i=await n.connect({chainId:t.chainId}),o=i.accounts;return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(s=>({...s,connections:new Map(s.connections).set(n.uid,{accounts:o,chainId:i.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:o,chainId:i.chainId}}catch(i){throw e.setState(o=>({...o,status:o.current?"connected":"disconnected"})),i}}const iP=256;let Nx=iP,Ox;function xee(e=11){if(!Ox||Nx+e>iP*2){Ox="",Nx=0;for(let t=0;t{const b=y(x);for(const w in p)delete b[w];const v={...x,...b};return Object.assign(v,{extend:m(v)})}}return Object.assign(p,{extend:m(p)})}function e3e({key:e,name:t,request:n,retryCount:r=3,retryDelay:i=150,timeout:o,type:s},a){const c=xee();return{config:{key:e,name:t,request:n,retryCount:r,retryDelay:i,timeout:o,type:s},request:Bbe(n,{retryCount:r,retryDelay:i,uid:c}),value:a}}class t3e extends We{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 wee(e,t={}){const{batch:n,fetchOptions:r,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:a,retryDelay:c}=t;return({chain:u,retryCount:l,timeout:d})=>{const{batchSize:f=1e3,wait:h=0}=typeof n=="object"?n:{},p=t.retryCount??l,m=d??t.timeout??1e4,x=e||(u==null?void 0:u.rpcUrls.default.http[0]);if(!x)throw new t3e;const y=jbe(x,{fetchOptions:r,onRequest:s,onResponse:a,timeout:m});return e3e({key:i,name:o,async request({method:b,params:v}){const w={method:b,params:v},{schedule:E}=fee({id:x,wait:h,shouldSplitBatch(O){return O.length>f},fn:O=>y.request({body:O}),sort:(O,N)=>O.id-N.id}),S=async O=>n?E(O):[await y.request({body:O})],[{error:I,result:A}]=await S(w);if(I)throw new jX({body:w,error:I,url:x});return A},retryCount:p,retryDelay:c,timeout:m,type:"http"},{fetchOptions:r,url:x})}}async function n3e(e,t={}){var i,o;let n;if(t.connector)n=t.connector;else{const{connections:s,current:a}=e.state,c=s.get(a);n=c==null?void 0:c.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(s=>{if(r.size===0)return{...s,connections:new Map,current:null,status:"disconnected"};const a=r.values().next().value;return{...s,connections:new Map(r),current:a.connector.uid}});{const s=e.state.current;if(!s)return;const a=(i=e.state.connections.get(s))==null?void 0:i.connector;if(!a)return;await((o=e.storage)==null?void 0:o.setItem("recentConnectorId",a.id))}}function Eee(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(s2e[e])}function Cee(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,i=r==null?void 0:r[0],o=e.chains.find(a=>a.id===(n==null?void 0:n.chainId)),s=e.state.status;switch(s){case"connected":return{address:i,addresses:r,chain:o,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:s};case"reconnecting":return{address:i,addresses:r,chain:o,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:s};case"connecting":return{address:i,addresses:r,chain:o,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:s};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:s}}}async function r3e(e,t){const{allowFailure:n=!0,chainId:r,contracts:i,...o}=t,s=e.getClient({chainId:r});return n2(s,Nbe,"multicall")({allowFailure:n,contracts:i,...o})}function Aee(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return n2(i,Oh,"readContract")(r)}async function i3e(e,t){var a;const{allowFailure:n=!0,blockNumber:r,blockTag:i,...o}=t,s=t.contracts;try{const c={};for(const[f,h]of s.entries()){const p=h.chainId??e.state.chainId;c[p]||(c[p]=[]),(a=c[p])==null||a.push({contract:h,index:f})}const u=()=>Object.entries(c).map(([f,h])=>r3e(e,{...o,allowFailure:n,blockNumber:r,blockTag:i,chainId:Number.parseInt(f),contracts:h.map(({contract:p})=>p)})),l=(await Promise.all(u())).flat(),d=Object.values(c).flatMap(f=>f.map(({index:h})=>h));return l.reduce((f,h,p)=>(f&&(f[d[p]]=h),f),[])}catch(c){if(c instanceof NO)throw c;const u=()=>s.map(l=>Aee(e,{...l,blockNumber:r,blockTag:i}));return n?(await Promise.allSettled(u())).map(l=>l.status==="fulfilled"?{result:l.value,status:"success"}:{error:l.reason,result:void 0,status:"failure"}):await Promise.all(u())}}async function o3e(e,t){const{address:n,blockNumber:r,blockTag:i,chainId:o,token:s,unit:a="ether"}=t;if(s)try{return bF(e,{balanceAddress:n,chainId:o,symbolType:"string",tokenAddress:s})}catch(f){if(f instanceof NO){const h=await bF(e,{balanceAddress:n,chainId:o,symbolType:"bytes32",tokenAddress:s}),p=ime($c(h.symbol,{dir:"right"}));return{...h,symbol:p}}throw f}const c=e.getClient({chainId:o}),l=await n2(c,I2e,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:i}),d=e.chains.find(f=>f.id===o)??c.chain;return{decimals:d.nativeCurrency.decimals,formatted:R7(l,Eee(a)),symbol:d.nativeCurrency.symbol,value:l}}async function bF(e,t){const{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:o,unit:s}=t,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:o},[c,u,l]=await i3e(e,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),d=R7(c??"0",Eee(s??u));return{decimals:u,formatted:d,symbol:l,value:c}}function vF(e){return e.state.chainId}function al(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!al(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(o&&!al(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}let VA=[];function xF(e){const t=e.chains;return al(VA,t)?VA:(VA=t,t)}let Lx=[];function oP(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||al(Lx,t)?Lx:(Lx=t,t)}let WA=[];function wF(e){const t=e.connectors;return al(WA,t)?WA:(WA=t,t)}function s3e(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return n2(i,fbe,"getEnsAddress")(r)}function a3e(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return n2(i,kbe,"getEnsAvatar")(r)}function c3e(e,t){const{chainId:n,...r}=t,i=e.getClient({chainId:n});return n2(i,Tbe,"getEnsName")(r)}let GA=!1;async function u3e(e,t={}){var u,l;if(GA)return[];GA=!0,e.setState(d=>({...d,status:d.current?"reconnecting":"connecting"}));const n=[];if((u=t.connectors)!=null&&u.length)for(const d of t.connectors){let f;typeof d=="function"?f=e._internal.connectors.setup(d):f=d,n.push(f)}else n.push(...e.connectors);let r;try{r=await((l=e.storage)==null?void 0:l.getItem("recentConnectorId"))}catch{}const i={};for(const[,d]of e.state.connections)i[d.connector.id]=1;r&&(i[r]=0);const o=Object.keys(i).length>0?[...n].sort((d,f)=>(i[d.id]??10)-(i[f.id]??10)):n;let s=!1;const a=[],c=[];for(const d of o){const f=await d.getProvider().catch(()=>{});if(!f||c.some(m=>m===f)||!await d.isAuthorized())continue;const p=await d.connect({isReconnecting:!0}).catch(()=>null);p&&(d.emitter.off("connect",e._internal.events.connect),d.emitter.on("change",e._internal.events.change),d.emitter.on("disconnect",e._internal.events.disconnect),e.setState(m=>{const x=new Map(s?m.connections:new Map).set(d.uid,{accounts:p.accounts,chainId:p.chainId,connector:d});return{...m,current:s?m.current:d.uid,connections:x}}),a.push({accounts:p.accounts,chainId:p.chainId,connector:d}),c.push(f),s=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(s?e.setState(d=>({...d,status:"connected"})):e.setState(d=>({...d,connections:new Map,current:null,status:"disconnected"}))),GA=!1,a}class od extends e5{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class l3e extends e5{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function d3e(e,t){var s;const{addEthereumChainParameter:n,chainId:r}=t,i=e.state.connections.get(((s=t.connector)==null?void 0:s.uid)??e.state.current);if(i){const a=i.connector;if(!a.switchChain)throw new l3e({connector:a});return await a.switchChain({addEthereumChainParameter:n,chainId:r})}const o=e.chains.find(a=>a.id===r);if(!o)throw new Lh;return e.setState(a=>({...a,chainId:r})),o}function See(e,t){const{onChange:n}=t;return e.subscribe(()=>Cee(e),n,{equalityFn(r,i){const{connector:o,...s}=r,{connector:a,...c}=i;return al(s,c)&&(o==null?void 0:o.id)===(a==null?void 0:a.id)&&(o==null?void 0:o.uid)===(a==null?void 0:a.uid)}})}function f3e(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function h3e(e,t){const{onChange:n}=t;return e.subscribe(()=>oP(e),n,{equalityFn:al})}function p3e(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,i)=>{n(Object.values(r),i)})}const g3e=/(rabby|trustwallet)/,m3e={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:r8(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return r8(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:r8(e,"isPhantom")}}};t5.type="injected";function t5(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const c=e.target;if(typeof c=="function"){const u=c();if(u)return u}return typeof c=="object"?c:typeof c=="string"?{...m3e[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(u){return u==null?void 0:u.ethereum}}}let i,o,s,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return g3e.test(this.id.toLowerCase())},type:t5.type,async setup(){const u=await this.getProvider();u&&e.target&&(s||(s=this.onConnect.bind(this),u.on("connect",s)),i||(i=this.onAccountsChanged.bind(this),u.on("accountsChanged",i)))},async connect({chainId:u,isReconnecting:l}={}){var h,p,m,x,y,b;const d=await this.getProvider();if(!d)throw new od;let f=[];if(l)f=await this.getAccounts().catch(()=>[]);else if(t)try{f=(x=(m=(p=(h=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:h.caveats)==null?void 0:p[0])==null?void 0:m.value)==null?void 0:x.map(w=>Uo(w)),f.length>0&&(f=await this.getAccounts())}catch(v){const w=v;if(w.code===Vn.code)throw new Vn(w);if(w.code===ef.code)throw w}try{!(f!=null&&f.length)&&!l&&(f=(await d.request({method:"eth_requestAccounts"})).map(E=>Uo(E))),s&&(d.removeListener("connect",s),s=void 0),i||(i=this.onAccountsChanged.bind(this),d.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let v=await this.getChainId();if(u&&v!==u){const w=await this.switchChain({chainId:u}).catch(E=>{if(E.code===Vn.code)throw E;return{id:v}});v=(w==null?void 0:w.id)??v}return t&&await((y=c.storage)==null?void 0:y.removeItem(`${this.id}.disconnected`)),e.target||await((b=c.storage)==null?void 0:b.setItem("injected.connected",!0)),{accounts:f,chainId:v}}catch(v){const w=v;throw w.code===Vn.code?new Vn(w):w.code===ef.code?new ef(w):w}},async disconnect(){var l,d;const u=await this.getProvider();if(!u)throw new od;o&&(u.removeListener("chainChanged",o),o=void 0),a&&(u.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),u.on("connect",s));try{await yee(()=>u.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((l=c.storage)==null?void 0:l.setItem(`${this.id}.disconnected`,!0)),e.target||await((d=c.storage)==null?void 0:d.removeItem("injected.connected"))},async getAccounts(){const u=await this.getProvider();if(!u)throw new od;return(await u.request({method:"eth_accounts"})).map(d=>Uo(d))},async getChainId(){const u=await this.getProvider();if(!u)throw new od;const l=await u.request({method:"eth_chainId"});return Number(l)},async getProvider(){if(typeof window>"u")return;let u;const l=r();return typeof l.provider=="function"?u=l.provider(window):typeof l.provider=="string"?u=r8(window,l.provider):u=l.provider,u&&!u.removeListener&&("off"in u&&typeof u.off=="function"?u.removeListener=u.off:u.removeListener=()=>{}),u},async isAuthorized(){var u,l;try{if(t&&await((u=c.storage)==null?void 0:u.getItem(`${this.id}.disconnected`))||!e.target&&!await((l=c.storage)==null?void 0:l.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const p=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",p),!!await this.getProvider()),m=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(y=>window.addEventListener("ethereum#initialized",()=>y(p()),{once:!0}))]:[],new Promise(y=>setTimeout(()=>y(p()),m))]))return!0}throw new od}return!!(await gee(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:l}){var h,p,m,x;const d=await this.getProvider();if(!d)throw new od;const f=c.chains.find(y=>y.id===l);if(!f)throw new Ks(new Lh);try{return await Promise.all([d.request({method:"wallet_switchEthereumChain",params:[{chainId:sn(l)}]}).then(async()=>{await this.getChainId()===l&&c.emitter.emit("change",{chainId:l})}),new Promise(y=>c.emitter.once("change",({chainId:b})=>{b===l&&y()}))]),f}catch(y){const b=y;if(b.code===4902||((p=(h=b==null?void 0:b.data)==null?void 0:h.originalError)==null?void 0:p.code)===4902)try{const{default:v,...w}=f.blockExplorers??{};let E;u!=null&&u.blockExplorerUrls?E=u.blockExplorerUrls:v&&(E=[v.url,...Object.values(w).map(O=>O.url)]);let S;(m=u==null?void 0:u.rpcUrls)!=null&&m.length?S=u.rpcUrls:S=[((x=f.rpcUrls.default)==null?void 0:x.http[0])??""];const I={blockExplorerUrls:E,chainId:sn(l),chainName:(u==null?void 0:u.chainName)??f.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??f.nativeCurrency,rpcUrls:S};if(await d.request({method:"wallet_addEthereumChain",params:[I]}),await this.getChainId()!==l)throw new Vn(new Error("User rejected switch after adding network."));return f}catch(v){throw new Vn(v)}throw b.code===Vn.code?new Vn(b):new Ks(b)}},async onAccountsChanged(u){var l;if(u.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const d=(await this.getChainId()).toString();this.onConnect({chainId:d}),t&&await((l=c.storage)==null?void 0:l.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:u.map(d=>Uo(d))})},onChainChanged(u){const l=Number(u);c.emitter.emit("change",{chainId:l})},async onConnect(u){const l=await this.getAccounts();if(l.length===0)return;const d=Number(u.chainId);c.emitter.emit("connect",{accounts:l,chainId:d});const f=await this.getProvider();f&&(s&&(f.removeListener("connect",s),s=void 0),i||(i=this.onAccountsChanged.bind(this),f.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),f.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),f.on("disconnect",a)))},async onDisconnect(u){const l=await this.getProvider();u&&u.code===1013&&l&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),l&&(o&&(l.removeListener("chainChanged",o),o=void 0),a&&(l.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),l.on("connect",s))))}})}function r8(e,t){function n(i){return typeof t=="function"?t(i):typeof t=="string"?i[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(i=>n(i));if(r&&n(r))return r}function y3e(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function b3e(){const e=new Set;let t=[];const n=()=>y3e(i=>{t.some(({info:o})=>o.uuid===i.info.uuid)||(t=[...t,i],e.forEach(o=>o(t,{added:[i]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(i=>i([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:i}){return t.find(o=>o.info.rdns===i)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(i,{emitImmediately:o}={}){return e.add(i),o&&i(t,{added:t}),()=>e.delete(i)}}}const v3e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_RPC_NODE_URL:"https://eth-sepolia.g.alchemy.com/v2/pDSMvqEHCLgbBdL7oUaDer8HxBx24hDu",VITE_WALLET_CONNECT_PROJECT_ID:"933e43f98ac5ea20f4a52778ffa16051"},x3e=e=>(t,n,r)=>{const i=r.subscribe;return r.subscribe=(s,a,c)=>{let u=s;if(a){const l=(c==null?void 0:c.equalityFn)||Object.is;let d=s(r.getState());u=f=>{const h=s(f);if(!l(d,h)){const p=d;a(d=h,p)}},c!=null&&c.fireImmediately&&a(d,d)}return i(u)},e(t,n,r)},w3e=x3e;function E3e(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const s=c=>c===null?null:JSON.parse(c,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Iv=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Iv(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Iv(r)(n)}}}},C3e=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,y)=>({...y,...x}),...t},s=!1;const a=new Set,c=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...x)},r,i);const l=Iv(o.serialize),d=()=>{const x=o.partialize({...r()});let y;const b=l({state:x,version:o.version}).then(v=>u.setItem(o.name,v)).catch(v=>{y=v});if(y)throw y;return b},f=i.setState;i.setState=(x,y)=>{f(x,y),d()};const h=e((...x)=>{n(...x),d()},r,i);let p;const m=()=>{var x;if(!u)return;s=!1,a.forEach(b=>b(r()));const y=((x=o.onRehydrateStorage)==null?void 0:x.call(o,r()))||void 0;return Iv(u.getItem.bind(u))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var v;return p=o.merge(b,(v=r())!=null?v:h),n(p,!0),d()}).then(()=>{y==null||y(p,void 0),s=!0,c.forEach(b=>b(p))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:x=>{o={...o,...x},x.getStorage&&(u=x.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(c.add(x),()=>{c.delete(x)})},m(),p||h},A3e=(e,t)=>(n,r,i)=>{let o={storage:E3e(()=>localStorage),partialize:m=>m,version:0,merge:(m,x)=>({...x,...m}),...t},s=!1;const a=new Set,c=new Set;let u=o.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...m)},r,i);const l=()=>{const m=o.partialize({...r()});return u.setItem(o.name,{state:m,version:o.version})},d=i.setState;i.setState=(m,x)=>{d(m,x),l()};const f=e((...m)=>{n(...m),l()},r,i);let h;const p=()=>{var m,x;if(!u)return;s=!1,a.forEach(b=>{var v;return b((v=r())!=null?v:f)});const y=((x=o.onRehydrateStorage)==null?void 0:x.call(o,(m=r())!=null?m:f))||void 0;return Iv(u.getItem.bind(u))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var v;return h=o.merge(b,(v=r())!=null?v:f),n(h,!0),l()}).then(()=>{y==null||y(h,void 0),h=r(),s=!0,c.forEach(b=>b(h))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:m=>{o={...o,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},o.skipHydration||p(),h||f},S3e=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((v3e?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),C3e(e,t)):A3e(e,t),k3e=S3e,T3e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_RPC_NODE_URL:"https://eth-sepolia.g.alchemy.com/v2/pDSMvqEHCLgbBdL7oUaDer8HxBx24hDu",VITE_WALLET_CONNECT_PROJECT_ID:"933e43f98ac5ea20f4a52778ffa16051"},EF=e=>{let t;const n=new Set,r=(c,u)=>{const l=typeof c=="function"?c(t):c;if(!Object.is(l,t)){const d=t;t=u??typeof l!="object"?l:Object.assign({},t,l),n.forEach(f=>f(t,d))}},i=()=>t,a={setState:r,getState:i,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(T3e?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,a),a},KA=e=>e?EF(e):EF;var kee={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,d,f){if(typeof l!="function")throw new TypeError("The listener must be a function");var h=new i(l,d||c,f),p=n?n+u:u;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,d;if(this._eventsCount===0)return u;for(d in l=this._events)t.call(l,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=n?n+u:u,d=this._events[l];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,p=new Array(h);f{let i=r;return(i==null?void 0:i.__type)==="bigint"&&(i=BigInt(i.value)),(i==null?void 0:i.__type)==="Map"&&(i=new Map(i.value)),(t==null?void 0:t(n,i))??i})}function CF(e,t){return e.slice(0,t).join(".")||"."}function AF(e,t){const{length:n}=e;for(let r=0;r{let s=o;return typeof s=="bigint"&&(s={__type:"bigint",value:o.toString()}),s instanceof Map&&(s={__type:"Map",value:Array.from(o.entries())}),(t==null?void 0:t(i,s))??s},r),n??void 0)}function B3e(e){const{deserialize:t=N3e,key:n="wagmi",serialize:r=L3e,storage:i=Tee}=e;function o(s){return s instanceof Promise?s.then(a=>a).catch(()=>null):s}return{...i,key:n,async getItem(s,a){const c=i.getItem(`${n}.${s}`),u=await o(c);return u?t(u)??null:a??null},async setItem(s,a){const c=`${n}.${s}`;a===null?await o(i.removeItem(c)):await o(i.setItem(c,r(a)))},async removeItem(s){await o(i.removeItem(`${n}.${s}`))}}}const Tee={getItem:()=>null,setItem:()=>{},removeItem:()=>{}},sP=256;let Bx=sP,Mx;function M3e(e=11){if(!Mx||Bx+e>sP*2){Mx="",Bx=0;for(let t=0;to.chains),c=KA(()=>[...o.connectors??[],...i?[]:(s==null?void 0:s.getProviders().map(l))??[]].map(u));function u(E){var A;const S=R3e(M3e()),I={...E({emitter:S,chains:a.getState(),storage:n,transports:o.transports}),emitter:S,uid:S.uid};return S.on("connect",v),(A=I.setup)==null||A.call(I),I}function l(E){const{info:S}=E,I=E.provider;return t5({target:{...S,id:S.rdns,provider:I}})}const d=new Map;function f(E={}){const S=E.chainId??x.getState().chainId,I=a.getState().find(O=>O.id===S);if(E.chainId&&!I)throw new Lh;{const O=d.get(x.getState().chainId);if(O&&!I)return O;if(!I)throw new Lh}{const O=d.get(S);if(O)return O}let A;if(o.client)A=o.client({chain:I});else{const O=I.id,N=a.getState().map(M=>M.id),R={},_=Object.entries(o);for(const[M,z]of _)if(!(M==="chains"||M==="client"||M==="connectors"||M==="transports"))if(typeof z=="object")if(O in z)R[M]=z[O];else{if(N.some($=>$ in z))continue;R[M]=z}else R[M]=z;A=Xbe({...R,chain:I,batch:R.batch??{multicall:!0},transport:M=>o.transports[O]({...M,connectors:c})})}return d.set(S,A),A}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const m="0.0.0-canary-";n8.startsWith(m)?p=Number.parseInt(n8.replace(m,"")):p=Number.parseInt(n8.split(".")[0]??"0");const x=KA(w3e(n?k3e(h,{migrate(E,S){if(S===p)return E;const I=h(),A=y(E,I.chainId);return{...I,chainId:A}},name:"store",partialize(E){return{connections:{__type:"Map",value:Array.from(E.connections.entries()).map(([S,I])=>{const{id:A,name:O,type:N,uid:R}=I.connector;return[S,{...I,connector:{id:A,name:O,type:N,uid:R}}]})},chainId:E.chainId,current:E.current}},merge(E,S){typeof E=="object"&&E&&"status"in E&&delete E.status;const I=y(E,S.chainId);return{...S,...E,chainId:I}},skipHydration:i,storage:n,version:p}):h));function y(E,S){return E&&typeof E=="object"&&"chainId"in E&&typeof E.chainId=="number"&&a.getState().some(I=>I.id===E.chainId)?E.chainId:S}r&&x.subscribe(({connections:E,current:S})=>{var I;return S?(I=E.get(S))==null?void 0:I.chainId:void 0},E=>{if(a.getState().some(I=>I.id===E))return x.setState(I=>({...I,chainId:E??I.chainId}))}),s==null||s.subscribe(E=>{const S=new Map;for(const A of c.getState())S.set(A.id,!0);const I=[];for(const A of E){const O=u(l(A));S.has(O.id)||I.push(O)}n&&!x.persist.hasHydrated()||c.setState(A=>[...A,...I],!0)});function b(E){x.setState(S=>{const I=S.connections.get(E.uid);return I?{...S,connections:new Map(S.connections).set(E.uid,{accounts:E.accounts??I.accounts,chainId:E.chainId??I.chainId,connector:I.connector})}:S})}function v(E){x.getState().status==="connecting"||x.getState().status==="reconnecting"||x.setState(S=>{const I=c.getState().find(A=>A.uid===E.uid);return I?(I.emitter.listenerCount("connect")&&I.emitter.off("connect",b),I.emitter.listenerCount("change")||I.emitter.on("change",b),I.emitter.listenerCount("disconnect")||I.emitter.on("disconnect",w),{...S,connections:new Map(S.connections).set(E.uid,{accounts:E.accounts,chainId:E.chainId,connector:I}),current:E.uid,status:"connected"}):S})}function w(E){x.setState(S=>{const I=S.connections.get(E.uid);if(I){const O=I.connector;O.emitter.listenerCount("change")&&I.connector.emitter.off("change",b),O.emitter.listenerCount("disconnect")&&I.connector.emitter.off("disconnect",w),O.emitter.listenerCount("connect")||I.connector.emitter.on("connect",v)}if(S.connections.delete(E.uid),S.connections.size===0)return{...S,connections:new Map,current:null,status:"disconnected"};const A=S.connections.values().next().value;return{...S,connections:new Map(S.connections),current:A.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:f,get state(){return x.getState()},setState(E){let S;typeof E=="function"?S=E(x.getState()):S=E;const I=h();typeof S!="object"&&(S=I),Object.keys(I).some(O=>!(O in S))&&(S=I),x.setState(S,!0)},subscribe(E,S,I){return x.subscribe(E,S,I?{...I,fireImmediately:I.emitImmediately}:void 0)},_internal:{mipd:s,store:x,ssr:!!i,syncConnectedChain:r,transports:o.transports,chains:{setState(E){const S=typeof E=="function"?E(a.getState()):E;if(S.length!==0)return a.setState(S,!0)},subscribe(E){return a.subscribe(E)}},connectors:{providerDetailToConnector:l,setup:u,setState(E){return c.setState(typeof E=="function"?E(c.getState()):E,!0)},subscribe(E){return c.subscribe(E)}},events:{change:b,connect:v,disconnect:w}}}}function D3e(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(i=>i.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){var i;if(e._internal.ssr){await e._internal.store.persist.rehydrate();const o=(i=e._internal.mipd)==null?void 0:i.getProviders().map(e._internal.connectors.providerDetailToConnector).map(e._internal.connectors.setup);e._internal.connectors.setState(s=>[...s,...o??[]])}r?u3e(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function j3e(e){var o,s,a;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(s=(o=e.transports)==null?void 0:o[t.id])==null?void 0:s.call(o,{chain:t});return(((a=r==null?void 0:r.value)==null?void 0:a.transports)||[r]).map(({value:c})=>(c==null?void 0:c.url)||n)}function F3e(e){const{children:t,config:n,initialState:r,reconnectOnMount:i=!0}=e,{onMount:o}=D3e(n,{initialState:r,reconnectOnMount:i});n._internal.ssr||o();const s=j.useRef(!0);return j.useEffect(()=>{if(s.current&&n._internal.ssr)return o(),()=>{s.current=!1}},[]),t}const FO=j.createContext(void 0);function U3e(e){const{children:t,config:n}=e,r={value:n};return j.createElement(F3e,e,j.createElement(FO.Provider,r,t))}const z3e="2.12.5",$3e=()=>`wagmi@${z3e}`;let H3e=class extends e5{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return $3e()}};class V3e extends H3e{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Xr(e={}){const t=e.config??j.useContext(FO);if(!t)throw new V3e;return t}function W3e(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,i)=>{n(r,i)})}var Pee={exports:{}},Iee={},Ree={exports:{}},Nee={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cm=j;function G3e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var K3e=typeof Object.is=="function"?Object.is:G3e,Q3e=cm.useState,Y3e=cm.useEffect,q3e=cm.useLayoutEffect,Z3e=cm.useDebugValue;function J3e(e,t){var n=t(),r=Q3e({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return q3e(function(){i.value=n,i.getSnapshot=t,QA(i)&&o({inst:i})},[e,n,t]),Y3e(function(){return QA(i)&&o({inst:i}),e(function(){QA(i)&&o({inst:i})})},[e]),Z3e(n),n}function QA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!K3e(e,n)}catch{return!0}}function X3e(e,t){return t()}var eve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?X3e:J3e;Nee.useSyncExternalStore=cm.useSyncExternalStore!==void 0?cm.useSyncExternalStore:eve;Ree.exports=Nee;var tve=Ree.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var L7=j,nve=tve;function rve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ive=typeof Object.is=="function"?Object.is:rve,ove=nve.useSyncExternalStore,sve=L7.useRef,ave=L7.useEffect,cve=L7.useMemo,uve=L7.useDebugValue;Iee.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=sve(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=cve(function(){function c(h){if(!u){if(u=!0,l=h,h=r(h),i!==void 0&&s.hasValue){var p=s.value;if(i(p,h))return d=p}return d=h}if(p=d,ive(l,h))return p;var m=r(h);return i!==void 0&&i(p,m)?p:(l=h,d=m)}var u=!1,l,d,f=n===void 0?null:n;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,n,r,i]);var a=ove(e,o[0],o[1]);return ave(function(){s.hasValue=!0,s.value=a},[a]),uve(a),a};Pee.exports=Iee;var lve=Pee.exports;const YA=e=>typeof e=="object"&&!Array.isArray(e);function dve(e,t,n=t,r=al){const i=j.useRef([]),o=lve.useSyncExternalStoreWithSelector(e,t,n,s=>s,(s,a)=>{if(YA(s)&&YA(a)&&i.current.length){for(const c of i.current)if(!r(s[c],a[c]))return!1;return!0}return r(s,a)});if(YA(o)){const s={...o};let a={};for(const[c,u]of Object.entries(s))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),u)}};return Object.defineProperties(s,a),s}return o}function Xo(e={}){const t=Xr(e);return dve(n=>See(t,{onChange:n}),()=>Cee(t))}function fve(e={}){const{onConnect:t,onDisconnect:n}=e,r=Xr(e);j.useEffect(()=>See(r,{onChange(i,o){if((o.status==="reconnecting"||o.status==="connecting"&&o.address===void 0)&&i.status==="connected"){const{address:s,addresses:a,chain:c,chainId:u,connector:l}=i,d=o.status==="reconnecting"||o.status===void 0;t==null||t({address:s,addresses:a,chain:c,chainId:u,connector:l,isReconnected:d})}else o.status==="connected"&&i.status==="disconnected"&&(n==null||n())}}),[r,t,n])}function hve(e,t){return al(e,t)?e:wN(e,t)}function pve(e){return JSON.stringify(e,(t,n)=>gve(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):typeof n=="bigint"?n.toString():n)}function gve(e){if(!SF(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!SF(n)||!n.hasOwnProperty("isPrototypeOf"))}function SF(e){return Object.prototype.toString.call(e)==="[object Object]"}function n5(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:o,maxPages:s,meta:a,networkMode:c,queryFn:u,queryHash:l,queryKey:d,queryKeyHashFn:f,retry:h,retryDelay:p,structuralSharing:m,getPreviousPageParam:x,getNextPageParam:y,initialPageParam:b,_optimisticResults:v,enabled:w,notifyOnChangeProps:E,placeholderData:S,refetchInterval:I,refetchIntervalInBackground:A,refetchOnMount:O,refetchOnReconnect:N,refetchOnWindowFocus:R,retryOnMount:_,select:M,staleTime:z,suspense:F,throwOnError:$,config:W,connector:G,query:H,...L}=e;return L}function mve(e){return{mutationFn(t){return Jbe(e,t)},mutationKey:["connect"]}}function yve(e){return{mutationFn(t){return n3e(e,t)},mutationKey:["disconnect"]}}function bve(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...o}=n[1];if(!r)throw new Error("address is required");return await o3e(e,{...o,address:r})??null},queryKey:vve(t)}}function vve(e={}){return["balance",n5(e)]}function xve(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:i,...o}=n[1];if(!r)throw new Error("name is required");return s3e(e,{...o,name:r})},queryKey:wve(t)}}function wve(e={}){return["ensAddress",n5(e)]}function Eve(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:i,...o}=n[1];if(!r)throw new Error("name is required");return a3e(e,{...o,name:r})},queryKey:Cve(t)}}function Cve(e={}){return["ensAvatar",n5(e)]}function Ave(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...o}=n[1];if(!r)throw new Error("address is required");return c3e(e,{...o,address:r})},queryKey:Sve(t)}}function Sve(e={}){return["ensName",n5(e)]}function kve(e,t={}){return{async queryFn({queryKey:n}){const r=t.abi;if(!r)throw new Error("abi is required");const{address:i,functionName:o,scopeKey:s,...a}=n[1];if(!i)throw new Error("address is required");if(!o)throw new Error("functionName is required");const c=a.args;return Aee(e,{abi:r,address:i,functionName:o,args:c,...a})},queryKey:Tve(t)}}function Tve(e={}){const{abi:t,...n}=e;return["readContract",n5(n)]}function _ve(e){return{mutationFn(t){return d3e(e,t)},mutationKey:["switchChain"]}}function r5(e){const t=Vpe({...e,queryKeyHashFn:pve});return t.queryKey=e.queryKey,t}function i5(e={}){const t=Xr(e);return j.useSyncExternalStore(n=>f3e(t,{onChange:n}),()=>vF(t),()=>vF(t))}function Pve(e={}){const{address:t,query:n={}}=e,r=Xr(e),i=i5({config:r}),o=bve(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return r5({...n,...o,enabled:s})}function Ive(e={}){const t=Xr(e);return j.useSyncExternalStore(n=>W3e(t,{onChange:n}),()=>xF(t),()=>xF(t))}function Oee(e={}){const t=Xr(e);return j.useSyncExternalStore(n=>p3e(t,{onChange:n}),()=>wF(t),()=>wF(t))}function UO(e={}){const{mutation:t}=e,n=Xr(e),r=mve(n),{mutate:i,mutateAsync:o,...s}=AN({...t,...r});return j.useEffect(()=>n.subscribe(({status:a})=>a,(a,c)=>{c==="connected"&&a==="disconnected"&&s.reset()}),[n,s.reset]),{...s,connect:i,connectAsync:o,connectors:Oee({config:n})}}function Rve(e={}){const t=Xr(e);return j.useSyncExternalStore(n=>h3e(t,{onChange:n}),()=>oP(t),()=>oP(t))}function Lee(e={}){const{mutation:t}=e,n=Xr(e),r=yve(n),{mutate:i,mutateAsync:o,...s}=AN({...t,...r});return{...s,connectors:Rve({config:n}).map(a=>a.connector),disconnect:i,disconnectAsync:o}}function Nve(e={}){const{name:t,query:n={}}=e,r=Xr(e),i=i5({config:r}),o=xve(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return r5({...n,...o,enabled:s})}function Ove(e={}){const{name:t,query:n={}}=e,r=Xr(e),i=i5({config:r}),o=Eve(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return r5({...n,...o,enabled:s})}function zO(e={}){const{address:t,query:n={}}=e,r=Xr(e),i=i5({config:r}),o=Ave(r,{...e,chainId:e.chainId??i}),s=!!(t&&(n.enabled??!0));return r5({...n,...o,enabled:s})}function B7(e={}){const{abi:t,address:n,functionName:r,query:i={}}=e,o=Xr(e),s=i5({config:o}),a=kve(o,{...e,chainId:e.chainId??s}),c=!!(n&&t&&r&&(i.enabled??!0));return r5({...i,...a,enabled:c,structuralSharing:i.structuralSharing??hve})}function $O(e={}){const{mutation:t}=e,n=Xr(e),r=_ve(n),{mutate:i,mutateAsync:o,...s}=AN({...t,...r});return{...s,chains:Ive({config:n}),switchChain:i,switchChainAsync:o}}var Lve=!1;function Bve(e){if(e.sheet)return e.sheet;for(var t=0;t0?Wr(r2,--po):0,um--,br===10&&(um=1,D7--),br}function Ho(){return br=po2||Nv(br)>3?"":" "}function Qve(e,t){for(;--t&&Ho()&&!(br<48||br>102||br>57&&br<65||br>70&&br<97););return o5(e,i8()+(t<6&&Mc()==32&&Ho()==32))}function cP(e){for(;Ho();)switch(br){case e:return po;case 34:case 39:e!==34&&e!==39&&cP(br);break;case 40:e===41&&cP(e);break;case 92:Ho();break}return po}function Yve(e,t){for(;Ho()&&e+br!==57;)if(e+br===84&&Mc()===47)break;return"/*"+o5(t,po-1)+"*"+M7(e===47?e:Ho())}function qve(e){for(;!Nv(Mc());)Ho();return o5(e,po)}function Zve(e){return Uee(s8("",null,null,null,[""],e=Fee(e),0,[0],e))}function s8(e,t,n,r,i,o,s,a,c){for(var u=0,l=0,d=s,f=0,h=0,p=0,m=1,x=1,y=1,b=0,v="",w=i,E=o,S=r,I=v;x;)switch(p=b,b=Ho()){case 40:if(p!=108&&Wr(I,d-1)==58){aP(I+=nn(o8(b),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:I+=o8(b);break;case 9:case 10:case 13:case 32:I+=Kve(p);break;case 92:I+=Qve(i8()-1,7);continue;case 47:switch(Mc()){case 42:case 47:Dx(Jve(Yve(Ho(),i8()),t,n),c);break;default:I+="/"}break;case 123*m:a[u++]=xc(I)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+l:y==-1&&(I=nn(I,/\f/g,"")),h>0&&xc(I)-d&&Dx(h>32?TF(I+";",r,n,d-1):TF(nn(I," ","")+";",r,n,d-2),c);break;case 59:I+=";";default:if(Dx(S=kF(I,t,n,u,l,i,a,v,w=[],E=[],d),o),b===123)if(l===0)s8(I,t,S,S,w,o,d,a,E);else switch(f===99&&Wr(I,3)===110?100:f){case 100:case 108:case 109:case 115:s8(e,S,S,r&&Dx(kF(e,S,S,0,0,i,a,v,i,w=[],d),E),i,E,d,a,r?w:E);break;default:s8(I,S,S,S,[""],E,0,a,E)}}u=l=h=0,m=y=1,v=I="",d=s;break;case 58:d=1+xc(I),h=p;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Gve()==125)continue}switch(I+=M7(b),b*m){case 38:y=l>0?1:(I+="\f",-1);break;case 44:a[u++]=(xc(I)-1)*y,y=1;break;case 64:Mc()===45&&(I+=o8(Ho())),f=Mc(),l=d=xc(v=I+=qve(i8())),b++;break;case 45:p===45&&xc(I)==2&&(m=0)}}return o}function kF(e,t,n,r,i,o,s,a,c,u,l){for(var d=i-1,f=i===0?o:[""],h=WO(f),p=0,m=0,x=0;p0?f[y]+" "+b:nn(b,/&\f/g,f[y])))&&(c[x++]=v);return j7(e,t,n,i===0?HO:a,c,u,l)}function Jve(e,t,n){return j7(e,t,n,Bee,M7(Wve()),Rv(e,2,-2),0)}function TF(e,t,n,r){return j7(e,t,n,VO,Rv(e,0,r),Rv(e,r+1,-1),r)}function j1(e,t){for(var n="",r=WO(e),i=0;i6)switch(Wr(e,t+1)){case 109:if(Wr(e,t+4)!==45)break;case 102:return nn(e,/(.+:)(.+)-([^]+)/,"$1"+tn+"$2-$3$1"+Ow+(Wr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~aP(e,"stretch")?$ee(nn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Wr(e,t+1)!==115)break;case 6444:switch(Wr(e,xc(e)-3-(~aP(e,"!important")&&10))){case 107:return nn(e,":",":"+tn)+e;case 101:return nn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tn+(Wr(e,14)===45?"inline-":"")+"box$3$1"+tn+"$2$3$1"+oi+"$2box$3")+e}break;case 5936:switch(Wr(e,t+11)){case 114:return tn+e+oi+nn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return tn+e+oi+nn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return tn+e+oi+nn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return tn+e+oi+e+e}return e}var a4e=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case VO:t.return=$ee(t.value,t.length);break;case Mee:return j1([K2(t,{value:nn(t.value,"@","@"+tn)})],i);case HO:if(t.length)return Vve(t.props,function(o){switch(Hve(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return j1([K2(t,{props:[nn(o,/:(read-\w+)/,":"+Ow+"$1")]})],i);case"::placeholder":return j1([K2(t,{props:[nn(o,/:(plac\w+)/,":"+tn+"input-$1")]}),K2(t,{props:[nn(o,/:(plac\w+)/,":"+Ow+"$1")]}),K2(t,{props:[nn(o,/:(plac\w+)/,oi+"input-$1")]})],i)}return""})}},c4e=[a4e],u4e=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var x=m.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||c4e,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var x=m.getAttribute("data-emotion").split(" "),y=1;y=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _4e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},P4e=!1,I4e=/[A-Z]|^ms/g,R4e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yee=function(t){return t.charCodeAt(1)===45},OF=function(t){return t!=null&&typeof t!="boolean"},qA=zee(function(e){return Yee(e)?e:e.replace(I4e,"-$&").toLowerCase()}),LF=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(R4e,function(r,i,o){return wc={name:i,styles:o,next:wc},i})}return _4e[t]!==1&&!Yee(t)&&typeof n=="number"&&n!==0?n+"px":n},N4e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ov(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return wc={name:i.name,styles:i.styles,next:wc},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)wc={name:s.name,styles:s.styles,next:wc},s=s.next;var a=o.styles+";";return a}return O4e(e,t,n)}case"function":{if(e!==void 0){var c=wc,u=n(e);return wc=c,Ov(e,t,u)}break}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function O4e(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ig.jsx(Y7,{styles:ete}),z4e=({scope:e=""})=>g.jsx(Y7,{styles:Xee` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + margin: 0; + font-feature-settings: "kern"; + } + + ${e} :where(*, *::before, *::after) { + border-width: 0; + border-style: solid; + box-sizing: border-box; + word-wrap: break-word; + } + + main { + display: block; + } + + ${e} hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + ${e} :where(pre, code, kbd,samp) { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + ${e} a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + ${e} abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + ${e} :where(b, strong) { + font-weight: bold; + } + + ${e} small { + font-size: 80%; + } + + ${e} :where(sub,sup) { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + ${e} sub { + bottom: -0.25em; + } + + ${e} sup { + top: -0.5em; + } + + ${e} img { + border-style: none; + } + + ${e} :where(button, input, optgroup, select, textarea) { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + ${e} :where(button, input) { + overflow: visible; + } + + ${e} :where(button, select) { + text-transform: none; + } + + ${e} :where( + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner + ) { + border-style: none; + padding: 0; + } + + ${e} fieldset { + padding: 0.35em 0.75em 0.625em; + } + + ${e} legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + ${e} progress { + vertical-align: baseline; + } + + ${e} textarea { + overflow: auto; + } + + ${e} :where([type="checkbox"], [type="radio"]) { + box-sizing: border-box; + padding: 0; + } + + ${e} input[type="number"]::-webkit-inner-spin-button, + ${e} input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + ${e} input[type="number"] { + -moz-appearance: textfield; + } + + ${e} input[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + ${e} input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ${e} ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + ${e} details { + display: block; + } + + ${e} summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + ${e} :where( + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre + ) { + margin: 0; + } + + ${e} button { + background: transparent; + padding: 0; + } + + ${e} fieldset { + margin: 0; + padding: 0; + } + + ${e} :where(ol, ul) { + margin: 0; + padding: 0; + } + + ${e} textarea { + resize: vertical; + } + + ${e} :where(button, [role="button"]) { + cursor: pointer; + } + + ${e} button::-moz-focus-inner { + border: 0 !important; + } + + ${e} table { + border-collapse: collapse; + } + + ${e} :where(h1, h2, h3, h4, h5, h6) { + font-size: inherit; + font-weight: inherit; + } + + ${e} :where(button, input, optgroup, select, textarea) { + padding: 0; + line-height: inherit; + color: inherit; + } + + ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) { + display: block; + } + + ${e} :where(img, video) { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] + :focus:not([data-focus-visible-added]):not( + [data-focus-visible-disabled] + ) { + outline: none; + box-shadow: none; + } + + ${e} select::-ms-expand { + display: none; + } + + ${ete} + `});function $4e(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ha(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:s}=e,a=j.createContext(s);a.displayName=t;function c(){var u;const l=j.useContext(a);if(!l&&n){const d=new Error(o??$4e(r,i));throw d.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,d,c),d}return l}return[a.Provider,c,a]}var[H4e,V4e]=Ha({strict:!1,name:"PortalManagerContext"});function tte(e){const{children:t,zIndex:n}=e;return g.jsx(H4e,{value:{zIndex:n},children:t})}tte.displayName="PortalManager";var tf=globalThis!=null&&globalThis.document?j.useLayoutEffect:j.useEffect,[nte,W4e]=Ha({strict:!1,name:"PortalContext"}),JO="chakra-portal",G4e=".chakra-portal",K4e=e=>g.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Q4e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=j.useState(null),o=j.useRef(null),[,s]=j.useState({});j.useEffect(()=>s({}),[]);const a=W4e(),c=V4e();tf(()=>{if(!r)return;const l=r.ownerDocument,d=t?a??l.body:l.body;if(!d)return;o.current=l.createElement("div"),o.current.className=JO,d.appendChild(o.current),s({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const u=c!=null&&c.zIndex?g.jsx(K4e,{zIndex:c==null?void 0:c.zIndex,children:n}):n;return o.current?Zm.createPortal(g.jsx(nte,{value:o.current,children:u}),o.current):g.jsx("span",{ref:l=>{l&&i(l)}})},Y4e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),s=j.useMemo(()=>{const c=i==null?void 0:i.ownerDocument.createElement("div");return c&&(c.className=JO),c},[i]),[,a]=j.useState({});return tf(()=>a({}),[]),tf(()=>{if(!(!s||!o))return o.appendChild(s),()=>{o.removeChild(s)}},[s,o]),o&&s?Zm.createPortal(g.jsx(nte,{value:r?s:null,children:t}),s):null};function Z7(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?g.jsx(Y4e,{containerRef:n,...r}):g.jsx(Q4e,{...r})}Z7.className=JO;Z7.selector=G4e;Z7.displayName="Portal";function q4e(){const e=j.useContext(Lv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var XO=j.createContext({});XO.displayName="ColorModeContext";function eL(){const e=j.useContext(XO);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var jx={light:"chakra-ui-light",dark:"chakra-ui-dark"};function Z4e(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?jx.dark:jx.light),document.body.classList.remove(r?jx.light:jx.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=s=>{r(s.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var J4e="chakra-ui-color-mode";function X4e(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var e5e=X4e(J4e),DF=()=>{};function jF(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function rte(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:s=e5e}=e,a=i==="dark"?"dark":"light",[c,u]=j.useState(()=>jF(s,a)),[l,d]=j.useState(()=>jF(s)),{getSystemTheme:f,setClassName:h,setDataset:p,addListener:m}=j.useMemo(()=>Z4e({preventTransition:o}),[o]),x=i==="system"&&!c?l:c,y=j.useCallback(w=>{const E=w==="system"?f():w;u(E),h(E==="dark"),p(E),s.set(E)},[s,f,h,p]);tf(()=>{i==="system"&&d(f())},[]),j.useEffect(()=>{const w=s.get();if(w){y(w);return}if(i==="system"){y("system");return}y(a)},[s,a,i,y]);const b=j.useCallback(()=>{y(x==="dark"?"light":"dark")},[x,y]);j.useEffect(()=>{if(r)return m(y)},[r,m,y]);const v=j.useMemo(()=>({colorMode:t??x,toggleColorMode:t?DF:b,setColorMode:t?DF:y,forced:t!==void 0}),[x,b,y,t]);return g.jsx(XO.Provider,{value:v,children:n})}rte.displayName="ColorModeProvider";function ite(){const e=eL(),t=q4e();return{...e,theme:t}}var Kn=(...e)=>e.filter(Boolean).join(" ");function zs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Ic(e,...t){return t5e(e)?e(...t):e}var t5e=e=>typeof e=="function",zt=e=>e?"":void 0,ZA=e=>e?!0:void 0;function _o(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function n5e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var Bw={exports:{}};Bw.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,a="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",l="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",m="[object Map]",x="[object Number]",y="[object Null]",b="[object Object]",v="[object Proxy]",w="[object RegExp]",E="[object Set]",S="[object String]",I="[object Undefined]",A="[object WeakMap]",O="[object ArrayBuffer]",N="[object DataView]",R="[object Float32Array]",_="[object Float64Array]",M="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",G="[object Uint16Array]",H="[object Uint32Array]",L=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,P={};P[R]=P[_]=P[M]=P[z]=P[F]=P[$]=P[W]=P[G]=P[H]=!0,P[a]=P[c]=P[O]=P[l]=P[N]=P[d]=P[f]=P[h]=P[m]=P[x]=P[b]=P[w]=P[E]=P[S]=P[A]=!1;var K=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,ce=typeof self=="object"&&self&&self.Object===Object&&self,X=K||ce||Function("return this")(),ke=t&&!t.nodeType&&t,me=ke&&!0&&e&&!e.nodeType&&e,Re=me&&me.exports===ke,Be=Re&&K.process,Le=function(){try{var ae=me&&me.require&&me.require("util").types;return ae||Be&&Be.binding&&Be.binding("util")}catch{}}(),Ne=Le&&Le.isTypedArray;function Me(ae,be,_e){switch(_e.length){case 0:return ae.call(be);case 1:return ae.call(be,_e[0]);case 2:return ae.call(be,_e[0],_e[1]);case 3:return ae.call(be,_e[0],_e[1],_e[2])}return ae.apply(be,_e)}function re(ae,be){for(var _e=-1,nt=Array(ae);++_e-1}function JC(ae,be){var _e=this.__data__,nt=rr(_e,ae);return nt<0?(++this.size,_e.push([ae,be])):_e[nt][1]=be,this}is.prototype.clear=hp,is.prototype.delete=pp,is.prototype.get=ax,is.prototype.has=ZC,is.prototype.set=JC;function he(ae){var be=-1,_e=ae==null?0:ae.length;for(this.clear();++be<_e;){var nt=ae[be];this.set(nt[0],nt[1])}}function ye(){this.size=0,this.__data__={hash:new Xs,map:new(N2||is),string:new Xs}}function Ae(ae){var be=ux(this,ae).delete(ae);return this.size-=be?1:0,be}function je(ae){return ux(this,ae).get(ae)}function Ze(ae){return ux(this,ae).has(ae)}function rt(ae,be){var _e=ux(this,ae),nt=_e.size;return _e.set(ae,be),this.size+=_e.size==nt?0:1,this}he.prototype.clear=ye,he.prototype.delete=Ae,he.prototype.get=je,he.prototype.has=Ze,he.prototype.set=rt;function st(ae){var be=this.__data__=new is(ae);this.size=be.size}function Ke(){this.__data__=new is,this.size=0}function wt(ae){var be=this.__data__,_e=be.delete(ae);return this.size=be.size,_e}function ct(ae){return this.__data__.get(ae)}function Ct(ae){return this.__data__.has(ae)}function un(ae,be){var _e=this.__data__;if(_e instanceof is){var nt=_e.__data__;if(!N2||nt.length1?_e[Ut-1]:void 0,Un=Ut>2?_e[2]:void 0;for(vn=ae.length>3&&typeof vn=="function"?(Ut--,vn):void 0,Un&&vhe(_e[0],_e[1],Un)&&(vn=Ut<3?void 0:vn,Ut=1),be=Object(be);++nt-1&&ae%1==0&&ae0){if(++be>=i)return arguments[0]}else be=0;return ae.apply(void 0,arguments)}}function The(ae){if(ae!=null){try{return Ie.call(ae)}catch{}try{return ae+""}catch{}}return""}function lx(ae,be){return ae===be||ae!==ae&&be!==be}var nA=Yc(function(){return arguments}())?Yc:function(ae){return L2(ae)&&ie.call(ae,"callee")&&!Te.call(ae,"callee")},rA=Array.isArray;function iA(ae){return ae!=null&&TD(ae.length)&&!oA(ae)}function _he(ae){return L2(ae)&&iA(ae)}var kD=Tt||Ohe;function oA(ae){if(!Bf(ae))return!1;var be=bo(ae);return be==h||be==p||be==u||be==v}function TD(ae){return typeof ae=="number"&&ae>-1&&ae%1==0&&ae<=s}function Bf(ae){var be=typeof ae;return ae!=null&&(be=="object"||be=="function")}function L2(ae){return ae!=null&&typeof ae=="object"}function Phe(ae){if(!L2(ae)||bo(ae)!=b)return!1;var be=ue(ae);if(be===null)return!0;var _e=ie.call(be,"constructor")&&be.constructor;return typeof _e=="function"&&_e instanceof _e&&Ie.call(_e)==fe}var _D=Ne?Q(Ne):Il;function Ihe(ae){return cx(ae,PD(ae))}function PD(ae){return iA(ae)?Zt(ae):os(ae)}var Rhe=XC(function(ae,be,_e,nt){Lf(ae,be,_e,nt)});function Nhe(ae){return function(){return ae}}function ID(ae){return ae}function Ohe(){return!1}e.exports=Rhe})(Bw,Bw.exports);var r5e=Bw.exports;const Fs=wl(r5e);var i5e=e=>/!(important)?$/.test(e),FF=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,o5e=(e,t)=>n=>{const r=String(t),i=i5e(r),o=FF(r),s=e?`${e}.${o}`:o;let a=zs(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:t;return a=FF(a),i?`${a} !important`:a};function tL(e){const{scale:t,transform:n,compose:r}=e;return(o,s)=>{var a;const c=o5e(t,o)(s);let u=(a=n==null?void 0:n(c,s))!=null?a:c;return r&&(u=r(u,s)),u}}var Fx=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=tL({scale:e,transform:t}),r}}var s5e=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function a5e(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:s5e(t),transform:n?tL({scale:n,compose:r}):r}}var ote=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function c5e(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...ote].join(" ")}function u5e(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...ote].join(" ")}var l5e={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},d5e={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function f5e(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var h5e={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},uP={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},p5e=new Set(Object.values(uP)),lP=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),g5e=e=>e.trim();function m5e(e,t){if(e==null||lP.has(e))return e;if(!(dP(e)||lP.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],s=i==null?void 0:i[2];if(!o||!s)return e;const a=o.includes("-gradient")?o:`${o}-gradient`,[c,...u]=s.split(",").map(g5e).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const l=c in uP?uP[c]:c;u.unshift(l);const d=u.map(f=>{if(p5e.has(f))return f;const h=f.indexOf(" "),[p,m]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],x=dP(m)?m:m&&m.split(" "),y=`colors.${p}`,b=y in t.__cssMap?t.__cssMap[y].varRef:p;return x?[b,...Array.isArray(x)?x:[x]].join(" "):b});return`${a}(${d.join(", ")})`}var dP=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),y5e=(e,t)=>m5e(e,t??{});function b5e(e){return/^var\(--.+\)$/.test(e)}var v5e=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},qa=e=>t=>`${e}(${t})`,Mt={filter(e){return e!=="auto"?e:l5e},backdropFilter(e){return e!=="auto"?e:d5e},ring(e){return f5e(Mt.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?c5e():e==="auto-gpu"?u5e():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=v5e(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(b5e(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:y5e,blur:qa("blur"),opacity:qa("opacity"),brightness:qa("brightness"),contrast:qa("contrast"),dropShadow:qa("drop-shadow"),grayscale:qa("grayscale"),hueRotate:e=>qa("hue-rotate")(Mt.degree(e)),invert:qa("invert"),saturate:qa("saturate"),sepia:qa("sepia"),bgImage(e){return e==null||dP(e)||lP.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=h5e[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},ge={borderWidths:ss("borderWidths"),borderStyles:ss("borderStyles"),colors:ss("colors"),borders:ss("borders"),gradients:ss("gradients",Mt.gradient),radii:ss("radii",Mt.px),space:ss("space",Fx(Mt.vh,Mt.px)),spaceT:ss("space",Fx(Mt.vh,Mt.px)),degreeT(e){return{property:e,transform:Mt.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:tL({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ss("sizes",Fx(Mt.vh,Mt.px)),sizesT:ss("sizes",Fx(Mt.vh,Mt.fraction)),shadows:ss("shadows"),logical:a5e,blur:ss("blur",Mt.blur)},a8={background:ge.colors("background"),backgroundColor:ge.colors("backgroundColor"),backgroundImage:ge.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Mt.bgClip},bgSize:ge.prop("backgroundSize"),bgPosition:ge.prop("backgroundPosition"),bg:ge.colors("background"),bgColor:ge.colors("backgroundColor"),bgPos:ge.prop("backgroundPosition"),bgRepeat:ge.prop("backgroundRepeat"),bgAttachment:ge.prop("backgroundAttachment"),bgGradient:ge.gradients("backgroundImage"),bgClip:{transform:Mt.bgClip}};Object.assign(a8,{bgImage:a8.backgroundImage,bgImg:a8.backgroundImage});var en={border:ge.borders("border"),borderWidth:ge.borderWidths("borderWidth"),borderStyle:ge.borderStyles("borderStyle"),borderColor:ge.colors("borderColor"),borderRadius:ge.radii("borderRadius"),borderTop:ge.borders("borderTop"),borderBlockStart:ge.borders("borderBlockStart"),borderTopLeftRadius:ge.radii("borderTopLeftRadius"),borderStartStartRadius:ge.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ge.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ge.radii("borderTopRightRadius"),borderStartEndRadius:ge.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ge.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ge.borders("borderRight"),borderInlineEnd:ge.borders("borderInlineEnd"),borderBottom:ge.borders("borderBottom"),borderBlockEnd:ge.borders("borderBlockEnd"),borderBottomLeftRadius:ge.radii("borderBottomLeftRadius"),borderBottomRightRadius:ge.radii("borderBottomRightRadius"),borderLeft:ge.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ge.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ge.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ge.borders(["borderLeft","borderRight"]),borderInline:ge.borders("borderInline"),borderY:ge.borders(["borderTop","borderBottom"]),borderBlock:ge.borders("borderBlock"),borderTopWidth:ge.borderWidths("borderTopWidth"),borderBlockStartWidth:ge.borderWidths("borderBlockStartWidth"),borderTopColor:ge.colors("borderTopColor"),borderBlockStartColor:ge.colors("borderBlockStartColor"),borderTopStyle:ge.borderStyles("borderTopStyle"),borderBlockStartStyle:ge.borderStyles("borderBlockStartStyle"),borderBottomWidth:ge.borderWidths("borderBottomWidth"),borderBlockEndWidth:ge.borderWidths("borderBlockEndWidth"),borderBottomColor:ge.colors("borderBottomColor"),borderBlockEndColor:ge.colors("borderBlockEndColor"),borderBottomStyle:ge.borderStyles("borderBottomStyle"),borderBlockEndStyle:ge.borderStyles("borderBlockEndStyle"),borderLeftWidth:ge.borderWidths("borderLeftWidth"),borderInlineStartWidth:ge.borderWidths("borderInlineStartWidth"),borderLeftColor:ge.colors("borderLeftColor"),borderInlineStartColor:ge.colors("borderInlineStartColor"),borderLeftStyle:ge.borderStyles("borderLeftStyle"),borderInlineStartStyle:ge.borderStyles("borderInlineStartStyle"),borderRightWidth:ge.borderWidths("borderRightWidth"),borderInlineEndWidth:ge.borderWidths("borderInlineEndWidth"),borderRightColor:ge.colors("borderRightColor"),borderInlineEndColor:ge.colors("borderInlineEndColor"),borderRightStyle:ge.borderStyles("borderRightStyle"),borderInlineEndStyle:ge.borderStyles("borderInlineEndStyle"),borderTopRadius:ge.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ge.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ge.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ge.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(en,{rounded:en.borderRadius,roundedTop:en.borderTopRadius,roundedTopLeft:en.borderTopLeftRadius,roundedTopRight:en.borderTopRightRadius,roundedTopStart:en.borderStartStartRadius,roundedTopEnd:en.borderStartEndRadius,roundedBottom:en.borderBottomRadius,roundedBottomLeft:en.borderBottomLeftRadius,roundedBottomRight:en.borderBottomRightRadius,roundedBottomStart:en.borderEndStartRadius,roundedBottomEnd:en.borderEndEndRadius,roundedLeft:en.borderLeftRadius,roundedRight:en.borderRightRadius,roundedStart:en.borderInlineStartRadius,roundedEnd:en.borderInlineEndRadius,borderStart:en.borderInlineStart,borderEnd:en.borderInlineEnd,borderTopStartRadius:en.borderStartStartRadius,borderTopEndRadius:en.borderStartEndRadius,borderBottomStartRadius:en.borderEndStartRadius,borderBottomEndRadius:en.borderEndEndRadius,borderStartRadius:en.borderInlineStartRadius,borderEndRadius:en.borderInlineEndRadius,borderStartWidth:en.borderInlineStartWidth,borderEndWidth:en.borderInlineEndWidth,borderStartColor:en.borderInlineStartColor,borderEndColor:en.borderInlineEndColor,borderStartStyle:en.borderInlineStartStyle,borderEndStyle:en.borderInlineEndStyle});var x5e={color:ge.colors("color"),textColor:ge.colors("color"),fill:ge.colors("fill"),stroke:ge.colors("stroke")},fP={boxShadow:ge.shadows("boxShadow"),mixBlendMode:!0,blendMode:ge.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ge.prop("backgroundBlendMode"),opacity:!0};Object.assign(fP,{shadow:fP.boxShadow});var w5e={filter:{transform:Mt.filter},blur:ge.blur("--chakra-blur"),brightness:ge.propT("--chakra-brightness",Mt.brightness),contrast:ge.propT("--chakra-contrast",Mt.contrast),hueRotate:ge.propT("--chakra-hue-rotate",Mt.hueRotate),invert:ge.propT("--chakra-invert",Mt.invert),saturate:ge.propT("--chakra-saturate",Mt.saturate),dropShadow:ge.propT("--chakra-drop-shadow",Mt.dropShadow),backdropFilter:{transform:Mt.backdropFilter},backdropBlur:ge.blur("--chakra-backdrop-blur"),backdropBrightness:ge.propT("--chakra-backdrop-brightness",Mt.brightness),backdropContrast:ge.propT("--chakra-backdrop-contrast",Mt.contrast),backdropHueRotate:ge.propT("--chakra-backdrop-hue-rotate",Mt.hueRotate),backdropInvert:ge.propT("--chakra-backdrop-invert",Mt.invert),backdropSaturate:ge.propT("--chakra-backdrop-saturate",Mt.saturate)},Mw={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Mt.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ge.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ge.space("gap"),rowGap:ge.space("rowGap"),columnGap:ge.space("columnGap")};Object.assign(Mw,{flexDir:Mw.flexDirection});var ste={gridGap:ge.space("gridGap"),gridColumnGap:ge.space("gridColumnGap"),gridRowGap:ge.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},E5e={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Mt.outline},outlineOffset:!0,outlineColor:ge.colors("outlineColor")},ws={width:ge.sizesT("width"),inlineSize:ge.sizesT("inlineSize"),height:ge.sizes("height"),blockSize:ge.sizes("blockSize"),boxSize:ge.sizes(["width","height"]),minWidth:ge.sizes("minWidth"),minInlineSize:ge.sizes("minInlineSize"),minHeight:ge.sizes("minHeight"),minBlockSize:ge.sizes("minBlockSize"),maxWidth:ge.sizes("maxWidth"),maxInlineSize:ge.sizes("maxInlineSize"),maxHeight:ge.sizes("maxHeight"),maxBlockSize:ge.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ge.propT("float",Mt.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ws,{w:ws.width,h:ws.height,minW:ws.minWidth,maxW:ws.maxWidth,minH:ws.minHeight,maxH:ws.maxHeight,overscroll:ws.overscrollBehavior,overscrollX:ws.overscrollBehaviorX,overscrollY:ws.overscrollBehaviorY});var C5e={listStyleType:!0,listStylePosition:!0,listStylePos:ge.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ge.prop("listStyleImage")};function A5e(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const c=e(r,i,o,s);return a.set(i,c),c}},k5e=S5e(A5e),T5e={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},_5e={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},JA=(e,t,n)=>{const r={},i=k5e(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},P5e={srOnly:{transform(e){return e===!0?T5e:e==="focusable"?_5e:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>JA(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>JA(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>JA(t,e,n)}},c3={position:!0,pos:ge.prop("position"),zIndex:ge.prop("zIndex","zIndices"),inset:ge.spaceT("inset"),insetX:ge.spaceT(["left","right"]),insetInline:ge.spaceT("insetInline"),insetY:ge.spaceT(["top","bottom"]),insetBlock:ge.spaceT("insetBlock"),top:ge.spaceT("top"),insetBlockStart:ge.spaceT("insetBlockStart"),bottom:ge.spaceT("bottom"),insetBlockEnd:ge.spaceT("insetBlockEnd"),left:ge.spaceT("left"),insetInlineStart:ge.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ge.spaceT("right"),insetInlineEnd:ge.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(c3,{insetStart:c3.insetInlineStart,insetEnd:c3.insetInlineEnd});var I5e={ring:{transform:Mt.ring},ringColor:ge.colors("--chakra-ring-color"),ringOffset:ge.prop("--chakra-ring-offset-width"),ringOffsetColor:ge.colors("--chakra-ring-offset-color"),ringInset:ge.prop("--chakra-ring-inset")},Ln={margin:ge.spaceT("margin"),marginTop:ge.spaceT("marginTop"),marginBlockStart:ge.spaceT("marginBlockStart"),marginRight:ge.spaceT("marginRight"),marginInlineEnd:ge.spaceT("marginInlineEnd"),marginBottom:ge.spaceT("marginBottom"),marginBlockEnd:ge.spaceT("marginBlockEnd"),marginLeft:ge.spaceT("marginLeft"),marginInlineStart:ge.spaceT("marginInlineStart"),marginX:ge.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ge.spaceT("marginInline"),marginY:ge.spaceT(["marginTop","marginBottom"]),marginBlock:ge.spaceT("marginBlock"),padding:ge.space("padding"),paddingTop:ge.space("paddingTop"),paddingBlockStart:ge.space("paddingBlockStart"),paddingRight:ge.space("paddingRight"),paddingBottom:ge.space("paddingBottom"),paddingBlockEnd:ge.space("paddingBlockEnd"),paddingLeft:ge.space("paddingLeft"),paddingInlineStart:ge.space("paddingInlineStart"),paddingInlineEnd:ge.space("paddingInlineEnd"),paddingX:ge.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ge.space("paddingInline"),paddingY:ge.space(["paddingTop","paddingBottom"]),paddingBlock:ge.space("paddingBlock")};Object.assign(Ln,{m:Ln.margin,mt:Ln.marginTop,mr:Ln.marginRight,me:Ln.marginInlineEnd,marginEnd:Ln.marginInlineEnd,mb:Ln.marginBottom,ml:Ln.marginLeft,ms:Ln.marginInlineStart,marginStart:Ln.marginInlineStart,mx:Ln.marginX,my:Ln.marginY,p:Ln.padding,pt:Ln.paddingTop,py:Ln.paddingY,px:Ln.paddingX,pb:Ln.paddingBottom,pl:Ln.paddingLeft,ps:Ln.paddingInlineStart,paddingStart:Ln.paddingInlineStart,pr:Ln.paddingRight,pe:Ln.paddingInlineEnd,paddingEnd:Ln.paddingInlineEnd});var R5e={textDecorationColor:ge.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ge.shadows("textShadow")},N5e={clipPath:!0,transform:ge.propT("transform",Mt.transform),transformOrigin:!0,translateX:ge.spaceT("--chakra-translate-x"),translateY:ge.spaceT("--chakra-translate-y"),skewX:ge.degreeT("--chakra-skew-x"),skewY:ge.degreeT("--chakra-skew-y"),scaleX:ge.prop("--chakra-scale-x"),scaleY:ge.prop("--chakra-scale-y"),scale:ge.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ge.degreeT("--chakra-rotate")},O5e={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ge.prop("transitionDuration","transition.duration"),transitionProperty:ge.prop("transitionProperty","transition.property"),transitionTimingFunction:ge.prop("transitionTimingFunction","transition.easing")},L5e={fontFamily:ge.prop("fontFamily","fonts"),fontSize:ge.prop("fontSize","fontSizes",Mt.px),fontWeight:ge.prop("fontWeight","fontWeights"),lineHeight:ge.prop("lineHeight","lineHeights"),letterSpacing:ge.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},B5e={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ge.spaceT("scrollMargin"),scrollMarginTop:ge.spaceT("scrollMarginTop"),scrollMarginBottom:ge.spaceT("scrollMarginBottom"),scrollMarginLeft:ge.spaceT("scrollMarginLeft"),scrollMarginRight:ge.spaceT("scrollMarginRight"),scrollMarginX:ge.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ge.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ge.spaceT("scrollPadding"),scrollPaddingTop:ge.spaceT("scrollPaddingTop"),scrollPaddingBottom:ge.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ge.spaceT("scrollPaddingLeft"),scrollPaddingRight:ge.spaceT("scrollPaddingRight"),scrollPaddingX:ge.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ge.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function ate(e){return zs(e)&&e.reference?e.reference:String(e)}var J7=(e,...t)=>t.map(ate).join(` ${e} `).replace(/calc/g,""),UF=(...e)=>`calc(${J7("+",...e)})`,zF=(...e)=>`calc(${J7("-",...e)})`,hP=(...e)=>`calc(${J7("*",...e)})`,$F=(...e)=>`calc(${J7("/",...e)})`,HF=e=>{const t=ate(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:hP(t,-1)},y0=Object.assign(e=>({add:(...t)=>y0(UF(e,...t)),subtract:(...t)=>y0(zF(e,...t)),multiply:(...t)=>y0(hP(e,...t)),divide:(...t)=>y0($F(e,...t)),negate:()=>y0(HF(e)),toString:()=>e.toString()}),{add:UF,subtract:zF,multiply:hP,divide:$F,negate:HF});function M5e(e,t="-"){return e.replace(/\s+/g,t)}function D5e(e){const t=M5e(e.toString());return F5e(j5e(t))}function j5e(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function F5e(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function U5e(e,t=""){return[t,e].filter(Boolean).join("-")}function z5e(e,t){return`var(${e}${t?`, ${t}`:""})`}function $5e(e,t=""){return D5e(`--${U5e(e,t)}`)}function lt(e,t,n){const r=$5e(e,n);return{variable:r,reference:z5e(r,t)}}function H5e(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=lt(`${e}-${i}`,o);continue}n[r]=lt(`${e}-${r}`)}return n}function V5e(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function W5e(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function pP(e){if(e==null)return e;const{unitless:t}=W5e(e);return t||typeof e=="number"?`${e}px`:e}var cte=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,nL=e=>Object.fromEntries(Object.entries(e).sort(cte));function VF(e){const t=nL(e);return Object.assign(Object.values(t),t)}function G5e(e){const t=Object.keys(nL(e));return new Set(t)}function WF(e){var t;if(!e)return e;e=(t=pP(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function Sb(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${pP(e)})`),t&&n.push("and",`(max-width: ${pP(t)})`),n.join(" ")}function K5e(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=VF(e),r=Object.entries(e).sort(cte).map(([s,a],c,u)=>{var l;let[,d]=(l=u[c+1])!=null?l:[];return d=parseFloat(d)>0?WF(d):void 0,{_minW:WF(a),breakpoint:s,minW:a,maxW:d,maxWQuery:Sb(null,d),minWQuery:Sb(a),minMaxQuery:Sb(a,d)}}),i=G5e(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const a=Object.keys(s);return a.length>0&&a.every(c=>i.has(c))},asObject:nL(e),asArray:VF(e),details:r,get(s){return r.find(a=>a.breakpoint===s)},media:[null,...n.map(s=>Sb(s)).slice(1)],toArrayValue(s){if(!zs(s))throw new Error("toArrayValue: value must be an object");const a=o.map(c=>{var u;return(u=s[c])!=null?u:null});for(;V5e(a)===null;)a.pop();return a},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((a,c,u)=>{const l=o[u];return l!=null&&c!=null&&(a[l]=c),a},{})}}}var Fr={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ll=e=>ute(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Zc=e=>ute(t=>e(t,"~ &"),"[data-peer]",".peer"),ute=(e,...t)=>t.map(e).join(", "),X7={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ll(Fr.hover),_peerHover:Zc(Fr.hover),_groupFocus:Ll(Fr.focus),_peerFocus:Zc(Fr.focus),_groupFocusVisible:Ll(Fr.focusVisible),_peerFocusVisible:Zc(Fr.focusVisible),_groupActive:Ll(Fr.active),_peerActive:Zc(Fr.active),_groupDisabled:Ll(Fr.disabled),_peerDisabled:Zc(Fr.disabled),_groupInvalid:Ll(Fr.invalid),_peerInvalid:Zc(Fr.invalid),_groupChecked:Ll(Fr.checked),_peerChecked:Zc(Fr.checked),_groupFocusWithin:Ll(Fr.focusWithin),_peerFocusWithin:Zc(Fr.focusWithin),_peerPlaceholderShown:Zc(Fr.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},lte=Object.keys(X7);function GF(e,t){return lt(String(e).replace(/\./g,"-"),void 0,t)}function Q5e(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:s,value:a}=o,{variable:c,reference:u}=GF(i,t==null?void 0:t.cssVarPrefix);if(!s){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,m=`${h}.-${p.join(".")}`,x=y0.negate(a),y=y0.negate(u);r[m]={value:x,var:c,varRef:y}}n[c]=a,r[i]={value:a,var:c,varRef:u};continue}const l=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:x}=GF(p,t==null?void 0:t.cssVarPrefix);return x},d=zs(a)?a:{default:a};n=Fs(n,Object.entries(d).reduce((f,[h,p])=>{var m,x;if(!p)return f;const y=l(`${p}`);if(h==="default")return f[c]=y,f;const b=(x=(m=X7)==null?void 0:m[h])!=null?x:h;return f[b]={[c]:y},f},{})),r[i]={value:u,var:c,varRef:u}}return{cssVars:n,cssMap:r}}function Y5e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function q5e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Z5e(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function KF(e,t,n={}){const{stop:r,getKey:i}=n;function o(s,a=[]){var c;if(Z5e(s)||Array.isArray(s)){const u={};for(const[l,d]of Object.entries(s)){const f=(c=i==null?void 0:i(l))!=null?c:l,h=[...a,f];if(r!=null&&r(s,h))return t(s,a);u[f]=o(d,h)}return u}return t(s,a)}return o(e)}var J5e=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function X5e(e){return q5e(e,J5e)}function exe(e){return e.semanticTokens}function txe(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var nxe=e=>lte.includes(e)||e==="default";function rxe({tokens:e,semanticTokens:t}){const n={};return KF(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),KF(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(nxe)}),n}function ixe(e){var t;const n=txe(e),r=X5e(n),i=exe(n),o=rxe({tokens:r,semanticTokens:i}),s=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:a,cssVars:c}=Q5e(o,{cssVarPrefix:s});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...c},__cssMap:a,__breakpoints:K5e(n.breakpoints)}),n}var rL=Fs({},a8,en,x5e,Mw,ws,w5e,I5e,E5e,ste,P5e,c3,fP,Ln,B5e,L5e,R5e,N5e,C5e,O5e);Object.assign({},Ln,ws,Mw,ste,c3);var oxe=[...Object.keys(rL),...lte],sxe={...rL,...X7},axe=e=>e in sxe,cxe=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const s in e){let a=Ic(e[s],t);if(a==null)continue;if(a=zs(a)&&n(a)?r(a):a,!Array.isArray(a)){o[s]=a;continue}const c=a.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!lxe(t),fxe=(e,t)=>{var n,r;if(t==null)return t;const i=c=>{var u,l;return(l=(u=e.__cssMap)==null?void 0:u[c])==null?void 0:l.varRef},o=c=>{var u;return(u=i(c))!=null?u:c},[s,a]=uxe(t);return t=(r=(n=i(s))!=null?n:o(a))!=null?r:o(t),t};function hxe(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,s=!1)=>{var a,c,u;const l=Ic(o,r),d=cxe(l)(r);let f={};for(let h in d){const p=d[h];let m=Ic(p,r);h in n&&(h=n[h]),dxe(h,m)&&(m=fxe(r,m));let x=t[h];if(x===!0&&(x={property:h}),zs(m)){f[h]=(a=f[h])!=null?a:{},f[h]=Fs({},f[h],i(m,!0));continue}let y=(u=(c=x==null?void 0:x.transform)==null?void 0:c.call(x,m,r,l))!=null?u:m;y=x!=null&&x.processResult?i(y,!0):y;const b=Ic(x==null?void 0:x.property,r);if(!s&&(x!=null&&x.static)){const v=Ic(x.static,r);f=Fs({},f,v)}if(b&&Array.isArray(b)){for(const v of b)f[v]=y;continue}if(b){b==="&"&&zs(y)?f=Fs({},f,y):f[b]=y;continue}if(zs(y)){f=Fs({},f,y);continue}f[h]=y}return f};return i}var dte=e=>t=>hxe({theme:t,pseudos:X7,configs:rL})(e);function En(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function pxe(e,t){if(Array.isArray(e))return e;if(zs(e))return t(e);if(e!=null)return[e]}function gxe(e,t){for(let n=t+1;n{Fs(u,{[v]:f?b[v]:{[y]:b[v]}})});continue}if(!h){f?Fs(u,b):u[y]=b;continue}u[y]=b}}return u}}function yxe(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,s=mxe(o);return Fs({},Ic((n=e.baseStyle)!=null?n:{},t),s(e,"sizes",i,t),s(e,"variants",r,t))}}function Gi(e){return Y5e(e,["styleConfig","size","variant","colorScheme"])}var bxe=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function vxe(e){return zs(e)?bxe.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var xxe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},wxe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Exe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Cxe={property:xxe,easing:wxe,duration:Exe},Axe=Cxe,Sxe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},kxe=Sxe,Txe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_xe=Txe,Pxe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Ixe=Pxe,Rxe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Nxe=Rxe,Oxe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Lxe=Oxe,Bxe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Mxe=Bxe,Dxe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},jxe=Dxe,Fxe={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},fte=Fxe,hte={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Uxe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},zxe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},$xe={...hte,...Uxe,container:zxe},pte=$xe,Hxe={breakpoints:Ixe,zIndices:kxe,radii:Lxe,blur:jxe,colors:Nxe,...fte,sizes:pte,shadows:Mxe,space:hte,borders:_xe,transition:Axe},{defineMultiStyleConfig:Vxe,definePartsStyle:kb}=En(["stepper","step","title","description","indicator","separator","icon","number"]),Lu=lt("stepper-indicator-size"),a1=lt("stepper-icon-size"),c1=lt("stepper-title-font-size"),Tb=lt("stepper-description-font-size"),Q2=lt("stepper-accent-color"),Wxe=kb(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Q2.variable]:`colors.${e}.500`,_dark:{[Q2.variable]:`colors.${e}.200`}},title:{fontSize:c1.reference,fontWeight:"medium"},description:{fontSize:Tb.reference,color:"chakra-subtle-text"},number:{fontSize:c1.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:a1.reference,height:a1.reference},indicator:{flexShrink:0,borderRadius:"full",width:Lu.reference,height:Lu.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Q2.reference},"&[data-status=complete]":{bg:Q2.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Q2.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${Lu.reference} - 8px)`,top:`calc(${Lu.reference} + 4px)`,insetStart:`calc(${Lu.reference} / 2 - 1px)`}}})),Gxe=Vxe({baseStyle:Wxe,sizes:{xs:kb({stepper:{[Lu.variable]:"sizes.4",[a1.variable]:"sizes.3",[c1.variable]:"fontSizes.xs",[Tb.variable]:"fontSizes.xs"}}),sm:kb({stepper:{[Lu.variable]:"sizes.6",[a1.variable]:"sizes.4",[c1.variable]:"fontSizes.sm",[Tb.variable]:"fontSizes.xs"}}),md:kb({stepper:{[Lu.variable]:"sizes.8",[a1.variable]:"sizes.5",[c1.variable]:"fontSizes.md",[Tb.variable]:"fontSizes.sm"}}),lg:kb({stepper:{[Lu.variable]:"sizes.10",[a1.variable]:"sizes.6",[c1.variable]:"fontSizes.lg",[Tb.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function cn(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...l){r();for(const d of l)t[d]=c(d);return cn(e,t)}function o(...l){for(const d of l)d in t||(t[d]=c(d));return cn(e,t)}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function c(l){const h=`chakra-${(["container","root"].includes(l??"")?[e]:[e,l]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>l}}return{parts:i,toPart:c,extend:o,selectors:s,classnames:a,get keys(){return Object.keys(t)},__type:{}}}var Kxe=cn("accordion").parts("root","container","button","panel").extend("icon"),Qxe=cn("alert").parts("title","description","container").extend("icon","spinner"),Yxe=cn("avatar").parts("label","badge","container").extend("excessLabel","group"),qxe=cn("breadcrumb").parts("link","item","container").extend("separator");cn("button").parts();var Zxe=cn("checkbox").parts("control","icon","container").extend("label");cn("progress").parts("track","filledTrack").extend("label");var Jxe=cn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Xxe=cn("editable").parts("preview","input","textarea"),e6e=cn("form").parts("container","requiredIndicator","helperText"),t6e=cn("formError").parts("text","icon"),gte=cn("input").parts("addon","field","element","group"),n6e=cn("list").parts("container","item","icon"),r6e=cn("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),i6e=cn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),o6e=cn("numberinput").parts("root","field","stepperGroup","stepper");cn("pininput").parts("field");var s6e=cn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),a6e=cn("progress").parts("label","filledTrack","track"),c6e=cn("radio").parts("container","control","label"),u6e=cn("select").parts("field","icon"),l6e=cn("slider").parts("container","track","thumb","filledTrack","mark"),d6e=cn("stat").parts("container","label","helpText","number","icon"),f6e=cn("switch").parts("container","track","thumb","label"),h6e=cn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),p6e=cn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),g6e=cn("tag").parts("container","label","closeButton"),m6e=cn("card").parts("container","header","body","footer");cn("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function P0(e,t,n){return Math.min(Math.max(e,n),t)}class y6e extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var _b=y6e;function iL(e){if(typeof e!="string")throw new _b(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=S6e.test(e)?x6e(e):e;const n=w6e.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(Bv(a,2),16)),parseInt(Bv(s[3]||"f",2),16)/255]}const r=E6e.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const i=C6e.exec(t);if(i){const s=Array.from(i).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const o=A6e.exec(t);if(o){const[s,a,c,u]=Array.from(o).slice(1).map(parseFloat);if(P0(0,100,a)!==a)throw new _b(e);if(P0(0,100,c)!==c)throw new _b(e);return[...k6e(s,a,c),Number.isNaN(u)?1:u]}throw new _b(e)}function b6e(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const QF=e=>parseInt(e.replace(/_/g,""),36),v6e="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=QF(t.substring(0,3)),r=QF(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function x6e(e){const t=e.toLowerCase().trim(),n=v6e[b6e(t)];if(!n)throw new _b(e);return`#${n}`}const Bv=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),w6e=new RegExp(`^#${Bv("([a-f0-9])",3)}([a-f0-9])?$`,"i"),E6e=new RegExp(`^#${Bv("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),C6e=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Bv(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),A6e=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,S6e=/^[a-z]+$/i,YF=e=>Math.round(e*255),k6e=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(YF);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),s=o*(1-Math.abs(i%2-1));let a=0,c=0,u=0;i>=0&&i<1?(a=o,c=s):i>=1&&i<2?(a=s,c=o):i>=2&&i<3?(c=o,u=s):i>=3&&i<4?(c=s,u=o):i>=4&&i<5?(a=s,u=o):i>=5&&i<6&&(a=o,u=s);const l=r-o/2,d=a+l,f=c+l,h=u+l;return[d,f,h].map(YF)};function T6e(e,t,n,r){return`rgba(${P0(0,255,e).toFixed()}, ${P0(0,255,t).toFixed()}, ${P0(0,255,n).toFixed()}, ${parseFloat(P0(0,1,r).toFixed(3))})`}function _6e(e,t){const[n,r,i,o]=iL(e);return T6e(n,r,i,o-t)}function P6e(e){const[t,n,r,i]=iL(e);let o=s=>{const a=P0(0,255,s).toString(16);return a.length===1?`0${a}`:a};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function I6e(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Mi=(e,t,n)=>{const r=I6e(e,`colors.${t}`,t);try{return P6e(r),r}catch{return n??"#000000"}},N6e=e=>{const[t,n,r]=iL(e);return(t*299+n*587+r*114)/1e3},O6e=e=>t=>{const n=Mi(t,e);return N6e(n)<128?"dark":"light"},L6e=e=>t=>O6e(e)(t)==="dark",lm=(e,t)=>n=>{const r=Mi(n,e);return _6e(r,1-t)};function qF(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}var B6e=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function M6e(e){const t=B6e();return!e||R6e(e)?t:e.string&&e.colors?j6e(e.string,e.colors):e.string&&!e.colors?D6e(e.string):e.colors&&!e.string?F6e(e.colors):t}function D6e(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function j6e(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function oL(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function mte(e){return zs(e)&&e.reference?e.reference:String(e)}var eE=(e,...t)=>t.map(mte).join(` ${e} `).replace(/calc/g,""),ZF=(...e)=>`calc(${eE("+",...e)})`,JF=(...e)=>`calc(${eE("-",...e)})`,gP=(...e)=>`calc(${eE("*",...e)})`,XF=(...e)=>`calc(${eE("/",...e)})`,eU=e=>{const t=mte(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:gP(t,-1)},Bu=Object.assign(e=>({add:(...t)=>Bu(ZF(e,...t)),subtract:(...t)=>Bu(JF(e,...t)),multiply:(...t)=>Bu(gP(e,...t)),divide:(...t)=>Bu(XF(e,...t)),negate:()=>Bu(eU(e)),toString:()=>e.toString()}),{add:ZF,subtract:JF,multiply:gP,divide:XF,negate:eU});function U6e(e){return!Number.isInteger(parseFloat(e.toString()))}function z6e(e,t="-"){return e.replace(/\s+/g,t)}function yte(e){const t=z6e(e.toString());return t.includes("\\.")?e:U6e(e)?t.replace(".","\\."):e}function $6e(e,t=""){return[t,yte(e)].filter(Boolean).join("-")}function H6e(e,t){return`var(${yte(e)}${t?`, ${t}`:""})`}function V6e(e,t=""){return`--${$6e(e,t)}`}function kr(e,t){const n=V6e(e,void 0);return{variable:n,reference:H6e(n,W6e(void 0))}}function W6e(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:G6e,definePartsStyle:c8}=En(f6e.keys),u3=kr("switch-track-width"),gh=kr("switch-track-height"),XA=kr("switch-track-diff"),K6e=Bu.subtract(u3,gh),mP=kr("switch-thumb-x"),Y2=kr("switch-bg"),Q6e=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[u3.reference],height:[gh.reference],transitionProperty:"common",transitionDuration:"fast",[Y2.variable]:"colors.gray.300",_dark:{[Y2.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Y2.variable]:`colors.${t}.500`,_dark:{[Y2.variable]:`colors.${t}.200`}},bg:Y2.reference}},Y6e={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[gh.reference],height:[gh.reference],_checked:{transform:`translateX(${mP.reference})`}},q6e=c8(e=>({container:{[XA.variable]:K6e,[mP.variable]:XA.reference,_rtl:{[mP.variable]:Bu(XA).negate().toString()}},track:Q6e(e),thumb:Y6e})),Z6e={sm:c8({container:{[u3.variable]:"1.375rem",[gh.variable]:"sizes.3"}}),md:c8({container:{[u3.variable]:"1.875rem",[gh.variable]:"sizes.4"}}),lg:c8({container:{[u3.variable]:"2.875rem",[gh.variable]:"sizes.6"}})},J6e=G6e({baseStyle:q6e,sizes:Z6e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:X6e,definePartsStyle:F1}=En(h6e.keys),e8e=F1({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Dw={"&[data-is-numeric=true]":{textAlign:"end"}},t8e=F1(e=>{const{colorScheme:t}=e;return{th:{color:ut("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ut(`${t}.100`,`${t}.700`)(e),...Dw},td:{borderBottom:"1px",borderColor:ut(`${t}.100`,`${t}.700`)(e),...Dw},caption:{color:ut("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),n8e=F1(e=>{const{colorScheme:t}=e;return{th:{color:ut("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ut(`${t}.100`,`${t}.700`)(e),...Dw},td:{borderBottom:"1px",borderColor:ut(`${t}.100`,`${t}.700`)(e),...Dw},caption:{color:ut("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:ut(`${t}.100`,`${t}.700`)(e)},td:{background:ut(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),r8e={simple:t8e,striped:n8e,unstyled:{}},i8e={sm:F1({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:F1({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:F1({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},o8e=X6e({baseStyle:e8e,variants:r8e,sizes:i8e,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),io=lt("tabs-color"),Ia=lt("tabs-bg"),Ux=lt("tabs-border-color"),{defineMultiStyleConfig:s8e,definePartsStyle:Dc}=En(p6e.keys),a8e=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},c8e=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},u8e=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},l8e={p:4},d8e=Dc(e=>({root:a8e(e),tab:c8e(e),tablist:u8e(e),tabpanel:l8e})),f8e={sm:Dc({tab:{py:1,px:4,fontSize:"sm"}}),md:Dc({tab:{fontSize:"md",py:2,px:4}}),lg:Dc({tab:{fontSize:"lg",py:3,px:4}})},h8e=Dc(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[io.variable]:`colors.${t}.600`,_dark:{[io.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ia.variable]:"colors.gray.200",_dark:{[Ia.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:io.reference,bg:Ia.reference}}}),p8e=Dc(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ux.variable]:"transparent",_selected:{[io.variable]:`colors.${t}.600`,[Ux.variable]:"colors.white",_dark:{[io.variable]:`colors.${t}.300`,[Ux.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ux.reference},color:io.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),g8e=Dc(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ia.variable]:"colors.gray.50",_dark:{[Ia.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ia.variable]:"colors.white",[io.variable]:`colors.${t}.600`,_dark:{[Ia.variable]:"colors.gray.800",[io.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:io.reference,bg:Ia.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),m8e=Dc(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Mi(n,`${t}.700`),bg:Mi(n,`${t}.100`)}}}}),y8e=Dc(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[io.variable]:"colors.gray.600",_dark:{[io.variable]:"inherit"},_selected:{[io.variable]:"colors.white",[Ia.variable]:`colors.${t}.600`,_dark:{[io.variable]:"colors.gray.800",[Ia.variable]:`colors.${t}.300`}},color:io.reference,bg:Ia.reference}}}),b8e=Dc({}),v8e={line:h8e,enclosed:p8e,"enclosed-colored":g8e,"soft-rounded":m8e,"solid-rounded":y8e,unstyled:b8e},x8e=s8e({baseStyle:d8e,sizes:f8e,variants:v8e,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),hr=H5e("badge",["bg","color","shadow"]),w8e={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:hr.bg.reference,color:hr.color.reference,boxShadow:hr.shadow.reference},E8e=e=>{const{colorScheme:t,theme:n}=e,r=lm(`${t}.500`,.6)(n);return{[hr.bg.variable]:`colors.${t}.500`,[hr.color.variable]:"colors.white",_dark:{[hr.bg.variable]:r,[hr.color.variable]:"colors.whiteAlpha.800"}}},C8e=e=>{const{colorScheme:t,theme:n}=e,r=lm(`${t}.200`,.16)(n);return{[hr.bg.variable]:`colors.${t}.100`,[hr.color.variable]:`colors.${t}.800`,_dark:{[hr.bg.variable]:r,[hr.color.variable]:`colors.${t}.200`}}},A8e=e=>{const{colorScheme:t,theme:n}=e,r=lm(`${t}.200`,.8)(n);return{[hr.color.variable]:`colors.${t}.500`,_dark:{[hr.color.variable]:r},[hr.shadow.variable]:`inset 0 0 0px 1px ${hr.color.reference}`}},S8e={solid:E8e,subtle:C8e,outline:A8e},l3={baseStyle:w8e,variants:S8e,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:k8e,definePartsStyle:mh}=En(g6e.keys),tU=lt("tag-bg"),nU=lt("tag-color"),eS=lt("tag-shadow"),u8=lt("tag-min-height"),l8=lt("tag-min-width"),d8=lt("tag-font-size"),f8=lt("tag-padding-inline"),T8e={fontWeight:"medium",lineHeight:1.2,outline:0,[nU.variable]:hr.color.reference,[tU.variable]:hr.bg.reference,[eS.variable]:hr.shadow.reference,color:nU.reference,bg:tU.reference,boxShadow:eS.reference,borderRadius:"md",minH:u8.reference,minW:l8.reference,fontSize:d8.reference,px:f8.reference,_focusVisible:{[eS.variable]:"shadows.outline"}},_8e={lineHeight:1.2,overflow:"visible"},P8e={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},I8e=mh({container:T8e,label:_8e,closeButton:P8e}),R8e={sm:mh({container:{[u8.variable]:"sizes.5",[l8.variable]:"sizes.5",[d8.variable]:"fontSizes.xs",[f8.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:mh({container:{[u8.variable]:"sizes.6",[l8.variable]:"sizes.6",[d8.variable]:"fontSizes.sm",[f8.variable]:"space.2"}}),lg:mh({container:{[u8.variable]:"sizes.8",[l8.variable]:"sizes.8",[d8.variable]:"fontSizes.md",[f8.variable]:"space.3"}})},N8e={subtle:mh(e=>{var t;return{container:(t=l3.variants)==null?void 0:t.subtle(e)}}),solid:mh(e=>{var t;return{container:(t=l3.variants)==null?void 0:t.solid(e)}}),outline:mh(e=>{var t;return{container:(t=l3.variants)==null?void 0:t.outline(e)}})},O8e=k8e({variants:N8e,baseStyle:I8e,sizes:R8e,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:Uu,defineMultiStyleConfig:L8e}=En(gte.keys),u1=lt("input-height"),l1=lt("input-font-size"),d1=lt("input-padding"),f1=lt("input-border-radius"),B8e=Uu({addon:{height:u1.reference,fontSize:l1.reference,px:d1.reference,borderRadius:f1.reference},field:{width:"100%",height:u1.reference,fontSize:l1.reference,px:d1.reference,borderRadius:f1.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Bl={lg:{[l1.variable]:"fontSizes.lg",[d1.variable]:"space.4",[f1.variable]:"radii.md",[u1.variable]:"sizes.12"},md:{[l1.variable]:"fontSizes.md",[d1.variable]:"space.4",[f1.variable]:"radii.md",[u1.variable]:"sizes.10"},sm:{[l1.variable]:"fontSizes.sm",[d1.variable]:"space.3",[f1.variable]:"radii.sm",[u1.variable]:"sizes.8"},xs:{[l1.variable]:"fontSizes.xs",[d1.variable]:"space.2",[f1.variable]:"radii.sm",[u1.variable]:"sizes.6"}},M8e={lg:Uu({field:Bl.lg,group:Bl.lg}),md:Uu({field:Bl.md,group:Bl.md}),sm:Uu({field:Bl.sm,group:Bl.sm}),xs:Uu({field:Bl.xs,group:Bl.xs})};function sL(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||ut("blue.500","blue.300")(e),errorBorderColor:n||ut("red.500","red.300")(e)}}var D8e=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=sL(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:ut("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Mi(t,r),boxShadow:`0 0 0 1px ${Mi(t,r)}`},_focusVisible:{zIndex:1,borderColor:Mi(t,n),boxShadow:`0 0 0 1px ${Mi(t,n)}`}},addon:{border:"1px solid",borderColor:ut("inherit","whiteAlpha.50")(e),bg:ut("gray.100","whiteAlpha.300")(e)}}}),j8e=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=sL(e);return{field:{border:"2px solid",borderColor:"transparent",bg:ut("gray.100","whiteAlpha.50")(e),_hover:{bg:ut("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Mi(t,r)},_focusVisible:{bg:"transparent",borderColor:Mi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:ut("gray.100","whiteAlpha.50")(e)}}}),F8e=Uu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=sL(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Mi(t,r),boxShadow:`0px 1px 0px 0px ${Mi(t,r)}`},_focusVisible:{borderColor:Mi(t,n),boxShadow:`0px 1px 0px 0px ${Mi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),U8e=Uu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),z8e={outline:D8e,filled:j8e,flushed:F8e,unstyled:U8e},on=L8e({baseStyle:B8e,sizes:M8e,variants:z8e,defaultProps:{size:"md",variant:"outline"}}),rU,$8e={...(rU=on.baseStyle)==null?void 0:rU.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},iU,oU,H8e={outline:e=>{var t,n;return(n=(t=on.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=on.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=on.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(oU=(iU=on.variants)==null?void 0:iU.unstyled.field)!=null?oU:{}},sU,aU,cU,uU,lU,dU,fU,hU,V8e={xs:(aU=(sU=on.sizes)==null?void 0:sU.xs.field)!=null?aU:{},sm:(uU=(cU=on.sizes)==null?void 0:cU.sm.field)!=null?uU:{},md:(dU=(lU=on.sizes)==null?void 0:lU.md.field)!=null?dU:{},lg:(hU=(fU=on.sizes)==null?void 0:fU.lg.field)!=null?hU:{}},W8e={baseStyle:$8e,sizes:V8e,variants:H8e,defaultProps:{size:"md",variant:"outline"}},zx=kr("tooltip-bg"),tS=kr("tooltip-fg"),G8e=kr("popper-arrow-bg"),K8e={bg:zx.reference,color:tS.reference,[zx.variable]:"colors.gray.700",[tS.variable]:"colors.whiteAlpha.900",_dark:{[zx.variable]:"colors.gray.300",[tS.variable]:"colors.gray.900"},[G8e.variable]:zx.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Q8e={baseStyle:K8e},{defineMultiStyleConfig:Y8e,definePartsStyle:Pb}=En(a6e.keys),q8e=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=ut(qF(),qF("1rem","rgba(0,0,0,0.1)"))(e),s=ut(`${t}.500`,`${t}.200`)(e),a=`linear-gradient( + to right, + transparent 0%, + ${Mi(n,s)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:a}:{bgColor:s}}},Z8e={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},J8e=e=>({bg:ut("gray.100","whiteAlpha.300")(e)}),X8e=e=>({transitionProperty:"common",transitionDuration:"slow",...q8e(e)}),ewe=Pb(e=>({label:Z8e,filledTrack:X8e(e),track:J8e(e)})),twe={xs:Pb({track:{h:"1"}}),sm:Pb({track:{h:"2"}}),md:Pb({track:{h:"3"}}),lg:Pb({track:{h:"4"}})},nwe=Y8e({sizes:twe,baseStyle:ewe,defaultProps:{size:"md",colorScheme:"blue"}}),rwe=e=>typeof e=="function";function zi(e,...t){return rwe(e)?e(...t):e}var{definePartsStyle:h8,defineMultiStyleConfig:iwe}=En(Zxe.keys),d3=lt("checkbox-size"),owe=e=>{const{colorScheme:t}=e;return{w:d3.reference,h:d3.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:ut(`${t}.500`,`${t}.200`)(e),borderColor:ut(`${t}.500`,`${t}.200`)(e),color:ut("white","gray.900")(e),_hover:{bg:ut(`${t}.600`,`${t}.300`)(e),borderColor:ut(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:ut("gray.200","transparent")(e),bg:ut("gray.200","whiteAlpha.300")(e),color:ut("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:ut(`${t}.500`,`${t}.200`)(e),borderColor:ut(`${t}.500`,`${t}.200`)(e),color:ut("white","gray.900")(e)},_disabled:{bg:ut("gray.100","whiteAlpha.100")(e),borderColor:ut("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:ut("red.500","red.300")(e)}}},swe={_disabled:{cursor:"not-allowed"}},awe={userSelect:"none",_disabled:{opacity:.4}},cwe={transitionProperty:"transform",transitionDuration:"normal"},uwe=h8(e=>({icon:cwe,container:swe,control:zi(owe,e),label:awe})),lwe={sm:h8({control:{[d3.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:h8({control:{[d3.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:h8({control:{[d3.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},jw=iwe({baseStyle:uwe,sizes:lwe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:dwe,definePartsStyle:p8}=En(c6e.keys),fwe=e=>{var t;const n=(t=zi(jw.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},hwe=p8(e=>{var t,n,r,i;return{label:(n=(t=jw).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=jw).baseStyle)==null?void 0:i.call(r,e).container,control:fwe(e)}}),pwe={md:p8({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:p8({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:p8({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},gwe=dwe({baseStyle:hwe,sizes:pwe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:mwe,definePartsStyle:ywe}=En(u6e.keys),$x=lt("select-bg"),pU,bwe={...(pU=on.baseStyle)==null?void 0:pU.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:$x.reference,[$x.variable]:"colors.white",_dark:{[$x.variable]:"colors.gray.700"},"> option, > optgroup":{bg:$x.reference}},vwe={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},xwe=ywe({field:bwe,icon:vwe}),Hx={paddingInlineEnd:"8"},gU,mU,yU,bU,vU,xU,wU,EU,wwe={lg:{...(gU=on.sizes)==null?void 0:gU.lg,field:{...(mU=on.sizes)==null?void 0:mU.lg.field,...Hx}},md:{...(yU=on.sizes)==null?void 0:yU.md,field:{...(bU=on.sizes)==null?void 0:bU.md.field,...Hx}},sm:{...(vU=on.sizes)==null?void 0:vU.sm,field:{...(xU=on.sizes)==null?void 0:xU.sm.field,...Hx}},xs:{...(wU=on.sizes)==null?void 0:wU.xs,field:{...(EU=on.sizes)==null?void 0:EU.xs.field,...Hx},icon:{insetEnd:"1"}}},Ewe=mwe({baseStyle:xwe,sizes:wwe,variants:on.variants,defaultProps:on.defaultProps}),nS=lt("skeleton-start-color"),rS=lt("skeleton-end-color"),Cwe={[nS.variable]:"colors.gray.100",[rS.variable]:"colors.gray.400",_dark:{[nS.variable]:"colors.gray.800",[rS.variable]:"colors.gray.600"},background:nS.reference,borderColor:rS.reference,opacity:.7,borderRadius:"sm"},Awe={baseStyle:Cwe},iS=lt("skip-link-bg"),Swe={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[iS.variable]:"colors.white",_dark:{[iS.variable]:"colors.gray.700"},bg:iS.reference}},kwe={baseStyle:Swe},{defineMultiStyleConfig:Twe,definePartsStyle:tE}=En(l6e.keys),Mv=lt("slider-thumb-size"),Dv=lt("slider-track-size"),fd=lt("slider-bg"),_we=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...oL({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Pwe=e=>({...oL({orientation:e.orientation,horizontal:{h:Dv.reference},vertical:{w:Dv.reference}}),overflow:"hidden",borderRadius:"sm",[fd.variable]:"colors.gray.200",_dark:{[fd.variable]:"colors.whiteAlpha.200"},_disabled:{[fd.variable]:"colors.gray.300",_dark:{[fd.variable]:"colors.whiteAlpha.300"}},bg:fd.reference}),Iwe=e=>{const{orientation:t}=e;return{...oL({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Mv.reference,h:Mv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},Rwe=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[fd.variable]:`colors.${t}.500`,_dark:{[fd.variable]:`colors.${t}.200`},bg:fd.reference}},Nwe=tE(e=>({container:_we(e),track:Pwe(e),thumb:Iwe(e),filledTrack:Rwe(e)})),Owe=tE({container:{[Mv.variable]:"sizes.4",[Dv.variable]:"sizes.1"}}),Lwe=tE({container:{[Mv.variable]:"sizes.3.5",[Dv.variable]:"sizes.1"}}),Bwe=tE({container:{[Mv.variable]:"sizes.2.5",[Dv.variable]:"sizes.0.5"}}),Mwe={lg:Owe,md:Lwe,sm:Bwe},Dwe=Twe({baseStyle:Nwe,sizes:Mwe,defaultProps:{size:"md",colorScheme:"blue"}}),b0=kr("spinner-size"),jwe={width:[b0.reference],height:[b0.reference]},Fwe={xs:{[b0.variable]:"sizes.3"},sm:{[b0.variable]:"sizes.4"},md:{[b0.variable]:"sizes.6"},lg:{[b0.variable]:"sizes.8"},xl:{[b0.variable]:"sizes.12"}},Uwe={baseStyle:jwe,sizes:Fwe,defaultProps:{size:"md"}},{defineMultiStyleConfig:zwe,definePartsStyle:bte}=En(d6e.keys),$we={fontWeight:"medium"},Hwe={opacity:.8,marginBottom:"2"},Vwe={verticalAlign:"baseline",fontWeight:"semibold"},Wwe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Gwe=bte({container:{},label:$we,helpText:Hwe,number:Vwe,icon:Wwe}),Kwe={md:bte({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Qwe=zwe({baseStyle:Gwe,sizes:Kwe,defaultProps:{size:"md"}}),oS=lt("kbd-bg"),Ywe={[oS.variable]:"colors.gray.100",_dark:{[oS.variable]:"colors.whiteAlpha.100"},bg:oS.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},qwe={baseStyle:Ywe},Zwe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Jwe={baseStyle:Zwe},{defineMultiStyleConfig:Xwe,definePartsStyle:e9e}=En(n6e.keys),t9e={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},n9e=e9e({icon:t9e}),r9e=Xwe({baseStyle:n9e}),{defineMultiStyleConfig:i9e,definePartsStyle:o9e}=En(r6e.keys),ac=lt("menu-bg"),sS=lt("menu-shadow"),s9e={[ac.variable]:"#fff",[sS.variable]:"shadows.sm",_dark:{[ac.variable]:"colors.gray.700",[sS.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:ac.reference,boxShadow:sS.reference},a9e={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[ac.variable]:"colors.gray.100",_dark:{[ac.variable]:"colors.whiteAlpha.100"}},_active:{[ac.variable]:"colors.gray.200",_dark:{[ac.variable]:"colors.whiteAlpha.200"}},_expanded:{[ac.variable]:"colors.gray.100",_dark:{[ac.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:ac.reference},c9e={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},u9e={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},l9e={opacity:.6},d9e={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},f9e={transitionProperty:"common",transitionDuration:"normal"},h9e=o9e({button:f9e,list:s9e,item:a9e,groupTitle:c9e,icon:u9e,command:l9e,divider:d9e}),p9e=i9e({baseStyle:h9e}),{defineMultiStyleConfig:g9e,definePartsStyle:yP}=En(i6e.keys),aS=lt("modal-bg"),cS=lt("modal-shadow"),m9e={bg:"blackAlpha.600",zIndex:"modal"},y9e=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},b9e=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[aS.variable]:"colors.white",[cS.variable]:"shadows.lg",_dark:{[aS.variable]:"colors.gray.700",[cS.variable]:"shadows.dark-lg"},bg:aS.reference,boxShadow:cS.reference}},v9e={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},x9e={position:"absolute",top:"2",insetEnd:"3"},w9e=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},E9e={px:"6",py:"4"},C9e=yP(e=>({overlay:m9e,dialogContainer:zi(y9e,e),dialog:zi(b9e,e),header:v9e,closeButton:x9e,body:zi(w9e,e),footer:E9e}));function ra(e){return yP(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var A9e={xs:ra("xs"),sm:ra("sm"),md:ra("md"),lg:ra("lg"),xl:ra("xl"),"2xl":ra("2xl"),"3xl":ra("3xl"),"4xl":ra("4xl"),"5xl":ra("5xl"),"6xl":ra("6xl"),full:ra("full")},S9e=g9e({baseStyle:C9e,sizes:A9e,defaultProps:{size:"md"}}),{defineMultiStyleConfig:k9e,definePartsStyle:vte}=En(o6e.keys),aL=kr("number-input-stepper-width"),xte=kr("number-input-input-padding"),T9e=Bu(aL).add("0.5rem").toString(),uS=kr("number-input-bg"),lS=kr("number-input-color"),dS=kr("number-input-border-color"),_9e={[aL.variable]:"sizes.6",[xte.variable]:T9e},P9e=e=>{var t,n;return(n=(t=zi(on.baseStyle,e))==null?void 0:t.field)!=null?n:{}},I9e={width:aL.reference},R9e={borderStart:"1px solid",borderStartColor:dS.reference,color:lS.reference,bg:uS.reference,[lS.variable]:"colors.chakra-body-text",[dS.variable]:"colors.chakra-border-color",_dark:{[lS.variable]:"colors.whiteAlpha.800",[dS.variable]:"colors.whiteAlpha.300"},_active:{[uS.variable]:"colors.gray.200",_dark:{[uS.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},N9e=vte(e=>{var t;return{root:_9e,field:(t=zi(P9e,e))!=null?t:{},stepperGroup:I9e,stepper:R9e}});function Vx(e){var t,n,r;const i=(t=on.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",a=fte.fontSizes[s];return vte({field:{...i.field,paddingInlineEnd:xte.reference,verticalAlign:"top"},stepper:{fontSize:Bu(a).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var O9e={xs:Vx("xs"),sm:Vx("sm"),md:Vx("md"),lg:Vx("lg")},L9e=k9e({baseStyle:N9e,sizes:O9e,variants:on.variants,defaultProps:on.defaultProps}),CU,B9e={...(CU=on.baseStyle)==null?void 0:CU.field,textAlign:"center"},M9e={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},AU,SU,D9e={outline:e=>{var t,n,r;return(r=(n=zi((t=on.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=zi((t=on.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=zi((t=on.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(SU=(AU=on.variants)==null?void 0:AU.unstyled.field)!=null?SU:{}},j9e={baseStyle:B9e,sizes:M9e,variants:D9e,defaultProps:on.defaultProps},{defineMultiStyleConfig:F9e,definePartsStyle:U9e}=En(s6e.keys),Wx=kr("popper-bg"),z9e=kr("popper-arrow-bg"),kU=kr("popper-arrow-shadow-color"),$9e={zIndex:10},H9e={[Wx.variable]:"colors.white",bg:Wx.reference,[z9e.variable]:Wx.reference,[kU.variable]:"colors.gray.200",_dark:{[Wx.variable]:"colors.gray.700",[kU.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},V9e={px:3,py:2,borderBottomWidth:"1px"},W9e={px:3,py:2},G9e={px:3,py:2,borderTopWidth:"1px"},K9e={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Q9e=U9e({popper:$9e,content:H9e,header:V9e,body:W9e,footer:G9e,closeButton:K9e}),Y9e=F9e({baseStyle:Q9e}),{definePartsStyle:bP,defineMultiStyleConfig:q9e}=En(Jxe.keys),fS=lt("drawer-bg"),hS=lt("drawer-box-shadow");function vp(e){return bP(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Z9e={bg:"blackAlpha.600",zIndex:"modal"},J9e={display:"flex",zIndex:"modal",justifyContent:"center"},X9e=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[fS.variable]:"colors.white",[hS.variable]:"shadows.lg",_dark:{[fS.variable]:"colors.gray.700",[hS.variable]:"shadows.dark-lg"},bg:fS.reference,boxShadow:hS.reference}},e7e={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},t7e={position:"absolute",top:"2",insetEnd:"3"},n7e={px:"6",py:"2",flex:"1",overflow:"auto"},r7e={px:"6",py:"4"},i7e=bP(e=>({overlay:Z9e,dialogContainer:J9e,dialog:zi(X9e,e),header:e7e,closeButton:t7e,body:n7e,footer:r7e})),o7e={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},s7e=q9e({baseStyle:i7e,sizes:o7e,defaultProps:{size:"xs"}}),{definePartsStyle:a7e,defineMultiStyleConfig:c7e}=En(Xxe.keys),u7e={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},l7e={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},d7e={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},f7e=a7e({preview:u7e,input:l7e,textarea:d7e}),h7e=c7e({baseStyle:f7e}),{definePartsStyle:p7e,defineMultiStyleConfig:g7e}=En(e6e.keys),U1=lt("form-control-color"),m7e={marginStart:"1",[U1.variable]:"colors.red.500",_dark:{[U1.variable]:"colors.red.300"},color:U1.reference},y7e={mt:"2",[U1.variable]:"colors.gray.600",_dark:{[U1.variable]:"colors.whiteAlpha.600"},color:U1.reference,lineHeight:"normal",fontSize:"sm"},b7e=p7e({container:{width:"100%",position:"relative"},requiredIndicator:m7e,helperText:y7e}),v7e=g7e({baseStyle:b7e}),{definePartsStyle:x7e,defineMultiStyleConfig:w7e}=En(t6e.keys),z1=lt("form-error-color"),E7e={[z1.variable]:"colors.red.500",_dark:{[z1.variable]:"colors.red.300"},color:z1.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},C7e={marginEnd:"0.5em",[z1.variable]:"colors.red.500",_dark:{[z1.variable]:"colors.red.300"},color:z1.reference},A7e=x7e({text:E7e,icon:C7e}),S7e=w7e({baseStyle:A7e}),k7e={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},T7e={baseStyle:k7e},_7e={fontFamily:"heading",fontWeight:"bold"},P7e={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},I7e={baseStyle:_7e,sizes:P7e,defaultProps:{size:"xl"}},{defineMultiStyleConfig:R7e,definePartsStyle:N7e}=En(qxe.keys),pS=lt("breadcrumb-link-decor"),O7e={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:pS.reference,[pS.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[pS.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},L7e=N7e({link:O7e}),B7e=R7e({baseStyle:L7e}),M7e={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},wte=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:ut("gray.800","whiteAlpha.900")(e),_hover:{bg:ut("gray.100","whiteAlpha.200")(e)},_active:{bg:ut("gray.200","whiteAlpha.300")(e)}};const r=lm(`${t}.200`,.12)(n),i=lm(`${t}.200`,.24)(n);return{color:ut(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:ut(`${t}.50`,r)(e)},_active:{bg:ut(`${t}.100`,i)(e)}}},D7e=e=>{const{colorScheme:t}=e,n=ut("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...zi(wte,e)}},j7e={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},F7e=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const c=ut("gray.100","whiteAlpha.200")(e);return{bg:c,color:ut("gray.800","whiteAlpha.900")(e),_hover:{bg:ut("gray.200","whiteAlpha.300")(e),_disabled:{bg:c}},_active:{bg:ut("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:s=`${n}.700`}=(t=j7e[n])!=null?t:{},a=ut(r,`${n}.200`)(e);return{bg:a,color:ut(i,"gray.800")(e),_hover:{bg:ut(o,`${n}.300`)(e),_disabled:{bg:a}},_active:{bg:ut(s,`${n}.400`)(e)}}},U7e=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:ut(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:ut(`${t}.700`,`${t}.500`)(e)}}},z7e={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},$7e={ghost:wte,outline:D7e,solid:F7e,link:U7e,unstyled:z7e},H7e={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},V7e={baseStyle:M7e,variants:$7e,sizes:H7e,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:yh,defineMultiStyleConfig:W7e}=En(m6e.keys),Fw=lt("card-bg"),Gu=lt("card-padding"),Ete=lt("card-shadow"),g8=lt("card-radius"),Cte=lt("card-border-width","0"),Ate=lt("card-border-color"),G7e=yh({container:{[Fw.variable]:"colors.chakra-body-bg",backgroundColor:Fw.reference,boxShadow:Ete.reference,borderRadius:g8.reference,color:"chakra-body-text",borderWidth:Cte.reference,borderColor:Ate.reference},body:{padding:Gu.reference,flex:"1 1 0%"},header:{padding:Gu.reference},footer:{padding:Gu.reference}}),K7e={sm:yh({container:{[g8.variable]:"radii.base",[Gu.variable]:"space.3"}}),md:yh({container:{[g8.variable]:"radii.md",[Gu.variable]:"space.5"}}),lg:yh({container:{[g8.variable]:"radii.xl",[Gu.variable]:"space.7"}})},Q7e={elevated:yh({container:{[Ete.variable]:"shadows.base",_dark:{[Fw.variable]:"colors.gray.700"}}}),outline:yh({container:{[Cte.variable]:"1px",[Ate.variable]:"colors.chakra-border-color"}}),filled:yh({container:{[Fw.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Gu.variable]:0},header:{[Gu.variable]:0},footer:{[Gu.variable]:0}}},Y7e=W7e({baseStyle:G7e,variants:Q7e,sizes:K7e,defaultProps:{variant:"elevated",size:"md"}}),f3=kr("close-button-size"),q2=kr("close-button-bg"),q7e={w:[f3.reference],h:[f3.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[q2.variable]:"colors.blackAlpha.100",_dark:{[q2.variable]:"colors.whiteAlpha.100"}},_active:{[q2.variable]:"colors.blackAlpha.200",_dark:{[q2.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:q2.reference},Z7e={lg:{[f3.variable]:"sizes.10",fontSize:"md"},md:{[f3.variable]:"sizes.8",fontSize:"xs"},sm:{[f3.variable]:"sizes.6",fontSize:"2xs"}},J7e={baseStyle:q7e,sizes:Z7e,defaultProps:{size:"md"}},{variants:X7e,defaultProps:eEe}=l3,tEe={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:hr.bg.reference,color:hr.color.reference,boxShadow:hr.shadow.reference},nEe={baseStyle:tEe,variants:X7e,defaultProps:eEe},rEe={w:"100%",mx:"auto",maxW:"prose",px:"4"},iEe={baseStyle:rEe},oEe={opacity:.6,borderColor:"inherit"},sEe={borderStyle:"solid"},aEe={borderStyle:"dashed"},cEe={solid:sEe,dashed:aEe},uEe={baseStyle:oEe,variants:cEe,defaultProps:{variant:"solid"}},{definePartsStyle:lEe,defineMultiStyleConfig:dEe}=En(Kxe.keys),fEe={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},hEe={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},pEe={pt:"2",px:"4",pb:"5"},gEe={fontSize:"1.25em"},mEe=lEe({container:fEe,button:hEe,panel:pEe,icon:gEe}),yEe=dEe({baseStyle:mEe}),{definePartsStyle:s5,defineMultiStyleConfig:bEe}=En(Qxe.keys),Vo=lt("alert-fg"),cl=lt("alert-bg"),vEe=s5({container:{bg:cl.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Vo.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Vo.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function cL(e){const{theme:t,colorScheme:n}=e,r=lm(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var xEe=s5(e=>{const{colorScheme:t}=e,n=cL(e);return{container:{[Vo.variable]:`colors.${t}.600`,[cl.variable]:n.light,_dark:{[Vo.variable]:`colors.${t}.200`,[cl.variable]:n.dark}}}}),wEe=s5(e=>{const{colorScheme:t}=e,n=cL(e);return{container:{[Vo.variable]:`colors.${t}.600`,[cl.variable]:n.light,_dark:{[Vo.variable]:`colors.${t}.200`,[cl.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Vo.reference}}}),EEe=s5(e=>{const{colorScheme:t}=e,n=cL(e);return{container:{[Vo.variable]:`colors.${t}.600`,[cl.variable]:n.light,_dark:{[Vo.variable]:`colors.${t}.200`,[cl.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Vo.reference}}}),CEe=s5(e=>{const{colorScheme:t}=e;return{container:{[Vo.variable]:"colors.white",[cl.variable]:`colors.${t}.600`,_dark:{[Vo.variable]:"colors.gray.900",[cl.variable]:`colors.${t}.200`},color:Vo.reference}}}),AEe={subtle:xEe,"left-accent":wEe,"top-accent":EEe,solid:CEe},SEe=bEe({baseStyle:vEe,variants:AEe,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:Ste,defineMultiStyleConfig:kEe}=En(Yxe.keys),$1=lt("avatar-border-color"),h3=lt("avatar-bg"),jv=lt("avatar-font-size"),dm=lt("avatar-size"),TEe={borderRadius:"full",border:"0.2em solid",borderColor:$1.reference,[$1.variable]:"white",_dark:{[$1.variable]:"colors.gray.800"}},_Ee={bg:h3.reference,fontSize:jv.reference,width:dm.reference,height:dm.reference,lineHeight:"1",[h3.variable]:"colors.gray.200",_dark:{[h3.variable]:"colors.whiteAlpha.400"}},PEe=e=>{const{name:t,theme:n}=e,r=t?M6e({string:t}):"colors.gray.400",i=L6e(r)(n);let o="white";return i||(o="gray.800"),{bg:h3.reference,fontSize:jv.reference,color:o,borderColor:$1.reference,verticalAlign:"top",width:dm.reference,height:dm.reference,"&:not([data-loaded])":{[h3.variable]:r},[$1.variable]:"colors.white",_dark:{[$1.variable]:"colors.gray.800"}}},IEe={fontSize:jv.reference,lineHeight:"1"},REe=Ste(e=>({badge:zi(TEe,e),excessLabel:zi(_Ee,e),container:zi(PEe,e),label:IEe}));function Ml(e){const t=e!=="100%"?pte[e]:void 0;return Ste({container:{[dm.variable]:t??e,[jv.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[dm.variable]:t??e,[jv.variable]:`calc(${t??e} / 2.5)`}})}var NEe={"2xs":Ml(4),xs:Ml(6),sm:Ml(8),md:Ml(12),lg:Ml(16),xl:Ml(24),"2xl":Ml(32),full:Ml("100%")},OEe=kEe({baseStyle:REe,sizes:NEe,defaultProps:{size:"md"}}),LEe={Accordion:yEe,Alert:SEe,Avatar:OEe,Badge:l3,Breadcrumb:B7e,Button:V7e,Checkbox:jw,CloseButton:J7e,Code:nEe,Container:iEe,Divider:uEe,Drawer:s7e,Editable:h7e,Form:v7e,FormError:S7e,FormLabel:T7e,Heading:I7e,Input:on,Kbd:qwe,Link:Jwe,List:r9e,Menu:p9e,Modal:S9e,NumberInput:L9e,PinInput:j9e,Popover:Y9e,Progress:nwe,Radio:gwe,Select:Ewe,Skeleton:Awe,SkipLink:kwe,Slider:Dwe,Spinner:Uwe,Stat:Qwe,Switch:J6e,Table:o8e,Tabs:x8e,Tag:O8e,Textarea:W8e,Tooltip:Q8e,Card:Y7e,Stepper:Gxe},BEe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},MEe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},DEe="ltr",jEe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},kte={semanticTokens:BEe,direction:DEe,...Hxe,components:LEe,styles:MEe,config:jEe};function Ib(e){return typeof e=="function"}function FEe(...e){return t=>e.reduce((n,r)=>r(n),t)}var UEe=e=>function(...n){let r=[...n],i=n[n.length-1];return vxe(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,FEe(...r.map(o=>s=>Ib(o)?o(s):$Ee(s,o)))(i)},zEe=UEe(kte);function $Ee(...e){return Fs({},...e,Tte)}function Tte(e,t,n,r){if((Ib(e)||Ib(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=Ib(e)?e(...i):e,s=Ib(t)?t(...i):t;return Fs({},o,s,Tte)}}function HEe(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function VEe(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const c=e(r,i,o,s);return a.set(i,c),c}},_te=WEe(VEe);function Pte(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var Ite=e=>Pte(e,t=>t!=null);function GEe(e){return typeof e=="function"}function Rte(e,...t){return GEe(e)?e(...t):e}var KEe=typeof Element<"u",QEe=typeof Map=="function",YEe=typeof Set=="function",qEe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function m8(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!m8(e[r],t[r]))return!1;return!0}var o;if(QEe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!m8(r.value[1],t.get(r.value[0])))return!1;return!0}if(YEe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(qEe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(KEe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!m8(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var ZEe=function(t,n){try{return m8(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const JEe=wl(ZEe);function Nte(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:s}=ite(),a=e?_te(o,`components.${e}`):void 0,c=r||a,u=Fs({theme:o,colorMode:s},(n=c==null?void 0:c.defaultProps)!=null?n:{},Ite(HEe(i,["children"]))),l=j.useRef({});if(c){const f=yxe(c)(u);JEe(l.current,f)||(l.current=f)}return l.current}function Vc(e,t={}){return Nte(e,t)}function i2(e,t={}){return Nte(e,t)}var XEe=new Set([...oxe,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),eCe=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function tCe(e){return eCe.has(e)||!XEe.has(e)}function nCe(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function rCe(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var iCe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vP=zee(function(e){return iCe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),oCe=vP,sCe=function(t){return t!=="theme"},TU=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?oCe:sCe},_U=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},aCe=!1,cCe=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Kee(n,r,i),B4e(function(){return Qee(n,r,i)}),null},uCe=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=_U(t,n,r),c=a||TU(i),u=!c("as");return function(){var l=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),l[0]==null||l[0].raw===void 0)d.push.apply(d,l);else{d.push(l[0][0]);for(var f=l.length,h=1;ht=>{const{theme:n,css:r,__css:i,sx:o,...s}=t,a=Pte(s,(d,f)=>axe(f)),c=Rte(e,t),u=nCe({},i,c,Ite(a),o),l=dte(u)(t.theme);return r?[l,r]:l};function gS(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=tCe);const i=fCe({baseStyle:n}),o=dCe(e,r)(i);return Gn.forwardRef(function(c,u){const{colorMode:l,forced:d}=eL();return Gn.createElement(o,{ref:u,"data-theme":d?l:void 0,...c})})}function hCe(){const e=new Map;return new Proxy(gS,{apply(t,n,r){return gS(...r)},get(t,n){return e.has(n)||e.set(n,gS(n)),e.get(n)}})}var ht=hCe();function Rt(e){return j.forwardRef(e)}function pCe(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=j.createContext(void 0);i.displayName=r;function o(){var s;const a=j.useContext(i);if(!a&&t){const c=new Error(n);throw c.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,c,o),c}return a}return[i.Provider,o,i]}function gCe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=j.useMemo(()=>ixe(n),[n]);return g.jsxs(j4e,{theme:i,children:[g.jsx(mCe,{root:t}),r]})}function mCe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return g.jsx(Y7,{styles:n=>({[t]:n.__cssVars})})}pCe({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function yCe(){const{colorMode:e}=eL();return g.jsx(Y7,{styles:t=>{const n=_te(t,"styles.global"),r=Rte(n,{theme:t,colorMode:e});return r?dte(r)(t):void 0}})}var Ote=j.createContext({getDocument(){return document},getWindow(){return window}});Ote.displayName="EnvironmentContext";function Lte(e){const{children:t,environment:n,disabled:r}=e,i=j.useRef(null),o=j.useMemo(()=>n||{getDocument:()=>{var a,c;return(c=(a=i.current)==null?void 0:a.ownerDocument)!=null?c:document},getWindow:()=>{var a,c;return(c=(a=i.current)==null?void 0:a.ownerDocument.defaultView)!=null?c:window}},[n]),s=!r||!n;return g.jsxs(Ote.Provider,{value:o,children:[t,s&&g.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}Lte.displayName="EnvironmentProvider";var bCe=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:s={},environment:a,cssVarsRoot:c,disableEnvironment:u,disableGlobalStyle:l}=e,d=g.jsx(Lte,{environment:a,disabled:u,children:t});return g.jsx(gCe,{theme:s,cssVarsRoot:c,children:g.jsxs(rte,{colorModeManager:n,options:s.config,children:[o?g.jsx(z4e,{scope:i}):g.jsx(U4e,{}),!l&&g.jsx(yCe,{}),r?g.jsx(tte,{zIndex:r,children:d}):d]})})},vCe=(e,t)=>e.find(n=>n.id===t);function IU(e,t){const n=Bte(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function Bte(e,t){for(const[n,r]of Object.entries(e))if(vCe(r,t))return n}function xCe(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function wCe(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",s=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:s}}function y8(e,t=[]){const n=j.useRef(e);return j.useEffect(()=>{n.current=e}),j.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ECe(e,t){const n=y8(e);j.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function xP(e,t){const n=j.useRef(!1),r=j.useRef(!1);j.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),j.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const uL=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nE=j.createContext({}),a5=j.createContext(null),lL=typeof window<"u",Mte=lL?j.useLayoutEffect:j.useEffect,Dte=j.createContext({strict:!1}),rE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),CCe="framerAppearId",jte="data-"+rE(CCe),ACe={skipAnimations:!1,useManualTiming:!1};function SCe(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){o.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,l=!1,d=!1)=>{const h=d&&r?t:n;return l&&o.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(s=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,c.process(u))}};return c}const Gx=["read","resolveKeyframes","update","preRender","render","postRender"],kCe=40;function Fte(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Gx.reduce((y,b)=>(y[b]=SCe(o),y),{}),{read:a,resolveKeyframes:c,update:u,preRender:l,render:d,postRender:f}=s,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,kCe),1),i.timestamp=y,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),l.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Gx.reduce((y,b)=>{const v=s[b];return y[b]=(w,E=!1,S=!1)=>(n||p(),v.schedule(w,E,S)),y},{}),cancel:y=>{for(let b=0;b{d&&d.update(n,c)});const h=n[jte],p=j.useRef(!!h&&!window.MotionHandoffIsComplete&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,h)));return Mte(()=>{d&&(d.updateFeatures(),dL.render(d.render),p.current&&d.animationState&&d.animationState.animateChanges())}),j.useEffect(()=>{d&&(!p.current&&d.animationState&&d.animationState.animateChanges(),p.current=!1,RU||(RU=!0,queueMicrotask(_Ce)))}),d}function _Ce(){window.MotionHandoffIsComplete=!0}function PCe(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zte(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&h1(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function zte(e){if(e)return e.options.allowProjection!==!1?e.projection:zte(e.parent)}function ICe(e,t,n){return j.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):h1(n)&&(n.current=r))},[t])}function Fv(e){return typeof e=="string"||Array.isArray(e)}function Uv(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const fL=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hL=["initial",...fL];function iE(e){return Uv(e.animate)||hL.some(t=>Fv(e[t]))}function $te(e){return!!(iE(e)||e.variants)}function RCe(e,t){if(iE(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fv(n)?n:void 0,animate:Fv(r)?r:void 0}}return e.inherit!==!1?t:{}}function NCe(e){const{initial:t,animate:n}=RCe(e,j.useContext(nE));return j.useMemo(()=>({initial:t,animate:n}),[NU(t),NU(n)])}function NU(e){return Array.isArray(e)?e.join(" "):e}const OU={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},fm={};for(const e in OU)fm[e]={isEnabled:t=>OU[e].some(n=>!!t[n])};function OCe(e){for(const t in e)fm[t]={...fm[t],...e[t]}}const pL=j.createContext({}),LCe=Symbol.for("motionComponentSymbol"),xi=e=>e;let wP=xi;function BCe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&OCe(e);function o(a,c){let u;const l={...j.useContext(uL),...a,layoutId:MCe(a)},{isStatic:d}=l,f=NCe(a),h=r(a,d);if(!d&&lL){DCe();const p=jCe(l);u=p.MeasureLayout,f.visualElement=TCe(i,h,l,t,p.ProjectionNode)}return g.jsxs(nE.Provider,{value:f,children:[u&&f.visualElement?g.jsx(u,{visualElement:f.visualElement,...l}):null,n(i,a,ICe(h,f.visualElement,c),h,d,f.visualElement)]})}const s=j.forwardRef(o);return s[LCe]=i,s}function MCe({layoutId:e}){const t=j.useContext(pL).id;return t&&e!==void 0?t+"-"+e:e}function DCe(e,t){j.useContext(Dte).strict}function jCe(e){const{drag:t,layout:n}=fm;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function FCe(e){function t(r,i={}){return BCe(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const UCe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function gL(e){return typeof e!="string"||e.includes("-")?!1:!!(UCe.indexOf(e)>-1||/[A-Z]/u.test(e))}const zw={};function zCe(e){Object.assign(zw,e)}const c5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ef=new Set(c5);function Hte(e,{layout:t,layoutId:n}){return Ef.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!zw[e]||e==="opacity")}const yi=e=>!!(e&&e.getVelocity),Vte=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ff=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},p3={...o2,transform:e=>ff(0,1,e)},Kx={...o2,default:1},g3=e=>Math.round(e*1e5)/1e5,mL=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,$Ce=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,HCe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function u5(e){return typeof e=="string"}function VCe(e){return e==null}const l5=e=>({test:t=>u5(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yl=l5("deg"),jc=l5("%"),ft=l5("px"),WCe=l5("vh"),GCe=l5("vw"),LU={...jc,parse:e=>jc.parse(e)/100,transform:e=>jc.transform(e*100)},BU={...o2,transform:Math.round},yL={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,size:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,rotate:Yl,rotateX:Yl,rotateY:Yl,rotateZ:Yl,scale:Kx,scaleX:Kx,scaleY:Kx,scaleZ:Kx,skew:Yl,skewX:Yl,skewY:Yl,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:p3,originX:LU,originY:LU,originZ:ft,zIndex:BU,backgroundPositionX:ft,backgroundPositionY:ft,fillOpacity:p3,strokeOpacity:p3,numOctaves:BU},KCe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QCe=c5.length;function YCe(e,t,n){let r="",i=!0;for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),Gte=Wte("--"),qCe=Wte("var(--"),bL=e=>qCe(e)?ZCe.test(e.split("/*")[0].trim()):!1,ZCe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function vL(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const c in t){const u=t[c];if(Ef.has(c)){s=!0;continue}else if(Gte(c)){i[c]=u;continue}else{const l=Vte(u,yL[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(t.transform||(s||n?r.transform=YCe(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${u} ${l}`}}const xL=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kte(e,t,n){for(const r in t)!yi(t[r])&&!Hte(r,n)&&(e[r]=t[r])}function JCe({transformTemplate:e},t){return j.useMemo(()=>{const n=xL();return vL(n,t,e),Object.assign({},n.vars,n.style)},[t])}function XCe(e,t){const n=e.style||{},r={};return Kte(r,n,e),Object.assign(r,JCe(e,t)),r}function eAe(e,t){const n={},r=XCe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const tAe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $w(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tAe.has(e)}let Qte=e=>!$w(e);function nAe(e){e&&(Qte=t=>t.startsWith("on")?!$w(t):e(t))}try{nAe(require("@emotion/is-prop-valid").default)}catch{}function rAe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Qte(i)||n===!0&&$w(i)||!t&&!$w(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function MU(e,t,n){return typeof e=="string"?e:ft.transform(t+n*e)}function iAe(e,t,n){const r=MU(t,e.x,e.width),i=MU(n,e.y,e.height);return`${r} ${i}`}const oAe={offset:"stroke-dashoffset",array:"stroke-dasharray"},sAe={offset:"strokeDashoffset",array:"strokeDasharray"};function aAe(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?oAe:sAe;e[o.offset]=ft.transform(-r);const s=ft.transform(t),a=ft.transform(n);e[o.array]=`${s} ${a}`}function wL(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},l,d){if(vL(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(i!==void 0||o!==void 0||h.transform)&&(h.transformOrigin=iAe(p,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&aAe(f,s,a,c,!1)}const Yte=()=>({...xL(),attrs:{}}),EL=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cAe(e,t,n,r){const i=j.useMemo(()=>{const o=Yte();return wL(o,t,EL(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Kte(o,e.style,e),i.style={...o,...i.style}}return i}function uAe(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(gL(n)?cAe:eAe)(r,o,s,n),u=rAe(r,typeof n=="string",e),l=n!==j.Fragment?{...u,...c,ref:i}:{},{children:d}=r,f=j.useMemo(()=>yi(d)?d.get():d,[d]);return j.createElement(n,{...l,children:f})}}function qte(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Zte=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jte(e,t,n,r){qte(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Zte.has(i)?i:rE(i),t.attrs[i])}function CL(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(yi(i[s])||t.style&&yi(t.style[s])||Hte(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),o}function Xte(e,t,n){const r=CL(e,t,n);for(const i in e)if(yi(e[i])||yi(t[i])){const o=c5.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function DU(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function AL(e,t,n,r){if(typeof t=="function"){const[i,o]=DU(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=DU(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function SL(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const EP=e=>Array.isArray(e),lAe=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),dAe=e=>EP(e)?e[e.length-1]||0:e;function b8(e){const t=yi(e)?e.get():e;return lAe(t)?t.toValue():t}const ene=new Set(["opacity","clipPath","filter","transform"]);function tne(e){if(Ef.has(e))return"transform";if(ene.has(e))return rE(e)}function oE(e,t){e.indexOf(t)===-1&&e.push(t)}function sE(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function fAe({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,o,s,a){const c={latestValues:pAe(i,o,s,a?!1:e,t),renderState:n()};return r&&(c.mount=u=>r(i,u,c)),c}const nne=e=>(t,n)=>{const r=j.useContext(nE),i=j.useContext(a5),o=()=>fAe(e,t,r,i,n);return n?o():SL(o)};function hAe(e,t){const n=tne(t);n&&oE(e,n)}function jU(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const b in x){let v=x[b];if(Array.isArray(v)){const w=p?v.length-1:0;v=v[w]}v!==null&&(s[b]=v)}for(const b in y)s[b]=y[b]}),c&&(d&&l!==!1&&!Uv(d)&&jU(e,d,x=>{for(const y in x)hAe(a,y)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:yn,cancel:ul,state:Vr,steps:mS}=Fte(typeof requestAnimationFrame<"u"?requestAnimationFrame:xi,!0),gAe={useVisualState:nne({scrapeMotionValuesFromProps:Xte,createRenderState:Yte,onMount:(e,t,{renderState:n,latestValues:r})=>{yn.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),yn.render(()=>{wL(n,r,EL(t.tagName),e.transformTemplate),Jte(t,n)})}})},mAe={useVisualState:nne({applyWillChange:!0,scrapeMotionValuesFromProps:CL,createRenderState:xL})};function yAe(e,{forwardMotionProps:t=!1},n,r){return{...gL(e)?gAe:mAe,preloadedFeatures:n,useRender:uAe(t),createVisualElement:r,Component:e}}function zu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const rne=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function aE(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const bAe=e=>t=>rne(t)&&e(t,aE(t));function Ku(e,t,n,r){return zu(e,t,bAe(n),r)}const vAe=(e,t)=>n=>t(e(n)),Qu=(...e)=>e.reduce(vAe);function ine(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const FU=ine("dragHorizontal"),UU=ine("dragVertical");function one(e){let t=!1;if(e==="y")t=UU();else if(e==="x")t=FU();else{const n=FU(),r=UU();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function sne(){const e=one(!0);return e?(e(),!1):!0}class Cf{constructor(t){this.isMounted=!1,this.node=t}update(){}}function zU(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,s)=>{if(o.pointerType==="touch"||sne())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const c=a[r];c&&yn.postRender(()=>c(o,s))};return Ku(e.current,n,i,{passive:!e.getProps()[r]})}class xAe extends Cf{mount(){this.unmount=Qu(zU(this.node,!0),zU(this.node,!1))}unmount(){}}class wAe extends Cf{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qu(zu(this.node.current,"focus",()=>this.onFocus()),zu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ane=(e,t)=>t?e===t?!0:ane(e,t.parentElement):!1;function yS(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,aE(n))}class EAe extends Cf{constructor(){super(...arguments),this.removeStartListeners=xi,this.removeEndListeners=xi,this.removeAccessibleListeners=xi,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=Ku(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l,globalTapTarget:d}=this.node.getProps(),f=!d&&!ane(this.node.current,a.target)?l:u;f&&yn.update(()=>f(a,c))},{passive:!(r.onTap||r.onPointerUp)}),s=Ku(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Qu(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||yS("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&yn.postRender(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=zu(this.node.current,"keyup",s),yS("down",(a,c)=>{this.startPress(a,c)})},n=zu(this.node.current,"keydown",t),r=()=>{this.isPressing&&yS("cancel",(o,s)=>this.cancelPress(o,s))},i=zu(this.node.current,"blur",r);this.removeAccessibleListeners=Qu(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&yn.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!sne()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&yn.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ku(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=zu(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qu(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const CP=new WeakMap,bS=new WeakMap,CAe=e=>{const t=CP.get(e.target);t&&t(e)},AAe=e=>{e.forEach(CAe)};function SAe({root:e,...t}){const n=e||document;bS.has(n)||bS.set(n,{});const r=bS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(AAe,{root:e,...t})),r[i]}function kAe(e,t,n){const r=SAe(t);return CP.set(e,n),r.observe(e),()=>{CP.delete(e),r.unobserve(e)}}const TAe={some:0,all:1};class _Ae extends Cf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:TAe[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:d}=this.node.getProps(),f=u?l:d;f&&f(c)};return kAe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PAe(t,n))&&this.startObserver()}unmount(){}}function PAe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const IAe={inView:{Feature:_Ae},tap:{Feature:EAe},focus:{Feature:wAe},hover:{Feature:xAe}};function cne(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,qu=e=>e/1e3,RAe={type:"spring",stiffness:500,damping:25,restSpeed:10},NAe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),OAe={type:"keyframes",duration:.8},LAe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BAe=(e,{keyframes:t})=>t.length>2?OAe:Ef.has(e)?e.startsWith("scale")?NAe(t[1]):RAe:LAe;function MAe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}function kL(e,t){return e[t]||e.default||e}const DAe=e=>e!==null;function uE(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(DAe),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const une=e=>/^0[^.\s]+$/u.test(e);function jAe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||une(e):!0}const lne=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FAe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function UAe(e){const t=FAe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function dne(e,t,n=1){const[r,i]=UAe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return lne(s)?parseFloat(s):s}return bL(i)?dne(i,t,n+1):i}const zAe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),$U=e=>e===o2||e===ft,HU=(e,t)=>parseFloat(e.split(", ")[t]),VU=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return HU(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?HU(o[1],e):0}},$Ae=new Set(["x","y","z"]),HAe=c5.filter(e=>!$Ae.has(e));function VAe(e){const t=[];return HAe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const hm={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:VU(4,13),y:VU(5,14)};hm.translateX=hm.x;hm.translateY=hm.y;const fne=e=>t=>t.test(e),WAe={test:e=>e==="auto",parse:e=>e},hne=[o2,ft,jc,Yl,GCe,WCe,WAe],WU=e=>hne.find(fne(e)),bh=new Set;let AP=!1,SP=!1;function pne(){if(SP){const e=Array.from(bh).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=VAe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}SP=!1,AP=!1,bh.forEach(e=>e.complete()),bh.clear()}function gne(){bh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(SP=!0)})}function GAe(){gne(),pne()}class TL{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(bh.add(this),AP||(AP=!0,yn.read(gne),yn.resolveKeyframes(pne))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;on=>!!(u5(n)&&HCe.test(n)&&n.startsWith(e)||t&&!VCe(n)&&Object.prototype.hasOwnProperty.call(n,t)),mne=(e,t,n)=>r=>{if(!u5(r))return r;const[i,o,s,a]=r.match(mL);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},KAe=e=>ff(0,255,e),vS={...o2,transform:e=>Math.round(KAe(e))},I0={test:_L("rgb","red"),parse:mne("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vS.transform(e)+", "+vS.transform(t)+", "+vS.transform(n)+", "+g3(p3.transform(r))+")"};function QAe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const kP={test:_L("#"),parse:QAe,transform:I0.transform},p1={test:_L("hsl","hue"),parse:mne("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jc.transform(g3(t))+", "+jc.transform(g3(n))+", "+g3(p3.transform(r))+")"},di={test:e=>I0.test(e)||kP.test(e)||p1.test(e),parse:e=>I0.test(e)?I0.parse(e):p1.test(e)?p1.parse(e):kP.parse(e),transform:e=>u5(e)?e:e.hasOwnProperty("red")?I0.transform(e):p1.transform(e)};function YAe(e){var t,n;return isNaN(e)&&u5(e)&&(((t=e.match(mL))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($Ce))===null||n===void 0?void 0:n.length)||0)>0}const yne="number",bne="color",qAe="var",ZAe="var(",GU="${}",JAe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function zv(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(JAe,c=>(di.test(c)?(r.color.push(o),i.push(bne),n.push(di.parse(c))):c.startsWith(ZAe)?(r.var.push(o),i.push(qAe),n.push(c)):(r.number.push(o),i.push(yne),n.push(parseFloat(c))),++o,GU)).split(GU);return{values:n,split:a,indexes:r,types:i}}function vne(e){return zv(e).values}function xne(e){const{split:t,types:n}=zv(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:e;function eSe(e){const t=vne(e);return xne(e)(t.map(XAe))}const hf={test:YAe,parse:vne,createTransformer:xne,getAnimatableNone:eSe},tSe=new Set(["brightness","contrast","saturate","opacity"]);function nSe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(mL)||[];if(!r)return e;const i=n.replace(r,"");let o=tSe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const rSe=/\b([a-z-]*)\(.*?\)/gu,TP={...hf,getAnimatableNone:e=>{const t=e.match(rSe);return t?t.map(nSe).join(" "):e}},iSe={...yL,color:di,backgroundColor:di,outlineColor:di,fill:di,stroke:di,borderColor:di,borderTopColor:di,borderRightColor:di,borderBottomColor:di,borderLeftColor:di,filter:TP,WebkitFilter:TP},PL=e=>iSe[e];function wne(e,t){let n=PL(e);return n!==TP&&(n=hf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oSe=new Set(["auto","none","0"]);function sSe(e,t,n){let r=0,i;for(;r{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Cne(e){let t;return()=>(t===void 0&&(t=e()),t)}let v8;function aSe(){v8=void 0}const Zu={now:()=>(v8===void 0&&Zu.set(Vr.isProcessing||ACe.useManualTiming?Vr.timestamp:performance.now()),v8),set:e=>{v8=e,queueMicrotask(aSe)}},KU=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hf.test(e)||e==="0")&&!e.startsWith("url("));function cSe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nlSe?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&GAe(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Zu.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:s,onComplete:a,onUpdate:c,isGenerator:u}=this.options;if(!u&&!uSe(t,r,i,o))if(s)this.options.duration=0;else{c==null||c(uE(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const l=this.initPlayback(t,n);l!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...l},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Sne(e,t){return t?e*(1e3/t):0}const dSe=5;function kne(e,t,n){const r=Math.max(t-dSe,0);return Sne(n-e(r),t-r)}const xS=.001,fSe=.01,hSe=10,pSe=.05,gSe=1;function mSe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=ff(pSe,gSe,s),e=ff(fSe,hSe,qu(e)),s<1?(i=u=>{const l=u*s,d=l*e,f=l-n,h=_P(u,s),p=Math.exp(-d);return xS-f/h*p},o=u=>{const d=u*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=_P(Math.pow(u,2),s);return(-i(u)+xS>0?-1:1)*((f-h)*p)/m}):(i=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-xS+l*d},o=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=bSe(i,o,a);if(e=Yu(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const ySe=12;function bSe(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function wSe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!QU(e,xSe)&&QU(e,vSe)){const n=mSe(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Tne({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:l,velocity:d,isResolvedFromDuration:f}=wSe({...r,velocity:-qu(r.velocity||0)}),h=d||0,p=c/(2*Math.sqrt(a*u)),m=o-i,x=qu(Math.sqrt(a/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let b;if(p<1){const v=_P(x,p);b=w=>{const E=Math.exp(-p*x*w);return o-E*((h+p*x*m)/v*Math.sin(v*w)+m*Math.cos(v*w))}}else if(p===1)b=v=>o-Math.exp(-x*v)*(m+(h+x*m)*v);else{const v=x*Math.sqrt(p*p-1);b=w=>{const E=Math.exp(-p*x*w),S=Math.min(v*w,300);return o-E*((h+p*x*m)*Math.sinh(S)+v*m*Math.cosh(S))/v}}return{calculatedDuration:f&&l||null,next:v=>{const w=b(v);if(f)s.done=v>=l;else{let E=0;p<1&&(E=v===0?Yu(h):kne(b,v,w));const S=Math.abs(E)<=n,I=Math.abs(o-w)<=t;s.done=S&&I}return s.value=s.done?o:w,s}}}function YU({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],f={done:!1,value:d},h=A=>a!==void 0&&Ac,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)-m*Math.exp(-A/r),v=A=>y+b(A),w=A=>{const O=b(A),N=v(A);f.done=Math.abs(O)<=u,f.value=f.done?y:N};let E,S;const I=A=>{h(f.value)&&(E=A,S=Tne({keyframes:[f.value,p(f.value)],velocity:kne(v,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return I(0),{calculatedDuration:null,next:A=>{let O=!1;return!S&&E===void 0&&(O=!0,w(A),I(A)),E!==void 0&&A>=E?S.next(A-E):(!O&&w(A),f)}}}const _ne=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ESe=1e-7,CSe=12;function ASe(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=_ne(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>ESe&&++aASe(o,0,1,e,n);return o=>o===0||o===1?o:_ne(i(o),t,r)}const SSe=d5(.42,0,1,1),kSe=d5(0,0,.58,1),Pne=d5(.42,0,.58,1),TSe=e=>Array.isArray(e)&&typeof e[0]!="number",Ine=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rne=e=>t=>1-e(1-t),IL=e=>1-Math.sin(Math.acos(e)),Nne=Rne(IL),_Se=Ine(IL),One=d5(.33,1.53,.69,.99),RL=Rne(One),PSe=Ine(RL),ISe=e=>(e*=2)<1?.5*RL(e):.5*(2-Math.pow(2,-10*(e-1))),qU={linear:xi,easeIn:SSe,easeInOut:Pne,easeOut:kSe,circIn:IL,circInOut:_Se,circOut:Nne,backIn:RL,backInOut:PSe,backOut:One,anticipate:ISe},ZU=e=>{if(Array.isArray(e)){wP(e.length===4);const[t,n,r,i]=e;return d5(t,n,r,i)}else if(typeof e=="string")return wP(qU[e]!==void 0),qU[e];return e},$v=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Xn=(e,t,n)=>e+(t-e)*n;function wS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function RSe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=wS(c,a,e+1/3),o=wS(c,a,e),s=wS(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Hw(e,t){return n=>n>0?t:e}const ES=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},NSe=[kP,I0,p1],OSe=e=>NSe.find(t=>t.test(e));function JU(e){const t=OSe(e);if(!t)return!1;let n=t.parse(e);return t===p1&&(n=RSe(n)),n}const XU=(e,t)=>{const n=JU(e),r=JU(t);if(!n||!r)return Hw(e,t);const i={...n};return o=>(i.red=ES(n.red,r.red,o),i.green=ES(n.green,r.green,o),i.blue=ES(n.blue,r.blue,o),i.alpha=Xn(n.alpha,r.alpha,o),I0.transform(i))},PP=new Set(["none","hidden"]);function LSe(e,t){return PP.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BSe(e,t){return n=>Xn(e,t,n)}function NL(e){return typeof e=="number"?BSe:typeof e=="string"?bL(e)?Hw:di.test(e)?XU:jSe:Array.isArray(e)?Lne:typeof e=="object"?di.test(e)?XU:MSe:Hw}function Lne(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>NL(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function DSe(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=hf.createTransformer(t),r=zv(e),i=zv(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?PP.has(e)&&!i.values.length||PP.has(t)&&!r.values.length?LSe(e,t):Qu(Lne(DSe(r,i),i.values),n):Hw(e,t)};function Bne(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xn(e,t,n):NL(e)(e,t)}function FSe(e,t,n){const r=[],i=n||Bne,o=e.length-1;for(let s=0;st[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=FSe(t,r,i),a=s.length,c=u=>{let l=0;if(a>1)for(;lc(ff(e[0],e[o-1],u)):c}function zSe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=$v(0,t,r);e.push(Xn(n,1,i))}}function $Se(e){const t=[0];return zSe(t,e.length-1),t}function HSe(e,t){return e.map(n=>n*t)}function VSe(e,t){return e.map(()=>t||Pne).splice(0,e.length-1)}function Vw({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=TSe(r)?r.map(ZU):ZU(r),o={done:!1,value:t[0]},s=HSe(n&&n.length===t.length?n:$Se(t),e),a=USe(s,t,{ease:Array.isArray(i)?i:VSe(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const ez=2e4;function WSe(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=ez?1/0:t}const GSe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>yn.update(t,!0),stop:()=>ul(t),now:()=>Vr.isProcessing?Vr.timestamp:Zu.now()}},KSe={decay:YU,inertia:YU,tween:Vw,keyframes:Vw,spring:Tne},QSe=e=>e/100;class OL extends Ane{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,s=(i==null?void 0:i.KeyframeResolver)||TL,a=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new s(o,a,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,a=KSe[n]||Vw;let c,u;a!==Vw&&typeof t[0]!="number"&&(c=Qu(QSe,Bne(t[0],t[1])),t=[0,100]);const l=a({...this.options,keyframes:t});o==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=WSe(l));const{calculatedDuration:d}=l,f=d+i,h=f*(r+1)-i;return{generator:l,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:u,totalDuration:l,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-l/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>l;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,w=o;if(h){const A=Math.min(this.currentTime,l)/d;let O=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/d)):p==="mirror"&&(w=s)),v=ff(0,1,N)*d}const E=b?{done:!1,value:c[0]}:w.next(v);a&&(E.value=a(E.value));let{done:S}=E;!b&&u!==null&&(S=this.speed>=0?this.currentTime>=l:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return I&&i!==void 0&&(E.value=uE(c,this.options,i)),x&&x(E.value),I&&this.finish(),E}get duration(){const{resolved:t}=this;return t?qu(t.calculatedDuration):0}get time(){return qu(this.currentTime)}set time(t){t=Yu(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=qu(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=GSe,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Mne=e=>Array.isArray(e)&&typeof e[0]=="number";function Dne(e){return!!(!e||typeof e=="string"&&e in LL||Mne(e)||Array.isArray(e)&&e.every(Dne))}const Rb=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rb([0,.65,.55,1]),circOut:Rb([.55,0,1,.45]),backIn:Rb([.31,.01,.66,-.59]),backOut:Rb([.33,1.53,.69,.99])};function YSe(e){return jne(e)||LL.easeOut}function jne(e){if(e)return Mne(e)?Rb(e):Array.isArray(e)?e.map(YSe):LL[e]}function qSe(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const l=jne(a);return Array.isArray(l)&&(u.easing=l),e.animate(u,{delay:r,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const ZSe=Cne(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ww=10,JSe=2e4;function XSe(e){return e.type==="spring"||!Dne(e.ease)}function eke(e,t){const n=new OL({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(s,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:s,type:a,motionValue:c,name:u,startTime:l}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(XSe(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:m,...x}=this.options,y=eke(t,x);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,o=y.times,s=y.ease,a="keyframes"}const d=qSe(c.owner.current,u,t,{...this.options,duration:i,times:o,ease:s});return d.startTime=l??this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;c.set(uE(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return qu(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return qu(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Yu(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return xi;const{animation:r}=n;r.timeline=t,r.onfinish=null}return xi}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:l,onComplete:d,element:f,...h}=this.options,p=new OL({...h,keyframes:r,duration:i,type:o,ease:s,times:a,isGenerator:!0}),m=Yu(this.time);u.setWithVelocity(p.sample(m-Ww).value,p.sample(m).value,Ww)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:a}=t;return ZSe()&&r&&ene.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&s!==0&&a!=="inertia"}}function tke(e,t){let n;const r=()=>{const{currentTime:i}=t,s=(i===null?0:i.value)/100;n!==s&&e(s),n=s};return yn.update(r,!0),()=>ul(r)}const nke=Cne(()=>window.ScrollTimeline!==void 0);class rke{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(nke()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),tke(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const BL=(e,t,n,r={},i,o,s)=>a=>{const c=kL(r,e)||{},u=c.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Yu(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-l,onUpdate:h=>{t.set(h),c.onUpdate&&c.onUpdate(h)},onComplete:()=>{a(),c.onComplete&&c.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:o?void 0:i};MAe(c)||(d={...d,...BAe(e,d)}),d.duration&&(d.duration=Yu(d.duration)),d.repeatDelay&&(d.repeatDelay=Yu(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const h=uE(d.keyframes,c);if(h!==void 0)return yn.update(()=>{d.onUpdate(h),d.onComplete()}),new rke([])}return!o&&tz.supports(d)?new tz(d):new OL(d)};let ML=class{constructor(){this.subscriptions=[]}add(t){return oE(this.subscriptions,t),()=>sE(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));let Fne=class{constructor(t,n={}){this.version="11.3.28",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Zu.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Zu.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ike(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ML);const r=this.events[t].add(n);return t==="change"?()=>{r(),yn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zu.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>nz)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,nz);return Sne(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Hv(e,t){return new Fne(e,t)}function oke(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hv(n))}function ske(e,t){const n=cE(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=dAe(o[s]);oke(e,s,a)}}function Une(e){return e.getProps()[jte]}class ake extends Fne{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=tne(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const o=this.counts.get(n)-1;this.counts.set(n,o),o===0&&(sE(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function cke(e){return!!(yi(e)&&e.add)}function IP(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new ake("auto"),e.addValue("willChange",r)),cke(r))return r.add(t)}function uke({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function zne(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const u=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in c){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),h=c[d];if(h===void 0||l&&uke(l,d))continue;const p={delay:n,...kL(s||{},d)};let m=!1;if(window.MotionHandoffAnimation){const y=Une(e);if(y){const b=window.MotionHandoffAnimation(y,d,yn);b!==null&&(p.startTime=b,m=!0)}}f.start(BL(d,f,h,e.shouldReduceMotion&&Ef.has(d)?{type:!1}:p,e,m,IP(e,d)));const x=f.animation;x&&u.push(x)}return a&&Promise.all(u).then(()=>{yn.update(()=>{a&&ske(e,a)})}),u}function RP(e,t,n={}){var r;const i=cE(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(zne(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=o;return lke(e,t,l+u,d,f,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,l]=c==="beforeChildren"?[s,a]:[a,s];return u().then(()=>l())}else return Promise.all([s(),a(n.delay)])}function lke(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(dke).forEach((u,l)=>{u.notify("AnimationStart",t),s.push(RP(u,t,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function dke(e,t){return e.sortNodePosition(t)}function fke(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>RP(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=RP(e,t,n);else{const i=typeof t=="function"?cE(e,t,n.custom):t;r=Promise.all(zne(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const hke=[...fL].reverse(),pke=fL.length;function gke(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fke(e,n,r)))}function mke(e){let t=gke(e),n=rz(),r=!0;const i=c=>(u,l)=>{var d;const f=cE(e,l,c==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function o(c){t=c(e)}function s(c){const u=e.getProps(),l=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;xp&&w,O=!1;const N=Array.isArray(v)?v:[v];let R=N.reduce(i(y),{});E===!1&&(R={});const{prevResolvedValues:_={}}=b,M={..._,...R},z=F=>{A=!0,f.has(F)&&(O=!0,f.delete(F)),b.needsAnimating[F]=!0;const $=e.getValue(F);$&&($.liveStyle=!1)};for(const F in M){const $=R[F],W=_[F];if(h.hasOwnProperty(F))continue;let G=!1;EP($)&&EP(W)?G=!cne($,W):G=$!==W,G?$!=null?z(F):f.add(F):$!==void 0&&f.has(F)?z(F):b.protectedKeys[F]=!0}b.prevProp=v,b.prevResolvedValues=R,b.isActive&&(h={...h,...R}),r&&e.blockInitialAnimation&&(A=!1),A&&(!S||O)&&d.push(...N.map(F=>({animation:F,options:{type:y}})))}if(f.size){const x={};f.forEach(y=>{const b=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),x[y]=b??null}),d.push({animation:x})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(c,u){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=s(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=rz(),r=!0}}}function yke(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cne(t,e):!1}function Mf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rz(){return{animate:Mf(!0),whileInView:Mf(),whileHover:Mf(),whileTap:Mf(),whileDrag:Mf(),whileFocus:Mf(),exit:Mf()}}class bke extends Cf{constructor(t){super(t),t.animationState||(t.animationState=mke(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Uv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let vke=0;class xke extends Cf{constructor(){super(...arguments),this.id=vke++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const wke={animation:{Feature:bke},exit:{Feature:xke}},iz=(e,t)=>Math.abs(e-t);function Eke(e,t){const n=iz(e.x,t.x),r=iz(e.y,t.y);return Math.sqrt(n**2+r**2)}let $ne=class{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=AS(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=Eke(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Vr;this.history.push({...p,timestamp:m});const{onStart:x,onMove:y}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=CS(f,this.transformPagePoint),yn.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=AS(d.type==="pointercancel"?this.lastMoveEventInfo:CS(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,x),p&&p(d,x)},!rne(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=aE(t),a=CS(s,this.transformPagePoint),{point:c}=a,{timestamp:u}=Vr;this.history=[{...c,timestamp:u}];const{onSessionStart:l}=n;l&&l(t,AS(a,this.history)),this.removeListeners=Qu(Ku(this.contextWindow,"pointermove",this.handlePointerMove),Ku(this.contextWindow,"pointerup",this.handlePointerUp),Ku(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ul(this.updatePoint)}};function CS(e,t){return t?{point:t(e.point)}:e}function oz(e,t){return{x:e.x-t.x,y:e.y-t.y}}function AS({point:e},t){return{point:e,delta:oz(e,Hne(t)),offset:oz(e,Cke(t)),velocity:Ake(t,.1)}}function Cke(e){return e[0]}function Hne(e){return e[e.length-1]}function Ake(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Hne(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Yu(t)));)n--;if(!r)return{x:0,y:0};const o=qu(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Vne=1e-4,Ske=1-Vne,kke=1+Vne,Wne=.01,Tke=0-Wne,_ke=0+Wne;function Yo(e){return e.max-e.min}function Pke(e,t,n){return Math.abs(e-t)<=n}function sz(e,t,n,r=.5){e.origin=r,e.originPoint=Xn(t.min,t.max,e.origin),e.scale=Yo(n)/Yo(t),e.translate=Xn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ske&&e.scale<=kke||isNaN(e.scale))&&(e.scale=1),(e.translate>=Tke&&e.translate<=_ke||isNaN(e.translate))&&(e.translate=0)}function m3(e,t,n,r){sz(e.x,t.x,n.x,r?r.originX:void 0),sz(e.y,t.y,n.y,r?r.originY:void 0)}function az(e,t,n){e.min=n.min+t.min,e.max=e.min+Yo(t)}function Ike(e,t,n){az(e.x,t.x,n.x),az(e.y,t.y,n.y)}function cz(e,t,n){e.min=t.min-n.min,e.max=e.min+Yo(t)}function y3(e,t,n){cz(e.x,t.x,n.x),cz(e.y,t.y,n.y)}function Rke(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Xn(n,e,r.max):Math.min(e,n)),e}function uz(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Nke(e,{top:t,left:n,bottom:r,right:i}){return{x:uz(e.x,n,i),y:uz(e.y,t,r)}}function lz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=$v(t.min,t.max-r,e.min):r>i&&(n=$v(e.min,e.max-i,t.min)),ff(0,1,n)}function Bke(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const NP=.35;function Mke(e=NP){return e===!1?e=0:e===!0&&(e=NP),{x:dz(e,"left","right"),y:dz(e,"top","bottom")}}function dz(e,t,n){return{min:fz(e,t),max:fz(e,n)}}function fz(e,t){return typeof e=="number"?e:e[t]||0}const hz=()=>({translate:0,scale:1,origin:0,originPoint:0}),g1=()=>({x:hz(),y:hz()}),pz=()=>({min:0,max:0}),cr=()=>({x:pz(),y:pz()});function Es(e){return[e("x"),e("y")]}function Gne({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Dke({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jke(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function SS(e){return e===void 0||e===1}function OP({scale:e,scaleX:t,scaleY:n}){return!SS(e)||!SS(t)||!SS(n)}function u0(e){return OP(e)||Kne(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kne(e){return gz(e.x)||gz(e.y)}function gz(e){return e&&e!=="0%"}function Gw(e,t,n){const r=e-n,i=t*r;return n+i}function mz(e,t,n,r,i){return i!==void 0&&(e=Gw(e,i,r)),Gw(e,n,r)+t}function LP(e,t=0,n=1,r,i){e.min=mz(e.min,t,n,r,i),e.max=mz(e.max,t,n,r,i)}function Qne(e,{x:t,y:n}){LP(e.x,t.translate,t.scale,t.originPoint),LP(e.y,n.translate,n.scale,n.originPoint)}const yz=.999999999999,bz=1.0000000000001;function Fke(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;ayz&&(t.x=1),t.yyz&&(t.y=1)}function m1(e,t){e.min=e.min+t,e.max=e.max+t}function vz(e,t,n,r,i=.5){const o=Xn(e.min,e.max,i);LP(e,t,n,o,r)}function y1(e,t){vz(e.x,t.x,t.scaleX,t.scale,t.originX),vz(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yne(e,t){return Gne(jke(e.getBoundingClientRect(),t))}function Uke(e,t,n){const r=Yne(e,n),{scroll:i}=t;return i&&(m1(r.x,i.offset.x),m1(r.y,i.offset.y)),r}const qne=({current:e})=>e?e.ownerDocument.defaultView:null,zke=new WeakMap;let $ke=class{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=cr(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(aE(l,"page").point)},o=(l,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=one(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Es(y=>{let b=this.getAxisMotionValue(y).get()||0;if(jc.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(b=Yo(w)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&yn.postRender(()=>m(l,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=IP(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(l,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(h&&this.currentDirection===null){this.currentDirection=Hke(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),m&&m(l,d)},a=(l,d)=>this.stop(l,d),c=()=>Es(l=>{var d;return this.getAnimationState(l)==="paused"&&((d=this.getAxisMotionValue(l).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new $ne(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:qne(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&yn.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Qx(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Rke(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&h1(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Nke(i.layoutBox,n):this.constraints=!1,this.elastic=Mke(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Es(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Bke(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!h1(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Uke(r,i.root,this.visualElement.getTransformPagePoint());let s=Oke(i.layout.layoutBox,o);if(n){const a=n(Dke(s));this.hasMutatedConstraints=!!a,a&&(s=Gne(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Es(l=>{if(!Qx(l,n,this.currentDirection))return;let d=c&&c[l]||{};s&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[l]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(BL(t,r,0,n,this.visualElement,!1,IP(this.visualElement,t)))}stopAnimation(){Es(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Es(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Es(n=>{const{drag:r}=this.getProps();if(!Qx(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-Xn(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!h1(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Es(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=Lke({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Es(s=>{if(!Qx(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];a.set(Xn(c,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;zke.set(this.visualElement,this);const t=this.visualElement.current,n=Ku(t,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();h1(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),yn.read(r);const s=zu(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Es(l=>{const d=this.getAxisMotionValue(l);d&&(this.originPoint[l]+=c[l].translate,d.set(d.get()+c[l].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=NP,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}};function Qx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Hke(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Vke extends Cf{constructor(t){super(t),this.removeGroupControls=xi,this.removeListeners=xi,this.controls=new $ke(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xi}unmount(){this.removeGroupControls(),this.removeListeners()}}const xz=e=>(t,n)=>{e&&yn.postRender(()=>e(t,n))};class Wke extends Cf{constructor(){super(...arguments),this.removePointerDownListener=xi}onPointerDown(t){this.session=new $ne(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qne(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:xz(t),onStart:xz(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&yn.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Ku(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Gke(){const e=j.useContext(a5);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=j.useId();j.useEffect(()=>r(i),[]);const o=j.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}function Kke(){return Qke(j.useContext(a5))}function Qke(e){return e===null?!0:e.isPresent}const x8={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wz(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Z2={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ft.test(e))e=parseFloat(e);else return e;const n=wz(e,t.target.x),r=wz(e,t.target.y);return`${n}% ${r}%`}},Yke={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=hf.parse(e);if(i.length>5)return r;const o=hf.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=c;const u=Xn(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};let qke=class extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;zCe(Zke),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),x8.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||yn.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dL.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function Zne(e){const[t,n]=Gke(),r=j.useContext(pL);return g.jsx(qke,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(Ute),isPresent:t,safeToRemove:n})}const Zke={borderRadius:{...Z2,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Z2,borderTopRightRadius:Z2,borderBottomLeftRadius:Z2,borderBottomRightRadius:Z2,boxShadow:Yke},Jne=["TopLeft","TopRight","BottomLeft","BottomRight"],Jke=Jne.length,Ez=e=>typeof e=="string"?parseFloat(e):e,Cz=e=>typeof e=="number"||ft.test(e);function Xke(e,t,n,r,i,o){i?(e.opacity=Xn(0,n.opacity!==void 0?n.opacity:1,eTe(r)),e.opacityExit=Xn(t.opacity!==void 0?t.opacity:1,0,tTe(r))):o&&(e.opacity=Xn(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n($v(e,t,r))}function Sz(e,t){e.min=t.min,e.max=t.max}function as(e,t){Sz(e.x,t.x),Sz(e.y,t.y)}function kz(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tz(e,t,n,r,i){return e-=t,e=Gw(e,1/n,r),i!==void 0&&(e=Gw(e,1/i,r)),e}function nTe(e,t=0,n=1,r=.5,i,o=e,s=e){if(jc.test(t)&&(t=parseFloat(t),t=Xn(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Xn(o.min,o.max,r);e===o&&(a-=t),e.min=Tz(e.min,t,n,a,i),e.max=Tz(e.max,t,n,a,i)}function _z(e,t,[n,r,i],o,s){nTe(e,t[n],t[r],t[i],t.scale,o,s)}const rTe=["x","scaleX","originX"],iTe=["y","scaleY","originY"];function Pz(e,t,n,r){_z(e.x,t,rTe,n?n.x:void 0,r?r.x:void 0),_z(e.y,t,iTe,n?n.y:void 0,r?r.y:void 0)}function Iz(e){return e.translate===0&&e.scale===1}function ere(e){return Iz(e.x)&&Iz(e.y)}function Rz(e,t){return e.min===t.min&&e.max===t.max}function oTe(e,t){return Rz(e.x,t.x)&&Rz(e.y,t.y)}function Nz(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tre(e,t){return Nz(e.x,t.x)&&Nz(e.y,t.y)}function Oz(e){return Yo(e.x)/Yo(e.y)}function Lz(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let sTe=class{constructor(){this.members=[]}add(t){oE(this.members,t),t.scheduleRender()}remove(t){if(sE(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function aTe(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:l,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),l&&(r+=`rotate(${l}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const cTe=(e,t)=>e.depth-t.depth;let uTe=class{constructor(){this.children=[],this.isDirty=!1}add(t){oE(this.children,t),this.isDirty=!0}remove(t){sE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cTe),this.isDirty=!1,this.children.forEach(t)}};function lTe(e,t){const n=Zu.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ul(r),e(o-t))};return yn.read(r,!0),()=>ul(r)}function dTe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function fTe(e,t,n){const r=yi(e)?e:Hv(e);return r.start(BL("",r,t,n)),r.animation}const l0={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Nb=typeof window<"u"&&window.MotionDebug!==void 0,kS=["","X","Y","Z"],hTe={visibility:"hidden"},Bz=1e3;let pTe=0;function TS(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function nre(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?window.MotionHasOptimisedTransformAnimation(Une(t))?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?nre(e.parent):!1:!1}function rre({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=pTe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Nb&&(l0.totalNodes=l0.resolvedTargetDeltas=l0.recalculatedProjection=0),this.nodes.forEach(yTe),this.nodes.forEach(ETe),this.nodes.forEach(CTe),this.nodes.forEach(bTe),Nb&&window.MotionDebug.record(l0)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=lTe(f,250),x8.hasAnimatedSinceResize&&(x8.hasAnimatedSinceResize=!1,this.nodes.forEach(Dz))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||_Te,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=l.getProps(),b=!this.targetLayout||!tre(this.targetLayout,p)||h,v=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const w={...kL(m,"layout"),onPlay:x,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||Dz(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ul(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ATe),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionHandoffCancelAll&&nre(this)&&window.MotionHandoffCancelAll(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const E=w/1e3;jz(d.x,s.x,E),jz(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(y3(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kTe(this.relativeTarget,this.relativeTargetOrigin,f,E),v&&oTe(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=cr()),as(v,this.relativeTarget)),m&&(this.animationValues=l,Xke(l,u,this.latestValues,E,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ul(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=yn.update(()=>{x8.hasAnimatedSinceResize=!0,this.currentAnimation=fTe(0,Bz,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=s;if(!(!a||!c||!u)){if(this!==s&&this.layout&&u&&ire(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||cr();const d=Yo(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+d;const f=Yo(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+f}as(a,c),y1(a,l),m3(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new sTe),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&TS("z",s,u,this.animationValues);for(let l=0;l{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Mz),this.root.sharedNodes.clear()}}}function gTe(e){e.updateLayout()}function mTe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Es(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Yo(f);f.min=r[d].min,f.max=f.min+h}):ire(o,n.layoutBox,r)&&Es(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Yo(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=g1();m3(a,r,n.layoutBox);const c=g1();s?m3(c,e.applyTransform(i,!0),n.measuredBox):m3(c,r,n.layoutBox);const u=!ere(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=cr();y3(p,n.layoutBox,f.layoutBox);const m=cr();y3(m,r,h.layoutBox),tre(p,m)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function yTe(e){Nb&&l0.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function bTe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vTe(e){e.clearSnapshot()}function Mz(e){e.clearMeasurements()}function xTe(e){e.isLayoutDirty=!1}function wTe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dz(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ETe(e){e.resolveTargetDelta()}function CTe(e){e.calcProjection()}function ATe(e){e.resetSkewAndRotation()}function STe(e){e.removeLeadSnapshot()}function jz(e,t,n){e.translate=Xn(t.translate,0,n),e.scale=Xn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fz(e,t,n,r){e.min=Xn(t.min,n.min,r),e.max=Xn(t.max,n.max,r)}function kTe(e,t,n,r){Fz(e.x,t.x,n.x,r),Fz(e.y,t.y,n.y,r)}function TTe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _Te={duration:.45,ease:[.4,0,.1,1]},Uz=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zz=Uz("applewebkit/")&&!Uz("chrome/")?Math.round:xi;function $z(e){e.min=zz(e.min),e.max=zz(e.max)}function PTe(e){$z(e.x),$z(e.y)}function ire(e,t,n){return e==="position"||e==="preserve-aspect"&&!Pke(Oz(t),Oz(n),.2)}function ITe(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const RTe=rre({attachResizeListener:(e,t)=>zu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_S={current:void 0},ore=rre({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_S.current){const e=new RTe({});e.mount(window),e.setOptions({layoutScroll:!0}),_S.current=e}return _S.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),NTe={pan:{Feature:Wke},drag:{Feature:Vke,ProjectionNode:ore,MeasureLayout:Zne}},BP={current:null},sre={current:!1};function OTe(){if(sre.current=!0,!!lL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>BP.current=e.matches;e.addListener(t),t()}else BP.current=!1}function LTe(e,t,n){for(const r in t){const i=t[r],o=n[r];if(yi(i))e.addValue(r,i);else if(yi(o))e.addValue(r,Hv(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,Hv(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Hz=new WeakMap,BTe=[...hne,di,hf],MTe=e=>BTe.find(fne(e)),Vz=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],DTe=hL.length;class jTe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=TL,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,yn.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=iE(n),this.isVariantNode=$te(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];c[f]!==void 0&&yi(h)&&h.set(c[f],!1)}}mount(t){this.current=t,Hz.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),sre.current||OTe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:BP.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Hz.delete(this.current),this.projection&&this.projection.unmount(),ul(this.notifyUpdate),ul(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Ef.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&yn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in fm){const n=fm[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):cr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hv(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(lne(i)||une(i))?i=parseFloat(i):!MTe(i)&&hf.test(n)&&(i=wne(t,n)),this.setBaseTarget(t,yi(i)?i.get():i)),yi(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=AL(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!yi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ML),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class are extends jTe{constructor(){super(...arguments),this.KeyframeResolver=Ene}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function FTe(e){return window.getComputedStyle(e)}class UTe extends are{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=qte}readValueFromInstance(t,n){if(Ef.has(n)){const r=PL(n);return r&&r.default||0}else{const r=FTe(t),i=(Gte(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yne(t,n)}build(t,n,r){vL(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return CL(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yi(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zTe extends are{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=cr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ef.has(n)){const r=PL(n);return r&&r.default||0}return n=Zte.has(n)?n:rE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xte(t,n,r)}build(t,n,r){wL(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Jte(t,n,r,i)}mount(t){this.isSVGTag=EL(t.tagName),super.mount(t)}}const $Te=(e,t)=>gL(e)?new zTe(t):new UTe(t,{allowProjection:e!==j.Fragment}),HTe={layout:{ProjectionNode:ore,MeasureLayout:Zne}},VTe={...wke,...IAe,...NTe,...HTe},WTe=FCe((e,t)=>yAe(e,t,VTe,$Te));class GTe extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function KTe({children:e,isPresent:t}){const n=j.useId(),r=j.useRef(null),i=j.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=j.useContext(uL);return j.useInsertionEffect(()=>{const{width:s,height:a,top:c,left:u}=i.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return o&&(l.nonce=o),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${a}px !important; + top: ${c}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(l)}},[t]),g.jsx(GTe,{isPresent:t,childRef:r,sizeRef:i,children:j.cloneElement(e,{ref:r})})}const QTe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=SL(YTe),c=j.useId(),u=j.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:l=>{a.set(l,!0);for(const d of a.values())if(!d)return;r&&r()},register:l=>(a.set(l,!1),()=>a.delete(l))}),o?[Math.random()]:[n]);return j.useMemo(()=>{a.forEach((l,d)=>a.set(d,!1))},[n]),j.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=g.jsx(KTe,{isPresent:n,children:e})),g.jsx(a5.Provider,{value:u,children:e})};function YTe(){return new Map}const Yx=e=>e.key||"";function Wz(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const qTe=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=j.useMemo(()=>Wz(e),[e]),c=a.map(Yx),u=j.useRef(!0),l=j.useRef(a),d=SL(()=>new Map),[f,h]=j.useState(a),[p,m]=j.useState(a);Mte(()=>{u.current=!1,l.current=a;for(let b=0;b{const v=Yx(b),w=a===p||c.includes(v),E=()=>{if(d.has(v))d.set(v,!0);else return;let S=!0;d.forEach(I=>{I||(S=!1)}),S&&(y==null||y(),m(l.current),i&&i())};return g.jsx(QTe,{isPresent:w,initial:!u.current||r?void 0:!1,custom:w?void 0:n,presenceAffectsLayout:o,mode:s,onExitComplete:w?void 0:E,children:b},v)})})};var ZTe={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},cre=j.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:s="bottom",duration:a=5e3,containerStyle:c,motionVariants:u=ZTe,toastSpacing:l="0.5rem"}=e,[d,f]=j.useState(a),h=Kke();xP(()=>{h||r==null||r()},[h]),xP(()=>{f(a)},[a]);const p=()=>f(null),m=()=>f(a),x=()=>{h&&i()};j.useEffect(()=>{h&&o&&i()},[h,o,i]),ECe(x,d);const y=j.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:l,...c}),[c,l]),b=j.useMemo(()=>xCe(s),[s]);return g.jsx(WTe.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:m,custom:{position:s},style:b,children:g.jsx(ht.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:y,children:Ic(n,{id:t,onClose:x})})})});cre.displayName="ToastComponent";function JTe(e,t){var n;const r=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var Gz={path:g.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[g.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),g.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),g.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},s2=Rt((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:s,className:a,__css:c,...u}=e,l=Kn("chakra-icon",a),d=Vc("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...c,...d},h={ref:t,focusable:o,className:l,__css:f},p=r??Gz.viewBox;if(n&&typeof n!="string")return g.jsx(ht.svg,{as:n,...h,...u});const m=s??Gz.path;return g.jsx(ht.svg,{verticalAlign:"middle",viewBox:p,...h,...u,children:m})});s2.displayName="Icon";function XTe(e){return g.jsx(s2,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function e_e(e){return g.jsx(s2,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function Kz(e){return g.jsx(s2,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var t_e=q7({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),lE=Rt((e,t)=>{const n=Vc("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:s="transparent",className:a,...c}=Gi(e),u=Kn("chakra-spinner",a),l={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${t_e} ${o} linear infinite`,...n};return g.jsx(ht.div,{ref:t,__css:l,className:u,...c,children:r&&g.jsx(ht.span,{srOnly:!0,children:r})})});lE.displayName="Spinner";var[n_e,DL]=Ha({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[r_e,jL]=Ha({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),ure={info:{icon:e_e,colorScheme:"blue"},warning:{icon:Kz,colorScheme:"orange"},success:{icon:XTe,colorScheme:"green"},error:{icon:Kz,colorScheme:"red"},loading:{icon:lE,colorScheme:"blue"}};function i_e(e){return ure[e].colorScheme}function o_e(e){return ure[e].icon}var lre=Rt(function(t,n){const r=jL(),{status:i}=DL(),o={display:"inline",...r.description};return g.jsx(ht.div,{ref:n,"data-status":i,...t,className:Kn("chakra-alert__desc",t.className),__css:o})});lre.displayName="AlertDescription";function dre(e){const{status:t}=DL(),n=o_e(t),r=jL(),i=t==="loading"?r.spinner:r.icon;return g.jsx(ht.span,{display:"inherit","data-status":t,...e,className:Kn("chakra-alert__icon",e.className),__css:i,children:e.children||g.jsx(n,{h:"100%",w:"100%"})})}dre.displayName="AlertIcon";var fre=Rt(function(t,n){const r=jL(),{status:i}=DL();return g.jsx(ht.div,{ref:n,"data-status":i,...t,className:Kn("chakra-alert__title",t.className),__css:r.title})});fre.displayName="AlertTitle";var hre=Rt(function(t,n){var r;const{status:i="info",addRole:o=!0,...s}=Gi(t),a=(r=t.colorScheme)!=null?r:i_e(i),c=i2("Alert",{...t,colorScheme:a}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...c.container};return g.jsx(n_e,{value:{status:i},children:g.jsx(r_e,{value:c,children:g.jsx(ht.div,{"data-status":i,role:o?"alert":void 0,ref:n,...s,className:Kn("chakra-alert",t.className),__css:u})})})});hre.displayName="Alert";function s_e(e){return g.jsx(s2,{focusable:"false","aria-hidden":!0,...e,children:g.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var pre=Rt(function(t,n){const r=Vc("CloseButton",t),{children:i,isDisabled:o,__css:s,...a}=Gi(t),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return g.jsx(ht.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...c,...r,...s},...a,children:i||g.jsx(s_e,{width:"1em",height:"1em"})})});pre.displayName="CloseButton";var a_e={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ac=c_e(a_e);function c_e(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(s=>({...s,[o]:s[o].filter(a=>a.id!=i)}))},notify:(i,o)=>{const s=u_e(i,o),{position:a,id:c}=s;return r(u=>{var l,d;const h=a.includes("top")?[s,...(l=u[a])!=null?l:[]]:[...(d=u[a])!=null?d:[],s];return{...u,[a]:h}}),c},update:(i,o)=>{i&&r(s=>{const a={...s},{position:c,index:u}=IU(a,i);return c&&u!==-1&&(a[c][u]={...a[c][u],...o,message:gre(o)}),a})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((c,u)=>(c[u]=o[u].map(l=>({...l,requestClose:!0})),c),{...o}))},close:i=>{r(o=>{const s=Bte(o,i);return s?{...o,[s]:o[s].map(a=>a.id==i?{...a,requestClose:!0}:a)}:o})},isActive:i=>!!IU(Ac.getState(),i).position}}var Qz=0;function u_e(e,t={}){var n,r;Qz+=1;const i=(n=t.id)!=null?n:Qz,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ac.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var l_e=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:s,description:a,colorScheme:c,icon:u}=e,l=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return g.jsxs(hre,{addRole:!1,status:t,variant:n,id:l==null?void 0:l.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:c,children:[g.jsx(dre,{children:u}),g.jsxs(ht.div,{flex:"1",maxWidth:"100%",children:[i&&g.jsx(fre,{id:l==null?void 0:l.title,children:i}),a&&g.jsx(lre,{id:l==null?void 0:l.description,display:"block",children:a})]}),o&&g.jsx(pre,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function gre(e={}){const{render:t,toastComponent:n=l_e}=e;return i=>typeof t=="function"?t({...i,...e}):g.jsx(n,{...i,...e})}function d_e(e,t){const n=i=>{var o;return{...t,...i,position:JTe((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),s=gre(o);return Ac.notify(s,o)};return r.update=(i,o)=>{Ac.update(i,n(o))},r.promise=(i,o)=>{const s=r({...o.loading,status:"loading",duration:null});i.then(a=>r.update(s,{status:"success",duration:5e3,...Ic(o.success,a)})).catch(a=>r.update(s,{status:"error",duration:5e3,...Ic(o.error,a)}))},r.closeAll=Ac.closeAll,r.close=Ac.close,r.isActive=Ac.isActive,r}var[f_e,h_e]=Ha({name:"ToastOptionsContext",strict:!1}),p_e=e=>{const t=j.useSyncExternalStore(Ac.subscribe,Ac.getState,Ac.getState),{motionVariants:n,component:r=cre,portalProps:i}=e,s=Object.keys(t).map(a=>{const c=t[a];return g.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${a}`,id:`chakra-toast-manager-${a}`,style:wCe(a),children:g.jsx(qTe,{initial:!1,children:c.map(u=>g.jsx(r,{motionVariants:n,...u},u.id))})},a)});return g.jsx(Z7,{...i,children:s})};function FL(e){const{theme:t}=ite(),n=h_e();return j.useMemo(()=>d_e(t.direction,{...n,...e}),[e,t.direction,n])}var g_e=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return g.jsxs(bCe,{theme:r,...o,children:[g.jsx(f_e,{value:i==null?void 0:i.defaultOptions,children:n}),g.jsx(p_e,{...i})]})},m_e=g_e(kte);function y_e(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Vv(...e){return t=>{e.forEach(n=>{y_e(n,t)})}}function b_e(...e){return j.useMemo(()=>Vv(...e),e)}var MP=Rt(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...s}=t;return g.jsx("img",{width:r,height:i,ref:n,alt:o,...s})});MP.displayName="NativeImage";function v_e(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:s,sizes:a,ignoreFallback:c}=e,[u,l]=j.useState("pending");j.useEffect(()=>{l(n?"loading":"pending")},[n]);const d=j.useRef(),f=j.useCallback(()=>{if(!n)return;h();const p=new Image;p.src=n,s&&(p.crossOrigin=s),r&&(p.srcset=r),a&&(p.sizes=a),t&&(p.loading=t),p.onload=m=>{h(),l("loaded"),i==null||i(m)},p.onerror=m=>{h(),l("failed"),o==null||o(m)},d.current=p},[n,s,r,a,i,o,t]),h=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return tf(()=>{if(!c)return u==="loading"&&f(),()=>{h()}},[u,f,c]),c?"loaded":u}var x_e=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function w_e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var mre=Rt(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:s,align:a,fit:c,loading:u,ignoreFallback:l,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:h,...p}=t,m=r!==void 0||i!==void 0,x=u!=null||l||!m,y=v_e({...t,crossOrigin:d,ignoreFallback:x}),b=x_e(y,f),v={ref:n,objectFit:c,objectPosition:a,...x?p:w_e(p,["onError","onLoad"])};return b?i||g.jsx(ht.img,{as:MP,className:"chakra-image__placeholder",src:r,...v}):g.jsx(ht.img,{as:MP,src:o,srcSet:s,crossOrigin:d,loading:u,referrerPolicy:h,className:"chakra-image",...v})});mre.displayName="Image";function yre(e){return j.Children.toArray(e).filter(t=>j.isValidElement(t))}var[Sft,E_e]=Ha({strict:!1,name:"ButtonGroupContext"});function C_e(e){const[t,n]=j.useState(!e);return{ref:j.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function DP(e){const{children:t,className:n,...r}=e,i=j.isValidElement(t)?j.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Kn("chakra-button__icon",n);return g.jsx(ht.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o,children:i})}DP.displayName="ButtonIcon";function jP(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=g.jsx(lE,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:s,...a}=e,c=Kn("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",l=j.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...s}),[s,t,u,r]);return g.jsx(ht.div,{className:c,...a,__css:l,children:i})}jP.displayName="ButtonSpinner";var Ls=Rt((e,t)=>{const n=E_e(),r=Vc("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:s,children:a,leftIcon:c,rightIcon:u,loadingText:l,iconSpacing:d="0.5rem",type:f,spinner:h,spinnerPlacement:p="start",className:m,as:x,...y}=Gi(e),b=j.useMemo(()=>{const S={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:S}}},[r,n]),{ref:v,type:w}=C_e(x),E={rightIcon:u,leftIcon:c,iconSpacing:d,children:a};return g.jsxs(ht.button,{ref:b_e(t,v),as:x,type:f??w,"data-active":zt(s),"data-loading":zt(o),__css:b,className:Kn("chakra-button",m),...y,disabled:i||o,children:[o&&p==="start"&&g.jsx(jP,{className:"chakra-button__spinner--start",label:l,placement:"start",spacing:d,children:h}),o?l||g.jsx(ht.span,{opacity:0,children:g.jsx(Yz,{...E})}):g.jsx(Yz,{...E}),o&&p==="end"&&g.jsx(jP,{className:"chakra-button__spinner--end",label:l,placement:"end",spacing:d,children:h})]})});Ls.displayName="Button";function Yz(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return g.jsxs(g.Fragment,{children:[t&&g.jsx(DP,{marginEnd:i,children:t}),r,n&&g.jsx(DP,{marginStart:i,children:n})]})}var[kft,A_e]=Ha({name:"CheckboxGroupContext",strict:!1});function S_e(e){const[t,n]=j.useState(e),[r,i]=j.useState(!1);return e!==t&&(i(!0),n(e)),r}function k_e(e){return g.jsx(ht.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:g.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function T_e(e){return g.jsx(ht.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:g.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function __e(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?T_e:k_e;return n||t?g.jsx(ht.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:g.jsx(i,{...r})}):null}var[P_e,I_e]=Ha({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[R_e,bre]=Ha({strict:!1,name:"FormControlContext"});function N_e(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...s}=e,a=j.useId(),c=t||`field-${a}`,u=`${c}-label`,l=`${c}-feedback`,d=`${c}-helptext`,[f,h]=j.useState(!1),[p,m]=j.useState(!1),[x,y]=j.useState(!1),b=j.useCallback((I={},A=null)=>({id:d,...I,ref:Vv(A,O=>{O&&m(!0)})}),[d]),v=j.useCallback((I={},A=null)=>({...I,ref:A,"data-focus":zt(x),"data-disabled":zt(i),"data-invalid":zt(r),"data-readonly":zt(o),id:I.id!==void 0?I.id:u,htmlFor:I.htmlFor!==void 0?I.htmlFor:c}),[c,i,x,r,o,u]),w=j.useCallback((I={},A=null)=>({id:l,...I,ref:Vv(A,O=>{O&&h(!0)}),"aria-live":"polite"}),[l]),E=j.useCallback((I={},A=null)=>({...I,...s,ref:A,role:"group","data-focus":zt(x),"data-disabled":zt(i),"data-invalid":zt(r),"data-readonly":zt(o)}),[s,i,x,r,o]),S=j.useCallback((I={},A=null)=>({...I,ref:A,role:"presentation","aria-hidden":!0,children:I.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!x,onFocus:()=>y(!0),onBlur:()=>y(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:p,setHasHelpText:m,id:c,labelId:u,feedbackId:l,helpTextId:d,htmlProps:s,getHelpTextProps:b,getErrorMessageProps:w,getRootProps:E,getLabelProps:v,getRequiredIndicatorProps:S}}var O_e=Rt(function(t,n){const r=i2("Form",t),i=Gi(t),{getRootProps:o,htmlProps:s,...a}=N_e(i),c=Kn("chakra-form-control",t.className);return g.jsx(R_e,{value:a,children:g.jsx(P_e,{value:r,children:g.jsx(ht.div,{...o({},n),className:c,__css:r.container})})})});O_e.displayName="FormControl";var L_e=Rt(function(t,n){const r=bre(),i=I_e(),o=Kn("chakra-form__helper-text",t.className);return g.jsx(ht.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});L_e.displayName="FormHelperText";function vre(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=xre(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":ZA(n),"aria-required":ZA(i),"aria-readonly":ZA(r)}}function xre(e){var t,n,r;const i=bre(),{id:o,disabled:s,readOnly:a,required:c,isRequired:u,isInvalid:l,isReadOnly:d,isDisabled:f,onFocus:h,onBlur:p,...m}=e,x=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&x.push(i.feedbackId),i!=null&&i.hasHelpText&&x.push(i.helpTextId),{...m,"aria-describedby":x.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=s??f)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=a??d)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=c??u)!=null?r:i==null?void 0:i.isRequired,isInvalid:l??(i==null?void 0:i.isInvalid),onFocus:_o(i==null?void 0:i.onFocus,h),onBlur:_o(i==null?void 0:i.onBlur,p)}}var B_e={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},M_e=()=>typeof document<"u",qz=!1,f5=null,Bh=!1,FP=!1,UP=new Set;function UL(e,t){UP.forEach(n=>n(e,t))}var D_e=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function j_e(e){return!(e.metaKey||!D_e&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Zz(e){Bh=!0,j_e(e)&&(f5="keyboard",UL("keyboard",e))}function xp(e){if(f5="pointer",e.type==="mousedown"||e.type==="pointerdown"){Bh=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;UL("pointer",e)}}function F_e(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function U_e(e){F_e(e)&&(Bh=!0,f5="virtual")}function z_e(e){e.target===window||e.target===document||(!Bh&&!FP&&(f5="virtual",UL("virtual",e)),Bh=!1,FP=!1)}function $_e(){Bh=!1,FP=!0}function Jz(){return f5!=="pointer"}function H_e(){if(!M_e()||qz)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Bh=!0,e.apply(this,n)},document.addEventListener("keydown",Zz,!0),document.addEventListener("keyup",Zz,!0),document.addEventListener("click",U_e,!0),window.addEventListener("focus",z_e,!0),window.addEventListener("blur",$_e,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",xp,!0),document.addEventListener("pointermove",xp,!0),document.addEventListener("pointerup",xp,!0)):(document.addEventListener("mousedown",xp,!0),document.addEventListener("mousemove",xp,!0),document.addEventListener("mouseup",xp,!0)),qz=!0}function V_e(e){H_e(),e(Jz());const t=()=>e(Jz());return UP.add(t),()=>{UP.delete(t)}}function W_e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function G_e(e={}){const t=xre(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:s,onBlur:a,onFocus:c,"aria-describedby":u}=t,{defaultChecked:l,isChecked:d,isFocusable:f,onChange:h,isIndeterminate:p,name:m,value:x,tabIndex:y=void 0,"aria-label":b,"aria-labelledby":v,"aria-invalid":w,...E}=e,S=W_e(E,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),I=y8(h),A=y8(a),O=y8(c),[N,R]=j.useState(!1),[_,M]=j.useState(!1),[z,F]=j.useState(!1),[$,W]=j.useState(!1);j.useEffect(()=>V_e(R),[]);const G=j.useRef(null),[H,L]=j.useState(!0),[q,V]=j.useState(!!l),P=d!==void 0,K=P?d:q,ce=j.useCallback(Q=>{if(r||n){Q.preventDefault();return}P||V(K?Q.target.checked:p?!0:Q.target.checked),I==null||I(Q)},[r,n,K,P,p,I]);tf(()=>{G.current&&(G.current.indeterminate=!!p)},[p]),xP(()=>{n&&M(!1)},[n,M]),tf(()=>{const Q=G.current;if(!(Q!=null&&Q.form))return;const se=()=>{V(!!l)};return Q.form.addEventListener("reset",se),()=>{var oe;return(oe=Q.form)==null?void 0:oe.removeEventListener("reset",se)}},[]);const X=n&&!f,ke=j.useCallback(Q=>{Q.key===" "&&W(!0)},[W]),me=j.useCallback(Q=>{Q.key===" "&&W(!1)},[W]);tf(()=>{if(!G.current)return;G.current.checked!==K&&V(G.current.checked)},[G.current]);const Re=j.useCallback((Q={},se=null)=>{const oe=Ce=>{_&&Ce.preventDefault(),W(!0)};return{...Q,ref:se,"data-active":zt($),"data-hover":zt(z),"data-checked":zt(K),"data-focus":zt(_),"data-focus-visible":zt(_&&N),"data-indeterminate":zt(p),"data-disabled":zt(n),"data-invalid":zt(o),"data-readonly":zt(r),"aria-hidden":!0,onMouseDown:_o(Q.onMouseDown,oe),onMouseUp:_o(Q.onMouseUp,()=>W(!1)),onMouseEnter:_o(Q.onMouseEnter,()=>F(!0)),onMouseLeave:_o(Q.onMouseLeave,()=>F(!1))}},[$,K,n,_,N,z,p,o,r]),Be=j.useCallback((Q={},se=null)=>({...Q,ref:se,"data-active":zt($),"data-hover":zt(z),"data-checked":zt(K),"data-focus":zt(_),"data-focus-visible":zt(_&&N),"data-indeterminate":zt(p),"data-disabled":zt(n),"data-invalid":zt(o),"data-readonly":zt(r)}),[$,K,n,_,N,z,p,o,r]),Le=j.useCallback((Q={},se=null)=>({...S,...Q,ref:Vv(se,oe=>{oe&&L(oe.tagName==="LABEL")}),onClick:_o(Q.onClick,()=>{var oe;H||((oe=G.current)==null||oe.click(),requestAnimationFrame(()=>{var Ce;(Ce=G.current)==null||Ce.focus({preventScroll:!0})}))}),"data-disabled":zt(n),"data-checked":zt(K),"data-invalid":zt(o)}),[S,n,K,o,H]),Ne=j.useCallback((Q={},se=null)=>({...Q,ref:Vv(G,se),type:"checkbox",name:m,value:x,id:s,tabIndex:y,onChange:_o(Q.onChange,ce),onBlur:_o(Q.onBlur,A,()=>M(!1)),onFocus:_o(Q.onFocus,O,()=>M(!0)),onKeyDown:_o(Q.onKeyDown,ke),onKeyUp:_o(Q.onKeyUp,me),required:i,checked:K,disabled:X,readOnly:r,"aria-label":b,"aria-labelledby":v,"aria-invalid":w?!!w:o,"aria-describedby":u,"aria-disabled":n,style:B_e}),[m,x,s,ce,A,O,ke,me,i,K,X,r,b,v,w,o,u,n,y]),Me=j.useCallback((Q={},se=null)=>({...Q,ref:se,onMouseDown:_o(Q.onMouseDown,K_e),"data-disabled":zt(n),"data-checked":zt(K),"data-invalid":zt(o)}),[K,n,o]);return{state:{isInvalid:o,isFocused:_,isChecked:K,isActive:$,isHovered:z,isIndeterminate:p,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Le,getCheckboxProps:Re,getIndicatorProps:Be,getInputProps:Ne,getLabelProps:Me,htmlProps:S}}function K_e(e){e.preventDefault(),e.stopPropagation()}var Q_e={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Y_e={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},q_e=q7({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),Z_e=q7({from:{opacity:0},to:{opacity:1}}),J_e=q7({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),wre=Rt(function(t,n){const r=A_e(),i={...r,...t},o=i2("Checkbox",i),s=Gi(t),{spacing:a="0.5rem",className:c,children:u,iconColor:l,iconSize:d,icon:f=g.jsx(__e,{}),isChecked:h,isDisabled:p=r==null?void 0:r.isDisabled,onChange:m,inputProps:x,...y}=s;let b=h;r!=null&&r.value&&s.value&&(b=r.value.includes(s.value));let v=m;r!=null&&r.onChange&&s.value&&(v=n5e(r.onChange,m));const{state:w,getInputProps:E,getCheckboxProps:S,getLabelProps:I,getRootProps:A}=G_e({...y,isDisabled:p,isChecked:b,onChange:v}),O=S_e(w.isChecked),N=j.useMemo(()=>({animation:O?w.isIndeterminate?`${Z_e} 20ms linear, ${J_e} 200ms linear`:`${q_e} 200ms linear`:void 0,fontSize:d,color:l,...o.icon}),[l,d,O,w.isIndeterminate,o.icon]),R=j.cloneElement(f,{__css:N,isIndeterminate:w.isIndeterminate,isChecked:w.isChecked});return g.jsxs(ht.label,{__css:{...Y_e,...o.container},className:Kn("chakra-checkbox",c),...A(),children:[g.jsx("input",{className:"chakra-checkbox__input",...E(x,n)}),g.jsx(ht.span,{__css:{...Q_e,...o.control},className:"chakra-checkbox__control",...S(),children:R}),u&&g.jsx(ht.span,{className:"chakra-checkbox__label",...I(),__css:{marginStart:a,...o.label},children:u})]})});wre.displayName="Checkbox";var Ere={exports:{}},X_e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ePe=X_e,tPe=ePe;function Cre(){}function Are(){}Are.resetWarningCache=Cre;var nPe=function(){function e(r,i,o,s,a,c){if(c!==tPe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Are,resetWarningCache:Cre};return n.PropTypes=n,n};Ere.exports=nPe();var Sre=Ere.exports,zP=function(e,t){return zP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},zP(e,t)};function dE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zP(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ze=function(){return ze=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function Tre(e,t){return function(n,r){t(n,r,e)}}function rPe(e,t,n,r,i,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=r.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!t&&e?r.static?e:e.prototype:null,l=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d,f=!1,h=n.length-1;h>=0;h--){var p={};for(var m in r)p[m]=m==="access"?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(y){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var x=(0,n[h])(a==="accessor"?{get:l.get,set:l.set}:l[c],p);if(a==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(d=s(x.get))&&(l.get=d),(d=s(x.set))&&(l.set=d),(d=s(x.init))&&i.unshift(d)}else(d=s(x))&&(a==="field"?i.unshift(d):l[c]=d)}u&&Object.defineProperty(u,r.name,l),f=!0}function iPe(e,t,n){for(var r=arguments.length>2,i=0;i0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Nre(){for(var e=[],t=0;t1||c(h,m)})},p&&(i[h]=p(i[h])))}function c(h,p){try{u(r[h](p))}catch(m){f(o[0][3],m)}}function u(h){h.value instanceof pm?Promise.resolve(h.value.v).then(l,d):f(o[0][2],h)}function l(h){c("next",h)}function d(h){c("throw",h)}function f(h,p){h(p),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Bre(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,o){t[i]=e[i]?function(s){return(n=!n)?{value:pm(e[i](s)),done:!1}:o?o(s):s}:o}}function Mre(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Wv=="function"?Wv(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function Dre(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var aPe=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function jre(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&fE(t,e,n);return aPe(t,e),t}function Fre(e){return e&&e.__esModule?e:{default:e}}function Ure(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function zre(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function $re(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Hre(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var cPe=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Vre(e){function t(r){e.error=e.hasError?new cPe(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(o){return t(o),n()})}catch(o){t(o)}}if(e.hasError)throw e.error}return n()}const uPe={__extends:dE,__assign:ze,__rest:Ki,__decorate:kre,__param:Tre,__metadata:_re,__awaiter:Pre,__generator:Ire,__createBinding:fE,__exportStar:Rre,__values:Wv,__read:Dn,__spread:Nre,__spreadArrays:Ore,__spreadArray:Wo,__await:pm,__asyncGenerator:Lre,__asyncDelegator:Bre,__asyncValues:Mre,__makeTemplateObject:Dre,__importStar:jre,__importDefault:Fre,__classPrivateFieldGet:Ure,__classPrivateFieldSet:zre,__classPrivateFieldIn:$re,__addDisposableResource:Hre,__disposeResources:Vre},Tft=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Hre,get __assign(){return ze},__asyncDelegator:Bre,__asyncGenerator:Lre,__asyncValues:Mre,__await:pm,__awaiter:Pre,__classPrivateFieldGet:Ure,__classPrivateFieldIn:$re,__classPrivateFieldSet:zre,__createBinding:fE,__decorate:kre,__disposeResources:Vre,__esDecorate:rPe,__exportStar:Rre,__extends:dE,__generator:Ire,__importDefault:Fre,__importStar:jre,__makeTemplateObject:Dre,__metadata:_re,__param:Tre,__propKey:oPe,__read:Dn,__rest:Ki,__runInitializers:iPe,__setFunctionName:sPe,__spread:Nre,__spreadArray:Wo,__spreadArrays:Ore,__values:Wv,default:uPe},Symbol.toStringTag,{value:"Module"}));var zL=Rt(function(t,n){const{htmlSize:r,...i}=t,o=i2("Input",i),s=Gi(i),a=vre(s),c=Kn("chakra-input",t.className);return g.jsx(ht.input,{size:r,...a,__css:o.field,ref:n,className:c})});zL.displayName="Input";zL.id="Input";var Bo=Rt(function(t,n){const r=Vc("Link",t),{className:i,isExternal:o,...s}=Gi(t);return g.jsx(ht.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Kn("chakra-link",i),...s,__css:r})});Bo.displayName="Link";var[lPe,Wre]=Ha({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),hE=Rt(function(t,n){const r=i2("List",t),{children:i,styleType:o="none",stylePosition:s,spacing:a,...c}=Gi(t),u=yre(i),d=a?{["& > *:not(style) ~ *:not(style)"]:{mt:a}}:{};return g.jsx(lPe,{value:r,children:g.jsx(ht.ul,{ref:n,listStyleType:o,listStylePosition:s,role:"list",__css:{...r.container,...d},...c,children:u})})});hE.displayName="List";var $P=Rt((e,t)=>{const{as:n,...r}=e;return g.jsx(hE,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});$P.displayName="OrderedList";var HP=Rt(function(t,n){const{as:r,...i}=t;return g.jsx(hE,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});HP.displayName="UnorderedList";var Kw=Rt(function(t,n){const r=Wre();return g.jsx(ht.li,{ref:n,...t,__css:r.item})});Kw.displayName="ListItem";var dPe=Rt(function(t,n){const r=Wre();return g.jsx(s2,{ref:n,role:"presentation",...t,__css:r.icon})});dPe.displayName="ListIcon";function fPe(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):zs(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var hi=Rt(function(t,n){const r=Vc("Text",t),{className:i,align:o,decoration:s,casing:a,...c}=Gi(t),u=rCe({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return g.jsx(ht.p,{ref:n,className:Kn("chakra-text",t.className),...u,...c,__css:r})});hi.displayName="Text";var Gre=Rt(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:s,justify:a,direction:c,align:u,className:l,shouldWrapChildren:d,...f}=t,h=j.useMemo(()=>d?j.Children.map(s,(p,m)=>g.jsx(pu,{children:p},m)):s,[s,d]);return g.jsx(ht.div,{ref:n,className:Kn("chakra-wrap",l),...f,children:g.jsx(ht.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:u,flexDirection:c,listStyleType:"none",gap:r,columnGap:i,rowGap:o,padding:"0"},children:h})})});Gre.displayName="Wrap";var pu=Rt(function(t,n){const{className:r,...i}=t;return g.jsx(ht.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Kn("chakra-wrap__listitem",r),...i})});pu.displayName="WrapItem";var Kre=e=>g.jsx(ht.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Kre.displayName="StackItem";function hPe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":fPe(n,i=>r[i])}}var Qre=Rt((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:s="0.5rem",wrap:a,children:c,divider:u,className:l,shouldWrapChildren:d,...f}=e,h=n?"row":r??"column",p=j.useMemo(()=>hPe({spacing:s,direction:h}),[s,h]),m=!!u,x=!d&&!m,y=j.useMemo(()=>{const v=yre(c);return x?v:v.map((w,E)=>{const S=typeof w.key<"u"?w.key:E,I=E+1===v.length,O=d?g.jsx(Kre,{children:w},S):w;if(!m)return O;const N=j.cloneElement(u,{__css:p}),R=I?null:N;return g.jsxs(j.Fragment,{children:[O,R]},S)})},[u,p,m,x,d,c]),b=Kn("chakra-stack",l);return g.jsx(ht.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:h,flexWrap:a,gap:m?void 0:s,className:b,...f,children:y})});Qre.displayName="Stack";var Af=Rt((e,t)=>g.jsx(Qre,{align:"center",...e,direction:"column",ref:t}));Af.displayName="VStack";var Gr=Rt(function(t,n){const r=Vc("Heading",t),{className:i,...o}=Gi(t);return g.jsx(ht.h2,{ref:n,className:Kn("chakra-heading",t.className),...o,__css:r})});Gr.displayName="Heading";var R0=ht("div");R0.displayName="Box";var Yre=Rt(function(t,n){const{size:r,centerContent:i=!0,...o}=t,s=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return g.jsx(R0,{ref:n,boxSize:r,__css:{...s,flexShrink:0,flexGrow:0},...o})});Yre.displayName="Square";var pPe=Rt(function(t,n){const{size:r,...i}=t;return g.jsx(Yre,{size:r,ref:n,borderRadius:"9999px",...i})});pPe.displayName="Circle";var qre=ht("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});qre.displayName="Center";var gPe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Rt(function(t,n){const{axis:r="both",...i}=t;return g.jsx(ht.div,{ref:n,__css:gPe[r],...i,position:"absolute"})});var VP=Rt(function(t,n){const r=Vc("Code",t),{className:i,...o}=Gi(t);return g.jsx(ht.code,{ref:n,className:Kn("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});VP.displayName="Code";var Zre=Rt(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:s,borderWidth:a,borderStyle:c,borderColor:u,...l}=Vc("Divider",t),{className:d,orientation:f="horizontal",__css:h,...p}=Gi(t),m={vertical:{borderLeftWidth:r||s||a||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||a||"1px",width:"100%"}};return g.jsx(ht.hr,{ref:n,"aria-orientation":f,...p,__css:{...l,border:"0",borderColor:u,borderStyle:c,...m[f],...h},className:Kn("chakra-divider",d)})});Zre.displayName="Divider";var[mPe,h5]=Ha({name:"TableStylesContext",errorMessage:`useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$L=Rt((e,t)=>{const n=i2("Table",e),{className:r,layout:i,...o}=Gi(e);return g.jsx(mPe,{value:n,children:g.jsx(ht.table,{ref:t,__css:{tableLayout:i,...n.table},className:Kn("chakra-table",r),...o})})});$L.displayName="Table";var Jre=Rt((e,t)=>{const n=h5();return g.jsx(ht.thead,{...e,ref:t,__css:n.thead})}),WP=Rt((e,t)=>{const n=h5();return g.jsx(ht.tr,{...e,ref:t,__css:n.tr})}),yPe=Rt((e,t)=>{var n;const{overflow:r,overflowX:i,className:o,...s}=e;return g.jsx(ht.div,{ref:t,className:Kn("chakra-table__container",o),...s,__css:{display:"block",whiteSpace:"nowrap",WebkitOverflowScrolling:"touch",overflowX:(n=r??i)!=null?n:"auto",overflowY:"hidden",maxWidth:"100%"}})}),Xre=Rt((e,t)=>{const n=h5();return g.jsx(ht.tbody,{...e,ref:t,__css:n.tbody})}),w8=Rt(({isNumeric:e,...t},n)=>{const r=h5();return g.jsx(ht.td,{...t,ref:n,__css:r.td,"data-is-numeric":e})}),E8=Rt(({isNumeric:e,...t},n)=>{const r=h5();return g.jsx(ht.th,{...t,ref:n,__css:r.th,"data-is-numeric":e})});function bPe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var vPe=["h","minH","height","minHeight"],C8=Rt((e,t)=>{const n=Vc("Textarea",e),{className:r,rows:i,...o}=Gi(e),s=vre(o),a=i?bPe(n,vPe):n;return g.jsx(ht.textarea,{ref:t,rows:i,...s,className:Kn("chakra-textarea",r),__css:a})});C8.displayName="Textarea";const xPe="CBD (as in Cloud-Based Demo)",wPe="https://www.openstreetmap.org/search?query=berlin#map=11/52.5072/13.4248",EPe="https://github.com/social-dist0rtion-protocol/thc-demo/issues",CPe="thc-demo.dist0rtion.com",APe="0x487837e29e770B7D569a91848b6dD36eA1Ed6c04",SPe=11155111,pE={name:xPe,mapUrl:wPe,helpUrl:EPe,cname:CPe,thcAddress:APe,chainId:SPe},eie=pE.name,kPe=pE.mapUrl,TPe=pE.helpUrl,Mh=pE.chainId,_Pe="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",tie="https://eth-sepolia.g.alchemy.com/v2/pDSMvqEHCLgbBdL7oUaDer8HxBx24hDu",PPe="933e43f98ac5ea20f4a52778ffa16051";function IPe(){return g.jsxs(Gre,{justify:"center",marginTop:"20px",children:[g.jsx(pu,{children:g.jsx(Bo,{href:"/",children:g.jsxs(Ls,{variant:"menu",children:["<<","H","<","ome"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:"/#sides",children:g.jsxs(Ls,{variant:"menu",children:["<<","S","<","ide Quests"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:kPe,children:g.jsxs(Ls,{variant:"menu",children:["<<","M","<","ap"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:TPe,children:g.jsxs(Ls,{variant:"menu",children:["<<","H","<","elp"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:"/#leaderboard",children:g.jsxs(Ls,{variant:"menu",children:["<<","L","<","eaderboard"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:"/#settings",children:g.jsxs(Ls,{variant:"menu",children:["<<","S","<","ettings"]})})}),g.jsx(pu,{children:g.jsx(Bo,{href:"/#faq",children:g.jsxs(Ls,{variant:"menu",children:["<<","F","<","AQ"]})})})]})}function nie(e,t){window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:t}))}const Xz=(e,t)=>{const n=JSON.stringify(t);window.localStorage.setItem(e,n),nie(e,n)},RPe=e=>{window.localStorage.removeItem(e),nie(e,null)},e$=e=>window.localStorage.getItem(e),NPe=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),OPe=()=>{throw Error("useLocalStorage is a client-only hook")};function rie(e,t){const n=()=>e$(e),r=j.useSyncExternalStore(NPe,n,OPe),i=j.useCallback(o=>{try{const s=typeof o=="function"?o(JSON.parse(r)):o;s==null?RPe(e):Xz(e,s)}catch(s){console.warn(s)}},[e,r]);return j.useEffect(()=>{e$(e)===null&&typeof t<"u"&&Xz(e,t)},[e,t]),[r?JSON.parse(r):t,i]}function LPe(){const[e,t]=j.useState({width:null,height:null});return j.useLayoutEffect(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}function BPe(){const e=LPe();return e.width/e.height<1}function MPe({children:e}){const t=BPe();return g.jsx(qre,{children:g.jsxs(Af,{width:"90%",children:[g.jsx(IPe,{}),g.jsx(R0,{backgroundColor:"transparent",marginTop:"20px",marginBottom:"60px",width:t?"95%":"40%",children:e})]})})}const DPe={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},jPe={block:A2e({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(r=>{if(typeof r=="string")return r;const i=_O(r);return i.typeHex==="0x7e"&&(i.isSystemTx=r.isSystemTx,i.mint=r.mint?g0(r.mint):void 0,i.sourceHash=r.sourceHash,i.type="deposit"),i}),stateRoot:e.stateRoot}}}),transaction:w2e({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?g0(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Rbe({format(e){return{l1GasPrice:e.l1GasPrice?g0(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?g0(e.l1GasUsed):null,l1Fee:e.l1Fee?g0(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function FPe(e,t){return $Pe(e)?zPe(e):Vbe(e,t)}const UPe={transaction:FPe};function zPe(e){HPe(e);const{sourceHash:t,data:n,from:r,gas:i,isSystemTx:o,mint:s,to:a,value:c}=e,u=[t,r,a??"0x",s?kt(s):"0x",c?kt(c):"0x",i?kt(i):"0x",o?"0x1":"0x",n??"0x"];return xf(["0x7e",Ih(u)])}function $Pe(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function HPe(e){const{from:t,to:n}=e;if(t&&!Hi(t))throw new Gs({address:t});if(n&&!Hi(n))throw new Gs({address:n})}const t$={contracts:DPe,formatters:jPe,serializers:UPe},n$=mee({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),J2=1,r$=mee({...t$,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...t$.contracts,disputeGameFactory:{[J2]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[J2]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[J2]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[J2]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:J2});gE.type="coinbaseWallet";function gE(e={}){return e.version==="3"||e.headlessMode?WPe(e):VPe(e)}function VPe(e){let t,n,r,i,o;return s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:gE.type,async connect({chainId:a}={}){try{const c=await this.getProvider(),u=(await c.request({method:"eth_requestAccounts"})).map(d=>Uo(d));r||(r=this.onAccountsChanged.bind(this),c.on("accountsChanged",r)),i||(i=this.onChainChanged.bind(this),c.on("chainChanged",i)),o||(o=this.onDisconnect.bind(this),c.on("disconnect",o));let l=await this.getChainId();if(a&&l!==a){const d=await this.switchChain({chainId:a}).catch(f=>{if(f.code===Vn.code)throw f;return{id:l}});l=(d==null?void 0:d.id)??l}return{accounts:u,chainId:l}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new Vn(c):c}},async disconnect(){var c;const a=await this.getProvider();r&&(a.removeListener("accountsChanged",r),r=void 0),i&&(a.removeListener("chainChanged",i),i=void 0),o&&(a.removeListener("disconnect",o),o=void 0),a.disconnect(),(c=a.close)==null||c.call(a)},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>Uo(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!n){const a=await(async()=>{const{default:c}=await P7(async()=>{const{default:u}=await import("./index-Y3Spvhtd.js").then(l=>l.i);return{default:u}},__vite__mapDeps([0,1,2]));return typeof c!="function"&&typeof c.default=="function"?c.default:c})();t=new a({...e,appChainIds:s.chains.map(c=>c.id)}),n=t.makeWeb3Provider({...e,options:e.preference??"all"})}return n},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:c}){var d,f,h,p;const u=s.chains.find(m=>m.id===c);if(!u)throw new Ks(new Lh);const l=await this.getProvider();try{return await l.request({method:"wallet_switchEthereumChain",params:[{chainId:sn(u.id)}]}),u}catch(m){if(m.code===4902)try{let x;a!=null&&a.blockExplorerUrls?x=a.blockExplorerUrls:x=(d=u.blockExplorers)!=null&&d.default.url?[(f=u.blockExplorers)==null?void 0:f.default.url]:[];let y;(h=a==null?void 0:a.rpcUrls)!=null&&h.length?y=a.rpcUrls:y=[((p=u.rpcUrls.default)==null?void 0:p.http[0])??""];const b={blockExplorerUrls:x,chainId:sn(c),chainName:(a==null?void 0:a.chainName)??u.name,iconUrls:a==null?void 0:a.iconUrls,nativeCurrency:(a==null?void 0:a.nativeCurrency)??u.nativeCurrency,rpcUrls:y};return await l.request({method:"wallet_addEthereumChain",params:[b]}),u}catch(x){throw new Vn(x)}throw new Ks(m)}},onAccountsChanged(a){a.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:a.map(c=>Uo(c))})},onChainChanged(a){const c=Number(a);s.emitter.emit("change",{chainId:c})},async onDisconnect(a){s.emitter.emit("disconnect");const c=await this.getProvider();r&&(c.removeListener("accountsChanged",r),r=void 0),i&&(c.removeListener("chainChanged",i),i=void 0),o&&(c.removeListener("disconnect",o),o=void 0)}})}function WPe(e){let n,r,i,o,s;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:gE.type,async connect({chainId:c}={}){try{const u=await this.getProvider(),l=(await u.request({method:"eth_requestAccounts"})).map(f=>Uo(f));i||(i=this.onAccountsChanged.bind(this),u.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),u.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),u.on("disconnect",s));let d=await this.getChainId();if(c&&d!==c){const f=await this.switchChain({chainId:c}).catch(h=>{if(h.code===Vn.code)throw h;return{id:d}});d=(f==null?void 0:f.id)??d}return{accounts:l,chainId:d}}catch(u){throw/(user closed modal|accounts received is empty|user denied account)/i.test(u.message)?new Vn(u):u}},async disconnect(){const c=await this.getProvider();i&&(c.removeListener("accountsChanged",i),i=void 0),o&&(c.removeListener("chainChanged",o),o=void 0),s&&(c.removeListener("disconnect",s),s=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(u=>Uo(u))},async getChainId(){const u=await(await this.getProvider()).request({method:"eth_chainId"});return Number(u)},async getProvider(){var c;if(!r){const u=await(async()=>{const{default:p}=await P7(async()=>{const{default:m}=await import("./index-BRISspn-.js").then(x=>x.i);return{default:m}},__vite__mapDeps([3,2,1]));return typeof p!="function"&&typeof p.default=="function"?p.default:p})();n=new u({...e,reloadOnDisconnect:!1});const l=(c=n.walletExtension)==null?void 0:c.getChainId(),d=a.chains.find(p=>e.chainId?p.id===e.chainId:p.id===l)||a.chains[0],f=e.chainId||(d==null?void 0:d.id),h=e.jsonRpcUrl||(d==null?void 0:d.rpcUrls.default.http[0]);r=n.makeWeb3Provider(h,f)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:u}){var f,h,p,m;const l=a.chains.find(x=>x.id===u);if(!l)throw new Ks(new Lh);const d=await this.getProvider();try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:sn(l.id)}]}),l}catch(x){if(x.code===4902)try{let y;c!=null&&c.blockExplorerUrls?y=c.blockExplorerUrls:y=(f=l.blockExplorers)!=null&&f.default.url?[(h=l.blockExplorers)==null?void 0:h.default.url]:[];let b;(p=c==null?void 0:c.rpcUrls)!=null&&p.length?b=c.rpcUrls:b=[((m=l.rpcUrls.default)==null?void 0:m.http[0])??""];const v={blockExplorerUrls:y,chainId:sn(u),chainName:(c==null?void 0:c.chainName)??l.name,iconUrls:c==null?void 0:c.iconUrls,nativeCurrency:(c==null?void 0:c.nativeCurrency)??l.nativeCurrency,rpcUrls:b};return await d.request({method:"wallet_addEthereumChain",params:[v]}),l}catch(y){throw new Vn(y)}throw new Ks(x)}},onAccountsChanged(c){c.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:c.map(u=>Uo(u))})},onChainChanged(c){const u=Number(c);a.emitter.emit("change",{chainId:u})},async onDisconnect(c){a.emitter.emit("disconnect");const u=await this.getProvider();i&&(u.removeListener("accountsChanged",i),i=void 0),o&&(u.removeListener("chainChanged",o),o=void 0),s&&(u.removeListener("disconnect",s),s=void 0)}})}mE.type="walletConnect";function mE(e){const t=e.isNewChainsStale??!0;let n,r;const i="eip155";let o,s,a,c,u,l;return d=>({id:"walletConnect",name:"WalletConnect",type:mE.type,async setup(){const f=await this.getProvider().catch(()=>null);f&&(a||(a=this.onConnect.bind(this),f.on("connect",a)),u||(u=this.onSessionDelete.bind(this),f.on("session_delete",u)))},async connect({chainId:f,...h}={}){var p,m;try{const x=await this.getProvider();if(!x)throw new od;c||(c=this.onDisplayUri,x.on("display_uri",c));let y=f;if(!y){const E=await((p=d.storage)==null?void 0:p.getItem("state"))??{};d.chains.some(I=>I.id===E.chainId)?y=E.chainId:y=(m=d.chains[0])==null?void 0:m.id}if(!y)throw new Error("No chains found on connector.");const b=await this.isChainsStale();if(x.session&&b&&await x.disconnect(),!x.session||b){const E=d.chains.filter(S=>S.id!==y).map(S=>S.id);await x.connect({optionalChains:[y,...E],..."pairingTopic"in h?{pairingTopic:h.pairingTopic}:{}}),this.setRequestedChainsIds(d.chains.map(S=>S.id))}const v=(await x.enable()).map(E=>Uo(E)),w=await this.getChainId();return c&&(x.removeListener("display_uri",c),c=void 0),a&&(x.removeListener("connect",a),a=void 0),o||(o=this.onAccountsChanged.bind(this),x.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),x.on("chainChanged",s)),l||(l=this.onDisconnect.bind(this),x.on("disconnect",l)),u||(u=this.onSessionDelete.bind(this),x.on("session_delete",u)),{accounts:v,chainId:w}}catch(x){throw/(user rejected|connection request reset)/i.test(x==null?void 0:x.message)?new Vn(x):x}},async disconnect(){const f=await this.getProvider();try{await(f==null?void 0:f.disconnect())}catch(h){if(!/No matching key/i.test(h.message))throw h}finally{s&&(f==null||f.removeListener("chainChanged",s),s=void 0),l&&(f==null||f.removeListener("disconnect",l),l=void 0),a||(a=this.onConnect.bind(this),f==null||f.on("connect",a)),o&&(f==null||f.removeListener("accountsChanged",o),o=void 0),u&&(f==null||f.removeListener("session_delete",u),u=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(h=>Uo(h))},async getProvider({chainId:f}={}){var p;async function h(){const m=d.chains.map(y=>y.id);if(!m.length)return;const{EthereumProvider:x}=await P7(async()=>{const{EthereumProvider:y}=await import("./index.es-D_NNZUrP.js");return{EthereumProvider:y}},__vite__mapDeps([4,2]));return await x.init({...e,disableProviderPing:!0,optionalChains:m,projectId:e.projectId,rpcMap:Object.fromEntries(d.chains.map(y=>{const[b]=j3e({chain:y,transports:d.transports});return[y.id,b]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=h()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),f&&await((p=this.switchChain)==null?void 0:p.call(this,{chainId:f})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[f,h]=await Promise.all([this.getAccounts(),this.getProvider()]);return f.length?await this.isChainsStale()&&h.session?(await h.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:f,chainId:h}){var x,y,b;const p=await this.getProvider();if(!p)throw new od;const m=d.chains.find(v=>v.id===h);if(!m)throw new Ks(new Lh);try{await Promise.all([new Promise(w=>{const E=({chainId:S})=>{S===h&&(d.emitter.off("change",E),w())};d.emitter.on("change",E)}),p.request({method:"wallet_switchEthereumChain",params:[{chainId:sn(h)}]})]);const v=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...v,h]),m}catch(v){const w=v;if(/(user rejected)/i.test(w.message))throw new Vn(w);try{let E;f!=null&&f.blockExplorerUrls?E=f.blockExplorerUrls:E=(x=m.blockExplorers)!=null&&x.default.url?[(y=m.blockExplorers)==null?void 0:y.default.url]:[];let S;(b=f==null?void 0:f.rpcUrls)!=null&&b.length?S=f.rpcUrls:S=[...m.rpcUrls.default.http];const I={blockExplorerUrls:E,chainId:sn(h),chainName:(f==null?void 0:f.chainName)??m.name,iconUrls:f==null?void 0:f.iconUrls,nativeCurrency:(f==null?void 0:f.nativeCurrency)??m.nativeCurrency,rpcUrls:S};await p.request({method:"wallet_addEthereumChain",params:[I]});const A=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...A,h]),m}catch(E){throw new Vn(E)}}},onAccountsChanged(f){f.length===0?this.onDisconnect():d.emitter.emit("change",{accounts:f.map(h=>Uo(h))})},onChainChanged(f){const h=Number(f);d.emitter.emit("change",{chainId:h})},async onConnect(f){const h=Number(f.chainId),p=await this.getAccounts();d.emitter.emit("connect",{accounts:p,chainId:h})},async onDisconnect(f){this.setRequestedChainsIds([]),d.emitter.emit("disconnect");const h=await this.getProvider();o&&(h.removeListener("accountsChanged",o),o=void 0),s&&(h.removeListener("chainChanged",s),s=void 0),l&&(h.removeListener("disconnect",l),l=void 0),u&&(h.removeListener("session_delete",u),u=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a))},onDisplayUri(f){d.emitter.emit("message",{type:"display_uri",data:f})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var h,p,m;return n?((m=(p=(h=n.session)==null?void 0:h.namespaces[i])==null?void 0:p.accounts)==null?void 0:m.map(x=>Number.parseInt(x.split(":")[1]||"")))??[]:[]},async getRequestedChainsIds(){var f;return await((f=d.storage)==null?void 0:f.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const f=d.chains.map(m=>m.id),h=this.getNamespaceChainsIds();if(h.length&&!h.some(m=>f.includes(m)))return!1;const p=await this.getRequestedChainsIds();return!f.every(m=>p.includes(m))},async setRequestedChainsIds(f){var h;await((h=d.storage)==null?void 0:h.setItem(this.requestedChainsStorageKey,f))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const GPe=_ee({chains:[r$],connectors:[t5(),gE(),mE({projectId:PPe})],transports:{[r$.id]:wee(tie)}});var i$=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ZPe:typeof navigator<"u"?nIe(navigator.userAgent):iIe()}function tIe(e){return e!==""&&eIe.reduce(function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]},!1)}function nIe(e){var t=tIe(e);if(!t)return null;var n=t[0],r=t[1];if(n==="searchbot")return new qPe;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length"u"||sIe===void 0?aIe:"production",Jc=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},Gv={measureLayout:Jc(["layout","layoutId","drag"]),animation:Jc(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Jc(["exit"]),drag:Jc(["drag","dragControls"]),focus:Jc(["whileFocus"]),hover:Jc(["whileHover","onHoverStart","onHoverEnd"]),tap:Jc(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Jc(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Jc(["whileInView","onViewportEnter","onViewportLeave"])};function cIe(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?Gv.projectionNodeConstructor=e[t]:Gv[t].Component=e[t])}var Kv=function(){},oie=j.createContext({strict:!1}),sie=Object.keys(Gv),uIe=sie.length;function lIe(e,t,n){var r=[],i=j.useContext(oie);if(!t)return null;HL!=="production"&&n&&i.strict;for(var o=0;o"u")return t;var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var _Ie=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function WL(e){return typeof e!="string"||e.includes("-")?!1:!!(_Ie.indexOf(e)>-1||/[A-Z]/.test(e))}var Yw={};function PIe(e){Object.assign(Yw,e)}var KP=["","X","Y","Z"],IIe=["translate","scale","rotate","skew"],Yv=["transformPerspective","x","y","z"];IIe.forEach(function(e){return KP.forEach(function(t){return Yv.push(e+t)})});function RIe(e,t){return Yv.indexOf(e)-Yv.indexOf(t)}var NIe=new Set(Yv);function g5(e){return NIe.has(e)}var OIe=new Set(["originX","originY","originZ"]);function fie(e){return OIe.has(e)}function hie(e,t){var n=t.layout,r=t.layoutId;return g5(e)||fie(e)||(n||r!==void 0)&&(!!Yw[e]||e==="opacity")}var ll=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},LIe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function BIe(e,t,n,r){var i=e.transform,o=e.transformKeys,s=t.enableHardwareAcceleration,a=s===void 0?!0:s,c=t.allowTransformNone,u=c===void 0?!0:c,l="";o.sort(RIe);for(var d=!1,f=o.length,h=0;hn=>Math.max(Math.min(n,t),e),v3=e=>e%1?Number(e.toFixed(5)):e,qv=/(-)?([\d]*\.?[\d])+/g,QP=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,jIe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function m5(e){return typeof e=="string"}const ep={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},x3=Object.assign(Object.assign({},ep),{transform:gie(0,1)}),qx=Object.assign(Object.assign({},ep),{default:1}),y5=e=>({test:t=>m5(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ql=y5("deg"),Fc=y5("%"),gt=y5("px"),FIe=y5("vh"),UIe=y5("vw"),c$=Object.assign(Object.assign({},Fc),{parse:e=>Fc.parse(e)/100,transform:e=>Fc.transform(e*100)}),GL=(e,t)=>n=>!!(m5(n)&&jIe.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),mie=(e,t,n)=>r=>{if(!m5(r))return r;const[i,o,s,a]=r.match(qv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},N0={test:GL("hsl","hue"),parse:mie("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fc.transform(v3(t))+", "+Fc.transform(v3(n))+", "+v3(x3.transform(r))+")"},zIe=gie(0,255),PS=Object.assign(Object.assign({},ep),{transform:e=>Math.round(zIe(e))}),Fd={test:GL("rgb","red"),parse:mie("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+PS.transform(e)+", "+PS.transform(t)+", "+PS.transform(n)+", "+v3(x3.transform(r))+")"};function $Ie(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const YP={test:GL("#"),parse:$Ie,transform:Fd.transform},Oi={test:e=>Fd.test(e)||YP.test(e)||N0.test(e),parse:e=>Fd.test(e)?Fd.parse(e):N0.test(e)?N0.parse(e):YP.parse(e),transform:e=>m5(e)?e:e.hasOwnProperty("red")?Fd.transform(e):N0.transform(e)},yie="${c}",bie="${n}";function HIe(e){var t,n,r,i;return isNaN(e)&&m5(e)&&((n=(t=e.match(qv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(QP))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function vie(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(QP);r&&(n=r.length,e=e.replace(QP,yie),t.push(...r.map(Oi.parse)));const i=e.match(qv);return i&&(e=e.replace(qv,bie),t.push(...i.map(ep.parse))),{values:t,numColors:n,tokenised:e}}function xie(e){return vie(e).values}function wie(e){const{values:t,numColors:n,tokenised:r}=vie(e),i=t.length;return o=>{let s=r;for(let a=0;atypeof e=="number"?0:e;function WIe(e){const t=xie(e);return wie(e)(t.map(VIe))}const dl={test:HIe,parse:xie,createTransformer:wie,getAnimatableNone:WIe},GIe=new Set(["brightness","contrast","saturate","opacity"]);function KIe(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qv)||[];if(!r)return e;const i=n.replace(r,"");let o=GIe.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const QIe=/([a-z-]*)\(.*?\)/g,qP=Object.assign(Object.assign({},dl),{getAnimatableNone:e=>{const t=e.match(QIe);return t?t.map(KIe).join(" "):e}});var u$=ze(ze({},ep),{transform:Math.round}),Eie={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,radius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,size:gt,top:gt,right:gt,bottom:gt,left:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,rotate:ql,rotateX:ql,rotateY:ql,rotateZ:ql,scale:qx,scaleX:qx,scaleY:qx,scaleZ:qx,skew:ql,skewX:ql,skewY:ql,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:x3,originX:c$,originY:c$,originZ:gt,zIndex:u$,fillOpacity:x3,strokeOpacity:x3,numOctaves:u$};function KL(e,t,n,r){var i,o=e.style,s=e.vars,a=e.transform,c=e.transformKeys,u=e.transformOrigin;c.length=0;var l=!1,d=!1,f=!0;for(var h in t){var p=t[h];if(pie(h)){s[h]=p;continue}var m=Eie[h],x=DIe(p,m);if(g5(h)){if(l=!0,a[h]=x,c.push(h),!f)continue;p!==((i=m.default)!==null&&i!==void 0?i:0)&&(f=!1)}else fie(h)?(u[h]=x,d=!0):o[h]=x}l?o.transform=BIe(e,n,f,r):r?o.transform=r({},""):!t.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=MIe(u))}var QL=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Cie(e,t,n){for(var r in t)!ll(t[r])&&!hie(r,n)&&(e[r]=t[r])}function YIe(e,t,n){var r=e.transformTemplate;return j.useMemo(function(){var i=QL();KL(i,t,{enableHardwareAcceleration:!n},r);var o=i.vars,s=i.style;return ze(ze({},o),s)},[t])}function qIe(e,t,n){var r=e.style||{},i={};return Cie(i,r,e),Object.assign(i,YIe(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function ZIe(e,t,n){var r={},i=qIe(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),r.style=i,r}var JIe=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function qw(e){return JIe.has(e)}var Aie=function(e){return!qw(e)};function Sie(e){e&&(Aie=function(t){return t.startsWith("on")?!qw(t):e(t)})}try{Sie(require("@emotion/is-prop-valid").default)}catch{}function XIe(e,t,n){var r={};for(var i in e)(Aie(i)||n===!0&&qw(i)||!t&&!qw(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function l$(e,t,n){return typeof e=="string"?e:gt.transform(t+n*e)}function eRe(e,t,n){var r=l$(t,e.x,e.width),i=l$(n,e.y,e.height);return"".concat(r," ").concat(i)}var tRe={offset:"strokeDashoffset",array:"strokeDasharray"};function nRe(e,t,n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),e.pathLength=1;var o=tRe;e[o.offset]=gt.transform(-r);var s=gt.transform(t),a=gt.transform(n);e[o.array]="".concat(s," ").concat(a)}function YL(e,t,n,r){var i=t.attrX,o=t.attrY,s=t.originX,a=t.originY,c=t.pathLength,u=t.pathSpacing,l=u===void 0?1:u,d=t.pathOffset,f=d===void 0?0:d,h=Ki(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);KL(e,h,n,r),e.attrs=e.style,e.style={};var p=e.attrs,m=e.style,x=e.dimensions;p.transform&&(x&&(m.transform=p.transform),delete p.transform),x&&(s!==void 0||a!==void 0||m.transform)&&(m.transformOrigin=eRe(x,s!==void 0?s:.5,a!==void 0?a:.5)),i!==void 0&&(p.x=i),o!==void 0&&(p.y=o),c!==void 0&&nRe(p,c,l,f)}var kie=function(){return ze(ze({},QL()),{attrs:{}})};function rRe(e,t){var n=j.useMemo(function(){var i=kie();return YL(i,t,{enableHardwareAcceleration:!1},e.transformTemplate),ze(ze({},i.attrs),{style:ze({},i.style)})},[t]);if(e.style){var r={};Cie(r,e.style,e),n.style=ze(ze({},r),n.style)}return n}function iRe(e){e===void 0&&(e=!1);var t=function(n,r,i,o,s,a){var c=s.latestValues,u=WL(n)?rRe:ZIe,l=u(r,c,a),d=XIe(r,typeof n=="string",e),f=ze(ze(ze({},d),l),{ref:o});return i&&(f["data-projection-id"]=i),j.createElement(n,f)};return t}var oRe=/([a-z])([A-Z])/g,sRe="$1-$2",Tie=function(e){return e.replace(oRe,sRe).toLowerCase()};function _ie(e,t,n,r){var i=t.style,o=t.vars;Object.assign(e.style,i,r&&r.getProjectionStyles(n));for(var s in o)e.style.setProperty(s,o[s])}var Pie=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Iie(e,t,n,r){_ie(e,t,void 0,r);for(var i in t.attrs)e.setAttribute(Pie.has(i)?i:Tie(i),t.attrs[i])}function qL(e){var t=e.style,n={};for(var r in t)(ll(t[r])||hie(r,e))&&(n[r]=t[r]);return n}function Rie(e){var t=qL(e);for(var n in e)if(ll(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function ZL(e){return typeof e=="object"&&typeof e.start=="function"}var Zv=function(e){return Array.isArray(e)},aRe=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},Nie=function(e){return Zv(e)?e[e.length-1]||0:e};function A8(e){var t=ll(e)?e.get():e;return aRe(t)?t.toValue():t}function d$(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,s=e.onMount,a={latestValues:cRe(t,n,r,i),renderState:o()};return s&&(a.mount=function(c){return s(t,c,a)}),a}var Oie=function(e){return function(t,n){var r=j.useContext(yE),i=j.useContext(p5);return n?d$(e,t,r,i):c2(function(){return d$(e,t,r,i)})}};function cRe(e,t,n,r){var i={},o=(n==null?void 0:n.initial)===!1,s=r(e);for(var a in s)i[a]=A8(s[a]);var c=e.initial,u=e.animate,l=vE(e),d=lie(e);t&&d&&!l&&e.inherit!==!1&&(c??(c=t.initial),u??(u=t.animate));var f=o||c===!1,h=f?u:c;if(h&&typeof h!="boolean"&&!ZL(h)){var p=Array.isArray(h)?h:[h];p.forEach(function(m){var x=uie(e,m);if(x){var y=x.transitionEnd;x.transition;var b=Ki(x,["transitionEnd","transition"]);for(var v in b){var w=b[v];if(Array.isArray(w)){var E=f?w.length-1:0;w=w[E]}w!==null&&(i[v]=w)}for(var v in y)i[v]=y[v]}})}return i}var uRe={useVisualState:Oie({scrapeMotionValuesFromProps:Rie,createRenderState:kie,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}YL(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),Iie(t,r)}})},lRe={useVisualState:Oie({scrapeMotionValuesFromProps:qL,createRenderState:QL})};function dRe(e,t,n,r,i){var o=t.forwardMotionProps,s=o===void 0?!1:o,a=WL(e)?uRe:lRe;return ze(ze({},a),{preloadedFeatures:n,useRender:iRe(s),createVisualElement:r,projectionNodeConstructor:i,Component:e})}var kn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(kn||(kn={}));function xE(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function ZP(e,t,n,r){j.useEffect(function(){var i=e.current;if(n&&i)return xE(i,t,n,r)},[e,t,n,r])}function fRe(e){var t=e.whileFocus,n=e.visualElement,r=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(kn.Focus,!0)},i=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(kn.Focus,!1)};ZP(n,"focus",t?r:void 0),ZP(n,"blur",t?i:void 0)}function Lie(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Bie(e){var t=!!e.touches;return t}function hRe(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var pRe={pageX:0,pageY:0};function gRe(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||pRe;return{x:r[t+"X"],y:r[t+"Y"]}}function mRe(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function JL(e,t){return t===void 0&&(t="page"),{point:Bie(e)?gRe(e,t):mRe(e,t)}}var Mie=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,JL(r))};return t?hRe(n):n},yRe=function(){return a2&&window.onpointerdown===null},bRe=function(){return a2&&window.ontouchstart===null},vRe=function(){return a2&&window.onmousedown===null},xRe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},wRe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Die(e){return yRe()?e:bRe()?wRe[e]:vRe()?xRe[e]:e}function H1(e,t,n,r){return xE(e,Die(t),Mie(n,t==="pointerdown"),r)}function Zw(e,t,n,r){return ZP(e,Die(t),n&&Mie(n,t==="pointerdown"),r)}function jie(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var f$=jie("dragHorizontal"),h$=jie("dragVertical");function Fie(e){var t=!1;if(e==="y")t=h$();else if(e==="x")t=f$();else{var n=f$(),r=h$();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Uie(){var e=Fie(!0);return e?(e(),!1):!0}function p$(e,t,n){return function(r,i){var o;!Lie(r)||Uie()||((o=e.animationState)===null||o===void 0||o.setActive(kn.Hover,t),n==null||n(r,i))}}function ERe(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Zw(i,"pointerenter",t||r?p$(i,!0,t):void 0,{passive:!t}),Zw(i,"pointerleave",n||r?p$(i,!1,n):void 0,{passive:!n})}var zie=function(e,t){return t?e===t?!0:zie(e,t.parentElement):!1};function XL(e){return j.useEffect(function(){return function(){return e()}},[])}const Jw=(e,t,n)=>Math.min(Math.max(n,e),t),IS=.001,CRe=.01,ARe=10,SRe=.05,kRe=1;function TRe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=Jw(SRe,kRe,s),e=Jw(CRe,ARe,e/1e3),s<1?(i=u=>{const l=u*s,d=l*e,f=l-n,h=JP(u,s),p=Math.exp(-d);return IS-f/h*p},o=u=>{const d=u*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),m=JP(Math.pow(u,2),s);return(-i(u)+IS>0?-1:1)*((f-h)*p)/m}):(i=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-IS+l*d},o=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=PRe(i,o,a);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const _Re=12;function PRe(e,t,n){let r=n;for(let i=1;i<_Re;i++)r=r-e(r)/t(r);return r}function JP(e,t){return e*Math.sqrt(1-t*t)}const IRe=["duration","bounce"],RRe=["stiffness","damping","mass"];function g$(e,t){return t.some(n=>e[n]!==void 0)}function NRe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!g$(e,RRe)&&g$(e,IRe)){const n=TRe(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function eB(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=Ki(e,["from","to","restSpeed","restDelta"]);const s={done:!1,value:t};let{stiffness:a,damping:c,mass:u,velocity:l,duration:d,isResolvedFromDuration:f}=NRe(o),h=m$,p=m$;function m(){const x=l?-(l/1e3):0,y=n-t,b=c/(2*Math.sqrt(a*u)),v=Math.sqrt(a/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),b<1){const w=JP(v,b);h=E=>{const S=Math.exp(-b*v*E);return n-S*((x+b*v*y)/w*Math.sin(w*E)+y*Math.cos(w*E))},p=E=>{const S=Math.exp(-b*v*E);return b*v*S*(Math.sin(w*E)*(x+b*v*y)/w+y*Math.cos(w*E))-S*(Math.cos(w*E)*(x+b*v*y)-w*y*Math.sin(w*E))}}else if(b===1)h=w=>n-Math.exp(-v*w)*(y+(x+v*y)*w);else{const w=v*Math.sqrt(b*b-1);h=E=>{const S=Math.exp(-b*v*E),I=Math.min(w*E,300);return n-S*((x+b*v*y)*Math.sinh(I)+w*y*Math.cosh(I))/w}}}return m(),{next:x=>{const y=h(x);if(f)s.done=x>=d;else{const b=p(x)*1e3,v=Math.abs(b)<=r,w=Math.abs(n-y)<=i;s.done=v&&w}return s.value=s.done?n:y,s},flipTarget:()=>{l=-l,[t,n]=[n,t],m()}}}eB.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const m$=e=>0,Jv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},sr=(e,t,n)=>-n*e+n*t+e;function RS(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function y$({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=RS(c,a,e+1/3),o=RS(c,a,e),s=RS(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const ORe=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},LRe=[YP,Fd,N0],b$=e=>LRe.find(t=>t.test(e)),$ie=(e,t)=>{let n=b$(e),r=b$(t),i=n.parse(e),o=r.parse(t);n===N0&&(i=y$(i),n=Fd),r===N0&&(o=y$(o),r=Fd);const s=Object.assign({},i);return a=>{for(const c in s)c!=="alpha"&&(s[c]=ORe(i[c],o[c],a));return s.alpha=sr(i.alpha,o.alpha,a),n.transform(s)}},XP=e=>typeof e=="number",BRe=(e,t)=>n=>t(e(n)),wE=(...e)=>e.reduce(BRe);function Hie(e,t){return XP(e)?n=>sr(e,t,n):Oi.test(e)?$ie(e,t):Wie(e,t)}const Vie=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>Hie(o,t[s]));return o=>{for(let s=0;s{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Hie(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function v$(e){const t=dl.parse(e),n=t.length;let r=0,i=0,o=0;for(let s=0;s{const n=dl.createTransformer(t),r=v$(e),i=v$(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?wE(Vie(r.parsed,i.parsed),n):s=>`${s>0?t:e}`},DRe=(e,t)=>n=>sr(e,t,n);function jRe(e){if(typeof e=="number")return DRe;if(typeof e=="string")return Oi.test(e)?$ie:Wie;if(Array.isArray(e))return Vie;if(typeof e=="object")return MRe}function FRe(e,t,n){const r=[],i=n||jRe(e[0]),o=e.length-1;for(let s=0;sn(Jv(e,t,r))}function zRe(e,t){const n=e.length,r=n-1;return i=>{let o=0,s=!1;if(i<=e[0]?s=!0:i>=e[r]&&(o=r-1,s=!0),!s){let c=1;for(;ci||c===r);c++);o=c-1}const a=Jv(e[o],e[o+1],i);return t[o](a)}}function Gie(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;Kv(o===t.length),Kv(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const s=FRe(t,r,i),a=o===2?URe(e,s):zRe(e,s);return n?c=>a(Jw(e[0],e[o-1],c)):a}const EE=e=>t=>1-e(1-t),tB=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$Re=e=>t=>Math.pow(t,e),Kie=e=>t=>t*t*((e+1)*t-e),HRe=e=>{const t=Kie(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},Qie=1.525,VRe=4/11,WRe=8/11,GRe=9/10,nB=e=>e,rB=$Re(2),KRe=EE(rB),Yie=tB(rB),qie=e=>1-Math.sin(Math.acos(e)),iB=EE(qie),QRe=tB(iB),oB=Kie(Qie),YRe=EE(oB),qRe=tB(oB),ZRe=HRe(Qie),JRe=4356/361,XRe=35442/1805,eNe=16061/1805,Xw=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Xw(1-e*2)):.5*Xw(e*2-1)+.5;function rNe(e,t){return e.map(()=>t||Yie).splice(0,e.length-1)}function iNe(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function oNe(e,t){return e.map(n=>n*t)}function S8({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},s=Array.isArray(t)?t:[e,t],a=oNe(r&&r.length===s.length?r:iNe(s),i);function c(){return Gie(a,s,{ease:Array.isArray(n)?n:rNe(s,n)})}let u=c();return{next:l=>(o.value=u(l),o.done=l>=i,o),flipTarget:()=>{s.reverse(),u=c()}}}function sNe({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const s={done:!1,value:t};let a=n*e;const c=t+a,u=o===void 0?c:o(c);return u!==c&&(a=u-t),{next:l=>{const d=-a*Math.exp(-l/r);return s.done=!(d>i||d<-i),s.value=s.done?u:u+d,s},flipTarget:()=>{}}}const x$={keyframes:S8,spring:eB,decay:sNe};function aNe(e){if(Array.isArray(e.to))return S8;if(x$[e.type])return x$[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?S8:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?eB:S8}const Zie=1/60*1e3,cNe=typeof performance<"u"?()=>performance.now():()=>Date.now(),Jie=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(cNe()),Zie);function uNe(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const d=l&&i,f=d?t:n;return u&&s.add(c),f.indexOf(c)===-1&&(f.push(c),d&&i&&(r=t.length)),c},cancel:c=>{const u=n.indexOf(c);u!==-1&&n.splice(u,1),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=uNe(()=>Xv=!0),e),{}),Ma=b5.reduce((e,t)=>{const n=CE[t];return e[t]=(r,i=!1,o=!1)=>(Xv||fNe(),n.schedule(r,i,o)),e},{}),gm=b5.reduce((e,t)=>(e[t]=CE[t].cancel,e),{}),NS=b5.reduce((e,t)=>(e[t]=()=>CE[t].process(V1),e),{}),dNe=e=>CE[e].process(V1),Xie=e=>{Xv=!1,V1.delta=eI?Zie:Math.max(Math.min(e-V1.timestamp,lNe),1),V1.timestamp=e,tI=!0,b5.forEach(dNe),tI=!1,Xv&&(eI=!1,Jie(Xie))},fNe=()=>{Xv=!0,eI=!0,tI||Jie(Xie)},e9=()=>V1;function eoe(e,t,n=0){return e-t-n}function hNe(e,t,n=0,r=!0){return r?eoe(t+-e,t,n):t-(e-t)+n}function pNe(e,t,n,r){return r?e>=t+n:e<=-n}const gNe=e=>{const t=({delta:n})=>e(n);return{start:()=>Ma.update(t,!0),stop:()=>gm.update(t)}};function toe(e){var t,n,{from:r,autoplay:i=!0,driver:o=gNe,elapsed:s=0,repeat:a=0,repeatType:c="loop",repeatDelay:u=0,onPlay:l,onStop:d,onComplete:f,onRepeat:h,onUpdate:p}=e,m=Ki(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:x}=m,y,b=0,v=m.duration,w,E=!1,S=!0,I;const A=aNe(m);!((n=(t=A).needsInterpolation)===null||n===void 0)&&n.call(t,r,x)&&(I=Gie([0,100],[r,x],{clamp:!1}),r=0,x=100);const O=A(Object.assign(Object.assign({},m),{from:r,to:x}));function N(){b++,c==="reverse"?(S=b%2===0,s=hNe(s,v,u,S)):(s=eoe(s,v,u),c==="mirror"&&O.flipTarget()),E=!1,h&&h()}function R(){y.stop(),f&&f()}function _(z){if(S||(z=-z),s+=z,!E){const F=O.next(Math.max(0,s));w=F.value,I&&(w=I(w)),E=S?F.done:s<=0}p==null||p(w),E&&(b===0&&(v??(v=s)),b{d==null||d(),y.stop()}}}function noe(e,t){return t?e*(1e3/t):0}function mNe({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:d,onComplete:f,onStop:h}){let p;function m(v){return n!==void 0&&vr}function x(v){return n===void 0?r:r===void 0||Math.abs(n-v){var E;d==null||d(w),(E=v.onUpdate)===null||E===void 0||E.call(v,w)},onComplete:f,onStop:h}))}function b(v){y(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:c},v))}if(m(e))b({from:e,velocity:t,to:x(e)});else{let v=i*t+e;typeof u<"u"&&(v=u(v));const w=x(v),E=w===n?-1:1;let S,I;const A=O=>{S=I,I=O,t=noe(O-S,e9().delta),(E===1&&O>w||E===-1&&Op==null?void 0:p.stop()}}const nI=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),w$=e=>nI(e)&&e.hasOwnProperty("z"),Zx=(e,t)=>Math.abs(e-t);function roe(e,t){if(XP(e)&&XP(t))return Zx(e,t);if(nI(e)&&nI(t)){const n=Zx(e.x,t.x),r=Zx(e.y,t.y),i=w$(e)&&w$(t)?Zx(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ioe=(e,t)=>1-3*t+3*e,ooe=(e,t)=>3*t-6*e,soe=e=>3*e,t9=(e,t,n)=>((ioe(t,n)*e+ooe(t,n))*e+soe(t))*e,aoe=(e,t,n)=>3*ioe(t,n)*e*e+2*ooe(t,n)*e+soe(t),yNe=1e-7,bNe=10;function vNe(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=t9(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>yNe&&++a=wNe?ENe(s,d,e,n):f===0?d:vNe(s,a,a+Jx,e,n)}return s=>s===0||s===1?s:t9(o(s),t,r)}function ANe(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,s=t||n||r||i,a=j.useRef(!1),c=j.useRef(null),u={passive:!(n||t||r||p)};function l(){var m;(m=c.current)===null||m===void 0||m.call(c),c.current=null}function d(){var m;return l(),a.current=!1,(m=o.animationState)===null||m===void 0||m.setActive(kn.Tap,!1),!Uie()}function f(m,x){d()&&(zie(o.getInstance(),m.target)?t==null||t(m,x):r==null||r(m,x))}function h(m,x){d()&&(r==null||r(m,x))}function p(m,x){var y;l(),!a.current&&(a.current=!0,c.current=wE(H1(window,"pointerup",f,u),H1(window,"pointercancel",h,u)),(y=o.animationState)===null||y===void 0||y.setActive(kn.Tap,!0),n==null||n(m,x))}Zw(o,"pointerdown",s?p:void 0,u),XL(l)}var E$=new Set;function SNe(e,t,n){E$.has(t)||(console.warn(t),E$.add(t))}var rI=new WeakMap,OS=new WeakMap,kNe=function(e){var t;(t=rI.get(e.target))===null||t===void 0||t(e)},TNe=function(e){e.forEach(kNe)};function _Ne(e){var t=e.root,n=Ki(e,["root"]),r=t||document;OS.has(r)||OS.set(r,{});var i=OS.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(TNe,ze({root:t},n))),i[o]}function PNe(e,t,n){var r=_Ne(t);return rI.set(e,n),r.observe(e),function(){rI.delete(e),r.unobserve(e)}}function INe(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,s=o===void 0?{}:o,a=j.useRef({hasEnteredView:!1,isInView:!1}),c=!!(n||r||i);s.once&&a.current.hasEnteredView&&(c=!1);var u=typeof IntersectionObserver>"u"?ONe:NNe;u(c,a.current,t,s)}var RNe={some:0,all:1};function NNe(e,t,n,r){var i=r.root,o=r.margin,s=r.amount,a=s===void 0?"some":s,c=r.once;j.useEffect(function(){if(e){var u={root:i==null?void 0:i.current,rootMargin:o,threshold:typeof a=="number"?a:RNe[a]},l=function(d){var f,h=d.isIntersecting;if(t.isInView!==h&&(t.isInView=h,!(c&&!h&&t.hasEnteredView))){h&&(t.hasEnteredView=!0),(f=n.animationState)===null||f===void 0||f.setActive(kn.InView,h);var p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m==null||m(d)}};return PNe(n.getInstance(),u,l)}},[e,i,o,a])}function ONe(e,t,n,r){var i=r.fallback,o=i===void 0?!0:i;j.useEffect(function(){!e||!o||(HL!=="production"&&SNe(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var s;t.hasEnteredView=!0;var a=n.getProps().onViewportEnter;a==null||a(null),(s=n.animationState)===null||s===void 0||s.setActive(kn.InView,!0)}))},[e])}var Ud=function(e){return function(t){return e(t),null}},LNe={inView:Ud(INe),tap:Ud(ANe),focus:Ud(fRe),hover:Ud(ERe)},BNe=0,MNe=function(){return BNe++},coe=function(){return c2(MNe)};function uoe(){var e=j.useContext(p5);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=coe();j.useEffect(function(){return r(i)},[]);var o=function(){return n==null?void 0:n(i)};return!t&&n?[!1,o]:[!0]}function loe(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r-1&&e.splice(n,1)}var w3=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return lB(this.subscriptions,t),function(){return dB(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var o=0;ob&&R,$=Array.isArray(N)?N:[N],W=$.reduce(o,{});_===!1&&(W={});var G=O.prevResolvedValues,H=G===void 0?{}:G,L=ze(ze({},H),W),q=function(ce){F=!0,x.delete(ce),O.needsAnimating[ce]=!0};for(var V in L){var P=W[V],K=H[V];y.hasOwnProperty(V)||(P!==K?Zv(P)&&Zv(K)?!loe(P,K)||z?q(V):O.protectedKeys[V]=!0:P!==void 0?q(V):x.add(V):P!==void 0&&x.has(V)?q(V):O.protectedKeys[V]=!0)}O.prevProp=N,O.prevResolvedValues=W,O.isActive&&(y=ze(ze({},y),W)),i&&e.blockInitialAnimation&&(F=!1),F&&!M&&m.push.apply(m,Wo([],Dn($.map(function(ce){return{animation:ce,options:ze({type:A},l)}})),!1))},w=0;w=3;if(!(!h&&!p)){var m=f.point,x=e9().timestamp;i.history.push(ze(ze({},m),{timestamp:x}));var y=i.handlers,b=y.onStart,v=y.onMove;h||(b&&b(i.lastMoveEvent,f),i.startEvent=i.lastMoveEvent),v&&v(i.lastMoveEvent,f)}}},this.handlePointerMove=function(f,h){if(i.lastMoveEvent=f,i.lastMoveEventInfo=BS(h,i.transformPagePoint),Lie(f)&&f.buttons===0){i.handlePointerUp(f,h);return}Ma.update(i.updatePoint,!0)},this.handlePointerUp=function(f,h){i.end();var p=i.handlers,m=p.onEnd,x=p.onSessionEnd,y=MS(BS(h,i.transformPagePoint),i.history);i.startEvent&&m&&m(f,y),x&&x(f,y)},!(Bie(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var a=JL(t),c=BS(a,this.transformPagePoint),u=c.point,l=e9().timestamp;this.history=[ze(ze({},u),{timestamp:l})];var d=n.onSessionStart;d&&d(t,MS(c,this.history)),this.removeListeners=wE(H1(window,"pointermove",this.handlePointerMove),H1(window,"pointerup",this.handlePointerUp),H1(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),gm.update(this.updatePoint)},e}();function BS(e,t){return t?{point:t(e.point)}:e}function P$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MS(e,t){var n=e.point;return{point:n,delta:P$(n,goe(t)),offset:P$(n,mOe(t)),velocity:yOe(t,.1)}}function mOe(e){return e[0]}function goe(e){return e[e.length-1]}function yOe(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=goe(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>n9(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};var s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function fl(e){return e.max-e.min}function I$(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),roe(e,t)i&&(e=n?sr(i,e,n.max):Math.min(e,i)),e}function L$(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function xOe(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:L$(e.x,r,o),y:L$(e.y,n,i)}}function B$(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.minr?n=Jv(t.min,t.max-r,e.min):r>i&&(n=Jv(e.min,e.max-i,t.min)),Jw(0,1,n)}function COe(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var oI=.35;function AOe(e){return e===void 0&&(e=oI),e===!1?e=0:e===!0&&(e=oI),{x:M$(e,"left","right"),y:M$(e,"top","bottom")}}function M$(e,t,n){return{min:D$(e,t),max:D$(e,n)}}function D$(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var j$=function(){return{translate:0,scale:1,origin:0,originPoint:0}},A3=function(){return{x:j$(),y:j$()}},F$=function(){return{min:0,max:0}},si=function(){return{x:F$(),y:F$()}};function oc(e){return[e("x"),e("y")]}function moe(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function SOe(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function kOe(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function DS(e){return e===void 0||e===1}function yoe(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!DS(t)||!DS(n)||!DS(r)}function Zl(e){return yoe(e)||U$(e.x)||U$(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function U$(e){return e&&e!=="0%"}function r9(e,t,n){var r=e-n,i=t*r;return n+i}function z$(e,t,n,r,i){return i!==void 0&&(e=r9(e,i,r)),r9(e,n,r)+t}function sI(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=z$(e.min,t,n,r,i),e.max=z$(e.max,t,n,r,i)}function boe(e,t){var n=t.x,r=t.y;sI(e.x,n.translate,n.scale,n.originPoint),sI(e.y,r.translate,r.scale,r.originPoint)}function TOe(e,t,n,r){var i,o;r===void 0&&(r=!1);var s=n.length;if(s){t.x=t.y=1;for(var a,c,u=0;ut?n="y":Math.abs(e.x)>t&&(n="x"),n}function LOe(e){var t=e.dragControls,n=e.visualElement,r=c2(function(){return new NOe(n)});j.useEffect(function(){return t&&t.subscribe(r)},[r,t]),j.useEffect(function(){return r.addListeners()},[r])}function BOe(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,s=t||n||r||i,a=j.useRef(null),c=j.useContext(Qv).transformPagePoint,u={onSessionStart:i,onStart:n,onMove:t,onEnd:function(d,f){a.current=null,r&&r(d,f)}};j.useEffect(function(){a.current!==null&&a.current.updateHandlers(u)});function l(d){a.current=new poe(d,u,{transformPagePoint:c})}Zw(o,"pointerdown",s&&l),XL(function(){return a.current&&a.current.end()})}var MOe={pan:Ud(BOe),drag:Ud(LOe)},t6=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function DOe(){var e=t6.map(function(){return new w3}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){t6.forEach(function(i){var o,s="on"+i,a=r[s];(o=t[i])===null||o===void 0||o.call(t),a&&(t[i]=n[s](a))})}};return e.forEach(function(r,i){n["on"+t6[i]]=function(o){return r.add(o)},n["notify"+t6[i]]=function(){for(var o=[],s=0;s=0?window.pageYOffset:null,u=KOe(t,e,a);return o.length&&o.forEach(function(l){var d=Dn(l,2),f=d[0],h=d[1];e.getValue(f).set(h)}),e.syncRender(),c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function YOe(e,t,n,r){return HOe(t)?QOe(e,t,n,r):{target:t,transitionEnd:r}}var qOe=function(e,t,n,r){var i=zOe(e,t,r);return t=i.target,r=i.transitionEnd,YOe(e,t,n,r)};function ZOe(e){return window.getComputedStyle(e)}var Soe={treeType:"dom",readValueFromInstance:function(e,t){if(g5(t)){var n=sB(t);return n&&n.default||0}else{var r=ZOe(e);return(pie(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return voe(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var o=t.transition,s=t.transitionEnd,a=Ki(t,["transition","transitionEnd"]),c=iOe(a,o||{},e);if(i&&(s&&(s=i(s)),a&&(a=i(a)),c&&(c=i(c))),r){nOe(e,a,c);var u=qOe(e,a,c,s);s=u.transitionEnd,a=u.target}return ze({transition:o,transitionEnd:s},a)},scrapeMotionValuesFromProps:qL,build:function(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),KL(t,n,r,i.transformTemplate)},render:_ie},JOe=xoe(Soe),XOe=xoe(ze(ze({},Soe),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return g5(t)?((n=sB(t))===null||n===void 0?void 0:n.default)||0:(t=Pie.has(t)?t:Tie(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Rie,build:function(e,t,n,r,i){YL(t,n,r,i.transformTemplate)},render:Iie})),eLe=function(e,t){return WL(e)?XOe(t,{enableHardwareAcceleration:!1}):JOe(t,{enableHardwareAcceleration:!0})};function Q$(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ey={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(gt.test(e))e=parseFloat(e);else return e;var n=Q$(e,t.target.x),r=Q$(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Y$="_$css",tLe={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),s=[];o&&(e=e.replace(Eoe,function(m){return s.push(m),Y$}));var a=dl.parse(e);if(a.length>5)return i;var c=dl.createTransformer(e),u=typeof a[0]!="number"?1:0,l=r.x.scale*n.x,d=r.y.scale*n.y;a[0+u]/=l,a[1+u]/=d;var f=sr(l,d,.5);typeof a[2+u]=="number"&&(a[2+u]/=f),typeof a[3+u]=="number"&&(a[3+u]/=f);var h=c(a);if(o){var p=0;h=h.replace(Y$,function(){var m=s[p];return p++,m})}return h}},nLe=function(e){dE(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.visualElement,o=r.layoutGroup,s=r.switchLayoutGroup,a=r.layoutId,c=i.projection;PIe(iLe),c&&(o!=null&&o.group&&o.group.add(c),s!=null&&s.register&&a&&s.register(c),c.root.didUpdate(),c.addEventListener("animationComplete",function(){n.safeToRemove()}),c.setOptions(ze(ze({},c.options),{onExitComplete:function(){return n.safeToRemove()}}))),b3.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(n){var r=this,i=this.props,o=i.layoutDependency,s=i.visualElement,a=i.drag,c=i.isPresent,u=s.projection;return u&&(u.isPresent=c,a||n.layoutDependency!==o||o===void 0?u.willUpdate():this.safeToRemove(),n.isPresent!==c&&(c?u.promote():u.relegate()||Ma.postRender(function(){var l;!((l=u.getStack())===null||l===void 0)&&l.members.length||r.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,s=r.projection;s&&(s.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(s),o!=null&&o.deregister&&o.deregister(s))},t.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},t.prototype.render=function(){return null},t}(Gn.Component);function rLe(e){var t=Dn(uoe(),2),n=t[0],r=t[1],i=j.useContext(VL);return Gn.createElement(nLe,ze({},e,{layoutGroup:i,switchLayoutGroup:j.useContext(die),isPresent:n,safeToRemove:r}))}var iLe={borderRadius:ze(ze({},ey),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ey,borderTopRightRadius:ey,borderBottomLeftRadius:ey,borderBottomRightRadius:ey,boxShadow:tLe},oLe={measureLayout:rLe};function sLe(e,t,n){n===void 0&&(n={});var r=ll(e)?e:mm(e);return uB("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var koe=["TopLeft","TopRight","BottomLeft","BottomRight"],aLe=koe.length,q$=function(e){return typeof e=="string"?parseFloat(e):e},Z$=function(e){return typeof e=="number"||gt.test(e)};function cLe(e,t,n,r,i,o){var s,a,c,u;i?(e.opacity=sr(0,(s=n.opacity)!==null&&s!==void 0?s:1,uLe(r)),e.opacityExit=sr((a=t.opacity)!==null&&a!==void 0?a:1,0,lLe(r))):o&&(e.opacity=sr((c=t.opacity)!==null&&c!==void 0?c:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(var l=0;lt?1:n(Jv(e,t,r))}}function X$(e,t){e.min=t.min,e.max=t.max}function ia(e,t){X$(e.x,t.x),X$(e.y,t.y)}function eH(e,t,n,r,i){return e-=t,e=r9(e,1/n,r),i!==void 0&&(e=r9(e,1/i,r)),e}function dLe(e,t,n,r,i,o,s){if(t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5),o===void 0&&(o=e),s===void 0&&(s=e),Fc.test(t)){t=parseFloat(t);var a=sr(s.min,s.max,t/100);t=a-s.min}if(typeof t=="number"){var c=sr(o.min,o.max,r);e===o&&(c-=t),e.min=eH(e.min,t,n,c,i),e.max=eH(e.max,t,n,c,i)}}function tH(e,t,n,r,i){var o=Dn(n,3),s=o[0],a=o[1],c=o[2];dLe(e,t[s],t[a],t[c],t.scale,r,i)}var fLe=["x","scaleX","originX"],hLe=["y","scaleY","originY"];function nH(e,t,n,r){tH(e.x,t,fLe,n==null?void 0:n.x,r==null?void 0:r.x),tH(e.y,t,hLe,n==null?void 0:n.y,r==null?void 0:r.y)}function rH(e){return e.translate===0&&e.scale===1}function _oe(e){return rH(e.x)&&rH(e.y)}function Poe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var pLe=function(){function e(){this.members=[]}return e.prototype.add=function(t){lB(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(dB(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},e.prototype.relegate=function(t){var n=this.members.findIndex(function(s){return t===s});if(n===0)return!1;for(var r,i=n;i>=0;i--){var o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1},e.prototype.promote=function(t,n){var r,i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);var o=t.options.crossfade;o===!1&&i.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var n,r,i,o,s;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(s=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||s===void 0||s.call(o)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),gLe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function iH(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var s=n.rotate,a=n.rotateX,c=n.rotateY;s&&(o+="rotate(".concat(s,"deg) ")),a&&(o+="rotateX(".concat(a,"deg) ")),c&&(o+="rotateY(".concat(c,"deg) "))}var u=e.x.scale*t.x,l=e.y.scale*t.y;return o+="scale(".concat(u,", ").concat(l,")"),o===gLe?"none":o}var mLe=function(e,t){return e.depth-t.depth},yLe=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){lB(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){dB(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(mLe),this.isDirty=!1,this.children.forEach(t)},e}(),oH=1e3;function Ioe(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function s(a,c,u){var l=this;c===void 0&&(c={}),u===void 0&&(u=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){l.isUpdating&&(l.isUpdating=!1,l.clearAllSnapshots())},this.updateProjection=function(){l.nodes.forEach(CLe),l.nodes.forEach(ALe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?Wo(Wo([],Dn(u.path),!1),[u],!1):[],this.parent=u,this.depth=u?u.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(var d=0;d=0;r--)if(e.path[r].instance){n=e.path[r];break}var i=n&&n!==e.root?n.instance:document,o=i.querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function uH(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function lH(e){uH(e.x),uH(e.y)}var RLe=Ioe({attachResizeListener:function(e,t){return xE(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),jS={current:void 0},NLe=Ioe({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!jS.current){var e=new RLe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),jS.current=e}return jS.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),OLe=ze(ze(ze(ze({},gOe),LNe),MOe),oLe),Se=TIe(function(e,t){return dRe(e,t,OLe,eLe,NLe)});function Roe(){var e=j.useRef(!1);return Qw(function(){return e.current=!0,function(){e.current=!1}},[]),e}function LLe(){var e=Roe(),t=Dn(j.useState(0),2),n=t[0],r=t[1],i=j.useCallback(function(){e.current&&r(n+1)},[n]),o=j.useCallback(function(){return Ma.postRender(i)},[i]);return[o,n]}var FS=function(e){var t=e.children,n=e.initial,r=e.isPresent,i=e.onExitComplete,o=e.custom,s=e.presenceAffectsLayout,a=c2(BLe),c=coe(),u=j.useMemo(function(){return{id:c,initial:n,isPresent:r,custom:o,onExitComplete:function(l){var d,f;a.set(l,!0);try{for(var h=Wv(a.values()),p=h.next();!p.done;p=h.next()){var m=p.value;if(!m)return}}catch(x){d={error:x}}finally{try{p&&!p.done&&(f=h.return)&&f.call(h)}finally{if(d)throw d.error}}i==null||i()},register:function(l){return a.set(l,!1),function(){return a.delete(l)}}}},s?void 0:[r]);return j.useMemo(function(){a.forEach(function(l,d){return a.set(d,!1)})},[r]),j.useEffect(function(){!r&&!a.size&&(i==null||i())},[r]),j.createElement(p5.Provider,{value:u},t)};function BLe(){return new Map}var Lp=function(e){return e.key||""};function MLe(e,t){e.forEach(function(n){var r=Lp(n);t.set(r,n)})}function DLe(e){var t=[];return j.Children.forEach(e,function(n){j.isValidElement(n)&&t.push(n)}),t}var pr=function(e){var t=e.children,n=e.custom,r=e.initial,i=r===void 0?!0:r,o=e.onExitComplete,s=e.exitBeforeEnter,a=e.presenceAffectsLayout,c=a===void 0?!0:a,u=Dn(LLe(),1),l=u[0],d=j.useContext(VL).forceRender;d&&(l=d);var f=Roe(),h=DLe(t),p=h,m=new Set,x=j.useRef(p),y=j.useRef(new Map).current,b=j.useRef(!0);if(Qw(function(){b.current=!1,MLe(h,y),x.current=p}),XL(function(){b.current=!0,y.clear(),m.clear()}),b.current)return j.createElement(j.Fragment,null,p.map(function(A){return j.createElement(FS,{key:Lp(A),isPresent:!0,initial:i?void 0:!1,presenceAffectsLayout:c},A)}));p=Wo([],Dn(p),!1);for(var v=x.current.map(Lp),w=h.map(Lp),E=v.length,S=0;S1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),j.createElement(j.Fragment,null,m.size?p:p.map(function(A){return j.cloneElement(A)}))};function dH(e){var t=e.children,n=e.isValidProp,r=Ki(e,["children","isValidProp"]);n&&Sie(n),r=ze(ze({},j.useContext(Qv)),r),r.isStatic=c2(function(){return r.isStatic});var i=j.useMemo(function(){return r},[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return j.createElement(Qv.Provider,{value:i},t)}var Noe={exports:{}},gn={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hB=Symbol.for("react.element"),pB=Symbol.for("react.portal"),AE=Symbol.for("react.fragment"),SE=Symbol.for("react.strict_mode"),kE=Symbol.for("react.profiler"),TE=Symbol.for("react.provider"),_E=Symbol.for("react.context"),jLe=Symbol.for("react.server_context"),PE=Symbol.for("react.forward_ref"),IE=Symbol.for("react.suspense"),RE=Symbol.for("react.suspense_list"),NE=Symbol.for("react.memo"),OE=Symbol.for("react.lazy"),FLe=Symbol.for("react.offscreen"),Ooe;Ooe=Symbol.for("react.module.reference");function qs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hB:switch(e=e.type,e){case AE:case kE:case SE:case IE:case RE:return e;default:switch(e=e&&e.$$typeof,e){case jLe:case _E:case PE:case OE:case NE:case TE:return e;default:return t}}case pB:return t}}}gn.ContextConsumer=_E;gn.ContextProvider=TE;gn.Element=hB;gn.ForwardRef=PE;gn.Fragment=AE;gn.Lazy=OE;gn.Memo=NE;gn.Portal=pB;gn.Profiler=kE;gn.StrictMode=SE;gn.Suspense=IE;gn.SuspenseList=RE;gn.isAsyncMode=function(){return!1};gn.isConcurrentMode=function(){return!1};gn.isContextConsumer=function(e){return qs(e)===_E};gn.isContextProvider=function(e){return qs(e)===TE};gn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hB};gn.isForwardRef=function(e){return qs(e)===PE};gn.isFragment=function(e){return qs(e)===AE};gn.isLazy=function(e){return qs(e)===OE};gn.isMemo=function(e){return qs(e)===NE};gn.isPortal=function(e){return qs(e)===pB};gn.isProfiler=function(e){return qs(e)===kE};gn.isStrictMode=function(e){return qs(e)===SE};gn.isSuspense=function(e){return qs(e)===IE};gn.isSuspenseList=function(e){return qs(e)===RE};gn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===AE||e===kE||e===SE||e===IE||e===RE||e===FLe||typeof e=="object"&&e!==null&&(e.$$typeof===OE||e.$$typeof===NE||e.$$typeof===TE||e.$$typeof===_E||e.$$typeof===PE||e.$$typeof===Ooe||e.getModuleId!==void 0)};gn.typeOf=qs;Noe.exports=gn;var Loe=Noe.exports;function ULe(e){function t(V,P,K,ce,X){for(var ke=0,me=0,Re=0,Be=0,Le,Ne,Me=0,re=0,Q,se=Q=Le=0,oe=0,Ce=0,Fe=0,qe=0,Ge=K.length,Ie=Ge-1,ie,te="",ve="",fe="",U="",T;oeLe)&&(qe=(te=te.replace(" ",":")).length),0ce&&(ce=(P=P.trim()).charCodeAt(0)),ce){case 38:return P.replace(y,"$1"+V.trim());case 58:return V.trim()+P.replace(y,"$1"+V.trim());default:if(0<1*K&&0me.charCodeAt(8))break;case 115:X=X.replace(me,"-webkit-"+me)+";"+X;break;case 207:case 102:X=X.replace(me,"-webkit-"+(102K.charCodeAt(0)&&(K=K.trim()),q=K,K=[q],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var HLe=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,i=0;i=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,s=o;n>=s;)(s<<=1)<0&&Dh(16,""+n);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var a=o;a=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],o=this.indexOfGroup(n),s=o+i,a=o;a=S3&&(S3=t+1),T8.set(e,t),o9.set(t,e)},GLe="style["+bm+'][data-styled-version="5.3.11"]',KLe=new RegExp("^"+bm+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),QLe=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o=0;u--){var l=c[u];if(l&&l.nodeType===1&&l.hasAttribute(bm))return l}}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(bm,"active"),r.setAttribute("data-styled-version","5.3.11");var s=qLe();return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},ZLe=function(){function e(n){var r=this.element=Boe(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,s=0,a=o.length;s=0){var i=document.createTextNode(r),o=this.nodes[n];return this.element.insertBefore(i,o||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(d+=f+",")}),o+=""+u+l+'{content:"'+d+`"}/*!sc*/ +`}}}return o}(this)},e}(),tBe=/(a)(d)/gi,gH=function(e){return String.fromCharCode(e+(e>25?39:97))};function lI(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=gH(t%52)+n;return(gH(t%52)+n).replace(tBe,"$1-$2")}var x1=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Doe=function(e){return x1(5381,e)};function nBe(e){for(var t=0;t>>0);if(!n.hasNameForId(i,a)){var c=r(s,"."+a,void 0,i);n.insertRules(i,a,c)}o.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,l=x1(this.baseHash,r.hash),d="",f=0;f>>0);if(!n.hasNameForId(i,x)){var y=r(d,"."+x,void 0,i);n.insertRules(i,x,y)}o.push(x)}}return o.join(" ")},e}(),oBe=/^\s*\/\/.*$/gm,sBe=[":","[",".","#"];function aBe(e){var t,n,r,i,o=nf,s=o.options,a=s===void 0?nf:s,c=o.plugins,u=c===void 0?i9:c,l=new ULe(a),d=[],f=function(m){function x(y){if(y)try{m(y+"}")}catch{}}return function(y,b,v,w,E,S,I,A,O,N){switch(y){case 1:if(O===0&&b.charCodeAt(0)===64)return m(b+";"),"";break;case 2:if(A===0)return b+"/*|*/";break;case 3:switch(A){case 102:case 112:return m(v[0]+b),"";default:return b+(N===0?"/*|*/":"")}case-2:b.split("/*|*/}").forEach(x)}}}(function(m){d.push(m)}),h=function(m,x,y){return x===0&&sBe.indexOf(y[n.length])!==-1||y.match(i)?m:"."+t};function p(m,x,y,b){b===void 0&&(b="&");var v=m.replace(oBe,""),w=x&&y?y+" "+x+" { "+v+" }":v;return t=b,n=x,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),l(y||!x?"":x,w)}return l.use([].concat(u,[function(m,x,y){m===2&&y.length&&y[0].lastIndexOf(n)>0&&(y[0]=y[0].replace(r,h))},f,function(m){if(m===-2){var x=d;return d=[],x}}])),p.hash=u.length?u.reduce(function(m,x){return x.name||Dh(15),x1(m,x.name)},5381).toString():"",p}var joe=Gn.createContext();joe.Consumer;var Foe=Gn.createContext(),cBe=(Foe.Consumer,new Moe),dI=aBe();function uBe(){return j.useContext(joe)||cBe}function lBe(){return j.useContext(Foe)||dI}var Uoe=function(){function e(t,n){var r=this;this.inject=function(i,o){o===void 0&&(o=dI);var s=r.name+o.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,o(r.rules,s,"@keyframes"))},this.toString=function(){return Dh(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=dI),this.name+t.hash},e}(),dBe=/([A-Z])/,fBe=/([A-Z])/g,hBe=/^ms-/,pBe=function(e){return"-"+e.toLowerCase()};function mH(e){return dBe.test(e)?e.replace(fBe,pBe).replace(hBe,"-ms-"):e}var yH=function(e){return e==null||e===!1||e===""};function vm(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,a=e.length;s1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,yBe=/(^-|-$)/g;function US(e){return e.replace(mBe,"-").replace(yBe,"")}var zoe=function(e){return lI(Doe(e)>>>0)};function r6(e){return typeof e=="string"&&!0}var fI=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},bBe=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function vBe(e,t,n){var r=e[n];fI(t)&&fI(r)?$oe(r,t):e[n]=t}function $oe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(N[A]=S[A]);return N}(t,["componentId"]),E=v&&v+"-"+(r6(b)?b:US(hH(b)));return Hoe(b,Rc({},w,{attrs:f,componentId:E}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=r?$oe({},e.defaultProps,b):b}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&A4e(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var k3=function(e){return function t(n,r,i){if(i===void 0&&(i=nf),!Loe.isValidElementType(r))return Dh(1,String(r));var o=function(){return n(r,i,yt.apply(void 0,arguments))};return o.withConfig=function(s){return t(n,r,Rc({},i,{},s))},o.attrs=function(s){return t(n,r,Rc({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},o}(Hoe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){k3[e]=k3(e)});function dn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>--c&1}const d=31,f=2**d,h=f>>>1,p=h>>1,m=f-1;let x=0;for(let E=0;E1;){let N=S+I>>>1;E>>1|l(),A=A<<1^h,O=(O^h)<<1|h|1;b=A,v=1+O-A}let w=r-4;return y.map(E=>{switch(E-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return E-1}})}function CBe(e){let t=0;return()=>e[t++]}function Voe(e){return CBe(EBe(ABe(e)))}function ABe(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>t[i.charCodeAt(0)]=o);let n=e.length,r=new Uint8Array(6*n>>3);for(let i=0,o=0,s=0,a=0;i=8&&(r[o++]=a>>(s-=8));return r}function SBe(e){return e&1?~e>>1:e>>1}function kBe(e,t){let n=Array(e);for(let r=0,i=0;r{let t=e4(e);if(t.length)return t})}function Goe(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(TBe(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(_Be(n,e))}return t.flat()}function t4(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function Koe(e,t,n){let r=Array(e).fill().map(()=>[]);for(let i=0;ir[s].push(o));return r}function TBe(e,t){let n=1+t(),r=t(),i=t4(t);return Koe(i.length,1+e,t).flatMap((s,a)=>{let[c,...u]=s;return Array(i[a]).fill().map((l,d)=>{let f=d*r;return[c+d*n,u.map(h=>h+f)]})})}function _Be(e,t){let n=1+t();return Koe(n,1+e,t).map(i=>[i[0],i.slice(1)])}function PBe(e){let t=[],n=e4(e);return i(r([]),[]),t;function r(o){let s=e(),a=t4(()=>{let c=e4(e).map(u=>n[u]);if(c.length)return r(c)});return{S:s,B:a,Q:o}}function i({S:o,B:s},a,c){if(!(o&4&&c===a[a.length-1])){o&2&&(c=a[a.length-1]),o&1&&t.push(a);for(let u of s)for(let l of u.Q)i(u,[...a,l],c)}}}function IBe(e){return e.toString(16).toUpperCase().padStart(2,"0")}function Qoe(e){return`{${IBe(e)}}`}function RBe(e){let t=[];for(let n=0,r=e.length;n>24&255}function Zoe(e){return e&16777215}let hI,wH,pI,_8;function FBe(){let e=Voe(OBe);hI=new Map(Woe(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),wH=new Set(e4(e)),pI=new Map,_8=new Map;for(let[t,n]of Goe(e)){if(!wH.has(t)&&n.length==2){let[r,i]=n,o=_8.get(r);o||(o=new Map,_8.set(r,o)),o.set(i,t)}pI.set(t,n.reverse())}}function Joe(e){return e>=n4&&e=a9&&e=c9&&tu9&&t0&&i(u9+u)}else{let s=pI.get(o);s?n.push(...s):i(o)}if(!n.length)break;o=n.pop()}if(r&&t.length>1){let o=Ob(t[0]);for(let s=1;s0&&i>=s)s==0?(t.push(r,...n),n.length=0,r=a):n.push(a),i=s;else{let c=UBe(r,a);c>=0?r=c:i==0&&s==0?(t.push(r),r=a):(n.push(a),i=s)}}return r>=0&&t.push(r,...n),t}function ese(e){return Xoe(e).map(Zoe)}function $Be(e){return zBe(Xoe(e))}const EH=45,tse=".",nse=65039,rse=1,w1=e=>Array.from(e);function r4(e,t){return e.P.has(t)||e.Q.has(t)}let HBe=class extends Array{get is_emoji(){return!0}},gI,ise,O0,mI,ose,W1,$S,Bp,sse,CH,yI;function yB(){if(gI)return;let e=Voe(wBe);const t=()=>e4(e),n=()=>new Set(t());gI=new Map(Goe(e)),ise=n(),O0=t(),mI=new Set(t().map(l=>O0[l])),O0=new Set(O0),ose=n(),n();let r=Woe(e),i=e();const o=()=>new Set(t().flatMap(l=>r[l]).concat(t()));W1=t4(l=>{let d=t4(e).map(f=>f+96);if(d.length){let f=l>=i;d[0]-=32,d=xm(d),f&&(d=`Restricted[${d}]`);let h=o(),p=o(),m=!e();return{N:d,P:h,Q:p,M:m,R:f}}}),$S=n(),Bp=new Map;let s=t().concat(w1($S)).sort((l,d)=>l-d);s.forEach((l,d)=>{let f=e(),h=s[d]=f?s[d-f]:{V:[],M:new Map};h.V.push(l),$S.has(l)||Bp.set(l,h)});for(let{V:l,M:d}of new Set(Bp.values())){let f=[];for(let p of l){let m=W1.filter(y=>r4(y,p)),x=f.find(({G:y})=>m.some(b=>y.has(b)));x||(x={G:new Set,V:[]},f.push(x)),x.V.push(p),m.forEach(y=>x.G.add(y))}let h=f.flatMap(p=>w1(p.G));for(let{G:p,V:m}of f){let x=new Set(h.filter(y=>!p.has(y)));for(let y of m)d.set(y,x)}}let a=new Set,c=new Set;const u=l=>a.has(l)?c.add(l):a.add(l);for(let l of W1){for(let d of l.P)u(d);for(let d of l.Q)u(d)}for(let l of a)!Bp.has(l)&&!c.has(l)&&Bp.set(l,rse);sse=new Set(w1(a).concat(w1(ese(a)))),CH=PBe(e).map(l=>HBe.from(l)).sort(NBe),yI=new Map;for(let l of CH){let d=[yI];for(let f of l){let h=d.map(p=>{let m=p.get(f);return m||(m=new Map,p.set(f,m)),m});f===nse?d.push(...h):d=h}for(let f of d)f.V=l}}function bB(e){return(ase(e)?"":`${vB(LE([e]))} `)+Qoe(e)}function vB(e){return`"${e}"‎`}function VBe(e){if(e.length>=4&&e[2]==EH&&e[3]==EH)throw new Error(`invalid label extension: "${xm(e.slice(0,4))}"`)}function WBe(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function GBe(e){let t=e[0],n=vH.get(t);if(n)throw T3(`leading ${n}`);let r=e.length,i=-1;for(let o=1;o{let o=RBe(i),s={input:o,offset:r};r+=o.length+1;try{let a=s.tokens=eMe(o,t,n),c=a.length,u;if(!c)throw new Error("empty label");let l=s.output=a.flat();if(WBe(l),!(s.emoji=c>1||a[0].is_emoji)&&l.every(f=>f<128))VBe(l),u="ASCII";else{let f=a.flatMap(h=>h.is_emoji?[]:h);if(!f.length)u="Emoji";else{if(O0.has(l[0]))throw T3("leading combining mark");for(let m=1;ms.has(a)):w1(s),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(o=>r4(i,o)))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}}function ZBe(e){let t=W1;for(let n of e){let r=t.filter(i=>r4(i,n));if(!r.length)throw W1.some(i=>r4(i,n))?use(t[0],n):cse(n);if(t=r,r.length==1)break}return t}function JBe(e){return e.map(({input:t,error:n,output:r})=>{if(n){let i=n.message;throw new Error(e.length==1?i:`Invalid label ${vB(LE(t))}: ${i}`)}return xm(r)}).join(tse)}function cse(e){return new Error(`disallowed character: ${bB(e)}`)}function use(e,t){let n=bB(t),r=W1.find(i=>i.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function T3(e){return new Error(`illegal placement: ${e}`)}function XBe(e,t){for(let n of t)if(!r4(e,n))throw use(e,n);if(e.M){let n=ese(t);for(let r=1,i=n.length;rxH)throw new Error(`excessive non-spacing marks: ${vB(LE(n.slice(r-1,o)))} (${o-r}/${xH})`);r=o}}}function eMe(e,t,n){let r=[],i=[];for(e=e.slice().reverse();e.length;){let o=nMe(e);if(o)i.length&&(r.push(t(i)),i=[]),r.push(n(o));else{let s=e.pop();if(sse.has(s))i.push(s);else{let a=gI.get(s);if(a)i.push(...a);else if(!ise.has(s))throw cse(s)}}}return i.length&&r.push(t(i)),r}function tMe(e){return e.filter(t=>t!=nse)}function nMe(e,t){let n=yI,r,i=e.length;for(;i&&(n=n.get(e[--i]),!!n);){let{V:o}=n;o&&(r=o,e.length=i)}return r}function rMe(e){return QBe(e)}function bI(e,t,n){var r,i,o,s,a;t==null&&(t=100);function c(){var l=Date.now()-s;l=0?r=setTimeout(c,t-l):(r=null,n||(a=e.apply(o,i),o=i=null))}var u=function(){o=this,i=arguments,s=Date.now();var l=n&&!r;return r||(r=setTimeout(c,t)),l&&(a=e.apply(o,i),o=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}bI.debounce=bI;var iMe=bI;const AH=wl(iMe);function lse(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=j.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=j.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),u=t?typeof t=="number"?t:t.scroll:null,l=t?typeof t=="number"?t:t.resize:null,d=j.useRef(!1);j.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,p]=j.useMemo(()=>{const b=()=>{if(!c.current.element)return;const{left:v,top:w,width:E,height:S,bottom:I,right:A,x:O,y:N}=c.current.element.getBoundingClientRect(),R={left:v,top:w,width:E,height:S,bottom:I,right:A,x:O,y:N};c.current.element instanceof HTMLElement&&i&&(R.height=c.current.element.offsetHeight,R.width=c.current.element.offsetWidth),Object.freeze(R),d.current&&!cMe(c.current.lastBounds,R)&&a(c.current.lastBounds=R)};return[b,l?AH(b,l):b,u?AH(b,u):b]},[a,i,u,l]);function m(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",p,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function x(){c.current.element&&(c.current.resizeObserver=new o(p),c.current.resizeObserver.observe(c.current.element),n&&c.current.scrollContainers&&c.current.scrollContainers.forEach(b=>b.addEventListener("scroll",p,{capture:!0,passive:!0})))}const y=b=>{!b||b===c.current.element||(m(),c.current.element=b,c.current.scrollContainers=dse(b),x())};return sMe(p,!!n),oMe(h),j.useEffect(()=>{m(),x()},[n,p,h]),j.useEffect(()=>m,[]),[y,s,f]}function oMe(e){j.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function sMe(e,t){j.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function dse(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...dse(e.parentElement)]}const aMe=["x","y","top","bottom","left","right","width","height"],cMe=(e,t)=>aMe.every(n=>e[n]===t[n]);var fse=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},e.prototype.connect_=function(){!vI||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),pMe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!vI||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=hMe.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),hse=function(e,t){for(var n=0,r=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof Em(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new CMe(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Em(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new AMe(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),gse=typeof WeakMap<"u"?new WeakMap:new fse,mse=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=gMe.getInstance(),r=new SMe(t,n,this);gse.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){mse.prototype[e]=function(){var t;return(t=gse.get(this))[e].apply(t,arguments)}});var kMe=function(){return typeof d9.ResizeObserver<"u"?d9.ResizeObserver:mse}(),v5={},TMe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},yse={},ts={};let xB;const _Me=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];ts.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};ts.getSymbolTotalCodewords=function(t){return _Me[t]};ts.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};ts.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');xB=t};ts.isKanjiModeEnabled=function(){return typeof xB<"u"};ts.toSJIS=function(t){return xB(t)};var ME={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,i){if(e.isValid(r))return r;try{return t(r)}catch{return i}}})(ME);function bse(){this.buffer=[],this.length=0}bse.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var PMe=bse;function x5(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}x5.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)};x5.prototype.get=function(e,t){return this.data[e*this.size+t]};x5.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};x5.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var IMe=x5,vse={};(function(e){const t=ts.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,o=t(r),s=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let c=1;c=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const o=i.size;let s=0,a=0,c=0,u=null,l=null;for(let d=0;d=5&&(s+=t.N1+(a-5)),u=h,a=1),h=i.get(f,d),h===l?c++:(c>=5&&(s+=t.N1+(c-5)),l=h,c=1)}a>=5&&(s+=t.N1+(a-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(i){const o=i.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,c=c<<1&2047|i.get(l,u),l>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let o=0;const s=i.data.length;for(let c=0;c=0;){const s=o[0];for(let c=0;c0){const o=new Uint8Array(this.degree);return o.set(r,i),o}return r};var NMe=wB,Ase={},Sf={},EB={};EB.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Wc={};const Sse="[0-9]+",OMe="[A-Z $%*+\\-./:]+";let i4="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i4=i4.replace(/u/g,"\\u");const LMe="(?:(?![A-Z0-9 $%*+\\-./:]|"+i4+`)(?:.|[\r +]))+`;Wc.KANJI=new RegExp(i4,"g");Wc.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Wc.BYTE=new RegExp(LMe,"g");Wc.NUMERIC=new RegExp(Sse,"g");Wc.ALPHANUMERIC=new RegExp(OMe,"g");const BMe=new RegExp("^"+i4+"$"),MMe=new RegExp("^"+Sse+"$"),DMe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Wc.testKanji=function(t){return BMe.test(t)};Wc.testNumeric=function(t){return MMe.test(t)};Wc.testAlphanumeric=function(t){return DMe.test(t)};(function(e){const t=EB,n=Wc;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,s){if(e.isValid(o))return o;try{return r(o)}catch{return s}}})(Sf);(function(e){const t=ts,n=DE,r=ME,i=Sf,o=EB,s=7973,a=t.getBCHDigit(s);function c(f,h,p){for(let m=1;m<=40;m++)if(h<=e.getCapacity(m,p,f))return m}function u(f,h){return i.getCharCountIndicator(f,h)+4}function l(f,h){let p=0;return f.forEach(function(m){const x=u(m.mode,h);p+=x+m.getBitsLength()}),p}function d(f,h){for(let p=1;p<=40;p++)if(l(f,p)<=e.getCapacity(p,h,i.MIXED))return p}e.from=function(h,p){return o.isValid(h)?parseInt(h,10):p},e.getCapacity=function(h,p,m){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=i.BYTE);const x=t.getSymbolTotalCodewords(h),y=n.getTotalCodewordsCount(h,p),b=(x-y)*8;if(m===i.MIXED)return b;const v=b-u(m,h);switch(m){case i.NUMERIC:return Math.floor(v/10*3);case i.ALPHANUMERIC:return Math.floor(v/11*2);case i.KANJI:return Math.floor(v/13);case i.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(h,p){let m;const x=r.from(p,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,x);if(h.length===0)return 1;m=h[0]}else m=h;return c(m.mode,m.getLength(),x)},e.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;t.getBCHDigit(p)-a>=0;)p^=s<=0;)i^=Tse<0&&(r=this.data.substr(n),i=parseInt(r,10),t.put(i,o*3+1))};var UMe=Cm;const zMe=Sf,HS=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Am(e){this.mode=zMe.ALPHANUMERIC,this.data=e}Am.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Am.prototype.getLength=function(){return this.data.length};Am.prototype.getBitsLength=function(){return Am.getBitsLength(this.data.length)};Am.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=HS.indexOf(this.data[n])*45;r+=HS.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(HS.indexOf(this.data[n]),6)};var $Me=Am,HMe=function(t){for(var n=[],r=t.length,i=0;i=55296&&o<=56319&&r>i+1){var s=t.charCodeAt(i+1);s>=56320&&s<=57343&&(o=(o-55296)*1024+s-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const VMe=HMe,WMe=Sf;function Sm(e){this.mode=WMe.BYTE,typeof e=="string"&&(e=VMe(e)),this.data=new Uint8Array(e)}Sm.getBitsLength=function(t){return t*8};Sm.prototype.getLength=function(){return this.data.length};Sm.prototype.getBitsLength=function(){return Sm.getBitsLength(this.data.length)};Sm.prototype.write=function(e){for(let t=0,n=this.data.length;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var YMe=km,Pse={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,r,i){var o={},s={};s[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,u,l,d,f,h,p,m,x;!a.empty();){c=a.pop(),u=c.value,d=c.cost,f=n[u]||{};for(l in f)f.hasOwnProperty(l)&&(h=f[l],p=d+h,m=s[l],x=typeof s[l]>"u",(x||m>p)&&(s[l]=p,a.push(l,p),o[l]=u))}if(typeof i<"u"&&typeof s[i]>"u"){var y=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(y)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],o=r;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,r,i){var o=t.single_source_shortest_paths(n,r,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,i={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Pse);var qMe=Pse.exports;(function(e){const t=Sf,n=UMe,r=$Me,i=GMe,o=YMe,s=Wc,a=ts,c=qMe;function u(y){return unescape(encodeURIComponent(y)).length}function l(y,b,v){const w=[];let E;for(;(E=y.exec(v))!==null;)w.push({data:E[0],index:E.index,mode:b,length:E[0].length});return w}function d(y){const b=l(s.NUMERIC,t.NUMERIC,y),v=l(s.ALPHANUMERIC,t.ALPHANUMERIC,y);let w,E;return a.isKanjiModeEnabled()?(w=l(s.BYTE,t.BYTE,y),E=l(s.KANJI,t.KANJI,y)):(w=l(s.BYTE_KANJI,t.BYTE,y),E=[]),b.concat(v,w,E).sort(function(I,A){return I.index-A.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function f(y,b){switch(b){case t.NUMERIC:return n.getBitsLength(y);case t.ALPHANUMERIC:return r.getBitsLength(y);case t.KANJI:return o.getBitsLength(y);case t.BYTE:return i.getBitsLength(y)}}function h(y){return y.reduce(function(b,v){const w=b.length-1>=0?b[b.length-1]:null;return w&&w.mode===v.mode?(b[b.length-1].data+=v.data,b):(b.push(v),b)},[])}function p(y){const b=[];for(let v=0;v=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?e.set(o+a,s+c,!0,!0):e.set(o+a,s+c,!1,!0))}}function oDe(e){const t=e.size;for(let n=8;n>a&1)===1,e.set(i,o,s,!0),e.set(o,i,s,!0)}function GS(e,t,n){const r=e.size,i=nDe.getEncodedBits(t,n);let o,s;for(o=0;o<15;o++)s=(i>>o&1)===1,o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(r-15+o,8,s,!0),o<8?e.set(8,r-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(r-8,8,1,!0)}function cDe(e,t){const n=e.size;let r=-1,i=n-1,o=7,s=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!e.isReserved(i,a-c)){let u=!1;s>>o&1)===1),e.set(i,a-c,u),o--,o===-1&&(s++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function uDe(e,t,n){const r=new ZMe;n.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),rDe.getCharCountIndicator(c.mode,e)),c.write(r)});const i=FE.getSymbolTotalCodewords(e),o=EI.getTotalCodewordsCount(e,t),s=(i-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let c=0;c=7&&aDe(c,t),cDe(c,s),isNaN(r)&&(r=wI.getBestMask(c,GS.bind(null,c,n))),wI.applyMask(r,c),GS(c,n,r),{modules:c,version:t,errorCorrectionLevel:n,maskPattern:r,segments:i}}yse.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let r=VS.M,i,o;return typeof n<"u"&&(r=VS.from(n.errorCorrectionLevel,VS.M),i=p9.from(n.version),o=wI.from(n.maskPattern),n.toSJISFunc&&FE.setToSJISFunction(n.toSJISFunc)),dDe(t,i,r,o)};var Ise={},CB={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:i,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},e.getImageWidth=function(r,i){const o=e.getScale(r,i);return Math.floor((r+i.margin*2)*o)},e.qrToImageData=function(r,i,o){const s=i.modules.size,a=i.modules.data,c=e.getScale(s,o),u=Math.floor((s+o.margin*2)*c),l=o.margin*c,d=[o.color.light,o.color.dark];for(let f=0;f=l&&h>=l&&f"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=r()),c=t.getOptions(c);const l=t.getImageWidth(o.modules.size,c),d=u.getContext("2d"),f=d.createImageData(l,l);return t.qrToImageData(f.data,o,c),n(d,u,l),d.putImageData(f,0,0),u},e.renderToDataURL=function(o,s,a){let c=a;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(o,s,c),l=c.type||"image/png",d=c.rendererOpts||{};return u.toDataURL(l,d.quality)}})(Ise);var Rse={};const fDe=CB;function _H(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function KS(e,t,n){let r=e+t;return typeof n<"u"&&(r+=" "+n),r}function hDe(e,t,n){let r="",i=0,o=!1,s=0;for(let a=0;a0&&c>0&&e[a-1]||(r+=o?KS("M",c+n,.5+u+n):KS("m",i,0),i=0,o=!1),c+1':"",u="',l='viewBox="0 0 '+a+" "+a+'"',f=''+c+u+` +`;return typeof r=="function"&&r(null,f),f};const pDe=TMe,CI=yse,Nse=Ise,gDe=Rse;function AB(e,t,n,r,i){const o=[].slice.call(arguments,1),s=o.length,a=typeof o[s-1]=="function";if(!a&&!pDe())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(i=n,n=t,t=r=void 0):s===3&&(t.getContext&&typeof i>"u"?(i=r,r=void 0):(i=r,r=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=r=void 0):s===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(c,u){try{const l=CI.create(n,r);c(e(l,t,r))}catch(l){u(l)}})}try{const c=CI.create(n,r);i(null,e(c,t,r))}catch(c){i(c)}}v5.create=CI.create;v5.toCanvas=AB.bind(null,Nse.render);v5.toDataURL=AB.bind(null,Nse.renderToDataURL);v5.toString=AB.bind(null,function(e,t,n){return gDe.render(e,n)});var QS=0,YS=1,s6=2,qS=3,ZS=4,mDe=5,yDe=6,Ose=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],JS=function(t){return t?yDe:mDe},PH=function(t,n,r,i,o){clearTimeout(i.current),n(t),r.current=t,o&&o({state:Ose[t]})},Lse=function(t){var n=t===void 0?{}:t,r=n.enter,i=r===void 0?!0:r,o=n.exit,s=o===void 0?!0:o,a=n.preEnter,c=n.preExit,u=n.timeout,l=n.initialEntered,d=n.mountOnEnter,f=n.unmountOnExit,h=n.onChange,p=j.useState(l?s6:JS(d)),m=p[0],x=p[1],y=j.useRef(m),b=j.useRef(),v,w;typeof u=="object"?(v=u.enter,w=u.exit):v=w=u;var E=j.useCallback(function(){var I;switch(y.current){case YS:case QS:I=s6;break;case ZS:case qS:I=JS(f);break}I!==void 0&&PH(I,x,y,b,h)},[h,f]),S=j.useCallback(function(I){var A=function N(R){switch(PH(R,x,y,b,h),R){case YS:v>=0&&(b.current=setTimeout(E,v));break;case ZS:w>=0&&(b.current=setTimeout(E,w));break;case QS:case qS:b.current=setTimeout(function(){return N(R+1)},0);break}},O=y.current<=s6;typeof I!="boolean"&&(I=!O),I?O||A(i?a?QS:YS:s6):O&&A(s?c?qS:ZS:JS(f))},[E,h,i,s,a,c,v,w,f]);return j.useEffect(function(){return function(){return clearTimeout(b.current)}},[]),[Ose[m],S,E]};let bDe;const vDe=()=>bDe,SB=e=>{if(typeof window>"u")return!1;const{ethereum:t}=window;return!!(t!=null&&t[`is${e}`]||t!=null&&t.providers&&(t!=null&&t.providers.find(n=>n==null?void 0:n[`is${e}`])))},Bse=()=>SB("Family"),xDe=()=>SB("Rainbow"),wDe=()=>SB("Zerion"),EDe=({...e})=>g.jsxs("svg",{...e,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)"},children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5611 8.12948C21.0082 7.90729 21.5007 7.79167 22 7.79167C22.4993 7.79167 22.9919 7.90729 23.439 8.12948L23.4408 8.1304L33.0387 12.9293C33.577 13.197 34.031 13.61 34.3478 14.121C34.6649 14.6323 34.833 15.2218 34.8333 15.8234V27.2595C34.833 27.8611 34.6649 28.4511 34.3478 28.9624C34.031 29.4733 33.578 29.8858 33.0398 30.1535L23.4411 34.9528C22.9919 35.1775 22.4963 35.2947 21.994 35.2947C21.4918 35.2947 20.9964 35.1777 20.5472 34.9529L10.9475 30.1531L10.9452 30.1519C10.4071 29.8808 9.95535 29.4646 9.6411 28.9504C9.32739 28.437 9.16312 27.8464 9.16673 27.2448L9.16675 27.2417L10.0004 27.2475H9.16673V27.2448V15.8239C9.16705 15.2223 9.33518 14.6322 9.65222 14.121C9.96906 13.61 10.4221 13.1976 10.9604 12.9298L20.5592 8.1304L20.5611 8.12948ZM21.3031 9.62267L11.8706 14.3389L22 19.4036L32.1294 14.3389L22.697 9.62267C22.4806 9.51531 22.2416 9.45905 22 9.45905C21.7585 9.45905 21.5194 9.51534 21.3031 9.62267ZM10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241ZM22.8337 33.3923L32.2967 28.6608C32.5576 28.5312 32.7772 28.3313 32.9308 28.0836C33.0844 27.836 33.1658 27.5504 33.166 27.259V15.8243C33.1659 15.7786 33.1639 15.7331 33.1599 15.6878L22.8337 20.8509V33.3923Z",fill:"url(#paint0_linear_3546_7073)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241Z",fill:"url(#paint1_linear_3546_7073)",fillOpacity:"0.3"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_3546_7073",x1:"22",y1:"7.79167",x2:"22",y2:"35.2947",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.7"})]}),g.jsxs("linearGradient",{id:"paint1_linear_3546_7073",x1:"22",y1:"7.79167",x2:"22",y2:"35.2947",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.7"})]})]})]}),CDe=({...e})=>g.jsx("svg",{...e,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6505 3.64041C15.6501 3.64062 15.6497 3.64083 15.6493 3.64103L6.05165 8.43985L16.2501 13.5391L26.4484 8.43987L16.8508 3.64103C16.8504 3.64083 16.85 3.64063 16.8496 3.64043C16.6632 3.54806 16.458 3.5 16.25 3.5C16.042 3.5 15.8369 3.54806 15.6505 3.64041ZM28 10.4592L17.5001 15.7091L17.5 28.5205L27.248 23.6465L27.2508 23.6452C27.4757 23.5334 27.665 23.3611 27.7973 23.1477C27.9297 22.9342 27.9999 22.6881 28 22.4369V10.4592ZM15 28.527L15.0001 15.7091L4.50006 10.4591V22.4333C4.49831 22.6849 4.56687 22.9319 4.69807 23.1466C4.82896 23.3608 5.01696 23.5342 5.24095 23.6475C5.24148 23.6477 5.242 23.648 5.24253 23.6483L15 28.527ZM14.5207 31.0824L4.12104 25.8826L4.11759 25.8809C3.47681 25.558 2.93902 25.0625 2.56486 24.4502C2.19154 23.8394 1.99597 23.1365 2.00006 22.4207V10.0486C2.00044 9.33234 2.20062 8.62972 2.5781 8.021C2.95529 7.41274 3.49457 6.92167 4.13537 6.60291C4.13585 6.60267 4.13633 6.60243 4.13681 6.60219L14.534 1.40359L14.5368 1.40221C15.0692 1.13767 15.6556 1 16.25 1C16.8445 1 17.4309 1.13767 17.9633 1.40221L17.966 1.40358L28.3633 6.60219C28.3638 6.60245 28.3643 6.6027 28.3648 6.60295C29.0055 6.92171 29.5448 7.41276 29.922 8.021C30.2994 8.62973 30.4996 9.33168 30.5 10.0479V22.4376C30.4996 23.1538 30.2994 23.8565 29.922 24.4652C29.5448 25.0734 29.0056 25.5644 28.365 25.8831C28.3644 25.8834 28.3638 25.8837 28.3633 25.884L17.9664 31.0824C17.9663 31.0825 17.9665 31.0824 17.9664 31.0824C17.4316 31.3499 16.8415 31.4894 16.2435 31.4894C15.6455 31.4894 15.0554 31.3499 14.5207 31.0824C14.5205 31.0824 14.5208 31.0825 14.5207 31.0824Z",fill:"#CCCCCC"})}),Mse=({background:e=!1,...t})=>g.jsx("svg",{...t,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"var(--ck-brand-walletConnect)"}:void 0,children:g.jsx("path",{d:"M9.58818 11.8556C13.1293 8.31442 18.8706 8.31442 22.4117 11.8556L22.8379 12.2818C23.015 12.4588 23.015 12.7459 22.8379 12.9229L21.3801 14.3808C21.2915 14.4693 21.148 14.4693 21.0595 14.3808L20.473 13.7943C18.0026 11.3239 13.9973 11.3239 11.5269 13.7943L10.8989 14.4223C10.8104 14.5109 10.6668 14.5109 10.5783 14.4223L9.12041 12.9645C8.94336 12.7875 8.94336 12.5004 9.12041 12.3234L9.58818 11.8556ZM25.4268 14.8706L26.7243 16.1682C26.9013 16.3452 26.9013 16.6323 26.7243 16.8093L20.8737 22.6599C20.6966 22.8371 20.4096 22.8371 20.2325 22.6599L16.0802 18.5076C16.0359 18.4634 15.9641 18.4634 15.9199 18.5076L11.7675 22.6599C11.5905 22.8371 11.3034 22.8371 11.1264 22.66C11.1264 22.66 11.1264 22.6599 11.1264 22.6599L5.27561 16.8092C5.09856 16.6322 5.09856 16.3451 5.27561 16.168L6.57313 14.8706C6.75019 14.6934 7.03726 14.6934 7.21431 14.8706L11.3668 19.023C11.411 19.0672 11.4828 19.0672 11.5271 19.023L15.6793 14.8706C15.8563 14.6934 16.1434 14.6934 16.3205 14.8706L20.473 19.023C20.5172 19.0672 20.589 19.0672 20.6332 19.023L24.7856 14.8706C24.9627 14.6935 25.2498 14.6935 25.4268 14.8706Z",fill:e?"white":"var(--ck-brand-walletConnect)"})}),ADe=({background:e=!1,...t})=>g.jsxs("svg",{...t,style:e?{background:"linear-gradient(0deg, var(--ck-brand-metamask-12), var(--ck-brand-metamask-11))",borderRadius:"27.5%"}:void 0,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M27.2684 4.03027L17.5018 11.2841L19.3079 7.00442L27.2684 4.03027Z",fill:"var(--ck-brand-metamask-02)",stroke:"var(--ck-brand-metamask-02)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M4.7218 4.03027L14.4099 11.3528L12.6921 7.00442L4.7218 4.03027Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M23.7544 20.8438L21.1532 24.8289L26.7187 26.3602L28.3187 20.9321L23.7544 20.8438Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M3.69104 20.9321L5.28117 26.3602L10.8467 24.8289L8.24551 20.8438L3.69104 20.9321Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M10.5327 14.1108L8.98181 16.4568L14.5081 16.7022L14.3117 10.7637L10.5327 14.1108Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M21.4576 14.1111L17.6295 10.6953L17.5018 16.7025L23.0182 16.4571L21.4576 14.1111Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M10.8469 24.8292L14.1647 23.2096L11.2984 20.9717L10.8469 24.8292Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M17.8257 23.2096L21.1531 24.8292L20.6918 20.9717L17.8257 23.2096Z",fill:"var(--ck-brand-metamask-08)",stroke:"var(--ck-brand-metamask-08)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M21.1531 24.8296L17.8257 23.21L18.0906 25.3793L18.0612 26.2921L21.1531 24.8296Z",fill:"var(--ck-brand-metamask-06)",stroke:"var(--ck-brand-metamask-06)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M10.8469 24.8296L13.9388 26.2921L13.9192 25.3793L14.1647 23.21L10.8469 24.8296Z",fill:"var(--ck-brand-metamask-06)",stroke:"var(--ck-brand-metamask-06)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M13.9877 19.5389L11.2196 18.7242L13.1729 17.8311L13.9877 19.5389Z",fill:"var(--ck-brand-metamask-09)",stroke:"var(--ck-brand-metamask-09)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M18.0023 19.5389L18.8171 17.8311L20.7802 18.7242L18.0023 19.5389Z",fill:"var(--ck-brand-metamask-09)",stroke:"var(--ck-brand-metamask-09)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M10.8468 24.8289L11.3179 20.8438L8.24561 20.9321L10.8468 24.8289Z",fill:"var(--ck-brand-metamask-03)",stroke:"var(--ck-brand-metamask-03)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M20.6821 20.8438L21.1532 24.8289L23.7544 20.9321L20.6821 20.8438Z",fill:"var(--ck-brand-metamask-03)",stroke:"var(--ck-brand-metamask-03)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M23.0182 16.4565L17.5018 16.7019L18.0122 19.5387L18.827 17.8308L20.7902 18.7239L23.0182 16.4565Z",fill:"var(--ck-brand-metamask-03)",stroke:"var(--ck-brand-metamask-03)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M11.2198 18.7239L13.1829 17.8308L13.9878 19.5387L14.5081 16.7019L8.98181 16.4565L11.2198 18.7239Z",fill:"var(--ck-brand-metamask-03)",stroke:"var(--ck-brand-metamask-03)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M8.98181 16.4565L11.2983 20.9718L11.2198 18.7239L8.98181 16.4565Z",fill:"var(--ck-brand-metamask-10)",stroke:"var(--ck-brand-metamask-10)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M20.7901 18.7239L20.6919 20.9718L23.0181 16.4565L20.7901 18.7239Z",fill:"var(--ck-brand-metamask-10)",stroke:"var(--ck-brand-metamask-10)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M14.508 16.7021L13.9878 19.5389L14.6356 22.886L14.7828 18.4788L14.508 16.7021Z",fill:"var(--ck-brand-metamask-10)",stroke:"var(--ck-brand-metamask-10)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M17.5017 16.7021L17.2367 18.4689L17.3545 22.886L18.0121 19.5389L17.5017 16.7021Z",fill:"var(--ck-brand-metamask-10)",stroke:"var(--ck-brand-metamask-10)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M18.0121 19.5388L17.3545 22.886L17.8257 23.2099L20.6918 20.972L20.79 18.7241L18.0121 19.5388Z",fill:"var(--ck-brand-metamask-01)",stroke:"var(--ck-brand-metamask-01)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M11.2196 18.7241L11.2981 20.972L14.1644 23.2099L14.6355 22.886L13.9877 19.5388L11.2196 18.7241Z",fill:"var(--ck-brand-metamask-01)",stroke:"var(--ck-brand-metamask-01)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M18.0615 26.2917L18.0908 25.3788L17.8455 25.1628H14.145L13.9192 25.3788L13.9388 26.2917L10.8469 24.8291L11.9267 25.7126L14.1155 27.234H17.875L20.0736 25.7126L21.1533 24.8291L18.0615 26.2917Z",fill:"var(--ck-brand-metamask-07)",stroke:"var(--ck-brand-metamask-07)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M17.8258 23.2096L17.3546 22.8857H14.6357L14.1646 23.2096L13.9191 25.379L14.1449 25.163H17.8454L18.0907 25.379L17.8258 23.2096Z",fill:"var(--ck-brand-metamask-04)",stroke:"var(--ck-brand-metamask-04)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M27.6806 11.7552L28.5149 7.75041L27.2683 4.03027L17.8257 11.0387L21.4575 14.1109L26.591 15.6128L27.7296 14.2876L27.2389 13.9342L28.0241 13.2178L27.4156 12.7465L28.2007 12.1478L27.6806 11.7552Z",fill:"var(--ck-brand-metamask-05)",stroke:"var(--ck-brand-metamask-05)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M3.48486 7.75041L4.3192 11.7552L3.78916 12.1478L4.57441 12.7465L3.97566 13.2178L4.7609 13.9342L4.27012 14.2876L5.39892 15.6128L10.5325 14.1109L14.1644 11.0387L4.72164 4.03027L3.48486 7.75041Z",fill:"var(--ck-brand-metamask-05)",stroke:"var(--ck-brand-metamask-05)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M26.591 15.6122L21.4575 14.1104L23.0181 16.4564L20.6919 20.9716L23.7544 20.9323H28.3186L26.591 15.6122Z",fill:"var(--ck-brand-metamask-01)",stroke:"var(--ck-brand-metamask-01)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M10.5326 14.1104L5.39897 15.6122L3.69104 20.9323H8.24551L11.2982 20.9716L8.98168 16.4564L10.5326 14.1104Z",fill:"var(--ck-brand-metamask-01)",stroke:"var(--ck-brand-metamask-01)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M17.5018 16.7018L17.8258 11.0381L19.3177 7.00391H12.6921L14.1645 11.0381L14.5081 16.7018L14.6258 18.4883L14.6356 22.8856H17.3546L17.3742 18.4883L17.5018 16.7018Z",fill:"var(--ck-brand-metamask-01)",stroke:"var(--ck-brand-metamask-01)",strokeWidth:"0.269931",strokeLinecap:"round",strokeLinejoin:"round"})]}),SDe=({background:e=!1,...t})=>g.jsxs("svg",{...t,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"var(--ck-brand-coinbaseWallet)"}),e&&g.jsx("rect",{rx:"27%",width:"20",height:"20",fill:"var(--ck-brand-coinbaseWallet)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0001 17C13.8661 17 17.0001 13.866 17.0001 10C17.0001 6.13401 13.8661 3 10.0001 3C6.13413 3 3.00012 6.13401 3.00012 10C3.00012 13.866 6.13413 17 10.0001 17ZM8.25012 7.71429C7.95427 7.71429 7.71441 7.95414 7.71441 8.25V11.75C7.71441 12.0459 7.95427 12.2857 8.25012 12.2857H11.7501C12.046 12.2857 12.2858 12.0459 12.2858 11.75V8.25C12.2858 7.95414 12.046 7.71429 11.7501 7.71429H8.25012Z",fill:"white"})]}),Dse=({...e})=>g.jsx("svg",{...e,width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{backgroundSize:"100% 100%",backgroundImage:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAABQGlDQ1BzUDNDAAB4nGNgYHyQk5xbzKLAwJCbV1IU5O6kEBEZpcD+iIGZQYSBk4GPQTYxubjAN9gthAEIihPLi5NLinIYUMC3awyMIPqybkZiXopc+xz3pvOzD4rlWyascy2VY8APuFJSi5OB9B8gVkkuKCphYGAEuoZBqbykAMR2AbJFkjMSU4DsCCBbpwjoQCC7BSSeDmHPALGTIOw1IHZRSJAzkH0AyFZIR2InIbFzc0qToW4AuZ4nNS80GEhzALEMQzFDAIMxgzMONWxgNc5AaMCgCAov9HAoTjM2gujicWJgYL33//9nVQYG9skMDH8n/P//e+H////8GBiYZzEwHBBB6G++z8Bgux/EQoh5AfkbzYHBtBUhpmHBwCDIxcBwoqIgsSgRLMQMxExpmQwMn5YzMPBGMjAIXwDqiQYAOQZcLsEClb4AAGmfSURBVHgB1b0J1G3HVR6497n3/98o6Q0anubBludJeAiTbYwd2gGC6UACBFZY7gVNB3CaJEB3VhbQhNW9OtDQkAYSIOkEGhJCGJrEBGzJkrEsT7Jky5JszXrSexqf3qw3/v891TXsvWvvferce/8nyabrvfPfc+rUqdq166u9d+06pwrP+/CHA3AI8RQRmqFxbyRliVdpcSQ9jj27IASwdAVHVxi7l65hcZAn6NlFdOOce4vCgB5Fc5iXdiN1abSFP1/2PrRoUtiYR/Oy9C9Tr7EwNVc4pwojTDFxC0CMI2nH8hwlhX4D5ZOvWwzy9cHlS8FlzhfwZNlyDN2pPlSXwT0VAtd7yTL8+SDuHOvCzzKdyOButIeuj6HfpTXtu8Ew3WD6NpjnALnFuI1IPB9GK0n5ZiCM9H4GyTJhLqAX1GHZMoJK70Etp0tK4nlhLqBfQF08CFnAgPrN8SHMz0N1YmjluYGwNKDnSeV5DEOnttHnpZ7fKBDyuWJWUHnKqWLUsgyaJ4WbjT2nDv56TCWL6gaw0vklrAv/vpD2mNcWrTpAI00+H9G0G5XWU/1gs8fBSCM1gMq/Y/d9BzD3WiqUpS4zQakyBkDQ6k7HQ5uZi4CgQepphJE66DiuC9PM57lcpsU1auA6Ul1Q1S399o6mF1qXFDq5NbyHqi7QoBmZ5wp8wdn+3G6o6qifRV0vQ3QtbxGwPUbT+RSXeEj/NiUyqQwP5BaIOw8Gl94HAwTKS0viXkk1fejeru02k2+jrNb1gE7d4GA7YwtEYYEtHyhN0HWh6/Q7AQV4bmidPwzDaF00rbpdGnHQqI+vh26LoPjNdQCi3XeAlL7zcaA6g5PYCDBqMup70xahvpK2DkMACmjVvc4904EFApL08dJgAAxVUX3OTEIlFcYYigooPi9fZ0nPtCj6fKPr+2MSD+fUARzNDBCJ0yBR9ZT6qjKC8jRImcxfvuf4b84pLXBdsG1bG94pLSL00i0taHpdP4rv6XnoOiut1aDSaCyYI3AV7aM29KAyc1QwNqSyZ5gHdEcM7kbyaAXfmOYg5vaF2MrQxCzFGFZ3Oj9dH98xPc263t0YQKAdPCA0CHxn1CDo+Z4ysSQvrovTPjkksHCdoLYDtOpCaY3AAZgvYBjABFShWdGfjs7VKcepugSiS3dK/6vt80HHUnVfalA4b2CHDROCG1uDmM87dd4Cgy5HiG1I2OB6uwEC9VhOhxosytZrSSAg2nU9dZ2wRT+MaB+mXwdtd7pD6qJA3ENtQCOxAYZ2d6M+Y3w2dQEL9rntQXXSAGOaO2f+zcACGZVwMRJZ5QtULxE+/OvKHAvTFhMs7bZx5XyOVNZg7kAxT0nkTkmNVNFunoRz6rZXKi4xxvR2YhoDm5ntJRxxroJhBMQtIHe+vj6e8muBTMwKJgFqg/eUV0/8aNWnWRfn/QBV/gDUrh2w0Un9PZMv063axEtfXxehn/JhgdNzHRoDQM2fWiU12Hb3OMyV0K3KeDAbadUA8AQsIDqVRqS1VndOOoCuWCBmIavgdE0MI/D2JCl61eAi7RSYWVWO1Rddp9QN7evQAnk5tJyRUgemknQ6rgMfyozyoNHqfTDo1PWAtkQWuhttxveB6lDqpWtQz7XG0HTqw8fNFF3mOWU+5eKcRNYSG6AN6qk2wNHZKWJPkgqQHstSFZxUpvOJZhTlNaHryQig828AwBFzoFQ0MQ8ziDOYMTGhJ6akhq+gnjGoYWjD8YBEQK0GFbrjAYyD2AAhd6KSFQNZQBCcOMDaTj1wfahjgjU5pB7U2B1UbcPqfCDJuC6qzYxWTPGR3xPTBqm9dD1R6gLAHdO2SSDaU6MJX/u+CA3XMWdES0edk6UzUr14nNDxs/QrfnPlANBSnmkKCsNTQ6gGk+r1A3uR47ykggrmibrWcRbQLOGGErEVqkRT6jjm2qtG5/MJAXwGwajApunhB0QODFrTtECd03VWwmk+1QqEobnBEjrTXkDOkjkBYUIgSHGmkyIaST/wCuCQnk4ETW2TBOSBSei1UkMDcJlFkBBPu0mhnwA6I3BO0nlMs574SrydoRt7Qe0A2VRRYDbjKIVRI6kpvpgcaJWjrkCnC8Wh50I3rkhhdT1RQJ5AZaIBNjZUdqOHDtSub2xEB+5YTpSQM2ApUk0PaA0wEF3Du/qBBcBE1Vnbn1wXAKtxuNzg6qCBrTtlp0FO5Zl0YMHMdeBfDUoteSe+ftxhVVov3TWPQNOv24bbIZ33SaOU81mU4h1pmBkdPEBE6rg6yLgIQAb1fvAbPF0UN5hY0b3GxI+AWYOXwTzRYCYglHN7TzPQgDoUM0QTUCUrSzEl4bCaGTOodhoDPEvr9Gwo5kp+tsOB71ZLpPpb6DYN7+qLyBpJaRwYDqiCrouugx8HxLqzNJ5BBbnutMYT4iUoCYNkBhWTCJrmoBU0heaJ/Or2BlUbMjWAgdww9aCAWOoQUnukMgjY8VgHEBM3g5qvCcAz6vxsZg0EkBIOmsfW5OCEKpGW2PMkM/fwdD51gJ4OAA71GfRmS2oAa9MOJxpIMkOpeJZiufGKqVFUNWSmiS2HKObKhJiuxw8AUMtnerDS5U2nOh6gdMD1YL5hFZYChfpbxwDa/scMBLYnRf1C6aCdgF55CAhMpmWx2vBm4Ad2LMNAnrTa1LW/RkVQvz0SqEmbzLDSOyOAI4E4CyqlTGYAYusz9tiG7uhX28/efQsNoFsJ7aTVIjNDwAkV2CsUxyCepgEIn9MzU8VII6mBTZxu0Mm4LxZgFk9HH9hOLoydEUNnGeCJjpAlQxo4zrB6C/TslkhodLYmWM1R60qgRjAdskq5CuiuYkB0pAZzoQVIqiHVAXPdZoE7axBg8AAraFDTL41ATVsyLRMPaAJz4k+HOJDURZr7+tiKsJZhM7AnwTIjzZN+14nvqdz19BsHjetprBH6iq0krWO8ES5OUouzAut7MQxs78qbagaAIV7hSR2+FwuDSBJPiTHTzsalgqY0us73FSgK07vCQG0OKsIDeQuyT0M1fC82clFjEwZ1aphQ8u9j3myKGFCr+gFJBRiRVtV0AiPhJtToDPTKJwvu5KGRupBUyx0T2EYO1VSCamumDjkDZUqxlA7VG1AHuEPtqr0YRiKHInSqhq0dtQ7WM+VO42DtlCylCdgzoT+QidFl4dLFmGw/0zQ3BvqNQM64i/HrDNqgXsrCOkcR9GA4uPc7FKiH73JQZtq3DNBQXQrMGsgGxJHQBOQVD/RScJVwWCUgWEEjhBYGBlHB1b5ij0Yqm+w1sTeBwIDk4bAN4AdTnZNqbFMycLWZNAUwEk1AQLDNT5PNL1PtSH+oSPbozUgDyYAqJliPfzU41sksYcnNklGm+509WQFNNjSoekDxykwRlLSm9KFAll18bIYBtbuRNsjjGDVucQIl//ZdHiCugRWWeZzUB4lc122OzMnqj0elVVEBHxRd1YbGxswSWneOPrRknjgJzQBeSQXEXlriC4jzgWAGi2xf8UBjU6zohaurcPnmzXDhpk2wfTrN6VJYiww4urYGz545HY8z8FQ8nl9fJ3VTGmad6ElgTnlP2FOAIICBUAEFaAFQzQ0w9r4e3IrXgyVYKEp4c6J902a4YssW2BXrcIGifT0mObJ2Fg6ePQvPpuP0aTg163MjBCqnF7o7GkwFMg0YLKTaMZCEZ5+8FUwMYgxBBniTGDPpap0Sz/PAkbr6aqR9T+T3ZYnvkfYdK6uwQoPztShNj6yvwcHI70OR/wfi71oocnKSNVDRmKklspuuLzRnV12H1L4I1P0K3mKesZoQLRAxwQCgvl0Itl49COKNIBLhBM5tJ+2Lbb+z9zUXScUgJRBHBqxgjVtByEcBeKxsVwBfGFmBsDsy7y07dsDrLjgfrti61fiijXoBG1Lc/pOn4LaDB+ELR4/CExHoE6h2bx6ksInCg8v0r3MAgDqZoDutsZs7HhBSJ8y9IsDO1RV4285d8MZI+1WRdmjQPhYeO3kSPnv4MNx97Dg8d/ZMAW/uOB3Z0oX2DBJkSVht7p5MFxYG0oaBtARWLcJ1wcD+4BA73Ap89a6d8NadO+G6bduk8y0KqaxHnj8Bdx45DPcePw6HI8iZ71nDTAqPOnLfFewEKLosZDv6LCIBtmfXjwCbQd0pHgplJJmDaT9Kt+MjHwk8KzaQ0NAYAPJvNicSgK1kLkeXpfCKiqu2NKu3ItleFpn4zgsvhOu3b4ctkwm8kHB6NovgOJLB/cCJE1k6BG50UDNxoQ5okMSz7rzae6HtzokAuaS7LoL37ZH2V5+3HbZON/w1mwlnorS668hR+EwE94PPP0/mRPWArIdgBl3F2xGMXz6HUA2PjqU0qAF3KGB/VaT5a3ftjkDeAdsi7QHOPSS+fz7Sfnuk/eHIdx6j5MkUoj0da3Tocx233vO9XsxGGUuE6n/n+vo3FLOpvDMCWrtl6mDASWMA671g4HYKzPE+S+gVksgrnQI0VKYmc+JvXroHXhGBPO06eDFDqmgCx588+SQ8dupUUUuIakDGDAABM1uKqEAsPmg2LWg0tCNKte+96kp4RQRFt6REWzakBrvv+PPwB/v3Z9Ok0A7i1eBJojqrCKJ1St1BNA2bUEDSOMTEF0VT4u9ccTm8MWrDTS8y35O34gtHj8EHn34q0r5WXHohmYAgIE6/ZxuA1qBOgF4nQK+HOljWM6UMaDZD+Bp33Xxz0CaHnhmc52NOYNbSeVWBd8VdywCQ7Ll3XXQRvOfii7JkaIWNSosxSCVb+2PPHYQ/fvIJksQo7wME9aAfQ0xATUJAsTETs1L811+4G755z55RbfJi0v6JSPtHDhwgW5VnRosZUj02QTSOJyKra3LzrcZn3x35/k2XXAI7VlfgpaT9yNnE9+ci7c/KmCWZSwLoBFqwYD4bO0MaNM76XtLMwIGaB8TpnREqS795mTvurltuCaJuQzBvvlW7y87wMWjT+aoyMzKQs6nRxQFGBfOUpNv2CIIkHb4q2msvBkOXZfDnjhyB33p0b2Za1j7Kfg5gvTnFi6EnWbJ+jwDu4G9dfjm8ddcu+HLSfmek/T/t2x8HjzOlaQqoxdMR9Dsiyk/bFzAngfM9V14B74yA/nLRnvL89KFD8B8j7Wtk+qUB4zowgIskzucB5HyNJHO6z+aKMT+CMrNC48MHA2iwgz8D6K4TG9hIZgEzCLg3sX0NNOqMBe6Oqu6HrrsWLo+j/40GPSgcY+BY4LTPxFH5P7/vfng+AmNKkpols6TDAuKJPFsAcX40MX7k5S+Di6IHwOcbXkKaOSTT41cfeih6SNbFF6xfudQ0VDdnAcN5UYj841dcD5cpvnvazoXmscGuj9sXTb5/8eBDcCJ1yA5zR0yS+GwC9qzPQD4DUCV1qCA+21vTQ3zxLVDT0XkwyygZ3bsWQC4eBOuLJjuT/bJTSsv2cpIS26YT+B8jIOaBOcw5ACzzwxLpfdqLIxj/yateCTsjLezDLrOWoUz6xCN1wNUcTxM+8cGdEcwfePnLDZiXpWEjNM9Lm9x/P3jttdF2n+aIRHv2HvFv5j/Vg/hfbP0p/Nj1L4dLI99btL0QmmHJuOS+/PFXviK6AKcZC0lIVCFZvDlm4goAzNt/+gDCKGITsymY2Vk5x6HbLoOYZv8Q0cyUsSuLz6eB3paKPWwaH/yxCIjdDhAA4yB8oWEsz+TT/tFIy7YotbJ/FoqfXA9icx1K14etUdP8wHXXRdpXR8v5ctCdQgLlD0RQbyVbMQsNHnhD0pQdTV4V03FTbKvUEa9wbkRd1osdxvJMwuSHIh+3RH5mUCczKJDQwzp/IJNYIRiBarCovEwcPE6rVG4k4BlCfmlHu4D8Sy/sh8xqi1Tf9111VXTUb5HWCvqAL++RQmrg74r2JKT3B/o+D/hEYkDxj2fAxOM7or1/6ZbN0lhfrqMfof2yrVvgu6++Kr8TAQQMkWpQ/L1pliIB5TuvuCLWdcuXnfYW3SlcRXzPcQqU5lVWsO/PdAp7nZPMgxluCnV4pG1JgIGETrf1K5R62rcQRUzNPE1+xB7ee8nF0c+5SzLVFQwNTmuwvxghjFy/OQ7s3hcHeOkLizRb1ZG0Tu8cYF80y7suvhjeSIPXVj4vEomjYYz2115wAXxDpC3RWKamifaYgGl/T/RkfG30j4/l81LS7vPX52+LfH9XpCthIwuTAFkay3Q8VN8/v5ZbDmhaDC1wdwMgq0FhzdD2EHnHFqDOygHbL2UgtXtlJYOCy9Ijz6B+5RysGmkBeyMNEUae4eu3RffbxXGKOvFWXm/MXoEeLki077lk8Py5gOFcaB4rj8+/Mfrvz4/2cT8rHbC8OlDAvCvOuL7z4osG+W2E9hdCcyten39LpP3S1U3lDUEynXhsVj+WAPNujFgIjEXKK3umDCaR3zdBaAE7hQ6UkR7Um1dQ3+LStk5ShcmX+LejykvA4AoxOMNYhdGCXqQ6Abtn6Q3LHbAgPvnA33fl5TCLo+9AhfDvt0Xa03sNPh9Ysuxl6Fg2bav8RNu3RA2TrvI3lUR3mtj45ssugy1q5u/FouNc+Qzu/LyIif82mnKJ1uyfCEraOiBrSZzGb4IxJZH1dQG2KlQjXq7pqvYO/Uph8QTwb5J2aaYnzf69Kc5E+RoGOg/+gJGggM00eft7meAZy9evjur7+jjb10dQJ2CvR4l37bbtMf78QVqfz5crjJX/hl074cpol84izcl0Sr9Xb9sGN+zeJWm/krTPK+/1ke/plYdEM7/fzC9KCZC1V0OeVBIZrEbnIINCbTvbN++GtrQBNhFUZqSi37CfwTuiAz+5YzJTcQnGkgTmY9DjvfSmZzY6uHRF5uPN0aY7G8GcfaKR9q+O6ppnE33ar/QB7vyrI5+TPbq2Pst1+Np43QLyV5pWH59ej/jr0aRLUrr40QO9C88vMhG20L71yVhMQeNUBzOZrxN7/Egvol+2oXMhGVTllcH0rsCbd9XB1DKAA1eWGRx6JKrE6MySdm+hNCPlJkm3ParB9HLQjmjbXRslNkC7cb5SoQWQFF5NLxYl2tNk1us03+ErS/uA38Eerzv/fNgZ+Z60S5bSYSg8BWuUZwuT4OI6j3C9iqjpHfyk8QNW8Zu+8k3S+YZoamzuJpaZDqCtwd4ouAFGvR+BEjMjFqVtSY80A/raHTvh9NpaNjW2OvtT/4LLw9/zYUEfW5i2Va4+ki39mgt2RNrX4U27d2fJt0g6Amyc5jAvrQYqzOlMzgmQbOmviTRnKd0HSay/jClvWllvhuDVu+1kzDdyQ//1lCGpB21upJ6WiHt7GmEzfaqiwgBo91h9T38q5cOoaYJDcoNKp6vg6bkhejwSU18f7U//OuY8UMwDzyIwLpMWRtLo+K+6KJlM6/CGSPsi8J4rzfk6WN7XT9nASqAlAueb3HjrNAaQdesIECZbusWYRBwvrJgcPBhEhwh1qW1oLUoLcPpsbqR3Oa7Zus2+orlMMOIYqKcOogwdfHPgs2ZzREVpid2i6Yrt2+DKaGpcFgcqPixdh69QuChO/FwaeZ7q4MMLpd0IHGXmedNg9Hn368PLIs83T8qSDcnlmIM1ksupLgRdMu2hQ2wsY8CJWnlnFcCfvDCxxXZOg5Mr4/RsNufnSEU5H6slMasPrmyowPb0ttKaHsGnrYehfLz7/a98BWyaTJqS8K9K8OSn8+Si++HXvUZo1/LmnGhXHb8lCJfOM7QvjQ0cC0gfdtx19BgNxIORXg0cm3P5rhBqvQfvcmAjgzCH2rKEVcgumEs2bR6kNwM2fQ5O/XFd+grQfA9hYBer7IRWbUMbApwo8WYIh0u3DT+d+qsEZg7ebEjh4q1bBvc3Srsx/RAA8RyedXlou9nPMbBQ27N5c563KFI6qDqotwiDbetyUgnUpE45A6uiw8iKlvy5ePksP3+wG4BeVezzSygepIqmltC00tql5xNDiQNry+LQeQ7UFXeKAYeGQUu8ZVTruaSFBenH6FgE2IV0NDr9WN4BRm4w/9Hauj5/LZUlPQmqHXFwuN6XGc8cJ5KvpA668jqP0OZANTmCRwC6HqJBXpbVKgPR4ktMZsfO6LIbY0aABpBhhOkuk7JiZTud1BXbWTSqpeq0iJBmXxsN55J2o+mXSQtz0hqgIcylKbQyGbFpwlhGMJBBtU2gzNjmla7y6wdxcIjsqXEfwQawcxojKqR+A4X606QqDyxYaPlXypzX880zVfHgT96NdG5wtRJllmVogkrw5/Ix74gEIddKEyXWQqg2dtBV9OmXCBtI+pKl3UhoDZxxUVqvQkbas4X3VnwrTQrJbzyjl9nSnbqVSC2B1zSEUZpraVO9ZpgRYnrWAvVqOQRqqMtQycIuDTUwhmvd+42QNBfjjGlpHNTPeomsymxJa/ldwgTxfWHs2WUat5UNwNDEOJfgeYwNXrQGS0IDQ2OJCmi54mmw5myNSD/5S3bCDkthvY43Y80WhgYAemZX1uXwRJjtD/ggiSrrytFUJS9Ntdb3g3zsicqfajSo7AgnWjakUV9OOiMo6Y3OjgtOKyiEaknuA7rGsDcd6apcHwZAddoE5jy7LMq9jdx8BNtpuYFawqiBfwFmq6eH8WLzvfTuD+Mnf4zc1wWBAjWG4C/Ubwh9EEB7kMivNkEALLAlU6xfIMfrQ2fOwrygwWKkMcVBsCCE0KDNSxmVN5Fd74V2A+j7Uvw825oBho1ygorXtGObJtN/VL76PuCweB1QlTsgtQHkwQCYCup7MJqMXzBbpKX0SQAYdGauc3BpMAyzPr6+Jt9FzqROdUGg1rs9GZshGHwyn6ZjBGu+lAWoSwHF7KjL2aaIQIXuP3lCAGEc8uAq54HrCmaws1aQ4FoX1X2fDUtIkZbqIS2dg6s8qvOA7lmwwJdrBa65aVs0jKQfpNW9YSRt0M+4zqo7aRPgUPntaWNBpNtM918tBExnVcW0tG+i8eDpM/myeMxC9p7NNNbQdSLXiX2Y2loHVwt+URTM7J9soQCgtkwL8PCxYzZ3lrrQICLYiqP8aUgc5rCTKMF3UXAA1M/qcnF4v2VqoEqLwdanNXtViXb5jkk8Fy9pcTytpFEAb3ouNPhCOy8BH47w3AHID/SDa191a3BtOmX9gX0nnidMlQ8VeACY41AJR6jxY9u7pTynLL7NGryZWDRiP73SVwqoawLnRbiB4xAeTUtYETe0lOW6hFYtVY8HJ0m1JNeSkxvJ8XyYt6LBgEpJHANULdl0owebdlAejv9ii8hGPSUtzEkHVnJL3Rp5SRZhPEsxl9x90xah/SxHDPgPDUHUCEWDB7jr0GGpOO/XUsZpYCS0frfHrO+dC6x77ph3OXSFmkcI5uWU+hJRaeWT6zP40tGjlWBVcZM5MyOoHti6Vs9YOmqcgF3HaSkL4xJSD/JETTcaEjXQwdWlBdRBy4/ELUqLjfLcuQGzT9voOIYVaNvItEGjOAN0V2xwYNHtxGj05Dx8/Hgcd52Bmiw4XLmX0EKbxRrYHYQxTquKgj3MwuEApJbLikS3PP1UW2L6YlABERxjW+USsz1t6PI22l9JNX101H99fOvFG7nm3wD23V2+9s/jgrRjecNIOWP0wkjeisd8H4iPqPjX7Bz+NrWFFgAtkOnnTMBKiw4f3L+/rBFNpq3BWAB5+V+RaPvpYGYo1Hc5Br0xhCaIZcX5YFe+LEtsdfCnjz1e1mv2EgOlzLoCaF/j+De4Hu4ldx+cNACwkhpUgxIgOK2Ol3vQAAo4oIzdw0baMPIcNs7DAqAvQ4dLq4OPF0VsUNEGS4ARgOs2ChbUrUOeDWDGYQkjH3v6aUCqgDYtZgrIjDcWnB6bPgxXS5TBoAO3KhChuurqCv8F1M+cOg23PPkUfOtVV7KWg3pSOaMlMmgm4zDeMFeBeHRgFm8eiAPUX/uvN8Itd98Ljzz9bHmJnAYdQHUCfW5Y0GKVC75OX4GAjgGI6pdGl3yetNLVl1wE3/yWr4L3//V3wJ6dO5qg5mphcKBs1FU/Y9pUxfPGR3oskU4/8sST0YlwHLZu2SQTI7LhKNTtLVodRM65/VT81NOq24l3nLITLOU9Dl54G4mxefPytIfKpIM/2/84vPuyS2HTpLG6KDa4xyBtiASHU0D9S8/pdk2ndzyyF3783/4ePPzMgbL1wuoq1YfBqlbsDB7AwXSa5cKLhWzceCqsMSztUF3n866k2H/4KPzGh2+Gm+66B37m7/4teMdrXmUpZyk6B+iDENrxnkYvqz74+OMZK2kfFiD8yC6yAAN7uXo6lM0DNk0Kxm3H6omEtAUwsi8aRUqXtdgrqvKn5t0EbjvwLHzi2WfhGy+9rPoudal8GhYzh/2ixdNimSRpCPgp7dNHjsBP/s5/gMfi6HnTls3QTTrgr9eFKUEDur3Y4cbDQMYtkR4b58uHgmVU1ygS0KwBR+Ixz8LF2ZS9Bw/Bz/z7P4Y/+MkPwIXnn2coCiOdOYTlu62ZA9BgJto+9tRTcMfBg9CtTq0NjTwwrGt56y9jqmljcaf5YTYNkiZBNhXQVLIAuSxAy4tts0rJ2wuThJ5EUP/SPXfDDbt25w9PTd6qsAANldaQ0uLvbIlrVaf08zt/eVtssCOwGsE8XZlGQE/iDVkCR9nwQWyxcnPcLvurGgyUFS9kKwoAMMsApO/30nINa2uwL0rrf/Whm+Gn/vb7hnVWPAdoyqMBDUGZE14ia1v+udOn4dfv/SL0Xfr6e5K1esDi/O1J89e9cJwLD6qQLQJMVZqk8HSebPAyJEAFcJbUNKuTpTP9TiKAJtMJPB5nDX/v4YfgR1/zWjOy1p0GWtKAJQHdN+mGnXLA2Q994V6YblqBlc2bIh0rmR7eT4VHzWIfkqQmWQ3a1Pr/Q/DbaeQ4GvnJFhRpu7wcn+od22wWB+y5k5+FW+970OQnPGAB4u61QmgkYsmsaWP6/t9H98IXo2t38+bV3DbscgoaxIRP3oexVtjZlp4W0CaH2BlhUEGZfqSK9iSlda8pNkiXiVxJ77hGSfDvHnwQrty2Hb7tqqsNogNn7mgzQlqBGHUicNJApU/k7z9yDFY2rWa7eZpWbsoSgF5L5IKdk1zAremDNsMcKXNDeInSChFOl5PlXPmFtF5cR1I7DeLTNlhpQ6J4/vjhozUrJYb1Ng/6RGNA32e6/edP3u34l3Eg+Cv33AMrqyswjeOrpM2hKwLH+J8DezawmhoIRuhUPljMmlFbq8FEMoeqzvI0JZQtEpAkXsZzUh1RVCdCp2m9iPUz8M/uvANu2L0brti2XTJHpdKQKiGMUi1rOr+Xzq4XiPaJHapLpkZaS3lazA1WU9zri7M+iATQqkyX5XnDHaf1vgNAm4e1OkPI6mLQp9WFjKBd6hwqoHl5NqzGdH5c9u7uijadRFCtr88smMGaFyw4vAbVNDNtehZVDgXmJ54/AT/56U+RwEuAnkRaJlmjyN7lAOKA6D0tMAR0K24KDZ7lc2r0uksnmvqwlObBGm+VkBmWiY5Xqz2cOXMWvufmm+DfvvNdcP35F9AmkZYo6fTEiWDfQm2/3O2AzDSD9Ppim+XdmEKdgSrbKBd7LZUle3SEYkblvLyNpKSSLns0YCsNbjytL9NlgQElNQOnjHOwbBQPdQHxkjDfibwJNOZB40vWRQlQwljZNVp2/3XWAS/X9cSJk/C9N90EZ2K61diRVnhsk9sIaG9G/R50FTS8G5h8Fui0g6Y5hc7c1IMk0lu5PtTVOHPvpzbraEQik6E/nRbTI1XgWLTb/v7Hb4UHjx6pPVcfjpONCaAB4b5Ckm9Z4zcDOm+yQwxjpuV9s9PCuVi2HS4b8WBNg/W8z3sFduZ+jW/FdYP82mnxHNI6OmIdNK25LnIfch3T/bQ7a+nENW1S8XkgNumsKefaQeJY7atGD475DH7pXJTggcOH4e/d9JG8WedqBHI6knTuJp3gSBcZNB3KzNCf/8EgroYpqFGwF0b1RR0U/SNTkYhkhvB+00XChdz5yzYDsBIonwDPnj0N33fLzfBPb/gq+JtXX2PVujNDRFqHBoCVamtpZt2oxT/Oe/uhbFzJEkBLAlMO+g7TkK7YkKI6rWHkBtKCq5BPjzpLvbBmbT9eLVb+kOTgvbtzW3WlA4ArqmVe6JccXbOZKqA7v3HfPvi5z34Wjsfx1OYo2FbjuCZJ5zJQ74rggerVYJdw0fb1qyiRcoxB3wkVhqfMS6cxABrXtQdVYHPv7aUiJbfiwpvStG5B5um1s/Czd3wWnj55Er7r5dfDedGW0iZIAMs548NWNKBOr86RmUEHsIQOxcyozvsuL2ySpTiZF1rFNqXPWMAN3NtI2kacviQuS4fmMb0AHRU/gDs6zR1QR2cV7sHMJsigo3s6sJobYi/H4+jZM/DnceLkf7/jzuzx2kxATho7gVkPTGWvcuqsUi7jF2AgtT1PNG3NhWYM0whY+VyjP5SlDMoItPai6oHA7P7tphORGskaOLO2Dr9y793wx48+Aj/+hhvgXXmd48qcAahYuIVKQ3A0GymtGhDZrMh7pPO0Kt3vOqG9NCC9P0CACE1mgJK6MB40gWGDaeflrdIiEYNQec03i2sVqRN38tyMUicu9L6OVDc2LTy4USdDa1boLD7zzDPwC5+7Ex46djSCeKVI5vg7mRavBsrYpjzBZoN0Iqz1GJC3iJfQeJdDp8fGRVCMqB8nltlEFv/lHY+ySHXeeWVSV2fn7eGeOnUK/sFtH4M3X3gRfHeU1u+4LC0yPjHdrSWB5VqBWDc0qywg27MyivbHBm1ysJkSiO7CgaDz9CDrGvdAXaOLgzlpfZqxMJJ3BXX1bBThwa634oPONjPUmThklU6SmkVgUHQEHQfz+1paV+NjTz4Bf/rww3BrnAVcjUJsS5TKCcjpSJIZp8WrUex3EiAde6CoDEQZ2LIlUDRkQ8DAkK0pND/B4i/BRb2PqMNSKGWJaGbeOJ8M7OzIR7OBZ1p+ay322LsOH4Q7Pvks7Nq0Cb7lqmuixL4Krt+xE7bweyCKaiEFhxI7aNpp8ANYJDX7oYsqq1+r16lV8lMj2spR+lbdze+8+EVpF8VBlYrlHBWJhSPsnWHPQpXQJR3PFmY3a+Jbj9U+cNXrnYT2gQVJAvEjcYLkxsf2ws37H4f90S2XgLs1zgGsxl82MVaS63SiwUzg7IY7+labWZXnGTF2j8LiHde70rih2TDV7uGepCdoGHCFoR1lR5t2pj3Bk786VnatW4Nj62vwOw98CX73/i/Ba3buhn90w1vgDbsvqiNrxUwPbFR08UieX/EKaNcRoW+L6QWroDoGCkAss+iLHlAdRvcwGArPSh89q0yKuWkBqixqgUp5BWyfIdrJHu0oF9GgCNVTRav29B2aF314QoNp4l8Wavprnk8+9QT89r33wL0HD8GZfj0DN5sWUwZx8WQkTxeqyZMwUDGoOiWohgzDSoYhL8zkBJ2bdzncyGIYjLejlCIOfCWpAar3gPPN7xbQQjRp0iNJ6TWoWy3vXtkEb9+zB959xVVw+bbzYOvU7ketgc2VNUKVkYEgHpcisrC6nGQQRINazZScB6qBUjD15iv28zINoOJ1lNYYAezNABbYtmrtvJstQhJX92jdgUHbp2xeUHygjh+g0q5DaERw3F+79DJ444UXw31Ru378ySfh9gPPwoEzp2ETSeTslovnub3JfVqkcjUltMYx5xCknaB5rhpd45TOp55BzaCYY0ZlWlwEqC48oJdlggKNPE47amUvCMCrdu2CvxHt57dGBq120/rJTbDMNLadizNMR6RBBw9AFHjp+WK/seYJkl0gaVwYr9A3KKZVeDv5RtLOS18lGLi6IzC1JZq0ZrruCuDZwigdPNW9LLnVXGc5VPzojqabPGmArdE2fsvFe+Ctl+yBY2tn4IuHDsGH9u+HLx47UvaLx/IFk3QiZRoZ/57vwFxRb+uKhaBxOORgc1CIMGSp//5uUJBIarAtpVpCppbjvws3b4YfuO56+Gu7L8r3+c0q8I/6iwaILT1l4oBGSQPnuwGG0Kt8mxnwCAohoKU1UqfR/dkIEh8C2nuhLRPqPTRpAXU60g3iuAikPVhSS2yFeadJwWreZN50ltRgAayBDfqaeMUvqp2/ugm+bs+l8DUR3HceOgD/5oEH4bkIcp223XnRMQGbKVuxHmqcxvih7RMoX4KjtAC9DxCKqYE4LE5G3iqa7dfEsbQo33dffS18xxVX5+18jUTW57XWVkUH27HBVaA0ElKjkfM+qA7lXtDGvN1mLSuHLpjy0XGnIdeqUBkJvt04Lc5J65WgScPI5tC18iquVQSe8QVaSCYR0NkJCmJN0/8cwChvXo+QvSkyEI0Rb4ua9g07d8EfRz/0H+57nFZUqsANHQg2mnWngpDOMVRXKig8tviSzo0fuiWZwT3APbxcl0LQi3+XSa5U/HNe9Fz85KtfBW+Jg76UfBbA+D39wSG430ERWrqWjRXJBYRgjewuI0kkMNh69I1M2xgdioA5WG4+Pf+uLdvWm7UcKhMABCXycr1ko1qVToPSXgbAI4JEYYmAVuLLuiwwCJtjO3/ftdfB1du3wa8/9CAcm/W84WWdETb2L/+xqo5BDXpQDvP5JyYHKoNbZ8T3cCQbrBlAVYzCk/IhQBxa74l+yZ97zevg2q3bq2sogJHQ5hdqJtzJW0HUpLRbJ35osaeNnletzVIJQEkr1zkVHca8Gr0HTg8uEN1G1CxoLq4o6t+guF7Kqnv1odDGg+L8YlJP2qthjgXNE1ASWl3Ly0hhKGR6dfH2iy6BK7Zug5+OHpEDZ8/mWWQ2c7Rg5NP0spVwQN8DaJsc4kWisQ+03HZa2rLNxSYGQEOKq/cJlE0UmNXx2Uuib/J/ffUb4OqtWwXM/QiY5V3cMGS0x1MLQ0H21sU8wma3ox4to3JXFcb1ogvZzRbAlaFB6wE8L8zrjc30uDBv3dSIxUmHZD4hMUrkS1fbMGutbC90xQ5HrPxXgsT4oYPjf2WjlMPP8cJDoO6njUx//g1vhH941+fhUHTN5o29lamErYqhh7Adh4jJYdxc5bmpj5BfY0JY6YagdpNlVQcsjOoL88npeX5k3v/5ujfl7SqCA7Ps5qWYKcwYntbrUM+Hn2WhSCdWbahsONMiHM8vOoogx0Wy8q9EQP4rAGBxE2rHEMFdUvNsXK5zN7/niI8elHRW9yQdHR1Ld/plMi7dvAV+IYL6A5//HDyfHOFsCmqLAEBwlalDmnFW5UubaPeyEr4pzH2XgxM2l8BqPUeABQJzGgD+WJzW3hPB3Dsga6kMYNWbzm8ecaH1y7NRWkJDxbKWLEkqB6xAyA6+vkqA+XyBNuJH9eNI/EbyCPayaht1M3tVwlDFSGU64g00KyhtElyxaCV15k8Q2ZGD2NRKg/KA8cotW+GHr3sZ/MJDD2QTlN/HblW9OFpxXvVH443JYfdVrg/o32GoAxEkRCbpnDYRev+VV8G74qh3RvyVjx6DVW0M5EWgboGMn5FBEBKQlaRm+rVG4YmXOmaszn+v4kYDLhGvicZzzMPFockbQcxBJYmLAGqMfZBMDuyabjvdETS4fZPoTkpkiCFhNn2C2jbfFN16Xzp+DP746afyhBroBQO5h5hCQMZvdWIsGHb4ybHpUjzGsXviECKi6POmWRkEfssll8rdwYaNAYy7bOA6WzJ47PCAkO3o8oEsyzOa9JFrkPNiawcY2GV/BUMFNO+HbU3A6glRTwhgqKPzx6lKW0q2MJwTGITgzBBqQ7HulPmhxeh/d821cMtzB+Bw3xfes7YIunbBncHgeuzeYFs3YRS0TArbOwYVTPZzP4vM6OEfvex62B0d7t7UGAAbykyWH1mbQzEPYHhuAzUUSSFtS/M1H2VNiI4kujs6d+jnx9K37p1zWlycdkA/A6Q8i4Zm7uz10zTWUF4ocOgd7+e1j1l2IKhz/RuP7ZMV+J+vfxX0eQfZWRlrkVoWM4qaUVNWh3fYanH5nXrjXJ4USVWnseug0Kk9ILdJktDRvnjz+RfAW3fstBUMbXNDshgisxmkh/ruyT/80g37rrCtU8oFWXjKLBHN5gtONh+oPj3kay2LPAtBO283nFY3Zn15B3X7gDSRekYzQ8kxPRWKlS8esADtpgijF8N0rOwkwvHzzXHi5TXbt8M9J54v73uI6w0sr5qmQgAzsYI4tKFReTcqb9BkI7OFRtgr1RbKyjzrsxm8N/ofJzQL6D9Pp6SGgWBya7d/UCUX26kt1QXELK2okYMbrVRgFy8I22KoO3cj4AbMkRczLbbSq9E+irnU0W8gs4C4xun5fWQ2O8AKFD43g/URAHuQ61WuUnHyNT/3XSjaOEpR+PZLL4e77v9iERSqg5VHEDS6ZfYwODMDcWCC1IkVIcy95Ic1XoM5AMggsDCgz+bGZdF2/oY4EBQprA5tZoxJZ31vDNj6XkuSAgNUg5pEmbz8wxKM/LPS4AttaNUxXtKgy7Fl6rZiQAfVGUVrsqKiNmKbuZoxEzCZqnWcA6g5AU0WtinlW/4LfcEB1inzBOqv3r0bLlxZhYNRAOYPQeT9GX7jztY7SAGqrEZbdbBsUGq5UkvgTqYGSee377oQtqaPIIP+LB2Mm24emD0zlr2WjpDaU+xFqIMOusZO2dHs1tMLRstX41jvdapzmOdHDnTn89Jj49rRhnw+llbFo7qHavwQlLEs0hnB2MEBqubTkhX8NcC4hg1Drcn5azxcsLIC3xy9HrM05upDNbnE1aILC0uLkMUv+EOVxmikcwDRDInYtHliNPT/mz17bCXCEMQtZkAjDnWcEqymyugliGtoMTPUr5zSm2qctndpPTGtc4ChzD7XtO5ap0V3L5/yC0n0joShHVUm5rrUtX7eVJONfZQMYSg8WjS2Qu8S6OWY33HRRfBvHtsLOOlLpx18V1d/gzIFw5zy7KZBriba3PDACvKbattnQG+NRL32vAvs5Ik2ORxj5klnVRTRB1Vz+oQaBB3NGKRGS+9Dd0oJyeCKPkmCMnUcnA0HG7B9XfHzQ9hY1rggr/rKXnnpCrlRsIKgY3OEHhETjNfm8HlqQamiF5LiyAoj0lyPn14dsXJB1ObHI3Y6Ze4FJbwG5bNpOBKmJoE/x0Ym6CrN3o1I1FVxNihIPAzUmSbOMyHYrEcFjA4BGpJf1KlSxYoZuQzj1cAqybsRCb1IDPm0sGR6nXaZMlxDy/MdGmbkAS91Ho378kxXPUHs6XBFDMqcd3+cTPMrOLCkwuuiR+y2o4dpJ1l6E3IseHzqXwplYqUlnRq1rMCriM5xaZnWKH6v2LRlkFayCENmhJFffW56Png6hs9l6sh2lKqoypeGxkGvL14P+hpPNXTpAG06TJpavPyMpZVztGXk5yhikNbRUYuiiSKPA9brA8mgvt6RASSozgADb9QYqNHdGhM62toRgUeRaUq8P3woC0R24dVdrtCqaHFV4qBcvh68D+0TDRpGIbMuHl4k9OVbNksluIB+RDpr4C8bWkJs8LwaELHZUdIRc9jNhUoasBpOL3KEKqnH+AKN61Zj4pxrXPD8vLRyHqrJkZtYOX+T1yC9KoryDVa5F7ind50BO7fJAMwAoxLcn7faJwV245mBJ52nwWGfPWRBFv0Z9GgYCscxwSFbUjCDEGqeY8xmKc1M6DMxPVyc3qijAoNmDljmhEa+LWAjjEvqUQZifTFJv/OLyn6uJgY/UtaHkI/vEIcEtK49sQDj4mtR5TaSFlx6+hAY5X4BhJga7JqmRkWZfOqaoIQl4lokzrsXGkcK50+nWRim9+YnQZfB4MGBK9CU5ezp5tt23r2XgRPql9wazGn5liyho4djhQcZyPdcviPXY20ZYAhkfz54hiUzYm04ig+6p2p9T/H5o1pwlQdoistip4Zx0Zry7lRaiVwi30Vp+TrU2V3UqMlx/N5KAQfS8g252syjFhe57VqdGRptRTxsC5eaxC+DwaRO0xp7PUvoOEwPk6pNQGEPsfqdEcwYQYfhV9+ukUKw0XI7aNWhP3+d36vDkBeD66YEp5tjQK51ACijfiA7ml1UoZohQNKqq2BnCnLDIwgUhm6JWgM0XgJHNbq0tefAIh1l0/K9IR0y1ymDXPvqKPtyzFOsobImAwGjBnGohGgrpkFpO4L6mrkGbW6ox4omD7Q8c5AbgiHU7WMLEY0bKgF2j5VQGhCDpdB/5lIWlOmFKHaMn+2HKzxocI+B2l+3znXP9irMlJdmvzITOkA9oWDcc7TgjEiNrvCFyK+DDt0qWHsVYKPkF5LW10yn82AucXnhHiGYOhaPAVDlxy8pM3o6GnSxJ4iYyLf1uzatxWf8uadUSg42Xg8INajX88tsALw9CHIOiA47wfGMsBhq2hRGJlawimNNpDpnYiszAhw4c8YkEGKCajMVWsxyVLTvIaiJhMqknBetDT1w2ynJVDJQkhTppKP3GNEDiIjttN5EW1EESxB1pJKKJXkD2NyKUmZXy0NVvhaX4r7p1HVQC3CoorraYbIZxhMrPDBcFEYb4dyCl7VHzq4De8sEzgFk3ZQCZWw8PcRoCnZQOC8IKIPKS1aLzoBK65uNVUKDG7AthwZFamwFlxiH9Jm2V9PdbC+iXo6KXXUpiQyqUibO5FDpLSEAyki2BIrbTzcTQlMkqLSoOWI6VWjGiVyiupTlFwIYkwP7KsgJ1IHfhR5r9OB+/fmisKDNdLGHzpxWu1yR10xWuwrVtSht28hEheZOsnriodanfjdYrtU9Sv+lo0dMVnodZzHtGrgQ6a3vIQw6pCETxqQ3DwRbElmBAt15Dp27bnFtDAXYiBnrdSNpTc92PdSnTzT2TmLnx6r6KnzH+h2UpMX6bjQzUh1sGnAeVZiBUVgGqBqwpDElmvujA3U69j7/PN1U5QGBG5mkOsAFw6Kg+Ffip/OaDsTBbXnt6CfN2MGjJ07YfCihMRPVvSwV6X6v2xOHNAVdOLTpzUlY+nTki+bGk7fu6Gl97Xs9joEWYOAC8gTMedTcHEsrrYbDDu4DWwyo0BBoYRleST4zF0zd9Bp3TSqDJUeK16BDm2asKuZAe53CHYcO5gUdDVhHtLjGoKePabSbBhGAsfGQDhrg+suHE7N1uOfIEXj1BTtECxtCAYxTnEEN/p76Ne6eMKTDS+rgpHIYvHlGQ/tOZcrJ6btCSUu3tAsLtaoOtaEZ52bGT2hScWj7hC5Hp9Vli6Zr8AD1M4VAZegkBvblDbwAMksK4qeHJhINPz24AgxNFVS0oQK/l3ooJObzew4fhsNnz8KmrZuBNWt5rBpgGi8BxgMX01x9NP/wZwdYkwfu/RDcrCpmoKRnbnrqCXgNAZrHKkiNItovDCnBFsGacfNqY55RElmtcWdEBADZ01Dqgwi23+iPZw0LJI3vqeKCd5qESGqmnZt3GD47SKsBBLXs/NupXsCjcn43lDulAnrvf0EJiwDW5Ajgx2IVzKF2QvMsBzXs+C/7HiNw86KanJXqlNJulqGhD4M4lX2lqV7YIU2NDiY9q3mkrZH/095H4ejaWT0e81ga/Dqa7L0W4+YF5eEQWxoa3+Pxd/z6+73WN4PdyDH2zaD/1m/ed4MbyXtuWqx1oLoGXy64Dx8kfn4QLUhAbbE/KNCKpFYdUoSbki0n19fhpiefzPtKopiHXusODYzABSr6NHC6eRXRBXCGrDL11g98JFto/+mTcOszT1WhCCPA5huuUF7rwRhG0Eg7Qi9wBVlKo3rfOfub6yc/SGDgOJQ0uLGjewFxG8nTHVy3vGKS1EXFq06Kgii0nX6kzduMBSudhwJSNLKAVwnS3K2IhA8/sR/2nnietmmuryWIpA6s+RXQCUDBla1De0sKHYEAowYl1M+XMO9PWDYj/92HH4L3XnZlZig6LonPODgGhhEilJrT9yWJZm4AA+QUiV1tSLZ/6/d7WnzoOo/3ngF/5oSXKq0OIhz0tWJa8YagVHXoARqRumCBGwKMaktUJWozE8DKFv54KE1x/+lje8uGUoQdmfhqcMJYCsr90vrca6nN6wcdklWPTCWhmB2JyNsPHoBPH3g2rxfM9rNIaEUTzFFVnhCDaWyrQjZ/RGNojsoBYNUE1MkHwTlaOhSfscUwn5ZPfdpRhqq0rV+X1uSlz/vWbWI+zRnJjc4C2vCzYqZkyd8aNuqi95fMbFM0yJyWO2575hm47dmnodu8iSQ0vaNNhRQPFZg6t+RaK4jJYfg1gvD6fmopzXx7lmzo1OOmUwiTKfzE7Z+EE2trw3EZDPHVbDgP7jGafLwTCbwCaVZVtF5FGIC8cZAnwHzLR6bAeNpuGN+65vRj9xalbeVtxGCNs68AKPOLhJBrYBh0QNUuGGyctB3/hNq+HbTJOnDqJPzs7Z/JGOmmK1kAajpaUleEk2nnNiQkK1NhegI9UMBKSRRgM4PSlrfRcbIyhSdOn4JfufcusZs6B2JU+TAjhIeoDo4Plr/eQtGVr7OBZD8SEbxoIxoQdEbtobI/669dtEXHDY+WPe7Tdy9aWvYu1WsHXKyTKKCAzfaoB4n8jhyadYM4Hr9ilQUTdaTrP3r0Edh76gR0ar9v+QwuI0pnVvFl5R2aejJm01/jtsMBeOuLSkGii+7S343l4vKHmph73GQ2hX5lFX4v2tJvu/ASeM/lVxq1xhNXKBnTj1J180JL60s+Ipn1OtGd6kUMZLAMFB2KhgeguFPobaQdBGKw7f0ATZni00JFy2ASpzZcHXgQHUGLTRDzA5VNwO7VIDbrkNdGcKibTQsoVHKR6sCSmf1I+vjQY4/Br3/x3gjm1bKpUPZwdCJsRKhKmSisq6apIxrrgBLAezkaDVSXX2UGQ2OmiRidXXeTDOrUA0/F6J/49Cfg8RPHW9pwKLFR52aZGRo3jJRGVQctIsTe6ZR/uhPpXJct6KoYaal4oz+7kYq8GGlV2XPpoLQTdHXRYpK0ledHp+IavOSIlsWH/ly1H4N5oorg86dPPg8/dfunIyYCdKvTMiCcVI9T0BkCmEkfng6pn9LBaOhcHUYuGDRob6OKZ/EfiUxmx2Ql2kfxOBxm8Hdu/At4MlZIqx7+1W0EXB+0jJMylQQPY3Tq4XSngQE0cKV7WHdq4nhxebmGx5EDGgduIP2yaXFeeqRBlJEWYNLXDtM4Wk3ueBoabOZ26kCKGxxT+n306BH4rg9/CA716xkXk2Q7J9OUJbRkCCQwa+sHVRY06Bs0v7s2NrLEMZPSuZ9w6RQSsdiiidBJlNCT1Uh8VC9PnTkD33PTX8ADRw4bKe3bwHTAxZ1R6OXReaGHpVpn3/vN0SVeJJh0xG5wjs5nbQ1F1YFR27rdaFpYKm3XTAsL6bA0DydcbBsBS22aWGHzQgRGsKaHP/ghxpluvwmBin8fPHwI3v+RG+GJU6cyFiarqxkbWUJrDcT0UaMHwhpAo0NhbXsfOhgBSTNoCY1Qu49Bo5bSkfhNqzDdvAqPxQr93QjqG/ftNSqJe3h+NNjyvStJ3Ejuvr7WYBYA53g1KGJpTGqbvR9GbWu1bI5W3Fj6jabFJdP6vMlkEoaWZwIOTZb6+ijV3fFRL//FfGfvRnDto9stS2k6WBN//Mn98L0f/gvYf+Y0TDYXLGTNnSSz0Aa1XRAHps4A7GBp8KEbfbCRUQUMqQP5pY8tOyWBaDfRrGJSr9y0CZ6brcP/8LFb4Ne+8Hk4G8/FAwJOUsOQeSKFg13ERjO6dLBOJFzQnc1LbLpn1sDDZQ5YMl1JixtIu3y+7WPgmlMdeCipARaqPxeUAJUsuO20kEpt+y9jG//AzTfCkX4WBdommCYMrK5kTGAyNzplP3tBKQV6c8QR3cCo9XIggneBYagP1BdPyug7u8LVtkeBE2WTFYtbhhFHjF6P5sc/v+sO+I8P3g8/+7avha+77AroqGdWVUOg1nWDOZpDh86ty6HB5cAMUD69yq3gRs7NkSnfaxHCBBpCUf1dIm2rks20dN2P01FeUIK6vFlHz6e6zpQrb0HAxq/xXiggJwR8dN9j8HOf+VR+BWKyGoG8aSUem/J4aiKejfoWpOSM5aW4YsLWOQ5U9ytGHJCVN8h89R0aFZFzLDM5qKa+q1slqNnxOmLNg5KQPB6g7K0C7Mejn/oHPvpheMeey+F7rn813HDRHtgeGSBVRD26tcQNANJqhdzhnBRj0KBqZE5jnsd2nq3zVhos3JlLqUeKxDeeW3qTG2jYA1TvvHmMykd3Wq0Ng9WGuh8PqkTnZ9bX4RNPPA6/f/+X4PY4A7geTc4E4mxukmROE27JA8ZChds56GxVG/G7JxnHlD40qleJK2G6kEdoMxGzQ14thboXAYRqKrD663jbsSlotdrHnjo7uwY3P/0k3BR79cvPuwDefeXV8O6rXgYv27ELNiW1BNbkgAXnOSgpHJRak0EQn2dSOjvBYEAwYMNyGkLS15dsFvVAk3fAdiO00vYqQlqcwMvCINU12WhZCyW7OQBPJmVtZmy6eqp/TTXo5MTZs7Dv2BH4yGOPwI3xeOLkiTj7F8dOEbwrEcRddgqsFqkcvRri0UD13jNrfmTgwiivREjC/GA3DZITBPvmfbkZ2Mxwb3MHrqn+4lg5+vOCgdk/XRo6/eu7AvY+MmEWzx+Obr2H4szib3/xbrjhwovh+197A3zd5VfDhgMDtkPTgXiWMDhJXc0SVVVss83HLsIqAixuAZ1WnczLW+LJYrB9oHzRXn4Lv+sH4gG8vc0dQX+VrUNo0Hd3lML/4vbb4AsHnoX1DsskSQTylFy1xWU7zWDOQJ6wZGZzIYCxjzletw2otmkxZKSNllpOV2cU5BoHta9fW2C1a/QX0HmwqOhR7qjLz9sE33jJ5fDeK6+BV+68EFYi+oMzM4x6GqW1SmLjV9amBzOqQ/uc/CyHQhyLDHMeWFLM40bSpj9iR6ajr5n02ZAmEzTxJdS6Iw68HABK0IfBcCCH1128B371ve+D+w8diJ6MffDnUcMenK1VIOf3NJyfGSwPeE2QodStLbwRjcjB7LEy/AwBbLycC3KJokBblWC9nVxCZdM/Mt0C8FfX2CO9btrD11xyKXzbZVfCe/ZcASsR7bNQN5rx1VwUcppOgVkDubMvJaEGt3CW69nBUDb5EUZonNM1wsj91j0Yzwtxflpt6HLaPCDsgPe8yRvk9sSLvD8gVp88DYbFdlb28wDkQVEY/yST8IaLL4W3xPb7wJveDB9/5in4w8cfgTuPxrmGSXm/pJPBH4A2NcoMZeE5GlSXOkg6biO91MPgdQAbP1w5qRVK9zbnvKwWybXKb/TdOkjanjiVlOE1286Dn3j5q+DtaR/DvgBY9jNUDB0DdvAHdyQjkbvqjyXah+48MqMKp3NupYrooIgiO4LUDdTdSldJg4oDnq817xeWlmhGereG+V2NDRnz8DYPdrJo6OUII7+ozBJjosRjJZqT74neqvdefgV8/MAz8MsP3RfnHU4W5QCVd0QARTZ+0X16pXgglPjnJEm5njZvclwYkYvcTSEM5IecZYEXKpMTE/JK6D384wjkb4/ejQumq4PdZf1Os5l/oTYoV00kCJEpzB645kDZyQTgfG1n30QikEEq/VMGEIqXUtdQCcAKtIIdFzfCRsKZZtsG0iJotMueNyqS6ShNljpzqLzocCAg+BwaUhpIe7KXk/dM4SPt9Z02rH/Lrt3wh08+Dr+59xE4lRJNwCjCIZi5HIc3w3AcxjfCYLHGEQib3o6NpQ3Mjp6uQxWA9rAj2lX/5JWvgW+95LKs/WYklc0Os6HSMSotGnGmsomU5kQJVIYydjWDU2C7us6lU77BcUP9emnirwchuLS+Zv63kRYdkynfMGhN3TtJCqIaFFKy4A+wgqRXxfAneEyxFNMVUG+N5sj7r7oO9mzaAv9blNbHs9dlonSLpxABYBykLBs8R1ph2krQAngrs0DgZmmuP60qpwhld6weLp6swK+//k3w6u3nZxNDwByUuaHALYAOlo4x2iSQe66+OwwCYuOX5tyQGQq2dTqcwxVY4t5G0uPwXFwX6l4mrZEWgpIlLKor+upileX5Ym3UOrbmZ3QI6sSbHTOlHWbBPvM3on39qvPPgx+9+/PwRHTzsWjX4GTpjKrTDYVUW6gN6IM6tWAOL4sQYKBua9paQ/SFJWamrSo2bYbfueGtAzDro2+B2REcWoeW6MGWbSkFhxtqhczNAGbRlnlYNJxZNpxD2mX6COLwRnNixj9cz/0rBgOtDwp8dF/zno8kmVvteu2W7fCrr78BLkoLmye1TFPLlhrukFWGLzo8jXw05z4HvJxjsyDX0quSUNb73Rzjf/N1b4IrN2+pYO7L0fcwvmWyVn3QALWTBmJzEyDlKwZsdEiSyhKvegO6f8OY8TsvVdp5sRr/ui9WBw4qa0vlxgNk02YDPMt173ivN1RddyBed8e1W7fBb0dPyBagtaB94wEqqylsrP+DqjDwywz+0IlEPyB4VW2lYFCMKVtUhNkMfj7azFdu3poBvM5gdpI5gxvqN7cayPPUod9mOf121FA4QLEmHWGABu6aGMwnYKDOFx0vVdrR9GDrxSc8bezrzQffTrzywqS5lTUdJr6haVP7roXazuuUJv1etmkr/PT1r8wCToN6gF0vPNER3sKnGmS2306ZI5HtbIdlWrlVtkhOYP5AHBi8e/fFUjEBtTv0xucMYgE4wGAHWi+5tdS4dss2KHYYGrFleRHUOJElFplMga6VoMCRAxZc4waePae8pV+GKoFd29kxMXVaSp037HG8Np2l0YFyeyAd6lltcmTJDOVYU3HfEv3W358+x5uVcVXGClHklbwZ3Noq1Yo1wuLXrRoZFdwSBUEbBMVESlskvyqqme+Mg4Je+ZhbPV8kQG+vPWKD+pUSdT5E0jt27C43mvyocAiidSiepjnrErX+2QYrFlzDBp49p7xFyhH9pUe6p+jJUCU9R31TFDYiSPQBVUiYNoDKd/DtF6yEZxD3wQqx74mAvnrTpgzoIJMMWDMUTJ1baAPaZ4g1PkiN1G8oPSrQILCLhP5InMK+cLqpAlnZzTPFjL53IFUMazKTy1MdQXeOH7z0Srgu2ut17epGPQjwQYMXB4leYNhoo5xLIypa1Xsdhluo40udE2+u2bwZvvviy9rjGA9saJsecg8aZkivzA5lelwQvV3/8NqXw2w2K4PEXm0wDgCGD9KrYNgsI6BfOChEWCClGOBU2z5K59dt2w7v2nWRVJQrpE0LPb3N6o7pbOBZ953BoRti12QVfvaKl0cpsBlkyznJQzMrEB898AMMnbLncsBLnD6AbnypR4BBXYJOE5l01epm+PHLrxWBMwsLvEtt7EBotQmDnto15w9qvBSPr9mxC752x84ipUN1OdbC69ziMkFjdKojszkRQrNSOgbliTrNyv7mZDt/Z5w4SSKhNdhoTW97Bo2FIKWWIPtGh+oDTRL7TVvPh//76lfBfzj8LNx04hjsWz9b3u7Ls2MBZEbFuQXqYBEWE8IsWCaElzAtAAE5WAQy4Gn/m0k8rooA/przt8P7d10KO+Lkx3oYd5kOMDZGQgDxG3DQryuke6mMVKX8Bkc8X8UJfOtFe+AThw/n5eOwo0y4QxIOB+MBqPc8G6QZr/zc54Khbiwl9yRmlJIU6R2NZOj3a+tw9XQFfv+Nb4Wt3VTUTFY7oLwZWiipopbqlGgHRfqrCfP5fGfvySCqYRsvwo+wgXnOeVTz1CUcVsV3xrFyWhdhIWGNfILVYPyrJSW3j0jSoDxNUCXuouB5qj+p4+8Lk+Rc6cpMXvo906/D++74FDwXZuo7w5RJZ8c22mMl5gcOC6fQ3tZtNDiZGhTz8vbIM3jHzj2wXfX+BGRjZsBiMGsKsEWCAk2vHkg/HVeqr9O1MgseKrCNlFV5oqNBbrtxCzSJs7QMgmOvATnXqdETmnkpAseEQQvQRlsqU3AWbHuMgVnzReKUlEZVJn9bkLUoS+oE8FCmx7/9kj3wm0/ui2OuXjZ6KjPPAIOGyVEIi4Te+PvQwVLcYnQVA8U266O58b7o2WBm8K+RyP1iMAdXDEtkRY6pL4M6v/mbpA5JZ1ZzvDa2dHpfgKOhiXdsly8NqYGH86VqcHUz5PT1HsC8hGCcA2G8OBEi+lcG51B/Nfh9xwOY3y6jpgfWNpAxFYH6XdHL8hv79kKYTgkYtOmm+WKBrkE34niY/4I/jkVaSBbDvoft0R56RRwQ9r2VBMbPOXi6hnmN0orLL3sqUAeSCtnzgUpCsHRmvsASQQM2OECrziQrbbFBD3Pq1ei4SBfVC1HycvJETK1BXvPAHCyvjaTW5wADIeTzHGsDqQO0EwTVBjKvEEr7vHr7edGWn8Dx7MIjW7qR2+CrtDmFjgO6qU6D+Q2kQ9ldl97ZSB/RejDLyDfUAYNm9Fw1PacOjCEtLVhjZQYqUwOUyTFWPak6g1gBTfZHYWIoE2PChXHpls/RpjP14/yDep46CpepAb3MABpcegYT09gSMqZdXB4Lg2okLXD0hlB6MmYSmfem83bAx44fIQnd1Rfecl4NaQIwt/GW+wSLM/FiRzhTAH11nOI2zApgZv9aDGMA9rA4GFCH2nNR1T+Fju7rdanB9fJWXKtAb37kaIMspWoV6JlWkbzBdQamP9g00ik4bbD1NnnoOLD5mijX0Xr1nO+AXGed91weUcCRa22embKo8Ku3xDmDo4cgKCeDBTAuTwRoQOveYIxUzlSLEBCq2NzI/s0tWw2TmPktuwwABlJkmdACtcRRRjMGOsWZX9daZsDM0b5RqQDhSHDEBKspWCoNaO+H4OOj19KbeaeaQOc94JeOYI0UhvwN7tx3njAn26WDaiCNIoMLrFJ618pqeVUiqK2RWw1l7A4vnapEGF1ON5DI45f5pXrefqSMEqgvXl09J6ZslHEe1PnHixWwDNUiTpsdxmsBMBRPrV/uREoG1AxV52U54B7XhLEnRkwxnT6UTmBkSytoHjQawJM/qFIYz/6cQO2e58O/sZeO5BHLApEJocDv2QudWN8S1PSa5or3pjhCxXyzxc7uBPJyrKrF/7Q0mFvbcwweh9yJmdZBIwZlZzfuWZ0+LKw18NZb1Q1wpKTUoDyv6MCaXKIRejVJ0UKj7jDObhupxvBeWKqvzA1Olw9IDa5T9aqtpjxRQgdrU+ZvS4OKFmpgdLENHdwTvSabDupd2HhUKhLmM/lcwqCXslSkc98pQ+MZnJPvWJwHRl+LFm1g0rPkZomu81BSHdTzHNcaW7SUSIvoMHLOEWO832ibeDDjgnTmmhHu7o7lsSi0AY3zSQmtk/j/bD9rpB420jyh84IDc3TOWKIFiEWNEFS+Bgyq4wiY6ab3agwGfT5/cB1jhLCxDjdicQyfUXTASF6Lgi5Paz7vixYJje2815K5YXo4M9S3nrseabDFEpoNdG1jtDgXw4H03Rice+861zAA7ghKrb1VG0LuKZu49y0W6jNmyarQaDDNrgatetCk+ajBF8bqBjC0+VWn4nGBLr8fo2MD8YvShpEbWpjla1eZo2trdqKLnsqbHcHGQ3sZA+/t0Ht1NVqLXxx//OTz0AxBnhyZcXzhodnwPl4B0WNiEHDeTRATysgSVRizbzApADAwL4LuFOpmcOmXeXndegpgYOJwXPNZeHFDZrcXKmhZe/DMaStZ+I5vUNSN5+6rVza6QYlS1EhmY8THNPcdP9rOQUmkpY6wgbTqWDRRwA0pC3QjyAtLT508XgYbxPBOV1uZMNLowXaUfM+lL8sKQ/2MyjEGNV0ufw8uDVIGCh97jx2SF7DkRSx+bn6zgarOSxsUb5nuFPaePAGAOK6FdMVb9+W6ZLrxL1YG+aLs9bH35EkzA6zbFlzcgkzPOXhADDp+UGCAAoDT62vwU7feCCfXzgy3yZhTzkCdAhg/awZyB+Ir77GCmz9h8p2Ega3rwLQbIEPpdGcj7b92+62wlhaQx9oRDajn0B/ghYPZ8ELFGbrdM3x95+GDwMtL4AtoeH6y8xH+nK+1NMJB4gLq07MZ3HX4kH3DDU2yHIQBYdigoxKW1TLMl8IAI+q1IcH4uP/wAbj38LPw2LGjAzBji3bXQoYOBOvShBYT7XOeZgQHCFQNRuf8WuYjRw7C3QefhYcjMMxWH1jrr/mnJ7n80W/wCHMOUOVKBR1f7z16GI6tr6sNmywP2sbDfNB3vicbZvq8JK1ycgt6u7wA40effdqCYQTUfC70BYB5HVR7DFoEekmsJzs8OBnY6Z3pvBfIU/vyB50373vEbJFhwI2OfvrtB4UrglogpjgvffVvUHXQr7wybXonsdueeAzOhBnc/PhDeaOeCdo3DXGMPGyTvGzABfn5cvnddW0q/dmTT+S94dHZIsVERpMPjuXr7rU/wZL80c6CNbzcslsTrff8n5/cF3vd2YpzsKAGaDBzpCcNJK0CA0uZQXq0z0rHAQUKtRfPegTDBx9/OK9r/JEnH8/7gzDQtQoXm9rTzWVjI16VG3D00VJ1tI0tDYm1ofSmPGlG7EQ0kW6NnTEtKP6XTz2e66K3zht83ADDjq95tdEwT8Nwh2Sa0V2fipL5o88+WRbEz4viE44oB6HTjyLVKTZoqoPCUVGO4FBd+w6DGQuY01cHaW+NTx08INKtpeI1R7TP1khhPtVpggWtJtnYs3T4vqhpYgmdAHHo7Jm8nvEzZ07BbU/vL4DohuobdB1QsUafa3taHbpqZnbP5cv30cWL1ugK3QnQ9xx6FvadeD7TfuDMGfjoE3ulM2pQG23uCYPaDmGePeeO0MjDXxvtAlbz3fLMk/BYHBAWCd3ROtKVIShMrlxo2tjGBOBBoQY16tZxD+pfUzhmwhKg03Zuv/3og1Fa9Haf584x2BXjpzmFIegOxSgNfKQ8AG0dfZnc0FNq+D945AHaT3ElRk7gDx59ANIaHQO6u6G0KwXU8oNli6mLodPfV52iU3XWHUoDuWweG+BPEu0rtNNYPP7r44/k+1NVP94vUH8W5VsQG829TPDmpD40r/QncumYRWz80eN7C16mE6h7lcMAoCBqDsCqe0c0nXeLKWZydbzKHMBK6UjgZw8fhk8ceNbaoyo76bnpYTWAMJILQQZY5gA7AOMgj9JJLrdTQAb1fRv9fjRK589GKVf2AynA+Pyh5+DmaHrkNJ0FtedfRx0MGuuj67FBa5UjbwJ4a85rEk37Sjw+9fST8JkDz5TOmGmfwO3x+rZYp6kCvv7WUuMBHQIzL5VdE9y9sCCNViWylU2ngKzOb33mqYiRg2WV/7RVCdvRhhEOc9Bo7EYYWTlp/AEDcAXsBOZJ2rh+WnYJ/cUv3Q1HkirvhpIGPXMBmpLLd0gtfX16VCdMYl6DEWGw/Vhi7snZGvzS3Z+j7cZou960oGC8+fN33Zk/4vS2aBMcmpOuIoM06K7pOW0nC5hBgRpq2Qmsa5G2n7/r9kxrJ7SXHVp/8Qt3wrGzpwX8GtiirbpGh/L8bPEch+0DFgbVvFC8zr9Q6DgUafs/vvSFrA0TXspq/938Rm0V7KJ0M7haUHBq0qJQIqXGbAfljesjqO8/cQx+66H7TQ9t2XVjzNJBC785nXNIIsLAK8DH7z98P+w9cTyrvdQJ80HnT0Vb+l/fd4+R5gLmDoZmEMAArEYC6mvFtk5dexOpc+VqcP72/V+CJ6LPP29sSkJkQttR74t26Z/sfUjS+kN3Ri/0/CBca00+b74Oy3UAMB4Wz7e0PevvP/IQ7Dt1qmw0lPZi6SZ1E07B05BAnNfoKtTldEe7HxLDVeaoDHSyfdjLUTeuX4V/F23pv4heD89QM2iBBjhgSAo6svw9n0fnmUkdKn1C/2f7HoV/dd+9tO902egmdcQJb0UWj9+4/4vRJNkvdqsxQbBhRvE5qVyhFRtp6DrofEKVnppfbGLw70eeeBx+6767YbJphWznKe3YOy3aJpog/9e9d8EHH3ukLBvAtndXXXrieXD0MG+D8x0HjXZ0fAcwGiXzvquSeaqOD0Us/OsoSDK/eb/vSfFwaKnG66Ogxp2AvB2Ylo6XVA30LqrYwwDGrgl8nW3CCnIGNw8MJxMyPSLBSSX+7BfugPuPHxEpzcAYmCKKud0yAFdpWGoaNY1qMIWlQdPx8LEj8M8+91k4neIJEJM8mJ3IICXFpy+R/6fPfBIeOHJ4KOXAaprW3uVeeosUVucizdSzvizmVwLzQ0ePwM/dcXve4zGbSStTorsjTVNAjvH3FyLfvxTt1Ck9K/ynQ0tQGTAC2MEjtoFrTCN18GCUtcNKVzvjo8ePwk9/7jMZE4nG6YRox44GhYwnICHJjKo49HjTeGWCO/CR0kVrJtJrOK3qRbr1qvuu7vF9pO/h73/qY/DUqeeNlOPKD4DtQO1tuGYcOHBpqaSkUwLzf3/bR+F4nA6ZrGySBU462ksvg2JSpF3aATVtpfBDH/8oPBif0w017WwjzgOzsSvBSmNtVmg7mQ8GQzqePPk8/Eik/XC0n7u8sWWL9kmW0NN4HItt+IGYfv/zxwywWl4Q7QnhJs3XwQK8C/Y+P5eWJBC6QbUvnT8daX//rTfDmSTwWCtOaTBoGlrkp+BPRFhLOjfi8Jq777ZmqTeSsMTJJzLKuDIfNvI6ZbQc2PraOqyfPQuzeKydOg07I/H/z9e/G1523gV1ERq1ao9fxXKMFEt9Za6W7hpszOj90V7+7ls+BIfixEnatndKG0VOaC89pDLSAoJ9JGx97Wykfy3vTb5ndTP8+298D1y6bbssnCOL6GClmd/h0DSHEdqZnZn+INURAE2hStEnjh+Dv3fLTXAg0lRoX420k4RTtCfez/pZoZtov2LTFvj1r3sXXHXe+WZpW1lkJkBzNasgRDqWV9w1B9zaPEudKAmDf/DJKNDiZFvexD7SzzvNdnkTe16irQ5OMsidLc2Se8BMB+rJjh/+4f8F5gXUDzHruDx1DaxeiSiAahvFcDLODP3Row/BVdu2wSsuuADqrBAMTQgYSl4ttb1fU2zkzrrlsrqNx3+JNvMPfvwWeD7Fpf2naQ/qTjZT76qGEW3TSWHHYqf8k0cehiu2b4NX7txR6Waed65DUaWEXufZYfWuTZiJphlrPT6yfx/8yMf/Eg5HbZGBvKlIuMmAdiKEAA4EiuRp+qM4lnlZBPT1519glKqx7xVfEYbnk86acVrbshZc0b8x/qZo7//EZ2+DgyxEEqBXqqmU7WfXuIXvAjBiXrUUKtBUI8wF9NiDgzgEh2eTRNs6DP61KEFujJWcxd/E3G3J3tNMhSG4NXM7BQ593emBlDIzjsXG/K0Hvgi/GAdJZ7ATIBdATCoglC9LQN0RE2mvw1NR69y0b1/+oPOa886D80Zo9+aQNkUMQBqAnlJ8+j0ZJdov3fU5+OV774aTKT7SvbKpRXsnTKu0E7CJiLUofv/8sUdz21x7/vmwPdEOli5PoxEg6toM7qE9eH0+8v1f3veFyPfPw6mYMG9kT6ZQcZFW2mUDUGIceheYs6PngTlHDUyOFEbeAA+ik/oq+vvyxXf169BC1oEWcEzmx/paND3Ws/nBZsjVm7fAT7z+q+Cdey6PDOkG664xGU1KcAh+bYOeiRLhtmefjgOjO2FvtN+K5yKZGKt5AiK7ubqJME73fl7ZMn9aH9X3bD3RT+bTWqrHGlweaf+ZN78Fvv7Sy/KAzK8IZNQ22DpgY9aQ9yzqch49fPqZZ+CffvqTcSr+tKO9uOk6nioeoT0RMiPaZ5n2tczzRPsroqT+4de8Hr7h0itz6WZrEGi76wy9CmsT/qXzNAP4mQNPwy/f8zl44Pnj0RNDAmS1emTy/t9KIxpTg8EdQIHcSWeDg3mA1jf79rIvZhlT/rDR2NIAvKQBr4Bd1rxbz4ydra1npiZw9BEcIca9bfdF8J3XvBzefdmVsGU6ta84wpCxqOpiJEk8PxE7zs3RNfSf47Tqrc8+lScdpnkWjcAgdudEADEaAtAq831enDuDOY0Loh3bn020z+CrL74Y3nfttfBNV12Vpd5gSVq0tOuLTL+yoY9Ge/fWOPv3+w8+CHcefC6q47Qh/JRUdOmIxW/bKdpHVKTQXkGd6M/AjnXoYn1eu2MnfMe1L4f3XH41bIt80qtc8a8Onu9a2xyPPLk9Avl3H7ov0n6gDFizRF6VafmJTHNP8kNDMAOYUT8BGnXB8r1hI9B9vPaeeyrt/EAIlVXaCB8MDivajJSmDhFohfZAA60C7JlIugRqZvY1ccD1jXuugG+/5jp4ZWR2KrQlJTSDS90C3HP4UDZl/mTvI/DM6VNlKpt8s8zQjtR0deRzvii4EJ4BrUUSaBFKBsdaAkcBxSw2YqpLH+m/aus2eOell8L7XnYdvCl2UNmPRPjW6JBQAH3Xc8/Bjfsehz999FF4+vQpmiyZin9cBq5Tol1UNEiDq2ar3CJQ8+ZNBdhr0jHT0sepPa7del7eb/19174MXnXBTuClxlvaUWMuCbG7Dz0Ht0Zf/QejAHni9IncCQvPiwDp2MRIbsWueGOA5ityfmn/9XTSVds5l58L6gSnAuKgpAEUya35mqHKgJYIboMgzW1upLWg7ar9UJpfJHZGcr6OrAQkSd0rEySBOAFhRkdibmJ4ktipEc6PDfrmCy+Ga7afBxdG9X5+sh+JgLWYz/FoXx6MnpO9cTbyzgiIw2tnyjsBNEvJEw1ZKrB7iyRbp2xOgkRFXf6rUVjq03OnTEeiN0vsdalHn4AdwZHqd0Es780XXQTXRFt195bNcEGincpKtuzRqJ0OnY60R8/F5yPtB8+cNTOs2Q+eNEukP7vjplUqi5mhGzV3HKwLs7DJpMxD9twk/s4GtJf6JNp3Rtpft+vC7InavXlzHCes5vXnUogp8uD4udjpHovmxF1RixyJnRrFB86TJVM5Ty5QZD851lFlBm1nB4DJdg7GxKjnDDcWQlxngKGSzYCGVhizo/meA3WGtTJDyAdW05NbLzO2nxWJvb4uUruAYpalSU8bsvRkk4vIMHqvU7OTXQX0ZCqDJlZx7O+UKVbdc1HLzGDrzp0V2Kb2wE6dcVb2CyHaWRsF3gXJ85JUbWrUTDcN7jKQJ9OqSQztRL+g2dPebjutZRI9zPvAZghpzcT7zHfZnaov30XrsZIMygotQhdpDn6Hp+NOyG0y6Spw2dRA6/bRAG4OBFth5N507gMNR7CVZ6yuS/dJdMoH4lyBQFvzpsqnDYUmHc009qUh+8QIZuiMVCRtbxF6JWmG6gZI4qK8utoViUHqLcejArLoTPVrEUKVq4BG6qBZgmA5WFp2swn00zhJQ2BIC75nLUQ7pga/vpfy+Ajtk05evUUBwRzaofFrQgC2eVghs/RLwOr7JB2TCRP5nrXKtPB9VjsrjPGdaJeX8h3txa9M8ZjukX0iLjkE4xoCBWapTwPMWgCN1ruEja0+ajLkxkKoi9xpUEvXjrf7AuJU2QQOJID0XWZiVqWRKazaZTMZ9qAAGCM0k9LV/bxRqWQUkNMLUwbAlXFo6qUrF4oECUGtA106dx7ERTDk1wQS7dRJQ+pM3AFZktPoVvY/UdKg0K20hjmQ7HwE80qlp320UQvRTdonpNozj0t5YdIX2jXfaYJM+J6Obg7tJIUHmlAdAzCjm53WUrpVJTkfB3MK87ek8NcmKS/oSAAQBhCoZRVwECAH0AwuwM62VPo0ui9xxUwJ4vrLwHKjKv0yS/W9FjUIZI8NmCXPcSbYZpjaQAXVaMvQnssk2vtUZho4VrNKz6AuTTv7wVu0E78r7Ypo075YtaVI6hbtSUqHzHfueL3srxdqHTiPIu6HtJP/3ggWJzw8sOvzmnjbHrgAtPPCdID4RZlpTwjSICr34I7AX6RRYQOafJH91KoiWVqTfZx/J50CBVTGUnrJ34AUrY2pQbsIzD54aZCL6/NC7kHVveTYZ6lXBiwh84D3Aay0g6IfLO2IDiScxA1ccQHtWvAgOl5pkms65HwTnV2QjhkE1OD4DoYW4bumXUtZHSevH+pnoKaFeo4D3jfqOicsb3IMCiJQA3diRQ1J7jwY6INdEQgnWU2D8BZFMiCbLZSH2WAueJsDrOo1IKZ8jIRGWwd5RpUpZCqpyvqWO1w2RZj4yQjtQeUFA1ygq8eARlyedqx2jOOXTT+gXQ1YBdx0rbvfwFyaR7t0QAAZ+Ml9UJ1X5aE6wQsFcwpTjbVmUBWVtHwyCupQJFpKlE0KxewQSJqTVOPGR8pUhFooDGBJgR1UicP54RDQAIBO5QV9XzO2PmJPVQ+sp1ReNjPSNfnaNY8g1A1FSL1L5waiGX2h2KAdXN0U0M11bYpyqfilaWfNwlqS8hCNw3wXcwWE/wGHgsTSrujmarBEVmlqvQCqr/nFBXMKZuNNqxhrvj5/c88wiWznTHxhEtLgShqXMFyaVzFZSYKgGbsMHU6CMYil8QXElZm2fjpXMqW4oQgkgW1+BmgyL6h+tSOivDq3iOZKru2QfM31CqoDapkRTI4cF1Q+NTGbbTJ2z0IGlKSu6ZaiGSzfmc+8KLmhnUAr5ikDGXGw4ZW0G8LAyGydt/hsTI5Bp9C/oma5cCApCwLKoOINgVoqAJJkhjpBg1WKo86EH2MbW2qAhglYiTRSgJlHlqq6Jyn0IxIbGBcQNANMvVnDBKKd0RKU1gJdd8VHLY1atNdzpElBHKWdfwLUzgdEOypeMFSlGZE1iGpXqhwaLWlpr+RZMGvaUfO9EV/4AnYFWBU/aBPEAZDBXfPvtJVoNKAd+fsGQGJCYG5nSwHNLKKuYHBbSxUQ8iruOOyGo3S5E7TMMw/XnmB/VTkCwlDjURAkibI2MqzO/3WdYJB3m3aFTAI5eoDDCO0WiyBodPtTiMQOoaLJPSwQDUMyxWxxJGnazMcgDhtSjsqjVNcxhdvNlbcURmN66+XwROtrf48yKPdUkRrY8uYUWN3AmBB7SW9xQYl0e4wCQV0oqSESQz/fArDPSC/sAa7uwRPD0ockMxfm9iscFINQeRkqregb3nQAtHVo0WzOcQjaUhFgyVnpINoNwGEIalO+ohNgfudjfqqOizAHS63rFib9L92bbjhTbLSWAU8thIWCrHOlgco2HD2jwQ1BD+Ra4qIWjIY2dUuBxdI9TKvlgDEQdJ1QgxqgaigCJPuv2YaeR7uyK5envUkwKAMGzFggKBAx7SLRg8qXaCeAByZg0Mw4LLFFO0e0OiBWSBth2IBUE2emTBymyxL6XAMDV65BEVh7jICaEykholV6uV0NKA2yprRoE1V/Rhg693F/Txfd6pRMuxoUV6nlM2gV0Cj9y017TqsEi87pXPhO+bQ6oBE+nP9GwLxEOHdAc8HB1boBbNR+WZYaGvgi/eYxcsT+QEePv4HtpMsyzXhwwNPuAMIheDJeGO3nQrce0M2lXZMHG6AdWvSPgNikASvUBnmeO5hTeGGA1gRsANg5WtMtEgSy0h/uOei7MsK4SoTlgTAmIXS80zZMrpSQcNGhnVkz9L8ItGs6WjT6eJ++QTt7c2paR7sZM+j7uDHacUFHWJTWPRZgfpiWdzKU/5Ey1e9D13rj0FdJUjo4aT2UDjZvW+nyE9QFC4eQB5RolEGllU3DlqhRNOtn1L3RJW7RyyVUQABomloZpx1REXj8pX0HjmbK19RaiAaemBnQ7Mod3ENFM+eNdWyQ2cltizUH7o+opLmlGW2nMGmpDYxbF4c0W9IVzTgfdy6PeWmnzDh9Ax0T6qyXTQtgO4GvVKD0qK8BqQJg03K5YGuueA4amrVMUPR48FJa3Umw0iVxaqTcphkkt1J2nbVUpKoGwDbNFG/GMTDkfYnoVL1KJ9kQzahyD5UHmndgylQ059lcrM/pduBidVr0g/OC9ADu+RbNiJYOVQ+NBXR8ZozKfcp78HJSMxNNqAuDwrWKtuLINYh6CtXzXnqbwlpVtfc4b1XVQXLfKXW95tLMZ452uRPCKF0wXqsB7fYe/yyg2WQ3ntaoJcUaQ3urvceq0alpbj3YxAU0y8ts87NvhWYayvuF29Cjpere2mroxjPB3RiIrbFnwOqnpbiyGGBNurmMFg2A42lg7Bl4cWmXPM+R9nk81+rPP78M7Yjzr1+E8P8B0szv+tLrxRwAAAAASUVORK5CYII=")'}}),jse=({theme:e="light",...t})=>g.jsxs("svg",{...t,width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("rect",{width:"44",height:"44",fill:e==="light"?"var(--ck-brand-trust-02)":"var(--ck-brand-trust-02b)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.0246 11.8662C33.4096 11.8662 33.774 12.0243 34.0421 12.2925C34.3102 12.5675 34.4615 12.9387 34.4546 13.3168C34.3859 17.4143 34.2277 20.5493 33.9321 23.0312C33.6433 25.5131 33.2102 27.3556 32.5571 28.8475C32.1171 29.8443 31.574 30.6693 30.9346 31.3706C30.0752 32.2987 29.0921 32.9725 28.0196 33.6119C27.561 33.8861 27.0843 34.1568 26.5842 34.4408C25.5172 35.0468 24.3441 35.713 23.0146 36.6025C22.5333 36.9256 21.9077 36.9256 21.4265 36.6025C20.0766 35.7026 18.8879 35.0281 17.8112 34.4173C17.5718 34.2815 17.3379 34.1488 17.109 34.0175C15.8509 33.2887 14.7165 32.5943 13.7265 31.5906C13.0665 30.9306 12.4959 30.1262 12.0421 29.1706C11.4234 27.8918 11.004 26.345 10.6946 24.3443C10.2821 21.67 10.0759 18.1706 10.0002 13.3168C9.99336 12.9387 10.1377 12.5675 10.4059 12.2925C10.674 12.0243 11.0452 11.8662 11.4302 11.8662H12.0215C13.8433 11.8731 17.8652 11.6943 21.344 8.98559C21.8596 8.58683 22.5815 8.58683 23.0971 8.98559C26.5759 11.6943 30.5977 11.8731 32.4265 11.8662H33.0246ZM29.8277 27.9331C30.2746 27.0118 30.6459 25.74 30.9277 23.9112C31.2646 21.725 31.4709 18.755 31.5671 14.7125C29.4221 14.6506 25.7371 14.2381 22.224 11.8731C18.7109 14.2312 15.0259 14.6437 12.8877 14.7125C12.9633 18.0537 13.1146 20.6525 13.3552 22.6943C13.6302 25.0181 14.0221 26.5925 14.5102 27.6993C14.8333 28.435 15.1909 28.9643 15.6171 29.4318C16.1877 30.0575 16.9096 30.5731 17.8927 31.1643C18.3005 31.409 18.7502 31.6635 19.2396 31.9406C20.1116 32.4341 21.1099 32.9991 22.224 33.7081C23.3175 33.0107 24.3014 32.4515 25.1633 31.9616C25.4231 31.8139 25.6717 31.6725 25.909 31.5356C27.119 30.8412 28.0127 30.2637 28.6796 29.59C29.1265 29.1293 29.4909 28.6275 29.8277 27.9331Z",fill:e==="light"?"var(--ck-brand-trust-01)":"var(--ck-brand-trust-01b)"})]}),kDe=({...e})=>g.jsxs("svg",{...e,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("rect",{width:"32",height:"32",fill:"white"}),g.jsx("path",{d:"M18.3242 7.63647H13.6516C13.4955 7.63647 13.3704 7.76611 13.367 7.92726C13.2726 12.4568 10.9768 16.7559 7.02532 19.8009C6.89986 19.8976 6.87128 20.0792 6.963 20.21L9.69685 24.112C9.78986 24.2448 9.97107 24.2747 10.0986 24.1772C12.5694 22.2856 14.5567 20.0038 15.9879 17.4746C17.4191 20.0038 19.4065 22.2856 21.8773 24.1772C22.0047 24.2747 22.186 24.2448 22.2791 24.112L25.013 20.21C25.1045 20.0792 25.0759 19.8976 24.9506 19.8009C20.999 16.7559 18.7033 12.4568 18.609 7.92726C18.6056 7.76611 18.4803 7.63647 18.3242 7.63647Z",fill:"var(--ck-brand-argent)"})]}),Fse=({...e})=>g.jsx("svg",{...e,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:`linear-gradient( + 180deg, + var(--ck-brand-imtoken-01) 0%, + var(--ck-brand-imtoken-02) 100% + )`},children:g.jsx("path",{d:"M26.8543 9.96509C27.5498 19.3857 21.4942 23.8384 16.0655 24.3132C11.0184 24.7546 6.26765 21.6534 5.85087 16.8885C5.50707 12.952 7.94004 11.2761 9.8516 11.109C11.8177 10.9367 13.4698 12.2925 13.6132 13.9342C13.7512 15.5125 12.7664 16.2308 12.0815 16.2906C11.5398 16.3381 10.8584 16.0093 10.7968 15.3032C10.7441 14.6965 10.9744 14.6138 10.9182 13.9693C10.8179 12.8219 9.81731 12.6882 9.26951 12.7357C8.60654 12.7937 7.40368 13.5675 7.5725 15.4949C7.7422 17.439 9.60628 18.9751 12.0498 18.7614C14.6868 18.531 16.5227 16.4779 16.6608 13.5983C16.6595 13.4458 16.6916 13.2948 16.7548 13.156L16.7557 13.1525C16.7841 13.0922 16.8174 13.0342 16.8551 12.9793C16.9113 12.8949 16.9835 12.8016 17.0767 12.6997C17.0775 12.697 17.0775 12.697 17.0793 12.697C17.147 12.6205 17.2288 12.5379 17.3211 12.4491C18.473 11.3623 22.6214 8.79916 26.5448 9.61074C26.6277 9.62851 26.7026 9.67262 26.7584 9.73649C26.8142 9.80035 26.8478 9.88054 26.8543 9.96509",fill:"white"})}),TDe=({...e})=>g.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("rect",{width:"32",height:"32",fill:"white"}),g.jsx("path",{d:"M24.9055 15.8824V8.30065C24.9055 7.63399 24.3583 7.08497 23.6938 7.08497H16.1238C16.0456 7.08497 15.9805 7.05882 15.9153 7.00654L15.0033 6.0915C14.9511 6.03922 14.873 6 14.7948 6H7.21173C6.54723 6 6 6.53595 6 7.21569V14.7974C6 14.8758 6.02606 14.9412 6.07818 15.0065L6.99023 15.9216C7.04235 15.9739 7.08143 16.0523 7.08143 16.1307V23.7124C7.08143 24.3791 7.62866 24.9281 8.29316 24.9281H15.8762C15.9544 24.9281 16.0195 24.9542 16.0847 25.0065L16.9967 25.9216C17.0489 25.9739 17.127 26 17.2052 26H24.7883C25.4528 26 26 25.4641 26 24.7843V17.2026C26 17.1242 25.9739 17.0588 25.9218 16.9935L25.0098 16.0784C24.9446 16.0261 24.9055 15.9608 24.9055 15.8824ZM19.759 19.9346H12.241C12.1498 19.9346 12.0717 19.8562 12.0717 19.7647V12.2353C12.0717 12.1438 12.1498 12.0654 12.241 12.0654H19.759C19.8502 12.0654 19.9283 12.1438 19.9283 12.2353V19.7647C19.9414 19.8562 19.8632 19.9346 19.759 19.9346Z",fill:"#00D2BE"})]}),Use=({round:e=!1,...t})=>g.jsx("svg",{...t,width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{backgroundSize:"100% 100%",backgroundImage:`url("${e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF84XzU1NCkiPgo8bWFzayBpZD0ibWFzazBfOF81NTQiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIj4KPGNpcmNsZSBjeD0iNjAiIGN5PSI2MCIgcj0iNjAiIGZpbGw9IiNEOUQ5RDkiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzhfNTU0KSI+CjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfOF81NTQpIi8+CjwvZz4KPHBhdGggZD0iTTI2LjY2NjcgNDEuNjY2N0gzMS42NjY3QzU3LjQ0IDQxLjY2NjcgNzguMzMzMyA2Mi41NiA3OC4zMzMzIDg4LjMzMzNWOTMuMzMzM0g4OC4zMzMzQzkxLjA5NDggOTMuMzMzMyA5My4zMzMzIDkxLjA5NDcgOTMuMzMzMyA4OC4zMzMzQzkzLjMzMzMgNTQuMjc1OCA2NS43MjQyIDI2LjY2NjcgMzEuNjY2NyAyNi42NjY3QzI4LjkwNTIgMjYuNjY2NyAyNi42NjY3IDI4LjkwNTIgMjYuNjY2NyAzMS42NjY3VjQxLjY2NjdaIiBmaWxsPSJ1cmwoI3BhaW50MV9yYWRpYWxfOF81NTQpIi8+CjxwYXRoIGQ9Ik04MCA4OC4zMzMzSDkzLjMzMzNDOTMuMzMzMyA5MS4wOTQ4IDkxLjA5NDcgOTMuMzMzMyA4OC4zMzMzIDkzLjMzMzNIODBWODguMzMzM1oiIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl84XzU1NCkiLz4KPHBhdGggZD0iTTMxLjY2NjcgMjYuNjY2N0wzMS42NjY3IDQwSDI2LjY2NjdMMjYuNjY2NyAzMS42NjY3QzI2LjY2NjcgMjguOTA1MiAyOC45MDUyIDI2LjY2NjcgMzEuNjY2NyAyNi42NjY3WiIgZmlsbD0idXJsKCNwYWludDNfbGluZWFyXzhfNTU0KSIvPgo8cGF0aCBkPSJNMjYuNjY2NiA0MEgzMS42NjY2QzU4LjM2MDQgNDAgODAgNjEuNjM5NiA4MCA4OC4zMzMzVjkzLjMzMzNINjVWODguMzMzM0M2NSA2OS45MjM4IDUwLjA3NjEgNTUgMzEuNjY2NiA1NUgyNi42NjY2VjQwWiIgZmlsbD0idXJsKCNwYWludDRfcmFkaWFsXzhfNTU0KSIvPgo8cGF0aCBkPSJNNjYuNjY2NiA4OC4zMzMzSDgwVjkzLjMzMzNINjYuNjY2NlY4OC4zMzMzWiIgZmlsbD0idXJsKCNwYWludDVfbGluZWFyXzhfNTU0KSIvPgo8cGF0aCBkPSJNMjYuNjY2NiA1My4zMzMzTDI2LjY2NjYgNDBMMzEuNjY2NiA0MEwzMS42NjY2IDUzLjMzMzNIMjYuNjY2NloiIGZpbGw9InVybCgjcGFpbnQ2X2xpbmVhcl84XzU1NCkiLz4KPHBhdGggZD0iTTI2LjY2NjYgNjEuNjY2N0MyNi42NjY2IDY0LjQyODEgMjguOTA1MiA2Ni42NjY3IDMxLjY2NjYgNjYuNjY2N0M0My42MzI4IDY2LjY2NjcgNTMuMzMzMyA3Ni4zNjcyIDUzLjMzMzMgODguMzMzM0M1My4zMzMzIDkxLjA5NDcgNTUuNTcxOSA5My4zMzMzIDU4LjMzMzMgOTMuMzMzM0g2Ni42NjY2Vjg4LjMzMzNDNjYuNjY2NiA2OS4wMDM0IDUwLjk5NjYgNTMuMzMzMyAzMS42NjY2IDUzLjMzMzNIMjYuNjY2NlY2MS42NjY3WiIgZmlsbD0idXJsKCNwYWludDdfcmFkaWFsXzhfNTU0KSIvPgo8cGF0aCBkPSJNNTMuMzMzMyA4OC4zMzMzSDY2LjY2NjZWOTMuMzMzM0g1OC4zMzMzQzU1LjU3MTkgOTMuMzMzMyA1My4zMzMzIDkxLjA5NDggNTMuMzMzMyA4OC4zMzMzWiIgZmlsbD0idXJsKCNwYWludDhfcmFkaWFsXzhfNTU0KSIvPgo8cGF0aCBkPSJNMzEuNjY2NiA2Ni42NjY3QzI4LjkwNTIgNjYuNjY2NyAyNi42NjY2IDY0LjQyODEgMjYuNjY2NiA2MS42NjY3TDI2LjY2NjYgNTMuMzMzM0wzMS42NjY2IDUzLjMzMzNMMzEuNjY2NiA2Ni42NjY3WiIgZmlsbD0idXJsKCNwYWludDlfcmFkaWFsXzhfNTU0KSIvPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfOF81NTQiIHgxPSI2MCIgeTE9IjAiIHgyPSI2MCIgeTI9IjEyMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAwMUU1OSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50MV9yYWRpYWxfOF81NTQiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzEuNjY2NyA4OC4zMzMzKSByb3RhdGUoLTkwKSBzY2FsZSg2MS42NjY3KSI+CjxzdG9wIG9mZnNldD0iMC43NzAyNzciIHN0b3AtY29sb3I9IiNGRjQwMDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQyX2xpbmVhcl84XzU1NCIgeDE9Ijc5LjE2NjYiIHkxPSI5MC44MzMzIiB4Mj0iOTMuMzMzMyIgeTI9IjkwLjgzMzMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NzU0QzkiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDNfbGluZWFyXzhfNTU0IiB4MT0iMjkuMTY2NyIgeTE9IjI2LjY2NjciIHgyPSIyOS4xNjY3IiB5Mj0iNDAuODMzMyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50NF9yYWRpYWxfOF81NTQiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzEuNjY2NiA4OC4zMzMzKSByb3RhdGUoLTkwKSBzY2FsZSg0OC4zMzMzKSI+CjxzdG9wIG9mZnNldD0iMC43MjM5MjkiIHN0b3AtY29sb3I9IiNGRkY3MDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQ1X2xpbmVhcl84XzU1NCIgeDE9IjY2LjY2NjYiIHkxPSI5MC44MzMzIiB4Mj0iODAiIHkyPSI5MC44MzMzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkY3MDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQ2X2xpbmVhcl84XzU1NCIgeDE9IjI5LjE2NjYiIHkxPSI1My4zMzMzIiB4Mj0iMjkuMTY2NiIgeTI9IjQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkY3MDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ3X3JhZGlhbF84XzU1NCIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgzMS42NjY2IDg4LjMzMzMpIHJvdGF0ZSgtOTApIHNjYWxlKDM1KSI+CjxzdG9wIG9mZnNldD0iMC41OTUxMyIgc3RvcC1jb2xvcj0iIzAwQUFGRiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz4KPC9yYWRpYWxHcmFkaWVudD4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDhfcmFkaWFsXzhfNTU0IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUyLjUgOTAuODMzMykgc2NhbGUoMTQuMTY2NyAzNy43Nzc4KSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwMEFBRkYiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ5X3JhZGlhbF84XzU1NCIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyOS4xNjY2IDY3LjUpIHJvdGF0ZSgtOTApIHNjYWxlKDE0LjE2NjcgMjY4LjY0MikiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzhfNTU0Ij4KPHJlY3Qgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfNjJfMzI5KSIvPgo8cGF0aCBkPSJNMjAgMzhIMjZDNTYuOTI3OSAzOCA4MiA2My4wNzIxIDgyIDk0VjEwMEg5NEM5Ny4zMTM3IDEwMCAxMDAgOTcuMzEzNyAxMDAgOTRDMTAwIDUzLjEzMDkgNjYuODY5MSAyMCAyNiAyMEMyMi42ODYzIDIwIDIwIDIyLjY4NjMgMjAgMjZWMzhaIiBmaWxsPSJ1cmwoI3BhaW50MV9yYWRpYWxfNjJfMzI5KSIvPgo8cGF0aCBkPSJNODQgOTRIMTAwQzEwMCA5Ny4zMTM3IDk3LjMxMzcgMTAwIDk0IDEwMEg4NFY5NFoiIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik0yNiAyMEwyNiAzNkgyMEwyMCAyNkMyMCAyMi42ODYzIDIyLjY4NjMgMjAgMjYgMjBaIiBmaWxsPSJ1cmwoI3BhaW50M19saW5lYXJfNjJfMzI5KSIvPgo8cGF0aCBkPSJNMjAgMzZIMjZDNTguMDMyNSAzNiA4NCA2MS45Njc1IDg0IDk0VjEwMEg2NlY5NEM2NiA3MS45MDg2IDQ4LjA5MTQgNTQgMjYgNTRIMjBWMzZaIiBmaWxsPSJ1cmwoI3BhaW50NF9yYWRpYWxfNjJfMzI5KSIvPgo8cGF0aCBkPSJNNjggOTRIODRWMTAwSDY4Vjk0WiIgZmlsbD0idXJsKCNwYWludDVfbGluZWFyXzYyXzMyOSkiLz4KPHBhdGggZD0iTTIwIDUyTDIwIDM2TDI2IDM2TDI2IDUySDIwWiIgZmlsbD0idXJsKCNwYWludDZfbGluZWFyXzYyXzMyOSkiLz4KPHBhdGggZD0iTTIwIDYyQzIwIDY1LjMxMzcgMjIuNjg2MyA2OCAyNiA2OEM0MC4zNTk0IDY4IDUyIDc5LjY0MDYgNTIgOTRDNTIgOTcuMzEzNyA1NC42ODYzIDEwMCA1OCAxMDBINjhWOTRDNjggNzAuODA0IDQ5LjE5NiA1MiAyNiA1MkgyMFY2MloiIGZpbGw9InVybCgjcGFpbnQ3X3JhZGlhbF82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik01MiA5NEg2OFYxMDBINThDNTQuNjg2MyAxMDAgNTIgOTcuMzEzNyA1MiA5NFoiIGZpbGw9InVybCgjcGFpbnQ4X3JhZGlhbF82Ml8zMjkpIi8+CjxwYXRoIGQ9Ik0yNiA2OEMyMi42ODYzIDY4IDIwIDY1LjMxMzcgMjAgNjJMMjAgNTJMMjYgNTJMMjYgNjhaIiBmaWxsPSJ1cmwoI3BhaW50OV9yYWRpYWxfNjJfMzI5KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzYyXzMyOSIgeDE9IjYwIiB5MT0iMCIgeDI9IjYwIiB5Mj0iMTIwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiMxNzQyOTkiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQxX3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgOTQpIHJvdGF0ZSgtOTApIHNjYWxlKDc0KSI+CjxzdG9wIG9mZnNldD0iMC43NzAyNzciIHN0b3AtY29sb3I9IiNGRjQwMDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQyX2xpbmVhcl82Ml8zMjkiIHgxPSI4MyIgeTE9Ijk3IiB4Mj0iMTAwIiB5Mj0iOTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NzU0QzkiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDNfbGluZWFyXzYyXzMyOSIgeDE9IjIzIiB5MT0iMjAiIHgyPSIyMyIgeTI9IjM3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ0X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYgOTQpIHJvdGF0ZSgtOTApIHNjYWxlKDU4KSI+CjxzdG9wIG9mZnNldD0iMC43MjM5MjkiIHN0b3AtY29sb3I9IiNGRkY3MDAiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQ1X2xpbmVhcl82Ml8zMjkiIHgxPSI2OCIgeTE9Ijk3IiB4Mj0iODQiIHkyPSI5NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50Nl9saW5lYXJfNjJfMzI5IiB4MT0iMjMiIHkxPSI1MiIgeDI9IjIzIiB5Mj0iMzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk5MDEiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJhZGlhbEdyYWRpZW50IGlkPSJwYWludDdfcmFkaWFsXzYyXzMyOSIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09InRyYW5zbGF0ZSgyNiA5NCkgcm90YXRlKC05MCkgc2NhbGUoNDIpIj4KPHN0b3Agb2Zmc2V0PSIwLjU5NTEzIiBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8cmFkaWFsR3JhZGllbnQgaWQ9InBhaW50OF9yYWRpYWxfNjJfMzI5IiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDUxIDk3KSBzY2FsZSgxNyA0NS4zMzMzKSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwMEFBRkYiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+CjwvcmFkaWFsR3JhZGllbnQ+CjxyYWRpYWxHcmFkaWVudCBpZD0icGFpbnQ5X3JhZGlhbF82Ml8zMjkiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjMgNjkpIHJvdGF0ZSgtOTApIHNjYWxlKDE3IDMyMi4zNykiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDBBQUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPgo8L3JhZGlhbEdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPgo="}")`}}),_De=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("rect",{rx:"27%",width:"88",height:"88",fill:"white"}),g.jsx("path",{d:"M69.0892 28.2123L70.5781 24.5643L66.3594 20.1967C64.0763 17.9136 59.2123 19.2537 59.2123 19.2537L53.7031 13H34.2721L28.7381 19.2785C28.7381 19.2785 23.8741 17.9632 21.591 20.1967L17.3722 24.5395L18.8612 28.1875L17 33.5974L23.204 57.2472C24.4945 62.3097 25.3631 64.2702 29.011 66.8511L40.352 74.5441C41.4439 75.2142 42.784 76.3805 44 76.3805C45.216 76.3805 46.5561 75.2142 47.648 74.5441L58.989 66.8511C62.6369 64.2702 63.5055 62.3097 64.796 57.2472L71 33.5974L69.0892 28.2123Z",fill:"url(#paint0_linear_2183_5890)"}),g.jsx("path",{d:"M57.6737 23.2739C57.6737 23.2739 64.796 31.8851 64.796 33.6967C64.796 35.5579 63.9026 36.0294 63.0092 36.9972L57.6737 42.705C57.1774 43.2013 56.1103 44.045 56.7307 45.5092C57.3511 46.9982 58.2197 48.8346 57.227 50.7206C56.2344 52.6314 54.4972 53.8971 53.3805 53.6985C51.7195 53.1594 50.1348 52.4088 48.6654 51.4651C47.7224 50.8447 44.6949 48.3382 44.6949 47.3704C44.6949 46.4026 47.8217 44.6406 48.4173 44.2932C48.9881 43.8961 51.6434 42.3575 51.693 41.7619C51.7427 41.1664 51.7427 41.0175 50.9485 39.5285C50.1544 38.0395 48.7647 36.0542 48.9632 34.7638C49.2114 33.4733 51.4449 32.7785 53.1075 32.1581L58.2445 30.2224C58.6415 30.0239 58.5423 29.8502 57.3511 29.7261C56.1599 29.6268 52.8097 29.1801 51.296 29.602C49.7822 30.0239 47.2509 30.6691 47.0028 31.0165C46.8042 31.364 46.6057 31.364 46.829 32.5551L48.2684 40.3722C48.3677 41.3649 48.5662 42.0349 47.5239 42.2831C46.432 42.5313 44.6204 42.9531 44 42.9531C43.3796 42.9531 41.5432 42.5313 40.4761 42.2831C39.409 42.0349 39.6075 41.3649 39.7316 40.3722C39.8309 39.3796 40.9228 33.7215 41.1461 32.5551C41.3943 31.364 41.171 31.364 40.9724 31.0165C40.7243 30.6691 38.1682 30.0239 36.6544 29.602C35.1654 29.1801 31.7904 29.6268 30.5993 29.7509C29.4081 29.8502 29.3088 29.9991 29.7059 30.2472L34.8428 32.1581C36.4807 32.7785 38.7638 33.4733 38.9871 34.7638C39.2353 36.079 37.8208 38.0395 37.0018 39.5285C36.1829 41.0175 36.2077 41.1664 36.2574 41.7619C36.307 42.3575 38.9871 43.8961 39.5331 44.2932C40.1287 44.6654 43.2555 46.4026 43.2555 47.3704C43.2555 48.3382 40.3024 50.8447 39.3097 51.4651C37.8404 52.4088 36.2557 53.1594 34.5947 53.6985C33.4779 53.8971 31.7408 52.6314 30.7233 50.7206C29.7307 48.8346 30.6241 46.9982 31.2197 45.5092C31.8401 44.0202 30.7978 43.2261 30.2767 42.705L24.9412 36.9972C24.0726 36.079 23.1792 35.5827 23.1792 33.7463C23.1792 31.9099 30.3015 23.3235 30.3015 23.3235L37.0763 24.4154C37.8704 24.4154 39.6324 23.7454 41.2454 23.1746C42.8585 22.6783 43.9752 22.6287 43.9752 22.6287C43.9752 22.6287 45.0671 22.6287 46.705 23.1746C48.3428 23.7206 50.08 24.4154 50.8741 24.4154C51.693 24.4154 57.6985 23.2491 57.6985 23.2491L57.6737 23.2739ZM52.3382 56.2298C52.7849 56.4779 52.512 57.0239 52.0901 57.3217L45.7868 62.2353C45.2904 62.7316 44.4963 63.4761 43.9752 63.4761C43.454 63.4761 42.6847 62.7316 42.1636 62.2353C40.0743 60.5717 37.9648 58.9337 35.8355 57.3217C35.4384 57.0239 35.1654 56.5028 35.5873 56.2298L39.3097 54.2445C40.7894 53.4618 42.3551 52.8539 43.9752 52.4329C44.3474 52.4329 46.705 53.2767 48.6158 54.2445L52.3382 56.2298Z",fill:"white"}),g.jsx("path",{d:"M59.262 19.2785L53.7032 13H34.2721L28.7381 19.2785C28.7381 19.2785 23.8741 17.9632 21.591 20.1967C21.591 20.1967 28.0432 19.6259 30.2767 23.2491L37.126 24.4154C37.9201 24.4154 39.682 23.7454 41.2951 23.1746C42.9081 22.6783 44.0249 22.6287 44.0249 22.6287C44.0249 22.6287 45.1168 22.6287 46.7546 23.1746C48.3925 23.7206 50.1296 24.4154 50.9238 24.4154C51.7427 24.4154 57.7482 23.2491 57.7482 23.2491C59.9817 19.6259 66.4339 20.1967 66.4339 20.1967C64.1508 17.9136 59.2868 19.2537 59.2868 19.2537",fill:"url(#paint1_linear_2183_5890)"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_2183_5890",x1:"17",y1:"45.3241",x2:"71",y2:"45.3241",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),g.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),g.jsxs("linearGradient",{id:"paint1_linear_2183_5890",x1:"22.4879",y1:"18.8219",x2:"66.4339",y2:"18.8219",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#FF452A"}),g.jsx("stop",{offset:"1",stopColor:"#FF2000"})]})]})]}),PDe=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"white"},children:[g.jsx("mask",{id:"mask0_2091_4394",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"13",y:"9",width:"62",height:"71",children:g.jsx("path",{d:"M44 9L13 26.75V62.25L44 80L75 62.25V26.75L44 9ZM31.7577 24.3492H56.1513L59.0935 36.684H28.9307L31.7577 24.3492ZM41.5613 61.2993L36.2955 66.161H31.8427L20.6924 46.9369L28.8701 40.9079L36.0953 45.4627V53.6578L41.5552 58.8504V61.2993H41.5613ZM37.9759 53.1584L38.7888 45.4326L36.1256 38.5432H51.9229L49.3204 45.4326L50.0787 53.1283L44 53.1584H37.9759ZM56.2059 66.1069H51.8076L46.5419 61.2993V58.8564L52.0018 53.6638V45.4627L59.1421 40.8537L67.2955 46.9369L56.2059 66.1069Z",fill:"#002D74"})}),g.jsxs("g",{mask:"url(#mask0_2091_4394)",children:[g.jsx("rect",{y:"8",width:"44",height:"72",fill:"url(#paint0_linear_2091_4394)"}),g.jsx("rect",{x:"88",y:"80",width:"44",height:"72",transform:"rotate(-180 88 80)",fill:"url(#paint1_linear_2091_4394)"})]}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_2091_4394",x1:"22",y1:"8",x2:"22",y2:"80",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#010935"}),g.jsx("stop",{offset:"1",stopColor:"#142C70"})]}),g.jsxs("linearGradient",{id:"paint1_linear_2091_4394",x1:"110",y1:"80",x2:"110",y2:"152",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#010935"}),g.jsx("stop",{offset:"1",stopColor:"#142C70"})]})]})]}),IDe=({...e})=>g.jsx("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2106 16H16V29.4577H19.2182V19.2182L37.2106 19.1011V16ZM37.3568 33.4073V54.6179H50.8146V51.3997H40.575L40.458 33.4073H37.3568ZM16 72.1714H37.2106V69.0703L19.2182 68.9533V58.7137H16V72.1714ZM50.9609 16H72.1714V29.4577H68.9533V19.2182L50.9609 19.1011V16ZM72.1714 72.1714H50.9609V69.0703L68.9533 68.9533V58.7137H72.1714V72.1714Z",fill:"white"})}),RDe=({...e})=>g.jsxs("svg",{...e,width:"600",height:"600",viewBox:"0 0 600 600",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:[g.jsx("path",{d:"M470.747 209.191C462.305 192.354 448.646 178.695 431.808 170.253C413.337 161 389.233 161 341.006 161C331.236 161 307.916 161 300 161C292.084 161 268.728 161 258.994 161C210.856 161 186.662 161 168.191 170.253C151.354 178.69 137.7 192.35 129.27 209.191C119.999 227.662 120 251.767 120 299.976C120 348.185 119.999 372.308 129.27 390.778C137.7 407.619 151.354 421.279 168.191 429.716C186.662 438.97 210.784 438.97 258.994 438.97C268.764 438.97 292.084 438.97 300 438.97C307.916 438.97 331.272 438.97 341.006 438.97C389.144 438.97 413.337 438.97 431.808 429.716C448.646 421.274 462.305 407.616 470.747 390.778C480 372.308 480 348.203 480 299.976C480 251.749 480 227.662 470.747 209.191Z",fill:"#FFCEAA"}),g.jsx("path",{d:"M218.557 350.342C216.323 345.957 212.922 342.274 208.729 339.698C204.536 337.121 199.713 335.752 194.791 335.741H166.747C163.876 335.755 161.041 336.37 158.422 337.548C155.804 338.725 153.462 340.439 151.547 342.577C149.632 344.716 148.186 347.232 147.303 349.964C146.42 352.696 146.12 355.582 146.422 358.437C147.385 367.476 148.954 374.34 151.575 379.564C157.629 391.573 167.378 401.323 179.388 407.377C188.195 411.798 201.674 413.26 222.444 413.742C225.415 413.812 228.353 413.109 230.97 411.702C233.587 410.295 235.793 408.232 237.373 405.715C238.953 403.199 239.852 400.315 239.982 397.346C240.113 394.378 239.47 391.427 238.116 388.781L218.557 350.342Z",fill:"#FF3B9A"}),g.jsx("path",{d:"M180.618 312.563C189.852 312.562 198.95 310.335 207.14 306.071C215.33 301.806 222.371 295.63 227.668 288.066L254.856 249.253C259.761 242.25 262.839 234.134 263.81 225.64C264.782 217.146 263.616 208.545 260.419 200.616V200.384C258.913 196.555 256.409 193.2 253.167 190.666C249.925 188.133 246.064 186.514 241.985 185.978C209.732 186.085 190.726 186.887 179.405 192.575C167.37 198.586 157.611 208.339 151.592 220.37C146.725 230.247 145.227 258.007 144.87 280.507C144.797 284.698 145.56 288.862 147.114 292.754C148.668 296.647 150.983 300.191 153.923 303.179C156.863 306.167 160.369 308.539 164.236 310.156C168.103 311.774 172.254 312.604 176.445 312.599L180.618 312.563Z",fill:"#FF3B9A"}),g.jsx("path",{d:"M449.702 220.356C443.655 208.365 433.909 198.639 421.906 192.614C409.89 186.588 389.262 186.053 353.337 186C304.664 186 289.528 242 279.134 256.834L248.556 300.497C243.645 307.51 240.729 315.725 240.12 324.266C239.511 332.806 241.231 341.352 245.098 348.991L267.758 393.813C270.842 399.931 275.578 405.063 281.43 408.627C287.282 412.191 294.016 414.045 300.867 413.978H301.49C309.495 413.978 334.171 413.978 342.283 413.978C385.072 413.978 408.713 413.977 421.906 407.381C433.914 401.331 443.66 391.58 449.702 379.568C456.317 366.374 456.316 342.787 456.316 299.944C456.316 257.101 456.317 233.621 449.702 220.356Z",fill:"#FF3B9A"})]}),NDe=({...e})=>g.jsx("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"linear-gradient(180deg, #FED812 0%, #FFAF00 100%)"},children:g.jsx("path",{d:"M47.4 43.7163C47.4 45.6251 45.8781 47.1714 44.0001 47.1714C42.1219 47.1714 40.6 45.6251 40.6 43.7163L40.6 -7H27L27 43.7163C27 53.2612 34.6106 61 44.0001 61C53.3882 61 61 53.2612 61 43.7163V-7H47.4V43.7163Z",fill:"#1F2129"})}),ODe=({...e})=>g.jsx("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"white"},children:g.jsx("path",{d:"M20 16L28.675 24.677C32.1885 21.8644 36.4154 20.0873 40.8816 19.545C45.348 19.0026 49.8769 19.7164 53.9604 21.6063C58.0438 23.4963 61.5207 26.4876 64.0005 30.2447C66.4804 34.0019 67.8653 38.3763 68 42.8772V43.5854V72L59.3367 63.3231C55.8263 66.1389 51.6014 67.9196 47.1361 68.4655C42.6708 69.0112 38.1419 68.3007 34.0577 66.4135C29.9734 64.5262 26.4956 61.537 24.0144 57.7813C21.5333 54.0255 20.1472 49.6521 20.0115 45.1515V44.4433L20 16ZM25.931 30.3311V44.4146C25.9323 47.7294 26.8335 50.9817 28.5384 53.8236C30.2432 56.6655 32.6875 58.9902 35.6101 60.5497C38.5328 62.1089 41.8238 62.8439 45.1313 62.6764C48.439 62.5087 51.639 61.4445 54.3894 59.5978L54.8611 59.2754L27.0873 31.4884L25.931 30.3311ZM33.6223 28.4022L33.1505 28.7304L60.9186 56.5117L62.069 57.6632V43.5854C62.0683 40.2717 61.1679 37.0204 59.464 34.179C57.7603 31.3377 55.3171 29.0132 52.3957 27.4539C49.4742 25.8946 46.1844 25.1592 42.8777 25.3262C39.5712 25.4933 36.372 26.5565 33.6223 28.4022Z",fill:"#23262F"})}),LDe=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"#6C67F1"},children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.6667 24.3696L34.8872 40.1864L24.0001 37.7402L37.3334 24.3696L48.4438 13.3798C49.268 12.5646 50.6667 13.1484 50.6667 14.3077V24.3696ZM37.3339 51.0358L50.6672 37.74V24.3694L35.2001 39.8737L37.3339 51.0358Z",fill:"url(#paint0_linear_2593_6077)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.3337 64.2947V50.9617L50.667 37.6284L55.7849 45.8435L55.9822 45.6463L64 50.9616L39.5582 75.2343C38.7347 76.0521 37.3336 75.4687 37.3336 74.3082V64.2949L37.3337 64.2947Z",fill:"url(#paint1_linear_2593_6077)"}),g.jsx("path",{d:"M24 37.7405H32.573C35.202 37.7405 37.3333 39.8718 37.3333 42.5009V51.0359H28.7602C26.1313 51.0359 24 48.9046 24 46.2757V37.7405Z",fill:"#F1F0FF"}),g.jsx("path",{d:"M50.6667 37.7405H59.2398C61.8688 37.7405 64 39.8718 64 42.5009V51.0359H55.4271C52.798 51.0359 50.6667 48.9046 50.6667 46.2757V37.7405Z",fill:"#F1F0FF"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_2593_6077",x1:"37.3336",y1:"13",x2:"37.3336",y2:"51.0358",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#A8ADFF"}),g.jsx("stop",{offset:"0.648556",stopColor:"white"})]}),g.jsxs("linearGradient",{id:"paint1_linear_2593_6077",x1:"50.6668",y1:"37.6284",x2:"50.6668",y2:"75.616",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{offset:"0.260784",stopColor:"#B6BAFF"}),g.jsx("stop",{offset:"1",stopColor:"#E4E2FF"})]})]})]}),BDe=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"var(--ck-brand-safe)"},children:[g.jsx("path",{d:"M68.7186 44H62.6472C60.8339 44 59.3646 45.4686 59.3646 47.281V56.0888C59.3646 57.9012 57.8952 59.3697 56.0819 59.3697H31.9278C30.1145 59.3697 28.6452 60.8383 28.6452 62.6507V68.719C28.6452 70.5314 30.1145 72 31.9278 72H57.48C59.2933 72 60.7417 70.5314 60.7417 68.719V63.8504C60.7417 62.038 62.2111 60.7524 64.0244 60.7524H68.7174C70.5307 60.7524 72 59.2838 72 57.4714V47.2429C72 45.4305 70.5307 44 68.7174 44H68.7186Z",fill:"#121312"}),g.jsx("path",{d:"M28.6406 31.9308C28.6406 30.1162 30.1104 28.6458 31.9243 28.6458H56.0712C57.8851 28.6458 59.3548 27.1754 59.3548 25.3608V19.285C59.3548 17.4704 57.8851 16 56.0712 16H30.5245C28.7107 16 27.2409 17.4704 27.2409 19.285V23.9666C27.2409 25.7813 25.7711 27.2516 23.9572 27.2516H19.2837C17.4698 27.2516 16 28.722 16 30.5366V40.7888C16 42.6034 17.4759 44 19.2898 44H25.3631C27.177 44 28.6468 42.5296 28.6468 40.715L28.6406 31.932V31.9308Z",fill:"#121312"}),g.jsx("path",{d:"M41.1004 37.6774H46.8995C48.7894 37.6774 50.3226 39.2117 50.3226 41.1004V46.8995C50.3226 48.7894 48.7882 50.3225 46.8995 50.3225H41.1004C39.2106 50.3225 37.6774 48.7882 37.6774 46.8995V41.1004C37.6774 39.2105 39.2118 37.6774 41.1004 37.6774V37.6774Z",fill:"#121312"})]}),MDe=({...e})=>g.jsx("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"#CC703C"},children:g.jsx("path",{d:"M63.6429 20L63.3645 20.7254L62.4521 23.0445L61.8461 24.5395C57.2427 35.7491 53.6629 41.0688 49.8557 41.0688C48.8938 41.0936 47.9371 40.9212 47.0465 40.5625C46.156 40.2038 45.3512 39.6667 44.6834 38.9852L44.1979 38.5518C42.9885 37.4538 42.4799 37.1831 41.3154 37.1832C40.7094 37.1832 39.6238 37.9435 38.2521 39.7303C36.4147 42.2912 34.8522 45.0327 33.59 47.9106L33.4353 48.2482L49.7645 48.2483L47.7312 52.4075H32.4845L32.4843 69.44L28 69.44L28.0001 20L63.6429 20ZM57.2889 24.1518L32.4843 24.1518L32.4843 40.6262C35.4564 35.5545 38.2816 33.0086 41.32 33.0086C42.3421 32.9765 43.3595 33.1534 44.3082 33.5284C45.2569 33.9034 46.1159 34.468 46.8311 35.1865L47.3323 35.6335C48.4611 36.6585 48.8956 36.8941 49.8604 36.8941C50.9211 36.8957 53.7433 32.4855 57.2889 24.1518Z",fill:"white"})}),zse=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"linear-gradient(120.22deg, #2962EF 0%, #255CE5 100%)"},children:[g.jsx("path",{d:"M19.0864 22C17.5783 22 16.9973 23.8648 18.2628 24.6438L49.9199 43.732C50.709 44.2178 51.7614 44.0258 52.3048 43.2969L66.2236 25.024C67.17 23.7545 66.2138 22 64.5757 22H19.0864Z",fill:"white"}),g.jsx("path",{d:"M68.8425 66C70.3503 66 70.9466 64.1252 69.6814 63.3464L38.015 44.2605C37.2259 43.7748 36.1989 43.991 35.6558 44.7198L21.7099 62.9891C20.7639 64.2582 21.7499 66 23.3877 66H68.8425Z",fill:"white"})]}),$se=({background:e=!1,...t})=>g.jsx("svg",{...t,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"#AB9FF2"}:void 0,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.7425 57.0705C34.1942 62.3362 28.2483 69 20.3366 69C16.5965 69 13.0001 67.5093 13 61.0322C12.9997 44.5362 36.2555 19.0003 57.8334 19C70.1084 18.9998 75 27.2474 75 36.6136C75 48.6357 66.9442 62.3824 58.9368 62.3824C56.3955 62.3824 55.1487 61.031 55.1487 58.888C55.1487 58.3288 55.2442 57.7228 55.4365 57.0705C52.7029 61.5902 47.4285 65.7849 42.4896 65.7849C38.8933 65.7849 37.0713 63.5944 37.0713 60.5187C37.0713 59.4003 37.311 58.2357 37.7425 57.0705ZM53.7586 31.6834C51.8054 31.6868 50.4738 33.2938 50.478 35.5864C50.4822 37.879 51.8198 39.5273 53.7729 39.5241C55.6789 39.5208 57.0099 37.8679 57.0058 35.5752C57.0016 33.2827 55.6646 31.6802 53.7586 31.6834ZM64.1193 31.6725C62.1661 31.6759 60.8345 33.2829 60.8387 35.5755C60.8429 37.868 62.1798 39.5164 64.1336 39.5131C66.0396 39.5099 67.3706 37.8569 67.3664 35.5643C67.3622 33.2718 66.0253 31.6693 64.1193 31.6725Z",fill:e?"#ffffff":"currentColor"})}),DDe=()=>g.jsx("div",{style:{width:80,height:80,background:"#555"}}),jDe=({...e})=>g.jsxs("svg",{...e,width:"88px",height:"88px",viewBox:"0 0 192 192",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"linearGradient-1",children:[g.jsx("stop",{stopColor:"#151515",offset:"0%"}),g.jsx("stop",{stopColor:"#232323",offset:"100%"})]}),g.jsx("rect",{rx:"27%",id:"path-2",x:"0",y:"0",width:"192",height:"192"}),g.jsxs("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"99.7051532%",id:"linearGradient-3",children:[g.jsx("stop",{stopColor:"#F3DC83",offset:"0%"}),g.jsx("stop",{stopColor:"#F9EEC8",offset:"100%"})]})]}),g.jsx("g",{id:"Icons---Pixel-Fitted",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{id:"Group",children:[g.jsxs("g",{id:"Rectangle",children:[g.jsx("use",{fill:"#232323",xlinkHref:"#path-2"}),g.jsx("use",{fill:"url(#linearGradient-1)",xlinkHref:"#path-2"})]}),g.jsx("path",{d:"M123.748399,157.001808 C115.293464,160.853955 105.89735,163 96,163 C86.1026503,163 76.7065363,160.853955 68.2516012,157.001808 Z M146.526595,140.002206 C144.677242,142.123986 142.696426,144.128189 140.59684,146.002121 L51.4031598,146.002121 C49.3035743,144.128189 47.3227581,142.123986 45.4734054,140.002206 Z M157.337411,122.999613 C155.955969,126.133404 154.34141,129.141319 152.515704,132.001388 L39.484296,132.001388 C37.6585895,129.141319 36.0440306,126.133404 34.662589,122.999613 Z M96,29 C133.003078,29 163,58.9969218 163,96 C163,103.706309 161.69895,111.108742 159.304524,117.999626 L32.6954763,117.999626 C30.3010496,111.108742 29,103.706309 29,96 C29,58.9969218 58.9969218,29 96,29 Z",id:"Combined-Shape",fill:"url(#linearGradient-3)"})]})})]}),FDe=({...e})=>g.jsxs("svg",{...e,version:"1.1",id:"e551690a-81c0-4880-9b93-334a37ce6796",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1025 1025",children:[g.jsx("style",{type:"text/css",children:` + .infinityWallet-st0{fill:url(#ID_InfinityWallet_1);} + .infinityWallet-st1{fill:url(#ID_InfinityWallet_2);} + .infinityWallet-st2{opacity:0.49;fill:url(#ID_InfinityWallet_3);enable-background:new;} + .infinityWallet-st3{opacity:0.49;fill:url(#ID_InfinityWallet_4);enable-background:new;} + .infinityWallet-st4{opacity:0.49;fill:url(#ID_InfinityWallet_5);enable-background:new;} + .infinityWallet-st5{fill:url(#ID_InfinityWallet_6);} + .infinityWallet-st6{opacity:0.49;fill:url(#ID_InfinityWallet_7);enable-background:new;} + .infinityWallet-st7{opacity:0.49;fill:url(#ID_InfinityWallet_8);enable-background:new;} + .infinityWallet-st8{opacity:0.49;fill:url(#ID_InfinityWallet_9);enable-background:new;} + `}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_1",gradientUnits:"userSpaceOnUse",x1:"512.5",y1:"1056.1801",x2:"512.5",y2:"317.03",gradientTransform:"matrix(1 0 0 -1 0 1260)",children:[g.jsx("stop",{offset:"0",style:{stopColor:"#1D2643"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#12142C"}})]}),g.jsx("path",{className:"infinityWallet-st0",d:`M130,0H895c71.8,0,130,58.2,130,130V895c0,71.8-58.2,130-130,130H130C58.2,1025,0,966.8,0,895V130 + C0,58.2,58.2,0,130,0z`}),g.jsxs("g",{children:[g.jsxs("g",{children:[g.jsxs("linearGradient",{id:"ID_InfinityWallet_2",gradientUnits:"userSpaceOnUse",x1:"326.0557",y1:"-1280.3162",x2:"326.0557",y2:"-296.3967",gradientTransform:"matrix(1 0 0 1 0 1474)",children:[g.jsx("stop",{offset:"1.000000e-02",style:{stopColor:"#00BFE1"}}),g.jsx("stop",{offset:"0.97",style:{stopColor:"#2738AB"}})]}),g.jsx("path",{className:"infinityWallet-st1",d:`M550.9,380.8c-0.7-2-2.4-3.4-4.4-3.9c-2.3-0.6-4.7,0-6.4,1.7l-13.4,13.4l-2.2,2.2L418.3,288.5 + c-40.2-40-105.2-40-145.4,0L121.7,439.9c-40,40.5-40,105.6,0,146.1l151.4,150.5c40.2,40,105.1,40,145.3,0l34.4-34.4 + c4.5-4.5,9.9-10.7,12.9-18.7c4.7-13.1,2.8-27.7-5.2-39.1c-1.5-2.2-3.2-4.2-5.1-6c-16.9-16.5-43.9-16.3-60.7,0.3l-37.2,37.1 + c-2.2,2.3-5,3.8-8.1,4.5c-2.9,0.7-6,0.5-8.8-0.6c-2.9-1-5.5-2.7-7.7-5L182.6,524.2c-2.3-2.3-3.9-5.2-4.6-8.4 + c-0.8-4-0.1-8.2,2.1-11.8l0.8-0.9L334,350.3c2.4-2.4,5.4-4,8.7-4.6c1-0.2,2.1-0.3,3.1-0.3c4.4-0.1,8.7,1.7,11.7,5l105.8,105.2 + l-5.3,5.3l-10.4,10.6c-1.7,1.7-2.3,4.1-1.7,6.4c0.5,2,2,3.7,3.9,4.4l95.7,11.7c8.2-0.1,14.8-6.7,15-15L550.9,380.8z`}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_3",gradientUnits:"userSpaceOnUse",x1:"137.7126",y1:"-935.1906",x2:"201.098",y2:"-882.1746",gradientTransform:"matrix(1 0 0 1 -0.94 1473.3899)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st2",d:"M181.4,522.9c-4.3-4.9-5.1-13.3-1.3-19c0,0-49.7,54.3-25.8,114.4l31.5,31.3l45.8-76.2L181.4,522.9z"}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_4",gradientUnits:"userSpaceOnUse",x1:"4132.3252",y1:"1674.2513",x2:"4102.1333",y2:"1717.0756",gradientTransform:"matrix(-1 0 0 -1 4515 2382.0898)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st3",d:`M336.4,677.7c56.1,51.6,117.9,22.9,117.9,22.9s8.1-7.5,11.4-17.4c-8.3-4-68.6-47.2-68.6-47.2l-35.6,35.6 + C348.6,687.1,336.4,677.7,336.4,677.7z`}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_5",gradientUnits:"userSpaceOnUse",x1:"4217.4238",y1:"2067.1885",x2:"4240.0796",y2:"2011.1337",gradientTransform:"matrix(-1 0 0 -1 4515 2382.0898)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st4",d:"M299.4,385c0,0,35.9-36.2,36-36c0,0,9.6-7.7,19.7-0.7c0,0-59.7-49.2-123.6-18.3l-18.6,18.7L299.4,385z"})]}),g.jsxs("g",{children:[g.jsxs("linearGradient",{id:"ID_InfinityWallet_6",gradientUnits:"userSpaceOnUse",x1:"698.9443",y1:"-1280.3162",x2:"698.9443",y2:"-296.3967",gradientTransform:"matrix(1 0 0 1 0 1474)",children:[g.jsx("stop",{offset:"1.000000e-02",style:{stopColor:"#00BFE1"}}),g.jsx("stop",{offset:"0.97",style:{stopColor:"#2738AB"}})]}),g.jsx("path",{className:"infinityWallet-st5",d:`M474.1,644.3c0.7,2,2.4,3.4,4.4,3.9c2.3,0.6,4.7,0,6.4-1.7l13.4-13.4l2.2-2.2l106.2,105.6 + c40.2,40,105.2,40,145.4,0l151.2-151.4c40-40.5,40-105.6,0-146.1L751.9,288.5c-40.2-40-105.1-40-145.3,0l-34.4,34.4 + c-4.5,4.5-9.9,10.7-12.9,18.7c-4.7,13.1-2.8,27.7,5.2,39.1c1.5,2.2,3.2,4.2,5.1,6c16.9,16.5,43.9,16.3,60.7-0.3l37.2-37.1 + c2.2-2.3,5-3.8,8.1-4.5c2.9-0.7,6-0.5,8.8,0.6c2.9,1,5.5,2.7,7.7,5l150.3,150.3c2.3,2.3,3.9,5.2,4.6,8.4c0.8,4,0.1,8.2-2.1,11.8 + l-0.8,0.9L691,674.5c-2.4,2.4-5.4,4-8.7,4.6c-1,0.2-2.1,0.3-3.1,0.3c-4.4,0.1-8.7-1.7-11.7-5L561.6,569.7l5.3-5.3l10.4-10.6 + c1.7-1.7,2.3-4.1,1.7-6.4c-0.5-2-2-3.7-3.9-4.4l-95.6-11.7c-8.2,0.1-14.8,6.7-15,15L474.1,644.3z`}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_7",gradientUnits:"userSpaceOnUse",x1:"3824.9182",y1:"1469.7789",x2:"3888.3037",y2:"1522.7949",gradientTransform:"matrix(-1 0 0 -1 4713.1299 1956.6599)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st6",d:"M843.6,502.2c4.3,4.9,5.1,13.3,1.3,19c0,0,49.7-54.3,25.8-114.4l-31.5-31.3l-45.8,76.2L843.6,502.2z"}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_8",gradientUnits:"userSpaceOnUse",x1:"445.1279",y1:"-730.6945",x2:"414.9359",y2:"-687.8702",gradientTransform:"matrix(1 0 0 1 197.19 1047.96)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st7",d:`M688.6,347.4c-56.1-51.6-117.9-22.9-117.9-22.9s-8.1,7.5-11.4,17.4c8.3,4,68.6,47.2,68.6,47.2l35.6-35.6 + C676.4,338,688.6,347.4,688.6,347.4z`}),g.jsxs("linearGradient",{id:"ID_InfinityWallet_9",gradientUnits:"userSpaceOnUse",x1:"530.1512",y1:"-337.7953",x2:"552.8069",y2:"-393.8502",gradientTransform:"matrix(1 0 0 1 197.19 1047.96)",children:[g.jsx("stop",{offset:"3.000000e-02",style:{stopColor:"#1B1464"}}),g.jsx("stop",{offset:"1",style:{stopColor:"#1B1464",stopOpacity:0}})]}),g.jsx("path",{className:"infinityWallet-st8",d:"M725.5,640.1c0,0-35.9,36.2-36,36c0,0-9.6,7.7-19.7,0.7c0,0,59.7,49.2,123.6,18.3l18.6-18.7L725.5,640.1z"})]})]})]}),UDe=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"#8697FF"},children:[g.jsx("path",{d:"M76.2062 48.0657C78.7621 42.356 66.1267 26.404 54.0555 19.7581C46.4467 14.6095 38.5183 15.3169 36.9125 17.5775C33.3886 22.5385 48.5814 26.7423 58.742 31.6478C56.5579 32.5964 54.4996 34.2987 53.2893 36.4758C49.5013 32.3404 41.1872 28.7791 31.4315 31.6478C24.8574 33.5809 19.3937 38.1382 17.2821 45.0216C16.7689 44.7936 16.2009 44.6669 15.6032 44.6669C13.3176 44.6669 11.4648 46.5197 11.4648 48.8052C11.4648 51.0908 13.3176 52.9435 15.6032 52.9435C16.0268 52.9435 17.3514 52.6594 17.3514 52.6594L38.5183 52.8128C30.0532 66.2418 23.3634 68.2049 23.3634 70.5314C23.3634 72.8579 29.7643 72.2274 32.1678 71.3602C43.6732 67.2088 56.0306 54.2706 58.1511 50.5462C67.056 51.6572 74.5397 51.7886 76.2062 48.0657Z",fill:"url(#paint0_linear_60607_36577)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.65 31.6053C58.682 31.6193 58.7139 31.6332 58.7458 31.6471C59.2168 31.4616 59.1406 30.766 59.0113 30.2198C58.714 28.9643 53.5856 23.9001 48.7696 21.6318C42.1984 18.5367 37.3618 18.7007 36.6582 20.1307C37.9975 22.8695 44.1927 25.441 50.663 28.1266C53.3909 29.2589 56.1676 30.4114 58.65 31.6053Z",fill:"url(#paint1_linear_60607_36577)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.4154 59.2247C49.0895 58.7182 47.592 58.2536 45.8898 57.8319C47.707 54.5801 48.0884 49.7663 46.3721 46.7226C43.9635 42.4512 40.9399 40.1777 33.9139 40.1777C30.0495 40.1777 19.6451 41.4794 19.4603 50.1648C19.441 51.0763 19.4599 51.9118 19.5259 52.68L38.5175 52.8176C35.9568 56.8798 33.5586 59.8928 31.4589 62.1841C33.9831 62.8309 36.0657 63.3738 37.9775 63.8722C39.7885 64.3443 41.4462 64.7764 43.1809 65.2191C45.8007 63.3102 48.2635 61.2288 50.4154 59.2247Z",fill:"url(#paint2_linear_60607_36577)"}),g.jsx("path",{d:"M17.0296 51.7821C17.8058 58.38 21.5555 60.9657 29.2177 61.7309C36.8799 62.4961 41.2751 61.9828 47.1265 62.5151C52.0136 62.9598 56.3772 65.4502 57.996 64.5895C59.4529 63.815 58.6378 61.0167 56.6884 59.2214C54.1614 56.8943 50.6641 55.2763 44.5104 54.7021C45.7368 51.3443 45.3931 46.6362 43.4885 44.0748C40.7345 40.3711 35.6513 38.6967 29.2177 39.4282C22.4962 40.1926 16.0556 43.5018 17.0296 51.7821Z",fill:"url(#paint3_linear_60607_36577)"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_60607_36577",x1:"30.666",y1:"43.0094",x2:"75.6558",y2:"55.7677",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white"})]}),g.jsxs("linearGradient",{id:"paint1_linear_60607_36577",x1:"68.0842",y1:"42.1521",x2:"35.6221",y2:"9.60636",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#7258DC"}),g.jsx("stop",{offset:"1",stopColor:"#797DEA",stopOpacity:"0"})]}),g.jsxs("linearGradient",{id:"paint2_linear_60607_36577",x1:"51.3184",y1:"60.3591",x2:"20.1383",y2:"42.4347",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#7461EA"}),g.jsx("stop",{offset:"1",stopColor:"#BFC2FF",stopOpacity:"0"})]}),g.jsxs("linearGradient",{id:"paint3_linear_60607_36577",x1:"33.3531",y1:"42.6732",x2:"54.4308",y2:"69.4547",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"0.983895",stopColor:"#D5CEFF"})]})]})]}),zDe=({...e})=>g.jsxs("svg",{...e,width:"88px",height:"88px",viewBox:"0 0 88 88",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("linearGradient",{x1:"107.511425%",y1:"50.0147427%",x2:"0.0459570557%",y2:"50.0147427%",id:"linearGradient-1",children:[g.jsx("stop",{stopColor:"#FFFFFF",offset:"0%"}),g.jsx("stop",{stopColor:"#FFFFFF",stopOpacity:"0.3233",offset:"96.67%"}),g.jsx("stop",{stopColor:"#FFFFFF",stopOpacity:"0.3",offset:"100%"})]})}),g.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{id:"tokenpocket",fillRule:"nonzero",children:[g.jsx("polygon",{fill:"#2980FE",points:"87.9604864 0 0 0 0 88 87.9604864 88"}),g.jsxs("g",{transform:"translate(16.052385, 23.804688)",children:[g.jsx("path",{d:"M19.6653508,13.8911953 L19.6784508,13.8911953 C19.6653508,13.8236484 19.6653508,13.7448437 19.6653508,13.6772969 L19.6653508,13.8911953 Z",fill:"#29AEFF"}),g.jsx("path",{d:"M41.1271993,16.0301797 L29.2440711,16.0301797 L29.2440711,38.4205938 C29.2440711,39.4787422 30.0635659,40.3343359 31.0771712,40.3343359 L39.2940168,40.3343359 C40.3077044,40.3343359 41.1271993,39.4787422 41.1271993,38.4205938 L41.1271993,16.0301797 Z",fill:"#FFFFFF"}),g.jsx("path",{d:"M23.5075248,0 L23.1085201,0 L1.83318241,0 C0.819494855,0 0,0.855507812 0,1.91374219 L0,9.68111719 C0,10.7393516 0.819494855,11.5948594 1.83318241,11.5948594 L6.82580355,11.5948594 L8.80996071,11.5948594 L8.80996071,13.8912813 L8.80996071,38.4768828 C8.80996071,39.5351172 9.62945557,40.390625 10.6430608,40.390625 L18.4502002,40.390625 C19.4638054,40.390625 20.2833003,39.5351172 20.2833003,38.4768828 L20.2833003,13.8912813 L20.2833003,13.6774688 L20.2833003,11.5948594 L22.2674574,11.5948594 L23.0761684,11.5948594 L23.4751731,11.5948594 C26.5376389,11.5948594 29.0285575,8.99447656 29.0285575,5.79742969 C29.0609093,2.60038281 26.5699906,0 23.5075248,0 Z",fill:"#FFFFFF"}),g.jsx("path",{d:"M41.1381478,16.0301797 L41.1381478,31.6550781 C41.5479364,31.7563984 41.9684266,31.8352031 42.399783,31.90275 C43.0036819,31.9928125 43.6290664,32.0491016 44.2545332,32.0603594 C44.2868849,32.0603594 44.3192367,32.0603594 44.3623723,32.0603594 L44.3623723,19.6324219 C42.5615416,19.5085859 41.1381478,17.9438359 41.1381478,16.0301797 Z",fill:"url(#linearGradient-1)"}),g.jsx("path",{d:"M44.5993714,0 C36.1237942,0 29.2440711,7.18205469 29.2440711,16.0301797 C29.2440711,23.6400312 34.3229635,30.0115234 41.1379832,31.6550781 L41.1379832,16.0301797 C41.1379832,14.0376328 42.6907839,12.4165937 44.5993714,12.4165937 C46.5080412,12.4165937 48.0608419,14.0376328 48.0608419,16.0301797 C48.0608419,17.7075078 46.9717493,19.1146484 45.483652,19.5198437 C45.2032703,19.5986484 44.9013209,19.6436797 44.5993714,19.6436797 L44.5993714,32.0603594 C44.9013209,32.0603594 45.1924864,32.0491016 45.483652,32.0378438 C53.5495229,31.5537578 59.9547666,24.5743438 59.9547666,16.0301797 C59.9655379,7.18205469 53.0858148,0 44.5993714,0 Z",fill:"#FFFFFF"}),g.jsx("path",{d:"M44.5992891,32.0603594 L44.5992891,19.6436797 C44.5131001,19.6436797 44.4376127,19.6436797 44.3513414,19.6324219 L44.3513414,32.0603594 C44.4376127,32.0603594 44.523884,32.0603594 44.5992891,32.0603594 Z",fill:"#FFFFFF"})]})]})})]}),$De=({...e})=>g.jsxs("svg",{...e,width:"82",height:"82",viewBox:"0 0 82 82",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("rect",{width:"82",height:"82",rx:"12",fill:"#D5FF5C"}),g.jsx("path",{d:"M35.04 55C35.04 58.2905 37.6887 60.9623 40.9703 60.9996C44.2519 60.9623 46.9006 58.2905 46.9006 55C46.9006 51.7096 44.2519 49.0377 40.9703 49.0004C37.6887 49.0377 35.04 51.7096 35.04 55Z",fill:"#FD4848"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.8544 44.6623C22.2462 45.9868 20.4553 46.4546 19.4248 45.4241L17.5356 43.5349C15.583 41.5823 12.4171 41.5823 10.4645 43.5349C8.51184 45.4875 8.51184 48.6534 10.4645 50.606L25.7391 65.8807C29.3942 70.2176 34.8595 72.9788 40.9703 72.9994C47.0811 72.9788 52.5464 70.2176 56.2014 65.8807L71.4761 50.606C73.4287 48.6534 73.4287 45.4875 71.4761 43.5349C69.5234 41.5823 66.3576 41.5823 64.4049 43.5349L62.5158 45.4241C61.4852 46.4546 59.6943 45.9868 59.0861 44.6623C58.9663 44.4013 58.901 44.1213 58.901 43.8341L58.901 20.9995C58.901 18.2381 56.6624 15.9995 53.901 15.9995C51.1396 15.9995 48.901 18.2381 48.901 20.9995L48.901 32.5568C48.901 33.5506 47.8829 34.2252 46.9353 33.9257C46.3356 33.7361 45.9023 33.1901 45.9023 32.5611L45.9023 13.9996C45.9023 11.2608 43.7004 9.03637 40.9703 9C38.2402 9.03637 36.0382 11.2608 36.0382 13.9996L36.0382 32.5611C36.0382 33.1901 35.605 33.7361 35.0052 33.9257C34.0576 34.2252 33.0395 33.5506 33.0395 32.5568L33.0396 20.9995C33.0396 18.2381 30.801 15.9995 28.0395 15.9995C25.2781 15.9995 23.0395 18.2381 23.0395 20.9995L23.0395 43.8341C23.0395 44.1213 22.9743 44.4013 22.8544 44.6623ZM40.9703 44.9999C32.1659 45.0525 25.0403 54.9997 25.0403 54.9997C25.0403 54.9997 32.1659 64.9469 40.9703 64.9995C49.7746 64.9469 56.9002 54.9997 56.9002 54.9997C56.9002 54.9997 49.7746 45.0525 40.9703 44.9999Z",fill:"#FD4848"})]}),HDe=({...e})=>{const t={position:"relative",display:"flex",flexDirection:"column",gap:2},n={position:"relative",display:"flex",gap:2},r={width:"50%",overflow:"hidden",borderRadius:"27.5%"};return g.jsxs("div",{style:t,...e,children:[g.jsxs("div",{style:n,children:[g.jsx("div",{style:r,children:g.jsx(Mse,{background:!0})}),g.jsx("div",{style:r,children:wDe()?g.jsx($se,{}):g.jsx(zse,{})})]}),g.jsxs("div",{style:n,children:[g.jsx("div",{style:r,children:Bse()?g.jsx(Fse,{}):g.jsx(Dse,{})}),g.jsx("div",{style:r,children:xDe()?g.jsx(jse,{}):g.jsx(Use,{})})]})]})},VDe=({...e})=>g.jsxs("svg",{...e,width:"88",height:"88",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsxs("g",{clipPath:"url(#clip0_14298_75627)",children:[g.jsx("path",{d:"M43.5075 62.5508H6V73.5954C6 79.2046 10.5379 83.7515 16.1357 83.7515H32.9997L43.5075 62.5508Z",fill:"#7994FF"}),g.jsx("path",{d:"M6.00098 39.1016H76.2075L68.0567 55.4841H6.00098V39.1016Z",fill:"#486DFF"}),g.jsx("path",{d:"M30.6398 12H6.09766V32.0282H89.8447V12H65.3025V26.9577H60.2423V12H35.7001V26.9577H30.6398V12Z",fill:"#5CD1FA"})]}),g.jsx("defs",{children:g.jsx("clipPath",{id:"clip0_14298_75627",children:g.jsx("rect",{width:"84",height:"72",fill:"white",transform:"translate(6 12)"})})})]});var Nt={Mock:EDe,Injected:CDe,OtherWallets:HDe,WalletConnect:Mse,MetaMask:ADe,Coinbase:SDe,Family:Dse,Trust:jse,Argent:kDe,ImToken:Fse,Rainbow:Use,Crypto:PDe,Ledger:IDe,Brave:_De,Steak:RDe,Unstoppable:NDe,ONTO:ODe,Slope:LDe,Safe:BDe,Frontier:MDe,Zerion:zse,Phantom:$se,PlaceHolder:DDe,Frame:TDe,Dawn:jDe,InfinityWallet:FDe,Rabby:UDe,Fordefi:VDe,TokenPocket:zDe,Talisman:$De};const WDe=/^(0x[a-zA-Z0-9]{4})[a-zA-Z0-9]+([a-zA-Z0-9]{4})$/,Hse=(e,t="••••")=>{if(!e)return"";const n=e.match(WDe);return n?`${n[1]}${t}${n[2]}`:e},GDe=(e,t=2)=>{if(e<1e4)return e.toFixed(2);const n=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"m"},{value:1e9,symbol:"g"},{value:1e12,symbol:"t"},{value:1e15,symbol:"p"},{value:1e18,symbol:"e"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/;var i=n.slice().reverse().find(function(o){return e>=o.value});return i?(e/i.value).toFixed(t).replace(r,"$1")+i.symbol:"0"},o4=()=>{var e;const t=iie();return(e=t==null?void 0:t.name)!==null&&e!==void 0?e:""},Vse=()=>{var e;const t=iie();return(e=t==null?void 0:t.os)!==null&&e!==void 0?e:""},KDe=()=>Vse().toLowerCase().includes("ios"),Yi=()=>Vse().toLowerCase().includes("android"),Tm=()=>Yi()||KDe();function Ju(e){return Gn.Children.toArray(e).reduce((n,r)=>r.type===Gn.Fragment?n.concat(Ju(r.props.children)):(n.push(r),n),[])}const _m=e=>e==="walletConnect",g9=e=>e==="coinbaseWalletSDK",Wse=e=>e==="safe",IH=e=>e==="injected",Mu={mock:{icon:g.jsx(Nt.Mock,{})},argent:{name:"Argent",icon:g.jsx(Nt.Argent,{}),downloadUrls:{download:"https://connect.family.co/v0/download/argent",android:"https://play.google.com/store/apps/details?id=im.argent.contractwalletclient",ios:"https://apps.apple.com/app/argent/id1358741926"},getWalletConnectDeeplink:e=>Yi()?e:`https://argent.link/app/wc?uri=${encodeURIComponent(e)}`},"coinbaseWallet, coinbaseWalletSDK":{name:"Coinbase Wallet",shortName:"Coinbase",icon:g.jsx(Nt.Coinbase,{background:!0}),iconShape:"squircle",downloadUrls:{download:"https://connect.family.co/v0/download/coinbasewallet",website:"https://www.coinbase.com/wallet/getting-started-extension",android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/app/coinbase-wallet-store-crypto/id1278383455",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad"},getWalletConnectDeeplink:e=>`https://go.cb-w.com/wc?uri=${encodeURIComponent(e)}`},"com.coinbase.wallet":{name:"Coinbase Wallet",shortName:"Coinbase",icon:g.jsx(Nt.Coinbase,{background:!0}),iconShape:"circle",downloadUrls:{download:"https://connect.family.co/v0/download/coinbasewallet",website:"https://www.coinbase.com/wallet/getting-started-extension",android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/app/coinbase-wallet-store-crypto/id1278383455",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad"},getWalletConnectDeeplink:e=>`https://go.cb-w.com/wc?uri=${encodeURIComponent(e)}`},"com.crypto.wallet":{name:"Crypto.com",shortName:"Crypto"},dawn:{name:"Dawn Wallet",shortName:"Dawn",downloadUrls:{download:"https://apps.apple.com/us/app/dawn-ethereum-wallet/id1673143782",website:"https://www.dawnwallet.xyz/",ios:"https://apps.apple.com/us/app/dawn-ethereum-wallet/id1673143782"}},"co.family.wallet":{name:"Family",shortName:"Family",icon:g.jsx(Nt.Family,{}),iconShape:"squircle",downloadUrls:{download:"https://connect.family.co/v0/download/family",website:"https://family.co",ios:"https://family.co/download"},getWalletConnectDeeplink:e=>Yi()?e:`familywallet://wc?uri=${encodeURIComponent(e)}`},frame:{name:"Frame",icon:g.jsx(Nt.Frame,{}),iconShouldShrink:!0,downloadUrls:{download:"https://connect.family.co/v0/download/frame",website:"https://frame.sh",chrome:"https://chrome.google.com/webstore/detail/frame-companion/ldcoohedfbjoobcadoglnnmmfbdlmmhf",firefox:"https://addons.mozilla.org/en-US/firefox/addon/frame-extension",brave:"https://chrome.google.com/webstore/detail/frame-companion/ldcoohedfbjoobcadoglnnmmfbdlmmhf"},getWalletConnectDeeplink:e=>e},frontier:{name:"Frontier Wallet",shortName:"Frontier",icon:g.jsx(Nt.Frontier,{}),downloadUrls:{download:"https://connect.family.co/v0/download/frontier",ios:"https://apps.apple.com/app/frontier-crypto-defi-wallet/id1482380988",android:"https://play.google.com/store/apps/details?id=com.frontierwallet",website:"https://frontier.xyz/",chrome:"https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd"},getWalletConnectDeeplink:e=>Yi()?e:`frontier://wc?uri=${encodeURIComponent(e)}`},injected:{name:"Browser Wallet",shortName:"Browser",icon:g.jsx(Nt.Injected,{})},"metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK":{name:"MetaMask",icon:g.jsx(Nt.MetaMask,{}),iconConnector:g.jsx(Nt.MetaMask,{}),iconShouldShrink:!0,downloadUrls:{download:"https://connect.family.co/v0/download/metamask",website:"https://metamask.io/download/",android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/app/metamask/id1438144202",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask/",brave:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm"},getWalletConnectDeeplink:e=>Yi()?e:`https://metamask.app.link/wc?uri=${encodeURIComponent(e)}`},"app.phantom":{name:"Phantom",iconShape:"squircle"},"me.rainbow":{name:"Rainbow Wallet",shortName:"Rainbow",icon:g.jsx(Nt.Rainbow,{}),iconShape:"squircle",downloadUrls:{download:"https://connect.family.co/v0/download/rainbow",website:"https://rainbow.me/?utm_source=connectkit",android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Dconnectkit&utm_source=connectkit",ios:"https://apps.apple.com/app/rainbow-ethereum-wallet/id1457119021?pt=119997837&ct=connectkit&mt=8",chrome:"https://rainbow.me/extension?utm_source=connectkit",edge:"https://rainbow.me/extension?utm_source=connectkit",brave:"https://rainbow.me/extension?utm_source=connectkit"},getWalletConnectDeeplink:e=>Yi()?e:`https://rnbwapp.com/wc?uri=${encodeURIComponent(e)}&connector=connectkit`},"io.rabby":{name:"Rabby Wallet",shortName:"Rabby",downloadUrls:{website:"https://rabby.io",chrome:"https://chrome.google.com/webstore/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch"}},safe:{name:"Safe",icon:g.jsx(Nt.Safe,{}),downloadUrls:{download:"https://connect.family.co/v0/download/safe",website:"https://safe.global/",ios:"https://apps.apple.com/app/id1515759131",android:"https://play.google.com/store/apps/details?id=io.gnosis.safe"},getWalletConnectDeeplink:e=>Yi()?e:`https://gnosis-safe.io/wc?uri=${encodeURIComponent(e)}`},"xyz.talisman":{name:"Talisman",shortName:"Talisman",iconShape:"squircle",downloadUrls:{download:"https://talisman.xyz/download",website:"https://talisman.xyz",chrome:"https://chrome.google.com/webstore/detail/talisman-polkadot-wallet/fijngjgcjhjmmpcmkeiomlglpeiijkld",firefox:"https://addons.mozilla.org/en-US/firefox/addon/talisman-wallet-extension/"}},"com.trustwallet.app":{name:"Trust Wallet",shortName:"Trust",icon:g.jsx(Nt.Trust,{}),iconShouldShrink:!0,downloadUrls:{download:"https://connect.family.co/v0/download/trust",android:"https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",ios:"https://apps.apple.com/app/trust-crypto-bitcoin-wallet/id1288339409"},getWalletConnectDeeplink(e){return Yi()?e:`https://link.trustwallet.com/wc?uri=${encodeURIComponent(e)}`}},infinityWallet:{name:"Infinity Wallet",icon:g.jsx(Nt.InfinityWallet,{}),downloadUrls:{download:"https://connect.family.co/v0/download/infinityWallet",website:"https://infinitywallet.io/download",chrome:"https://infinitywallet.io/download",firefox:"https://infinitywallet.io/download",brave:"https://infinitywallet.io/download",edge:"https://infinitywallet.io/download"}},imToken:{name:"imToken",icon:g.jsx(Nt.ImToken,{}),downloadUrls:{download:"https://connect.family.co/v0/download/imToken",android:"https://play.google.com/store/apps/details?id=im.token.app",ios:"https://itunes.apple.com/us/app/imtoken2/id1384798940"},getWalletConnectDeeplink:e=>`imtokenv2://wc?uri=${encodeURIComponent(e)}`},unstoppable:{name:"Unstoppable",icon:g.jsx(Nt.Unstoppable,{}),downloadUrls:{download:"https://connect.family.co/v0/download/unstoppable",ios:"https://apps.apple.com/app/bank-bitcoin-wallet/id1447619907",android:"https://play.google.com/store/apps/details?id=io.horizontalsystems.bankwallet"},getWalletConnectDeeplink:e=>Yi()?e:`https://unstoppable.money/wc?uri=${encodeURIComponent(e)}`},onto:{name:"ONTO",icon:g.jsx(Nt.ONTO,{}),downloadUrls:{download:"https://connect.family.co/v0/download/onto",ios:"https://apps.apple.com/app/onto-an-ontology-dapp/id1436009823",android:"https://play.google.com/store/apps/details?id=com.github.ontio.onto",website:"https://onto.app/en/download/"},getWalletConnectDeeplink:e=>Yi()?e:`https://onto.app/wc?uri=${encodeURIComponent(e)}`},steak:{name:"Steak",icon:g.jsx(Nt.Steak,{}),downloadUrls:{download:"https://connect.family.co/v0/download/steak",android:"https://play.google.com/store/apps/details?id=fi.steakwallet.app",ios:"https://apps.apple.com/app/steakwallet/id1569375204",website:"https://steakwallet.fi/download"},getWalletConnectDeeplink:e=>Yi()?e:`https://links.steakwallet.fi/wc?uri=${encodeURIComponent(e)}`},ledger:{name:"Ledger Live",shortName:"Ledger",icon:g.jsx(Nt.Ledger,{}),downloadUrls:{download:"https://connect.family.co/v0/download/ledger",website:"https://www.ledger.com/ledger-live/download#download-device-2",android:"https://play.google.com/store/apps/details?id=com.ledger.live",ios:"https://apps.apple.com/app/ledger-live-web3-wallet/id1361671700"},getWalletConnectDeeplink:e=>Yi()?e:`ledgerlive://wc?uri=${encodeURIComponent(e)}`,shouldDeeplinkDesktop:!0},zerion:{name:"Zerion",icon:g.jsx(Nt.Zerion,{}),downloadUrls:{download:"https://connect.family.co/v0/download/zerion",ios:"https://apps.apple.com/app/apple-store/id1456732565",android:"https://play.google.com/store/apps/details?id=io.zerion.android",website:"https://zerion.io/"},getWalletConnectDeeplink:e=>Yi()?e:`https://app.zerion.io/wc?uri=${encodeURIComponent(e)}`},slope:{name:"Slope",icon:g.jsx(Nt.Slope,{}),downloadUrls:{download:"https://connect.family.co/v0/download/slope",ios:"https://apps.apple.com/app/slope-wallet/id1574624530",android:"https://play.google.com/store/apps/details?id=com.wd.wallet",chrome:"https://chrome.google.com/webstore/detail/slope-wallet/pocmplpaccanhmnllbbkpgfliimjljgo",website:"https://slope.finance/"},getWalletConnectDeeplink:e=>Yi()?e:`https://slope.finance/app/wc?uri=${encodeURIComponent(e)}`},tokenPocket:{name:"TokenPocket Wallet",icon:g.jsx(Nt.TokenPocket,{}),downloadUrls:{website:"https://www.tokenpocket.pro/en/download/app",download:"https://www.tokenpocket.pro/en/download/app",android:"https://play.google.com/store/apps/details?id=vip.mytokenpocket",ios:"https://apps.apple.com/us/app/tp-global-wallet/id6444625622",chrome:"https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii"}},talisman:{name:"Talisman",icon:g.jsx(Nt.Talisman,{}),downloadUrls:{download:"https://talisman.xyz/download",website:"https://talisman.xyz",chrome:"https://chrome.google.com/webstore/detail/talisman-polkadot-wallet/fijngjgcjhjmmpcmkeiomlglpeiijkld",firefox:"https://addons.mozilla.org/en-US/firefox/addon/talisman-wallet-extension/"}},walletConnect:{name:"Other Wallets",shortName:"Other",icon:g.jsx(Nt.WalletConnect,{background:!0}),iconConnector:g.jsx(Nt.OtherWallets,{}),iconShape:"square",getWalletConnectDeeplink:e=>e}};Object.keys(Mu).reduce((e,t)=>{var n,r,i,o,s,a;const c=Mu[t];if(!(c!=null&&c.getWalletConnectDeeplink))return e;const u=t.split(",")[0].trim(),l=(r=(n=c.name)===null||n===void 0?void 0:n.replace("Wallet","").replace(" ",""))!==null&&r!==void 0?r:u[0].toUpperCase()+u.slice(1),d=t5({target:{id:u,name:(o=(i=c.name)!==null&&i!==void 0?i:c.shortName)!==null&&o!==void 0?o:t,provider:h=>{var p;return(p=h==null?void 0:h.ethereum)===null||p===void 0?void 0:p[`is${l}`]}}}),f=((a=(s=c.name)!==null&&s!==void 0?s:c.shortName)!==null&&a!==void 0?a:t).toLowerCase().replace(/(?:^|\s)\S/g,h=>h.toUpperCase()).replace(/\s/g,"").replace(/(?:^|\s)\S/g,h=>h.toLowerCase());return e[f]=d,e},{});const RH={font:{family:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji'"},text:{primary:{color:"#373737"},secondary:{color:"#999999",hover:{color:"#111111"}},error:"#FC6464",valid:"#32D74B"},buttons:{primary:{borderRadius:16,color:"#000373737000",background:"#FFFFFF",border:"#F0F0F0",hover:{color:"#000000",border:"#1A88F8"}},secondary:{borderRadius:16,background:"#F6F7F9",color:"#000000"}},navigation:{color:"#999999"},modal:{background:"#ffffff",divider:"#f7f6f8"},tooltips:{color:"#999999",background:"#ffffff",hover:{background:"#f6f7f9"}},overlay:{background:"rgba(0, 0, 0, 0.06)"},qrCode:{accentColor:"#F7F6F8"}},NH=e=>e,QDe=()=>typeof window>"u"?!1:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;QDe();const YDe={connectKit:{options:{iconStyle:"light"},theme:{preferred:"dark",light:NH(RH),dark:NH(RH)}}};var Ee=typeof k3.div=="function"?k3:k3.default;const qDe=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t==null)return e;const n={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};return`color(display-p3 ${n.r/255} ${n.g/255} ${n.b/255})`};var ZDe={light:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"#F6F7F9","--ck-connectbutton-background-secondary":"#FFFFFF","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"#F0F2F5","--ck-connectbutton-active-color":"#373737","--ck-connectbutton-active-background":"#EAECF1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#F6F7F9","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#F0F2F5","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#F6F7F9","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-color":"#373737","--ck-primary-button-hover-background":"#F0F2F5","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#F6F7F9","--ck-tertiary-button-background":"#FFFFFF","--ck-secondary-button-hover-background":"#e0e4eb","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(71, 88, 107, 0.24)","--ck-body-color":"#373737","--ck-body-color-muted":"#999999","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F3F4F7","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-divider-secondary":"rgba(0, 0, 0, 0.06)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-siwe-border":"#F0F0F0","--ck-body-disclaimer-color":"#AAAAAB","--ck-body-disclaimer-link-color":"#838485","--ck-body-disclaimer-link-hover-color":"#000000","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0,0,0,0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#f7f6f8","--ck-focus-color":"#1A88F8","--ck-spinner-color":"var(--ck-focus-color)","--ck-copytoclipboard-stroke":"#CCCCCC"},dark:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#383838","--ck-connectbutton-background-secondary":"#282828","--ck-connectbutton-hover-background":"#404040","--ck-connectbutton-active-background":"#4D4D4D","--ck-connectbutton-balance-color":"#fff","--ck-connectbutton-balance-background":"#282828","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#383838","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#404040","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"#383838","--ck-primary-button-border-radius":"16px","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-background":"#404040","--ck-primary-button-active-border-radius":"16px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#333333","--ck-secondary-button-hover-background":"#4D4D4D","--ck-tertiary-button-background":"#424242","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-body-color":"#ffffff","--ck-body-color-muted":"rgba(255, 255, 255, 0.4)","--ck-body-color-muted-hover":"rgba(255, 255, 255, 0.8)","--ck-body-background":"#2B2B2B","--ck-body-background-transparent":"rgba(0,0,0,0)","--ck-body-background-secondary":"#333333","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#ffffff","--ck-body-background-tertiary":"#333333","--ck-body-action-color":"#808080","--ck-body-divider":"#383838","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-color":"#858585","--ck-body-disclaimer-link-color":"#ADADAD","--ck-body-disclaimer-link-hover-color":"#FFFFFF","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-background":"#2B2B2B","--ck-tooltip-background-secondary":"#333333","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#6C7381","--ck-spinner-color":"var(--ck-focus-color)","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"#3d3d3d"}},JDe={"--ck-font-family":"Lato","--ck-border-radius":"0px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-box-shadow":" 0 0 0 1px #003C74, 2px 2px 0px rgba(255, 255, 255, 0.75), -2px -2px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-connectbutton-border-radius":"4.5px","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 0% / 200% 200%, #F5F5F1","--ck-connectbutton-active-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"0 0 0 1px #E4E7E7","--ck-connectbutton-balance-hover-box-shadow":"0 0 0 1px #d7dbdb","--ck-connectbutton-balance-active-box-shadow":"0 0 0 1px #bbc0c0","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0, 127, 128, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"#808080","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#F0EDE2","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary-hover-background":"#FAFAFA","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-action-color":"#373737","--ck-body-color-danger":"#FC6464","--ck-body-color-valid":"#32D74B","--ck-body-divider":"#919B9C","--ck-body-divider-box-shadow":"0px 1px 0px #FBFBF8","--ck-primary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-primary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-border-radius":"6px","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 5px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-hover-border-radius":"6px","--ck-modal-heading-font-weight":400,"--ck-modal-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 0px 2px 0px #044FD1, + inset 4px 0px 0px #4283EB, + inset 0px 4px 0px #4283EB + `,"--ck-modal-h1-font-weight":400,"--ck-secondary-button-color":"#373737","--ck-secondary-button-border-radius":"6px","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-secondary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 4px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-body-background-secondary":"rgba(0, 0, 0, 0.1)","--ck-body-background-tertiary":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-body-button-text-align":"left","--ck-body-button-box-shadow":"0 2px 4px rgba(0, 0, 0, 0.05 )","--ck-body-disclaimer-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-body-disclaimer-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 4px 0px 0px #4283EB, + inset 0 1px 0 0 #919B9C`,"--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-color":"#959594","--ck-body-disclaimer-link-color":"#626262","--ck-body-disclaimer-link-hover-color":"#000000","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#919B9C","--ck-qr-border-radius":"0","--ck-qr-background":"#FFFFFF","--ck-copytoclipboard-stroke":"rgba(55, 55, 55, 0.4)","--ck-tooltip-background":"linear-gradient(270deg, #F7F3E6 7.69%, #F5F7DA 100%)","--ck-tooltip-background-secondary":"#f6f7f9","--ck-tooltip-color":"#000000","--ck-tooltip-shadow":" 0 0 0 1.5px #2b2622, 0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px #A0A0A0, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-dropdown-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-button-hover-background":"linear-gradient(0deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-pending-color":"#ACA899","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"#ACA899","--ck-dropdown-active-background":"#3F69BF","--ck-dropdown-active-border-radius":"0","--ck-dropdown-active-inset":"-12px","--ck-dropdown-color":"#ACA899","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"inset 0 0 0 1px #ACA899, 2px 2px 7px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"#ACA899","--ck-alert-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-alert-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-alert-border-radius":"0","--ck-recent-badge-border-radius":"32px","--ck-recent-badge-top-offset":"0px","--ck-graphic-primary-color":"#333333","--ck-graphic-primary-background":"#FFFFFF","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#919B9C"},XDe={"--ck-font-family":'"SF Pro Rounded",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"8px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-hover-background":"#F3EDE8","--ck-connectbutton-active-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-color":"#000000","--ck-connectbutton-balance-background":"#F3EDE8","--ck-connectbutton-balance-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-hover-background":"#eee5dd","--ck-connectbutton-balance-connectbutton-box-shadow":"-4px 8px 0px -4px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-connectbutton-border-radius":"0px 8px 8px 0","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #000000, -4px 4px 0 0 #000000","--ck-primary-button-border-radius":"8px","--ck-primary-button-hover-background":"#F3EDE8","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #000000, -0px 0px 0 0 #000000","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-secondary-button-hover-background":"#F3EDE8","--ck-secondary-button-hover-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-focus-color":"#3B99FC","--ck-overlay-background":"rgba(133, 120, 122, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"rgba(0, 0, 0, 0.5)","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#EBE1D8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"rgba(0,0,0,0.1)","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#373737","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"8px","--ck-tertiary-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-body-action-color":"#373737","--ck-body-divider":"#373737","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-background":"#E3D6C9","--ck-body-disclaimer-box-shadow":"-4px 4px 0 0 #000000, inset 2px 0 0 0 #000000, inset -2px 0 0 0 #000000, inset 0 -2px 0 0 #000000","--ck-body-disclaimer-font-weight":"500","--ck-body-disclaimer-color":"#888079","--ck-body-disclaimer-link-color":"#5B5650","--ck-body-disclaimer-link-hover-color":"#000000","--ck-modal-box-shadow":"-10px 10px 0px #000000, inset 0 0 0 2px #000000","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-border-radius":"8px","--ck-tooltip-color":"#373737","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#EBE1D8","--ck-tooltip-shadow":"-6px 6px 0 0 #000000, 0 0 0 2px #000000","--ck-spinner-color":"#1A88F8","--ck-dropdown-button-color":"#000","--ck-dropdown-button-box-shadow":"-2px 2px 0 2px #000000, 0 0 0 2px #000000","--ck-dropdown-button-background":"#ffffff","--ck-dropdown-button-hover-background":"#F3EDE8","--ck-dropdown-button-hover-box-shadow":"-2px 2px 0 0 #000000, 0 0 0 2px #000000","--ck-dropdown-pending-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-background":"#3B99FC","--ck-dropdown-active-box-shadow":"inset 0 0 0 2px #000000","--ck-dropdown-active-border-radius":"8px","--ck-dropdown-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-dropdown-border-radius":"8px","--ck-alert-color":"rgba(0, 0, 0, 0.5)","--ck-alert-background":" #F5F5F5","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"8px","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#000000","--ck-qr-background":"#ffffff","--ck-recent-badge-border-radius":"32px","--ck-recent-badge-box-shadow":"inset 0 0 0 2px currentColor","--ck-graphic-primary-color":"#000000","--ck-graphic-primary-background":"#ffffff","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#8E8985"},eje={"--ck-border-radius":"12px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"12px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F6F7F9","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"12px","--ck-primary-button-color":"#414451","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F6F7F9","--ck-primary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"12px","--ck-secondary-button-color":"#414451","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F6F7F9","--ck-secondary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#414451","--ck-body-color-muted":"#9196A1","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F6F8FA","--ck-tertiary-border-radius":"13px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-dropdown-color":"rgba(55, 55, 55, 0.4)","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#2E3138","--ck-qr-border-color":"#E9EAEC","--ck-siwe-border":"#EAEBED"},tje={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"10px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#313235","--ck-connectbutton-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-connectbutton-hover-background":"#414144","--ck-connectbutton-active-background":"#4C4D4F","--ck-connectbutton-balance-color":"#ffffff","--ck-connectbutton-balance-background":"#1F2023","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #313235","--ck-connectbutton-balance-hover-background":"#313235","--ck-connectbutton-balance-active-background":"#414144","--ck-primary-button-border-radius":"8px","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"rgba(255, 255, 255, 0.08)","--ck-primary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-primary-button-hover-background":"rgba(255, 255, 255, 0.2)","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#363638","--ck-secondary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-secondary-button-hover-background":"#3c3c3e","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-modal-box-shadow":"inset 0 0 0 1px #38393C, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-body-color":"#ffffff","--ck-body-color-muted":"#8B8F97","--ck-body-color-muted-hover":"#ffffff","--ck-body-background":"#1F2023","--ck-body-background-transparent":"rgba(31, 32, 35, 0)","--ck-body-background-secondary":"#313235","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"rgba(255, 255, 255, 0.02)","--ck-body-background-tertiary":"#313235","--ck-tertiary-border-radius":"12px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-body-action-color":"#8B8F97","--ck-body-divider":"rgba(255,255,255,0.1)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#2B2D31","--ck-body-disclaimer-box-shadow":"none","--ck-body-disclaimer-color":"#808183","--ck-body-disclaimer-link-color":"#AAABAD","--ck-body-disclaimer-link-hover-color":"#ffffff","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#1F2023","--ck-tooltip-background-secondary":"#1F2023","--ck-tooltip-color":"#ffffff","--ck-tooltip-shadow":" 0 0 0 1px rgba(255, 255, 255, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#6C7381","--ck-dropdown-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-dropdown-button-background":"#313235","--ck-dropdown-pending-color":"#8B8F97","--ck-dropdown-active-color":"#FFF","--ck-dropdown-active-static-color":"#FFF","--ck-dropdown-active-background":"rgba(255, 255, 255, 0.07)","--ck-dropdown-color":"#8B8F97","--ck-dropdown-background":"#313235","--ck-dropdown-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.03)","--ck-dropdown-border-radius":"8px","--ck-alert-color":"#8B8F97","--ck-alert-background":"#404145","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"rgba(255,255,255,0.1)","--ck-recent-badge-border-radius":"32px"},nje={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"0px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"0px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-connectbutton-hover-color":"#111","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #111","--ck-connectbutton-balance-color":"#111111","--ck-connectbutton-balance-background":"#F7F7F7","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #F7F7F7","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px #111","--ck-primary-button-border-radius":"0px","--ck-primary-button-color":"#111111","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-secondary-button-border-radius":"0px","--ck-secondary-button-color":"#111111","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#111111","--ck-body-color-muted":"#A0A0A0","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#A0A0A0","--ck-body-divider":"#EBEBEB","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#FAFAFA","--ck-body-disclaimer-box-shadow":"inset 0 1px 0 0 #ECECEC","--ck-body-disclaimer-color":"#9D9D9D","--ck-body-disclaimer-link-color":"#6E6E6E","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-border-radius":"0px","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-active-border-radius":"0","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"rgba(17, 17, 17, 0.4)","--ck-alert-background":"#fff","--ck-alert-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-alert-border-radius":"0","--ck-qr-border-radius":"0px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#EBEBEB","--ck-modal-h1-font-weight":"400","--ck-modal-heading-font-weight":"400","--ck-primary-button-font-weight":"400","--ck-recent-badge-top-offset":"0px","--ck-siwe-border":"#EBEBEB"},rje={"--ck-font-family":'"Nunito",ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"14px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 2px #DFE4EC, 0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F9FAFB","--ck-connectbutton-balance-color":"#414451","--ck-connectbutton-balance-background":"#F9FAFB","--ck-connectbutton-balance-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-hover-background":"#F5F7F9","--ck-connectbutton-balance-hover-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-active-box-shadow":"0 0 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-active-background":"#F5F7F9","--ck-connectbutton-active-box-shadow":"inset 0 0 0 2px #CFD7E2, 0 0px 0 0 #CFD7E2, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-border-radius":"18px","--ck-primary-button-color":"#000000","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F5F7F9","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#000000","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F5F7F9","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#000000","--ck-body-color-muted":"#93989F","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"22px","--ck-tertiary-box-shadow":"inset 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-body-action-color":"#93989F","--ck-body-divider":"#DFE4EC","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFB","--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-font-weight":"700","--ck-body-disclaimer-color":"#959697","--ck-body-disclaimer-link-color":"#646464","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":" 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 2px #DFE4EC, 0 2px 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-dropdown-pending-color":"#848D9A","--ck-dropdown-active-color":"#000000","--ck-dropdown-active-static-color":"#848D9A","--ck-dropdown-active-background":"#F5F7F9","--ck-dropdown-color":"#848D9A","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"16px","--ck-alert-color":"#848D9A","--ck-alert-background":"#F5F7F9","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#DFE4EC","--ck-modal-h1-font-weight":"700","--ck-modal-heading-font-weight":"700","--ck-primary-button-font-weight":"700","--ck-recent-badge-box-shadow":"inset 0 0 0 2px currentColor","--ck-recent-badge-top-offset":"0px","--ck-siwe-border":"#DFE4EC"},ije={"--ck-font-family":'"PT Root UI",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"16px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"10px","--ck-connectbutton-color":"#151C3B","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #D6D8E1","--ck-connectbutton-hover-background":"#E9EBF3","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-active-background":"#D4D8E8","--ck-connectbutton-active-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#151C3B","--ck-primary-button-background":"#ffffff","--ck-primary-button-font-weight":"700","--ck-primary-button-hover-background":"#DEE1ED","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#151C3B","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-font-weight":"700","--ck-secondary-button-hover-background":"#DEE1ED","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(213, 215, 225, 0.8)","--ck-overlay-backdrop-filter":"blur(6px)","--ck-body-color":"#151C3B","--ck-body-color-muted":"#757A8E","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#F4F4F8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#E9E9F1","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-tertiary":"#E9E9F1","--ck-tertiary-border-radius":"24px","--ck-body-action-color":"#79809C","--ck-body-divider":"#D9DBE3","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#79809C","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#DEE1ED","--ck-dropdown-button-hover-box-shadow":"0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-color":"#757A8E","--ck-dropdown-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#000000","--ck-qr-background":"#ffffff","--ck-recent-badge-color":"#79809C","--ck-recent-badge-background":"#F4F4F8","--ck-recent-badge-box-shadow":"none","--ck-siwe-border":"#DFE4EC","--ck-graphic-primary-background":"#fff","--ck-graphic-compass-background":"#fff","--ck-graphic-primary-box-shadow":"0px 2.94737px 14.7368px rgba(0, 0, 0, 0.1)","--ck-graphic-compass-box-shadow":"0px 2px 9px rgba(0, 0, 0, 0.15)"},Xc={base:ZDe,web95:JDe,retro:XDe,soft:eje,midnight:tje,minimal:nje,rounded:rje,nouns:ije};const Mp={default:{"--ck-font-family":`-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, + 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', + 'Segoe UI Symbol'`,"--ck-border-radius":"20px","--ck-secondary-button-border-radius":"16px"},graphics:{light:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#4E4E4E","--ck-graphic-scaniconwithlogos-02":"#272727","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#F6F7F9","--ck-chain-ethereum-01":"#25292E","--ck-chain-ethereum-02":"#fff","--ck-chain-ethereum-03":"#DFE0E0"},dark:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#AFAFAF","--ck-graphic-scaniconwithlogos-02":"#696969","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#3D3D3D"}},ens:{light:{"--ck-ens-01-start":"#FF3B30","--ck-ens-01-stop":"#FF9500","--ck-ens-02-start":"#FF9500","--ck-ens-02-stop":"#FFCC00","--ck-ens-03-start":"#FFCC00","--ck-ens-03-stop":"#34C759","--ck-ens-04-start":"#5856D6","--ck-ens-04-stop":"#AF52DE","--ck-ens-05-start":"#5AC8FA","--ck-ens-05-stop":"#007AFF","--ck-ens-06-start":"#007AFF","--ck-ens-06-stop":"#5856D6","--ck-ens-07-start":"#5856D6","--ck-ens-07-stop":"#AF52DE","--ck-ens-08-start":"#AF52DE","--ck-ens-08-stop":"#FF2D55"},dark:{"--ck-ens-01-start":"#FF453A","--ck-ens-01-stop":"#FF9F0A","--ck-ens-02-start":"#FF9F0A","--ck-ens-02-stop":"#FFD60A","--ck-ens-03-start":"#FFD60A","--ck-ens-03-stop":"#32D74B","--ck-ens-04-start":"#32D74B","--ck-ens-04-stop":"#64D2FF","--ck-ens-05-start":"#64D2FF","--ck-ens-05-stop":"#0A84FF","--ck-ens-06-start":"#0A84FF","--ck-ens-06-stop":"#5E5CE6","--ck-ens-07-start":"#5E5CE6","--ck-ens-07-stop":"#BF5AF2","--ck-ens-08-start":"#BF5AF2","--ck-ens-08-stop":"#FF2D55"}},brand:{"--ck-family-brand":"#1A88F8","--ck-brand-walletConnect":"#3B99FC","--ck-brand-coinbaseWallet":"#0052FF","--ck-brand-metamask":"#f6851b","--ck-brand-metamask-01":"#F6851B","--ck-brand-metamask-02":"#E2761B","--ck-brand-metamask-03":"#CD6116","--ck-brand-metamask-04":"#161616","--ck-brand-metamask-05":"#763D16","--ck-brand-metamask-06":"#D7C1B3","--ck-brand-metamask-07":"#C0AD9E","--ck-brand-metamask-08":"#E4761B","--ck-brand-metamask-09":"#233447","--ck-brand-metamask-10":"#E4751F","--ck-brand-metamask-11":"#FEF5E7","--ck-brand-metamask-12":"#E3C8AB","--ck-brand-trust-01":"#3375BB","--ck-brand-trust-02":"#ffffff","--ck-brand-trust-01b":"#ffffff","--ck-brand-trust-02b":"#3375BB","--ck-brand-argent":"#f36a3d","--ck-brand-imtoken-01":"#11C4D1","--ck-brand-imtoken-02":"#0062AD","--ck-brand-safe":"#12FF80","--ck-brand-dawn":"#000000"}},eu={light:Xc.base.light,dark:Xc.base.dark,web95:Xc.web95,retro:Xc.retro,soft:Xc.soft,midnight:Xc.midnight,minimal:Xc.minimal,rounded:Xc.rounded,nouns:Xc.nouns},Dp=(e,t)=>yt` + ${Object.keys(e).map(n=>{const r=e[n];return r&&`${n}:${r};`})} + `,nc=(e,t)=>{const n=t?" !important":"";return yt` + ${Object.keys(e).map(r=>{const i=e[r];return i&&`${r}:${i}${n};`})} + @supports (color: color(display-p3 1 1 1)) { + ${Object.keys(e).map(r=>{const i=e[r];return`${r}:${qDe(i)}${n};`})} + } + `},cs={default:Dp(Mp.default),light:nc(eu.light),dark:nc(eu.dark),web95:nc(eu.web95),retro:nc(eu.retro),soft:nc(eu.soft),midnight:nc(eu.midnight),minimal:nc(eu.minimal),rounded:nc(eu.rounded),nouns:nc(eu.nouns)},G1={brand:Dp(Mp.brand),ensLight:Dp(Mp.ens.light),ensDark:Dp(Mp.ens.dark),graphicsLight:Dp(Mp.graphics.light),graphicsDark:Dp(Mp.graphics.dark)},OH=yt` + ${G1.brand} + ${G1.ensLight} + ${G1.graphicsLight} +`,LH=yt` + ${G1.brand} + ${G1.ensDark} + ${G1.graphicsDark} +`;let Za="auto";const s4=Ee(Se.div)` + ${cs.default} + + ${e=>{switch(e.$useTheme){case"web95":return Za="light",cs.web95;case"retro":return Za="light",cs.retro;case"soft":return Za="light",cs.soft;case"midnight":return Za="dark",cs.midnight;case"minimal":return Za="light",cs.minimal;case"rounded":return Za="light",cs.rounded;case"nouns":return Za="light",cs.nouns;default:return e.$useMode==="light"?(Za="light",cs.light):e.$useMode==="dark"?(Za="dark",cs.dark):yt` + @media (prefers-color-scheme: light) { + ${cs.light} + } + @media (prefers-color-scheme: dark) { + ${cs.dark} + } + `}}} + + ${e=>{switch(Za){case"light":return OH;case"dark":return LH;default:return yt` + ${OH} + @media (prefers-color-scheme: dark) { + ${LH} + } + `}}} + + + ${e=>{var t;if(e.$customTheme&&e.$customTheme["--ck-accent-color"]&&["light","dark","auto","",void 0].includes(e.$useTheme)){const n=e.$customTheme["--ck-accent-color"],r=(t=e.$customTheme["--ck-accent-text-color"])!==null&&t!==void 0?t:"#ffffff";return{"--ck-accent-color":n,"--ck-accent-text-color":r,"--ck-secondary-button-background":n,"--ck-secondary-button-hover-background":n,"--ck-secondary-button-color":r,"--ck-button-primary-color":r,"--ck-focus-color":n}}if(e.$customTheme)return nc(e.$customTheme,!0)}} + + all: initial; + text-align: left; + text-direction: ltr; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + text-size-adjust: none; + font-size: 16px; + + button { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + } + + &, + * { + font-family: var(--ck-font-family); + box-sizing: border-box; + outline: none; + border: none; + } + /* + @media (prefers-reduced-motion) { + * { + animation-duration: 60ms !important; + transition-duration: 60ms !important; + } + } + */ + img, + svg { + max-width: 100%; + } + strong { + font-weight: 600; + } + a:focus-visible, + button:focus-visible { + outline: 2px solid var(--ck-focus-color); + } +`,kB=e=>{e={selector:"__CONNECTKIT__",...e};const{selector:t,children:n}=e,r=j.useRef(null),[i,o]=j.useState(!1);return j.useEffect(()=>{const s="#"+t.replace(/^#/,"");if(r.current=document.querySelector(s),!r.current){const a=document.createElement("div");a.setAttribute("id",t),a.setAttribute("data-connectkit",`${a$e}`),document.body.appendChild(a),r.current=a}o(!0)},[t]),r.current&&i?Zm.createPortal(n,r.current):null};var Ft={mobileWidth:560};const oje=Ee(Se.div)` + z-index: -1; + pointer-events: auto; + position: absolute; + left: 50%; + transform: translateX(-50%); + width: var(--width); + top: 64px; + color: #fff; + font-size: 14px; + line-height: 20px; + font-weight: 500; + background: var(--ck-body-color-danger); + border-radius: 20px; + padding: 24px 46px 82px 24px; + transition: width var(--duration) var(--ease); + a { + font-weight: 700; + text-decoration: underline; + } + code { + font-size: 0.9em; + display: inline-block; + font-family: monospace; + margin: 1px; + padding: 0 4px; + border-radius: 8px; + font-weight: bold; + background: rgba(255, 255, 255, 0.1); + } +`,AI=dn` +from { opacity: 0; } + to { opacity: 1; } +`,sje=dn` +from { opacity: 0; transform: scale(0.85); } + to { opacity: 1; transform: scale(1); } +`,aje=dn` +from { opacity: 0; transform: scale(1.1); } + to { opacity: 1; transform: scale(1); } +`,SI=dn` +from { opacity: 1; } + to { opacity: 0; } +`,cje=dn` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(1.1); } +`,uje=dn` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(0.85); } +`,Go=Ee(Se.div)` + max-width: 100%; + width: 295px; + padding-top: 48px; +`,lje=Ee(Se.div)` + user-select: none; + position: relative; + display: block; + text-align: center; + color: var(--ck-body-color-muted); + font-size: 15px; + font-weight: 400; + line-height: 21px; + span { + z-index: 2; + position: relative; + display: inline-block; + user-select: none; + pointer-events: none; + padding: 0 14px; + background: var(--ck-body-background); + transition: background-color 200ms ease; + } + &:before { + z-index: 2; + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + height: 1px; + transform: translateY(-1px); + background: var(--ck-body-divider); + box-shadow: var(--ck-body-divider-box-shadow); + } +`,m9=Ee(Se.div)` + z-index: 3; + pointer-events: none; + user-select: none; + position: absolute; + top: 25px; + left: 50%; + display: flex; + align-items: center; + justify-content: center; + height: 26px; + transform: translateX(-50%); + width: var(--width); + text-align: center; + font-size: 17px; + line-height: 20px; + font-weight: var(--ck-modal-heading-font-weight, 600); + color: var(--ck-body-color); + span { + display: inline-block; + } +`,dje=Ee(Se.div)` + position: relative; + padding: 0; +`,yr=Ee(Se.div)` + left: 0; + right: 0; + text-align: center; + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + display: block; + } +`,Mo=Ee(Se.h1)` + margin: 0; + padding: 0; + line-height: ${e=>e.$small?20:22}px; + font-size: ${e=>e.$small?17:19}px; + font-weight: var(--ck-modal-h1-font-weight, 600); + color: ${e=>e.$error?"var(--ck-body-color-danger)":e.$valid?"var(--ck-body-color-valid)":"var(--ck-body-color)"}; + > svg { + position: relative; + top: -2px; + display: inline-block; + vertical-align: middle; + margin-right: 6px; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + margin-bottom: 6px; + font-size: 17px; + } +`,Cr=Ee.div` + font-size: 16px; + font-weight: 400; + line-height: 21px; + color: var(--ck-body-color-muted); + strong { + font-weight: 500; + color: var(--ck-body-color); + } +`;Ee.div` + padding: 0 12px; + font-size: 13px; + font-weight: 400; + line-height: 16px; + color: var(--ck-body-color-muted); + strong { + font-weight: 500; + color: var(--ck-body-color); + } +`;const fje=Ee(Se.div)` + z-index: 1; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: var(--ck-overlay-background, rgba(71, 88, 107, 0.24)); + backdrop-filter: ${e=>e.$blur?`blur(${e.$blur}px)`:"var(--ck-overlay-backdrop-filter, none)"}; + opacity: 0; + animation: ${e=>e.$active?AI:SI} 150ms ease-out + both; +`,hje=dn` + from{ opacity: 0; transform: scale(0.97); } + to{ opacity: 1; transform: scale(1); } +`,pje=dn` + from{ opacity: 1; transform: scale(1); } + to{ opacity: 0; transform: scale(0.97); } +`,gje=dn` + from { transform: translate3d(0, 100%, 0); } + to { transform: translate3d(0, 0%, 0); } +`,mje=dn` + from { opacity: 1; } + to { opacity: 0; } +`,Gse=Ee(Se.div)` + z-index: 2; + position: relative; + color: var(--ck-body-color); + + animation: 150ms ease both; + animation-name: ${pje}; + &.active { + animation-name: ${hje}; + } + + &:before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + width: var(--width); + height: var(--height); + transform: translateX(-50%); + backface-visibility: hidden; + transition: all 200ms ease; + border-radius: var(--ck-border-radius, 20px); + background: var(--ck-body-background); + box-shadow: var(--ck-modal-box-shadow); + } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + animation-name: ${mje}; + animation-duration: 130ms; + animation-timing-function: ease; + + &.active { + animation-name: ${gje}; + animation-duration: 300ms; + animation-delay: 32ms; + animation-timing-function: cubic-bezier(0.15, 1.15, 0.6, 1); + } + + &:before { + width: 100%; + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + will-change: height; + } + } +`,Kse=Ee(Se.div)` + z-index: 3; + position: absolute; + top: 0; + left: 50%; + height: 64px; + transform: translateX(-50%); + backface-visibility: hidden; + width: var(--width); + transition: 0.2s ease width; + pointer-events: auto; + //border-bottom: 1px solid var(--ck-body-divider); +`,yje=Ee(Se.div)` + position: relative; + overflow: hidden; + height: var(--height); + transition: 0.2s ease height; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + /* animation-delay: 34ms; */ + } +`,Qse=Ee(Se.div)` + z-index: 2; + position: relative; + top: 0; + left: 50%; + margin-left: calc(var(--width) / -2); + width: var(--width); + /* left: 0; */ + /* width: 100%; */ + display: flex; + justify-content: center; + align-items: center; + transform-origin: center center; + animation: 200ms ease both; + + &.active { + animation-name: ${aje}; + } + &.active-scale-up { + animation-name: ${sje}; + } + &.exit-scale-down { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + animation-name: ${uje}; + } + &.exit { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + /* left: 50%; */ + /* transform: translateX(-50%); */ + animation-name: ${cje}; + animation-delay: 16.6667ms; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + /* animation: 0ms ease both; */ + /* animation-delay: 35ms; */ + animation: 0ms cubic-bezier(0.15, 1.15, 0.6, 1) both; + + &.active { + animation-name: ${AI}; + } + &.active-scale-up { + animation-name: ${AI}; + } + &.exit-scale-down { + z-index: 3; + animation-name: ${SI}; + } + &.exit { + z-index: 3; + animation-name: ${SI}; + animation-delay: 0ms; + } + } +`,Yse=Ee(Se.div)` + margin: 0 auto; + width: fit-content; + padding: 29px 24px 24px; + backface-visibility: hidden; +`,bje=Ee.div` + z-index: 2147483646; // z-index set one below max (2147483647) for if we wish to layer things ontop of the modal in a seperate Portal + position: fixed; + inset: 0; +`,kI=Ee(Se.button)` + z-index: 3; + cursor: pointer; + position: absolute; + top: 22px; + right: 17px; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + } + + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } +`,vje=Ee(Se.button)` + z-index: 3; + position: absolute; + inset: 0; + width: 100%; // FireFox fix + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + } + + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,TI=Ee(Se.button)` + z-index: 3; + position: absolute; + inset: 0; + width: 100%; // FireFox fix + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + left: -1px; + } + + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,_I=Ee(Se.button)` + z-index: 3; + position: absolute; + inset: 0; + width: 100%; // FireFox fix + transform: translateX(-1px); + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + } + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,xje=Ee(Se.div)` + --ease: cubic-bezier(0.25, 0.1, 0.25, 1); + --duration: 200ms; + --transition: height var(--duration) var(--ease), + width var(--duration) var(--ease); + z-index: 3; + display: block; + pointer-events: none; + position: absolute; + left: 50%; + top: 50%; + width: 100%; + transform: translate3d(-50%, -50%, 0); + backface-visibility: hidden; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + pointer-events: auto; + left: 0; + top: auto; + bottom: -5px; + transform: none; + ${Gse} { + max-width: 448px; + margin: 0 auto; + &:before { + width: 100%; + border-radius: var(--ck-border-radius, 30px) + var(--ck-border-radius, 30px) 0 0; + } + } + ${Qse} { + left: 0; + right: 0; + margin: 0 auto; + width: auto; + } + ${Go} { + margin: 0 auto; + width: 100% !important; + } + ${m9} { + top: 29px; + } + ${yr} { + gap: 12px; + } + ${Cr} { + margin: 0 auto; + max-width: 295px; + } + ${Yse} { + width: 100%; + padding: 31px 24px; + } + ${Kse} { + width: 100%; + top: 4px; + border-bottom: 0; + } + ${kI} { + right: 22px; + } + ${TI} { + top: -1px; + left: -3px; + } + ${_I} { + top: -1px; + left: -3px; + svg { + width: 65%; + height: auto; + } + } + ${kI}, + ${TI}, + ${_I} { + // Quick hack for bigger tappable area on mobile + transform: scale(1.4) !important; + background: transparent !important; + svg { + transform: scale(0.8) !important; + } + } + } +`,TB=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + margin: 16px -24px -24px -24px; + padding: 15px 40px 18px; + font-size: var(--ck-body-disclaimer-font-size, 13px); + font-weight: var(--ck-body-disclaimer-font-weight, 400); + text-align: center; + line-height: 19px; + color: var(--ck-body-disclaimer-color, var(--ck-body-color-muted, inherit)); + + & a { + color: var(--ck-body-disclaimer-link-color, inherit); + font-weight: var(--ck-body-disclaimer-font-weight, 400); + text-decoration: none; + transition: color 200ms ease; + &:hover { + color: var(--ck-body-disclaimer-link-hover-color, inherit); + } + } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + margin: 24px -24px -26px -24px; + padding: 20px 42px 22px 42px; + } +`,wje=Ee(Se.div)` + pointer-events: all; + z-index: 9; + position: absolute; + bottom: 0; + left: 50%; + width: var(--width); + backface-visibility: hidden; + transform: translateX(-50%); + transform-origin: bottom center; + + border-radius: var(--ck-border-radius, 30px); + border-top-left-radius: 0; + border-top-right-radius: 0; + transition: width 200ms ease; + + background: var( + --ck-body-disclaimer-background, + var(--ck-body-background-secondary) + ); + box-shadow: var(--ck-body-disclaimer-box-shadow); + + ${TB} { + margin: 0 !important; + /* visibility: hidden; */ + } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + border-radius: 0; + } +`,Eje=Ee(Se.div)` + z-index: 2; + position: absolute; + top: 100%; + white-space: nowrap; + padding: 8px 16px; + color: #fff; + font-size: 13px; + line-height: 1.5; + background: #1a88f8; + border-radius: calc(var(--ck-border-radius) * 0.75); + transform: translateY(8px) translateX(-48px); + box-shadow: var(--ck-modal-box-shadow); + &:before { + content: ''; + position: absolute; + box-shadow: var(--shadow); + width: 18px; + height: 18px; + transform: translate(215%, -75%) rotate(45deg); + background: inherit; + border-radius: 3px 0 0 0; + } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + transform: translateY(8px) translateX(-16px); + &:before { + transform: translate(40%, -75%) rotate(45deg); + } + } +`,Cje=typeof window<"u"?j.useLayoutEffect:j.useEffect;function qse(e){const[t,n]=j.useState(e),r=Cn();return Cje(()=>{var i;if(!t)return;const o={overflow:document.body.style.overflow,position:document.body.style.position,touchAction:document.body.style.touchAction,paddingRight:document.body.style.paddingRight},s=getComputedStyle(document.body),a=parseInt(s.marginRight)+parseInt(s.paddingRight)+parseInt(s.borderRight)+parseInt(s.marginLeft)+parseInt(s.paddingLeft)+parseInt(s.borderLeft),c=window.innerWidth-document.body.offsetWidth-a;return document.documentElement.style.setProperty("--ck-scrollbar-width",`${c}px`),document.body.style.overflow="hidden",document.body.style.position="relative",document.body.style.touchAction="none",!((i=r.options)===null||i===void 0)&&i.avoidLayoutShift&&(document.body.style.paddingRight=`${c}px`),()=>{var u;document.documentElement.style.removeProperty("--ck-scrollbar-width"),document.body.style.overflow=o.overflow,document.body.style.position=o.position,document.body.style.touchAction=o.touchAction,!((u=r.options)===null||u===void 0)&&u.avoidLayoutShift&&(document.body.style.paddingRight=o.paddingRight)}},[t]),j.useEffect(()=>{t!==e&&n(e)},[e]),[t,n]}const Aje=9;function Sje(){const e=j.useRef(null);function t(n){if(e.current){var r=e.current.querySelectorAll(` + a[href]:not(:disabled), + button:not(:disabled), + textarea:not(:disabled), + input[type="text"]:not(:disabled), + input[type="radio"]:not(:disabled), + input[type="checkbox"]:not(:disabled), + select:not(:disabled) + `),i=r[0],o=r[r.length-1],s=n.key==="Tab"||n.keyCode===Aje;s&&(n.shiftKey?document.activeElement===i&&(o.focus(),n.preventDefault()):document.activeElement===o&&(i.focus(),n.preventDefault()))}}return j.useEffect(()=>(e.current&&(e.current.addEventListener("keydown",t),e.current.focus({preventScroll:!0})),()=>{e.current&&e.current.removeEventListener("keydown",t)}),[]),e}function Zse(e){const t=Sje();return j.useEffect(()=>{t.current&&t.current.focus({preventScroll:!0})},[]),g.jsx("div",{ref:t,tabIndex:0,children:e.children})}function BH(e,t){const n=j.useRef({target:e,previous:t});return n.current.target!==e&&(n.current.previous=n.current.target,n.current.target=e),n.current.previous}const Jse=j.createContext(null),kje=({children:e,theme:t="auto",mode:n="auto",customTheme:r})=>{const i={theme:t,mode:n,customTheme:r};return j.createElement(Jse.Provider,{value:i},g.jsx(g.Fragment,{children:e}))},UE=()=>{const e=Gn.useContext(Jse);if(!e)throw Error("ConnectKitThemeProvider must be inside a Provider.");return e},Tje=({...e})=>g.jsxs("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 4C2.89543 4 2 4.89543 2 6V12C2 13.1046 2.89543 14 4 14H10C11.1046 14 12 13.1046 12 12V9.66667C12 9.11438 12.4477 8.66667 13 8.66667C13.5523 8.66667 14 9.11438 14 9.66667V12C14 14.2091 12.2091 16 10 16H4C1.79086 16 0 14.2091 0 12V6C0 3.79086 1.79086 2 4 2H6.33333C6.88562 2 7.33333 2.44772 7.33333 3C7.33333 3.55228 6.88562 4 6.33333 4H4Z",fill:"currentColor",fillOpacity:.3}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 1C9.5 0.447715 9.94772 0 10.5 0H15C15.5523 0 16 0.447715 16 1V5.5C16 6.05228 15.5523 6.5 15 6.5C14.4477 6.5 14 6.05228 14 5.5V3.41421L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289L12.5858 2H10.5C9.94772 2 9.5 1.55228 9.5 1Z",fill:"currentColor",fillOpacity:.3})]}),_je=({...e})=>g.jsxs("svg",{"aria-hidden":"true",width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z",fill:"currentColor"}),g.jsx("path",{d:"M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z",fill:"currentColor"})]}),_B=({...e})=>g.jsx("svg",{"aria-hidden":"true",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H6C6.55228 14 7 13.5523 7 13C7 12.4477 6.55228 12 6 12H4C2.89543 12 2 11.1046 2 10V4C2 2.89543 2.89543 2 4 2H6C6.55228 2 7 1.55228 7 1C7 0.447715 6.55228 0 6 0H4ZM11.7071 3.29289C11.3166 2.90237 10.6834 2.90237 10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L11.5858 6H9.5H6C5.44772 6 5 6.44772 5 7C5 7.55228 5.44772 8 6 8H9.5H11.5858L10.2929 9.29289C9.90237 9.68342 9.90237 10.3166 10.2929 10.7071C10.6834 11.0976 11.3166 11.0976 11.7071 10.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289L11.7071 3.29289Z",fill:"currentColor",fillOpacity:"0.4"})}),Xse=({...e})=>g.jsx("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.274 7.13324C13.6237 6.70579 13.5607 6.07577 13.1332 5.72604C12.7058 5.37632 12.0758 5.43932 11.726 5.86676L7.92576 10.5115L6.20711 8.79289C5.81658 8.40237 5.18342 8.40237 4.79289 8.79289C4.40237 9.18342 4.40237 9.81658 4.79289 10.2071L7.29289 12.7071C7.49267 12.9069 7.76764 13.0128 8.04981 12.9988C8.33199 12.9847 8.59505 12.8519 8.77396 12.6332L13.274 7.13324Z",fill:"currentColor"})}),Pje=({...e})=>g.jsx("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM24.5001 8.74263C25.0834 8.74263 25.5563 9.21551 25.5563 9.79883V14.5997C25.5563 15.183 25.0834 15.6559 24.5001 15.6559H19.6992C19.1159 15.6559 18.643 15.183 18.643 14.5997C18.643 14.0164 19.1159 13.5435 19.6992 13.5435H21.8378L20.071 11.8798C20.0632 11.8724 20.0555 11.865 20.048 11.8574C19.1061 10.915 17.8835 10.3042 16.5643 10.1171C15.2452 9.92999 13.9009 10.1767 12.7341 10.82C11.5674 11.4634 10.6413 12.4685 10.0955 13.684C9.54968 14.8994 9.41368 16.2593 9.70801 17.5588C10.0023 18.8583 10.711 20.0269 11.7273 20.8885C12.7436 21.7502 14.0124 22.2582 15.3425 22.336C16.6726 22.4138 17.9919 22.0572 19.1017 21.3199C19.5088 21.0495 19.8795 20.7333 20.2078 20.3793C20.6043 19.9515 21.2726 19.9262 21.7004 20.3228C22.1282 20.7194 22.1534 21.3876 21.7569 21.8154C21.3158 22.2912 20.8176 22.7161 20.2706 23.0795C18.7793 24.0702 17.0064 24.5493 15.2191 24.4448C13.4318 24.3402 11.7268 23.6576 10.3612 22.4998C8.9956 21.3419 8.0433 19.7716 7.6478 18.0254C7.2523 16.2793 7.43504 14.4519 8.16848 12.8186C8.90192 11.1854 10.1463 9.83471 11.7142 8.97021C13.282 8.10572 15.0884 7.77421 16.861 8.02565C18.6282 8.27631 20.2664 9.09278 21.5304 10.3525L23.4439 12.1544V9.79883C23.4439 9.21551 23.9168 8.74263 24.5001 8.74263Z",fill:"currentColor"})}),Ije=({...e})=>g.jsxs("svg",{"aria-hidden":"true",width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[g.jsx("path",{d:"M14.5 2V6H10.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M14 5.66537L10.9899 2.75871C10.0931 1.83853 8.92897 1.24216 7.6729 1.05947C6.41683 0.876774 5.13688 1.11765 4.02592 1.7458C2.91497 2.37395 2.0332 3.35534 1.5135 4.54208C0.993792 5.72883 0.864305 7.05663 1.14455 8.3254C1.42479 9.59418 2.09958 10.7352 3.06724 11.5765C4.03489 12.4178 5.24298 12.9138 6.50946 12.9898C7.77594 13.0657 9.03219 12.7176 10.0889 11.9977C10.4765 11.7337 10.8295 11.4249 11.142 11.0792",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Rje=({...e})=>g.jsxs("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[g.jsx("path",{d:"M14 9.5V7C14 5.89543 13.1046 5 12 5H7C5.89543 5 5 5.89543 5 7V12C5 13.1046 5.89543 14 7 14H9.5",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),g.jsx("rect",{x:"10",y:"10",width:"9",height:"9",rx:"2",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),g.jsx("path",{d:"M1 3L3 5L7 1",stroke:"var(--ck-body-color)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),Nje=({...e})=>g.jsx("div",{...e,style:{zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",bottom:0,right:0,background:"#34C759",borderRadius:10,boxShadow:"0 0 0 1.5px var(--background)",width:10,height:10,...e==null?void 0:e.style},children:g.jsx("svg",{"aria-hidden":"true",width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M0.75 3L2.25 4.5L5.25 1.5",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})});var gu;(function(e){e.READY="ready",e.LOADING="loading",e.SUCCESS="success",e.REJECTED="rejected",e.ERROR="error"})(gu||(gu={}));const eae=j.createContext(null),zE=({onSignIn:e,onSignOut:t}={})=>{const n=j.useContext(eae);if(!n)return{isSignedIn:!1,data:void 0,status:gu.ERROR,error:new Error("useSIWE hook must be inside a SIWEProvider."),isRejected:!1,isError:!0,isLoading:!1,isSuccess:!1,isReady:!1,reset:()=>{},signIn:()=>Promise.reject(),signOut:()=>Promise.reject()};const{session:r,nonce:i,status:o,signOut:s,signIn:a,resetStatus:c}=n,{address:u,chainId:l}=r.data||{},d=u?gu.SUCCESS:r.isLoading||i.isLoading?gu.LOADING:o,f=d===gu.LOADING,h=d===gu.SUCCESS,p=d===gu.REJECTED,m=d===gu.ERROR,x=!u||i.isFetching||f||h,y=()=>c(),b=!!u;return{isSignedIn:b,data:b?{address:u,chainId:l}:void 0,status:d,error:r.error||i.error,isRejected:p,isError:m,isLoading:f,isSuccess:h,isReady:x,signIn:async()=>{if(!b){const v=await a();v&&(e==null||e(v))}},signOut:async()=>{b&&(await s(),t==null||t())},reset:y}},Oje={connectWallet:"الاتصال بالمحفظة",disconnect:"قطع الاتصال",connected:"متصل",wrongNetwork:"شبكة خاطئة",switchNetworks:"تغيير الشبكات",chainNetwork:"شبكة {{ CHAIN }}",copyToClipboard:"نسخ إلى الحافظة",copyCode:"نسخ الكود",moreInformation:"مزيد من المعلومات",back:"عودة",close:"إغلاق",or:"أو",more:"المزيد",tryAgain:"حاول مجددًا",tryAgainQuestion:"هل نحاول مرة أخرى؟",dontHaveTheApp:"ليس لديك التطبيق؟",scanTheQRCode:"مسح رمز الاستجابة السريعة",useWalletConnectModal:"استخدم نموذج ولِيت‌كنيكت",useModal:"استخدم النموذج",installTheExtension:"تثبيت الإضافة",getWalletName:"الحصول على {{ CONNECTORNAME }}",otherWallets:"محافظ أخرى",learnMore:"تعرف على المزيد",getWallet:"الحصول على محفظة",approveInWallet:"الموافقة في المحفظة",confirmInWallet:"تأكيد في المحفظة",awaitingConfirmation:"بانتظار التأكيد",signIn:"تسجيل الدخول",signOut:"تسجيل الخروج",signedIn:"تم تسجيل الدخول",signedOut:"تم تسجيل الخروج",walletNotConnected:"المحفظة غير متصلة",warnings_walletSwitchingUnsupported:"عذرًا، لا تدعم محفظتك تغيير الشبكات من هذا التطبيق.",warnings_walletSwitchingUnsupportedResolve:"حاول تغيير الشبكات من داخل محفظتك بدلاً من ذلك.",warnings_chainUnsupported:"هذا التطبيق غير متوافق مع الشبكة المتصلة حاليًا.",warnings_chainUnsupportedResolve:"للمتابعة، قم بتغيير الشبكة أو قطع الاتصال.",onboardingScreen_heading:"الحصول على محفظة",onboardingScreen_h1:"ابدأ استكشاف الويب3",onboardingScreen_p:"تعتبر محفظتك بوابتك إلى عوالم إيثريوم، التكنولوجيا السحرية التي تمكن استكشاف الويب3.",onboardingScreen_ctaText:"اختر محفظتك الأولى",onboardingScreen_ctaUrl:"https://ethereum.org/ar/wallets/find-wallet/",aboutScreen_heading:"حول المحافظ",aboutScreen_a_h1:"حافظ على أصولك الرقمية",aboutScreen_a_p:"تمكنك المحافظ من إرسال واستقبال وتخزين والتفاعل مع الأصول الرقمية مثل NFTs ورموز إيثريوم الأخرى.",aboutScreen_b_h1:"وسيلة أفضل لتسجيل الدخول",aboutScreen_b_p:"في تطبيقات العصر الحديث، يمكن استخدام محفظتك كوسيلة سهلة لتسجيل الدخول بدلاً من الحاجة إلى تذكر كلمة مرور.",aboutScreen_c_h1:"استكشاف عالم الويب3",aboutScreen_c_p:"تعتبر محفظتك أداة أساسية تمكنك من استكشاف والمشاركة في عالم الويب3 الذي يتطور بسرعة.",aboutScreen_ctaText:"استزيد من المعرفة",aboutScreen_ctaUrl:"https://ethereum.org/ar/wallets/",connectorsScreen_heading:"الاتصال بالمحفظة",connectorsScreen_newcomer:"ليس لدي محفظة",connectorsScreen_h1:"ما هي المحافظ؟",connectorsScreen_p:"تُستخدم المحافظ لإرسال واستقبال وتخزين الأصول الرقمية. يمكنك الاتصال بمحفظة للتفاعل مع التطبيقات.",mobileConnectorsScreen_heading:"اختر محفظة",scanScreen_heading:"مسح باستخدام الهاتف",scanScreen_heading_withConnector:"مسح باستخدام {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:`افتح محفظة تدعم ولِيت‌كنيكت + لبدء المسح.`,scanScreen_tooltip_default:"افتح {{ CONNECTORNAME }} على هاتفك للمسح",downloadAppScreen_heading:"الحصول على {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:`استخدم كاميرا هاتفك للمسح وتنزيله على نظامي iOS أو Android + +.`,downloadAppScreen_ios:"استخدم كاميرا هاتفك للمسح وتنزيله على نظام iOS.",downloadAppScreen_android:"استخدم كاميرا هاتفك للمسح وتنزيله على نظام Android.",injectionScreen_unavailable_h1:"المتصفح غير مدعوم",injectionScreen_unavailable_p:"لتوصيل محفظتك {{ CONNECTORSHORTNAME }}، قم بتثبيت الإضافة على متصفح {{ SUGGESTEDEXTENSIONBROWSER }}.",injectionScreen_install_h1:"تثبيت {{ CONNECTORNAME }}",injectionScreen_install_p:"لتوصيل محفظتك {{ CONNECTORSHORTNAME }}، قم بتثبيت الإضافة على المتصفح.",injectionScreen_connecting_h1:"طلب الاتصال",injectionScreen_connecting_p:"افتح إضافة المتصفح {{ CONNECTORSHORTNAME }} لتوصيل محفظتك.",injectionScreen_connecting_injected_h1:"طلب الاتصال",injectionScreen_connecting_injected_p:"قبل الطلب من خلال محفظتك للاتصال بتطبيقنا.",injectionScreen_connected_h1:"الاتصال بالفعل",injectionScreen_connected_p:"من الآمن الآن إغلاق هذه النافذة المنبثقة.",injectionScreen_rejected_h1:"تم رفض الطلب",injectionScreen_rejected_p:"لقد قمت برفض الطلب. انقر أعلى للمحاولة مرة أخرى.",injectionScreen_failed_h1:"فشل الاتصال",injectionScreen_failed_p:"عذرًا، حدث خطأ ما. يُرجى المحاولة مرة أخرى للاتصال.",injectionScreen_notconnected_h1:"تسجيل الدخول إلى {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"للمتابعة، يُرجى تسجيل الدخول إلى إضافة {{ CONNECTORNAME }}.",profileScreen_heading:"متصل",switchNetworkScreen_heading:"تبديل الشبكات",signInWithEthereumScreen_tooltip:`أنت غير مسجل الدخول حاليًا إلى هذا التطبيق. +**سجل الدخول باستخدام إثيريوم** للمتابعة.`,signInWithEthereumScreen_signedOut_heading:"سجل الدخول باستخدام إثيريوم",signInWithEthereumScreen_signedOut_h1:`يود هذا التطبيق التحقق منك + كصاحب لهذه المحفظة.`,signInWithEthereumScreen_signedOut_p:"يرجى تأكيد طلب الرسالة في محفظتك للمتابعة.",signInWithEthereumScreen_signedOut_button:"سجل الدخول",signInWithEthereumScreen_signedIn_heading:"تم تسجيل الدخول باستخدام إثيريوم",signInWithEthereumScreen_signedIn_h1:"لقد قمت بتأكيد نفسك كصاحب لهذه المحفظة بنجاح.",signInWithEthereumScreen_signedIn_p:"سيتطلب تسجيل الخروج منك إعادة المصادقة مرة أخرى في المستقبل.",signInWithEthereumScreen_signedIn_button:"تسجيل الخروج"},Lje={connectWallet:"Connect Wallet",disconnect:"Disconnect",connected:"Connected",wrongNetwork:"Wrong Network",switchNetworks:"Switch Networks",chainNetwork:"{{ CHAIN }} Network",copyToClipboard:"Copy to Clipboard",copyCode:"Copy Code",moreInformation:"More Information",back:"Back",close:"Close",or:"or",more:"More",tryAgain:"Try Again",tryAgainQuestion:"Try Again?",dontHaveTheApp:"Don't have the app?",scanTheQRCode:"Scan the QR code",useWalletConnectModal:"Use WalletConnect Modal",useModal:"Use Modal",installTheExtension:"Install the Extension",getWalletName:"Get {{ CONNECTORNAME }}",otherWallets:"Other Wallets",learnMore:"Learn More",getWallet:"Get a Wallet",approveInWallet:"Approve in Wallet",confirmInWallet:"Confirm in Wallet",awaitingConfirmation:"Awaiting Confirmation",signIn:"Sign In",signOut:"Sign Out",signedIn:"Signed In",signedOut:"Signed Out",walletNotConnected:"Wallet Not Connected",warnings_walletSwitchingUnsupported:"Your wallet does not support switching networks from this app.",warnings_walletSwitchingUnsupportedResolve:"Try switching networks from within your wallet instead.",warnings_chainUnsupported:"This app does not support the current connected network.",warnings_chainUnsupportedResolve:"Switch or disconnect to continue.",onboardingScreen_heading:"Get a Wallet",onboardingScreen_h1:"Start Exploring Web3",onboardingScreen_p:"Your wallet is the gateway to all things Ethereum, the magical technology that makes it possible to explore web3.",onboardingScreen_ctaText:"Choose Your First Wallet",onboardingScreen_ctaUrl:"https://ethereum.org/en/wallets/find-wallet/",aboutScreen_heading:"About Wallets",aboutScreen_a_h1:"For your digital assets",aboutScreen_a_p:"Wallets let you send, receive, store, and interact with digital assets like NFTs and other Ethereum tokens.",aboutScreen_b_h1:"A better way to login",aboutScreen_b_p:"With modern apps, your wallet can be used as an easy way to login, instead of having to remember a password.",aboutScreen_c_h1:"Explore the world of web3",aboutScreen_c_p:"Your wallet is an essential utility that lets you explore and participate in the fast evolving world of web3.",aboutScreen_ctaText:"Learn More",aboutScreen_ctaUrl:"https://ethereum.org/en/wallets/",connectorsScreen_heading:"Connect Wallet",connectorsScreen_newcomer:"I don’t have a wallet",connectorsScreen_h1:"What is a wallet?",connectorsScreen_p:"Wallets are used to send, receive, and store digital assets. Connecting a wallet lets you interact with apps.",mobileConnectorsScreen_heading:"Choose Wallet",scanScreen_heading:"Scan with Phone",scanScreen_heading_withConnector:"Scan with {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:`Open a [WALLETCONNECTLOGO] WalletConnect +supported wallet to scan`,scanScreen_tooltip_default:`Open {{ CONNECTORNAME }} on +your mobile phone to scan`,downloadAppScreen_heading:"Get {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Scan with your phone camera to download on iOS or Android.",downloadAppScreen_ios:"Scan with your phone camera to download on iOS.",downloadAppScreen_android:"Scan with your phone camera to download Android.",injectionScreen_unavailable_h1:"Unsupported Browser",injectionScreen_unavailable_p:`To connect your {{ CONNECTORSHORTNAME }} wallet, +install the extension on {{ SUGGESTEDEXTENSIONBROWSER }}.`,injectionScreen_install_h1:"Install {{ CONNECTORNAME }}",injectionScreen_install_p:`To connect your {{ CONNECTORSHORTNAME }} wallet, +install the browser extension.`,injectionScreen_connecting_h1:"Requesting Connection",injectionScreen_connecting_p:`Open the {{ CONNECTORSHORTNAME }} browser +extension to connect your wallet.`,injectionScreen_connecting_injected_h1:"Requesting Connection",injectionScreen_connecting_injected_p:"Accept the request through your wallet to connect to this app.",injectionScreen_connected_h1:"Already Connected",injectionScreen_connected_p:"It is now okay to close this popup",injectionScreen_rejected_h1:"Request Cancelled",injectionScreen_rejected_p:`You cancelled the request. +Click above to try again.`,injectionScreen_failed_h1:"Connection Failed",injectionScreen_failed_p:`Sorry, something went wrong. +Please try connecting again.`,injectionScreen_notconnected_h1:"Login to {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"To continue, please login to your {{ CONNECTORNAME }} extension.",profileScreen_heading:"Connected",switchNetworkScreen_heading:"Switch Networks",signInWithEthereumScreen_tooltip:`You’re not signed in to this app. +**Sign In With Ethereum** to continue.`,signInWithEthereumScreen_signedOut_heading:"Sign In With Ethereum",signInWithEthereumScreen_signedOut_h1:`This app would like to verify you + as the owner of this wallet.`,signInWithEthereumScreen_signedOut_p:`Please sign the message request + in your wallet to continue.`,signInWithEthereumScreen_signedOut_button:"Sign In",signInWithEthereumScreen_signedIn_heading:"Signed In With Ethereum",signInWithEthereumScreen_signedIn_h1:`You successfully verified yourself + as the owner of this wallet.`,signInWithEthereumScreen_signedIn_p:`Signing out will require you to + authenticate again in the future.`,signInWithEthereumScreen_signedIn_button:"Sign Out"},Bje={connectWallet:"Ühenda rahakott",disconnect:"Katkesta ühendus",connected:"Ühendatud",wrongNetwork:"Vale võrk",switchNetworks:"Vaheta võrke",chainNetwork:"{{ CHAIN }} Võrk",copyToClipboard:"Kopeeri lõikelauale",copyCode:"Kopeeri koodi",moreInformation:"Rohkem infot",back:"Tagasi",close:"Pane kinni",or:"või",more:"Rohkem",tryAgain:"Proovi uuesti",tryAgainQuestion:"Proovi uuesti?",dontHaveTheApp:"Kas teil pole rakendust?",scanTheQRCode:"Skaneeri QR-kood",useWalletConnectModal:"Kasuta WalletConnecti modalit",useModal:"Kasuta Modalit",installTheExtension:"Installi laiendust",getWalletName:"Hanki {{ CONNECTORNAME }}",otherWallets:"Teised rahakotid",learnMore:"Avasta rohkem",getWallet:"Lae alla rahakott",approveInWallet:"Kiita heaks rahakotis",confirmInWallet:"Kinnita rahakotis",awaitingConfirmation:"Kinnituse ootel",signIn:"Logi sisse",signOut:"Logi välja",signedIn:"Sisse logitud",signedOut:"Välja logitud",walletNotConnected:"Raakott pole ühendatud",warnings_walletSwitchingUnsupported:"Teie rahakott ei toeta võrgu vahetamist sellest rakendusest.",warnings_walletSwitchingUnsupportedResolve:"Proovige võrgu vahetamist teha oma rahakoti seest.",warnings_chainUnsupported:"See rakendus ei toeta praegu ühendatud võrku.",warnings_chainUnsupportedResolve:"Jätkamiseks vahetage või ühendage lahti.",onboardingScreen_heading:"Hankige rahakott",onboardingScreen_h1:"Alustage Web3 uurimist",onboardingScreen_p:"Teie rahakott on värav kõigele, mis puudutab Ethereumit, maagilist tehnoloogiat, mis võimaldab uurida Web3.",onboardingScreen_ctaText:"Valige oma esimene rahakott",onboardingScreen_ctaUrl:"https://ethereum.org/en/wallets/find-wallet/",aboutScreen_heading:"Rahakottidest",aboutScreen_a_h1:"Teie digitaalsetele varadele",aboutScreen_a_p:"Rahakotid võimaldavad teil saata, vastu võtta, salvestada ja suhelda digitaalsete varadega nagu NFT-d ja teised Ethereumi tokenid.",aboutScreen_b_h1:"Parem viis sisse logimiseks",aboutScreen_b_p:"Kaasaegsete rakendustega saab teie rahakotti kasutada lihtsa sisselogimisviisina, ilma et peaksite meeles pidama parooli.",aboutScreen_c_h1:"Uurige Web3 maailma",aboutScreen_c_p:"Teie rahakott on oluline tööriist, mis võimaldab teil uurida ja osaleda kiiresti arenevas Web3 maailmas.",aboutScreen_ctaText:"Lisateavet saamiseks",aboutScreen_ctaUrl:"https://ethereum.org/en/wallets/",connectorsScreen_heading:"Ühendage rahakott",connectorsScreen_newcomer:"Mul pole rahakotti",connectorsScreen_h1:"Mis on rahakott?",connectorsScreen_p:"Rahakotte kasutatakse digitaalsete varade saatmiseks, vastuvõtmiseks ja salvestamiseks. Rahakoti ühendamine võimaldab teil rakendustega suhelda.",mobileConnectorsScreen_heading:"Valige rahakott",scanScreen_heading:"Skaneerige telefoni abil",scanScreen_heading_withConnector:"Skaneerige koos {{ CONNECTORNAME }}-ga",scanScreen_tooltip_walletConnect:`Ava [WALLETCONNECTLOGO] WalletConnect +toetatud rahakott skaneerimiseks`,scanScreen_tooltip_default:`Ava {{ CONNECTORNAME }} oma +mobiiltelefonil skaneerimiseks`,downloadAppScreen_heading:"Hankige {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Skaneerige oma telefoni kaameraga allalaadimiseks iOS-i või Androidi jaoks.",downloadAppScreen_ios:"Skaneerige oma telefoni kaameraga allalaadimiseks iOS-i jaoks.",downloadAppScreen_android:"Skaneerige oma telefoni kaameraga Androidi allalaadimiseks.",injectionScreen_unavailable_h1:"Toetuseta brauser",injectionScreen_unavailable_p:`Teie {{ CONNECTORSHORTNAME }} rahakoti ühendamiseks +installige laiendus {{ SUGGESTEDEXTENSIONBROWSER }}-le.`,injectionScreen_install_h1:"Installige {{ CONNECTORNAME }}",injectionScreen_install_p:`Teie {{ CONNECTORSHORTNAME }} rahakoti ühendamiseks +installige brauseri laiendus.`,injectionScreen_connecting_h1:"Ühenduse taotlemine",injectionScreen_connecting_p:`Ava {{ CONNECTORSHORTNAME }} brauseri +laiendus rahakoti ühendamiseks.`,injectionScreen_connecting_injected_h1:"Ühenduse taotlemine",injectionScreen_connecting_injected_p:"Nõustuge rakendusega ühendamiseks oma rahakotis.",injectionScreen_connected_h1:"Juba ühendatud",injectionScreen_connected_p:"Selle popup-i saab nüüd sulgeda",injectionScreen_rejected_h1:"Taotlus tühistatud",injectionScreen_rejected_p:`Tühistasite taotluse. +Klõpsake ülal, et uuesti proovida.`,injectionScreen_failed_h1:"Ühenduse loomine ebaõnnestus",injectionScreen_failed_p:`Vabandame, midagi läks valesti. +Proovige ühendust uuesti luua.`,injectionScreen_notconnected_h1:"Logige sisse {{ CONNECTORNAME }}-ga",injectionScreen_notconnected_p:"Jätkamiseks logige sisse oma {{ CONNECTORNAME }} laiendisse.",profileScreen_heading:"Ühendatud",switchNetworkScreen_heading:"Võrkude vahetamine",signInWithEthereumScreen_tooltip:`Te pole selle rakendusse sisse logitud. +**Logi sisse Ethereumiga** jätkamiseks.`,signInWithEthereumScreen_signedOut_heading:"Logi sisse Ethereumiga",signInWithEthereumScreen_signedOut_h1:`See rakendus soovib teid autentida + selle rahakoti omanikuna.`,signInWithEthereumScreen_signedOut_p:`Jätkamiseks allkirjastage sõnumipäring + oma rahakotis.`,signInWithEthereumScreen_signedOut_button:"Logi sisse",signInWithEthereumScreen_signedIn_heading:"Logi välja",signInWithEthereumScreen_signedIn_h1:`Olete edukalt autentinud end + selle rahakoti omanikuna.`,signInWithEthereumScreen_signedIn_p:`Välja logimine nõuab tulevikus + uuesti autentimist.`,signInWithEthereumScreen_signedIn_button:"Logi välja"},Mje={connectWallet:"Conecta una cartera",disconnect:"Desconectar",connected:"Conectado",wrongNetwork:"Red incorrecta",switchNetworks:"Cambio de red",chainNetwork:"Red {{ CHAIN }}",copyToClipboard:"Copiar al portapapeles",copyCode:"Copiar código",moreInformation:"Más información",back:"Atrás",close:"Cerrar",or:"o",more:"Más",tryAgain:"Intentar de nuevo",tryAgainQuestion:"¿Intentar de nuevo?",dontHaveTheApp:"¿No tienes la aplicación?",scanTheQRCode:"Escanea el código QR",useWalletConnectModal:"Utilizar WalletConnect Modal",useModal:"Utilizar Modal",installTheExtension:"Instalar la extensión",getWalletName:"Obtén {{ CONNECTORNAME }}",otherWallets:"Otras carteras",learnMore:"Más información",getWallet:"Obtén una cartera",approveInWallet:"Aprobar en la cartera",confirmInWallet:"Confirmar en la cartera",awaitingConfirmation:"A la espera de confirmación",signIn:"Iniciar sesión",signOut:"Cerrar sesión",signedIn:"Sesión iniciada",signedOut:"Sesión cerrada",walletNotConnected:"Cartera no conectada",warnings_walletSwitchingUnsupported:"Tu cartera no permite cambiar de red desde esta aplicación.",warnings_walletSwitchingUnsupportedResolve:"Prueba a cambiar de red desde tu cartera.",warnings_chainUnsupported:"Esta aplicación no es compatible con la red conectada actualmente.",warnings_chainUnsupportedResolve:"Cambia o desconecta para continuar.",onboardingScreen_heading:"Obtén una cartera",onboardingScreen_h1:"Comienza a explorar la Web3",onboardingScreen_p:"Tu cartera es el portal de acceso a todo lo relacionado con Ethereum, la tecnología mágica que permite explorar la Web3.",onboardingScreen_ctaText:"Elige tu primera cartera",onboardingScreen_ctaUrl:"https://ethereum.org/es/wallets/find-wallet/",aboutScreen_heading:"Acerca de las carteras",aboutScreen_a_h1:"Para tus activos digitales",aboutScreen_a_p:"Las carteras te permiten enviar, recibir, almacenar e interactuar con activos digitales como los NFT y otros tokens de Ethereum.",aboutScreen_b_h1:"Una manera mejor de iniciar sesión",aboutScreen_b_p:"Con las aplicaciones modernas, puedes utilizar tu cartera para iniciar sesión fácilmente, en vez de tener que recordar una contraseña.",aboutScreen_c_h1:"Explora el mundo de la Web3",aboutScreen_c_p:"Tu cartera es una herramienta esencial que te permite explorar y participar en el mundo en rápida evolución de la Web3.",aboutScreen_ctaText:"Más información",aboutScreen_ctaUrl:"https://ethereum.org/es/wallets/",connectorsScreen_heading:"Conecta una cartera",connectorsScreen_newcomer:"No tengo una cartera",connectorsScreen_h1:"¿Qué es una cartera?",connectorsScreen_p:"Las carteras se utilizan para enviar, recibir y almacenar activos digitales. Si conectas una cartera, podrás interactuar con las aplicaciones.",mobileConnectorsScreen_heading:"Elige una cartera",scanScreen_heading:"Escanea con el teléfono",scanScreen_heading_withConnector:"Escanea con {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"Abre una cartera compatible con WalletConnect [WALLETCONNECTLOGO] para escanear",scanScreen_tooltip_default:"Abre {{ CONNECTORNAME }} en tu teléfono móvil para escanear",downloadAppScreen_heading:"Obtén {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Escanea con la cámara de tu teléfono para descargarla en iOS o Android.",downloadAppScreen_ios:"Escanea con la cámara de tu teléfono para descargarla en iOS.",downloadAppScreen_android:"Escanea con la cámara de tu teléfono para descargarla en Android.",injectionScreen_unavailable_h1:"Navegador no compatible",injectionScreen_unavailable_p:"Para conectar tu cartera de {{ CONNECTORSHORTNAME }}, instala la extensión en {{ SUGGESTEDEXTENSIONBROWSER }}.",injectionScreen_install_h1:"Instala {{ CONNECTORNAME }}",injectionScreen_install_p:"Para conectar tu cartera de {{ CONNECTORSHORTNAME }}, instala la extensión del navegador.",injectionScreen_connecting_h1:"Solicitud de conexión",injectionScreen_connecting_p:"Abre la extensión del navegador de {{ CONNECTORSHORTNAME }} para conectar tu cartera.",injectionScreen_connecting_injected_h1:"Solicitud de conexión",injectionScreen_connecting_injected_p:"Acepta la solicitud a través de tu cartera para conectarte a esta aplicación.",injectionScreen_connected_h1:"Ya conectada",injectionScreen_connected_p:"Ya puedes cerrar esta ventana emergente",injectionScreen_rejected_h1:"Solicitud cancelada",injectionScreen_rejected_p:"Has cancelado la solicitud. Haz clic arriba para intentarlo de nuevo.",injectionScreen_failed_h1:"Error de conexión",injectionScreen_failed_p:"Lo sentimos, ha habido un problema. Intenta conectarte de nuevo.",injectionScreen_notconnected_h1:"Inicia sesión en {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Para continuar, inicia sesión en tu extensión de {{ CONNECTORNAME }}.",profileScreen_heading:"Conectado",switchNetworkScreen_heading:"Cambio de red",signInWithEthereumScreen_tooltip:`No has iniciado sesión en esta aplicación. +**Inicia sesión con Ethereum** para continuar.`,signInWithEthereumScreen_signedOut_heading:"Inicia sesión con Ethereum",signInWithEthereumScreen_signedOut_h1:"Esta aplicación desea verificar que eres el propietario de esta cartera.",signInWithEthereumScreen_signedOut_p:"Firma la solicitud de mensaje en tu cartera para continuar.",signInWithEthereumScreen_signedOut_button:"Iniciar sesión",signInWithEthereumScreen_signedIn_heading:"Sesión iniciada con Ethereum",signInWithEthereumScreen_signedIn_h1:"Te has verificado correctamente como propietario de esta cartera.",signInWithEthereumScreen_signedIn_p:"Si cierras la sesión, tendrás que volver a autenticarte más adelante.",signInWithEthereumScreen_signedIn_button:"Cerrar sesión"},Dje={connectWallet:"اتصال به کیف پول",disconnect:"قطع ارتباط",connected:"متصل شد",wrongNetwork:"شبکه نادرست",switchNetworks:"تغییر شبکه‌ها",chainNetwork:"{{ CHAIN }} شبکه",copyToClipboard:"کپی به کلیپ‌بورد",copyCode:"کپی کد",moreInformation:"اطلاعات بیشتر",back:"بازگشت",close:"بستن",or:"یا",more:"بیشتر",tryAgain:"تلاش دوباره",tryAgainQuestion:"آیا دوباره تلاش کنیم؟",dontHaveTheApp:"اپلیکیشن را ندارید؟",scanTheQRCode:"اسکن کیو‌آر کد",useWalletConnectModal:"استفاده از مودال والت‌‌کانکت",useModal:"استفاده از مودال",installTheExtension:"نصب افزونه",getWalletName:"دریافت {{ CONNECTORNAME }}",otherWallets:"کیف پول‌های دیگر",learnMore:"بیشتر بدانید",getWallet:"یک کیف پول دریافت کنید",approveInWallet:"در کیف پول تأیید کنید",confirmInWallet:"در کیف پول تأیید کنید",awaitingConfirmation:"در انتظار تأیید",signIn:"ورود",signOut:"خروج",signedIn:"وارد شده",signedOut:"خارج شده",walletNotConnected:"کیف پول متصل نیست",warnings_walletSwitchingUnsupported:"متاسفانه، کیف پول شما از تغییر شبکه در این برنامه پشتیبانی نمی‌کند.",warnings_walletSwitchingUnsupportedResolve:"بهتر است از داخل کیف پول خود تغییر شبکه دهید.",warnings_chainUnsupported:"این برنامه با شبکه‌ای که در حال حاضر متصل است، سازگاری ندارد.",warnings_chainUnsupportedResolve:"برای ادامه، شبکه را تغییر دهید یا اتصال را قطع کنید.",onboardingScreen_heading:"دریافت کیف پول",onboardingScreen_h1:"آغاز کاوش در وب3",onboardingScreen_p:"کیف پول شما دروازه‌ای است به دنیای اتریوم، فناوری جادویی که ممکن می‌سازد تا وب3 را کاوش کنید.",onboardingScreen_ctaText:"کیف پول نخست خود را انتخاب کنید",onboardingScreen_ctaUrl:"https://ethereum.org/fa/wallets/find-wallet/",aboutScreen_heading:"درباره کیف پول‌ها",aboutScreen_a_h1:"نگهبان دارایی‌های دیجیتالی شما",aboutScreen_a_p:"کیف پول‌ها به شما اجازه می‌دهند دارایی‌های دیجیتالی مانند ان‌اف‌تی و توکن‌های اتریومی دیگر را ارسال، دریافت، ذخیره و تعامل دهید.",aboutScreen_b_h1:"یک روش بهتر برای ورود",aboutScreen_b_p:"در برنامه‌های مدرن، کیف پول شما می‌تواند به عنوان یک راه ورود آسان به جای به یادآوری یک رمز عبور مورد استفاده قرار گیرد.",aboutScreen_c_h1:"جهان وب3 را کاوش کنید",aboutScreen_c_p:"کیف پول شما یک ابزار ضروری است که به شما اجازه می‌دهد جهان در حال تغییر سریع وب3 را کاوش و در آن شرکت کنید.",aboutScreen_ctaText:"دانش بیشتری بیافزایید",aboutScreen_ctaUrl:"https://ethereum.org/fa/wallets/",connectorsScreen_heading:"برقراری ارتباط با کیف پول",connectorsScreen_newcomer:"کیف پول ندارم",connectorsScreen_h1:"چیستی رمزگذاری کیف پول؟",connectorsScreen_p:"کیف پول‌ها برای ارسال، دریافت و نگهداری دارایی‌های دیجیتال استفاده می‌شوند. برقراری ارتباط با یک کیف پول به شما امکان تعامل با برنامه‌ها را می‌دهد.",mobileConnectorsScreen_heading:"انتخاب کیف پول",scanScreen_heading:"اسکن با گوشی",scanScreen_heading_withConnector:"اسکن با {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"یک کیف پول با پشتیبانی از والت‌‌کانکت را باز کنید تا اسکن را آغاز کنید",scanScreen_tooltip_default:"{{ CONNECTORNAME }} را روی گوشی خود باز کنید تا اسکن شود",downloadAppScreen_heading:"دریافت {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"از دوربین گوشی خود برای اسکن و دریافت نسخه iOS یا Android استفاده کنید.",downloadAppScreen_ios:"از دوربین گوشی خود برای دریافت نسخه iOS استفاده کنید.",downloadAppScreen_android:"از دوربین گوشی خود برای دریافت نسخه Android استفاده کنید.",injectionScreen_unavailable_h1:"مرورگر پشتیبانی نمی‌شود",injectionScreen_unavailable_p:"برای برقراری ارتباط با کیف پول {{ CONNECTORSHORTNAME }}، افزونه مرورگر را در {{ SUGGESTEDEXTENSIONBROWSER }} نصب کنید.",injectionScreen_install_h1:"نصب {{ CONNECTORNAME }}",injectionScreen_install_p:"برای برقراری ارتباط با کیف پول {{ CONNECTORSHORTNAME }}، افزونه مرورگر را نصب کنید.",injectionScreen_connecting_h1:"درخواست اتصال",injectionScreen_connecting_p:"افزونه مرورگر {{ CONNECTORSHORTNAME }} را باز کنید تا ارتباط با کیف پول ایجاد شود.",injectionScreen_connecting_injected_h1:"درخواست اتصال",injectionScreen_connecting_injected_p:"درخواست را از طریق کیف پول خود بپذیرید تا به این برنامه متصل شوید.",injectionScreen_connected_h1:"اتصال از قبل برقرار است",injectionScreen_connected_p:"اکنون می‌توانید این پنجره‌ی بازشو را ببندید.",injectionScreen_rejected_h1:"درخواست لغو شد",injectionScreen_rejected_p:"شما درخواست را لغو کرده‌اید. برای تلاش مجدد، بالا کلیک کنید.",injectionScreen_failed_h1:"ارتباط ناموفق",injectionScreen_failed_p:"متاسفانه، مشکلی بوجود آمد. لطفاً مجدداً اتصال برقرار کنید.",injectionScreen_notconnected_h1:"با ورود به {{ CONNECTORNAME }} وارد شوید",injectionScreen_notconnected_p:"برای ادامه، لطفاً وارد افزونه {{ CONNECTORNAME }} خود شوید.",profileScreen_heading:"اتصال‌ها",switchNetworkScreen_heading:"تغییر شبکه‌ها",signInWithEthereumScreen_tooltip:`شما در حال حاضر به این برنامه وارد نشده‌اید. +**با اتریوم وارد شوید** تا ادامه دهید.`,signInWithEthereumScreen_signedOut_heading:"با اتریوم وارد شوید",signInWithEthereumScreen_signedOut_h1:`این برنامه می‌خواهد هویت شما + به عنوان صاحب این کیف پول را تأیید کند.`,signInWithEthereumScreen_signedOut_p:"لطفاً درخواست پیام را در کیف پول خود تأیید کنید تا ادامه دهید.",signInWithEthereumScreen_signedOut_button:"با اتریوم وارد شوید",signInWithEthereumScreen_signedIn_heading:"با اتریوم وارد شده‌اید",signInWithEthereumScreen_signedIn_h1:"شما به عنوان صاحب این کیف پول هویت خود را با موفقیت تأیید کرده‌اید.",signInWithEthereumScreen_signedIn_p:"خروج از حساب کاربری شما در آینده نیاز به تأیید دوباره دارد.",signInWithEthereumScreen_signedIn_button:"خروج"},jje={connectWallet:"Connecter le portefeuille",disconnect:"Déconnecter",connected:"Connecté",wrongNetwork:"Réseau incorrect",switchNetworks:"Changer de réseau",chainNetwork:"Réseau {{ CHAIN }}",copyToClipboard:"Copier dans le presse-papiers",copyCode:"Copier le code",moreInformation:"Plus d’informations",back:"Retour",close:"Fermer",or:"ou",more:"Plus",tryAgain:"Réessayer",tryAgainQuestion:"Réessayer ?",dontHaveTheApp:"Vous n’avez pas l’application ?",scanTheQRCode:"Scannez le code QR",useWalletConnectModal:"Utiliser la modale WalletConnect",useModal:"Utiliser la modale",installTheExtension:"Installer l’extension",getWalletName:"Obtenez {{ CONNECTORNAME }}",otherWallets:"Autres portefeuilles",learnMore:"En savoir plus",getWallet:"Obtenir un portefeuille",approveInWallet:"Approuver dans le portefeuille",confirmInWallet:"Confirmer dans le portefeuille",awaitingConfirmation:"En attente de confirmation",signIn:"Se connecter",signOut:"Se déconnecter",signedIn:"Connecté",signedOut:"Déconnecté",walletNotConnected:"Portefeuille non connecté",warnings_walletSwitchingUnsupported:"Votre portefeuille ne prend pas en charge le changement de réseau à partir de cette application.",warnings_walletSwitchingUnsupportedResolve:"Essayez plutôt de changer de réseau à partir de votre portefeuille.",warnings_chainUnsupported:"Cette application ne prend pas en charge le réseau connecté actuel.",warnings_chainUnsupportedResolve:"Changez ou déconnectez-vous pour continuer.",onboardingScreen_heading:"Obtenez un portefeuille",onboardingScreen_h1:"Commencez à explorer le Web3",onboardingScreen_p:"Votre portefeuille est la porte d'entrée vers tout ce qui concerne l'Ethereum, la technologie magique qui permet d'explorer le Web3.",onboardingScreen_ctaText:"Choisissez votre premier portefeuille",onboardingScreen_ctaUrl:"https://ethereum.org/fr/wallets/find-wallet/",aboutScreen_heading:"À propos des portefeuilles",aboutScreen_a_h1:"Pour vos actifs numériques",aboutScreen_a_p:"Les portefeuilles vous permettent d'envoyer, de recevoir, de stocker et d'interagir avec des actifs numériques tels que des NFT et d'autres jetons Ethereum.",aboutScreen_b_h1:"Une meilleure façon de se connecter",aboutScreen_b_p:"Avec les applications modernes, votre portefeuille peut s'utiliser pour vous connecter facilement, au lieu d'avoir à mémoriser un mot de passe.",aboutScreen_c_h1:"Explorez le monde du Web3",aboutScreen_c_p:"Votre portefeuille est un utilitaire essentiel qui vous permet d'explorer et de participer au monde en évolution rapide du Web3.",aboutScreen_ctaText:"En savoir plus",aboutScreen_ctaUrl:"https://ethereum.org/fr/wallets/",connectorsScreen_heading:"Connectez le portefeuille",connectorsScreen_newcomer:"Je n’ai pas de portefeuille",connectorsScreen_h1:"Qu’est-ce qu’un portefeuille ?",connectorsScreen_p:"Les portefeuilles s'utilisent pour envoyer, recevoir et stocker des actifs numériques. La connexion d'un portefeuille vous permet d'interagir avec les applications.",mobileConnectorsScreen_heading:"Choisissez le portefeuille",scanScreen_heading:"Scannez avec le téléphone",scanScreen_heading_withConnector:"Scannez avec {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"Ouvrez un portefeuille pris en charge par WalletConnect [WALLETCONNECTLOGO] pour scanner",scanScreen_tooltip_default:"Ouvrez {{ CONNECTORNAME }} sur votre téléphone mobile pour scanner",downloadAppScreen_heading:"Obtenez {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Scannez avec l'appareil photo de votre téléphone pour le télécharger sur iOS ou Android.",downloadAppScreen_ios:"Scannez avec l'appareil photo de votre téléphone pour le télécharger sur iOS.",downloadAppScreen_android:"Scannez avec l'appareil photo de votre téléphone pour le télécharger sur Android.",injectionScreen_unavailable_h1:"Navigateur non pris en charge",injectionScreen_unavailable_p:"Pour connecter votre portefeuille {{ CONNECTORSHORTNAME }}, installez l’extension sur {{ SUGGESTEDEXTENSIONBROWSER }}.",injectionScreen_install_h1:"Installez {{ CONNECTORNAME }}",injectionScreen_install_p:"Pour connecter votre portefeuille {{ CONNECTORSHORTNAME }}, installez l’extension de navigateur.",injectionScreen_connecting_h1:"Demande de connexion",injectionScreen_connecting_p:"Ouvrez l’extension de navigateur {{ CONNECTORSHORTNAME }} pour connecter votre portefeuille.",injectionScreen_connecting_injected_h1:"Demande de connexion",injectionScreen_connecting_injected_p:"Acceptez la demande via votre portefeuille pour vous connecter à cette application.",injectionScreen_connected_h1:"Déjà connecté",injectionScreen_connected_p:"Vous pouvez maintenant fermer ce pop-up",injectionScreen_rejected_h1:"Demande annulée",injectionScreen_rejected_p:"Vous avez annulé la demande. Cliquez ci-dessus pour réessayer.",injectionScreen_failed_h1:"Échec de la connexion",injectionScreen_failed_p:"Malheureusement, un problème est survenu. Veuillez réessayer de vous connecter.",injectionScreen_notconnected_h1:"Connectez-vous à {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Pour continuer, veuillez vous connecter à votre extension {{ CONNECTORNAME }} .",profileScreen_heading:"Connecté",switchNetworkScreen_heading:"Changer de réseau",signInWithEthereumScreen_tooltip:`Vous n’êtes pas connecté à cette application. +**Connectez-vous avec Ethereum** pour continuer.`,signInWithEthereumScreen_signedOut_heading:"Connectez-vous avec Ethereum",signInWithEthereumScreen_signedOut_h1:"Cette application souhaite vérifier que vous êtes bien le propriétaire de ce portefeuille.",signInWithEthereumScreen_signedOut_p:"Veuillez signer la demande de message dans votre portefeuille pour continuer.",signInWithEthereumScreen_signedOut_button:"Se connecter",signInWithEthereumScreen_signedIn_heading:"Connecté avec Ethereum",signInWithEthereumScreen_signedIn_h1:"Vous avez réussi à vous identifier en tant que propriétaire de ce portefeuille.",signInWithEthereumScreen_signedIn_p:"La déconnexion vous obligera à vous authentifier à nouveau à l'avenir.",signInWithEthereumScreen_signedIn_button:"Se déconnecter"};var Fje={connectWallet:"ウォレットの接続",disconnect:"切断",connected:"接続されました",wrongNetwork:"間違ったネットワーク",switchNetworks:"ネットワークの切り替え",chainNetwork:"{{ CHAIN }} ネットワーク",copyToClipboard:"クリップボードにコピー",copyCode:"コードをコピー",moreInformation:"詳細情報",back:"戻る",close:"閉じる",or:"または",more:"その他",tryAgain:"再試行",tryAgainQuestion:"もう一度試しますか?",dontHaveTheApp:"アプリをお持ちではありませんか?",scanTheQRCode:"QR コードをスキャン",useWalletConnectModal:"WalletConnect モーダルを使用",useModal:"モーダルを使用",installTheExtension:"拡張機能をインストール",getWalletName:"{{ CONNECTORNAME }} を取得",otherWallets:"その他のウォレット",learnMore:"詳細情報",getWallet:"ウォレットを入手",approveInWallet:"ウォレットで承認",confirmInWallet:"ウォレットで確認",awaitingConfirmation:"確認を待っています",signIn:"サインイン",signOut:"サインアウト",signedIn:"サインインしました",signedOut:"サインアウトしました",walletNotConnected:"ウォレットが接続されていません",warnings_walletSwitchingUnsupported:"お使いのウォレットは、このアプリからのネットワークの切り替えをサポートしていません。",warnings_walletSwitchingUnsupportedResolve:"代わりにウォレット内からネットワークを切り替えてみてください。",warnings_chainUnsupported:"このアプリは、現在接続されているネットワークをサポートしていません。",warnings_chainUnsupportedResolve:"切り替えるか切断して続行します。",onboardingScreen_heading:"ウォレットを入手",onboardingScreen_h1:"Web3 の探索を開始",onboardingScreen_p:"ウォレットは、web3 の探索を可能にする魔法のテクノロジーであるイーサリアムのすべてへのゲートウェイです。",onboardingScreen_ctaText:"最初のウォレットを選択してください",onboardingScreen_ctaUrl:"https://ethereum.org/ja/wallets/find-wallet/",aboutScreen_heading:"ウォレットについて",aboutScreen_a_h1:"デジタル資産用",aboutScreen_a_p:"ウォレットを使用すると、NFT やその他のイーサリアム トークンなどのデジタル資産を送信、受信、保存、および操作できます。",aboutScreen_b_h1:"より良いログイン方法",aboutScreen_b_p:"最新のアプリでは、パスワードを覚える必要がなく、ウォレットを簡単なログイン方法として使用できます。",aboutScreen_c_h1:"web3 の世界を探索",aboutScreen_c_p:"ウォレットは、急速に進化する web3 の世界を探索し、参加するために不可欠なユーティリティです。",aboutScreen_ctaText:"詳細情報",aboutScreen_ctaUrl:"https://ethereum.org/ja/wallets/",connectorsScreen_heading:"ウォレットの接続",connectorsScreen_newcomer:"ウォレットを持っていません",connectorsScreen_h1:"ウォレットとは何ですか?",connectorsScreen_p:"ウォレットは、デジタル資産の送信、受信、および保存に使用されます。 ウォレットを接続すると、アプリとやり取りできます。",mobileConnectorsScreen_heading:"ウォレットを選択",scanScreen_heading:"電話でスキャンする",scanScreen_heading_withConnector:"{{ CONNECTORNAME }}でスキャンする",scanScreen_tooltip_walletConnect:"[WALLETCONNECTLOGO] WalletConnect 対応の ウォレットを開いてスキャンします",scanScreen_tooltip_default:"携帯電話で {{ CONNECTORNAME }} を 開いてスキャンします",downloadAppScreen_heading:"{{ CONNECTORNAME }} を取得",downloadAppScreen_iosAndroid:"携帯電話のカメラでスキャンして、iOS または Android にダウンロードします。",downloadAppScreen_ios:"携帯電話のカメラでスキャンして、iOS にダウンロードします。",downloadAppScreen_android:"携帯電話のカメラでスキャンして、Android にダウンロードします。",injectionScreen_unavailable_h1:"サポートされていないブラウザ",injectionScreen_unavailable_p:"{{ CONNECTORSHORTNAME }} ウォレットを接続するには、{{ SUGGESTEDEXTENSIONBROWSER }} に拡張機能をインストールします。",injectionScreen_install_h1:"{{ CONNECTORNAME }} をインストール",injectionScreen_install_p:"{{ CONNECTORSHORTNAME }} ウォレットを接続するには、ブラウザ拡張機能をインストールします。",injectionScreen_connecting_h1:"接続を要求",injectionScreen_connecting_p:"{{ CONNECTORSHORTNAME }} ブラウザ拡張機能を 開いて、ウォレットを接続します。",injectionScreen_connecting_injected_h1:"接続を要求",injectionScreen_connecting_injected_p:"このアプリに接続するには、ウォレットを介して要求を受け入れます。",injectionScreen_connected_h1:"すでに接続済み",injectionScreen_connected_p:"このポップアップを閉じてもかまいません",injectionScreen_rejected_h1:"要求がキャンセルされました",injectionScreen_rejected_p:"要求をキャンセルしました。上をクリックしてもう一度お試しください。",injectionScreen_failed_h1:"接続に失敗しました",injectionScreen_failed_p:"申し訳ありませんが、問題が発生しました。もう一度接続してみてください。",injectionScreen_notconnected_h1:"{{ CONNECTORNAME }} にログイン",injectionScreen_notconnected_p:"続行するには、 {{ CONNECTORNAME }} 拡張機能にログインしてください。",profileScreen_heading:"接続されました",switchNetworkScreen_heading:"ネットワークの切り替え",signInWithEthereumScreen_tooltip:`このアプリにサインインしていません。 +続行するには、**イーサリアムでサインイン**してください。`,signInWithEthereumScreen_signedOut_heading:"イーサリアムでサインイン",signInWithEthereumScreen_signedOut_h1:"このアプリは、あなたがこのウォレットの 所有者であることを確認しようとしています。",signInWithEthereumScreen_signedOut_p:"続行するには、ウォレットで メッセージ リクエストに署名してください。",signInWithEthereumScreen_signedOut_button:"サインイン",signInWithEthereumScreen_signedIn_heading:"イーサリアムでサインインしました",signInWithEthereumScreen_signedIn_h1:"このウォレットの所有者であることが 正常に確認されました。",signInWithEthereumScreen_signedIn_p:"サインアウトすると、今後 再度認証する必要があります。",signInWithEthereumScreen_signedIn_button:"サインアウト"};const Uje={connectWallet:"Conectar carteira",disconnect:"Desconectar",connected:"Conectado",wrongNetwork:"Rede incorreta",switchNetworks:"Alternar rede",chainNetwork:"Rede {{ CHAIN }}",copyToClipboard:"Copiar para a área de transferência",copyCode:"Copiar código",moreInformation:"Mais informações",back:"Voltar",close:"Fechar",or:"ou",more:"Mais",tryAgain:"Tentar novamente",tryAgainQuestion:"Tentar novamente?",dontHaveTheApp:"Não tem o aplicativo?",scanTheQRCode:"Escaneie o código QR",useWalletConnectModal:"Use o modal do WalletConnect",useModal:"Usar modal",installTheExtension:"Instale a extensão",getWalletName:"Obter {{ CONNECTORNAME }}",otherWallets:"Outras carteiras",learnMore:"Saiba mais",getWallet:"Obtenha uma carteira",approveInWallet:"Aprovar na carteira",confirmInWallet:"Confirmar na carteira",awaitingConfirmation:"Aguardando confirmação",signIn:"Entrar",signOut:"Sair",signedIn:"Conectado",signedOut:"Desconectado",walletNotConnected:"Carteira não conectada",warnings_walletSwitchingUnsupported:"A sua carteira não permite a troca de rede a partir deste aplicativo.",warnings_walletSwitchingUnsupportedResolve:"Tente trocar de rede de dentro da sua carteira.",warnings_chainUnsupported:"Este aplicativo não é compatível com a rede conectada.",warnings_chainUnsupportedResolve:"Altere a rede ou desconecte para continuar.",onboardingScreen_heading:"Obtenha uma carteira",onboardingScreen_h1:"Comece a explorar a Web3",onboardingScreen_p:"Sua carteira é a porta de entrada para todas as coisas Ethereum, a tecnologia mágica que torna possível explorar a web3.",onboardingScreen_ctaText:"Escolha sua primeira carteira",onboardingScreen_ctaUrl:"https://ethereum.org/pt-br/wallets/find-wallet/",aboutScreen_heading:"Sobre as carteiras",aboutScreen_a_h1:"Para seus ativos digitais",aboutScreen_a_p:"As carteiras permitem que você envie, receba, armazene e interaja com ativos digitais como NFTs e outros tokens Ethereum.",aboutScreen_b_h1:"Uma maneira melhor de fazer login",aboutScreen_b_p:"Com aplicativos modernos, sua carteira pode ser usada como uma maneira fácil de fazer login, em vez de ter que lembrar uma senha.",aboutScreen_c_h1:"Explore o mundo da Web3",aboutScreen_c_p:"Sua carteira é uma utilidade essencial que permite explorar e participar do mundo em rápida evolução da Web3.",aboutScreen_ctaText:"Saiba mais",aboutScreen_ctaUrl:"https://ethereum.org/pt-br/wallets/",connectorsScreen_heading:"Conectar carteira",connectorsScreen_newcomer:"Eu não tenho uma carteira",connectorsScreen_h1:"O que é uma carteira?",connectorsScreen_p:"As carteiras são usadas para enviar, receber e armazenar ativos digitais. A conexão de uma carteira permite que você interaja com aplicativos.",mobileConnectorsScreen_heading:"Escolha uma carteira",scanScreen_heading:"Escanear com o celular",scanScreen_heading_withConnector:"Escanear com o {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:`Abra uma carteira compatível +com o WalletConnect [WALLETCONNECTLOGO] para escanear`,scanScreen_tooltip_default:`Abra o {{ CONNECTORNAME }} no +seu celular para escanear`,downloadAppScreen_heading:"Obter {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Escaneie com a câmera do seu celular para baixar no iOS ou Android.",downloadAppScreen_ios:"Escaneie com a câmera do seu celular para baixar no iOS.",downloadAppScreen_android:"Escaneie com a câmera do seu celular para baixar no Android.",injectionScreen_unavailable_h1:"Navegador não compatível",injectionScreen_unavailable_p:`Para conectar sua carteira {{ CONNECTORSHORTNAME }}, +instale a extensão no {{ SUGGESTEDEXTENSIONBROWSER }}.`,injectionScreen_install_h1:"Instalar {{ CONNECTORNAME }}",injectionScreen_install_p:`Para conectar sua carteira {{ CONNECTORSHORTNAME }}, +instale a extensão do navegador`,injectionScreen_connecting_h1:"Solicitando conexão",injectionScreen_connecting_p:`Abra a extensão do navegador do {{ CONNECTORSHORTNAME }} +para conectar a sua carteira.`,injectionScreen_connecting_injected_h1:"Solicitando conexão",injectionScreen_connecting_injected_p:"Aceite a solicitação por meio de sua carteira para se conectar a este aplicativo.",injectionScreen_connected_h1:"Já conectado",injectionScreen_connected_p:"Agora você já pode fechar esta janela",injectionScreen_rejected_h1:"Solicitação cancelada",injectionScreen_rejected_p:`Você cancelou a solicitação. +Clique acima para tentar novamente.`,injectionScreen_failed_h1:"A conexão falhou",injectionScreen_failed_p:`Desculpe, ocorreu um erro. +Por favor, tente conectar novamente.`,injectionScreen_notconnected_h1:"Faça login no {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Para continuar, faça login na sua extensão do {{ CONNECTORNAME }}.",profileScreen_heading:"Conectado",switchNetworkScreen_heading:"Alternar rede",signInWithEthereumScreen_tooltip:`Você não está conectado a este aplicativo. +**Entre com Ethereum** para continuar.`,signInWithEthereumScreen_signedOut_heading:"Entrar com Ethereum",signInWithEthereumScreen_signedOut_h1:`Este aplicativo gostaria de verificar você + como o proprietário desta carteira.`,signInWithEthereumScreen_signedOut_p:`Por favor, assine o pedido de mensagem + em sua carteira para continuar.`,signInWithEthereumScreen_signedOut_button:"Entrar",signInWithEthereumScreen_signedIn_heading:"Conectado com Ethereum",signInWithEthereumScreen_signedIn_h1:`Você se verificou com sucesso + como o proprietário desta carteira`,signInWithEthereumScreen_signedIn_p:`Se sair, será necessário que você + autentique novamente no futuro.`,signInWithEthereumScreen_signedIn_button:"Sair"},zje={connectWallet:"Подключить кошелек",disconnect:"Отключить",connected:"Подключена",wrongNetwork:"Неверная сеть",switchNetworks:"Переключение сети",chainNetwork:"Сеть {{ CHAIN }}",copyToClipboard:"Скопировать в буфер обмена",copyCode:"Скопировать код",moreInformation:"Больше информации",back:"Назад",close:"Закрыть",or:"или",more:"Еще",tryAgain:"Попробовать снова",tryAgainQuestion:"Попробовать снова?",dontHaveTheApp:"У вас нет приложения?",scanTheQRCode:"Отсканируйте QR-код",useWalletConnectModal:"Использовать окно WalletConnect",useModal:"Использовать модальное окно",installTheExtension:"Установить расширение",getWalletName:"Скачать {{ CONNECTORNAME }}",otherWallets:"Другие кошельки",learnMore:"Узнать больше",getWallet:"Завести кошелек",approveInWallet:"Подтвердите",confirmInWallet:"Подтвердите",awaitingConfirmation:"Ожидаем подтверждение",signIn:"Войти",signOut:"Выйти",signedIn:"Вошли",signedOut:"Вышли",walletNotConnected:"Кошелек не подключен",warnings_walletSwitchingUnsupported:"Ваш кошелек не поддерживает переключение сетей из этого приложения.",warnings_walletSwitchingUnsupportedResolve:"Попробуйте переключиться на другую сеть прямо в вашем кошельке.",warnings_chainUnsupported:"Это приложение не поддерживает текущую подключенную сеть.",warnings_chainUnsupportedResolve:"Для продолжения переключите сеть или отключите кошелек.",onboardingScreen_heading:"Завести кошелек",onboardingScreen_h1:"Начните исследовать веб3",onboardingScreen_p:"Ваш кошелек — это врата в мир Ethereum, волшебной технологии, которая позволяет исследовать веб3.",onboardingScreen_ctaText:"Выбрать свой первый кошелек",onboardingScreen_ctaUrl:"https://ethereum.org/en/wallets/find-wallet/",aboutScreen_heading:"О кошельках",aboutScreen_a_h1:"Для ваших цифровых активов",aboutScreen_a_p:"Кошельки позволяют вам отправлять, получать, хранить и взаимодействовать с цифровыми активами, такими как NFT и другие токены Ethereum.",aboutScreen_b_h1:"Лучший способ входа",aboutScreen_b_p:"В современных приложениях ваш кошелек можно использовать как удобный способ входа без необходимости помнить пароль.",aboutScreen_c_h1:"Исследуйте мир веб3",aboutScreen_c_p:"Ваш кошелек - это неотъемлемый инструмент, который позволяет вам исследовать и участвовать в быстро развивающемся мире веб3.",aboutScreen_ctaText:"Узнать больше",aboutScreen_ctaUrl:"https://ethereum.org/en/wallets/",connectorsScreen_heading:"Подключение кошелька",connectorsScreen_newcomer:"У меня нет кошелька",connectorsScreen_h1:"Что такое кошелек?",connectorsScreen_p:"Кошельки используются для отправки, получения и хранения цифровых активов. Подключение кошелька позволяет вам взаимодействовать с приложениями.",mobileConnectorsScreen_heading:"Выберите кошелек",scanScreen_heading:"Сканирование с телефона",scanScreen_heading_withConnector:"Сканирование с помощью {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"Откройте [WALLETCONNECTLOGO] поддерживаемый WalletConnect кошелек для сканирования",scanScreen_tooltip_default:"Откройте {{ CONNECTORNAME }} на вашем мобильном телефоне для сканирования",downloadAppScreen_heading:"Скачивание {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Отсканируйте камерой телефона для загрузки приложения на iOS или Android.",downloadAppScreen_ios:"Отсканируйте камерой телефона для загрузки приложения на iOS.",downloadAppScreen_android:"Сканируйте камерой телефона для загрузки приложения на Android.",injectionScreen_unavailable_h1:"Неподдерживаемый браузер",injectionScreen_unavailable_p:"Для подключения вашего кошелька {{ CONNECTORSHORTNAME }}, установите расширение для браузера {{ SUGGESTEDEXTENSIONBROWSER }}.",injectionScreen_install_h1:"Установите {{ CONNECTORNAME }}",injectionScreen_install_p:"Для подключения вашего кошелька {{ CONNECTORSHORTNAME }}, установите расширение для браузера.",injectionScreen_connecting_h1:"Запрос на подключение",injectionScreen_connecting_p:"Откройте расширение для браузера {{ CONNECTORSHORTNAME }} для подключения вашего кошелька.",injectionScreen_connecting_injected_h1:"Запрос на подключение",injectionScreen_connecting_injected_p:"Примите запрос в вашем кошельке, чтобы подключиться к приложению.",injectionScreen_connected_h1:"Уже подключен",injectionScreen_connected_p:"Можно закрыть это окно",injectionScreen_rejected_h1:"Запрос отменен",injectionScreen_rejected_p:`Вы отменили запрос. +Нажмите выше, чтобы попробовать снова.`,injectionScreen_failed_h1:"Сбой подключения",injectionScreen_failed_p:`Извините, что-то пошло не так. +Пожалуйста, попробуйте подключиться снова.`,injectionScreen_notconnected_h1:"Войдите в {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Для продолжения войдите в расширение {{ CONNECTORNAME }}.",profileScreen_heading:"Кошелек подключен",switchNetworkScreen_heading:"Переключение сетей",signInWithEthereumScreen_tooltip:`Вы не вошли в это приложение. +**Войдите с помощью Ethereum**, чтобы продолжить.`,signInWithEthereumScreen_signedOut_heading:"Войти с помощью Ethereum",signInWithEthereumScreen_signedOut_h1:`Это приложение хочет подтвердить вас + в качестве владельца этого кошелька.`,signInWithEthereumScreen_signedOut_p:`Пожалуйста, подпишите запрос на сообщение + в своем кошельке, чтобы продолжить.`,signInWithEthereumScreen_signedOut_button:"Войти",signInWithEthereumScreen_signedIn_heading:"Вошли с помощью Ethereum",signInWithEthereumScreen_signedIn_h1:`Вы успешно подтвердили себя + в качестве владельца этого кошелька.`,signInWithEthereumScreen_signedIn_p:`Выйти потребуется + повторная аутентификация в будущем.`,signInWithEthereumScreen_signedIn_button:"Выйти"},$je={connectWallet:"绑定钱包",disconnect:"解除绑定",connected:"已绑定",wrongNetwork:"错误网络",switchNetworks:"切换网络",chainNetwork:"{{ CHAIN }}网络",copyToClipboard:"复制到剪贴板",copyCode:"复制代码",moreInformation:"更多信息",back:"返回",close:"关闭",or:"或",more:"更多",tryAgain:"重试",tryAgainQuestion:"重试?",dontHaveTheApp:"没有该应用?",scanTheQRCode:"扫描二维码",useWalletConnectModal:"使用 WalletConnect 模态窗",useModal:"使用模态窗",installTheExtension:"安装扩展程序",getWalletName:"获取{{ CONNECTORNAME }}",otherWallets:"其他钱包",learnMore:"了解更多",getWallet:"获取钱包",approveInWallet:"在钱包中批准",confirmInWallet:"在钱包中确认",awaitingConfirmation:"等待确认",signIn:"登录",signOut:"登出",signedIn:"已登录",signedOut:"已登出",walletNotConnected:"钱包未绑定",warnings_walletSwitchingUnsupported:"您的钱包不支持从此应用切换网络。",warnings_walletSwitchingUnsupportedResolve:"请尝试从钱包中切换网络。",warnings_chainUnsupported:"此应用不支持当前连接的网络。",warnings_chainUnsupportedResolve:"请切换网络或断开连接以继续。",onboardingScreen_heading:"获取钱包",onboardingScreen_h1:"开始探索 Web3",onboardingScreen_p:"您的钱包是通往以太坊的一扇大门,而以太坊是探索 Web3 的一项神奇技术。",onboardingScreen_ctaText:"选择您的第一钱包",onboardingScreen_ctaUrl:"https://ethereum.org/zh/wallets/find-wallet/",aboutScreen_heading:"关于钱包",aboutScreen_a_h1:"对于您的数字资产",aboutScreen_a_p:"有了钱包,您可以发送、接收、存储数字资产及使用数字资产进行交互,例如 NFT 和其他以太坊通证等。",aboutScreen_b_h1:"更好的登录方式",aboutScreen_b_p:"使用现代应用,您的钱包可以用作简便的登录方法,而不必记住密码。",aboutScreen_c_h1:"探索 Web3 世界",aboutScreen_c_p:"您的钱包是一个重要的工具,可以让您探索并参与到快速发展的 Web3 世界。",aboutScreen_ctaText:"了解更多",aboutScreen_ctaUrl:"https://ethereum.org/zh/wallets/",connectorsScreen_heading:"绑定钱包",connectorsScreen_newcomer:"我没有钱包",connectorsScreen_h1:"什么是钱包?",connectorsScreen_p:"钱包可用于发送、接收和存储数字资产。通过绑定钱包,您可以与应用进行交互。",mobileConnectorsScreen_heading:"选择钱包",scanScreen_heading:"手机扫描",scanScreen_heading_withConnector:"手机扫描{{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"打开 [WALLETCONNECTLOGO] WalletConnect 支持的钱包进行扫描",scanScreen_tooltip_default:"打开您手机上的{{ CONNECTORNAME }} 进行扫描",downloadAppScreen_heading:"获取{{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"使用手机相机扫描以下载 iOS 或 Android 应用。",downloadAppScreen_ios:"使用手机相机扫描以下载 iOS 应用。",downloadAppScreen_android:"使用手机相机扫描以下载 Android 应用。",injectionScreen_unavailable_h1:"不支持的浏览器",injectionScreen_unavailable_p:"要绑定您的{{ CONNECTORSHORTNAME }}钱包,请在{{ SUGGESTEDEXTENSIONBROWSER }}上安装此扩展程序。",injectionScreen_install_h1:"安装{{ CONNECTORNAME }}",injectionScreen_install_p:"要绑定您的{{ CONNECTORSHORTNAME }}钱包,请安装此浏览器扩展程序。",injectionScreen_connecting_h1:"请求绑定",injectionScreen_connecting_p:"打开{{ CONNECTORSHORTNAME }}浏览器 扩展程序以绑定您的钱包。",injectionScreen_connecting_injected_h1:"请求绑定",injectionScreen_connecting_injected_p:"通过您的钱包接受请求,以绑定到此应用。",injectionScreen_connected_h1:"已绑定",injectionScreen_connected_p:"现在可以关闭此弹窗",injectionScreen_rejected_h1:"请求已取消",injectionScreen_rejected_p:"您已取消请求。点击上面可重试。",injectionScreen_failed_h1:"绑定失败",injectionScreen_failed_p:"抱歉,发生错误。请尝试重新绑定。",injectionScreen_notconnected_h1:"登录{{ CONNECTORNAME }}",injectionScreen_notconnected_p:"要继续,请登录到您的{{ CONNECTORNAME }}扩展程序。",profileScreen_heading:"已绑定",switchNetworkScreen_heading:"切换网络",signInWithEthereumScreen_tooltip:`您尚未登录到此应用。 +请选择**使用以太坊登录**以继续。`,signInWithEthereumScreen_signedOut_heading:"使用以太坊登录",signInWithEthereumScreen_signedOut_h1:"此应用希望验证您是 此钱包的所有者。",signInWithEthereumScreen_signedOut_p:"请签署钱包中的消息请求 以继续。",signInWithEthereumScreen_signedOut_button:"登录",signInWithEthereumScreen_signedIn_heading:"已使用以太坊登录",signInWithEthereumScreen_signedIn_h1:"您已成功验证自己 是此钱包的所有者。",signInWithEthereumScreen_signedIn_p:"登出后,将来您还需要 再次进行身份验证。",signInWithEthereumScreen_signedIn_button:"登出"},Hje={connectWallet:"Connecta la cartera",disconnect:"Desconnectar",connected:"Connectat",wrongNetwork:"Xarxa incorrecta",switchNetworks:"Canvi de xarxa",chainNetwork:"Xarxa {{ CHAIN }}",copyToClipboard:"Copia al portapapers",copyCode:"Copia codi",moreInformation:"Més informació",back:"Enrere",close:"Tanca",or:"o",more:"Més",tryAgain:"Torna-ho a intentar",tryAgainQuestion:"Tornar a intentar-ho?",dontHaveTheApp:"No tens l'aplicació?",scanTheQRCode:"Escaneja el codi QR",useWalletConnectModal:"Utilitza WalletConnect Modal",useModal:"Utilitza Modal",installTheExtension:"Instal·la l'extensió",getWalletName:"Obté {{ CONNECTORNAME }}",otherWallets:"Altres carteres",learnMore:"Més informació",getWallet:"Obté una cartera",approveInWallet:"Aprova a la cartera",confirmInWallet:"Confirma a la cartera",awaitingConfirmation:"Esperant confirmació",signIn:"Inicia sessió",signOut:"Tanca sessió",signedIn:"Sessió iniciada",signedOut:"Sessió tancada",walletNotConnected:"Cartera no connectada",warnings_walletSwitchingUnsupported:"La teva cartera no permet canviar de xarxa des d'aquesta aplicació.",warnings_walletSwitchingUnsupportedResolve:"Prova a canviar de xarxa des de la teva cartera.",warnings_chainUnsupported:"Aquesta aplicació no és compatible amb la xarxa connectada actualment.",warnings_chainUnsupportedResolve:"Canvia o desconnecta per continuar.",onboardingScreen_heading:"Obté una cartera",onboardingScreen_h1:"Comença a explorar la Web3",onboardingScreen_p:"La teva cartera és el portal d'accés a tot el relacionat amb Ethereum, la tecnologia màgica que permet explorar la Web3.",onboardingScreen_ctaText:"Tria la teva primera cartera",onboardingScreen_ctaUrl:"https://ethereum.org/es/wallets/find-wallet/",aboutScreen_heading:"Sobre les carteres",aboutScreen_a_h1:"Per als teus actius digitals",aboutScreen_a_p:"Les carteres et permeten enviar, rebre, emmagatzemar i interactuar amb actius digitals com els NFT i altres tokens d'Ethereum.",aboutScreen_b_h1:"Una manera millor d'iniciar sessió",aboutScreen_b_p:"Amb les aplicacions modernes, pots utilitzar la teva cartera per iniciar sessió fàcilment, en lloc de haver de recordar una contrasenya.",aboutScreen_c_h1:"Explora el món de la Web3",aboutScreen_c_p:"La teva cartera és una eina essencial que et permet explorar i participar en el món en ràpida evolució de la Web3.",aboutScreen_ctaText:"Més informació",aboutScreen_ctaUrl:"https://ethereum.org/es/wallets/",connectorsScreen_heading:"Connecta una cartera",connectorsScreen_newcomer:"No tinc una cartera",connectorsScreen_h1:"Què és una cartera?",connectorsScreen_p:"Les carteres s'utilitzen per enviar, rebre i emmagatzemar actius digitals. Si connectes una cartera, podràs interactuar amb les aplicacions.",mobileConnectorsScreen_heading:"Tria una cartera",scanScreen_heading:"Escaneja amb el telèfon",scanScreen_heading_withConnector:"Escaneja amb {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:"Obre una cartera compatible amb WalletConnect [WALLETCONNECTLOGO] per escanejar",scanScreen_tooltip_default:"Obre {{ CONNECTORNAME }} en el teu telèfon mòbil per escanejar",downloadAppScreen_heading:"Obté {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Escaneja amb la càmera del teu telèfon per descarregar-la en iOS o Android.",downloadAppScreen_ios:"Escaneja amb la càmera del teu telèfon per descarregar-la en iOS.",downloadAppScreen_android:"Escaneja amb la càmera del teu telèfon per descarregar-la en Android.",injectionScreen_unavailable_h1:"Navegador no compatible",injectionScreen_unavailable_p:"Per connectar la teva cartera de {{ CONNECTORSHORTNAME }}, instal·la l'extensió en {{ SUGGESTEDEXTENSIONBROWSER }}.",injectionScreen_install_h1:"Instal·la {{ CONNECTORNAME }}",injectionScreen_install_p:"Per connectar la teva cartera de {{ CONNECTORSHORTNAME }}, instal·la l'extensió del navegador.",injectionScreen_connecting_h1:"Sol·licitud de connexió",injectionScreen_connecting_p:"Obre l'extensió del navegador de {{ CONNECTORSHORTNAME }} per connectar la teva cartera.",injectionScreen_connecting_injected_h1:"Sol·licitud de connexió",injectionScreen_connecting_injected_p:"Accepta la sol·licitud a través de la teva cartera per connectar-te a aquesta aplicació.",injectionScreen_connected_h1:"Ja connectada",injectionScreen_connected_p:"Ja pots tancar aquesta finestra emergent",injectionScreen_rejected_h1:"Sol·licitud cancel·lada",injectionScreen_rejected_p:"Has cancel·lat la sol·licitud. Fes clic a dalt per tornar-ho a intentar.",injectionScreen_failed_h1:"Error de connexió",injectionScreen_failed_p:"Ho sentim, hi ha hagut un problema. Intenta connectar-te de nou.",injectionScreen_notconnected_h1:"Inicia sessió en {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Per continuar, inicia sessió en la teva extensió de {{ CONNECTORNAME }}.",profileScreen_heading:"Connectat",switchNetworkScreen_heading:"Canvi de xarxa",signInWithEthereumScreen_tooltip:`No has iniciat sessió en aquesta aplicació. +**Inicia sessió amb Ethereum** per continuar.`,signInWithEthereumScreen_signedOut_heading:"Inicia sessió amb Ethereum",signInWithEthereumScreen_signedOut_h1:"Aquesta aplicació vol verificar que ets el propietari d'aquesta cartera.",signInWithEthereumScreen_signedOut_p:"Signa la sol·licitud de missatge en la teva cartera per continuar.",signInWithEthereumScreen_signedOut_button:"Inicia sessió",signInWithEthereumScreen_signedIn_heading:"Sessió iniciada amb Ethereum",signInWithEthereumScreen_signedIn_h1:"T'has verificat correctament com a propietari d'aquesta cartera.",signInWithEthereumScreen_signedIn_p:"Si tanques la sessió, hauràs de tornar a autenticar-te més endavant.",signInWithEthereumScreen_signedIn_button:"Tanca sessió"},Vje={connectWallet:"Cüzdan Bağla",disconnect:"Bağlantıyı Kes",connected:"Bağlandı",wrongNetwork:"Yanlış Ağ",switchNetworks:"Ağ Değiştir",chainNetwork:"{{ CHAIN }} Ağı",copyToClipboard:"Panoya Kopyala",copyCode:"Kodu Kopyala",moreInformation:"Daha Fazla Bilgi",back:"Geri",close:"Kapat",or:"veya",more:"Daha Fazla",tryAgain:"Tekrar Dene",tryAgainQuestion:"Tekrar Dene?",dontHaveTheApp:"Uygulaman yok mu?",scanTheQRCode:"Karekodu tarat",useWalletConnectModal:"WalletConnect Modalini Kullan ",useModal:"Modal Kullan",installTheExtension:"Eklentiyi İndir",getWalletName:"{{ CONNECTORNAME }} Alın",otherWallets:"Diğer Cüzdanlar",learnMore:"Daha Fazlasını Öğren",getWallet:"Cüzdan Al",approveInWallet:"Cüzdanda Yetki Ver",confirmInWallet:"Cüzdanda Onayla",awaitingConfirmation:"Doğrulama Bekleniyor",signIn:"Giriş Yap",signOut:"Çıkış Yap",signedIn:"Giriş Yapıldı",signedOut:"Çıkış Yapıldı",walletNotConnected:"Cüzdan Bağlı Değil",warnings_walletSwitchingUnsupported:"Bu uygulamada ağ değiştirmeyi cüzdanın desteklemiyor.",warnings_walletSwitchingUnsupportedResolve:"Bunun yerine cüzdanınızdan ağları değiştirmeyi deneyin.",warnings_chainUnsupported:"Bu uygulama kullanmış olduğunuz ağı desteklemiyor.",warnings_chainUnsupportedResolve:"Devam etmek için ağ değiştir veya bağlantıyı kes.",onboardingScreen_heading:"Cüzdan Al",onboardingScreen_h1:"Web3'ü keşfetmeye başla",onboardingScreen_p:"Cüzdanınız, Web3'ü keşfetmeyi mümkün kılan sihirli teknoloji olan Ethereum'a açılan kapıdır.",onboardingScreen_ctaText:"İlk Cüzdanını Seç",onboardingScreen_ctaUrl:"https://ethereum.org/tr/wallets/find-wallet/",aboutScreen_heading:"Cüzdanlar Hakkında",aboutScreen_a_h1:"Dijital varlıkların için",aboutScreen_a_p:"Cüzdanlar, NFT'ler ve diğer Ethereum varlıkları gibi dijital varlıklar göndermenize, almanıza, saklamanıza ve bunlarla etkileşim kurmanıza olanak tanır.",aboutScreen_b_h1:"Giriş yapmanın daha iyi bir yolu",aboutScreen_b_p:"Modern uygulamalar ile parola hatırlamak yerine cüzdanınız ile kolayca giriş yapabilirsiniz.",aboutScreen_c_h1:"Web3 dünyasını keşfet",aboutScreen_c_p:"Cüzdanınız, hızla gelişen Web3 dünyasını keşfetmenizi ve bu dünyaya katılmanızı sağlayan temel bir yardımcı programdır.",aboutScreen_ctaText:"Daha Fazlasını Öğren",aboutScreen_ctaUrl:"https://ethereum.org/tr/wallets/",connectorsScreen_heading:"Cüzdan Bağla",connectorsScreen_newcomer:"Cüzdanım Yok",connectorsScreen_h1:"Cüzdan nedir?",connectorsScreen_p:"Cüzdanlar, dijital varlıkları göndermek, almak ve depolamak için kullanılır. Bir cüzdanı bağlamak, uygulamalarla etkileşime geçmenizi sağlar.",mobileConnectorsScreen_heading:"Cüzdan Seç",scanScreen_heading:"Telefon ile Tarat",scanScreen_heading_withConnector:"{{ CONNECTORNAME }} ile tarat",scanScreen_tooltip_walletConnect:`Desteklenen bir cüzdan taramak için + [WALLETCONNECTLOGO] WalletConnect uygulamasını aç`,scanScreen_tooltip_default:`Taramak için telefonunda + {{ CONNECTORNAME }} uygulamasını aç`,downloadAppScreen_heading:"{{ CONNECTORNAME }} İndir",downloadAppScreen_iosAndroid:"iOS ve Android'e indirmek için telefon kameran ile tarat.",downloadAppScreen_ios:"iOS'a indirmek için telefon kameran ile tarat.",downloadAppScreen_android:"Android'e indirmek için telefon kameran ile tarat.",injectionScreen_unavailable_h1:"Desteklenmeyen Tarayıcı",injectionScreen_unavailable_p:`{{ CONNECTORSHORTNAME }} cüzdanına bağlanmak için +{{ SUGGESTEDEXTENSIONBROWSER }} üzerinde indirmen gerekiyor.`,injectionScreen_install_h1:"{{ CONNECTORNAME }} İndir",injectionScreen_install_p:`{{ CONNECTORSHORTNAME }} cüzdanına bağlanmak için, +tarayıcı eklentisini indir.`,injectionScreen_connecting_h1:"Bağlantı İsteniyor.",injectionScreen_connecting_p:`Cüzdanını bağlamak için + tarayıcıdan {{ CONNECTORSHORTNAME }} uzantısını açın.`,injectionScreen_connecting_injected_h1:"Bağlantı İsteniyor.",injectionScreen_connecting_injected_p:"Bu uygulamaya bağlanmak için cüzdanına gelen isteği kabul et.",injectionScreen_connected_h1:"Zaten Bağlanmış",injectionScreen_connected_p:"Bu açılır pencereyi artık kapatabilirsin",injectionScreen_rejected_h1:"İstek iptal edildi.",injectionScreen_rejected_p:`İsteği iptal ettin. +Tekrar denemek için yukarıyı tıklayın.`,injectionScreen_failed_h1:"Bağlantı Başarısız",injectionScreen_failed_p:`Üzgünüz, bir şeyler ters gitti. +Lütfen daha sonra tekrar deneyin.`,injectionScreen_notconnected_h1:"{{ CONNECTORNAME }} ile giriş yap",injectionScreen_notconnected_p:"Devam etmek için, {{ CONNECTORNAME }} eklentisine giriş yapın.",profileScreen_heading:"Bağlandı",switchNetworkScreen_heading:"Ağ Değiştir",signInWithEthereumScreen_tooltip:`Bu uygulamada oturum açmadınız. + Devam etmek için **Ethereum İle Giriş Yap**.`,signInWithEthereumScreen_signedOut_heading:"Ethereum İle Giriş Yap",signInWithEthereumScreen_signedOut_h1:`Bu uygulama seni + bu cüzdanın sahibi olarak doğrulamak istiyor.`,signInWithEthereumScreen_signedOut_p:`Devam etmek için + cüzdanınızdaki isteği onaylayın.`,signInWithEthereumScreen_signedOut_button:"Giriş Yap",signInWithEthereumScreen_signedIn_heading:"Ethereum İle Giriş Yapıldı",signInWithEthereumScreen_signedIn_h1:`Bu cüzdanın sahibi olduğunu + başarıyla onayladın.`,signInWithEthereumScreen_signedIn_p:`Çıkış yaparsan ileride + tekrar giriş yapman gerekecek. `,signInWithEthereumScreen_signedIn_button:"Çıkış Yap"},Wje={connectWallet:"Kết nối ví",disconnect:"Ngắt kết nối",connected:"Đã kết nối",wrongNetwork:"Mạng không hỗ trợ",switchNetworks:"Đổi mạng",chainNetwork:"Mạng {{ CHAIN }}",copyToClipboard:"Sao chép",copyCode:"Sao chép mã",moreInformation:"Thêm thông tin",back:"Quay lại",close:"Đóng",or:"hoặc",more:"Thêm",tryAgain:"Thử lại",tryAgainQuestion:"Thử lại?",dontHaveTheApp:"Không có app?",scanTheQRCode:"Quét mã QR",useWalletConnectModal:"Dùng WalletConnect Modal",useModal:"Dùng Modal",installTheExtension:"Cài tiện ích",getWalletName:"Lấy {{ CONNECTORNAME }}",otherWallets:"Các ví khác",learnMore:"Xem thêm",getWallet:"Tạo một ví",approveInWallet:"Cấp quyền trong ví",confirmInWallet:"Xác nhận trong ví",awaitingConfirmation:"Đang chờ xác nhận",signIn:"Đăng nhập",signOut:"Đăng xuất",signedIn:"Đã đăng nhập",signedOut:"Đã đăng xuất",walletNotConnected:"Chưa kết nối ví",warnings_walletSwitchingUnsupported:"Ví của bạn không hỗ trợ đổi mạng từ ứng dụng.",warnings_walletSwitchingUnsupportedResolve:"Hãy thử đổi mạng từ phía ví của bạn.",warnings_chainUnsupported:"Ứng dụng này không hỗ trợ mạng hiện tại.",warnings_chainUnsupportedResolve:"Đổi hoặc ngắt kết nối để tiếp tục.",onboardingScreen_heading:"Tạo một ví",onboardingScreen_h1:"Bắt đầu khám khá Web3",onboardingScreen_p:"Ví của bạn là cổng giao tiếp mọi thứ trên Ethereum, công nghệ tuyệt vời giúp khám phá Web3.",onboardingScreen_ctaText:"Chọn ví đầu tiên của bạn",onboardingScreen_ctaUrl:"https://ethereum.org/en/wallets/find-wallet/",aboutScreen_heading:"Giới thiệu các ví",aboutScreen_a_h1:"Cho tài sản số của bạn",aboutScreen_a_p:"Các ví để bạn gửi, nhận, lưu trữ, và tương tác với các tài sản điện tử như NFTs và các loại tiền Ethereum khác.",aboutScreen_b_h1:"Một cách tốt hơn để đăng nhập",aboutScreen_b_p:"Với các ứng dụng hiện đại, ví của bạn có thể dùng để đăng nhập dễ dàng thay vì phải nhớ tài khoản và mật khẩu.",aboutScreen_c_h1:"Khám phá thế giới Web3",aboutScreen_c_p:"Ví của bạn là một tiện ích thiết yếu cho phép bạn khám phá và tham gia vào thế giới web3 đang phát triển nhanh chóng.",aboutScreen_ctaText:"Tìm hiểu thêm",aboutScreen_ctaUrl:"https://ethereum.org/en/wallets/",connectorsScreen_heading:"Kết nối Ví",connectorsScreen_newcomer:"Tôi chưa có ví",connectorsScreen_h1:"Ví là gì?",connectorsScreen_p:"Ví dùng để gửi, nhận, và lưu trữ các tài sản điện tử. Kết nối với một ví giúp bạn tương tác với các ứng dụng.",mobileConnectorsScreen_heading:"Chọn ví",scanScreen_heading:"Scan bằng điện thoại",scanScreen_heading_withConnector:"Quét với {{ CONNECTORNAME }}",scanScreen_tooltip_walletConnect:`Mở một [WALLETCONNECTLOGO] mà WalletConnect + hỗ trợ để quét`,scanScreen_tooltip_default:`Mở {{ CONNECTORNAME }} trong +điện thoại của bạn để quét`,downloadAppScreen_heading:"Lấy {{ CONNECTORNAME }}",downloadAppScreen_iosAndroid:"Quét bằng camera trên điện thoại của bạn để tải về cho iOS hoặc Android.",downloadAppScreen_ios:"Quét bằng camera trên điện thoại ủa bạn để tải về cho iOS.",downloadAppScreen_android:"Quét bằng camera trên điện thoại ủa bạn để tải về cho Android.",injectionScreen_unavailable_h1:"Trình duyệt không được hỗ trợ",injectionScreen_unavailable_p:`Để kết nối ví {{ CONNECTORSHORTNAME }} của bạn, +cài đặt tiện ích trên {{ SUGGESTEDEXTENSIONBROWSER }}.`,injectionScreen_install_h1:"Cài {{ CONNECTORNAME }}",injectionScreen_install_p:`Để kết nối ví {{ CONNECTORSHORTNAME }}, +cài đặt tiện ích trên trình duyệt.`,injectionScreen_connecting_h1:"Đang yêu cầu kết nối",injectionScreen_connecting_p:`Mở tiện ích {{ CONNECTORSHORTNAME }} + trên trình duyệt để kết nối.`,injectionScreen_connecting_injected_h1:"Đang yêu cầu kết nối",injectionScreen_connecting_injected_p:"Đồng ý yêu cầu từ phía ví của bạn để kết nối ứng dụng này.",injectionScreen_connected_h1:"Đã kết nối",injectionScreen_connected_p:"Đã có thể đóng popup",injectionScreen_rejected_h1:"Đã hủy yêu cầu",injectionScreen_rejected_p:`Bạn vừa hủy yêu cầu. +Nhấn phía trên để thử lại.`,injectionScreen_failed_h1:"Kết nối không thành công",injectionScreen_failed_p:`Xin lỗi, có gì đó không đúng. +Vui lòng thử lại.`,injectionScreen_notconnected_h1:"Đăng nhập vào {{ CONNECTORNAME }}",injectionScreen_notconnected_p:"Để tiếp tục, vui lòng đăng nhập bằng tiện ích {{ CONNECTORNAME }}.",profileScreen_heading:"Đã kết nối",switchNetworkScreen_heading:"Đổi mạng",signInWithEthereumScreen_tooltip:`Bạn chưa đăng nhập vào ứng dụng. +**Đăng nhập qua Ethereum** để tiếp tục.`,signInWithEthereumScreen_signedOut_heading:"Đăng nhập qua Ethereum",signInWithEthereumScreen_signedOut_h1:`Ứng dụng này muốn xác nhận bạn + là chủ sở hữu của ví.`,signInWithEthereumScreen_signedOut_p:`Vui lòng ký tin nhắn yêu cầu + trên ví của bạn để tiếp tục.`,signInWithEthereumScreen_signedOut_button:"Đăng nhập",signInWithEthereumScreen_signedIn_heading:"Đăng nhập qua Ethereum",signInWithEthereumScreen_signedIn_h1:"Bạn đã xác nhận thành công.",signInWithEthereumScreen_signedIn_p:`Sau khi Đăng xuất bạn sẽ cần + xác nhận lại trong làn tiếp theo.`,signInWithEthereumScreen_signedIn_button:"Đăng xuất"},Gje=e=>{switch(e){case"ee-EE":return Bje;case"ar-AE":return Oje;case"es-ES":return Mje;case"fa-IR":return Dje;case"fr-FR":return jje;case"ja-JP":return Fje;case"pt-BR":return Uje;case"ru-RU":return zje;case"zh-CN":return $je;case"ca-AD":return Hje;case"tr-TR":return Vje;case"vi-VN":return Wje;default:return Lje}};function Ci(e){var t,n;const i=(n=(t=Cn().options)===null||t===void 0?void 0:t.language)!==null&&n!==void 0?n:"en-US",o=j.useMemo(()=>Gje(i),[i]);if(!o)return console.error(`Missing translations for: ${i}`),`Missing translations for: ${i}`;const s={};return Object.keys(o).map(a=>{const c=o[a];return s[a]=Kje(c,e)}),s}const Kje=(e,t)=>{let n=e;return t&&Object.keys(t).forEach(r=>{n=n.replace(new RegExp(`({{ ${r} }})`,"g"),t[r])}),Qje(n)},Qje=e=>{let t=e;return t=t.split(` +`),t=t.map((n,r)=>g.jsxs(Gn.Fragment,{children:[Yje(n),re.split(/(\*\*[^\*]*\*\*)/g).map((r,i)=>/(\*\*.*\*\*)/g.test(r)?g.jsx("strong",{children:r.replace(/\*\*/g,"")},i):`${r}`).map(r=>typeof r=="string"?r.split(/(\[WALLETCONNECTLOGO\])/g).map(i=>i==="[WALLETCONNECTLOGO]"?g.jsx("span",{className:"ck-tt-logo",children:g.jsx(Nt.WalletConnect,{})},i):i):r),MH={debug:10,info:20,warn:30,error:40,none:100},qje=typeof window<"u"&&window.document&&window.document.createElement!==void 0?j.useLayoutEffect:j.useEffect,Zje=({logLevel:e="info",maxFontSize:t=100,minFontSize:n=20,onFinish:r,onStart:i,resolution:o=5}={})=>{const s=MH[e],a=j.useCallback(()=>({calcKey:0,fontSize:t,fontSizePrev:n,fontSizeMax:t,fontSizeMin:n}),[t,n]),c=j.useRef(null),u=j.useRef(),l=j.useRef(!1),[d,f]=j.useState(a),{calcKey:h,fontSize:p,fontSizeMax:m,fontSizeMin:x,fontSizePrev:y}=d;let b=null;const[v]=j.useState(()=>new kMe(()=>{b=window.requestAnimationFrame(()=>{l.current||(i&&i(),l.current=!0,f({...a(),calcKey:h+1}))})}));j.useEffect(()=>(c.current&&v.observe(c.current),()=>{b&&window.cancelAnimationFrame(b),v.disconnect()}),[b,v]);const w=c.current&&c.current.innerHTML;return j.useEffect(()=>{h===0||l.current||(w!==u.current&&(i&&i(),f({...a(),calcKey:h+1})),u.current=w)},[h,a,w,i]),qje(()=>{if(h===0)return;const E=Math.abs(p-y)<=o,S=!!c.current&&(c.current.scrollHeight>c.current.offsetHeight||c.current.scrollWidth>c.current.offsetWidth),I=S&&p===y,A=p>y;if(E){I?(l.current=!1,s<=MH.info&&console.info(`[use-fit-text] reached \`minFontSize = ${n}\` without fitting text`)):S?f({fontSize:A?y:x,fontSizeMax:m,fontSizeMin:x,fontSizePrev:y,calcKey:h}):(l.current=!1,r&&r(p));return}let O,N=m,R=x;S?(O=A?y-p:x-p,N=Math.min(m,p)):(O=A?m-p:y-p,R=Math.max(x,p)),f({calcKey:h,fontSize:p+O/2,fontSizeMax:N,fontSizeMin:R,fontSizePrev:p})},[h,p,m,x,y,r,c,o]),{fontSize:p,ref:c}},Sa=({children:e})=>{const[t,n]=Gn.useState(!1),{fontSize:r,ref:i}=Zje({logLevel:"none",maxFontSize:100,minFontSize:70,onStart:()=>n(!0),onFinish:()=>n(!0)});return g.jsx("div",{ref:i,style:{visibility:t?"visible":"hidden",fontSize:`${r}%`,maxHeight:"100%",maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e})};Sa.displayName="FitText";function tae(){const e=Oee();return e??[]}function nae(e,t){const n=tae();return e==="injected"&&t?n.find(r=>r.id===e&&r.name===t):e==="injected"?n.find(r=>r.id===e&&r.name.includes("Injected")):n.find(r=>r.id===e)}function Jje(){return nae("walletConnect")}const w5=e=>{const n=PB().find(r=>r.id===e);return n||null},PB=()=>{const e=tae(),t=Cn();return e.map(r=>{var i,o;const s=Object.keys(Mu).find(c=>c.split(",").map(u=>u.trim()).indexOf(r.id)!==-1),a={id:r.id,name:(o=(i=r.name)!==null&&i!==void 0?i:r.id)!==null&&o!==void 0?o:r.type,icon:g.jsx("img",{src:r.icon,alt:r.name,width:"100%",height:"100%"}),connector:r,iconShape:"squircle",isInstalled:r.type==="mock"||r.type==="injected"&&r.id!=="metaMask"||g9(r.id)};if(s){const c=Mu[s];return{...a,iconConnector:r.icon?g.jsx("img",{src:r.icon,alt:r.name,width:"100%",height:"100%"}):void 0,...c}}return a}).filter((r,i,o)=>o.findIndex(s=>s.id===r.id)===i).map(r=>{var i,o;return r.id==="walletConnect"?{...r,name:((i=t.options)===null||i===void 0?void 0:i.walletConnectName)||r.name,shortName:((o=t.options)===null||o===void 0?void 0:o.walletConnectName)||r.shortName}:r}).filter((r,i,o)=>!(r.id==="coinbaseWalletSDK"&&o.find(s=>s.id==="com.coinbase.wallet"))).filter((r,i,o)=>!((r.id==="metaMaskSDK"||r.id==="metaMask")&&o.find(s=>s.id==="io.metamask"||s.id==="io.metamask.mobile"))).sort((r,i)=>{const o=r.isInstalled&&IH(r.connector.type),s=i.isInstalled&&IH(i.connector.type);return o&&!s?-1:!o&&s?1:0}).sort((r,i)=>r.id==="walletConnect"?1:i.id==="walletConnect"?-1:0)},Xje=({isSignedIn:e})=>g.jsxs("div",{style:{position:"relative"},children:[e?g.jsx(Nje,{style:{bottom:-1,right:-1}}):g.jsx("div",{style:{zIndex:2,position:"absolute",top:-2,right:-2,background:"#1A88F8",borderRadius:8,boxShadow:"0 0 0 2px var(--ck-body-background)",width:8,height:8}}),g.jsxs("svg",{"aria-hidden":"true",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{overflow:"visible"},children:[g.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2"}),g.jsx("path",{d:"M16.5 16.775C14.8618 15.0649 12.5552 14 10 14C7.44477 14 5.13825 15.0649 3.5 16.775",stroke:"currentColor",strokeWidth:"2"}),g.jsx("circle",{cx:"10",cy:"8",r:"3",stroke:"currentColor",strokeWidth:"2"})]})]}),eFe=({...e})=>g.jsx("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11C20 15.9706 15.9706 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2C15.9706 2 20 6.02944 20 11ZM22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM11.6445 12.7051C11.6445 13.1348 11.3223 13.4678 10.7744 13.4678C10.2266 13.4678 9.92578 13.1885 9.92578 12.6191V12.4795C9.92578 11.4268 10.4951 10.8574 11.2686 10.3203C12.2031 9.67578 12.665 9.32129 12.665 8.59082C12.665 7.76367 12.0205 7.21582 11.043 7.21582C10.3232 7.21582 9.80762 7.57031 9.45312 8.16113C9.38282 8.24242 9.32286 8.32101 9.2667 8.39461C9.04826 8.68087 8.88747 8.8916 8.40039 8.8916C8.0459 8.8916 7.66992 8.62305 7.66992 8.15039C7.66992 7.96777 7.70215 7.7959 7.75586 7.61328C8.05664 6.625 9.27051 5.75488 11.1182 5.75488C12.9336 5.75488 14.5234 6.71094 14.5234 8.50488C14.5234 9.7832 13.7822 10.417 12.7402 11.1045C11.999 11.5986 11.6445 11.9746 11.6445 12.5762V12.7051ZM11.9131 15.5625C11.9131 16.1855 11.376 16.6797 10.7529 16.6797C10.1299 16.6797 9.59277 16.1748 9.59277 15.5625C9.59277 14.9395 10.1191 14.4453 10.7529 14.4453C11.3867 14.4453 11.9131 14.9287 11.9131 15.5625Z",fill:"currentColor"})}),DH=({...e})=>g.jsx(Se.svg,{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{d:"M1 13L13 1M1 1L13 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),tFe=({...e})=>g.jsx(Se.svg,{width:9,height:16,viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{d:"M8 1L1 8L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),XS=.22,jH={initial:{zIndex:2,opacity:0},animate:{opacity:1,scale:1,transition:{duration:XS*.75,delay:XS*.25,ease:[.26,.08,.25,1]}},exit:{zIndex:1,opacity:0,pointerEvents:"none",position:"absolute",left:["50%","50%"],x:["-50%","-50%"],transition:{duration:XS,ease:[.26,.08,.25,1]}}},nFe=({open:e,pages:t,pageId:n,positionInside:r,inline:i,demo:o,onClose:s,onBack:a,onInfo:c})=>{var u,l,d,f,h,p,m,x,y,b,v,w;const E=Cn(),S=UE(),I=Tm(),{isSignedIn:A,reset:O}=zE(),N=w5((u=E.connector)===null||u===void 0?void 0:u.id),R={name:N==null?void 0:N.name,shortName:(l=N==null?void 0:N.shortName)!==null&&l!==void 0?l:N==null?void 0:N.name,icon:(d=N==null?void 0:N.iconConnector)!==null&&d!==void 0?d:N==null?void 0:N.icon,iconShape:(f=N==null?void 0:N.iconShape)!==null&&f!==void 0?f:"circle",iconShouldShrink:N==null?void 0:N.iconShouldShrink},_=Ci({CONNECTORNAME:R==null?void 0:R.name}),[M,z]=Lse({timeout:160,preEnter:!0,mountOnEnter:!0,unmountOnExit:!0}),F=!(M==="exited"||M==="unmounted"),$=M==="preEnter"||M!=="exiting",W=E.route===it.CONNECTORS?0:E.route===it.DOWNLOAD?2:1,G=BH(W,W);r||qse(F),BH(n,n),j.useEffect(()=>{z(e),e&&V(void 0)},[e]);const[H,L]=j.useState({width:void 0,height:void 0}),[q,V]=j.useState(void 0),P=Me=>{const re={width:Me==null?void 0:Me.offsetWidth,height:Me==null?void 0:Me.offsetHeight};L({width:`${re==null?void 0:re.width}px`,height:`${re==null?void 0:re.height}px`})};let K;const ce=j.useCallback(Me=>{Me&&(me.current=Me,V(q!==void 0),clearTimeout(K),K=setTimeout(()=>V(!1),360),P(Me))},[e,q]),{chain:X}=Xo(),{switchChain:ke}=$O(),me=j.useRef(null);j.useEffect(()=>{me.current&&P(me.current)},[X,ke,I,A,E.options,E.resize]),j.useEffect(()=>{if(!F){L({width:void 0,height:void 0});return}const Me=re=>{re.key==="Escape"&&s&&s()};return document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)}},[F,s]);const Re={"--height":H.height,"--width":H.width};function Be(){return N?!(!N.getWalletConnectDeeplink||N.isInstalled):!1}function Le(){var Me;switch(E.route){case it.ABOUT:return _.aboutScreen_heading;case it.CONNECT:return Be()?_m((Me=N==null?void 0:N.connector)===null||Me===void 0?void 0:Me.id)?_.scanScreen_heading:_.scanScreen_heading_withConnector:R==null?void 0:R.name;case it.CONNECTORS:return _.connectorsScreen_heading;case it.MOBILECONNECTORS:return _.mobileConnectorsScreen_heading;case it.DOWNLOAD:return _.downloadAppScreen_heading;case it.ONBOARDING:return _.onboardingScreen_heading;case it.PROFILE:return _.profileScreen_heading;case it.SWITCHNETWORKS:return _.switchNetworkScreen_heading;case it.SIGNINWITHETHEREUM:return A?_.signInWithEthereumScreen_signedIn_heading:_.signInWithEthereumScreen_signedOut_heading;default:return""}}const Ne=g.jsx(s4,{$useTheme:(h=o==null?void 0:o.theme)!==null&&h!==void 0?h:S.theme,$useMode:(p=o==null?void 0:o.mode)!==null&&p!==void 0?p:S.mode,$customTheme:(m=o==null?void 0:o.customTheme)!==null&&m!==void 0?m:S.customTheme,children:g.jsxs(bje,{role:"dialog",style:{pointerEvents:$?"auto":"none",position:r?"absolute":void 0},children:[!i&&g.jsx(fje,{$active:$,onClick:s,$blur:(x=E.options)===null||x===void 0?void 0:x.overlayBlur}),g.jsxs(xje,{style:Re,initial:!1,children:[g.jsx("div",{style:{pointerEvents:q?"all":"none",position:"absolute",top:0,bottom:0,left:"50%",transform:"translateX(-50%)",width:"var(--width)",zIndex:9,transition:"width 200ms ease"}}),g.jsxs(Gse,{className:`${$&&"active"}`,children:[g.jsx(pr,{initial:!1,children:((y=E.options)===null||y===void 0?void 0:y.disclaimer)&&E.route===it.CONNECTORS&&g.jsx(wje,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{delay:0,duration:.2,ease:[.25,.1,.25,1]},children:g.jsx(TB,{children:g.jsx("div",{children:(b=E.options)===null||b===void 0?void 0:b.disclaimer})})})}),g.jsx(pr,{initial:!1,children:E.errorMessage&&g.jsxs(oje,{initial:{y:"10%",x:"-50%"},animate:{y:"-100%"},exit:{y:"100%"},transition:{duration:.2,ease:"easeInOut"},children:[g.jsx("span",{children:E.errorMessage}),g.jsx("div",{onClick:()=>E.displayError(null),style:{position:"absolute",right:24,top:24,cursor:"pointer"},children:g.jsx(DH,{})})]})}),g.jsxs(Kse,{children:[s&&g.jsx(kI,{"aria-label":Ju(_.close).toString(),onClick:s,children:g.jsx(DH,{})}),g.jsx("div",{style:{position:"absolute",top:23,left:20,width:32,height:32},children:g.jsx(pr,{children:a?g.jsx(TI,{disabled:q,"aria-label":Ju(_.back).toString(),onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:I?0:.1,delay:I?.01:0},children:g.jsx(tFe,{})},"backButton"):E.route===it.PROFILE&&E.signInWithEthereum?g.jsxs(g.Fragment,{children:[!A&&!(!((v=E.options)===null||v===void 0)&&v.hideTooltips)&&g.jsx(Se.div,{style:{position:"absolute",inset:0,pointerEvents:"none"},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,transition:{delay:.5,duration:.2}},exit:{opacity:0,scale:.6,transition:{delay:0,duration:I?0:.1}},children:g.jsx(Eje,{children:_.signInWithEthereumScreen_tooltip})}),g.jsx(vje,{disabled:q,"aria-label":_.signInWithEthereumScreen_signedOut_heading,onClick:()=>{O(),E.setRoute(it.SIGNINWITHETHEREUM)},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:I?0:.1,delay:I?.01:0},children:g.jsx(Xje,{isSignedIn:A})},"siweButton")]}):c&&!(!((w=E.options)===null||w===void 0)&&w.hideQuestionMarkCTA)&&g.jsx(_I,{disabled:q,"aria-label":Ju(_.moreInformation).toString(),onClick:c,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:I?0:.1,delay:I?.01:0},children:g.jsx(eFe,{})},"infoButton")})})]}),g.jsx(m9,{children:g.jsx(pr,{children:g.jsx(Se.div,{style:{position:"absolute",top:0,bottom:0,left:52,right:52,display:"flex",justifyContent:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:I?0:.17,delay:I?.01:0},children:g.jsx(Sa,{children:Le()})},`${E.route}-${A?"signedIn":""}`)})}),g.jsx(yje,{children:Object.keys(t).map(Me=>{const re=t[Me];return g.jsx(rFe,{open:Me===n,initial:!r&&M!=="entered",enterAnim:Me===n?W>G?"active-scale-up":"active":"",exitAnim:Me!==n?W{const[a,c]=Lse({timeout:400,preEnter:!0,initialEntered:t,mountOnEnter:!0,unmountOnExit:!0}),u=!(a==="exited"||a==="unmounted"),l=a==="preEnter"||a!=="exiting";return j.useEffect(()=>{c(t)},[t]),u?g.jsx(Qse,{className:`${l?o:s}`,style:{animationDuration:n?"0ms":void 0,animationDelay:n?"0ms":void 0},children:e}):null},y9=({children:e})=>{const t=Ci();return g.jsx(lje,{children:g.jsx("span",{children:e??t.or})})},iFe=Ee(Se.div)` + position: relative; + margin: 16px auto 20px; + height: 190px; + max-width: 295px; + pointer-events: none; + user-select: none; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + height: 200px; + max-width: 100%; + margin-bottom: 32px; + } +`,oFe=Ee(Se.div)` + position: absolute; + inset: 0; + z-index: 2; +`,sFe=dn` + 0%{ + opacity:0; + transform:scale(0.9); + } + 100%{ + opacity:1; + transform:none; + } +`,aFe=Ee(Se.div)` + z-index: 1; + position: absolute; + inset: 0; + top: -2px; + overflow: hidden; + &:before { + content: ''; + position: absolute; + inset: 0; + background: var(--ck-body-background); + background: radial-gradient( + closest-side, + var(--ck-body-background-transparent, transparent) 18.75%, + var(--ck-body-background) 100% + ); + background-size: 100%; + } + svg { + display: block; + width: 100%; + height: auto; + } + animation: ${sFe} 1000ms 100ms ease both; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + animation: none; + } +`,cFe=dn` + 0%{ + opacity:0; + transform:scale(0) translateY(40%); + } + 100%{ + opacity:1; + transform:none; + } +`,Sc=Ee(Se.div)` + position: absolute; + inset: 0; + animation: cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite both; + animation-delay: inherit; +`,jp=Ee(Se.div)` + position: absolute; +`,Fp=Ee(Se.div)` + position: relative; + overflow: hidden; + height: 58px; + width: 58px; + border-radius: 13.84px; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 20px 0 rgba(0, 0, 0, 0.03); + + svg { + display: block; + width: 100%; + height: 100%; + } +`,uFe=dn` + 0%,100%{ transform:none; } + 50%{ transform: translateY(-10%) } +`,ka=Ee(Se.div)` + position: relative; + animation: cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite both; + animation-name: ${uFe}; + animation-duration: 3600ms; +`,lFe=dn` + 0%,100%{ transform:rotate(-3deg); } + 50%{ transform:rotate(3deg); } +`,Ta=Ee(Se.div)` + position: relative; + animation: cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite both; + animation-name: ${lFe}; + animation-duration: 3200ms; +`,ty=Ee(Se.div)` + position: absolute; + inset: 0; + + animation: ${cFe} 750ms cubic-bezier(0.19, 1, 0.22, 1) both; + &:nth-child(1){ z-index:2; animation-delay:0ms; } + &:nth-child(2){ z-index:1; animation-delay:60ms; } + &:nth-child(3){ z-index:1; animation-delay:30ms; } + &:nth-child(4){ z-index:1; animation-delay:90ms; } + &:nth-child(5){ z-index:1; animation-delay:120ms;} + + &:nth-child(1){ ${Ta}{ animation-delay:0ms; } } + &:nth-child(2){ ${Ta}{ animation-delay:-600ms; } } + &:nth-child(3){ ${Ta}{ animation-delay:-1200ms; } } + &:nth-child(4){ ${Ta}{ animation-delay:-1800ms; } } + &:nth-child(5){ ${Ta}{ animation-delay:-2400ms; } } + + &:nth-child(1){ ${ka}{ animation-delay:-200ms; } } + &:nth-child(2){ ${ka}{ animation-delay:-600ms; } } + &:nth-child(3){ ${ka}{ animation-delay:-800ms; } } + &:nth-child(4){ ${ka}{ animation-delay:-300ms; } } + &:nth-child(5){ ${ka}{ animation-delay:-3200ms; } } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + animation: none !important; + ${Ta},${ka} { + animation: none !important; + } + } + + ${jp} { + transform: translate(-50%, -50%); + } + + &:nth-child(1) ${Sc} { + transform: translate(50%, 50%); + ${Fp} { + border-radius: 17.2px; + width: 72px; + height: 72px; + } + } + &:nth-child(2) ${Sc} { + transform: translate(21%, 21.5%); + } + &:nth-child(3) ${Sc} { + transform: translate(78%, 14%); + } + &:nth-child(4) ${Sc} { + transform: translate(22.5%, 76%); + } + &:nth-child(5) ${Sc} { + transform: translate(76%, 80%); + } +`;var dFe=g.jsxs("svg",{"aria-hidden":"true",width:"298",height:"188",viewBox:"0 0 298 188",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M1 55.2757L21.6438 46.0285C55.5896 30.8228 94.4104 30.8228 128.356 46.0286L169.644 64.5229C203.59 79.7287 242.41 79.7286 276.356 64.5229L297 55.2757M1 44.2118L21.6438 34.9646C55.5896 19.7589 94.4104 19.7589 128.356 34.9646L169.644 53.459C203.59 68.6647 242.41 68.6647 276.356 53.459L297 44.2118M1 33.1477L21.6438 23.9005C55.5896 8.69479 94.4104 8.69479 128.356 23.9005L169.644 42.3949C203.59 57.6006 242.41 57.6006 276.356 42.3949L297 33.1477M1 22.1477L21.6438 12.9005C55.5896 -2.30521 94.4104 -2.30521 128.356 12.9005L169.644 31.3949C203.59 46.6006 242.41 46.6006 276.356 31.3949L297 22.1477M1 66.3398L21.6438 57.0926C55.5896 41.8869 94.4104 41.8869 128.356 57.0926L169.644 75.587C203.59 90.7927 242.41 90.7927 276.356 75.587L297 66.3398M1 77.404L21.6438 68.1568C55.5896 52.9511 94.4104 52.9511 128.356 68.1569L169.644 86.6512C203.59 101.857 242.41 101.857 276.356 86.6512L297 77.404M1 88.4681L21.6438 79.2209C55.5896 64.0152 94.4104 64.0152 128.356 79.2209L169.644 97.7153C203.59 112.921 242.41 112.921 276.356 97.7153L297 88.4681M1 121.66L21.6438 112.413C55.5896 97.2075 94.4104 97.2075 128.356 112.413L169.644 130.908C203.59 146.113 242.41 146.113 276.356 130.908L297 121.66M1 110.596L21.6438 101.349C55.5896 86.1433 94.4104 86.1433 128.356 101.349L169.644 119.843C203.59 135.049 242.41 135.049 276.356 119.843L297 110.596M1 99.5321L21.6438 90.2849C55.5896 75.0792 94.4104 75.0792 128.356 90.2849L169.644 108.779C203.59 123.985 242.41 123.985 276.356 108.779L297 99.5321M1 132.724L21.6438 123.477C55.5896 108.271 94.4104 108.271 128.356 123.477L169.644 141.971C203.59 157.177 242.41 157.177 276.356 141.971L297 132.724M1 143.788L21.6438 134.541C55.5896 119.336 94.4104 119.336 128.356 134.541L169.644 153.036C203.59 168.241 242.41 168.241 276.356 153.036L297 143.788M1 154.853L21.6438 145.605C55.5896 130.4 94.4104 130.4 128.356 145.605L169.644 164.1C203.59 179.305 242.41 179.305 276.356 164.1L297 154.853M1 165.853L21.6438 156.605C55.5896 141.4 94.4104 141.4 128.356 156.605L169.644 175.1C203.59 190.305 242.41 190.305 276.356 175.1L297 165.853",stroke:"url(#paint0_linear_1094_2077)",strokeOpacity:"0.9",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"paint0_linear_1094_2077",x1:"1",y1:"112.587",x2:"297.034",y2:"79.6111",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-wave-stop-01)"}),g.jsx("stop",{stopColor:"var(--ck-graphic-wave-stop-02)",offset:"0.239583"}),g.jsx("stop",{stopColor:"var(--ck-graphic-wave-stop-03)",offset:"0.515625"}),g.jsx("stop",{stopColor:"var(--ck-graphic-wave-stop-04)",offset:"0.739583"}),g.jsx("stop",{stopColor:"var(--ck-graphic-wave-stop-05)",offset:"1"})]})})]});const fFe=Ee(Se.div)` + position: absolute; + right: 16px; + top: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; +`,K1=Ee.svg` + --x: -3px; + --stroke-width: 2; + position: relative; + top: 1px; + left: -0.5px; + display: inline-block; + vertical-align: middle; + margin-left: 9px; + margin-right: 1px; + transition: all 100ms ease; + transform: translateX(var(--x, -3px)); + color: currentColor; + opacity: 0.4; +`,P3=Ee.path``,I3=Ee.line` + transition: inherit; + transition-property: transform; + transform-origin: 90% 50%; + transform: scaleX(0.1); +`,PI=Ee.div` + display: inline-block; + vertical-align: middle; + position: relative; + margin-right: 6px; + color: currentColor; +`,hFe=Ee.div` + transform: rotate(90deg); + ${K1} { + margin: 0 auto; + } +`,pFe=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + inset: 0; + height: 100%; +`,gFe=Ee.button` + + ${({disabled:e})=>e&&yt` + cursor: not-allowed; + pointer-events: none; + ${rae} { + opacity: 0.4; + } + `} + + ${({$variant:e})=>{if(e==="primary")return yt` + --color: var(--ck-primary-button-color, var(--ck-body-color)); + --background: var( + --ck-primary-button-background, + var(--ck-body-background-primary) + ); + --box-shadow: var(--ck-primary-button-box-shadow); + --border-radius: var(--ck-primary-button-border-radius); + --font-weight: var(--ck-primary-button-font-weight, 500); + + --hover-color: var(--ck-button-primary-hover-color, var(--color)); + --hover-background: var( + --ck-primary-button-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-primary-button-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-primary-button-hover-border-radius, + var(--border-radius) + ); + --hover-font-weight: var( + --ck-primary-button-font-weight, + var(--font-weight) + ); + `;if(e==="secondary")return yt` + --color: var(--ck-secondary-button-color, var(--ck-body-color)); + --background: var( + --ck-secondary-button-background, + var(--ck-body-background-secondary) + ); + --box-shadow: var(--ck-secondary-button-box-shadow); + --border-radius: var(--ck-secondary-button-border-radius); + --font-weight: var(--ck-secondary-button-font-weight, 500); + + --hover-color: var(--ck-secondary-button-hover-color, var(--color)); + --hover-background: var( + --ck-secondary-button-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-secondary-button-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-secondary-button-hover-border-radius, + var(--border-radius) + ); + --hover-font-weight: var( + --ck-secondary-button-font-weight, + var(--font-weight) + ); + `;if(e==="tertiary")return yt` + --color: var( + --ck-tertiary-button-color, + var(--ck-secondary-button-color) + ); + --background: var( + --ck-tertiary-button-background, + var(--ck-secondary-button-background) + ); + --box-shadow: var( + --ck-tertiary-button-box-shadow, + var(--ck-secondary-button-box-shadow) + ); + --border-radius: var( + --ck-tertiary-button-border-radius, + var(--ck-secondary-button-border-radius) + ); + --font-weight: var( + --ck-tertiary-button-font-weight, + var(--ck-secondary-button-font-weight) + ); + + --hover-color: var( + --button-tertiary-hover-color, + var(--ck-tertiary-button-color) + ); + --hover-background: var( + --ck-tertiary-button-hover-background, + var(--ck-tertiary-button-background) + ); + --hover-box-shadow: var( + --ck-tertiary-button-hover-box-shadow, + var(--ck-tertiary-button-box-shadow) + ); + --hover-border-radius: var( + --ck-tertiary-button-hover-border-radius, + var(--ck-tertiary-button-border-radius, var(--border-radius)) + ); + --hover-font-weight: var( + --ck-tertiary-button-font-weight, + var(--ck-secondary-button-font-weight) + ); + `}} + + appearance: none; + cursor: pointer; + user-select: none; + min-width: fit-content; + width: 100%; + display:block; + text-align: center; + height: 48px; + margin: 12px 0 0; + line-height: 48px; + padding: 0 4px; + font-size: 16px; + font-weight: var(--font-weight,500); + text-decoration: none; + white-space: nowrap; + transition: 100ms ease; + transition-property: box-shadow, background-color; + color: var(--color); + background: var(--background); + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); + will-change: transform, box-shadow, background-color, color; + + ${PI} { + ${K1} { + transform: translateX(0); + ${I3} { + transform: none; + } + ${P3} { + } + } + } +} + + @media only screen and (min-width: ${Ft.mobileWidth+1}px) { + &:hover, + &:focus-visible { + color: var(--ck-accent-text-color, var(--hover-color)); + background: var(--ck-accent-color, var(--hover-background)); + border-radius: var(--hover-border-radius); + box-shadow: var(--hover-box-shadow); + + ${K1} { + transform: translateX(0); + ${I3} { + transform: none; + } + ${P3} { + } + } + ${PI} { + ${K1} { + transform: translateX(var(--x)); + ${I3} { + transform: scaleX(0.1); + } + ${P3} { + } + } + } + } + &:active { + box-shadow: var(--ck-secondary-button-active-box-shadow, var(--hover-box-shadow)); + } + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + transition: transform 100ms ease; + transform: scale(1); + font-size: 17px; + &:active { + } + } +`,rae=Ee.div` + transform: translateZ(0); // Shifting fix + position: relative; + display: inline-block; + vertical-align: middle; + max-width: calc(100% - 42px); + transition: opacity 300ms ease; + /* + overflow: hidden; + text-overflow: ellipsis; + */ +`,FH=Ee(Se.div)` + position: relative; + display: inline-block; + vertical-align: middle; + max-width: 20px; + max-height: 20px; + margin: 0 10px; + &:first-child { + margin-left: 0; + } + &:last-child { + margin-right: 0; + } + ${e=>e.$rounded&&yt` + overflow: hidden; + border-radius: 5px; + `} + svg { + display: block; + position: relative; + max-width: 100%; + height: auto; + } +`,UH=dn` + 0%{ transform: rotate(0deg); } + 100%{ transform: rotate(360deg); } +`,mFe=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + animation: ${UH} 1s linear infinite; + svg { + display: block; + position: relative; + animation: ${UH} 1s ease-in-out infinite; + } +`,zH={duration:.4,ease:[.175,.885,.32,.98]},iae=()=>g.jsx(mFe,{initial:{opacity:0,rotate:180},animate:{opacity:1,rotate:0},exit:{position:"absolute",opacity:0,rotate:-180,transition:{...zH}},transition:{...zH,delay:.2},children:g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"9",cy:"9",r:"7",stroke:"currentColor",strokeOpacity:"0.1",strokeWidth:"2.5"}),g.jsx("path",{d:"M16 9C16 5.13401 12.866 2 9 2",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})}),$H={duration:.4,ease:[.175,.885,.32,.98]},Di=({children:e,variant:t="secondary",disabled:n,icon:r,iconPosition:i="left",roundedIcon:o,waiting:s,arrow:a,download:c,href:u,style:l,onClick:d})=>{const f=typeof e=="string"?e:Ju(e).join(""),h=typeof u=="string"?u:Ju(u).join("");return g.jsx(gFe,{as:u?"a":void 0,onClick:p=>{!n&&d&&d(p)},href:h,target:u&&"_blank",rel:u&&"noopener noreferrer",disabled:n,$variant:t,style:l,children:g.jsxs(pr,{initial:!1,children:[g.jsxs(pFe,{initial:{opacity:0,y:-10},animate:{opacity:1,y:-1},exit:{position:"absolute",opacity:0,y:10,transition:{...$H}},transition:{...$H,delay:.2},children:[r&&i==="left"&&g.jsx(FH,{$rounded:o,children:r}),c&&g.jsx(PI,{children:g.jsx(hFe,{children:g.jsxs(K1,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx(I3,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"}),g.jsx(P3,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"})]})})}),g.jsx(rae,{style:{paddingLeft:a?6:0},children:g.jsx(Sa,{children:e})}),r&&i==="right"&&g.jsx(FH,{$rounded:o,children:r}),a&&g.jsxs(K1,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx(I3,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"2",strokeLinecap:"round"}),g.jsx(P3,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"2",strokeLinecap:"round"})]})]},f),s&&g.jsx(fFe,{children:g.jsx(iae,{})})]})})},yFe=()=>{var e,t;const n=Cn(),r=Ci({}),i=(t=(e=n.options)===null||e===void 0?void 0:e.walletOnboardingUrl)!==null&&t!==void 0?t:r.onboardingScreen_ctaUrl;return g.jsxs(Go,{children:[g.jsxs(iFe,{children:[g.jsxs(oFe,{children:[g.jsx(ty,{children:g.jsx(Sc,{children:g.jsx(jp,{children:g.jsx(ka,{children:g.jsx(Ta,{children:g.jsx(Fp,{children:g.jsx(Nt.Coinbase,{background:!0})})})})})})}),g.jsx(ty,{children:g.jsx(Sc,{children:g.jsx(jp,{children:g.jsx(ka,{children:g.jsx(Ta,{children:g.jsx(Fp,{children:g.jsx(Nt.MetaMask,{background:!0})})})})})})}),g.jsx(ty,{children:g.jsx(Sc,{children:g.jsx(jp,{children:g.jsx(ka,{children:g.jsx(Ta,{children:g.jsx(Fp,{children:g.jsx(Nt.Trust,{})})})})})})}),g.jsx(ty,{children:g.jsx(Sc,{children:g.jsx(jp,{children:g.jsx(ka,{children:g.jsx(Ta,{children:g.jsx(Fp,{children:g.jsx(Nt.Argent,{})})})})})})}),g.jsx(ty,{children:g.jsx(Sc,{children:g.jsx(jp,{children:g.jsx(ka,{children:g.jsx(Ta,{children:g.jsx(Fp,{children:g.jsx(Nt.ImToken,{})})})})})})})]}),g.jsx(aFe,{children:dFe})]}),g.jsxs(yr,{style:{paddingBottom:18},children:[g.jsx(Mo,{$small:!0,children:r.onboardingScreen_h1}),g.jsx(Cr,{children:r.onboardingScreen_p})]}),g.jsx(Di,{href:i,arrow:!0,children:r.onboardingScreen_ctaText})]})},b9=208,bFe=Ee.div` + pointer-events: none; + user-select: none; + height: ${b9}px; + padding: 0 0 12px; + display: flex; + align-items: center; + justify-content: center; + svg { + display: block; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + display: none; + } +`,HH=Ee(Se.div)``,vFe=Ee.div` + pointer-events: none; + user-select: none; + height: ${b9}px; + padding: 0 0 12px; + display: none; + align-items: center; + justify-content: center; + svg { + display: block; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + display: flex; + } +`,oae=Ee.div` + position: relative; +`,sae=Ee(Se.div)` + scroll-snap-type: x mandatory; + position: relative; + bottom: 0; + left: 0; + right: 0; + width: 100%; + padding: 0 4px 8px; + /* will-change: transform, opacity; */ + transition: 400ms 50ms cubic-bezier(0.16, 1, 0.3, 1); + transition-property: transform, opacity; + ${e=>!e.$active&&yt` + pointer-events: none; + position: absolute; + opacity: 0; + transform: scale(0.95); + transition-duration: 300ms; + transition-delay: 0ms; + `} +`,xFe=Ee.div` + --background: var(--ck-body-background-secondary); + --background-transparent: var(--ck-body-background-transparent, transparent); + position: relative; + padding: 0 0 4px; + border-radius: 16px; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + margin: 0 -24px; + ${oae} { + position: relative; + z-index: 3; + display: flex; + overflow: auto; + scroll-behavior: smooth; + scroll-snap-type: x mandatory; + margin-top: -${b9}px; + padding-top: ${b9}px; + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + &::-webkit-scrollbar { + display: none; /* Safari and Chrome */ + } + } + ${sae} { + position: relative; + opacity: 1; + transform: none; + flex-shrink: 0; + scroll-snap-align: start; + } + } +`,wFe=Ee.div` + position: relative; + top: -1px; + display: flex; + justify-content: center; + pointer-events: auto; +`,EFe=Ee.button` + display: flex; + align-items: center; + height: 28px; + padding: 2px; + background: none; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + padding: 4px; + &:before { + transform: none !important; + } + } + &:before { + content: ''; + display: block; + width: 16px; + height: 3px; + opacity: 0.12; + border-radius: 4px; + background: var(--ck-accent-color, var(--ck-body-color)); + transition: transform 200ms ease, opacity 180ms ease; + } + ${e=>e.$active?yt` + cursor: default; + &:before { + opacity: 1; + } + `:!e.disabled&&yt` + cursor: pointer; + &:hover:before { + transform: scaleY(3.5); + } + &:active:before { + } + `} +`,VH={scale:[.9,1.25,1.6],opacity:[0,.11,0]},WH={ease:"linear",duration:2,repeat:1/0},aae=Ee.div` + position: absolute; + left: 50%; + top: 50%; + transform: translateY(-50%) translateX(-50%); +`,CFe=dn` + from{ transform: rotate(0deg); } + to{ transform: rotate(360deg); } +`,AFe=Ee(Se.div)` + z-index: -1; + position: absolute; + inset: 0; + overflow: hidden; + border-radius: 100%; + animation: ${CFe} 16s linear infinite; +`,IB=Ee(Se.div)` + overflow: hidden; + border-radius: inherit; + z-index: 0; + position: absolute; + inset: 0; + background: rgba(255, 255, 255, 0.1); +`,RB=Ee(Se.div)` + z-index: 2; + position: relative; + border-radius: 50%; + background: var(--ck-body-background); +`,NB=Ee(Se.div)` + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; +`,SFe=g.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M17 34C26.3 34 34 26.2833 34 17C34 7.7 26.2833 0 16.9833 0C7.7 0 0 7.7 0 17C0 26.2833 7.71667 34 17 34ZM9.83333 25.6833C8.68333 26.2333 7.8 25.3333 8.33333 24.2L13.1667 14.3333C13.45 13.75 13.8167 13.3833 14.35 13.1333L24.1833 8.33333C25.4 7.75 26.25 8.65 25.6833 9.81667L20.8833 19.6667C20.6167 20.2 20.2333 20.6 19.6833 20.85L9.83333 25.6833ZM17.0167 19.1333C18.1833 19.1333 19.1333 18.1833 19.1333 17.0167C19.1333 15.85 18.1833 14.9167 17.0167 14.9167C15.8667 14.9167 14.9167 15.85 14.9167 17.0167C14.9167 18.1833 15.8667 19.1333 17.0167 19.1333Z",fill:"var(--ck-graphic-compass-color, var(--ck-body-color))"}),g.jsx("path",{d:"M17 34C26.3 34 34 26.2833 34 17C34 7.7 26.2833 0 16.9833 0C7.7 0 0 7.7 0 17C0 26.2833 7.71667 34 17 34ZM9.83333 25.6833C8.68333 26.2333 7.8 25.3333 8.33333 24.2L13.1667 14.3333C13.45 13.75 13.8167 13.3833 14.35 13.1333L24.1833 8.33333C25.4 7.75 26.25 8.65 25.6833 9.81667L20.8833 19.6667C20.6167 20.2 20.2333 20.6 19.6833 20.85L9.83333 25.6833ZM17.0167 19.1333C18.1833 19.1333 19.1333 18.1833 19.1333 17.0167C19.1333 15.85 18.1833 14.9167 17.0167 14.9167C15.8667 14.9167 14.9167 15.85 14.9167 17.0167C14.9167 18.1833 15.8667 19.1333 17.0167 19.1333Z",fill:"url(#ck-compass-gradient)"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"ck-compass-gradient",x1:"17",y1:"0",x2:"17",y2:"34",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"rgba(0,0,0,0)"}),g.jsx("stop",{offset:"1",stopColor:"rgba(0,0,0,0.05)"})]})})]}),cae=({inverted:e=!1})=>g.jsxs("svg",{width:"58",height:"50",viewBox:"0 0 58 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.9332 20.3335V42.1113C57.9332 46.4069 54.451 49.8891 50.1555 49.8891H8.15546C3.85991 49.8891 0.377686 46.4069 0.377686 42.1113V25.0002V7.8891C0.377686 3.59355 3.85991 0.111328 8.15546 0.111328H47.0444C48.7626 0.111328 50.1555 1.50422 50.1555 3.22244C50.1555 4.94066 48.7626 6.33355 47.0443 6.33355H9.71102C7.9928 6.33355 6.59991 7.72644 6.59991 9.44466C6.59991 11.1629 7.9928 12.5558 9.71102 12.5558H50.1555C54.451 12.5558 57.9332 16.038 57.9332 20.3335ZM46.2667 34.3337C48.4145 34.3337 50.1556 32.5926 50.1556 30.4448C50.1556 28.297 48.4145 26.5559 46.2667 26.5559C44.1189 26.5559 42.3778 28.297 42.3778 30.4448C42.3778 32.5926 44.1189 34.3337 46.2667 34.3337Z",fill:e?"var(--ck-graphic-primary-color, var(--ck-body-background))":"var(--ck-graphic-primary-color, var(--ck-body-color))"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"paint0_linear_2501_7732",x1:"29.1555",y1:"0.111328",x2:"29.1555",y2:"49.8891",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:e?"var(--ck-body-color-muted)":"var(--ck-body-background-transparent, transparent)"}),g.jsx("stop",{offset:"1",stopColor:e?"var(--ck-body-color)":"var(--ck-body-background)"})]})})]}),kFe=g.jsx("svg",{width:"41",height:"41",viewBox:"0 0 41 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M35.4446 0.839914L2.14484 10.7065C0.0395033 11.3303 -0.632966 13.9786 0.919705 15.5313L7.9624 22.574C9.47585 24.0874 11.8661 24.273 13.5951 23.0114L25.2866 14.4797C25.5558 14.2832 25.9281 14.3121 26.1638 14.5478C26.3998 14.7838 26.4285 15.1567 26.2313 15.426L17.6874 27.0937C16.4213 28.8228 16.6052 31.2168 18.1206 32.7322L25.1811 39.7926C26.7337 41.3453 29.382 40.6728 30.0058 38.5675L39.8724 5.2677C40.6753 2.55794 38.1544 0.037024 35.4446 0.839914Z",fill:"var(--ck-graphic-secondary-color, white)"})}),TFe=g.jsx("svg",{width:"38",height:"44",viewBox:"0 0 38 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 0.875C21.4853 0.875 23.5 2.88972 23.5 5.375V27.761L30.068 21.193C31.8254 19.4357 34.6746 19.4357 36.432 21.193C38.1893 22.9504 38.1893 25.7996 36.432 27.557L22.182 41.807C20.4246 43.5643 17.5754 43.5643 15.818 41.807L1.56802 27.557C-0.18934 25.7996 -0.18934 22.9504 1.56802 21.193C3.32538 19.4357 6.17462 19.4357 7.93198 21.193L14.5 27.761V5.375C14.5 2.88972 16.5147 0.875 19 0.875Z",fill:"var(--ck-graphic-secondary-color, white)"})}),_Fe=({...e})=>{var t;const n=(t=e==null?void 0:e.id)!==null&&t!==void 0?t:"";return g.jsxs("svg",{...e,width:"81",height:"81",viewBox:"0 0 81 81",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M81 27C81 41.9117 68.9117 54 54 54C51.2722 54 48.6389 53.5955 46.1568 52.8432L36 63H27V72H18V81H4.5C2.01472 81 0 78.9853 0 76.5V64.864C0 63.6705 0.474103 62.5259 1.31802 61.682L28.1568 34.8432C27.4045 32.3611 27 29.7278 27 27C27 12.0883 39.0883 0 54 0C68.9117 0 81 12.0883 81 27ZM60.75 25.875C63.8566 25.875 66.375 23.3566 66.375 20.25C66.375 17.1434 63.8566 14.625 60.75 14.625C57.6434 14.625 55.125 17.1434 55.125 20.25C55.125 23.3566 57.6434 25.875 60.75 25.875Z",fill:`url(#${n}paint0_linear_2509_6177)`}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M81 27C81 41.9117 68.9117 54 54 54C51.2722 54 48.6389 53.5955 46.1568 52.8432L36 63H27V72H18V81H4.5C2.01472 81 0 78.9853 0 76.5V64.864C0 63.6705 0.474103 62.5259 1.31802 61.682L28.1568 34.8432C27.4045 32.3611 27 29.7278 27 27C27 12.0883 39.0883 0 54 0C68.9117 0 81 12.0883 81 27ZM60.75 25.875C63.8566 25.875 66.375 23.3566 66.375 20.25C66.375 17.1434 63.8566 14.625 60.75 14.625C57.6434 14.625 55.125 17.1434 55.125 20.25C55.125 23.3566 57.6434 25.875 60.75 25.875Z",fill:`url(#${n}paint1_radial_2509_6177)`,fillOpacity:"0.2"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.5658 51.2522C45.1527 50.6653 46.0151 50.4492 46.8095 50.6899C49.0823 51.3788 51.4958 51.75 54 51.75C67.6691 51.75 78.75 40.669 78.75 27C78.75 13.331 67.6691 2.25 54 2.25C40.331 2.25 29.25 13.331 29.25 27C29.25 29.5042 29.6212 31.9177 30.3101 34.1905C30.5508 34.9849 30.3347 35.8473 29.7478 36.4342L2.90901 63.273C2.48705 63.6949 2.25 64.2672 2.25 64.864V76.5C2.25 77.7426 3.25736 78.75 4.5 78.75H15.75V72C15.75 70.7574 16.7574 69.75 18 69.75H24.75V63C24.75 61.7574 25.7574 60.75 27 60.75H35.068L44.5658 51.2522ZM36 63H27V72H18V81H4.5C2.01472 81 0 78.9853 0 76.5V64.864C0 63.6705 0.474103 62.5259 1.31802 61.682L28.1568 34.8432C27.4045 32.3611 27 29.7278 27 27C27 12.0883 39.0883 0 54 0C68.9117 0 81 12.0883 81 27C81 41.9117 68.9117 54 54 54C51.2722 54 48.6389 53.5955 46.1568 52.8432L36 63ZM68.625 20.25C68.625 24.5992 65.0992 28.125 60.75 28.125C56.4008 28.125 52.875 24.5992 52.875 20.25C52.875 15.9008 56.4008 12.375 60.75 12.375C65.0992 12.375 68.625 15.9008 68.625 20.25ZM66.375 20.25C66.375 23.3566 63.8566 25.875 60.75 25.875C57.6434 25.875 55.125 23.3566 55.125 20.25C55.125 17.1434 57.6434 14.625 60.75 14.625C63.8566 14.625 66.375 17.1434 66.375 20.25Z",fill:"black",fillOpacity:"0.1"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.4205 47.5795C33.8598 48.0188 33.8598 48.7312 33.4205 49.1705L3.0455 79.5455C2.60616 79.9848 1.89384 79.9848 1.4545 79.5455C1.01517 79.1062 1.01517 78.3938 1.4545 77.9545L31.8295 47.5795C32.2688 47.1402 32.9812 47.1402 33.4205 47.5795Z",fill:"#A5A9AD"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:`${n}paint0_linear_2509_6177`,x1:"72",y1:"5.625",x2:"2.25",y2:"78.75",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#D4DFE6"}),g.jsx("stop",{offset:"0.0967282",stopColor:"#C6CACD"}),g.jsx("stop",{offset:"0.526645",stopColor:"#BDBAC4"}),g.jsx("stop",{offset:"1",stopColor:"#939CA1"})]}),g.jsxs("radialGradient",{id:`${n}paint1_radial_2509_6177`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(52.875 12.375) rotate(93.2705) scale(39.4392)",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white"})]})]})]})},PFe=g.jsxs("svg",{width:"131",height:"14",viewBox:"0 0 131 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M5.74805 13.2549C8.86816 13.2549 10.7227 10.6973 10.7227 6.63672C10.7227 2.57617 8.85059 0.0625 5.74805 0.0625C2.63672 0.0625 0.755859 2.59375 0.755859 6.64551C0.755859 10.7148 2.61914 13.2549 5.74805 13.2549ZM5.74805 11.4004C4.02539 11.4004 3.04102 9.64258 3.04102 6.63672C3.04102 3.68359 4.04297 1.91699 5.74805 1.91699C7.44434 1.91699 8.4375 3.6748 8.4375 6.64551C8.4375 9.65137 7.46191 11.4004 5.74805 11.4004Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M13.0869 13.1758C13.4561 13.1758 13.6934 13.0439 13.9658 12.6221L15.9697 9.66016H16.0137L18.0264 12.6572C18.2549 13.0088 18.4922 13.1758 18.8965 13.1758C19.4854 13.1758 19.9424 12.7891 19.9424 12.209C19.9424 11.9805 19.8633 11.7695 19.7051 11.541L17.376 8.28906L19.6963 5.16016C19.8896 4.90527 19.9688 4.68555 19.9688 4.43066C19.9688 3.88574 19.5381 3.49902 18.9229 3.49902C18.5361 3.49902 18.2988 3.6748 18.0176 4.10547L16.1191 6.95312H16.0752L14.1328 4.08789C13.8516 3.64844 13.6318 3.49902 13.2012 3.49902C12.6035 3.49902 12.1465 3.91211 12.1465 4.44824C12.1465 4.70312 12.2256 4.92285 12.3838 5.13379L14.7129 8.35059L12.3486 11.5498C12.1641 11.8135 12.0762 12.0156 12.0762 12.2705C12.0762 12.7979 12.498 13.1758 13.0869 13.1758Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M26.2441 13.2549C29.1445 13.2549 31.1924 11.7432 31.1924 9.57227C31.1924 7.9375 30.0146 6.68066 28.3184 6.3291V6.27637C29.7773 5.87207 30.7178 4.7998 30.7178 3.45508C30.7178 1.48633 28.8633 0.0625 26.2441 0.0625C23.625 0.0625 21.7617 1.49512 21.7617 3.44629C21.7617 4.80859 22.7109 5.88965 24.1699 6.27637V6.3291C22.4736 6.67188 21.3047 7.92871 21.3047 9.57227C21.3047 11.7344 23.335 13.2549 26.2441 13.2549ZM26.2441 5.55566C24.9258 5.55566 24.0029 4.78223 24.0029 3.6748C24.0029 2.55859 24.9258 1.77637 26.2441 1.77637C27.5537 1.77637 28.4854 2.5498 28.4854 3.6748C28.4854 4.78223 27.5537 5.55566 26.2441 5.55566ZM26.2441 11.5234C24.7236 11.5234 23.6514 10.6357 23.6514 9.40527C23.6514 8.1748 24.7236 7.28711 26.2441 7.28711C27.7646 7.28711 28.8369 8.16602 28.8369 9.40527C28.8369 10.6357 27.7646 11.5234 26.2441 11.5234Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M36.3164 13.1494C37.7578 13.1494 38.7598 12.4199 39.208 11.3477H39.252V12.0771C39.252 12.7891 39.7266 13.1758 40.3594 13.1758C40.9922 13.1758 41.4404 12.7803 41.4404 12.0771V1.29297C41.4404 0.554688 40.9834 0.141602 40.3418 0.141602C39.7002 0.141602 39.252 0.554688 39.252 1.29297V5.24805H39.1992C38.707 4.21973 37.6523 3.52539 36.3164 3.52539C33.9697 3.52539 32.4492 5.38867 32.4492 8.33301C32.4492 11.2949 33.9697 13.1494 36.3164 13.1494ZM36.9756 11.3564C35.5605 11.3564 34.6904 10.1963 34.6904 8.3418C34.6904 6.49609 35.5693 5.32715 36.9756 5.32715C38.3555 5.32715 39.2607 6.51367 39.2607 8.3418C39.2607 10.1875 38.3555 11.3564 36.9756 11.3564Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M44.0508 13.1494C44.6396 13.1494 44.9736 12.8594 45.1846 12.1738L46.0195 9.76562H50.7568L51.5918 12.1914C51.7939 12.8682 52.1367 13.1494 52.752 13.1494C53.4111 13.1494 53.8857 12.7188 53.8857 12.1035C53.8857 11.9014 53.8418 11.6992 53.7363 11.4092L50.0449 1.38965C49.7285 0.537109 49.2188 0.167969 48.3838 0.167969C47.5576 0.167969 47.0479 0.554688 46.7402 1.39844L43.0576 11.4092C42.9521 11.6816 42.9082 11.9277 42.9082 12.1035C42.9082 12.7451 43.3564 13.1494 44.0508 13.1494ZM46.5557 7.97266L48.3398 2.55859H48.4014L50.2031 7.97266H46.5557Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M60.1172 13.2549C62.8594 13.2549 64.8545 11.4004 64.8545 8.8252C64.8545 6.42578 63.1406 4.66797 60.6973 4.66797C58.9746 4.66797 57.709 5.54688 57.208 6.71582H57.1641V6.58398C57.208 3.66602 58.2275 1.89941 60.1436 1.89941C61.084 1.89941 61.7607 2.26855 62.3496 3.07715C62.7012 3.52539 62.9824 3.73633 63.4307 3.73633C64.0283 3.73633 64.3975 3.34082 64.3975 2.82227C64.3975 2.57617 64.3359 2.35645 64.1953 2.10156C63.5625 0.897461 62.0859 0.0537109 60.1523 0.0537109C56.9268 0.0537109 54.9932 2.57617 54.9932 6.80371C54.9932 8.24512 55.2305 9.45801 55.6963 10.4336C56.5752 12.2881 58.1396 13.2549 60.1172 13.2549ZM60.082 11.4092C58.667 11.4092 57.5508 10.293 57.5508 8.86914C57.5508 7.4541 58.6494 6.41699 60.1084 6.41699C61.5674 6.41699 62.6309 7.4541 62.6221 8.91309C62.6221 10.3018 61.4971 11.4092 60.082 11.4092Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M68.1328 8.83398C68.8447 8.83398 69.416 8.27148 69.416 7.55078C69.416 6.83008 68.8447 6.25879 68.1328 6.25879C67.4121 6.25879 66.8408 6.83008 66.8408 7.55078C66.8408 8.27148 67.4121 8.83398 68.1328 8.83398Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M73.3359 8.83398C74.0479 8.83398 74.6191 8.27148 74.6191 7.55078C74.6191 6.83008 74.0479 6.25879 73.3359 6.25879C72.6152 6.25879 72.0439 6.83008 72.0439 7.55078C72.0439 8.27148 72.6152 8.83398 73.3359 8.83398Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M78.5391 8.83398C79.251 8.83398 79.8223 8.27148 79.8223 7.55078C79.8223 6.83008 79.251 6.25879 78.5391 6.25879C77.8184 6.25879 77.2471 6.83008 77.2471 7.55078C77.2471 8.27148 77.8184 8.83398 78.5391 8.83398Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M83.7422 8.83398C84.4541 8.83398 85.0254 8.27148 85.0254 7.55078C85.0254 6.83008 84.4541 6.25879 83.7422 6.25879C83.0215 6.25879 82.4502 6.83008 82.4502 7.55078C82.4502 8.27148 83.0215 8.83398 83.7422 8.83398Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M92.2148 13.2549C94.957 13.2549 96.9521 11.4004 96.9521 8.8252C96.9521 6.42578 95.2383 4.66797 92.7949 4.66797C91.0723 4.66797 89.8066 5.54688 89.3057 6.71582H89.2617V6.58398C89.3057 3.66602 90.3252 1.89941 92.2412 1.89941C93.1816 1.89941 93.8584 2.26855 94.4473 3.07715C94.7988 3.52539 95.0801 3.73633 95.5283 3.73633C96.126 3.73633 96.4951 3.34082 96.4951 2.82227C96.4951 2.57617 96.4336 2.35645 96.293 2.10156C95.6602 0.897461 94.1836 0.0537109 92.25 0.0537109C89.0244 0.0537109 87.0908 2.57617 87.0908 6.80371C87.0908 8.24512 87.3281 9.45801 87.7939 10.4336C88.6729 12.2881 90.2373 13.2549 92.2148 13.2549ZM92.1797 11.4092C90.7646 11.4092 89.6484 10.293 89.6484 8.86914C89.6484 7.4541 90.7471 6.41699 92.2061 6.41699C93.665 6.41699 94.7285 7.4541 94.7197 8.91309C94.7197 10.3018 93.5947 11.4092 92.1797 11.4092Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M103.377 13.2549C106.497 13.2549 108.352 10.6973 108.352 6.63672C108.352 2.57617 106.479 0.0625 103.377 0.0625C100.266 0.0625 98.3848 2.59375 98.3848 6.64551C98.3848 10.7148 100.248 13.2549 103.377 13.2549ZM103.377 11.4004C101.654 11.4004 100.67 9.64258 100.67 6.63672C100.67 3.68359 101.672 1.91699 103.377 1.91699C105.073 1.91699 106.066 3.6748 106.066 6.64551C106.066 9.65137 105.091 11.4004 103.377 11.4004Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M117.167 13.1758C117.8 13.1758 118.248 12.7715 118.248 12.0596V10.5654H119.127C119.733 10.5654 120.094 10.1875 120.094 9.63379C120.094 9.08887 119.733 8.70215 119.136 8.70215H118.248V1.81152C118.248 0.756836 117.554 0.141602 116.385 0.141602C115.453 0.141602 114.899 0.52832 114.073 1.75879C112.553 3.99121 111.111 6.16211 110.224 7.75293C109.872 8.38574 109.731 8.79883 109.731 9.29102C109.731 10.0469 110.268 10.5654 111.085 10.5654H116.086V12.0596C116.086 12.7715 116.543 13.1758 117.167 13.1758ZM116.121 8.75488H111.788V8.69336C112.816 6.82129 114.073 4.92285 116.086 2.04004H116.121V8.75488Z",fill:"var(--ck-body-color)"}),g.jsx("path",{d:"M126.105 13.2549C128.918 13.2549 130.869 11.4355 130.869 8.78125C130.869 6.35547 129.138 4.6416 126.712 4.6416C125.438 4.6416 124.392 5.13379 123.855 5.9248H123.812L124.146 2.17188H129.27C129.85 2.17188 130.228 1.80273 130.228 1.24023C130.228 0.686523 129.85 0.317383 129.27 0.317383H123.803C122.81 0.317383 122.3 0.72168 122.221 1.72363L121.816 6.51367C121.808 6.56641 121.808 6.60156 121.808 6.6543C121.79 7.26953 122.15 7.78809 122.88 7.78809C123.398 7.78809 123.618 7.67383 124.146 7.14648C124.629 6.67188 125.323 6.34668 126.123 6.34668C127.617 6.34668 128.681 7.38379 128.681 8.84277C128.681 10.3457 127.617 11.4092 126.114 11.4092C124.893 11.4092 124.049 10.8027 123.618 9.77441C123.381 9.30859 123.091 9.12402 122.616 9.12402C122.019 9.12402 121.641 9.49316 121.641 10.082C121.641 10.4072 121.72 10.6709 121.843 10.9434C122.467 12.3232 124.154 13.2549 126.105 13.2549Z",fill:"var(--ck-body-color)"})]}),GH=({layoutId:e})=>g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Se.div,{initial:{rotate:90,scale:.2,x:"100%"},animate:{rotate:0,scale:1,x:0},exit:{rotate:40,scale:.1,x:"70%"},style:{zIndex:4,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:76,height:76,background:"var(--ck-graphic-secondary-background, #6366F1)",borderRadius:"50%",boxShadow:"var(--ck-graphic-secondary-box-shadow, 0px 2px 10px rgba(99, 102, 241, 0.3))"},children:TFe}),g.jsx(RB,{layoutId:e,style:{position:"relative",zIndex:10,margin:"0 -8px",width:112,height:112},children:g.jsxs(NB,{style:{background:"var(--ck-graphic-primary-background, var(--ck-body-background))",boxShadow:"var(--ck-graphic-primary-box-shadow, 0px 3px 15px rgba(0, 0, 0, 0.1))"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[g.jsx(IB,{}),g.jsx(Se.div,{style:{zIndex:2,position:"relative"},children:g.jsx(cae,{})})]},"SlideOneInner")},e),g.jsx(Se.div,{initial:{rotate:-90,scale:.2,x:"-100%"},animate:{rotate:0,scale:1,x:0},exit:{rotate:-40,scale:.1,x:"-70%"},style:{zIndex:4,position:"relative",width:76,height:76,background:"var(--ck-graphic-secondary-background, #3897FB)",borderRadius:"50%",boxShadow:"var(--ck-graphic-secondary-box-shadow, 0px 2px 10px rgba(56, 151, 251, 0.3))"},children:g.jsx(aae,{children:g.jsx("div",{style:{position:"relative",left:-2,top:3},children:kFe})})})]}),KH=({layoutId:e})=>g.jsx(g.Fragment,{children:g.jsxs("div",{style:{position:"relative",left:-14},children:[g.jsx(RB,{layoutId:e,style:{zIndex:10,position:"absolute",left:15,top:12,width:32,height:32},children:g.jsx(NB,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{background:"var(--ck-graphic-primary-background, var(--ck-body-background))",boxShadow:"var(--ck-graphic-primary-box-shadow, 0px 2px 5px rgba(37, 41, 46, 0.16))"},children:g.jsx(aae,{children:g.jsx(cae,{})})},"SlideTwoInner")},e),g.jsxs(Se.div,{initial:{scale:.2},animate:{scale:1},exit:{scale:.2},style:{zIndex:7,position:"relative",display:"flex",alignItems:"center",padding:"21px 56px",paddingRight:52,background:"var(--ck-graphic-primary-background, var(--ck-body-background))",boxShadow:"var(--ck-graphic-primary-box-shadow, 0px 2px 9px rgba(0, 0, 0, 0.07))",borderRadius:"var(--ck-border-radius, 16px)"},children:[g.jsx(IB,{}),g.jsx("div",{style:{position:"relative",zIndex:2,top:1,left:1},children:PFe})]}),g.jsx(Se.div,{style:{zIndex:8,position:"absolute",top:-16,right:-28},initial:{rotate:90,x:-70,scale:.4},animate:{rotate:0,x:0,scale:1},exit:{rotate:0,x:-70,scale:.4},children:g.jsx(_Fe,{id:e})})]})}),QH=({layoutId:e})=>{const t=Math.random();return g.jsx(g.Fragment,{children:g.jsxs(Se.div,{style:{position:"relative"},children:[g.jsxs(RB,{layoutId:e,initial:{rotate:80},style:{zIndex:10,position:"relative",width:128,height:128},children:[g.jsx(NB,{initial:{opacity:0,rotate:100},animate:{opacity:1},exit:{opacity:0},style:{overflow:"hidden",background:`var(--ck-graphic-globe-background, radial-gradient( + 82.42% 82.42% at 50% 86.72%, + rgba(255, 255, 255, 0.2) 0%, + rgba(0, 0, 0, 0) 100% + ), + linear-gradient(180deg, #3897FB 0%, #5004F1 100%))`,boxShadow:"var(--ck-graphic-globe-box-shadow, 0px -6px 20px rgba(56, 151, 251, 0.23))"},children:g.jsx(AFe,{style:e?void 0:{animationPlayState:"paused"},children:g.jsxs("svg",{width:"128",height:"128",viewBox:"0 0 128 128",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsxs("g",{children:[g.jsx("circle",{cx:"30",cy:"141",r:"64",stroke:`url(#networkRadialA-${t})`,strokeWidth:"3"}),g.jsx("circle",{cx:"78.8515",cy:"131.123",r:"54.1005",transform:"rotate(-37.4016 78.8515 131.123)",stroke:`url(#networkRadialB-${t})`,strokeWidth:"3"}),g.jsx("circle",{cx:"63.6053",cy:"2.12794",r:"50.8338",transform:"rotate(134.702 63.6053 2.12794)",stroke:`url(#networkRadialC-${t})`,strokeWidth:"3"}),g.jsx("circle",{cx:"126.658",cy:"56.6577",r:"50.3433",transform:"rotate(-105 126.658 56.6577)",stroke:`url(#networkRadialD-${t})`,strokeWidth:"3"}),g.jsx("circle",{cx:"13.6619",cy:"18.9603",r:"46.0247",transform:"rotate(107.362 13.6619 18.9603)",stroke:`url(#networkRadialE-${t})`,strokeWidth:"3"})]}),g.jsxs("defs",{children:[g.jsxs("radialGradient",{id:`networkRadialA-${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(60.5 84) rotate(104.668) scale(77.0097)",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-globe-lines, white)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-globe-lines, white)",stopOpacity:"0"})]}),g.jsxs("radialGradient",{id:`networkRadialB-${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(96.1805 81.6717) rotate(97.125) scale(64.7443)",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-globe-lines, white)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-globe-lines, white)",stopOpacity:"0"})]}),g.jsxs("radialGradient",{id:`networkRadialC-${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(96.3816 -36.4455) rotate(114.614) scale(57.7177)",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-globe-lines, white)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-globe-lines, white)",stopOpacity:"0"})]}),g.jsxs("radialGradient",{id:`networkRadialD-${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(137.86 7.73234) rotate(92.3288) scale(62.743)",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-globe-lines, white)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-globe-lines, white)",stopOpacity:"0"})]}),g.jsxs("radialGradient",{id:`networkRadialE-${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(35.3203 -21.566) rotate(104.513) scale(54.8617)",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-globe-lines, white)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-globe-lines, white)",stopOpacity:"0"})]})]})]})})},"SlideThreeInner"),g.jsxs(Se.div,{exit:{opacity:0},children:[g.jsx(Se.div,{initial:e?void 0:{scale:1.1},animate:e?VH:void 0,transition:{...WH},style:{position:"absolute",inset:0,borderRadius:"50%",boxShadow:"0 0 0 2px var(--ck-graphic-globe-lines, rgba(126, 112, 243, 1))"}},"pulseA"),g.jsx(Se.div,{initial:e?void 0:{scale:1.2,opacity:.25},animate:e?VH:void 0,transition:{...WH,delay:.5},style:{position:"absolute",inset:0,borderRadius:"50%",boxShadow:"0 0 0 2px var(--ck-graphic-globe-lines, rgba(126, 112, 243, 1))"}},"pulseB")]})]},e),g.jsxs(Se.div,{initial:{rotate:-20,scale:.1,y:-10,x:-10},animate:{rotate:0,scale:1,y:0,x:0},exit:{zIndex:3,scale:.2,y:-25,x:15},style:{zIndex:12,borderRadius:"50%",position:"absolute",bottom:-4,right:-4,width:54,height:54,display:"flex",alignItems:"center",justifyContent:"center",padding:13,background:"var(--ck-graphic-compass-background, var(--ck-body-background))",boxShadow:"var(--ck-graphic-compass-box-shadow, 0px 2px 9px rgba(0, 0, 0, 0.15))"},children:[g.jsx(IB,{}),g.jsx(Se.div,{style:{zIndex:2,position:"absolute"},initial:{rotate:-170},animate:{rotate:0},exit:{rotate:-180,transition:{duration:0}},transition:{type:"spring",stiffness:6,damping:.9,mass:.2},children:SFe})]})]},"SlideThree")})},IFe=()=>{var e,t;const n=Ci({}),r=Cn(),i=(t=(e=r.options)===null||e===void 0?void 0:e.ethereumOnboardingUrl)!==null&&t!==void 0?t:n.aboutScreen_ctaUrl,[o,s]=j.useState(!0),[a,c]=j.useState(0),u=j.useRef(!1),l=j.useRef(0),d=[.16,1,.3,1],f=600;let h;j.useEffect(()=>()=>clearInterval(h),[]);const p=()=>{if(E.current){const{overflow:N}=getComputedStyle(E.current);return N!=="visible"}return!1},m=N=>{s(!1),p()?x(N):c(N)},x=N=>{if(E.current){const{offsetWidth:R}=E.current;E.current.scrollLeft=R*N,setTimeout(()=>c(N),100)}},y=()=>{if(!E.current)return;const{offsetWidth:N,scrollLeft:R}=E.current,_=l.current;l.current=R;const M=4;if(_-R>-M&&_-R{w()},v=()=>{const{offsetWidth:N,scrollLeft:R}=E.current,_=Math.round(R/N);c(_)},w=()=>{u.current=!0,clearTimeout(h)},E=j.useRef(null);j.useEffect(()=>{if(E.current)return E.current.addEventListener("scroll",y),E.current.addEventListener("touchmove",b),E.current.addEventListener("touchend",v),()=>{E.current&&(E.current.removeEventListener("scroll",y),E.current.removeEventListener("touchmove",b),E.current.removeEventListener("touchend",v))}},[E]);const S=[g.jsx(GH,{layoutId:"graphicCircle",duration:f,ease:d}),g.jsx(KH,{layoutId:"graphicCircle",duration:f,ease:d}),g.jsx(QH,{layoutId:"graphicCircle",duration:f,ease:d})],I=[g.jsx(GH,{duration:f,ease:d}),g.jsx(KH,{duration:f,ease:d}),g.jsx(QH,{duration:f,ease:d})],A=(()=>{var N;switch((N=r.options)===null||N===void 0?void 0:N.language){case"en-US":case"zh-CN":return 64;default:return 84}})(),O=[g.jsxs(g.Fragment,{children:[g.jsx(Mo,{style:{height:24},$small:!0,children:g.jsx(Sa,{children:n.aboutScreen_a_h1})}),g.jsx(Cr,{style:{height:A},children:g.jsx(Sa,{children:n.aboutScreen_a_p})})]}),g.jsxs(g.Fragment,{children:[g.jsx(Mo,{style:{height:24},$small:!0,children:g.jsx(Sa,{children:n.aboutScreen_b_h1})}),g.jsx(Cr,{style:{height:A},children:g.jsx(Sa,{children:n.aboutScreen_b_p})})]}),g.jsxs(g.Fragment,{children:[g.jsx(Mo,{style:{height:24},$small:!0,children:g.jsx(Sa,{children:n.aboutScreen_c_h1})}),g.jsx(Cr,{style:{height:A},children:g.jsx(Sa,{children:n.aboutScreen_c_p})})]})];return g.jsxs(Go,{children:[g.jsxs(xFe,{children:[g.jsx(bFe,{children:g.jsx(dH,{transition:{duration:f/1e3,ease:d},children:g.jsx(pr,{initial:!1,onExitComplete:()=>s(!0),children:S.map((N,R)=>a===R&&g.jsx(HH,{style:{position:"absolute"},children:N},R))})})}),g.jsx(oae,{ref:E,children:g.jsx(pr,{children:O.map((N,R)=>g.jsxs(sae,{$active:a===R,children:[g.jsx(vFe,{children:g.jsx(dH,{transition:{duration:0},children:g.jsx(HH,{children:I[R]})})}),g.jsx(yr,{style:{gap:8,paddingBottom:0},children:N})]},R))})})]}),g.jsx(y9,{children:g.jsx(wFe,{children:O.map((N,R)=>g.jsx(EFe,{$active:a===R,onClick:()=>{w(),m(R)}},R))})}),g.jsx(Di,{href:i,arrow:!0,children:n.aboutScreen_ctaText})]})},RFe=dn` + 0%{ transform: translate(-100%) rotate(-45deg); } + 100%{ transform: translate(100%) rotate(-80deg); } +`,NFe=Ee.div` + padding: 24px 24px 28px; + border-radius: var(--ck-tertiary-border-radius, 24px); + box-shadow: var(--ck-tertiary-box-shadow, none); + background: var(--ck-body-background-tertiary); + ${Cr} { + max-width: none; + } +`,OFe=Ee.div` + display: grid; + grid-template-columns: 1fr 1fr; + gap: 16px; + margin: 5px -8px -12px; + button { + } +`,LFe=Ee(Se.div)` + text-align: center; + margin-top: 16px; + margin-bottom: -6px; +`,BFe=Ee(Se.button)` + appearance: none; + user-select: none; + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 10px; + height: 42px; + padding: 0 16px; + border-radius: 6px; + background: none; + color: var(--ck-body-color-muted); + font-size: 15px; + line-height: 18px; + font-weight: 500; + /* will-change: transform; */ + transition: color 200ms ease, transform 100ms ease; + svg { + transition: all 100ms ease-out; + display: block; + position: relative; + top: 2px; + left: 2px; + transform: translateZ(0px); + path, + circle { + transition: all 100ms ease-out; + } + path:last-of-type { + transform-origin: 0 0; + transform: scaleX(1.3) skewY(-12deg); + opacity: 0; + } + circle { + transform: translate(20%, -15%); + } + } + &:hover { + color: var(--ck-body-color-muted-hover); + svg { + path, + circle { + opacity: 1; + transform: none; + } + } + } + &:active { + transform: scale(0.96); + } +`;Ee(Se.div)` + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; + overflow-y: scroll; + max-height: 20rem; + + &::-webkit-scrollbar { + display: none; + } +`;Ee(Se.button)` + cursor: pointer; + user-select: none; + position: relative; + display: flex; + align-items: center; + padding: 0 20px; + width: 100%; + height: 64px; + font-size: 17px; + font-weight: var(--ck-primary-button-font-weight, 500); + line-height: 20px; + text-align: var(--ck-body-button-text-align, left); + transition: 180ms ease; + transition-property: background, color, box-shadow, transform, opacity; + will-change: transform, box-shadow, background-color, color, opacity; + + --fallback-color: var(--ck-primary-button-color); + --fallback-background: var(--ck-primary-button-background); + --fallback-box-shadow: var(--ck-primary-button-box-shadow); + --fallback-border-radius: var(--ck-primary-button-border-radius); + + --color: var(--ck-primary-button-color, var(--fallback-color)); + --background: var(--ck-primary-button-background, var(--fallback-background)); + --box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow)); + --border-radius: var( + --ck-primary-button-border-radius, + var(--fallback-border-radius) + ); + + --hover-color: var(--ck-primary-button-hover-color, var(--color)); + --hover-background: var( + --ck-primary-button-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-primary-button-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-primary-button-hover-border-radius, + var(--border-radius) + ); + + --active-color: var(--ck-primary-button-active-color, var(--hover-color)); + --active-background: var( + --ck-primary-button-active-background, + var(--hover-background) + ); + --active-box-shadow: var( + --ck-primary-button-active-box-shadow, + var(--hover-box-shadow) + ); + --active-border-radius: var( + --ck-primary-button-active-border-radius, + var(--hover-border-radius) + ); + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &:disabled { + transition: 180ms ease; + opacity: 0.4; + } + + --bg: var(--background); + &:not(:disabled) { + &:hover { + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + --bg: var(--hover-background, var(--background)); + } + &:focus-visible { + transition-duration: 100ms; + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + --bg: var(--hover-background, var(--background)); + } + &:active { + color: var(--active-color); + background: var(--active-background); + box-shadow: var(--active-box-shadow); + border-radius: var(--active-border-radius); + --bg: var(--active-background, var(--background)); + } + } +`;Ee(Se.span)` + position: relative; + top: var(--ck-recent-badge-top-offset, 0.5px); + display: inline-block; + padding: 10px 7px; + line-height: 0; + font-size: 13px; + font-weight: 400; + border-radius: var(--ck-recent-badge-border-radius, var(--border-radius)); + color: var( + --ck-recent-badge-color, + var(--ck-accent-color, var(--ck-body-color-muted, currentColor)) + ); + background: var(--ck-recent-badge-background, transparent); + overflow: hidden; + span { + display: inline-block; + position: relative; + } + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 0; + opacity: 0.4; + box-shadow: var(--ck-recent-badge-box-shadow, inset 0 0 0 1px currentColor); + border-radius: inherit; + } + &:after { + z-index: 2; + content: ''; + position: absolute; + inset: -10%; + top: -110%; + aspect-ratio: 1/1; + opacity: 0.7; + background: linear-gradient( + 170deg, + transparent 10%, + var(--ck-recent-badge-background, var(--bg)) 50%, + transparent 90% + ); + animation: ${RFe} 2s linear infinite; + } +`;Ee(Se.span)` + display: flex; + align-items: center; + gap: 9px; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 2px 0; + padding-right: 38px; +`;Ee(Se.div)` + position: absolute; + right: 20px; + width: 32px; + height: 32px; + overflow: hidden; + svg, + img { + display: block; + position: relative; + pointer-events: none; + overflow: hidden; + border-radius: 27.5%; + width: 100%; + height: 100%; + } +`;var MFe=({...e})=>g.jsxs("svg",{"aria-hidden":"true",width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[g.jsx("path",{d:"M1.57568 4.60616C1.57568 2.69827 3.12234 1.15161 5.03023 1.15161H15.3939C17.3018 1.15161 18.8484 2.69826 18.8484 4.60616V10.3637C18.8484 12.2716 17.3018 13.8183 15.3939 13.8183H5.03023C3.12234 13.8183 1.57568 12.2716 1.57568 10.3637V4.60616Z",stroke:"currentColor",strokeWidth:"2"}),g.jsx("path",{d:"M1 4.79293C1 2.435 3.31004 0.770014 5.54697 1.51566L12.4561 3.81869C13.8667 4.2889 14.8182 5.60901 14.8182 7.09596V13.6313C14.8182 15.9892 12.5081 17.6542 10.2712 16.9086L3.36212 14.6056C1.95149 14.1353 1 12.8152 1 11.3283V4.79293Z",fill:"var(--ck-body-background)",stroke:"currentColor",strokeWidth:"2"}),g.jsx("circle",{cx:"10.3863",cy:"10.1894",r:"1.32574",fill:"currentColor"})]});const DFe=dn` + 0%{ transform: translate(-100%) rotate(-45deg); } + 100%{ transform: translate(100%) rotate(-80deg); } +`,II=Ee(Se.button)` + display: block; + text-decoration: none; +`,RI=Ee(Se.span)``,NI=Ee(Se.div)``,wp={desktop:{ConnectorButton:yt` + cursor: pointer; + user-select: none; + position: relative; + display: flex; + align-items: center; + padding: 0 20px; + width: 100%; + height: 64px; + font-size: 17px; + font-weight: var(--ck-primary-button-font-weight, 500); + line-height: 20px; + text-align: var(--ck-body-button-text-align, left); + transition: 180ms ease; + transition-property: background, color, box-shadow, transform, opacity; + will-change: transform, box-shadow, background-color, color, opacity; + + --fallback-color: var(--ck-primary-button-color); + --fallback-background: var(--ck-primary-button-background); + --fallback-box-shadow: var(--ck-primary-button-box-shadow); + --fallback-border-radius: var(--ck-primary-button-border-radius); + + --color: var(--ck-primary-button-color, var(--fallback-color)); + --background: var( + --ck-primary-button-background, + var(--fallback-background) + ); + --box-shadow: var( + --ck-primary-button-box-shadow, + var(--fallback-box-shadow) + ); + --border-radius: var( + --ck-primary-button-border-radius, + var(--fallback-border-radius) + ); + + --hover-color: var(--ck-primary-button-hover-color, var(--color)); + --hover-background: var( + --ck-primary-button-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-primary-button-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-primary-button-hover-border-radius, + var(--border-radius) + ); + + --active-color: var(--ck-primary-button-active-color, var(--hover-color)); + --active-background: var( + --ck-primary-button-active-background, + var(--hover-background) + ); + --active-box-shadow: var( + --ck-primary-button-active-box-shadow, + var(--hover-box-shadow) + ); + --active-border-radius: var( + --ck-primary-button-active-border-radius, + var(--hover-border-radius) + ); + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &:disabled { + transition: 180ms ease; + opacity: 0.4; + } + + --bg: var(--background); + &:not(:disabled) { + &:hover { + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + --bg: var(--hover-background, var(--background)); + } + &:focus-visible { + transition-duration: 100ms; + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + --bg: var(--hover-background, var(--background)); + } + &:active { + color: var(--active-color); + background: var(--active-background); + box-shadow: var(--active-box-shadow); + border-radius: var(--active-border-radius); + --bg: var(--active-background, var(--background)); + } + } + `,ConnectorLabel:yt` + display: flex; + align-items: center; + gap: 9px; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 2px 0; + padding-right: 38px; + `,ConnectorIcon:yt` + position: absolute; + right: 20px; + width: 32px; + height: 32px; + overflow: hidden; + svg, + img { + display: block; + position: relative; + pointer-events: none; + overflow: hidden; + width: 100%; + height: 100%; + } + + &[data-shape='squircle'] { + border-radius: 22.5%; + } + &[data-shape='circle'] { + border-radius: 100%; + } + &[data-shape='square'] { + border-radius: 0; + } + `},mobile:{ConnectorButton:yt` + text-align: center; + background: none; + max-width: 100%; + overflow: hidden; + `,ConnectorLabel:yt` + display: block; + text-overflow: ellipsis; + max-width: 100%; + overflow: hidden; + padding: 10px 0 0; + color: var(--ck-body-color); + font-size: 13px; + line-height: 15px; + font-weight: 500; + opacity: 0.75; + `,ConnectorIcon:yt` + position: relative; + margin: 0 auto; + width: 60px; + height: 60px; + overflow: hidden; + svg, + img { + display: block; + position: relative; + width: 100%; + height: auto; + } + &[data-small='true'] { + svg, + img { + transform: scale(0.8); + } + } + + &[data-shape='squircle'] { + border-radius: 22.5%; + &:before { + content: ''; + z-index: -1; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: inset 0 0 0 1px var(--ck-body-background-tertiary); + } + } + &[data-shape='circle'] { + border-radius: 100%; + } + &[data-shape='square'] { + border-radius: 0; + } + `}},uae=Ee(Se.span)` + position: relative; + top: var(--ck-recent-badge-top-offset, 0.5px); + display: inline-block; + padding: 10px 7px; + line-height: 0; + font-size: 13px; + font-weight: 400; + border-radius: var(--ck-recent-badge-border-radius, var(--border-radius)); + color: var( + --ck-recent-badge-color, + var(--ck-accent-color, var(--ck-body-color-muted, currentColor)) + ); + background: var(--ck-recent-badge-background, transparent); + overflow: hidden; + span { + display: inline-block; + position: relative; + } + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 0; + opacity: 0.4; + box-shadow: var(--ck-recent-badge-box-shadow, inset 0 0 0 1px currentColor); + border-radius: inherit; + } + &:after { + z-index: 2; + content: ''; + position: absolute; + inset: -10%; + top: -110%; + aspect-ratio: 1/1; + opacity: 0.7; + background: linear-gradient( + 170deg, + transparent 10%, + var(--ck-recent-badge-background, var(--bg)) 50%, + transparent 90% + ); + animation: ${DFe} 2s linear infinite; + } +`,jFe=Ee.div` + transition: opacity 300ms ease; + min-width: fit-content; + + ${e=>e.$disabled&&yt` + pointer-events: none; + opacity: 0.4; + `} + + ${e=>e.$mobile?yt` + display: flex; + align-items: flex-start; + justify-content: space-around; + gap: 22px 6px; + //margin: 0px -10px -20px; + padding: 14px 0px 28px; + + ${II} { + flex-shrink: 0; + width: 80px; + ${wp.mobile.ConnectorButton} + ${RI} { + ${wp.mobile.ConnectorLabel} + ${uae} { + display: none; + width: fit-content; + margin: 0 auto; + } + } + ${NI} { + ${wp.mobile.ConnectorIcon} + } + } + `:yt` + display: flex; + flex-direction: column; + gap: 12px; + + ${II} { + ${wp.desktop.ConnectorButton} + ${RI} { + ${wp.desktop.ConnectorLabel} + } + ${NI} { + ${wp.desktop.ConnectorIcon} + } + } + `} +`;function lae(){var e;const t=Xr();return((e=t==null?void 0:t.chains)!==null&&e!==void 0?e:[]).map(r=>r)}function $E({...e}={}){const t=Cn(),{connect:n,connectAsync:r,connectors:i,...o}=UO({...e,mutation:{...e.mutation,onError(s){s.message?s.message!=="User rejected request"&&t.log(s.message,s):t.log("Could not connect.",s)}}});return{connect:({connector:s,chainId:a,mutation:c})=>{var u;return n({connector:s,chainId:a??((u=t.options)===null||u===void 0?void 0:u.initialChainId)},c)},connectAsync:async({connector:s,chainId:a,mutation:c})=>{var u;return r({connector:s,chainId:a??((u=t.options)===null||u===void 0?void 0:u.initialChainId)},c)},connectors:i,...o}}function FFe({enabled:e}={enabled:!0}){const{log:t}=Cn(),[n,r]=j.useState(void 0),i=Jje(),{isConnected:o}=Xo(),{connectAsync:s}=$E();return j.useEffect(()=>{if(!e)return;async function a(d){const{type:f,data:h}=d;t("WC Message",f,h),f==="display_uri"&&r(h)}async function c(){t("WC Disconnect"),i&&u(i)}async function u(d){const f=await s({connector:d});return f||!1}async function l(d){try{await u(d)}catch(f){if(t("catch error"),t(f),f.code)switch(f.code){case 4001:t("error.code - User rejected"),l(d);break;default:t("error.code - Unknown Error");break}else t("WalletConnect cannot connect.",f)}}if(o)r(void 0);else{if(!i||n)return;if(i&&!o)return l(i),t("add wc listeners"),i.emitter.on("message",a),i.emitter.on("disconnect",c),()=>{t("remove wc listeners"),i.emitter.off("message",a),i.emitter.off("disconnect",c)}}},[e,i,o]),{uri:n}}function tp(e){const{chains:t}=Xr();return e?t.some(n=>n.id===e):!1}const dae=Gn.createContext({connect:{getUri:()=>""},dapp:{chains:[]},account:void 0}),UFe=({enabled:e,children:t})=>{const{uri:n}=FFe({enabled:e}),{address:r,chain:i}=Xo(),o=tp(i==null?void 0:i.id),s=lae(),a={connect:{getUri:c=>n},dapp:{chains:s},account:r?{chain:i,chainIsSupported:o,address:r}:void 0};return g.jsx(dae.Provider,{value:a,children:t})},OB=()=>Gn.useContext(dae);function HE(){const[e,t]=j.useState(Tm());return j.useEffect(()=>{const n=()=>{t(Tm())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const zFe=Ee.div` + position: relative; +`,$Fe=dn` +0%{ opacity:0; } +100%{ opacity:1; } +`,HFe=Ee.div` + z-index: 9; + position: absolute; + left: 0; + right: 0; + bottom: 0.75rem; + display: flex; + justify-content: center; + + transition: opacity 300ms ease; + + span { + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.25rem; + padding: 0.3075rem 0.9375rem 0.375rem; + border-radius: 6rem; + background: var(--ck-tooltip-background); + color: var(--ck-tooltip-color); + font-weight: 500; + font-size: 0.8125rem; + letter-spacing: -0.01rem; + box-shadow: var(--ck-tooltip-shadow); + animation: ${$Fe} 300ms ease 1000ms both; + + transition: transform 100ms ease; + + &:hover { + transform: scale(1.02); + } + &:active { + transform: scale(0.98); + } + svg { + display: block; + transform: translateX(-0.1875rem); + } + } + + &.hide { + opacity: 0; + pointer-events: none; + } +`,VFe=Ee.div` + --bg: ${({$backgroundColor:e})=>e||"var(--ck-body-background)"}; + --fade-height: 1px; + position: relative; + z-index: 1; + + ${({$mobile:e,$height:t,$mobileDirection:n})=>e&&n==="horizontal"?yt` + overflow-x: scroll; + margin: 0 -24px; + padding: 0 24px; + + &:before, + &:after { + pointer-events: none; + z-index: 10; + content: ''; + display: block; + position: sticky; + top: 0; + bottom: 0; + width: var(--fade-height); + background: var( + --ck-body-divider-secondary, + var(--ck-body-divider) + ); + box-shadow: var(--ck-body-divider-box-shadow); + transition: opacity 300ms ease; + } + &:before { + left: 0; + } + &:after { + right: 0; + } + + &.scroll-start { + &:before { + opacity: 0; + } + } + + &.scroll-end { + &:after { + opacity: 0; + } + } + `:yt` + max-height: ${t?`${t}px`:"310px"}; + overflow-y: scroll; + padding: 0 10px; + margin: calc(var(--fade-height) * -1) -16px 0 -10px; + + &:before, + &:after { + pointer-events: none; + z-index: 10; + content: ''; + display: block; + position: sticky; + left: 0; + right: 0; + height: var(--fade-height); + background: var( + --ck-body-divider-secondary, + var(--ck-body-divider) + ); + box-shadow: var(--ck-body-divider-box-shadow); + transition: opacity 300ms ease; + } + &:before { + top: 0; + } + &:after { + bottom: 0; + } + + &.scroll-start { + &:before { + opacity: 0; + } + } + + &.scroll-end { + &:after { + opacity: 0; + } + } + `} + + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + &::-webkit-scrollbar-track { + background: transparent; + } + &::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0); + border-radius: 100px; + } + &:hover::-webkit-scrollbar-thumb { + background: var(--ck-body-color-muted); + } + &::-webkit-scrollbar-thumb:hover { + background: var(--ck-body-color-muted-hover); + } +`,WFe=()=>g.jsx("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M5.49438 1L5.49438 11M5.49438 11L9.5 7M5.49438 11L1.5 7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),fae=({children:e,height:t,backgroundColor:n,mobileDirection:r})=>{const i=j.useRef(null),o=j.useRef(null),s=HE();return j.useEffect(()=>{const a=i.current;if(!a)return;a.scrollHeight>a.clientHeight&&o.current&&o.current.classList.remove("hide");const c=u=>{const{scrollTop:l,scrollHeight:d,clientHeight:f,scrollLeft:h,scrollWidth:p,clientWidth:m}=u.target;o.current&&l>0&&o.current.classList.add("hide"),l===0&&h===0?a.classList.add("scroll-start"):a.classList.remove("scroll-start"),d-l===f&&p-h===m?a.classList.add("scroll-end"):a.classList.remove("scroll-end")};return a.addEventListener("scroll",c),c({target:a}),()=>{a.removeEventListener("scroll",c)}},[i.current]),g.jsxs(zFe,{children:[g.jsx(VFe,{ref:i,$mobile:s,$height:t,$backgroundColor:n,$mobileDirection:r,children:e}),g.jsx(HFe,{ref:o,className:"hide",onClick:()=>{i.current&&i.current.scrollTo({top:i.current.scrollHeight,behavior:"smooth"})},children:g.jsxs("span",{children:[g.jsx(WFe,{})," More Available"]})})]})},GFe=Ee(Se.div)` + display: flex; + gap: 8px; + position: relative; + border-radius: 9px; + margin: 0 auto; + padding: 10px; + text-align: left; + font-size: 14px; + line-height: 17px; + font-weight: 400; + max-width: 260px; + min-width: 100%; + + border-radius: var(--ck-alert-border-radius, 12px); + color: var(--ck-alert-color, var(--ck-body-color-muted)); + background: var(--ck-alert-background, var(--ck-body-background-secondary)); + box-shadow: var(--ck-alert-box-shadow, var(--ck-body-box-shadow)); + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + padding: 16px; + font-size: 16px; + line-height: 21px; + border-radius: 24px; + text-align: center; + } + + ${e=>{if(e)return yt` + color: #fff; + background: var(--ck-body-color-danger, red); + `}} +`,KFe=Ee(Se.div)` + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + svg { + display: block; + width: 100%; + height: auto; + } +`,Pm=({children:e,error:t,icon:n})=>g.jsxs(GFe,{$error:t,children:[n&&g.jsx(KFe,{children:n}),g.jsx("div",{children:e})]});Pm.displayName="Alert";const QFe=()=>{const{storage:e}=Xr(),[t,n]=j.useState(null);return j.useEffect(()=>{(async()=>{const o=await(e==null?void 0:e.getItem("recentConnectorId"));n(o??"")})()},[]),{lastConnectorId:t,updateLastConnectorId:i=>{e==null||e.setItem("recentConnectorId",i)}}},YFe=()=>{var e;const t=Cn(),n=HE(),r=PB(),{lastConnectorId:i}=QFe(),o=!((e=t.options)===null||e===void 0)&&e.hideRecentBadge||i==="walletConnect"?r:[...r.filter(s=>i===s.connector.id),...r.filter(s=>i!==s.connector.id)];return g.jsxs(fae,{mobileDirection:"horizontal",children:[o.length===0&&g.jsx(Pm,{error:!0,children:"No connectors found in ConnectKit config."}),o.length>0&&g.jsx(jFe,{$mobile:n,$totalResults:o.length,children:o.map(s=>g.jsx(qFe,{wallet:s,isRecent:s.id===i},s.id))})]})},qFe=({wallet:e,isRecent:t})=>{var n,r,i,o;const{connect:{getUri:s}}=OB(),a=s(),c=HE(),u=Cn(),{connect:l}=$E();let d=!e.isInstalled&&c||e.shouldDeeplinkDesktop&&!c?(n=e.getWalletConnectDeeplink)===null||n===void 0?void 0:n.call(e,a??""):void 0;const f=c&&_m(e.id),h=(o4()==="safari"||o4()==="ios")&&g9(e.connector.id);return(f||h)&&(d=void 0),g.jsxs(II,{type:"button",as:d?"a":void 0,href:d||void 0,disabled:u.route!==it.CONNECTORS,onClick:d?void 0:()=>{f?u.setRoute(it.MOBILECONNECTORS):(h&&l({connector:e==null?void 0:e.connector}),u.setRoute(it.CONNECT),u.setConnector({id:e.id}))},children:[g.jsx(NI,{"data-small":e.iconShouldShrink,"data-shape":e.iconShape,children:(r=e.iconConnector)!==null&&r!==void 0?r:e.icon}),g.jsxs(RI,{children:[c&&(i=e.shortName)!==null&&i!==void 0?i:e.name,!(!((o=u.options)===null||o===void 0)&&o.hideRecentBadge)&&t&&g.jsx(uae,{children:g.jsx("span",{children:"Recent"})})]})]})},ZFe=()=>{var e,t,n,r,i;const o=Cn(),s=Ci({}),a=HE();return g.jsxs(Go,{style:{width:312},children:[g.jsx(YFe,{}),a?g.jsx(g.Fragment,{children:g.jsxs(NFe,{children:[g.jsxs(yr,{style:{padding:0,textAlign:"left"},children:[g.jsx(Mo,{$small:!0,children:s.connectorsScreen_h1}),g.jsx(Cr,{children:s.connectorsScreen_p})]}),g.jsxs(OFe,{children:[!(!((e=o.options)===null||e===void 0)&&e.hideQuestionMarkCTA)&&g.jsx(Di,{variant:"tertiary",onClick:()=>o.setRoute(it.ABOUT),children:s.learnMore}),!(!((t=o.options)===null||t===void 0)&&t.hideNoWalletCTA)&&g.jsx(Di,{variant:"tertiary",onClick:()=>o.setRoute(it.ONBOARDING),children:s.getWallet})]})]})}):g.jsx(g.Fragment,{children:!(!((n=o.options)===null||n===void 0)&&n.hideNoWalletCTA)&&g.jsx(LFe,{children:g.jsxs(BFe,{onClick:()=>o.setRoute(it.ONBOARDING),children:[g.jsx(MFe,{})," ",s.connectorsScreen_newcomer]})})}),((r=o.options)===null||r===void 0?void 0:r.disclaimer)&&g.jsx(TB,{style:{visibility:"hidden",pointerEvents:"none"},children:g.jsx("div",{children:(i=o.options)===null||i===void 0?void 0:i.disclaimer})})]})},OI=Ee.div` + text-align: center; + transition: opacity 100ms ease; + opacity: ${e=>e.$waiting?.4:1}; +`,YH=Ee.div` + z-index: 9; + position: relative; + margin: 0 auto 10px; + border-radius: 16px; + width: 60px; + height: 60px; + overflow: hidden; + background: rgba(0, 0, 0, 0.04); + ${e=>e.$outline&&` + &:before { + content: ''; + z-index: 2; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: inset 0 0 0 1px var(--ck-body-background-tertiary); + }`} + svg { + display: block; + position: relative; + width: 100%; + height: auto; + } +`,qH=Ee.div` + color: var(--ck-body-color); + font-size: 13px; + line-height: 15px; + font-weight: 500; + opacity: 0.75; +`,JFe=dn` + 0%,100% { opacity:1; } + 50% { opacity:0.5; } +`,XFe=Ee.div` + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 22px 8px; + margin: 0 -10px; + padding: 4px 0 0; + transition: opacity 300ms ease; + ${e=>e.$disabled&&yt` + pointer-events: none; + opacity: 0.4; + ${OI} { + animation: ${JFe} 1s infinite ease-in-out; + } + `} +`,eUe=Ee.div``;function hae(){const{log:e}=Cn(),{connectAsync:t,connectors:n}=$E(),[r,i]=j.useState(!1);return{isOpen:r,open:async()=>{const o=document.createElement("style");o.innerHTML="w3m-modal, wcm-modal{ --wcm-z-index: 2147483647; --w3m-z-index:2147483647; }",document.head.appendChild(o);const s=n.find(a=>_m(a.id));if(s)try{const c=(await s.getProvider()).rpc.projectId,u=mE({projectId:c,showQrModal:!0});i(!0);try{await t({connector:u})}catch(l){e("WalletConnect",l)}i(!1),document.head.removeChild(o)}catch(a){e("Could not get WalletConnect provider",a)}else e("No WalletConnect connector available")}}}const tUe=Ee(Se.div)` + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + display: flex; + align-items: center; + justify-content: center; + width: 16px; + svg { + display: block; + } + svg, + svg path, + svg rect { + transition: inherit; + } + svg path:first-child { + transform-origin: 50% 50%; + fill: var(--bg); + stroke: var(--color); + } + svg rect { + transform-origin: 53% 63%; + fill: var(--bg); + stroke: var(--color); + } + svg path:last-child { + opacity: 0; + stroke: var(--bg); + transform: translate(11.75px, 10px) rotate(90deg) scale(0.6); + } + ${e=>e.$clipboard?yt` + --color: var(--ck-focus-color) !important; + --bg: var(--ck-body-background); + svg { + transition-delay: 0ms; + path:first-child { + opacity: 0; + transform: rotate(-90deg) scale(0.2); + } + rect { + rx: 10px; + fill: var(--color); + transform: rotate(-90deg) scale(1.45); + } + path:last-child { + transition-delay: 100ms; + opacity: 1; + transform: translate(7.75px, 9.5px); + } + } + `:yt` + &:hover { + } + &:hover:active { + } + `} +`,ZH=({copied:e,small:t})=>g.jsx(tUe,{$clipboard:e,children:g.jsx(Rje,{style:{transform:t?"scale(1)":"translateX(3px) scale(1.5)",opacity:t||e?1:.3}})}),nUe=Ee.div` + --color: var(--ck-copytoclipboard-stroke); + --bg: var(--ck-body-background); + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + + ${e=>e.$disabled?yt` + cursor: not-allowed; + opacity: 0.4; + `:yt` + &:hover { + --color: var(--ck-body-color-muted); + } + `} +`,rUe=Ee.div` + display: block; + position: relative; + transition: inherit; + svg { + position: absolute; + left: 100%; + display: block; + top: -1px; + margin: 0; + margin-left: 4px; + } +`,LB=({string:e,children:t,variant:n})=>{const[r,i]=j.useState(!1);let o;const s=()=>{if(!e)return;const a=e.trim();navigator.clipboard&&navigator.clipboard.writeText(a),i(!0),clearTimeout(o),o=setTimeout(()=>i(!1),1e3)};return n==="button"?g.jsx(Di,{disabled:!e,onClick:s,icon:g.jsx(ZH,{copied:r}),children:t}):g.jsx(nUe,{onClick:s,$disabled:!e,children:g.jsxs(rUe,{children:[t,g.jsx(ZH,{copied:r,small:!0})]})})},iUe=g.jsx("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M30 42V19M19 30.5H42",stroke:"var(--ck-body-color-muted)",strokeWidth:"3",strokeLinecap:"round"})}),oUe=()=>{var e,t;const n=Cn(),r=Ci(),{connect:{getUri:i}}=OB(),o=i(),{open:s,isOpen:a}=hae(),c=PB(),u=(e=Object.keys(Mu).filter(d=>{const f=Mu[d];return!(c.find(h=>h.connector.id===d)||!f.getWalletConnectDeeplink)}))!==null&&e!==void 0?e:[],l=d=>{var f;const h=(f=d.getWalletConnectDeeplink)===null||f===void 0?void 0:f.call(d,o);h&&(window.location.href=h)};return g.jsx(Go,{style:{width:312},children:g.jsxs(eUe,{children:[g.jsx(yr,{style:{paddingBottom:0},children:g.jsx(fae,{height:340,children:g.jsxs(XFe,{$disabled:!o,children:[u.sort((d,f)=>{var h,p,m,x;const y=Mu[d],b=Mu[f],v=(p=(h=y.name)!==null&&h!==void 0?h:y.shortName)!==null&&p!==void 0?p:d,w=(x=(m=b.name)!==null&&m!==void 0?m:b.shortName)!==null&&x!==void 0?x:f;return v.localeCompare(w)}).filter(d=>!(d==="coinbaseWallet"||d==="com.coinbase.wallet")).map((d,f)=>{const h=Mu[d],{name:p,shortName:m,iconConnector:x,icon:y}=h;return g.jsxs(OI,{onClick:()=>l(h),style:{animationDelay:`${f*50}ms`},children:[g.jsx(YH,{$outline:!0,children:x??y}),g.jsx(qH,{children:m??p})]},f)}),g.jsxs(OI,{onClick:s,$waiting:a,children:[g.jsx(YH,{style:{background:"var(--ck-body-background-secondary)"},children:a?g.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("div",{style:{width:"50%"},children:g.jsx(iae,{})})}):iUe}),g.jsx(qH,{children:r.more})]})]})})}),((t=n.options)===null||t===void 0?void 0:t.walletConnectCTA)!=="modal"&&g.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:14,paddingTop:8},children:g.jsx(LB,{variant:"button",string:o,children:r.copyToClipboard})})]})})},Ep=Ee(Se.div)` + display: flex; + flex-direction: column; + gap: 6px; + position: relative; + left: 0; + right: 0; + ${yr} { + padding: 0 8px 32px; + gap: 12px; + } +`,ek=2,sUe=dn` + 0%{ transform:none; } + 25%{ transform:translateX(${ek}px); } + 50%{ transform:translateX(-${ek}px); } + 75%{ transform:translateX(${ek}px); } + 100%{ transform:none; } +`,aUe=dn` + 0%{ opacity:1; } + 100%{ opacity:0; } +`,tk=Ee(Se.div)` + /* + background: var( + --ck-body-background + ); // To stop the overlay issue during transition for the squircle spinner + */ +`,cUe=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + margin: 10px auto 16px; + height: 120px; + //transform: scale(1.001); // fixes shifting issue between states +`,uUe=Ee(Se.div)` + user-select: none; + position: relative; + --spinner-error-opacity: 0; + &:before { + content: ''; + position: absolute; + inset: 1px; + opacity: 0; + background: var(--ck-body-color-danger); + ${e=>e.$circle&&yt` + inset: -5px; + border-radius: 50%; + background: none; + box-shadow: inset 0 0 0 3.5px var(--ck-body-color-danger); + `} + } + ${e=>e.$shake&&yt` + animation: ${sUe} 220ms ease-out both; + &:before { + animation: ${aUe} 220ms ease-out 750ms both; + } + `} +`,lUe=Ee(Se.button)` + z-index: 5; + appearance: none; + position: absolute; + right: 2px; + bottom: 2px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border-radius: 16px; + cursor: pointer; + overflow: hidden; + background: none; + + color: var(--ck-body-background); + transition: color 200ms ease; + box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); + + &:before { + z-index: 3; + content: ''; + position: absolute; + inset: 0; + opacity: 0; + transition: opacity 200ms ease; + background: var(--ck-body-color); + } + + &:hover:before { + opacity: 0.1; + } +`,dUe=Ee(Se.div)` + position: absolute; + inset: 0; + + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 3px; + border-radius: 16px; + background: conic-gradient( + from 90deg, + currentColor 10%, + var(--ck-body-color) 80% + ); + } + + svg { + z-index: 2; + display: block; + position: relative; + width: 100%; + height: 100%; + } +`,fUe=Ee(Se.div)` + z-index: 2147483647; + position: fixed; + inset: 0; + pointer-events: none; +`,hUe=Ee(Se.div)` + --shadow: var(--ck-tooltip-shadow); + z-index: 2147483647; + position: absolute; + top: 0; + left: 0; + display: flex; + gap: 8px; + width: fit-content; + align-items: center; + justify-content: center; + border-radius: var( + --ck-tooltip-border-radius, + ${e=>e.$size==="small"?11:14}px + ); + border-radius: ; + padding: 10px 16px 10px 12px; + font-size: 14px; + line-height: 19px; + font-weight: 500; + letter-spacing: -0.1px; + color: var(--ck-tooltip-color); + background: var(--ck-tooltip-background); + box-shadow: var(--shadow); + > span { + z-index: 3; + position: relative; + } + > div { + margin: -4px 0; // offset for icon + } + strong { + color: var(--ck-spinner-color); + } + + .ck-tt-logo { + display: inline-block; + vertical-align: text-bottom; + height: 1em; + width: 1.25em; + svg { + display: block; + height: 100%; + transform: translate(0.5px, -1px) scale(1.75); + } + } +`,pUe=Ee(Se.div)` + z-index: 2; + position: absolute; + display: flex; + align-items: center; + justify-content: center; + width: ${e=>e.$size==="small"?14:18}px; + right: 100%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + content: ''; + position: absolute; + box-shadow: var(--shadow); + width: ${e=>e.$size==="small"?14:18}px; + height: ${e=>e.$size==="small"?14:18}px; + transform: translate(75%, 0) rotate(45deg); + background: var(--ck-tooltip-background); + border-radius: ${e=>e.$size==="small"?2:3}px 0 0 0; + } +`,BB=({children:e,message:t,open:n,xOffset:r=0,yOffset:i=0,delay:o})=>{var s;const a=Cn(),c=UE();if(!((s=a.options)===null||s===void 0)&&s.hideTooltips)return g.jsx(g.Fragment,{children:e});const[u,l]=j.useState(!1),[d,f]=j.useState(!1),[h,p]=j.useState("small"),[m,x]=j.useState(!1),[y]=j.useState(a.route),b=j.useRef(null),[v,w]=lse({debounce:m?0:220,offsetSize:!0,scroll:!0}),E=()=>{let A=!1;const O=r+w.left+w.width,N=i+w.top+w.height*.5;return(O>window.innerWidth||O<0||N>window.innerHeight||N<0)&&(A=!0),A};return(typeof window<"u"?j.useLayoutEffect:j.useEffect)(()=>{if(!b.current||w.top+w.bottom+w.left+w.right+w.height+w.width===0)return;const A=r+w.left+w.width,O=i+w.top+w.height*.5;!m&&A!==0&&O!==0&&x(!0),b.current.style.left=`${A}px`,b.current.style.top=`${O}px`,p(b.current.offsetHeight<=40?"small":"large"),f(E())},[w,n,u]),j.useEffect(()=>{a.open||l(!1)},[a.open]),j.useEffect(()=>{l(!!n)},[n]),g.jsxs(g.Fragment,{children:[g.jsx(Se.div,{ref:v,style:n===void 0?{cursor:"help"}:{},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),onClick:()=>l(!1),children:e}),g.jsx(kB,{children:g.jsx(pr,{children:y===a.route&&!d&&u&&g.jsx(s4,{$useTheme:c.theme,$useMode:c.mode,$customTheme:c.customTheme,children:g.jsx(fUe,{children:g.jsxs(hUe,{role:"tooltip",$size:h,ref:b,initial:"collapsed",animate:m?"open":{},exit:"collapsed",variants:{collapsed:{transformOrigin:"20px 50%",opacity:0,scale:.9,z:.01,y:"-50%",x:20,transition:{duration:.1}},open:{willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:"-50%",x:20,transition:{ease:[.76,0,.24,1],duration:.15,delay:o||.5}}},children:[t,g.jsx(pUe,{$size:h})]})})})})})]})},gUe=Ee(Se.div)` + z-index: 4; + position: relative; + overflow: hidden; + svg { + z-index: 3; + position: relative; + display: block; + } +`,mUe=Ee(Se.div)` + z-index: 2; + position: absolute; + overflow: hidden; + inset: 6px; + border-radius: 24px; + background: var(--ck-body-background); + svg, + img { + pointer-events: none; + display: block; + width: 100%; + height: 100%; + } +`,yUe=Ee(Se.div)` + position: absolute; + inset: 1px; + overflow: hidden; +`,bUe=Ee(Se.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: -25%; + &:before { + content: ''; + position: absolute; + inset: 0; + background: conic-gradient( + from -90deg, + transparent, + transparent, + transparent, + transparent, + transparent, + var(--ck-spinner-color) + ); + animation: rotateSpinner 1200ms linear infinite; + } + @keyframes rotateSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`,vUe=({logo:e,connecting:t=!0})=>g.jsxs(gUe,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[g.jsx(mUe,{children:e}),g.jsx(yUe,{children:g.jsx(pr,{children:t&&g.jsx(bUe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:0}}},"Spinner")})}),g.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",children:[g.jsx("rect",{x:"7.57895",y:"7.57895",width:"86.8421",height:"86.8421",rx:"19.2211",stroke:"black",strokeOpacity:"0.02",strokeWidth:"1.15789"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H102V102H0V0ZM7 38.284C7 27.5684 7 22.2106 9.01905 18.0892C10.9522 14.1431 14.1431 10.9522 18.0892 9.01905C22.2106 7 27.5684 7 38.284 7H63.716C74.4316 7 79.7894 7 83.9108 9.01905C87.8569 10.9522 91.0478 14.1431 92.9809 18.0892C95 22.2106 95 27.5684 95 38.284V63.716C95 74.4316 95 79.7894 92.9809 83.9108C91.0478 87.8569 87.8569 91.0478 83.9108 92.9809C79.7894 95 74.4316 95 63.716 95H38.284C27.5684 95 22.2106 95 18.0892 92.9809C14.1431 91.0478 10.9522 87.8569 9.01905 83.9108C7 79.7894 7 74.4316 7 63.716V38.284ZM41.5 0.5H41.4325C34.7246 0.499996 29.6023 0.499994 25.5104 0.823325C21.388 1.14906 18.1839 1.80986 15.3416 3.20227C10.0602 5.78959 5.78959 10.0602 3.20227 15.3416C1.80986 18.1839 1.14906 21.388 0.823325 25.5104C0.499994 29.6023 0.499996 34.7246 0.5 41.4325V41.5V55.5938C0.5 55.6808 0.507407 55.766 0.521624 55.849C0.507407 55.9319 0.5 56.0172 0.5 56.1042V60.5V60.5675C0.499996 67.2754 0.499994 72.3977 0.823325 76.4896C1.14906 80.612 1.80986 83.8161 3.20227 86.6584C5.78959 91.9398 10.0602 96.2104 15.3416 98.7977C18.1839 100.19 21.388 100.851 25.5104 101.177C29.6022 101.5 34.7244 101.5 41.432 101.5H41.4324H41.5H43.4227H60.5H60.5675H60.568C67.2756 101.5 72.3977 101.5 76.4896 101.177C80.612 100.851 83.8161 100.19 86.6584 98.7977C91.9398 96.2104 96.2104 91.9398 98.7977 86.6584C100.19 83.8161 100.851 80.612 101.177 76.4896C101.5 72.3978 101.5 67.2756 101.5 60.568V60.5676V60.5V41.5V41.4324V41.432C101.5 34.7244 101.5 29.6022 101.177 25.5104C100.851 21.388 100.19 18.1839 98.7977 15.3416C96.2104 10.0602 91.9398 5.78959 86.6584 3.20227C83.8161 1.80986 80.612 1.14906 76.4896 0.823325C72.3977 0.499994 67.2754 0.499996 60.5675 0.5H60.5H41.5ZM3.5 56.1042C3.5 56.0172 3.49259 55.9319 3.47838 55.849C3.49259 55.766 3.5 55.6808 3.5 55.5938V41.5C3.5 34.7112 3.50109 29.7068 3.814 25.7467C4.1256 21.8032 4.73946 19.0229 5.89635 16.6614C8.19077 11.9779 11.9779 8.19077 16.6614 5.89635C19.0229 4.73946 21.8032 4.1256 25.7467 3.814C29.7068 3.50109 34.7112 3.5 41.5 3.5H60.5C67.2888 3.5 72.2932 3.50109 76.2533 3.814C80.1968 4.1256 82.977 4.73946 85.3386 5.89635C90.022 8.19077 93.8092 11.9779 96.1036 16.6614C97.2605 19.0229 97.8744 21.8032 98.186 25.7467C98.4989 29.7068 98.5 34.7112 98.5 41.5V60.5C98.5 67.2888 98.4989 72.2932 98.186 76.2533C97.8744 80.1968 97.2605 82.9771 96.1036 85.3386C93.8092 90.022 90.022 93.8092 85.3386 96.1036C82.977 97.2605 80.1968 97.8744 76.2533 98.186C72.2932 98.4989 67.2888 98.5 60.5 98.5H43.4227H41.5C34.7112 98.5 29.7068 98.4989 25.7467 98.186C21.8032 97.8744 19.0229 97.2605 16.6614 96.1036C11.9779 93.8092 8.19077 90.022 5.89635 85.3386C4.73946 82.9771 4.1256 80.1968 3.814 76.2533C3.50109 72.2932 3.5 67.2888 3.5 60.5V56.1042Z",fill:"var(--ck-body-background)"})]})]}),xUe=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + max-width: 32px; + max-height: 32px; + width: 100%; + height: 100%; + svg { + display: block; + width: 100%; + height: 100%; + } +`,wUe=g.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("g",{filter:"url(#filter0_ii_927_5781)",children:g.jsxs("g",{clipPath:"url(#clip0_927_5781)",children:[g.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"#DB4437"}),g.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"url(#paint0_linear_927_5781)"}),g.jsx("path",{d:"M6.17038 12.2272L1.64538 4.46582L1.57947 4.57946L6.07265 12.284L6.17038 12.2272Z",fill:"black",fillOpacity:"0.15"}),g.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"#0F9D58"}),g.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"url(#paint1_linear_927_5781)"}),g.jsx("path",{d:"M13.8412 12.4208L13.7469 12.3662L9.38324 19.9969H9.51392L13.8435 12.4242L13.8412 12.4208Z",fill:"#263238",fillOpacity:"0.15"}),g.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"#FFCD40"}),g.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"url(#paint2_linear_927_5781)"}),g.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"#FFCD40"}),g.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"url(#paint3_linear_927_5781)"}),g.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"#DB4437"}),g.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"url(#paint4_linear_927_5781)"}),g.jsx("path",{d:"M10 5.45459V7.83527L18.9091 5.45459H10Z",fill:"url(#paint5_radial_927_5781)"}),g.jsx("path",{d:"M0 19.9998H9.51932L11.9318 15.9089L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"#0F9D58"}),g.jsx("path",{d:"M0 19.9998H9.51932L12.1023 15.5112L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"url(#paint6_linear_927_5781)"}),g.jsx("path",{d:"M1.58771 4.59668L8.09339 11.1012L6.06384 12.2728L1.58771 4.59668Z",fill:"url(#paint7_radial_927_5781)"}),g.jsx("path",{d:"M9.52661 19.9884L11.9084 11.1021L13.938 12.2725L9.52661 19.9884Z",fill:"url(#paint8_radial_927_5781)"}),g.jsx("path",{d:"M10.0003 14.5455C12.5107 14.5455 14.5458 12.5104 14.5458 10C14.5458 7.48966 12.5107 5.45459 10.0003 5.45459C7.48996 5.45459 5.4549 7.48966 5.4549 10C5.4549 12.5104 7.48996 14.5455 10.0003 14.5455Z",fill:"#F1F1F1"}),g.jsx("path",{d:"M9.99995 13.6365C12.0083 13.6365 13.6363 12.0084 13.6363 10.0001C13.6363 7.99183 12.0083 6.36377 9.99995 6.36377C7.99164 6.36377 6.36359 7.99183 6.36359 10.0001C6.36359 12.0084 7.99164 13.6365 9.99995 13.6365Z",fill:"#4285F4"}),g.jsx("path",{d:"M10.0003 5.34082C7.48899 5.34082 5.4549 7.37491 5.4549 9.88628V9.99991C5.4549 7.48855 7.48899 5.45446 10.0003 5.45446H20.0003V5.34082H10.0003Z",fill:"black",fillOpacity:"0.2"}),g.jsx("path",{d:"M13.9318 12.273C13.1455 13.6299 11.6818 14.5458 10 14.5458C8.31818 14.5458 6.85227 13.6299 6.06818 12.273H6.06364L0 1.87305V1.98668L6.06818 12.3867C6.85455 13.7435 8.31818 14.6594 10 14.6594C11.6818 14.6594 13.1455 13.7446 13.9318 12.3867H13.9375V12.273H13.9307H13.9318Z",fill:"white",fillOpacity:"0.1"}),g.jsx("path",{opacity:"0.1",d:"M10.1133 5.45459C10.094 5.45459 10.0758 5.45686 10.0565 5.458C12.5406 5.48868 14.5452 7.50913 14.5452 10C14.5452 12.491 12.5406 14.5114 10.0565 14.5421C10.0758 14.5421 10.094 14.5455 10.1133 14.5455C12.6247 14.5455 14.6588 12.5114 14.6588 10C14.6588 7.48868 12.6247 5.45459 10.1133 5.45459Z",fill:"black"}),g.jsx("path",{d:"M13.9769 12.4204C14.3632 11.7522 14.5871 10.9795 14.5871 10.1522C14.5874 9.68602 14.5157 9.22262 14.3746 8.77832C14.4826 9.16696 14.5451 9.57377 14.5451 9.99764C14.5451 10.8249 14.3212 11.5976 13.9348 12.2658L13.9371 12.2704L9.51892 19.9976H9.65074L13.9769 12.4204Z",fill:"white",fillOpacity:"0.2"}),g.jsx("path",{d:"M10 0.113636C15.5034 0.113636 19.9682 4.56023 20 10.0568C20 10.0375 20.0011 10.0193 20.0011 10C20.0011 4.47727 15.5239 0 10.0011 0C4.47841 0 0 4.47727 0 10C0 10.0193 0.00113639 10.0375 0.00113639 10.0568C0.0318182 4.56023 4.49659 0.113636 10 0.113636Z",fill:"white",fillOpacity:"0.2"}),g.jsx("path",{d:"M10 19.8865C15.5034 19.8865 19.9682 15.4399 20 9.94336C20 9.96268 20.0011 9.98086 20.0011 10.0002C20.0011 15.5229 15.5239 20.0002 10.0011 20.0002C4.47841 20.0002 0 15.5229 0 10.0002C0 9.98086 0.00113639 9.96268 0.00113639 9.94336C0.0318182 15.4399 4.49659 19.8865 10.0011 19.8865H10Z",fill:"black",fillOpacity:"0.15"})]})}),g.jsxs("defs",{children:[g.jsxs("filter",{id:"filter0_ii_927_5781",x:0,y:"-0.235294",width:20,height:"20.4706",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[g.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),g.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),g.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),g.jsx("feOffset",{dy:"0.235294"}),g.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),g.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),g.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),g.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_927_5781"}),g.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),g.jsx("feOffset",{dy:"-0.235294"}),g.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),g.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),g.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),g.jsx("feBlend",{mode:"normal",in2:"effect1_innerShadow_927_5781",result:"effect2_innerShadow_927_5781"})]}),g.jsxs("linearGradient",{id:"paint0_linear_927_5781",x1:"2.42521",y1:"7.61591",x2:"8.39112",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),g.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"paint1_linear_927_5781",x1:"11.6932",y1:"17.7844",x2:"5.06136",y2:"13.8981",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),g.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"paint2_linear_927_5781",x1:"12.9438",y1:"4.75004",x2:"14.6143",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),g.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"paint3_linear_927_5781",x1:"12.9428",y1:"4.75004",x2:"14.6132",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),g.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"paint4_linear_927_5781",x1:"2.42441",y1:"7.61591",x2:"8.39032",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),g.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),g.jsxs("radialGradient",{id:"paint5_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.56818 5.44891) scale(9.55455)",children:[g.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),g.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"paint6_linear_927_5781",x1:"11.6932",y1:"17.7839",x2:"5.06136",y2:"13.8976",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),g.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),g.jsxs("radialGradient",{id:"paint7_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.57975 4.60463) scale(8.86818)",children:[g.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),g.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),g.jsxs("radialGradient",{id:"paint8_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.97775 10.0157) scale(9.98523)",children:[g.jsx("stop",{stopColor:"#263238",stopOpacity:"0.2"}),g.jsx("stop",{offset:1,stopColor:"#263238",stopOpacity:0})]}),g.jsx("clipPath",{id:"clip0_927_5781",children:g.jsx("rect",{width:20,height:20,rx:10,fill:"white"})})]})]}),EUe=g.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsxs("g",{clipPath:"url(#clip0_927_5847)",children:[g.jsx("path",{d:"M19.011 6.71023C18.5898 5.69685 17.7355 4.60269 17.0665 4.25681C17.5436 5.18063 17.8747 6.17276 18.0481 7.19792L18.0499 7.21417C16.954 4.48315 15.0963 3.38023 13.5782 0.981835C13.5014 0.860539 13.4246 0.738994 13.3498 0.610696C13.3071 0.537418 13.2728 0.471393 13.2431 0.410621C13.1801 0.288713 13.1316 0.159878 13.0985 0.0267267C13.0985 0.0205825 13.0963 0.0146369 13.0923 0.0100242C13.0882 0.00541151 13.0826 0.00245454 13.0765 0.00171737C13.0705 7.85858e-05 13.0642 7.85858e-05 13.0582 0.00171737C13.057 0.00171737 13.055 0.00396821 13.0535 0.0044684C13.052 0.00496859 13.0487 0.00721943 13.0465 0.00821981L13.0502 0.00171737C10.6156 1.42725 9.78901 4.06574 9.71399 5.38624C8.74136 5.45292 7.81141 5.81121 7.04549 6.41437C6.96561 6.34671 6.88212 6.28343 6.79539 6.2248C6.57456 5.45174 6.56514 4.6336 6.76813 3.85566C5.87401 4.28877 5.07954 4.90279 4.43501 5.65884H4.43051C4.04636 5.17191 4.07337 3.5663 4.09538 3.23093C3.98174 3.2766 3.87326 3.33419 3.77176 3.40274C3.43264 3.64477 3.11562 3.91635 2.8244 4.2143C2.49255 4.55075 2.18946 4.91441 1.91831 5.30146V5.30296V5.3012C1.29521 6.18444 0.853213 7.18234 0.617826 8.23731L0.604821 8.30133C0.586564 8.38661 0.52079 8.81377 0.509535 8.90656C0.509535 8.91381 0.508035 8.92056 0.507285 8.92781C0.42244 9.36882 0.369864 9.81542 0.349976 10.2641V10.3141C0.354259 12.7396 1.26772 15.0754 2.91002 16.8604C4.55233 18.6454 6.80415 19.7498 9.22094 19.9556C11.6377 20.1615 14.0439 19.4538 15.9644 17.9723C17.8849 16.4908 19.1803 14.3431 19.5947 11.9532C19.6109 11.8282 19.6242 11.7044 19.6387 11.5781C19.8384 9.92791 19.6222 8.25404 19.01 6.70873L19.011 6.71023ZM7.83928 14.2981C7.88455 14.3198 7.92707 14.3433 7.97358 14.3641L7.98034 14.3684C7.93332 14.3458 7.8863 14.3224 7.83928 14.2981ZM18.0501 7.21692V7.20767L18.0519 7.21792L18.0501 7.21692Z",fill:"url(#paint0_linear_927_5847)"}),g.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint1_radial_927_5847)"}),g.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint2_radial_927_5847)"}),g.jsx("path",{d:"M14.2993 7.84794C14.3203 7.8627 14.3398 7.87745 14.3595 7.89221C14.1161 7.46047 13.813 7.06519 13.4592 6.71802C10.4456 3.70439 12.6696 0.18557 13.0445 0.00550206L13.0483 0C10.6136 1.42553 9.78706 4.06402 9.71204 5.38452C9.82508 5.37677 9.93712 5.36726 10.0527 5.36726C10.9164 5.36893 11.7644 5.59929 12.5103 6.03492C13.2562 6.47055 13.8734 7.09592 14.2993 7.84744V7.84794Z",fill:"url(#paint3_radial_927_5847)"}),g.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint4_radial_927_5847)"}),g.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint5_radial_927_5847)"}),g.jsx("path",{d:"M6.59134 6.0923C6.66987 6.14231 6.73464 6.18583 6.79141 6.2251C6.57058 5.45204 6.56117 4.63389 6.76415 3.85596C5.87003 4.28907 5.07556 4.90308 4.43103 5.65913C4.4783 5.65788 5.88432 5.63262 6.59134 6.0923Z",fill:"url(#paint6_radial_927_5847)"}),g.jsx("path",{d:"M0.437567 10.5439C1.1856 14.963 5.19185 18.3393 9.73855 18.4668C13.9476 18.5859 16.6361 16.1425 17.7466 13.7601C18.6873 11.6998 18.7954 9.35569 18.0482 7.21762V7.20837C18.0482 7.20111 18.0467 7.19686 18.0482 7.19911L18.0499 7.21537C18.3938 9.46046 17.2519 11.6345 15.4665 13.1076L15.4609 13.1201C11.9821 15.9536 8.6534 14.8292 7.98064 14.3706C7.93363 14.348 7.88661 14.3246 7.83959 14.3003C5.81158 13.3309 4.97352 11.4842 5.15358 9.89862C4.67218 9.90573 4.19905 9.77307 3.79151 9.51672C3.38397 9.26038 3.05952 8.89134 2.85747 8.45433C3.38987 8.1282 3.99692 7.94382 4.62077 7.91878C5.24461 7.89374 5.86448 8.02887 6.42131 8.31128C7.56906 8.83225 8.87507 8.8836 10.0602 8.45433C10.0564 8.37555 8.36954 7.70405 7.71179 7.05631C7.36041 6.70993 7.1936 6.54312 7.04579 6.41782C6.96591 6.35016 6.88243 6.28688 6.7957 6.22825C6.73818 6.18898 6.6734 6.14647 6.59562 6.09545C5.88861 5.63578 4.48258 5.66104 4.43607 5.66229H4.43156C4.04742 5.17535 4.07443 3.56975 4.09644 3.23438C3.9828 3.28005 3.87431 3.33764 3.77282 3.40619C3.4337 3.64822 3.11667 3.91979 2.82546 4.21774C2.49242 4.55325 2.18808 4.91607 1.91562 5.3024V5.3039V5.30215C1.29252 6.18539 0.850521 7.18329 0.615133 8.23825C0.610381 8.25801 0.266002 9.76357 0.435816 10.5444L0.437567 10.5439Z",fill:"url(#paint7_radial_927_5847)"}),g.jsx("path",{d:"M13.459 6.71761C13.8128 7.06516 14.1159 7.46087 14.3593 7.89305C14.4126 7.93331 14.4624 7.97333 14.5046 8.01209C16.7022 10.0378 15.5508 12.9014 15.465 13.104C17.2502 11.6332 18.3911 9.45763 18.0485 7.21179C16.952 4.47826 15.0923 3.37535 13.5768 0.976952C13.5 0.855657 13.4232 0.734111 13.3484 0.605813C13.3057 0.532535 13.2714 0.466511 13.2417 0.405738C13.1787 0.283831 13.1302 0.154995 13.0971 0.0218439C13.0971 0.0156997 13.0949 0.0097541 13.0909 0.0051414C13.0868 0.000528701 13.0812 -0.00242828 13.0751 -0.00316545C13.0691 -0.00480423 13.0628 -0.00480423 13.0568 -0.00316545C13.0556 -0.00316545 13.0536 -0.000914601 13.0521 -0.000414413C13.0506 8.57743e-05 13.0473 0.00233662 13.0451 0.00333699C12.6702 0.181154 10.4466 3.70222 13.4602 6.71335L13.459 6.71761Z",fill:"url(#paint8_radial_927_5847)"}),g.jsx("path",{d:"M14.5043 8.01315C14.462 7.97439 14.4122 7.93437 14.359 7.8941C14.3392 7.87935 14.3197 7.86459 14.2987 7.84984C13.6169 7.37759 12.784 7.17536 11.9616 7.28238C15.4479 9.02553 14.5125 15.0278 9.68095 14.8027C9.25075 14.785 8.82562 14.703 8.41973 14.5594C8.32486 14.5238 8.22999 14.485 8.13512 14.4428C8.08035 14.4178 8.02558 14.3928 7.97156 14.3648L7.97831 14.369C8.65206 14.829 11.9798 15.9526 15.4586 13.1186L15.4641 13.1061C15.5509 12.9035 16.7023 10.0399 14.5038 8.01415L14.5043 8.01315Z",fill:"url(#paint9_radial_927_5847)"}),g.jsx("path",{d:"M5.68842 11.1892C5.68842 11.1892 6.13583 9.52179 8.89212 9.52179C9.18998 9.52179 10.0425 8.69023 10.0578 8.44914C8.8727 8.8784 7.56669 8.82706 6.41894 8.30608C5.86211 8.02367 5.24224 7.88855 4.61839 7.91359C3.99455 7.93863 3.3875 8.123 2.8551 8.44914C3.05715 8.88615 3.3816 9.25518 3.78914 9.51153C4.19668 9.76787 4.66981 9.90053 5.15121 9.89343C4.97165 11.4783 5.80946 13.3247 7.83722 14.2951C7.88249 14.3168 7.925 14.3403 7.97152 14.3611C6.78783 13.7496 5.81046 12.5932 5.68842 11.1899V11.1892Z",fill:"url(#paint10_radial_927_5847)"}),g.jsx("path",{d:"M19.0112 6.71023C18.59 5.69685 17.7357 4.60269 17.0667 4.25681C17.5438 5.18063 17.8749 6.17276 18.0483 7.19792L18.0501 7.21417C16.9542 4.48315 15.0965 3.38023 13.5784 0.981835C13.5016 0.860539 13.4249 0.738994 13.3501 0.610696C13.3073 0.537418 13.2731 0.471393 13.2433 0.410621C13.1803 0.288713 13.1318 0.159878 13.0987 0.0267267C13.0988 0.0205825 13.0966 0.0146369 13.0925 0.0100242C13.0884 0.00541151 13.0828 0.00245454 13.0767 0.00171737C13.0708 7.85859e-05 13.0644 7.85859e-05 13.0585 0.00171737C13.0572 0.00171737 13.0552 0.00396821 13.0537 0.0044684C13.0522 0.00496859 13.049 0.00721943 13.0467 0.00821981L13.0505 0.00171737C10.6158 1.42725 9.78925 4.06574 9.71422 5.38624C9.82726 5.37848 9.9393 5.36898 10.0548 5.36898C10.9186 5.37065 11.7666 5.60101 12.5125 6.03664C13.2584 6.47227 13.8756 7.09764 14.3014 7.84916C13.6196 7.37691 12.7868 7.17468 11.9643 7.2817C15.4506 9.02485 14.5153 15.0271 9.68371 14.802C9.25351 14.7843 8.82838 14.7023 8.42248 14.5587C8.32761 14.5232 8.23275 14.4843 8.13788 14.4421C8.08311 14.4171 8.02834 14.3921 7.97432 14.3641L7.98107 14.3684C7.93405 14.3458 7.88703 14.3224 7.84002 14.2981C7.88528 14.3198 7.9278 14.3433 7.97432 14.3641C6.79062 13.7524 5.81326 12.5959 5.69121 11.1929C5.69121 11.1929 6.13863 9.52554 8.89491 9.52554C9.19277 9.52554 10.0453 8.69398 10.0606 8.45289C10.0568 8.37411 8.36996 7.7026 7.71222 7.05486C7.36084 6.70848 7.19402 6.54167 7.04622 6.41637C6.96634 6.34871 6.88285 6.28543 6.79612 6.2268C6.57529 5.45374 6.56588 4.6356 6.76886 3.85766C5.87474 4.29077 5.08027 4.90479 4.43574 5.66084H4.43124C4.04709 5.17391 4.0741 3.5683 4.09611 3.23293C3.98247 3.2786 3.87399 3.33619 3.77249 3.40474C3.43337 3.64677 3.11635 3.91835 2.82514 4.2163C2.49328 4.55275 2.19019 4.91641 1.91905 5.30345V5.30496V5.30321C1.29595 6.18644 0.853946 7.18434 0.618558 8.23931L0.605554 8.30333C0.587297 8.38861 0.505516 8.82177 0.493762 8.91481C0.418959 9.36194 0.371188 9.81318 0.350708 10.2661V10.3161C0.354992 12.7416 1.26845 15.0774 2.91076 16.8624C4.55307 18.6474 6.80488 19.7518 9.22168 19.9576C11.6385 20.1635 14.0446 19.4558 15.9652 17.9743C17.8857 16.4928 19.181 14.3451 19.5954 11.9552C19.6117 11.8302 19.6249 11.7064 19.6394 11.5801C19.8391 9.92991 19.623 8.25604 19.0107 6.71073L19.0112 6.71023ZM18.0496 7.20817L18.0513 7.21842L18.0496 7.20817Z",fill:"url(#paint11_linear_927_5847)"})]}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_927_5847",x1:"17.728",y1:"3.09786",x2:"1.63621",y2:"18.6237",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{offset:"0.048",stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.111",stopColor:"#FFE847"}),g.jsx("stop",{offset:"0.225",stopColor:"#FFC830"}),g.jsx("stop",{offset:"0.368",stopColor:"#FF980E"}),g.jsx("stop",{offset:"0.401",stopColor:"#FF8B16"}),g.jsx("stop",{offset:"0.462",stopColor:"#FF672A"}),g.jsx("stop",{offset:"0.534",stopColor:"#FF3647"}),g.jsx("stop",{offset:"0.705",stopColor:"#E31587"})]}),g.jsxs("radialGradient",{id:"paint1_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(17.1052 2.25108) scale(20.2076)",children:[g.jsx("stop",{offset:"0.129",stopColor:"#FFBD4F"}),g.jsx("stop",{offset:"0.186",stopColor:"#FFAC31"}),g.jsx("stop",{offset:"0.247",stopColor:"#FF9D17"}),g.jsx("stop",{offset:"0.283",stopColor:"#FF980E"}),g.jsx("stop",{offset:"0.403",stopColor:"#FF563B"}),g.jsx("stop",{offset:"0.467",stopColor:"#FF3750"}),g.jsx("stop",{offset:"0.71",stopColor:"#F5156C"}),g.jsx("stop",{offset:"0.782",stopColor:"#EB0878"}),g.jsx("stop",{offset:"0.86",stopColor:"#E50080"})]}),g.jsxs("radialGradient",{id:"paint2_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.6024 10.5042) scale(20.2076)",children:[g.jsx("stop",{offset:"0.3",stopColor:"#960E18"}),g.jsx("stop",{offset:"0.351",stopColor:"#B11927",stopOpacity:"0.74"}),g.jsx("stop",{offset:"0.435",stopColor:"#DB293D",stopOpacity:"0.343"}),g.jsx("stop",{offset:"0.497",stopColor:"#F5334B",stopOpacity:"0.094"}),g.jsx("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:0})]}),g.jsxs("radialGradient",{id:"paint3_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.1034 -2.25084) scale(14.638)",children:[g.jsx("stop",{offset:"0.132",stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.252",stopColor:"#FFDC3E"}),g.jsx("stop",{offset:"0.506",stopColor:"#FF9D12"}),g.jsx("stop",{offset:"0.526",stopColor:"#FF980E"})]}),g.jsxs("radialGradient",{id:"paint4_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.35173 15.7558) scale(9.62111)",children:[g.jsx("stop",{offset:"0.353",stopColor:"#3A8EE6"}),g.jsx("stop",{offset:"0.472",stopColor:"#5C79F0"}),g.jsx("stop",{offset:"0.669",stopColor:"#9059FF"}),g.jsx("stop",{offset:1,stopColor:"#C139E6"})]}),g.jsxs("radialGradient",{id:"paint5_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.5799 8.76923) rotate(-13.5916) scale(5.10194 5.97309)",children:[g.jsx("stop",{offset:"0.206",stopColor:"#9059FF",stopOpacity:0}),g.jsx("stop",{offset:"0.278",stopColor:"#8C4FF3",stopOpacity:"0.064"}),g.jsx("stop",{offset:"0.747",stopColor:"#7716A8",stopOpacity:"0.45"}),g.jsx("stop",{offset:"0.975",stopColor:"#6E008B",stopOpacity:"0.6"})]}),g.jsxs("radialGradient",{id:"paint6_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35238 1.50057) scale(6.9226)",children:[g.jsx("stop",{stopColor:"#FFE226"}),g.jsx("stop",{offset:"0.121",stopColor:"#FFDB27"}),g.jsx("stop",{offset:"0.295",stopColor:"#FFC82A"}),g.jsx("stop",{offset:"0.502",stopColor:"#FFA930"}),g.jsx("stop",{offset:"0.732",stopColor:"#FF7E37"}),g.jsx("stop",{offset:"0.792",stopColor:"#FF7139"})]}),g.jsxs("radialGradient",{id:"paint7_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.8545 -3.00121) scale(29.5361)",children:[g.jsx("stop",{offset:"0.113",stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.456",stopColor:"#FF980E"}),g.jsx("stop",{offset:"0.622",stopColor:"#FF5634"}),g.jsx("stop",{offset:"0.716",stopColor:"#FF3647"}),g.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),g.jsxs("radialGradient",{id:"paint8_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3996 -1.36343) rotate(83.976) scale(21.6445 14.2051)",children:[g.jsx("stop",{stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.06",stopColor:"#FFE847"}),g.jsx("stop",{offset:"0.168",stopColor:"#FFC830"}),g.jsx("stop",{offset:"0.304",stopColor:"#FF980E"}),g.jsx("stop",{offset:"0.356",stopColor:"#FF8B16"}),g.jsx("stop",{offset:"0.455",stopColor:"#FF672A"}),g.jsx("stop",{offset:"0.57",stopColor:"#FF3647"}),g.jsx("stop",{offset:"0.737",stopColor:"#E31587"})]}),g.jsxs("radialGradient",{id:"paint9_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35233 4.00165) scale(18.4369)",children:[g.jsx("stop",{offset:"0.137",stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.48",stopColor:"#FF980E"}),g.jsx("stop",{offset:"0.592",stopColor:"#FF5634"}),g.jsx("stop",{offset:"0.655",stopColor:"#FF3647"}),g.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),g.jsxs("radialGradient",{id:"paint10_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.1041 5.00184) scale(20.1801)",children:[g.jsx("stop",{offset:"0.094",stopColor:"#FFF44F"}),g.jsx("stop",{offset:"0.231",stopColor:"#FFE141"}),g.jsx("stop",{offset:"0.509",stopColor:"#FFAF1E"}),g.jsx("stop",{offset:"0.626",stopColor:"#FF980E"})]}),g.jsxs("linearGradient",{id:"paint11_linear_927_5847",x1:"17.5331",y1:"3.01533",x2:"3.84302",y2:"16.708",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{offset:"0.167",stopColor:"#FFF44F",stopOpacity:"0.8"}),g.jsx("stop",{offset:"0.266",stopColor:"#FFF44F",stopOpacity:"0.634"}),g.jsx("stop",{offset:"0.489",stopColor:"#FFF44F",stopOpacity:"0.217"}),g.jsx("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:0})]}),g.jsx("clipPath",{id:"clip0_927_5847",children:g.jsx("rect",{width:20,height:20,fill:"white"})})]})]}),CUe=g.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M17.2924 5.22043L17.7256 4.15905L16.4982 2.8883C15.8339 2.22404 14.4187 2.61393 14.4187 2.61393L12.8158 0.794434H7.16242L5.55231 2.62115C5.55231 2.62115 4.13715 2.23848 3.47289 2.8883L2.24545 4.15183L2.67866 5.21321L2.13715 6.78721L3.9422 13.6681C4.31765 15.141 4.57036 15.7114 5.63173 16.4623L8.93137 18.7006C9.24906 18.8955 9.63895 19.2349 9.99274 19.2349C10.3465 19.2349 10.7364 18.8955 11.0541 18.7006L14.3538 16.4623C15.4151 15.7114 15.6678 15.141 16.0433 13.6681L17.8483 6.78721L17.2924 5.22043Z",fill:"url(#paint0_linear_927_5861)"}),g.jsx("path",{d:"M13.9711 3.78343C13.9711 3.78343 16.0433 6.28884 16.0433 6.81592C16.0433 7.35744 15.7834 7.49462 15.5234 7.77621L13.9711 9.43686C13.8267 9.58126 13.5162 9.82675 13.6967 10.2527C13.8772 10.686 14.1299 11.2203 13.8411 11.769C13.5523 12.3249 13.0469 12.6932 12.722 12.6354C12.2387 12.4786 11.7777 12.2602 11.3502 11.9856C11.0758 11.8051 10.1949 11.0758 10.1949 10.7943C10.1949 10.5127 11.1047 10 11.278 9.89895C11.444 9.78343 12.2166 9.33577 12.231 9.16249C12.2455 8.9892 12.2455 8.94588 12.0144 8.51267C11.7834 8.07946 11.379 7.50184 11.4368 7.12639C11.509 6.75094 12.1588 6.54877 12.6426 6.36827L14.1372 5.80509C14.2527 5.74733 14.2238 5.69679 13.8772 5.66068C13.5307 5.6318 12.5559 5.50184 12.1155 5.62458C11.6751 5.74733 10.9386 5.93505 10.8664 6.03614C10.8086 6.13722 10.7509 6.13722 10.8159 6.48379L11.2346 8.75816C11.2635 9.04697 11.3213 9.24191 11.018 9.31411C10.7003 9.38632 10.1733 9.50906 9.99276 9.50906C9.81225 9.50906 9.27796 9.38632 8.96749 9.31411C8.65702 9.24191 8.71478 9.04697 8.75088 8.75816C8.77976 8.46935 9.09745 6.82314 9.16243 6.48379C9.23464 6.13722 9.16965 6.13722 9.11189 6.03614C9.03969 5.93505 8.29601 5.74733 7.85558 5.62458C7.42236 5.50184 6.44041 5.6318 6.09384 5.66791C5.74727 5.69679 5.71839 5.74011 5.83391 5.81231L7.3285 6.36827C7.80503 6.54877 8.46929 6.75094 8.53428 7.12639C8.60648 7.50906 8.19493 8.07946 7.95666 8.51267C7.71839 8.94588 7.72561 8.9892 7.74005 9.16249C7.75449 9.33577 8.53428 9.78343 8.69312 9.89895C8.86641 10.0073 9.77615 10.5127 9.77615 10.7943C9.77615 11.0758 8.91695 11.8051 8.62814 11.9856C8.20063 12.2602 7.73957 12.4786 7.2563 12.6354C6.93139 12.6932 6.42597 12.3249 6.12994 11.769C5.84113 11.2203 6.10106 10.686 6.27435 10.2527C6.45485 9.81953 6.1516 9.58848 5.99998 9.43686L4.44763 7.77621C4.19493 7.50906 3.935 7.36466 3.935 6.83036C3.935 6.29606 6.0072 3.79787 6.0072 3.79787L7.97832 4.11556C8.20937 4.11556 8.722 3.92061 9.19132 3.75455C9.66063 3.61014 9.98554 3.5957 9.98554 3.5957C9.98554 3.5957 10.3032 3.5957 10.7798 3.75455C11.2563 3.91339 11.7617 4.11556 11.9928 4.11556C12.231 4.11556 13.9783 3.77621 13.9783 3.77621L13.9711 3.78343ZM12.4188 13.3719C12.5487 13.4441 12.4693 13.6029 12.3465 13.6896L10.5126 15.1192C10.3682 15.2636 10.1372 15.4802 9.98554 15.4802C9.83391 15.4802 9.61009 15.2636 9.45846 15.1192C8.8506 14.6351 8.23683 14.1586 7.61731 13.6896C7.50178 13.6029 7.42236 13.4513 7.54511 13.3719L8.62814 12.7943C9.05864 12.5665 9.51417 12.3897 9.98554 12.2672C10.0938 12.2672 10.7798 12.5127 11.3357 12.7943L12.4188 13.3719Z",fill:"white"}),g.jsx("path",{d:"M14.4332 2.62115L12.8159 0.794434H7.16243L5.55232 2.62115C5.55232 2.62115 4.13716 2.23848 3.4729 2.8883C3.4729 2.8883 5.35016 2.72223 5.99998 3.77638L7.99276 4.11573C8.2238 4.11573 8.73644 3.92079 9.20575 3.75472C9.67507 3.61032 9.99998 3.59588 9.99998 3.59588C9.99998 3.59588 10.3177 3.59588 10.7942 3.75472C11.2707 3.91357 11.7761 4.11573 12.0072 4.11573C12.2455 4.11573 13.9928 3.77638 13.9928 3.77638C14.6426 2.72223 16.5198 2.8883 16.5198 2.8883C15.8556 2.22404 14.4404 2.61393 14.4404 2.61393",fill:"url(#paint1_linear_927_5861)"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_927_5861",x1:"2.13715",y1:"10.1991",x2:"17.8483",y2:"10.1991",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),g.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),g.jsxs("linearGradient",{id:"paint1_linear_927_5861",x1:"3.73384",y1:"2.4883",x2:"16.5198",y2:"2.4883",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#FF452A"}),g.jsx("stop",{offset:1,stopColor:"#FF2000"})]})]})]}),AUe=g.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsxs("g",{clipPath:"url(#clip0_927_5865)",children:[g.jsx("path",{d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint0_linear_927_5865)"}),g.jsx("path",{opacity:"0.35",d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint1_radial_927_5865)"}),g.jsx("path",{d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint2_linear_927_5865)"}),g.jsx("path",{opacity:"0.41",d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint3_radial_927_5865)"}),g.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint4_radial_927_5865)"}),g.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint5_radial_927_5865)"})]}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_927_5865",x1:"4.58594",y1:"13.8281",x2:"18.5234",y2:"13.8281",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#0C59A4"}),g.jsx("stop",{offset:1,stopColor:"#114A8B"})]}),g.jsxs("radialGradient",{id:"paint1_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.2813 13.9332) scale(7.45313 7.08047)",children:[g.jsx("stop",{offset:"0.7",stopOpacity:0}),g.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),g.jsx("stop",{offset:1})]}),g.jsxs("linearGradient",{id:"paint2_linear_927_5865",x1:"11.9297",y1:"7.78125",x2:"3.23436",y2:"17.2578",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#1B9DE2"}),g.jsx("stop",{offset:"0.2",stopColor:"#1595DF"}),g.jsx("stop",{offset:"0.7",stopColor:"#0680D7"}),g.jsx("stop",{offset:1,stopColor:"#0078D4"})]}),g.jsxs("radialGradient",{id:"paint3_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5.51209 15.5419) rotate(-81.3844) scale(11.202 9.05011)",children:[g.jsx("stop",{offset:"0.8",stopOpacity:0}),g.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),g.jsx("stop",{offset:1})]}),g.jsxs("radialGradient",{id:"paint4_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.02266 3.69656) rotate(92.2906) scale(15.8251 33.7043)",children:[g.jsx("stop",{stopColor:"#35C1F1"}),g.jsx("stop",{offset:"0.1",stopColor:"#34C1ED"}),g.jsx("stop",{offset:"0.2",stopColor:"#2FC2DF"}),g.jsx("stop",{offset:"0.3",stopColor:"#2BC3D2"}),g.jsx("stop",{offset:"0.7",stopColor:"#36C752"})]}),g.jsxs("radialGradient",{id:"paint5_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(18.7547 6.03906) rotate(73.7398) scale(7.60156 6.18159)",children:[g.jsx("stop",{stopColor:"#66EB6E"}),g.jsx("stop",{offset:1,stopColor:"#66EB6E",stopOpacity:0})]}),g.jsx("clipPath",{id:"clip0_927_5865",children:g.jsx("rect",{width:20,height:20,fill:"white"})})]})]});var nk={Chrome:wUe,FireFox:EUe,Brave:CUe,Edge:AUe};const LI=Gn.forwardRef(({browser:e},t)=>{const n=e??o4();let r;switch(n){case"chrome":r=nk.Chrome;break;case"firefox":r=nk.FireFox;break;case"edge":r=nk.Edge;break}return r?g.jsx(xUe,{children:r}):g.jsx(g.Fragment,{})});LI.displayName="BrowserIcon";const SUe=Ee(Se.div)` + z-index: 4; + position: relative; + width: 100px; + height: 100px; + svg { + z-index: 3; + position: relative; + display: block; + } +`,kUe=Ee(Se.div)` + z-index: 2; + position: absolute; + overflow: hidden; + inset: 6px; + border-radius: 50px; + background: var(--ck-body-background); + display: flex; + align-items: center; + justify-content: center; + svg, + img { + pointer-events: none; + display: block; + margin: 0 auto; + width: 100%; + height: 100%; + ${e=>e.$small&&yt` + width: 85%; + height: 85%; + `} + } +`,TUe=Ee(Se.div)` + position: absolute; + inset: -5px; +`,_Ue=Ee(Se.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: -25%; + background: var(--ck-body-background); + div:first-child { + position: absolute; + left: 50%; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 0% 50%; + animation: rotateExpiringSpinner 5000ms ease-in both; + } + } + div:last-child { + position: absolute; + left: 0; + right: 50%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 100% 50%; + animation: rotateExpiringSpinner 5000ms ease-out 5000ms both; + } + } + @keyframes rotateExpiringSpinner { + 0% { + transform: rotate(-180deg); + } + 100% { + transform: rotate(0deg); + } + } +`,PUe=Ee(Se.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: 0; + svg { + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + animation: rotateSpinner 1200ms linear infinite; + } + @keyframes rotateSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`,IUe=({logo:e,smallLogo:t,connecting:n=!0,unavailable:r=!1,countdown:i=!1})=>g.jsxs(SUe,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[g.jsx(kUe,{$small:!r&&t,style:r?{borderRadius:0}:void 0,children:e}),g.jsx(TUe,{children:g.jsxs(pr,{children:[n&&g.jsx(PUe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:i?1:0}},children:g.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M52 100C24.3858 100 2 77.6142 2 50",stroke:"url(#paint0_linear_1943_4139)",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"paint0_linear_1943_4139",x1:"2",y1:"48.5",x2:"53",y2:"100",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]})},"Spinner"),i&&g.jsxs(_Ue,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[g.jsx("div",{}),g.jsx("div",{})]},"ExpiringSpinner")]})})]}),Bt={CONNECTED:"connected",CONNECTING:"connecting",EXPIRING:"expiring",FAILED:"failed",REJECTED:"rejected",NOTCONNECTED:"notconnected",UNAVAILABLE:"unavailable"},Cp={initial:{willChange:"transform,opacity",position:"relative",opacity:0,scale:.95},animate:{position:"relative",opacity:1,scale:1,transition:{ease:[.16,1,.3,1],duration:.4,delay:.05,position:{delay:0}}},exit:{position:"absolute",opacity:0,scale:.95,transition:{ease:[.16,1,.3,1],duration:.3}}},RUe=({switchConnectMethod:e,forceState:t})=>{var n,r,i,o,s,a,c,u;const{connect:l}=$E({mutation:{onMutate:R=>{R.connector?I(Bt.CONNECTING):I(Bt.UNAVAILABLE)},onError(R){console.error(R)},onSettled(R,_){if(_){if(y(!0),setTimeout(()=>y(!1),3500),_.code)switch(_.code){case-32002:I(Bt.NOTCONNECTED);break;case 4001:I(Bt.REJECTED);break;default:I(Bt.FAILED);break}else if(_.message)switch(_.message){case"User rejected request":I(Bt.REJECTED);break;default:I(Bt.FAILED);break}}setTimeout(d,100)}}}),{triggerResize:d,connector:f}=Cn(),h=f.id,p=w5(h),m={name:p==null?void 0:p.name,shortName:(n=p==null?void 0:p.shortName)!==null&&n!==void 0?n:p==null?void 0:p.name,icon:(r=p==null?void 0:p.iconConnector)!==null&&r!==void 0?r:p==null?void 0:p.icon,iconShape:(i=p==null?void 0:p.iconShape)!==null&&i!==void 0?i:"circle",iconShouldShrink:p==null?void 0:p.iconShouldShrink},[x,y]=j.useState(!1);j.useState(9);const v=o4(),w=(o=p==null?void 0:p.downloadUrls)===null||o===void 0?void 0:o[v],E=p!=null&&p.downloadUrls?{name:Object.keys(p==null?void 0:p.downloadUrls)[0],label:((s=Object.keys(p==null?void 0:p.downloadUrls)[0])===null||s===void 0?void 0:s.charAt(0).toUpperCase())+((a=Object.keys(p==null?void 0:p.downloadUrls)[0])===null||a===void 0?void 0:a.slice(1)),url:p==null?void 0:p.downloadUrls[Object.keys(p==null?void 0:p.downloadUrls)[0]]}:void 0,[S,I]=j.useState(t||(p!=null&&p.isInstalled?Bt.CONNECTING:Bt.UNAVAILABLE)),A=Ci({CONNECTORNAME:m.name,CONNECTORSHORTNAME:(c=m.shortName)!==null&&c!==void 0?c:m.name,SUGGESTEDEXTENSIONBROWSER:(u=E==null?void 0:E.label)!==null&&u!==void 0?u:"your browser"}),O=async()=>{p!=null&&p.isInstalled&&(p!=null&&p.connector)?l({connector:p==null?void 0:p.connector}):I(Bt.UNAVAILABLE)};let N;return j.useEffect(()=>{if(S!==Bt.UNAVAILABLE)return N=setTimeout(O,600),()=>{clearTimeout(N)}},[]),p?_m(p==null?void 0:p.connector.id)?g.jsx(Go,{children:g.jsxs(tk,{children:[g.jsx(m9,{children:"Invalid State"}),g.jsx(yr,{children:g.jsx(Pm,{children:"WalletConnect does not have an injection flow. This state should never happen."})})]})}):g.jsx(Go,{children:g.jsxs(tk,{children:[g.jsx(cUe,{children:g.jsxs(uUe,{$shake:S===Bt.FAILED||S===Bt.REJECTED,$circle:m.iconShape==="circle",children:[g.jsx(pr,{children:(S===Bt.FAILED||S===Bt.REJECTED)&&g.jsx(lUe,{"aria-label":"Retry",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileTap:{scale:.9},transition:{duration:.1},onClick:O,children:g.jsx(dUe,{children:g.jsx(BB,{open:x&&(S===Bt.FAILED||S===Bt.REJECTED),message:A.tryAgainQuestion,xOffset:-6,children:g.jsx(Pje,{})})})})}),m.iconShape==="circle"?g.jsx(IUe,{logo:S===Bt.UNAVAILABLE?g.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:m.icon}):g.jsx(g.Fragment,{children:m.icon}),smallLogo:m.iconShouldShrink,connecting:S===Bt.CONNECTING,unavailable:S===Bt.UNAVAILABLE}):g.jsx(vUe,{logo:S===Bt.UNAVAILABLE?g.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:m.icon}):g.jsx(g.Fragment,{children:m.icon}),connecting:S===Bt.CONNECTING})]})}),g.jsx(dje,{children:g.jsxs(pr,{initial:!1,children:[S===Bt.FAILED&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:g.jsxs(yr,{children:[g.jsxs(Mo,{$error:!0,children:[g.jsx(_je,{}),A.injectionScreen_failed_h1]}),g.jsx(Cr,{children:A.injectionScreen_failed_p})]})},Bt.FAILED),S===Bt.REJECTED&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:g.jsxs(yr,{style:{paddingBottom:28},children:[g.jsx(Mo,{children:A.injectionScreen_rejected_h1}),g.jsx(Cr,{children:A.injectionScreen_rejected_p})]})},Bt.REJECTED),(S===Bt.CONNECTING||S===Bt.EXPIRING)&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:g.jsxs(yr,{style:{paddingBottom:28},children:[g.jsx(Mo,{children:p.connector.id==="injected"?A.injectionScreen_connecting_injected_h1:A.injectionScreen_connecting_h1}),g.jsx(Cr,{children:p.connector.id==="injected"?A.injectionScreen_connecting_injected_p:A.injectionScreen_connecting_p})]})},Bt.CONNECTING),S===Bt.CONNECTED&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:g.jsxs(yr,{children:[g.jsxs(Mo,{$valid:!0,children:[g.jsx(Xse,{})," ",A.injectionScreen_connected_h1]}),g.jsx(Cr,{children:A.injectionScreen_connected_p})]})},Bt.CONNECTED),S===Bt.NOTCONNECTED&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:g.jsxs(yr,{children:[g.jsx(Mo,{children:A.injectionScreen_notconnected_h1}),g.jsx(Cr,{children:A.injectionScreen_notconnected_p})]})},Bt.NOTCONNECTED),S===Bt.UNAVAILABLE&&g.jsx(Ep,{initial:"initial",animate:"animate",exit:"exit",variants:Cp,children:w?g.jsxs(g.Fragment,{children:[g.jsxs(yr,{style:{paddingBottom:18},children:[g.jsx(Mo,{children:A.injectionScreen_install_h1}),g.jsx(Cr,{children:A.injectionScreen_install_p})]}),!p.isInstalled&&w&&g.jsx(Di,{href:w,icon:g.jsx(LI,{}),children:A.installTheExtension})]}):g.jsxs(g.Fragment,{children:[g.jsxs(yr,{style:{paddingBottom:12},children:[g.jsx(Mo,{children:A.injectionScreen_unavailable_h1}),g.jsx(Cr,{children:A.injectionScreen_unavailable_p})]}),!p.isInstalled&&E&&g.jsxs(Di,{href:E==null?void 0:E.url,icon:g.jsx(LI,{browser:E==null?void 0:E.name}),children:["Install on ",E==null?void 0:E.label]})]})},Bt.UNAVAILABLE)]})})]})}):g.jsx(Go,{children:g.jsxs(tk,{children:[g.jsx(m9,{children:"Invalid State"}),g.jsx(yr,{children:g.jsx(Pm,{children:"No connectors match the id given. This state should never happen."})})]})})},NUe=Ee(Se.div)` + z-index: 3; + position: relative; + overflow: hidden; + height: 0; + padding-bottom: 100% !important; + display: flex; + align-items: center; + justify-content: center; + margin: 1px 0 2px; + border-radius: var(--ck-qr-border-radius, 24px); + background: var(--ck-qr-background, transparent); + box-shadow: 0 0 0 1px var(--ck-qr-border-color); + backface-visibility: hidden; + svg { + display: block; + max-width: 100%; + width: 100%; + height: auto; + } +`,OUe=Ee(Se.div)` + position: absolute; + inset: 13px; + svg { + width: 100% !important; + height: auto !important; + } +`,LUe=dn` + 0%{ background-position: 100% 0; } + 100%{ background-position: -100% 0; } +`,BUe=Ee(Se.div)` + --color: var(--ck-qr-dot-color); + --bg: var(--ck-qr-background, var(--ck-body-background)); + + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + > div { + z-index: 4; + position: relative; + width: 28%; + height: 28%; + border-radius: 20px; + background: var(--bg); + box-shadow: 0 0 0 7px var(--bg); + } + > span { + z-index: 4; + position: absolute; + background: var(--color); + border-radius: 12px; + width: 13.25%; + height: 13.25%; + box-shadow: 0 0 0 4px var(--bg); + &:before { + content: ''; + position: absolute; + inset: 9px; + border-radius: 3px; + box-shadow: 0 0 0 4px var(--bg); + } + &:nth-child(1) { + top: 0; + left: 0; + } + &:nth-child(2) { + top: 0; + right: 0; + } + &:nth-child(3) { + bottom: 0; + left: 0; + } + } + &:before { + z-index: 3; + content: ''; + position: absolute; + inset: 0; + background: repeat; + background-size: 1.888% 1.888%; + background-image: radial-gradient(var(--color) 41%, transparent 41%); + } + &:after { + z-index: 5; + content: ''; + position: absolute; + inset: 0; + transform: scale(1.5) rotate(45deg); + background-image: linear-gradient( + 90deg, + rgba(255, 255, 255, 0) 50%, + rgba(255, 255, 255, 1), + rgba(255, 255, 255, 0) + ); + background-size: 200% 100%; + animation: ${LUe} 1000ms linear infinite both; + } +`,MUe=Ee(Se.div)` + z-index: 6; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + transform: translateY(50%) scale(0.9999); // Shifting fix +`,DUe=Ee(Se.div)` + z-index: 6; + position: absolute; + left: 50%; + overflow: hidden; + + transform: translate(-50%, -50%) scale(0.9999); // Shifting fix + + svg { + display: block; + position: relative; + width: 100%; + height: 100%; + } + + ${e=>e.$wcLogo?yt` + width: 29%; + height: 20.5%; + `:yt` + width: 28%; + height: 28%; + border-radius: 17px; + &:before { + pointer-events: none; + z-index: 2; + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02); + } + `} +`,jUe=(e,t)=>{const n=Array.prototype.slice.call(v5.create(e,{errorCorrectionLevel:t}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((i,o,s)=>(s%r===0?i.push([o]):i[i.length-1].push(o))&&i,[])};function FUe({ecl:e="M",size:t=200,uri:n,clearArea:r=!1,image:i,imageBackground:o="transparent"}){const s=r?76:0,a=t-10*2,c=j.useMemo(()=>{const u=[],l=jUe(n,e),d=a/l.length;if([{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x,y})=>{const b=(l.length-7)*d*x,v=(l.length-7)*d*y;for(let w=0;w<3;w++)u.push(g.jsx("rect",{fill:w%2!==0?"var(--ck-qr-background, var(--ck-body-background))":"var(--ck-qr-dot-color)",rx:(w-2)*-5+(w===0?2:3),ry:(w-2)*-5+(w===0?2:3),width:d*(7-w*2),height:d*(7-w*2),x:b+d*w,y:v+d*w},`${w}-${x}-${y}`))}),i){const x=(l.length-7)*d*1,y=(l.length-7)*d*1;u.push(g.jsxs(g.Fragment,{children:[g.jsx("rect",{fill:o,rx:-2*-5+2,ry:-2*-5+2,width:d*(7-0*2),height:d*(7-0*2),x:x+d*0,y:y+d*0}),g.jsx("foreignObject",{width:d*(7-0*2),height:d*(7-0*2),x:x+d*0,y:y+d*0,children:g.jsx("div",{style:{borderRadius:-2*-5+2,overflow:"hidden"},children:i})})]}))}const h=Math.floor((s+25)/d),p=l.length/2-h/2,m=l.length/2+h/2-1;return l.forEach((x,y)=>{x.forEach((b,v)=>{l[y][v]&&(y<7&&v<7||y>l.length-8&&v<7||y<7&&v>l.length-8||(i||!(y>p&&yp&&v{function n(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e}function MB({value:e,image:t,imageBackground:n,imagePosition:r="center",tooltipMessage:i}){const s=UUe().width>920&&i?g.jsx(BB,{xOffset:139,yOffset:5,delay:.1,message:i,children:t}):t;return g.jsx(NUe,{children:g.jsxs(OUe,{children:[t&&g.jsx(MUe,{children:g.jsx(DUe,{$wcLogo:r!=="center",style:{background:r==="center"?n:void 0},children:s})}),g.jsx(pr,{initial:!1,children:e?g.jsx(Se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",inset:[0,0]},transition:{duration:.2},children:g.jsx(FUe,{uri:e,size:288,ecl:"M",clearArea:!!(r==="center"&&t)})},e):g.jsxs(BUe,{initial:{opacity:.1},animate:{opacity:.1},exit:{opacity:0,position:"absolute",inset:[0,0]},transition:{duration:.2},children:[g.jsx("span",{}),g.jsx("span",{}),g.jsx("span",{}),g.jsx("div",{})]})})]})})}MB.displayName="CustomQRCode";const zUe=Ee(Se.div)` + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: 47px; + height: 52px; + min-width: 47px; + min-height: 52px; + svg { + display: block; + max-width: 100%; + height: auto; + } +`,JH=({logo:e})=>{const t=[g.jsx(Nt.MetaMask,{background:!0}),g.jsx(Nt.Coinbase,{background:!0}),g.jsx(Nt.Crypto,{}),g.jsx(Nt.ImToken,{}),g.jsx(Nt.Argent,{}),g.jsx(Nt.Trust,{})];return g.jsx(zUe,{children:g.jsxs("svg",{"aria-hidden":"true",width:"47",height:"52",viewBox:"0 0 47 52",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsxs("g",{mask:"url(#gradient-mask)",children:[g.jsx("path",{d:"M7 14.5C7 11.4624 9.46243 9 12.5 9H31.5C34.5376 9 37 11.4624 37 14.5V47H7V14.5Z",fill:"var(--ck-graphic-scaniconwithlogos-04)"}),e?g.jsx("foreignObject",{x:"13",y:"21",width:"18",height:"18",rx:"5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:5},children:e})}):g.jsxs(g.Fragment,{children:[g.jsx("foreignObject",{x:"12",y:"15",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[0]})}),g.jsx("foreignObject",{x:"23",y:"15",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[1]})}),g.jsx("foreignObject",{x:"12",y:"26",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[2]})})}),g.jsx("foreignObject",{x:"23",y:"26",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[3]})}),g.jsx("foreignObject",{x:"12",y:"37",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[4]})}),g.jsx("foreignObject",{x:"23",y:"37",width:"9",height:"9",rx:"2.5",children:g.jsx("div",{style:{overflow:"hidden",borderRadius:2.5},children:t[5]})})]}),g.jsx("path",{d:"M36 47V13.7143C36 11.1107 33.8893 9 31.2857 9H12.7143C10.1107 9 8 11.1107 8 13.7143V47",stroke:"url(#paint0_linear_924_12568)",strokeWidth:"2"}),g.jsx("path",{d:"M15 10H29C29 11.1046 28.1046 12 27 12H17C15.8954 12 15 11.1046 15 10Z",fill:"var(--ck-graphic-scaniconwithlogos-01)"}),g.jsx("rect",{x:"1",y:"47",width:"43",height:"5",fill:"var(--ck-tooltip-background)"}),g.jsx("rect",{x:"22",y:"1",width:"24",height:"24",rx:"12",fill:"var(--ck-graphic-scaniconwithlogos-03)",stroke:"var(--ck-tooltip-background)",strokeWidth:"2"}),g.jsx("rect",{x:"34.5",y:"10",width:"2.5",height:"2.5",rx:"0.75",fill:"#373737"}),g.jsx("rect",{x:"31",y:"10",width:"2.5",height:"2.5",rx:"0.75",fill:"#373737"}),g.jsx("rect",{x:"31",y:"13.5",width:"2.5",height:"2.5",rx:"0.75",fill:"#373737"}),g.jsx("rect",{x:"34.5",y:"13.5",width:"2.5",height:"2.5",rx:"0.75",fill:"#373737"}),g.jsx("path",{d:"M28.5 10.5V9C28.5 8.17157 29.1716 7.5 30 7.5H31.5",stroke:"#373737",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M36.5 7.5L38 7.5C38.8284 7.5 39.5 8.17157 39.5 9L39.5 10.5",stroke:"#373737",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M39.5 15.5L39.5 17C39.5 17.8284 38.8284 18.5 38 18.5L36.5 18.5",stroke:"#373737",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M31.5 18.5L30 18.5C29.1716 18.5 28.5 17.8284 28.5 17L28.5 15.5",stroke:"#373737",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_924_12568",x1:"22",y1:"8.2549",x2:"22",y2:"47",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"var(--ck-graphic-scaniconwithlogos-01)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-graphic-scaniconwithlogos-02)"})]}),g.jsxs("linearGradient",{id:"linear-gradient-mask",x1:"47",y1:"42",x2:"47",y2:"47",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"black",stopOpacity:"0"})]}),g.jsx("mask",{id:"gradient-mask",children:g.jsx("rect",{x:"0",y:"0",width:"47",height:"52",fill:"url(#linear-gradient-mask)"})})]})]})})},$Ue=({switchConnectMethod:e})=>{var t,n,r,i,o,s,a,c;const u=Cn(),l=u.connector.id,d=w5(u.connector.id),{open:f,isOpen:h}=hae(),{connect:{getUri:p}}=OB(),m=p(l),x=m?(n=(t=d==null?void 0:d.getWalletConnectDeeplink)===null||t===void 0?void 0:t.call(d,m))!==null&&n!==void 0?n:m:void 0,y=Ci({CONNECTORNAME:d==null?void 0:d.name});if(!d)return g.jsxs(g.Fragment,{children:["Wallet not found ",u.connector.id]});const b=d==null?void 0:d.downloadUrls,v={chrome:b==null?void 0:b.chrome,firefox:b==null?void 0:b.firefox,brave:b==null?void 0:b.brave,edge:b==null?void 0:b.edge,safari:b==null?void 0:b.safari};o4();const w=b&&Object.keys(b).length!==0;v&&(Object.keys(v)[0],((r=Object.keys(v)[0])===null||r===void 0?void 0:r.charAt(0).toUpperCase())+((i=Object.keys(v)[0])===null||i===void 0?void 0:i.slice(1)),v[Object.keys(v)[0]]);const E=_m(l);return g.jsxs(Go,{children:[g.jsxs(yr,{style:{paddingBottom:8,gap:14},children:[g.jsx(MB,{value:x,image:d==null?void 0:d.icon,tooltipMessage:_m(l)?g.jsxs(g.Fragment,{children:[g.jsx(JH,{}),g.jsx("span",{children:y.scanScreen_tooltip_walletConnect})]}):g.jsxs(g.Fragment,{children:[g.jsx(JH,{logo:d==null?void 0:d.icon}),g.jsx("span",{children:y.scanScreen_tooltip_default})]})}),E?g.jsx(y9,{}):w&&g.jsx(y9,{children:y.dontHaveTheApp})]}),E&&g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:14},children:[((o=u.options)===null||o===void 0?void 0:o.walletConnectCTA)!=="modal"&&g.jsx(LB,{variant:"button",string:x,children:((s=u.options)===null||s===void 0?void 0:s.walletConnectCTA)==="link"?y.copyToClipboard:y.copyCode}),((a=u.options)===null||a===void 0?void 0:a.walletConnectCTA)!=="link"&&g.jsx(Di,{icon:g.jsx(Tje,{}),onClick:f,disabled:h,waiting:h,children:((c=u.options)===null||c===void 0?void 0:c.walletConnectCTA)==="modal"?y.useWalletConnectModal:y.useModal})]}),w&&g.jsx(g.Fragment,{children:g.jsx(Di,{onClick:()=>{u.setRoute(it.DOWNLOAD)},download:!0,children:y.getWalletName})})]})},Ja={QRCODE:"qrcode",INJECTOR:"injector"},HUe=()=>{const e=Cn(),t=w5(e.connector.id),n=!(t!=null&&t.isInstalled)&&(t==null?void 0:t.getWalletConnectDeeplink),[r,i]=j.useState(n?Ja.QRCODE:Ja.INJECTOR);return j.useEffect(()=>{const o=async()=>{await(t==null?void 0:t.connector.getProvider())||(i(Ja.QRCODE),setTimeout(e.triggerResize,10))};r===Ja.INJECTOR&&o()},[]),t?g.jsxs(pr,{children:[r===Ja.QRCODE&&g.jsx(Se.div,{initial:"initial",animate:"animate",exit:"exit",variants:jH,children:g.jsx($Ue,{switchConnectMethod:o=>{i(Ja.INJECTOR)}})},Ja.QRCODE),r===Ja.INJECTOR&&g.jsx(Se.div,{initial:"initial",animate:"animate",exit:"exit",variants:jH,children:g.jsx(RUe,{switchConnectMethod:o=>{i(Ja.QRCODE)}})},Ja.INJECTOR)]}):g.jsxs(Pm,{children:["Connector not found ",e.connector.id]})},VUe=()=>{var e,t,n;const r=Cn(),i=w5(r.connector.id),o=Ci({CONNECTORNAME:i==null?void 0:i.name});if(!i)return g.jsx(g.Fragment,{children:"Wallet not found"});const s={ios:(e=i.downloadUrls)===null||e===void 0?void 0:e.ios,android:(t=i.downloadUrls)===null||t===void 0?void 0:t.android,redirect:(n=i.downloadUrls)===null||n===void 0?void 0:n.download},a=s.ios&&s.android?o.downloadAppScreen_iosAndroid:s.ios?o.downloadAppScreen_ios:o.downloadAppScreen_android;return g.jsx(Go,{children:g.jsxs(yr,{style:{paddingBottom:4,gap:14},children:[s.redirect&&g.jsx(MB,{value:s.redirect}),!s.redirect&&g.jsx(g.Fragment,{children:"No download link available"}),g.jsx(Cr,{style:{fontSize:15,lineHeight:"20px",padding:"0 12px"},children:a})]})})},WUe=Ee(Se.div)` + padding: 18px 0 20px; + @media only screen and (max-width: ${Ft.mobileWidth}px) { + padding: 16px 0 20px; + } +`,GUe=Ee(Se.div)` + position: relative; + display: inline-block; +`,KUe=Ee(Se.div)` + z-index: 3; + position: absolute; + bottom: 0px; + right: -16px; +`,QUe=Ee(Se.div)` + position: relative; +`,YUe=Ee(Se.div)` + position: relative; +`,qUe=dn` + 0%{ background-position: 100% 0; } + 100%{ background-position: -100% 0; } +`,ZUe=Ee(Se.div)` + width: 25%; + margin: 0 auto; + position: relative; + overflow: hidden; + border-radius: 10px; + background: var(--ck-body-background-secondary); + inset: 0; + &:before { + z-index: 4; + content: ''; + position: absolute; + inset: 0; + background-image: linear-gradient( + 90deg, + var(--ck-body-background-transparent) 50%, + var(--ck-body-background), + var(--ck-body-background-transparent) + ); + opacity: 0.75; + background-size: 200% 100%; + animation: ${qUe} 1000ms linear infinite both; + } +`;function JUe(e){return e.split("").map(t=>t.charCodeAt(0)).reduce((t,n)=>t+n)%100/100}const XH=Ee(Se.div)` + will-change: transform; // Needed for Safari + pointer-events: none; + user-select: none; + position: relative; + overflow: hidden; + margin: 0; + border-radius: ${e=>`${e.$radius}px`}; + width: ${e=>`${e.$size}px`}; + height: ${e=>`${e.$size}px`}; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); + &:before { + content: ''; + z-index: 1; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02); + } + ${e=>{if(e.$seed){const t=Math.ceil(JUe(e.$seed)*8),n=`0${t===0?1:t}`;return yt` + background: var(--ck-ens-${n}-start); + background: linear-gradient( + 180deg, + var(--ck-ens-${n}-start) 0%, + var(--ck-ens-${n}-stop) 100% + ); + `}}} +`,XUe=Ee(Se.img)` + display: block; + position: relative; + width: 100%; + height: 100%; + opacity: ${e=>e.$loaded?1:0}; + will-change: opacity; // Needed for Safari + transition: opacity 500ms ease; + transform: scale(1.01); // fixes background color bleeding +`;function VE(){const[e,t]=j.useState(!1);return j.useEffect(()=>t(!0),[]),e}const eze=_ee({chains:[n$],transports:{[n$.id]:wee()}});function DB(){return tp(1)?void 0:eze}const pae=({address:e,name:t,size:n=96,radius:r=96})=>{var i,o,s;const a=VE(),c=Cn(),u=j.useRef(null),[l,d]=j.useState(!0),f=DB(),{data:h}=Nve({chainId:1,name:t,config:f}),{data:p}=zO({chainId:1,address:(i=e??h)!==null&&i!==void 0?i:void 0,config:f}),{data:m}=Ove({chainId:1,name:rMe(p??""),config:f}),x={address:h??e,name:p??t,avatar:m??void 0};return j.useEffect(()=>{u.current&&u.current.complete&&u.current.naturalHeight!==0||d(!1)},[m]),a?!((o=c.options)===null||o===void 0)&&o.customAvatar?g.jsx("div",{style:{width:n,height:n,borderRadius:r,overflow:"hidden"},children:(s=c.options)===null||s===void 0?void 0:s.customAvatar({address:e??(x==null?void 0:x.address),ensName:t??(x==null?void 0:x.name),ensImage:x==null?void 0:x.avatar,size:n,radius:r})}):!x.name||!x.avatar?g.jsx(s4,{style:{pointerEvents:"none"},children:g.jsx(XH,{$size:n,$seed:x.address,$radius:r})}):g.jsx(s4,{style:{pointerEvents:"none"},children:g.jsx(XH,{$size:n,$seed:x.address,$radius:r,children:g.jsx(XUe,{ref:u,src:x.avatar,alt:x.name,onLoad:()=>d(!0),$loaded:l})})}):g.jsx("div",{style:{width:n,height:n,borderRadius:r}})},Up=({testnet:e,...t})=>g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"black"},children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5611 8.12948C21.0082 7.90729 21.5007 7.79167 22 7.79167C22.4993 7.79167 22.9919 7.90729 23.439 8.12948L23.4408 8.1304L33.0387 12.9293C33.577 13.197 34.031 13.61 34.3478 14.121C34.6649 14.6323 34.833 15.2218 34.8333 15.8234V27.2595C34.833 27.8611 34.6649 28.4511 34.3478 28.9624C34.031 29.4733 33.578 29.8858 33.0398 30.1535L23.4411 34.9528C22.9919 35.1775 22.4963 35.2947 21.994 35.2947C21.4918 35.2947 20.9964 35.1777 20.5472 34.9529L10.9475 30.1531L10.9452 30.1519C10.4071 29.8808 9.95535 29.4646 9.6411 28.9504C9.32739 28.437 9.16312 27.8464 9.16673 27.2448L9.16675 27.2417L10.0004 27.2475H9.16673V27.2448V15.8239C9.16705 15.2223 9.33518 14.6322 9.65222 14.121C9.96906 13.61 10.4221 13.1976 10.9604 12.9298L20.5592 8.1304L20.5611 8.12948ZM21.3031 9.62267L11.8706 14.3389L22 19.4036L32.1294 14.3389L22.697 9.62267C22.4806 9.51531 22.2416 9.45905 22 9.45905C21.7585 9.45905 21.5194 9.51534 21.3031 9.62267ZM10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241ZM22.8337 33.3923L32.2967 28.6608C32.5576 28.5312 32.7772 28.3313 32.9308 28.0836C33.0844 27.836 33.1658 27.5504 33.166 27.259V15.8243C33.1659 15.7786 33.1639 15.7331 33.1599 15.6878L22.8337 20.8509V33.3923Z",fill:"url(#paint0_linear_3546_7073)"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241Z",fill:"url(#paint1_linear_3546_7073)",fillOpacity:"0.3"}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"paint0_linear_3546_7073",x1:"22",y1:"7.79167",x2:"22",y2:"35.2947",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.7"})]}),g.jsxs("linearGradient",{id:"paint1_linear_3546_7073",x1:"22",y1:"7.79167",x2:"22",y2:"35.2947",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"white"}),g.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0.7"})]})]})]}),tze=({testnet:e,...t})=>g.jsx(Up,{testnet:!0,...t}),nze=({testnet:e,...t})=>{let n="var(--ck-chain-ethereum-01, #25292E)",r="var(--ck-chain-ethereum-02, #ffffff)";return e&&(n="linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)",r="#fff"),g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:n},children:[g.jsx("path",{d:"M21.9967 6.99621L21.7955 7.67987V27.5163L21.9967 27.7171L31.2044 22.2744L21.9967 6.99621Z",fill:r}),g.jsx("path",{d:"M21.9957 6.99621L12.7878 22.2744L21.9957 27.7171V18.0891V6.99621Z",fill:r}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.9959 36.9996L21.9959 36.9997V36.9995L31.2091 24.0243L21.9959 29.4642L12.788 24.0243L21.9957 36.9993L21.9958 36.9997L21.9959 36.9996Z",fill:r}),g.jsx("path",{d:"M21.996 27.7181L31.2037 22.2753L21.996 18.09V27.7181Z",fill:r}),g.jsx("path",{d:"M12.7878 22.2753L21.9957 27.7181V18.09L12.7878 22.2753Z",fill:r})]})},rze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#6F41D8"},children:g.jsx("path",{d:"M29.0015 17.4529C28.4941 17.1572 27.8355 17.1572 27.2773 17.4529L23.3186 19.7271L20.6305 21.2094L16.6719 23.4822C16.1645 23.7792 15.5059 23.7792 14.9476 23.4822L11.8016 21.703C11.2943 21.4074 10.9395 20.8642 10.9395 20.2702V16.7612C10.9395 16.1686 11.2434 15.6255 11.8016 15.3285L14.8954 13.5988C15.4041 13.3018 16.0641 13.3018 16.6224 13.5988L19.7161 15.3285C20.2249 15.6255 20.5796 16.1686 20.5796 16.7612V19.0355L23.2678 17.5024V15.2295C23.2707 14.9343 23.1917 14.6441 23.0395 14.3911C22.8873 14.1381 22.6679 13.9324 22.4056 13.7968L16.6719 10.5353C16.1645 10.2382 15.5059 10.2382 14.9476 10.5353L9.11214 13.7968C8.84992 13.9324 8.63049 14.1381 8.47828 14.3911C8.32607 14.6441 8.24705 14.9343 8.25002 15.2295V21.802C8.25002 22.396 8.55389 22.9391 9.11214 23.2361L14.9476 26.4976C15.455 26.7932 16.115 26.7932 16.6719 26.4976L20.6305 24.2729L23.3186 22.7411L27.2773 20.5177C27.7846 20.2207 28.4433 20.2207 29.0015 20.5177L32.0966 22.2475C32.6054 22.5431 32.9588 23.0863 32.9588 23.6803V27.1893C32.9588 27.7819 32.6563 28.325 32.0966 28.622L29.0029 30.4013C28.4941 30.6983 27.8341 30.6983 27.2773 30.4013L24.1821 28.6715C23.6734 28.3745 23.3186 27.8314 23.3186 27.2387V24.9645L20.6305 26.4976V28.7705C20.6305 29.3631 20.9344 29.9076 21.4926 30.2032L27.3281 33.4647C27.8355 33.7617 28.4941 33.7617 29.0524 33.4647L34.8879 30.2032C35.3953 29.9076 35.75 29.3645 35.75 28.7705V22.198C35.753 21.9028 35.674 21.6126 35.5218 21.3596C35.3695 21.1066 35.1501 20.9009 34.8879 20.7653L29.0029 17.4529H29.0015Z",fill:"white"})}),ize=({testnet:e,...t})=>g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#FF0420"},children:[g.jsx("path",{d:"M15.5877 27.8473C14.2777 27.8473 13.2045 27.539 12.3679 26.9226C11.5422 26.2952 11.1294 25.4035 11.1294 24.2477C11.1294 24.0055 11.157 23.7082 11.212 23.356C11.3552 22.5634 11.5588 21.6112 11.823 20.4994C12.5715 17.4722 14.5034 15.9586 17.6187 15.9586C18.4664 15.9586 19.2259 16.1017 19.8974 16.3879C20.5689 16.663 21.0973 17.0814 21.4826 17.6428C21.8678 18.1932 22.0605 18.8537 22.0605 19.6242C22.0605 19.8554 22.033 20.1471 21.9779 20.4994C21.8128 21.4791 21.6146 22.4313 21.3835 23.356C20.9982 24.8641 20.3322 25.9924 19.3855 26.741C18.4388 27.4785 17.1729 27.8473 15.5877 27.8473ZM15.8189 25.4695C16.4354 25.4695 16.9582 25.2879 17.3876 24.9247C17.8279 24.5614 18.1416 24.0055 18.3287 23.257C18.5819 22.2222 18.7746 21.3195 18.9067 20.5489C18.9507 20.3178 18.9727 20.0811 18.9727 19.8389C18.9727 18.8372 18.4498 18.3363 17.4041 18.3363C16.7876 18.3363 16.2592 18.5179 15.8189 18.8812C15.3896 19.2445 15.0813 19.8004 14.8943 20.5489C14.6961 21.2865 14.4979 22.1892 14.2998 23.257C14.2557 23.477 14.2337 23.7082 14.2337 23.9504C14.2337 24.9632 14.7622 25.4695 15.8189 25.4695Z",fill:"white"}),g.jsx("path",{d:"M22.8188 27.6815C22.6977 27.6815 22.6041 27.6429 22.5381 27.5659C22.483 27.4778 22.4665 27.3788 22.4885 27.2687L24.7672 16.5358C24.7892 16.4147 24.8498 16.3156 24.9489 16.2385C25.0479 16.1615 25.1525 16.1229 25.2626 16.1229H29.6548C30.8767 16.1229 31.8564 16.3761 32.5939 16.8825C33.3426 17.3889 33.7168 18.1209 33.7168 19.0786C33.7168 19.3538 33.6838 19.64 33.6177 19.9372C33.3426 21.2032 32.7867 22.1389 31.95 22.7443C31.1244 23.3498 29.9905 23.6525 28.5485 23.6525H26.3194L25.5598 27.2687C25.5377 27.3898 25.4772 27.4888 25.3782 27.5659C25.2791 27.6429 25.1745 27.6815 25.0645 27.6815H22.8188ZM28.6641 21.3738C29.1264 21.3738 29.5282 21.2472 29.8695 20.994C30.2217 20.7408 30.4529 20.3776 30.563 19.9042C30.596 19.717 30.6125 19.552 30.6125 19.4089C30.6125 19.0896 30.519 18.8474 30.3318 18.6823C30.1446 18.5062 29.8255 18.4182 29.3741 18.4182H27.3926L26.7652 21.3738H28.6641Z",fill:"white"})]}),oze=({testnet:e,...t})=>{const n=e?"#ffffff":"#28A0F0",r=e?"#ffffff":"#96BEDC";return g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#2C364F"},children:[!e&&g.jsx("path",{d:"M25.7948 20.5826L28.2683 16.3854L34.9355 26.7696L34.9386 28.7625L34.9168 15.0491C34.9011 14.7137 34.7231 14.407 34.4391 14.2261L22.4357 7.32182C22.1551 7.1838 21.7989 7.18546 21.5187 7.32618C21.4807 7.34524 21.4453 7.36576 21.4113 7.38835L21.3694 7.41467L9.71816 14.1664L9.67298 14.1871C9.61474 14.2137 9.55609 14.2479 9.50076 14.2872C9.27983 14.4456 9.1331 14.68 9.08564 14.9425C9.07859 14.9823 9.0732 15.023 9.07092 15.064L9.08916 26.239L15.2994 16.6138C16.0811 15.3376 17.7847 14.9262 19.3662 14.9488L21.2221 14.9977L10.2862 32.5356L11.5753 33.2778L22.6422 15.0155L27.5338 14.9977L16.4956 33.7209L21.0955 36.3668L21.6451 36.6827C21.8776 36.7772 22.1516 36.7819 22.386 36.6972L34.5581 29.6433L32.2309 30.9918L25.7948 20.5826ZM26.7384 34.175L22.0925 26.8829L24.9287 22.0702L31.0303 31.6876L26.7384 34.175Z",fill:"#2D374B"}),g.jsx("path",{d:"M22.0924 26.8832L26.7385 34.1751L31.0302 31.6879L24.9286 22.0705L22.0924 26.8832Z",fill:n}),g.jsx("path",{d:"M34.9387 28.7627L34.9356 26.7698L28.2684 16.3856L25.7949 20.5828L32.2312 30.992L34.5584 29.6435C34.7866 29.4582 34.9248 29.1861 34.9393 28.8926L34.9387 28.7627Z",fill:n}),g.jsx("path",{d:"M7 30.642L10.2863 32.5356L21.2222 14.9976L19.3663 14.9487C17.785 14.9263 16.0814 15.3375 15.2995 16.6137L9.08927 26.239L7 29.449V30.642V30.642Z",fill:"white"}),g.jsx("path",{d:"M27.534 14.9977L22.6423 15.0155L11.5754 33.2778L15.4437 35.5049L16.4955 33.7209L27.534 14.9977Z",fill:"white"}),g.jsx("path",{d:"M37 14.9723C36.9592 13.9493 36.4052 13.013 35.5377 12.4677L23.377 5.47434C22.5187 5.04223 21.4466 5.04161 20.5868 5.47414C20.4852 5.52533 8.76078 12.3251 8.76078 12.3251C8.5985 12.4029 8.44224 12.4955 8.2953 12.6008C7.52081 13.156 7.0487 14.0186 7 14.9661V29.4492L9.08927 26.2392L9.07103 15.0639C9.07352 15.0231 9.0787 14.9827 9.08575 14.9431C9.133 14.6801 9.27994 14.4457 9.50086 14.2872C9.5562 14.2478 21.4806 7.34517 21.5186 7.32611C21.799 7.18538 22.155 7.18373 22.4356 7.32175L34.439 14.226C34.723 14.4069 34.901 14.7137 34.9167 15.049V28.8921C34.9022 29.1856 34.7862 29.4577 34.558 29.643L32.2308 30.9916L31.03 31.6875L26.7383 34.1747L22.3859 36.6969C22.1515 36.7817 21.8773 36.7769 21.645 36.6824L16.4955 33.7206L15.4435 35.5046L20.0713 38.169C20.2243 38.256 20.3607 38.3331 20.4726 38.3961C20.6458 38.4933 20.764 38.5582 20.8056 38.5785C21.1345 38.7383 21.6077 38.8311 22.0342 38.8311C22.4251 38.8311 22.8064 38.7594 23.1672 38.6181L35.8092 31.2971C36.5347 30.7348 36.9617 29.8869 37 28.9686V14.9723Z",fill:r})]})},sze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#571AFF"},children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.1834 8.14754C25.6606 8.23504 25.3644 8.50235 24.9216 9.28591C24.5651 9.91722 24.4762 10.0244 24.2024 10.1592L23.9832 10.2668L19.2967 10.286L14.6097 10.3057L14.3875 10.3902C13.7059 10.6492 13.6192 10.7135 11.6291 12.4407C9.72243 14.0953 9.64893 14.1723 9.59249 14.5836C9.54437 14.9362 9.78981 15.6327 10.5191 17.2143C11.2847 18.8737 11.2839 18.8641 10.7444 19.5256C10.2645 20.1136 10.2269 20.2588 10.2041 21.5915C10.1717 23.502 10.2487 27.6023 10.3222 27.8591C10.3572 27.9816 10.7908 29.204 11.2861 30.5755C11.7813 31.9471 12.4192 33.715 12.704 34.5038C13.4281 36.5107 13.4814 36.5986 14.0392 36.7237C14.3066 36.7837 14.3206 36.781 18.9677 35.7258C24.4395 34.4837 23.7264 34.709 25.0739 33.7968C29.8732 30.5475 29.7337 30.66 29.8969 29.9083C30.0583 29.1642 30.1082 29.1379 31.8267 28.8999C34.6122 28.5145 34.6328 28.5083 34.8831 28.0109C35.0182 27.7423 35.7786 23.3406 35.8136 22.6209C35.8504 21.8828 36.042 22.221 33.3816 18.3395C30.022 13.4382 30.2381 13.7777 30.2399 13.4041C30.2407 13.1735 30.3366 12.9736 31.3236 11.1418C31.8236 10.2134 32.2742 9.35241 32.3254 9.22904C32.5236 8.74691 32.4204 8.3921 32.0301 8.21622L31.8267 8.12391L29.1102 8.11822C27.6048 8.11516 26.2997 8.12829 26.1834 8.14754ZM30.0474 9.4876C30.5623 9.72297 30.5382 9.82447 29.5119 11.7398C28.4317 13.7558 28.3157 13.2711 30.7154 16.7707C31.639 18.1173 32.8076 19.8218 33.3124 20.5581C34.6844 22.5592 34.6048 22.1799 34.1831 24.6903C33.7858 27.0602 33.7792 27.0817 33.3759 27.282C33.1506 27.394 33.2276 27.3813 30.8493 27.7117C28.9147 27.9803 28.8543 28.017 28.6719 29.0338C28.5778 29.557 28.4606 29.8169 28.2243 30.0247C28.0808 30.1512 24.8682 32.368 23.9451 32.9778C23.2587 33.4311 23.6861 33.3152 17.7471 34.6574C17.1997 34.7812 16.4079 34.9632 15.987 35.0617C14.4588 35.4195 14.4299 35.4033 13.8804 33.8948C12.9188 31.2528 11.6811 27.7957 11.6194 27.5787C11.5534 27.3463 11.549 27.1202 11.549 24.059V20.7878L11.6501 20.5966C11.7056 20.4912 11.8671 20.2759 12.0088 20.118C12.8418 19.19 12.8383 19.1183 11.8601 16.9907C10.7663 14.612 10.6797 14.9992 12.697 13.2501C14.2418 11.91 14.3048 11.8593 14.5905 11.7237L14.8394 11.6055L19.6983 11.5854C23.5417 11.5692 24.5891 11.5543 24.7103 11.515C25.1465 11.3728 25.4086 11.1094 25.7975 10.4203C26.3851 9.38041 26.3111 9.40797 28.4597 9.41891C29.6996 9.42547 29.9332 9.43554 30.0474 9.4876Z",fill:"#F7F5FC"})}),aze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#6CD544"},children:g.jsx("path",{d:"M22.0006 7.292C22.6198 7.29004 23.2271 7.46144 23.754 7.7868C24.2808 8.11216 24.706 8.57848 24.9816 9.133L34.3566 27.883C34.611 28.3912 34.7312 28.956 34.7058 29.5238C34.6805 30.0915 34.5103 30.6433 34.2116 31.1268C33.9129 31.6103 33.4956 32.0094 32.9992 32.2861C32.5028 32.5629 31.9439 32.7081 31.3756 32.708H12.6256C12.0573 32.7079 11.4985 32.5626 11.0023 32.2858C10.506 32.009 10.0888 31.6099 9.79022 31.1264C9.49163 30.6429 9.3216 30.0912 9.29628 29.5235C9.27096 28.9558 9.39119 28.3911 9.64556 27.883L19.0196 9.133C19.2951 8.57848 19.7203 8.11216 20.2472 7.7868C20.774 7.46144 21.3814 7.29004 22.0006 7.292ZM22.0006 5C20.9561 4.9999 19.9322 5.29059 19.0437 5.83952C18.1551 6.38846 17.4369 7.17394 16.9696 8.108L7.59456 26.858C7.16544 27.7156 6.96271 28.6687 7.00564 29.6268C7.04856 30.5848 7.33572 31.516 7.83982 32.3318C8.34392 33.1476 9.04823 33.821 9.88584 34.288C10.7235 34.755 11.6666 35.0001 12.6256 35H31.3756C32.3345 34.9999 33.2775 34.7547 34.1149 34.2876C34.9524 33.8206 35.6566 33.1472 36.1606 32.3314C36.6645 31.5156 36.9516 30.5845 36.9945 29.6265C37.0374 28.6686 36.8346 27.7156 36.4056 26.858L27.0316 8.108C26.5642 7.17394 25.846 6.38846 24.9574 5.83952C24.0689 5.29059 23.045 4.9999 22.0006 5Z",fill:"white"})}),cze=({testnet:e,...t})=>g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#E84142"},children:[g.jsx("path",{d:"M11.0188 32.1528H15.4825C16.5334 32.1528 17.0589 32.1528 17.5278 32.023C18.042 31.8701 18.511 31.5991 18.9009 31.2261C19.2589 30.885 19.5173 30.4328 20.0269 29.5409L20.0272 29.5404L20.0422 29.5142L25.8314 19.2804C26.3456 18.3821 26.5999 17.93 26.7129 17.4554C26.8372 16.9412 26.8372 16.3988 26.7129 15.8847C26.6007 15.4136 26.3439 14.9648 25.8373 14.0798L25.8258 14.0597L23.56 10.1045C23.0911 9.27958 22.8538 8.86711 22.5543 8.71456C22.2323 8.55071 21.848 8.55071 21.526 8.71456C21.2265 8.86711 20.9892 9.27958 20.5202 10.1045L9.49892 29.5311C9.03561 30.3447 8.80392 30.7517 8.82089 31.0849C8.84349 31.4466 9.02994 31.7743 9.33507 31.9721C9.61756 32.1528 10.0809 32.1528 11.0188 32.1528Z",fill:"white"}),g.jsx("path",{d:"M33.1506 32.1528H26.7547C25.8111 32.1528 25.3365 32.1528 25.0596 31.9721C24.7545 31.7743 24.5681 31.4411 24.5455 31.0794C24.5286 30.7486 24.7621 30.3456 25.2294 29.539L25.2295 29.5388L25.2404 29.5199L28.4328 24.0392C28.9018 23.2313 29.1391 22.8301 29.4329 22.6776C29.7548 22.5137 30.1336 22.5137 30.4555 22.6776C30.7472 22.8261 30.9744 23.2102 31.4241 23.9708L31.4248 23.9719L31.4613 24.0336L34.665 29.5143C34.6806 29.5413 34.696 29.5678 34.7113 29.5939L34.7113 29.594C35.1554 30.3603 35.382 30.7514 35.3657 31.0739C35.3486 31.4353 35.1566 31.7688 34.8515 31.9666C34.5689 32.1528 34.0942 32.1528 33.1506 32.1528Z",fill:"white"})]}),uze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#FCFE72"},children:g.jsx("path",{d:"M9 9H34.5183V18.112H30.3564C28.896 14.7687 25.6102 12.4171 21.777 12.4171C16.593 12.4171 12.3948 16.6422 12.3948 21.823C12.3948 27.0039 16.593 31.2654 21.777 31.2654C25.5373 31.2654 28.8231 28.9876 30.2829 25.7172H34.5178V34.682H9V9Z",fill:e?"#ffffff":"black"})}),lze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#009CB4"},children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3439 11.8664C17.9374 6.53462 26.7953 6.74397 32.1271 12.3374C32.4738 12.7038 32.8075 13.0832 33.1084 13.4823L22 24.5972L10.8916 13.4823C11.1991 13.0832 11.5262 12.7038 11.8729 12.3374C12.0234 12.1804 12.1804 12.0234 12.3439 11.8664ZM30.6094 13.3972C28.3196 11.0944 25.271 9.83182 22 9.83182C18.729 9.83182 15.6804 11.0944 13.3907 13.3972L22 22.0066L30.6094 13.3972ZM33.9785 14.7446L31.7215 17.0016C33.5402 19.1801 33.2523 22.425 31.0738 24.2437C29.1636 25.84 26.3897 25.84 24.4794 24.2437L22 26.7231L19.5271 24.2502C17.3486 26.0689 14.1037 25.7811 12.285 23.6026C10.6888 21.6923 10.6888 18.9185 12.285 17.0082L11.1271 15.8502L10.028 14.7446C8.7 16.9297 8 19.4418 8 21.9998C8 29.7325 14.2673 35.9998 22 35.9998C29.7327 35.9998 36 29.7325 36 21.9998C36.0065 19.4418 35.3 16.9297 33.9785 14.7446ZM30.6486 18.0747C31.1392 18.7093 31.4075 19.4943 31.4075 20.299C31.4075 21.1037 31.1392 21.8887 30.6486 22.5233C29.4187 24.113 27.1355 24.4074 25.5458 23.1775L30.6486 18.0747ZM18.4542 23.1839C17.8196 23.6745 17.0346 23.9427 16.2299 23.9427C15.4252 23.9427 14.6467 23.6745 14.0056 23.1904C12.4159 21.9605 12.1215 19.6708 13.3514 18.0811L18.4542 23.1839Z",fill:"white"})}),dze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#2D2A25"},children:g.jsx("path",{d:"M18.4916 12.6668C12.9416 14.806 12.4332 20.2846 10.8418 22.8432C9.23155 25.4322 5.54251 26.8607 6.04698 28.1801C6.55143 29.4994 10.2449 28.0824 13.1669 28.9242C16.0543 29.7561 20.0831 33.4862 25.633 31.3469C28.4603 30.2573 30.5076 28.0143 31.449 25.3574C31.5502 25.0723 31.361 24.7673 31.0606 24.7391C30.874 24.7215 30.6948 24.8196 30.6106 24.9877C29.759 26.6908 28.2981 28.0934 26.3864 28.8301C23.2303 30.0465 19.777 29.0915 17.6562 26.6961C17.1746 26.1522 16.7626 25.533 16.4374 24.8487C16.348 24.6603 16.2629 24.4689 16.1875 24.2708C16.1117 24.0728 16.0473 23.8735 15.9881 23.6732C17.6562 22.8925 19.5812 22.0656 21.7635 21.2246C23.903 20.3999 25.8505 19.731 27.5841 19.1958C28.7571 18.8341 29.8322 18.5331 30.8029 18.2871C30.8732 18.2695 30.9423 18.2519 31.0112 18.2347C31.158 18.1982 31.3088 18.2769 31.363 18.4186L31.364 18.4213C31.396 18.5053 31.4236 18.5898 31.4535 18.6743C31.6453 19.2196 31.7892 19.7706 31.8841 20.3229C31.9258 20.5645 32.1888 20.6961 32.4044 20.5799C33.2014 20.1504 33.9302 19.7314 34.5814 19.3283C37.0083 17.8276 38.3538 16.5549 38.0776 15.8336C37.802 15.1119 35.9541 15.0705 33.1503 15.5854C32.2593 15.7491 31.2716 15.9691 30.207 16.2416C30.0229 16.2886 29.8365 16.3375 29.6481 16.3877C28.7522 16.6262 27.8073 16.8995 26.8234 17.2053C24.9936 17.7744 23.0305 18.4561 21.0038 19.2372C19.1078 19.9682 17.3109 20.726 15.6629 21.4812C15.6428 18.2761 17.5725 15.2461 20.7286 14.0297C22.6399 13.293 24.6605 13.3533 26.4285 14.0473C26.6029 14.116 26.8015 14.0684 26.9291 13.9298C27.1331 13.7076 27.0706 13.3537 26.8053 13.2094C24.3353 11.8685 21.319 11.5771 18.4916 12.6668Z",fill:"#FAF1E4"})}),fze=({testnet:e,...t})=>g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#16181A"},children:[g.jsx("path",{d:"M16.0445 19.6063L21.8705 13.7805L27.6996 19.6093L31.0896 16.2193L21.8705 7L12.6545 16.2163L16.0445 19.6063Z",fill:e?"#fff":"#F3BA2F"}),g.jsx("path",{d:"M13.6505 21.9995L10.2606 18.6096L6.87046 21.9997L10.2604 25.3896L13.6505 21.9995Z",fill:e?"#fff":"#F3BA2F"}),g.jsx("path",{d:"M16.0445 24.3937L21.8705 30.2195L27.6994 24.3909L31.0913 27.779L31.0896 27.7809L21.8705 37L12.6542 27.7839L12.6495 27.7792L16.0445 24.3937Z",fill:e?"#fff":"#F3BA2F"}),g.jsx("path",{d:"M33.4808 25.3911L36.8709 22.001L33.481 18.6111L30.0909 22.0012L33.4808 25.3911Z",fill:e?"#fff":"#F3BA2F"}),g.jsx("path",{d:"M25.3091 21.9982H25.3105L21.8705 18.5582L19.3283 21.1004H19.3281L19.0362 21.3926L18.4336 21.9951L18.4289 21.9999L18.4336 22.0048L21.8705 25.4418L25.3105 22.0018L25.3122 21.9999L25.3091 21.9982Z",fill:e?"#fff":"#F3BA2F"})]}),hze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"white"},children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35 8V36H9L13.875 35.9998V31.0586H9V12.9412H13.875V8H35ZM17.9373 12.9414H30.1247V17.8826H17.9373V12.9414ZM30.1247 26.9414H17.9373V17.8826L13.0623 17.8828V26.9416L17.9373 26.9414V31.8826H30.1247V26.9414Z",fill:"#06FC99"})}),pze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#0911EF"},children:g.jsx("path",{d:"M20.92 9.25864C21.5933 8.91379 22.6178 8.91379 23.2911 9.25864L30.1616 12.7775C30.5671 12.9852 30.7898 13.2947 30.8297 13.6142H30.8363V31.302C30.8274 31.6504 30.6025 31.9966 30.1616 32.2225L23.2911 35.7413C22.6178 36.0862 21.5933 36.0862 20.92 35.7413L14.0495 32.2225C13.6104 31.9976 13.3997 31.6489 13.3893 31.302C13.3883 31.2678 13.3881 31.2393 13.3891 31.2157L13.3891 13.7278C13.3884 13.7086 13.3883 13.6895 13.3889 13.6705L13.3893 13.6142L13.3924 13.6142C13.4229 13.2912 13.6355 12.9896 14.0495 12.7775L20.92 9.25864ZM29.7547 23.4821L23.2911 26.7926C22.6178 27.1374 21.5933 27.1374 20.92 26.7926L14.4706 23.4895V31.2669L20.92 34.5527C21.2842 34.7415 21.6622 34.9254 22.0318 34.9488L22.1056 34.9512C22.4907 34.9524 22.8646 34.7628 23.2438 34.5833L29.7547 31.2387V23.4821ZM11.3214 31.8437C11.3214 32.5212 11.4026 32.9667 11.5639 33.2806C11.6976 33.5407 11.8981 33.7394 12.2643 33.9813L12.2852 33.9951C12.3656 34.0476 12.4541 34.1026 12.5619 34.1672L12.689 34.2427L13.0792 34.4711L12.5195 35.3685L12.0827 35.1126L12.0093 35.0689C11.883 34.9932 11.7783 34.9284 11.6807 34.8645C10.637 34.1822 10.2478 33.4384 10.2401 31.8907L10.24 31.8437H11.3214ZM21.5647 18.7412C21.5147 18.7579 21.4678 18.7772 21.4251 18.7991L14.5546 22.318C14.5474 22.3216 14.5405 22.3253 14.534 22.3289L14.5281 22.3322L14.5389 22.3382L14.5546 22.3464L21.4251 25.8653C21.4678 25.8872 21.5147 25.9065 21.5647 25.9231V18.7412ZM22.6465 18.7412V25.9231C22.6965 25.9065 22.7433 25.8872 22.7861 25.8653L29.6566 22.3464C29.6638 22.3427 29.6707 22.3391 29.6772 22.3355L29.683 22.3322L29.6722 22.3262L29.6566 22.318L22.7861 18.7991C22.7433 18.7772 22.6965 18.7579 22.6465 18.7412ZM29.7547 14.8689L23.5915 18.0256L29.7547 21.1822V14.8689ZM14.4706 14.8763V21.1749L20.6195 18.0256L14.4706 14.8763ZM22.7861 10.1859C22.4288 10.0029 21.7824 10.0029 21.4251 10.1859L14.5546 13.7048C14.5474 13.7085 14.5405 13.7122 14.534 13.7158L14.5281 13.719L14.5389 13.725L14.5546 13.7333L21.4251 17.2522C21.7824 17.4352 22.4288 17.4352 22.7861 17.2522L29.6566 13.7333C29.6638 13.7296 29.6707 13.7259 29.6772 13.7223L29.683 13.719L29.6722 13.7131L29.6566 13.7048L22.7861 10.1859ZM31.7205 9.64552L32.1573 9.90132L32.2307 9.94503C32.357 10.0206 32.4616 10.0856 32.5593 10.1494C33.603 10.8317 33.9922 11.5756 33.9998 13.1231L34 13.1703H32.9186C32.9186 12.4926 32.8373 12.0472 32.6761 11.7334C32.5424 11.4733 32.3419 11.2745 31.9757 11.0327L31.9547 11.0189C31.8744 10.9664 31.7858 10.9113 31.6781 10.8466L31.551 10.7712L31.1608 10.5428L31.7205 9.64552Z",fill:"white"})}),gze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#0090FF"},children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.75 19.3069L23.15 22.5069L28.85 23.3069L28.45 24.8069L22.85 24.0069C22.45 25.3069 22.25 26.7069 21.75 27.9069C21.25 29.3069 20.75 30.7069 20.15 32.0069C19.35 33.7069 17.95 34.9069 16.05 35.2069C14.95 35.4069 13.75 35.3069 12.85 34.6069C12.55 34.4069 12.25 34.0069 12.25 33.7069C12.25 33.3069 12.45 32.8069 12.75 32.6069C12.95 32.5069 13.45 32.6069 13.75 32.7069C14.05 33.0069 14.35 33.4069 14.55 33.8069C15.15 34.6069 15.95 34.7069 16.75 34.1069C17.65 33.3069 18.15 32.2069 18.45 31.1069C19.05 28.7069 19.65 26.4069 20.15 24.0069V23.6069L14.85 22.8069L15.05 21.3069L20.55 22.1069L21.25 19.0069L15.55 18.1069L15.75 16.5069L21.65 17.3069C21.85 16.7069 21.95 16.2069 22.15 15.7069C22.65 13.9069 23.15 12.1069 24.35 10.5069C25.55 8.90687 26.95 7.90687 29.05 8.00687C29.95 8.00687 30.85 8.30687 31.45 9.00687C31.55 9.10687 31.75 9.30687 31.75 9.50687C31.75 9.90687 31.75 10.4069 31.45 10.7069C31.05 11.0069 30.55 10.9069 30.15 10.5069C29.85 10.2069 29.65 9.90687 29.35 9.60687C28.75 8.80687 27.85 8.70687 27.15 9.40687C26.65 9.90687 26.15 10.6069 25.85 11.3069C25.15 13.4069 24.65 15.6069 23.95 17.8069L29.45 18.6069L29.05 20.1069L23.75 19.3069Z",fill:"white"})}),mze=({testnet:e,...t})=>g.jsxs("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#00D4D5"},children:[g.jsx("path",{d:"M23.7136 6.875V14.3784L30.2284 10.6315L23.7136 6.875Z",fill:"white"}),g.jsx("path",{opacity:"0.9",d:"M30.2284 10.6316V18.135L36.7418 14.3785L30.2284 10.6316Z",fill:"white"}),g.jsx("path",{opacity:"0.8",d:"M23.7136 14.3784V21.8818L30.2284 18.1349L23.7136 14.3784ZM30.2284 18.1349V25.6383L36.7417 21.8818L30.2284 18.1349Z",fill:"white"}),g.jsx("path",{opacity:"0.8",d:"M23.7136 21.8817V29.385L30.2284 25.6382L23.7136 21.8817Z",fill:"white"}),g.jsx("path",{d:"M30.2284 25.6382V33.1416L36.7418 29.3851L30.2284 25.6382Z",fill:"white"}),g.jsx("path",{opacity:"0.4",d:"M6.87537 14.1253V21.6287L13.3901 17.8722L6.87537 14.1253Z",fill:"white"}),g.jsx("path",{opacity:"0.2",d:"M15.0938 16.9153V24.4186L21.5975 20.6718L15.0938 16.9153Z",fill:"white"}),g.jsx("path",{opacity:"0.3",d:"M10.2648 21.6604V29.1638L16.7781 25.4073L10.2648 21.6604Z",fill:"white"}),g.jsx("path",{opacity:"0.9",d:"M14.5575 27.3226V34.826L21.0612 31.0695L14.5575 27.3226Z",fill:"white"}),g.jsx("path",{opacity:"0.7",d:"M23.66 30.5525V38.0572L30.1637 34.2993L23.66 30.5525Z",fill:"white"}),g.jsx("path",{opacity:"0.9",d:"M16.1786 13.2097V20.7145L22.6824 16.9676L16.1786 13.2097Z",fill:"white"}),g.jsx("path",{opacity:"0.8",d:"M23.7136 6.875V14.3784L17.1989 10.6315L23.7136 6.875Z",fill:"white"}),g.jsx("path",{opacity:"0.6",d:"M16.1786 10.0649V17.5669L9.66248 13.8104L16.1786 10.0649Z",fill:"white"}),g.jsx("path",{opacity:"0.6",d:"M22.6934 13.7775V21.2823L16.1786 17.5244L22.6934 13.7775Z",fill:"white"}),g.jsx("path",{opacity:"0.95",d:"M15.0635 16.9153V24.4186L8.54877 20.6718L15.0635 16.9153Z",fill:"white"}),g.jsx("path",{opacity:"0.6",d:"M23.7136 21.8817V29.385L17.2099 25.6382L23.7136 21.8817Z",fill:"white"}),g.jsx("path",{opacity:"0.55",d:"M10.2648 23.6295V31.1328L3.75 27.375L10.2648 23.6295Z",fill:"white"}),g.jsx("path",{d:"M36.7418 14.3784V21.8818L30.2284 18.1349L36.7418 14.3784Z",fill:"white"}),g.jsx("path",{opacity:"0.95",d:"M30.2284 18.1362V25.6382L23.7136 21.8817L30.2284 18.1362Z",fill:"white"}),g.jsx("path",{opacity:"0.9",d:"M36.7418 21.8817V29.385L30.2284 25.6382L36.7418 21.8817Z",fill:"white"}),g.jsx("path",{opacity:"0.7",d:"M30.2284 25.6382V33.1416L23.7136 29.3851L30.2284 25.6382Z",fill:"white"}),g.jsx("path",{opacity:"0.4",d:"M22.2712 28.7651V36.2684L15.7579 32.5216L22.2712 28.7651Z",fill:"white"}),g.jsx("path",{d:"M30.2284 10.6316V18.135L23.7136 14.3785L30.2284 10.6316Z",fill:"white"})]}),yze=({testnet:e,...t})=>g.jsx("svg",{...t,"aria-hidden":"true",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:e?"linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)":"#2F3140"},children:g.jsx("path",{d:"M37.5175 22.0531C37.4579 19.2923 36.6563 16.5985 35.1968 14.2542C33.7374 11.91 31.674 10.0017 29.223 8.72965C26.772 7.45759 24.0238 6.86863 21.2668 7.02455C18.5098 7.18047 15.8456 8.07553 13.5537 9.61582C11.2617 11.1561 9.42659 13.2849 8.24079 15.7787C7.05498 18.2725 6.56222 21.0396 6.81419 23.7895C7.06617 26.5394 8.05359 29.1708 9.67288 31.4076C11.2922 33.6444 13.4836 35.4042 16.0173 36.5023C16.7657 35.3775 17.3385 34.1453 17.716 32.848C18.0245 32.0632 18.3595 31.2913 18.7067 30.5446C19.5444 30.7955 20.4345 30.8143 21.282 30.5989C22.1295 30.3835 22.9026 29.942 23.5188 29.3215L23.5704 29.2699C22.8136 28.9884 21.9979 28.9032 21.1993 29.022C20.4006 29.1408 19.6451 29.4598 19.0029 29.9494C19.4276 29.0613 19.891 28.1997 20.3667 27.3632C21.189 27.6541 22.075 27.7156 22.9296 27.541C23.7842 27.3665 24.5751 26.9626 25.2175 26.3726L25.2692 26.3209C24.538 26.0116 23.7416 25.8885 22.9513 25.9626C22.1609 26.0368 21.4013 26.3058 20.7404 26.7456C21.216 25.9608 21.7053 25.1889 22.2203 24.468C23.0713 24.6915 23.9672 24.6777 24.811 24.4282C25.6547 24.1787 26.414 23.703 27.0066 23.0526L27.0453 23.001C26.3425 22.7718 25.5958 22.7106 24.8651 22.8224C24.1344 22.9341 23.4401 23.2157 22.838 23.6444C22.8767 23.5928 22.9283 23.5289 22.9664 23.4773C23.2749 23.0784 23.5969 22.6796 23.9177 22.2936C24.8969 21.9731 25.7703 21.3916 26.4436 20.6117C27.117 19.8318 27.5649 18.883 27.7391 17.8674L27.752 17.79H27.7391C26.7194 18.0552 25.7944 18.6007 25.0689 19.3648C24.3434 20.1288 23.8464 21.0808 23.6343 22.1129C23.3258 22.4859 23.0167 22.8603 22.7211 23.2449C22.9706 22.5925 23.0724 21.893 23.0191 21.1966C22.9657 20.5002 22.7586 19.8243 22.4126 19.2176L22.3739 19.2692C21.8489 19.9862 21.5326 20.8345 21.4599 21.7201C21.3873 22.6058 21.5611 23.4942 21.9621 24.2872C21.4729 24.9823 20.9972 25.6897 20.5467 26.4357C20.6918 25.6858 20.6542 24.9118 20.4369 24.1795C20.2196 23.4471 19.8291 22.7779 19.2985 22.2284L19.2727 22.2929C18.9445 23.1107 18.8477 24.0031 18.9929 24.8723C19.1382 25.7415 19.5199 26.5539 20.0962 27.2205C19.6457 28.0054 19.2211 28.816 18.8093 29.6524C18.9344 28.8712 18.8712 28.0715 18.6251 27.3196C18.3789 26.5677 17.9568 25.8855 17.3939 25.3295L17.3681 25.3941C17.0745 26.2514 17.0201 27.1724 17.2105 28.0583C17.401 28.9442 17.8292 29.7614 18.4492 30.4223C18.1774 31.0012 17.9219 31.5774 17.6773 32.1849C17.61 32.1231 17.5313 32.0751 17.4456 32.0435C17.0066 31.916 16.5867 31.7299 16.1974 31.4904C15.8754 31.2994 15.5337 31.144 15.1781 31.027C13.7886 30.5765 13.9945 29.9079 13.2756 28.5564C13.0416 28.2781 12.7931 28.0125 12.5309 27.7607C12.2876 27.603 12.0884 27.386 11.9519 27.1302C11.7934 26.8107 11.6931 26.4656 11.6557 26.1109C11.6514 25.9148 11.5858 25.7249 11.4681 25.5679C11.3504 25.4109 11.1864 25.2948 10.9993 25.2358C8.95338 24.5284 9.86728 21.8778 9.94406 21.5299C9.91262 21.08 9.81271 20.6375 9.64781 20.2178C9.63057 20.1632 9.61763 20.1073 9.60908 20.0506C9.55449 19.776 9.56444 19.4924 9.63813 19.2223C9.71183 18.9521 9.84726 18.7028 10.0338 18.4939C10.2784 18.2493 11.1277 17.8505 11.3078 17.6188C11.4879 17.387 11.6163 17.1295 11.797 16.9114C12.3687 16.3412 13.0291 15.8675 13.7526 15.509C14.3444 15.1876 14.4477 14.364 14.6787 14.1065C15.0647 13.6689 15.6565 13.6689 16.0941 13.283C16.3129 13.09 16.6377 12.9867 16.8415 12.7815C17.8692 11.8403 19.1644 11.2423 20.5474 11.0706C21.5064 10.9924 22.4717 11.0795 23.4012 11.3281C23.5358 11.3507 23.669 11.3809 23.8001 11.4185C25.9228 11.4959 28.4709 11.9328 29.397 12.8338C29.8555 13.2744 30.1961 13.8229 30.3877 14.4293C30.5382 14.8988 30.7456 15.3481 31.0054 15.7672L31.5714 16.6933C31.932 17.2773 32.0475 17.9801 31.8928 18.6489C31.7885 18.974 31.7795 19.3223 31.8669 19.6525C32.1655 20.1031 32.5152 20.5177 32.9093 20.8878C33.0658 21.0427 33.2382 21.1807 33.4236 21.2995C33.8592 21.5594 34.2802 21.8429 34.6848 22.1489C34.698 22.2729 34.6775 22.3982 34.6254 22.5115C34.5732 22.6247 34.4914 22.7218 34.3885 22.7924C34.0284 23.1137 33.3333 23.6159 33.3333 23.6159C33.3584 23.758 33.4016 23.8964 33.4617 24.0276C33.5643 24.2077 33.796 24.4911 33.7192 24.735C33.6424 24.9789 33.1403 25.1855 33.2816 25.4552C33.423 25.7386 33.7831 25.8154 33.6805 26.0729C33.5779 26.3175 33.0757 26.7524 33.1274 26.9352C33.179 27.1179 33.5908 28.8377 32.6382 29.1353C31.4592 29.3685 30.2627 29.5019 29.0614 29.5342C28.8675 29.5454 28.6797 29.6055 28.5155 29.709C28.3513 29.8125 28.216 29.956 28.1223 30.126C27.9399 30.4661 27.8222 30.837 27.7751 31.22C27.4275 32.5896 26.9671 33.928 26.3985 35.2215C26.3985 35.2215 26.3597 35.2989 26.3081 35.4144C26.1833 35.6687 26.1048 35.9432 26.0764 36.2251C26.1573 36.4321 26.2799 36.6204 26.4365 36.7782C26.519 36.8726 26.6271 36.9411 26.7477 36.9753C26.8683 37.0096 26.9962 37.0081 27.116 36.9711C30.1997 35.8965 32.8655 33.8757 34.7332 31.197C36.601 28.5182 37.5754 25.3182 37.5175 22.0531Z",fill:e?"#ffffff":"#00DACC"})});var pt={UnknownChain:tze,Ethereum:nze,Polygon:rze,Optimism:ize,Arbitrum:oze,Aurora:aze,Avalanche:cze,Celo:uze,Telos:sze,Gnosis:lze,Evmos:dze,BinanceSmartChain:fze,Foundry:Up,Sepolia:Up,Taraxa:Up,zkSync:Up,Flare:Up,Canto:hze,Fantom:pze,Filecoin:gze,Metis:yze,IoTeX:mze};const gae=[{id:1,name:"Ethereum",logo:g.jsx(pt.Ethereum,{}),rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]}}},{id:3,name:"Rinkeby",logo:g.jsx(pt.Ethereum,{testnet:!0}),rpcUrls:{}},{id:4,name:"Ropsten",logo:g.jsx(pt.Ethereum,{testnet:!0})},{id:5,name:"Görli",logo:g.jsx(pt.Ethereum,{testnet:!0})},{id:42,name:"Kovan",logo:g.jsx(pt.Ethereum,{testnet:!0})},{id:10,name:"Optimism",logo:g.jsx(pt.Optimism,{})},{id:69,name:"Optimism Kovan",logo:g.jsx(pt.Optimism,{testnet:!0})},{id:420,name:"Optimism Goerli",logo:g.jsx(pt.Optimism,{testnet:!0})},{id:137,name:"Polygon",logo:g.jsx(pt.Polygon,{})},{id:80001,name:"Polygon Mumbai",logo:g.jsx(pt.Polygon,{testnet:!0})},{id:31337,name:"Hardhat",logo:g.jsx(pt.Ethereum,{testnet:!0})},{id:1337,name:"Localhost",logo:g.jsx(pt.Ethereum,{testnet:!0})},{id:42161,name:"Arbitrum",logo:g.jsx(pt.Arbitrum,{}),rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]}}},{id:421611,name:"Arbitrum Rinkeby",logo:g.jsx(pt.Arbitrum,{testnet:!0})},{id:421613,name:"Arbitrum Goerli",logo:g.jsx(pt.Arbitrum,{testnet:!0}),rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]}}},{id:40,name:"Telos",logo:g.jsx(pt.Telos,{})},{id:41,name:"Telos Testnet",logo:g.jsx(pt.Telos,{testnet:!0})},{id:1313161554,name:"Aurora",logo:g.jsx(pt.Aurora,{})},{id:1313161555,name:"Aurora Testnet",logo:g.jsx(pt.Aurora,{testnet:!0})},{id:43114,name:"Avalanche",logo:g.jsx(pt.Avalanche,{})},{id:43113,name:"Avalanche Fuji",logo:g.jsx(pt.Avalanche,{testnet:!0})},{id:31337,name:"Foundry",logo:g.jsx(pt.Foundry,{testnet:!0})},{id:100,name:"Gnosis",logo:g.jsx(pt.Gnosis,{})},{id:9001,name:"Evmos",logo:g.jsx(pt.Evmos,{})},{id:9e3,name:"Evmos Testnet",logo:g.jsx(pt.Evmos,{testnet:!0})},{id:56,name:"BNB Smart Chain",logo:g.jsx(pt.BinanceSmartChain,{})},{id:97,name:"Binance Smart Chain Testnet",logo:g.jsx(pt.BinanceSmartChain,{testnet:!0})},{id:11155111,name:"Sepolia",logo:g.jsx(pt.Sepolia,{})},{id:841,name:"Taraxa",logo:g.jsx(pt.Taraxa,{})},{id:842,name:"Taraxa Testnet",logo:g.jsx(pt.Taraxa,{testnet:!0})},{id:324,name:"zkSync",logo:g.jsx(pt.zkSync,{})},{id:280,name:"zkSync Testnet",logo:g.jsx(pt.zkSync,{testnet:!0})},{id:42220,name:"Celo",logo:g.jsx(pt.Celo,{})},{id:44787,name:"Celo Alfajores",logo:g.jsx(pt.Celo,{testnet:!0})},{id:7700,name:"Canto",logo:g.jsx(pt.Canto,{})},{id:250,name:"Fantom",logo:g.jsx(pt.Fantom,{})},{id:4002,name:"Fantom Testnet",logo:g.jsx(pt.Fantom,{testnet:!0})},{id:14,name:"Flare",logo:g.jsx(pt.Flare,{})},{id:114,name:"Coston2",logo:g.jsx(pt.Flare,{})},{id:314,name:"Filecoin",logo:g.jsx(pt.Filecoin,{})},{id:3141,name:"Filecoin Hyperspace",logo:g.jsx(pt.Filecoin,{testnet:!0})},{id:314159,name:"Filecoin Calibration",logo:g.jsx(pt.Filecoin,{testnet:!0})},{id:1088,name:"Metis",logo:g.jsx(pt.Metis,{})},{id:599,name:"Metis Goerli",logo:g.jsx(pt.Metis,{testnet:!0})},{id:4689,name:"IoTeX",logo:g.jsx(pt.IoTeX,{})},{id:4690,name:"IoTeX Testnet",logo:g.jsx(pt.IoTeX,{testnet:!0})}],bze=Ee.div` + display: flex; + flex-direction: column; + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + flex-direction: column-reverse; + } +`,vze=Ee(Se.div)` + display: block; + position: relative; + border-radius: 12px; + overflow: hidden; + width: 24px; + height: 24px; + min-width: 24px; + min-height: 24px; + background: var(--ck-body-background); + svg { + border-radius: inherit; + display: block; + position: relative; + transform: translate3d(0, 0, 0); + width: 100%; + height: auto; + } + ${e=>e.$empty&&yt` + display: flex; + align-items: center; + justify-content: center; + &:before { + content: '?'; + color: var(--ck-body-color-muted); + font-weight: bold; + font-family: var(--ck-font-family); + } + `} + @media only screen and (max-width: ${Ft.mobileWidth}px) { + border-radius: 16px; + width: 32px; + height: 32px; + } +`,xze=Ee(Se.div)` + position: relative; +`,wze=Ee(Se.div)` + position: absolute; + inset: -6px; + animation: rotateSpinner 1200ms linear infinite; + pointer-events: none; + svg { + display: block; + position: relative; + transform: translate3d(0, 0, 0); + width: 100%; + height: auto; + } + @keyframes rotateSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`,Eze=Ee.div` + position: relative; + margin: -8px -8px; + &:after { + border-radius: var(--border-radius, 0); + z-index: 2; + content: ''; + pointer-events: none; + position: absolute; + inset: 0 2px; + box-shadow: inset 0 16px 8px -12px var(--background, var(--ck-body-background)), + inset 0 -16px 8px -12px var(--background, var(--ck-body-background)); + } +`,Cze=Ee(Se.div)` + padding: 8px; + overflow-x: hidden; + overflow-y: auto; + max-height: 242px; + + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + &::-webkit-scrollbar { + display: none; /* Safari and Chrome */ + } + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + padding: 8px 14px; + margin: 2px -2px 0; + max-height: 60vh; + } +`,Aze=Ee(Se.button)` + appearance: none; + cursor: pointer; + user-select: none; + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + border-radius: 11px; + margin: 0 0 1px; + padding: 8px 0; + padding-right: 154px; + font-size: 15px; + line-height: 18px; + font-weight: 500; + text-decoration: none; + color: var(--ck-body-color); + background: none; + white-space: nowrap; + transition: transform 100ms ease, background-color 100ms ease; + transform: translateZ(0px); + &:before { + content: ''; + background: currentColor; + position: absolute; + z-index: -1; + inset: 0 var(--ck-dropdown-active-inset, -8px); + border-radius: var(--ck-dropdown-active-border-radius, 12px); + opacity: 0; + transition: opacity 180ms ease; + } + &:after { + content: ''; + position: absolute; + z-index: -1; + inset: 0 var(--ck-dropdown-active-inset, -8px); + border-radius: 12px; + opacity: 0; + transition: opacity 180ms ease; + outline: 2px solid var(--ck-focus-color); + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + font-size: 17px; + padding: 8px 0; + } + @media only screen and (min-width: ${Ft.mobileWidth}px) { + &:hover { + &:before { + transition-duration: 80ms; + opacity: 0.05; + } + } + } + &:active { + transform: scale(0.99) translateZ(0px); + } + &:disabled { + //opacity: 0.4; + pointer-events: none; + } + &:focus-visible { + outline: none !important; + &:after { + opacity: 1; + } + } + ${e=>e.$variant==="secondary"&&yt` + padding: 12px 4px; + margin: 0 0 8px; + &:last-child { + margin-bottom: 0; + } + &:before { + opacity: 0.05; + } + &:hover:before { + opacity: 0.1; + } + `} +`,Sze=Ee(Se.div)` + position: absolute; + top: 0; + bottom: 0; + right: 0; + display: flex; + align-items: center; + justify-content: center; + + color: var(--ck-body-color-muted); + font-size: 15px; + line-height: 18px; + font-weight: 500; + padding-right: 4px; + span { + display: block; + position: relative; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + font-size: 17px; + padding: 0; + } +`,eV=Ee(Se.div)` + position: absolute; + z-index: -1; + inset: 0 var(--ck-dropdown-active-inset, -8px); + background: var(--ck-dropdown-active-background, rgba(26, 136, 248, 0.1)); + box-shadow var(--ck-dropdown-active-box-shadow); + border-radius: var(--ck-dropdown-active-border-radius, 12px); + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + inset: 0 var(--ck-dropdown-active-inset, -8px); + } +`,kze=g.jsxs("svg",{"aria-hidden":"true",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 16.75C2.69036 16.75 3.25 17.3096 3.25 18V19C3.25 26.5939 9.40609 32.75 17 32.75V35.25C8.02537 35.25 0.75 27.9746 0.75 19V18C0.75 17.3096 1.30964 16.75 2 16.75Z",fill:"url(#paint0_linear_1288_18701)"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"paint0_linear_1288_18701",x1:"2",y1:"19.4884",x2:"16.8752",y2:"33.7485",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]}),mae=({variant:e})=>{const{connector:t,chain:n}=Xo(),{chains:r,isPending:i,switchChain:o,error:s}=$O(),[a,c]=j.useState(void 0),u=Ci({}),l=Tm(),d=(s==null?void 0:s.code)===4902,f=d||!o,h=m=>{o&&(c(m),o({chainId:m}))},{triggerResize:p}=Cn();return g.jsxs(bze,{style:{marginBottom:o!==void 0?-8:0},children:[g.jsx(Eze,{children:g.jsx(Cze,{children:r.map(m=>{var x;const b={...gae.find(v=>v.id===m.id),...m};return g.jsxs(Aze,{$variant:e,disabled:f||b.id===(n==null?void 0:n.id)||i&&a===b.id,onClick:()=>h==null?void 0:h(b.id),style:{opacity:f&&b.id!==(n==null?void 0:n.id)?.4:void 0},children:[g.jsxs("span",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:12,color:b.id===(n==null?void 0:n.id)?"var(--ck-dropdown-active-color, inherit)":"inherit"},children:[g.jsxs(xze,{children:[g.jsx(wze,{initial:{opacity:0},animate:{opacity:i&&a===b.id?1:0},transition:{ease:[.76,0,.24,1],duration:.15,delay:.1},children:g.jsx(Se.div,{animate:l&&g9(t==null?void 0:t.id)&&i&&a===b.id?{opacity:[1,0],transition:{delay:4,duration:3}}:{opacity:1},children:kze},`${b==null?void 0:b.id}-${b==null?void 0:b.name}`)}),g.jsx(vze,{children:(x=b.logo)!==null&&x!==void 0?x:g.jsx(pt.UnknownChain,{})})]}),b.name]}),e!=="secondary"&&g.jsx(Sze,{children:g.jsxs(pr,{initial:!1,exitBeforeEnter:!0,children:[b.id===(n==null?void 0:n.id)&&g.jsx(Se.span,{style:{color:"var(--ck-dropdown-active-color, var(--ck-focus-color))",display:"block",position:"relative"},initial:{opacity:0,x:-4},animate:{opacity:1,x:0},exit:{opacity:0,x:4,transition:{duration:.1,delay:0}},transition:{ease:[.76,0,.24,1],duration:.3,delay:.2},children:u.connected},"connectedText"),i&&a===b.id&&g.jsx(Se.span,{style:{color:"var(--ck-dropdown-pending-color, inherit)",display:"block",position:"relative"},initial:{opacity:0,x:-4},animate:{opacity:1,x:0},exit:{opacity:0,x:4},transition:{ease:[.76,0,.24,1],duration:.3,delay:.1},children:g.jsx(Se.span,{animate:l&&g9(t==null?void 0:t.id)&&{opacity:[1,0],transition:{delay:4,duration:4}},children:u.approveInWallet})},"approveText")]})}),e==="secondary"?g.jsx(eV,{initial:!1,animate:{opacity:b.id===(n==null?void 0:n.id)?1:0},transition:{duration:.3,ease:"easeOut"}}):b.id===(n==null?void 0:n.id)&&g.jsx(eV,{layoutId:"activeChain",layout:"position",transition:{duration:.3,ease:"easeOut"}})]},`${b==null?void 0:b.id}-${b==null?void 0:b.name}`)})})}),g.jsx(pr,{children:d&&g.jsx(Se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:[.76,0,.24,1],duration:.3},onAnimationStart:p,onAnimationComplete:p,children:g.jsx("div",{style:{paddingTop:10,paddingBottom:8},children:g.jsxs(Pm,{children:[u.warnings_walletSwitchingUnsupported," ",u.warnings_walletSwitchingUnsupportedResolve]})})})})]})},Tze=Ee(Se.div)` + z-index: 2147483647; + position: fixed; + inset: 0; +`,_ze=Ee(Se.div)` + position: absolute; + inset: 0; +`,Pze=Ee(Se.div)` + --shadow: 0px 2px 15px rgba(0, 0, 0, 0.15); + --background: var(--ck-dropdown-background, var(--ck-tooltip-background)); + --border-radius: var( + --ck-dropdown-border-radius, + var(--ck-tooltip-border-radius, 12px) + ); + + pointer-events: auto; + z-index: 2147483647; + position: absolute; + top: 0; + left: 0; + width: 100%; + max-width: fit-content; + padding: 14px 16px 16px; + color: var(--ck-dropdown-color, var(--ck-tooltip-color)); + background: var(--background); + box-shadow: var( + --ck-dropdown-box-shadow, + var(--ck-tooltip-shadow, var(--shadow)) + ); + border-radius: var(--border-radius); +`,Ize=Ee(Se.div)` + padding: 0 0 6px; + font-size: 14px; + line-height: 20px; + font-weight: 400; + user-select: none; + color: var(--ck-dropdown-color, var(--ck-tooltip-color)); +`,Rze=({children:e,open:t,onClose:n,offsetX:r=0,offsetY:i=8})=>{var o,s,a;const c=Cn(),u=UE(),l=Ci(),[d,f]=j.useState({x:0,y:0});qse(t);const h=j.useRef(null);j.useEffect(()=>{const S=I=>{var A,O,N;if(t&&(I.key==="Escape"&&n(),I.key==="ArrowDown"||I.key==="ArrowUp")){if(!h.current)return;I.preventDefault();const R=(A=h.current)===null||A===void 0?void 0:A.querySelectorAll(` + a[href]:not(:disabled), + button:not(:disabled), + textarea:not(:disabled), + input[type="text"]:not(:disabled), + input[type="radio"]:not(:disabled), + input[type="checkbox"]:not(:disabled), + select:not(:disabled) + `),_=R[0],M=R[R.length-1];if(I.key==="ArrowUp")if(document.activeElement===_)M.focus();else{let z=(O=document==null?void 0:document.activeElement)===null||O===void 0?void 0:O.previousSibling;for(z||(z=M);z.disabled;)z=z.previousSibling;z.focus()}else if(document.activeElement===M)_.focus();else{let z=(N=document==null?void 0:document.activeElement)===null||N===void 0?void 0:N.nextSibling;for(z||(z=_);z.disabled;)z=z.nextSibling;z.focus()}}};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[t]);const p=j.useRef(null),m=j.useCallback(S=>{S&&(p.current=S,b())},[t]),[x,y]=lse({debounce:120,offsetSize:!0,scroll:!0}),b=()=>{if(!p.current||y.top+y.bottom+y.left+y.right+y.height+y.width===0)return;let S=y.left+r,I=y.top+y.height+i;p.current.style.left=`${S}px`,p.current.style.top=`${I}px`};(typeof window<"u"?j.useLayoutEffect:j.useEffect)(b,[p.current,y,t]),j.useEffect(b,[t,p.current]);const w=n,E=n;return j.useEffect(()=>(b(),window.addEventListener("scroll",w),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",E)}),[]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:x,children:e}),g.jsx(pr,{children:t&&g.jsx(kB,{children:g.jsx(s4,{$useTheme:(o=u.theme)!==null&&o!==void 0?o:c.theme,$useMode:(s=u.mode)!==null&&s!==void 0?s:c.mode,$customTheme:(a=u.customTheme)!==null&&a!==void 0?a:c.customTheme,children:g.jsx(Zse,{children:g.jsxs(Tze,{ref:h,children:[g.jsx(_ze,{onClick:n}),g.jsxs(Pze,{ref:m,style:{left:d.x,top:d.y},initial:"collapsed",animate:"open",exit:"collapsed",variants:{collapsed:{transformOrigin:"0 0",opacity:0,scale:.96,z:.01,y:-4,x:0,transition:{duration:.1}},open:{transformOrigin:"0 0",willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:0,x:0,transition:{ease:[.76,0,.24,1],duration:.15}}},children:[g.jsx(Ize,{children:l.switchNetworks}),g.jsx(mae,{})]})]})})})})})]})},Nze=Ee.div` + --bg: transparent; + --color: #333; + ${e=>typeof e.size=="string"?yt` + --width: ${e.size}; + --height: ${e.size}; + `:yt` + --width: ${e.size>=0?`${e.size}px`:"24px"}; + --height: ${e.size>=0?`${e.size}px`:"24px"}; + `}; + ${e=>typeof e.radius=="string"?yt` + --radius: ${e.radius}; + `:yt` + --radius: ${e.radius>=0?`${e.radius}px`:"24px"}; + `}; + display: block; + position: relative; + width: var(--width); + height: var(--height); + min-width: var(--width); + min-height: var(--height); + border-radius: var(--radius); + background: var(--ck-body-background-secondary); + pointer-events: none; + user-select: none; + svg { + display: block; + width: 100%; + height: auto; + } + > div { + display: flex; + align-items: center; + justify-content: center; + } +`,Oze=Ee(Se.div)` + display: block; + position: absolute; + inset: 0; + overflow: hidden; + border-radius: inherit; + user-select: none; + display: flex; + align-items: center; + justify-content: center; + svg { + display: block; + width: 100%; + height: auto; + } +`,Lze=dn` + 0%{ transform: rotate(0deg); } + 100%{ transform: rotate(360deg); } +`,Bze=Ee(Se.div)` + position: absolute; + inset: 0; + animation: ${Lze} 1s linear infinite; + svg { + display: block; + position: absolute; + inset: 0; + } +`,Mze=Ee(Se.div)` + z-index: 2; + position: absolute; + top: 0; + right: 0; + width: 40%; + height: 40%; + min-width: 13px; + min-height: 13px; + color: var(--ck-body-color-danger, red); + svg { + display: block; + position: relative; + top: -30%; + right: -30%; + } +`,Dze=g.jsxs("svg",{"aria-hidden":"true",width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.3592 30.1654C10.0472 29.4491 8.85718 28.524 7.83713 27.424C6.81708 26.324 5.98425 25.0677 5.36889 23.7054C5.20157 23.335 5.05033 22.9567 4.91578 22.5717C4.51465 21.4237 4.26735 20.2308 4.17794 19.0239C4.16599 18.8626 4.13894 18.7041 4.09809 18.5507C3.85023 17.6197 3.09399 16.8738 2.11531 16.7999C0.975331 16.7138 -0.0310983 17.5702 0.0141657 18.7125C0.0223289 18.9185 0.0340286 19.1243 0.049253 19.3298C0.165374 20.8971 0.486545 22.4464 1.00749 23.9373C1.10424 24.2142 1.20764 24.4884 1.31755 24.7596C2.13617 26.7799 3.31595 28.6371 4.80146 30.239C6.28696 31.841 8.04998 33.1573 10.0029 34.1258C10.2651 34.2558 10.5307 34.3796 10.7995 34.4969C12.247 35.1287 13.7676 35.5656 15.3217 35.7995C15.5255 35.8301 15.7298 35.8573 15.9346 35.881C17.0703 36.0122 18.0001 35.0731 18.0001 33.9299C18.0001 32.9484 17.3133 32.1381 16.4036 31.8208C16.2537 31.7685 16.0977 31.7296 15.9377 31.7056C14.7411 31.5255 13.5702 31.1891 12.4556 30.7026C12.0818 30.5394 11.716 30.3601 11.3592 30.1654Z",fill:"url(#paint0_linear_1288_1870)"}),g.jsx("defs",{children:g.jsxs("linearGradient",{id:"paint0_linear_1288_1870",x1:"2",y1:"19.4884",x2:"16.8752",y2:"33.7485",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"var(--ck-connectbutton-balance-color,currentColor)",stopOpacity:"0.7"}),g.jsx("stop",{offset:"1",stopColor:"var(--ck-connectbutton-balance-color,currentColor)",stopOpacity:"0"})]})})]}),tV=({id:e,unsupported:t,radius:n="50%",size:r=24})=>{var i;const o=tp(e),s=t??!o,a=gae.find(u=>u.id===e);return VE()?g.jsx(Nze,{size:r,radius:n,children:g.jsxs(pr,{initial:!1,children:[s&&g.jsx(Mze,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:g.jsxs("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M2.61317 11.2501H9.46246C10.6009 11.2501 11.3256 10.3506 11.3256 9.3549C11.3256 9.05145 11.255 8.73244 11.0881 8.43303L7.65903 2.14708C7.659 2.14702 7.65897 2.14696 7.65893 2.1469C7.65889 2.14682 7.65884 2.14673 7.65879 2.14664C7.31045 1.50746 6.6741 1.17871 6.04 1.17871C5.41478 1.17871 4.763 1.50043 4.41518 2.14968L0.993416 8.43476C0.828865 8.72426 0.75 9.04297 0.75 9.3549C0.75 10.3506 1.47471 11.2501 2.61317 11.2501Z",fill:"currentColor",stroke:"var(--ck-body-background, #fff)",strokeWidth:"1.5"}),g.jsx("path",{d:"M6.03258 7.43916C5.77502 7.43916 5.63096 7.29153 5.62223 7.02311L5.55675 4.96973C5.54802 4.69684 5.74446 4.5 6.02821 4.5C6.3076 4.5 6.51277 4.70131 6.50404 4.9742L6.43856 7.01864C6.42546 7.29153 6.2814 7.43916 6.03258 7.43916ZM6.03258 9.11676C5.7401 9.11676 5.5 8.9065 5.5 8.60677C5.5 8.30704 5.7401 8.09678 6.03258 8.09678C6.32506 8.09678 6.56515 8.30256 6.56515 8.60677C6.56515 8.91097 6.32069 9.11676 6.03258 9.11676Z",fill:"white"})]})}),e?g.jsx(Oze,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(i=a==null?void 0:a.logo)!==null&&i!==void 0?i:g.jsx(pt.UnknownChain,{})},`${a==null?void 0:a.id}-${a==null?void 0:a.name}-${e}`):g.jsx(Bze,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:Dze},"loading")]})}):g.jsx("div",{style:{width:r,height:r}})},jze=Ee(Se.div)``,Fze=Ee(Se.button)` + --color: var( + --ck-dropdown-button-color, + var(--ck-button-primary-color, var(--ck-body-color)) + ); + --background: var( + --ck-dropdown-button-background, + var(--ck-secondary-button-background, var(--ck-body-background-secondary)) + ); + --box-shadow: var( + --ck-dropdown-button-box-shadow, + var( + --ck-secondary-button-box-shadow, + var(--ck-button-primary-box-shadow), + none + ) + ); + + --hover-color: var(--ck-dropdown-button-hover-color, var(--color)); + --hover-background: var( + --ck-dropdown-button-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-dropdown-button-hover-box-shadow, + var(--box-shadow) + ); + + --active-color: var(--ck-dropdown-button-active-color, var(--hover-color)); + --active-background: var( + --ck-dropdown-button-active-background, + var(--hover-background) + ); + --active-box-shadow: var( + --ck-dropdown-button-active-box-shadow, + var(--hover-box-shadow) + ); + + appearance: none; + user-select: none; + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + border-radius: 15px; + width: 52px; + height: 30px; + padding: 2px 6px 2px 3px; + font-size: 16px; + line-height: 19px; + font-weight: 500; + text-decoration: none; + white-space: nowrap; + transform: translateZ(0px); + + transition: 100ms ease; + transition-property: transform, background-color, box-shadow, color; + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + + svg { + position: relative; + display: block; + } + + ${e=>e.disabled?yt` + width: auto; + padding: 3px; + position: relative; + left: -22px; + `:yt` + cursor: pointer; + + @media only screen and (min-width: ${Ft.mobileWidth+1}px) { + &:hover, + &:focus-visible { + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + } + &:active { + color: var(--active-color); + background: var(--active-background); + box-shadow: var(--active-box-shadow); + } + } + `} +`,Uze=({...e})=>g.jsx("svg",{"aria-hidden":"true",width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:g.jsx("path",{d:"M1.5 1L5.5 5L9.5 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),zze=()=>{const e=Cn(),[t,n]=j.useState(!1),{chain:r}=Xo(),{chains:i}=$O(),o=Ci({CHAIN:r==null?void 0:r.name}),s=Tm()||(window==null?void 0:window.innerWidth){e.open||n(!1)},[e.open]);const a=i.length<=1;return g.jsx(g.Fragment,{children:g.jsx(jze,{children:g.jsx(Rze,{offsetX:-12,open:!s&&t,onClose:()=>n(!1),children:g.jsxs(Fze,{"aria-label":Ju(o.switchNetworks).toString(),disabled:a,onClick:()=>{s?e.setRoute(it.SWITCHNETWORKS):n(!t)},children:[a?g.jsx(BB,{message:o.chainNetwork,xOffset:-6,delay:.01,children:g.jsx(tV,{id:r==null?void 0:r.id})}):g.jsx(tV,{id:r==null?void 0:r.id}),!a&&g.jsx(Uze,{style:{top:1,left:-3}})]})})})})},$ze=({closeModal:e})=>{var t,n,r;const i=Cn(),o=UE(),s=Ci(),{reset:a}=UO(),{disconnect:c}=Lee(),{address:u,isConnected:l,connector:d,chain:f}=Xo(),h=DB(),{data:p}=zO({chainId:1,address:u,config:h}),{data:m}=Pve({address:u}),[x,y]=j.useState(!1);j.useEffect(()=>{l||i.setOpen(!1)},[l]),j.useEffect(()=>{if(x)return e?e():i.setOpen(!1),()=>{c(),a()}},[x,c,a]);const b=["web95","rounded","minimal"].includes((n=(t=o.theme)!==null&&t!==void 0?t:i.theme)!==null&&n!==void 0?n:"")?"....":void 0;return g.jsxs(Go,{children:[g.jsxs(yr,{style:{paddingBottom:22,gap:6},children:[g.jsx(WUe,{children:g.jsxs(GUe,{children:[g.jsx(KUe,{children:g.jsx(zze,{})}),g.jsx(pae,{address:u})]})}),g.jsx(Mo,{children:g.jsx(LB,{string:u,children:p??Hse(u,b)})}),!((r=i==null?void 0:i.options)===null||r===void 0)&&r.hideBalance?null:g.jsx(Cr,{children:g.jsx(QUe,{children:g.jsxs(pr,{exitBeforeEnter:!0,initial:!1,children:[m&&g.jsxs(YUe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[GDe(Number(m==null?void 0:m.formatted))," ",m==null?void 0:m.symbol]},`chain-${f==null?void 0:f.id}`),!m&&g.jsx(ZUe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:" "})]})})})]}),!Wse(d==null?void 0:d.id)&&g.jsx(Di,{onClick:()=>y(!0),icon:g.jsx(_B,{}),children:s.disconnect})]})},Hze=()=>{const{reset:e}=UO(),{disconnect:t}=Lee(),{connector:n,chain:r}=Xo(),i=tp(r==null?void 0:r.id),o=Ci({}),s=()=>{t(),e()};return g.jsx(Go,{style:{width:278},children:g.jsxs(yr,{style:{padding:0,marginTop:-10},children:[!i&&g.jsxs(Cr,{children:[o.warnings_chainUnsupported," ",o.warnings_chainUnsupportedResolve]}),g.jsx("div",{style:{padding:"6px 8px"},children:g.jsx(mae,{variant:"secondary"})}),!i&&!Wse(n==null?void 0:n.id)&&g.jsxs("div",{style:{paddingTop:12},children:[g.jsx(y9,{}),g.jsx(Di,{icon:g.jsx(_B,{}),variant:"secondary",onClick:s,children:o.disconnect})]})]})})},Vze=dn` + from{ transform: rotate(0deg); } + to{ transform: rotate(360deg); } +`,Wze=dn` + from{ background-position: 0 0; } + to{ background-position: 100% 0; } +`,Gze=Ee.div` + @media only screen and (max-width: ${Ft.mobileWidth}px) { + margin: 5px auto 24px; + padding: 16px 16px; + border-radius: var(--ck-tertiary-border-radius, 24px); + box-shadow: var(--ck-tertiary-box-shadow, none); + background: var(--ck-body-background-tertiary); + } +`,BI=Ee(Se.div)` + z-index: 2; + overflow: hidden; + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: 52px; + height: 52px; + border-radius: 100%; + transition: inherit; + background: var(--ck-body-background-secondary); + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); + svg, + img { + display: block; + width: 100%; + height: 100%; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + width: 64px; + height: 64px; + } +`,MI=Ee(Se.div)` + z-index: 2; + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: 52px; + height: 52px; + color: currentColor; + border-radius: 100%; + transition: inherit; + svg { + z-index: 3; + position: relative; + transform: scale(0.89); + transition: inherit; + opacity: 0.5; + } + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 10px; + border-radius: inherit; + border: 1px dashed var(--border-color); + background: var(--ck-body-background); + transition: inherit; + animation: ${Vze} 10s linear infinite; + } + &:after { + z-index: 2; + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + background: #34c759; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); + transform: scale(0); + transition: inherit; + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + width: 64px; + height: 64px; + svg { + transform: scale(1.1); + } + } +`,yae=Ee(Se.svg)` + display: block; + position: relative; + margin: 0 auto; + transition: inherit; + overflow: visible; + rect { + stroke: var(--border-color); + rx: var(--ck-border-radius); + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + display: none; + } +`,Kze=Ee(Se.div)` + --border-color: var(--ck-siwe-border, var(--ck-body-divider)); + --border-size: 0; + --border-style: dashed; + + user-select: none; + pointer-events: none; + position: relative; + display: flex; + align-items: center; + justify-content: center; + gap: 14px; + width: 100%; + margin: 12px auto; + padding: 42px 32px; + transition: all 320ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + border: var(--border-size) var(--border-style) var(--border-color); + border-radius: var(--ck-border-radius); + + @media only screen and (max-width: ${Ft.mobileWidth}px) { + --border-size: 1px; + margin: 0 auto 20px; + padding: 38px 0; + gap: 18px; + + div { + // easier than wrapping in another styled component + padding-bottom: 10px; + } + } + + > div { + z-index: 2; + position: relative; + transition: inherit; + } + + &:before, + &:after { + z-index: 1; + content: ''; + position: absolute; + top: 50%; + left: 50%; + width: 120px; + height: 1px; + margin-left: -60px; + transition: inherit; + animation: ${Wze} 10s linear infinite; + background: linear-gradient( + 90deg, + var(--border-color), + var(--border-color) 50%, + transparent 50%, + transparent 100% + ); + background-size: 6px 1px; + } + + &:after { + background: var(--border-color); + transform: scaleX(0); + } + + ${({$connected:e})=>e&&yt` + &:before { + opacity: 0; + } + &:after { + transform: none; + } + ${yae} { + rect { + stroke-dasharray: 0 0; + } + } + ${BI} { + transform: scale(0.62); + } + ${MI} { + svg { + transform: scale(1.5); + opacity: 1; + color: #fff; + } + &:before { + transform: scale(0); + } + &:after { + transform: scale(1); + } + } + @media only screen and (max-width: ${Ft.mobileWidth}px) { + --border-size: 1px; + --border-style: solid; + ${MI} { + svg { + transform: scale(1.75); + } + } + } + `}; +`,Qze=({showSignOutButton:e,onSignIn:t,onSignOut:n})=>{const r=VE(),i=Ci(),{setOpen:o}=vae(),{isSignedIn:s,isReady:a,isLoading:c,isRejected:u,isSuccess:l,isError:d,signIn:f,signOut:h,error:p}=zE({onSignIn:y=>t==null?void 0:t(y),onSignOut:()=>n==null?void 0:n()}),{address:m}=Xo();function x(){return l?i.signedIn:u?i.tryAgain:c?i.awaitingConfirmation:d?p??"Unknown Error":i.signIn}return r?e&&s?g.jsx(Di,{style:{margin:0},onClick:h,icon:g.jsx(_B,{}),children:i.signOut},"button"):m?g.jsx(Di,{style:{margin:0},arrow:s?!1:!c&&!u,onClick:!c&&!l?f:void 0,disabled:c,waiting:c,icon:u&&g.jsx(Se.div,{initial:{rotate:-270},animate:{rotate:0},transition:{duration:1,ease:[.175,.885,.32,.98]},children:g.jsx(Ije,{style:{opacity:.4}})}),children:x()},"button"):g.jsx(Di,{style:{margin:0},onClick:()=>o(!0),arrow:!0,children:i.walletNotConnected},"button"):g.jsx(Di,{style:{margin:0},disabled:!0},"loading")},Yze=({src:e,alt:t,width:n,height:r})=>{const i=j.useRef(null),[o,s]=j.useState(!0);return j.useEffect(()=>{i.current&&i.current.complete&&i.current.naturalHeight!==0||s(!1)},[e]),g.jsx("div",{style:{width:n,height:r,background:"rgba(0,0,0,0.02)",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.02)"},children:g.jsx("img",{ref:i,src:e,alt:t,width:n,height:r,onLoad:()=>s(!0),style:{transition:"opacity 0.2s ease",opacity:o?1:0}})})},rk={duration:.2,ease:[.26,.08,.25,1]},nV={duration:.16,ease:[.26,.08,.25,1]},qze=()=>{var e,t;const n=Cn(),{isSignedIn:r,reset:i}=zE(),o=Tm(),[s,a]=j.useState(r?"signedIn":"signedOut"),c=Ci({}),u=s==="signedIn"?{heading:c.signInWithEthereumScreen_signedIn_heading,h1:c.signInWithEthereumScreen_signedIn_h1,p:c.signInWithEthereumScreen_signedIn_p,button:c.signInWithEthereumScreen_signedIn_button}:{heading:c.signInWithEthereumScreen_signedOut_heading,h1:c.signInWithEthereumScreen_signedOut_h1,p:c.signInWithEthereumScreen_signedOut_p,button:c.signInWithEthereumScreen_signedOut_button};j.useEffect(()=>{r&&a("signedIn")},[]),j.useEffect(()=>{r||a("signedOut")},[r]);const{address:l}=Xo(),f=(()=>{const p={svg:null,default:null},m=document.getElementsByTagName("link");return Array.from(m).forEach(x=>{(x.getAttribute("rel")==="icon"||x.getAttribute("rel")==="shortcut icon")&&x.getAttribute("href")&&(x.getAttribute("type")==="image/svg+xml"?p.svg=x.getAttribute("href"):p.default=x.getAttribute("href"))}),p})(),h=(t=(e=vDe())!==null&&e!==void 0?e:f.svg)!==null&&t!==void 0?t:f.default;return g.jsx(Go,{style:{width:278},children:g.jsxs(yr,{style:{padding:0,marginTop:-10},children:[g.jsx(Gze,{children:g.jsx(pr,{exitBeforeEnter:!0,children:g.jsx(Se.div,{initial:o?!1:{opacity:0,scale:.94},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.94},transition:nV,children:g.jsx(Cr,{style:{height:42},children:g.jsx(Sa,{children:u.h1})})},Ju(u.h1).toString())})}),g.jsxs(Kze,{$connected:r,children:[g.jsx("div",{style:{position:"absolute",inset:0},children:g.jsx(yae,{width:"262",height:"134",viewBox:"0 0 262 134",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx(Se.rect,{x:"0",y:"0",rx:"12",width:"262",height:"134",strokeDasharray:"3 3",animate:{strokeDashoffset:[0,-6]},transition:{duration:.4,ease:"linear",repeat:1/0}})})}),g.jsx(Se.div,{initial:o?!1:{opacity:0,x:50,scale:.8},animate:{opacity:1,x:0,scale:1},transition:rk,children:g.jsx(BI,{children:g.jsx(pae,{address:l,size:64})})},"avatarImage"),g.jsx(Se.div,{initial:o?!1:{scale:.6},animate:{scale:1},transition:{...rk},children:g.jsx(MI,{children:g.jsx(Xse,{})})},"tickIcon"),g.jsx(Se.div,{initial:o?!1:{opacity:0,x:-40,scale:.8},animate:{opacity:1,x:0,scale:1},transition:{...rk},children:g.jsx(BI,{children:h?g.jsx(Yze,{src:h,alt:"app"}):g.jsx(pt.UnknownChain,{})})},"appLogo")]},"status"),g.jsx(pr,{exitBeforeEnter:!0,children:g.jsx(Se.div,{style:{paddingBottom:o?24:12},initial:o?!1:{opacity:0,scale:.94},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.94},transition:nV,children:g.jsx(Cr,{style:{height:42,marginTop:-1,marginBottom:-3},children:g.jsx(Sa,{children:u.p})})},Ju(u.p).toString())}),g.jsx(Qze,{showSignOutButton:s==="signedIn",onSignIn:()=>{setTimeout(()=>{n.setOpen(!1)},1e3)}})]})})},Zze={},Jze=({mode:e="auto",theme:t="auto",customTheme:n=Zze,lang:r="en-US"})=>{var i;const o=Cn(),{isConnected:s,chain:a}=Xo(),c=tp(a==null?void 0:a.id),u=!(!((i=o.options)===null||i===void 0)&&i.enforceSupportedChains&&s&&!c),l=u&&o.route!==it.CONNECTORS&&o.route!==it.PROFILE,d=u&&o.route!==it.PROFILE,f=()=>{o.route===it.SIGNINWITHETHEREUM||o.route===it.SWITCHNETWORKS?o.setRoute(it.PROFILE):o.route===it.DOWNLOAD?o.setRoute(it.CONNECT):o.setRoute(it.CONNECTORS)},h={onboarding:g.jsx(yFe,{}),about:g.jsx(IFe,{}),download:g.jsx(VUe,{}),connectors:g.jsx(ZFe,{}),mobileConnectors:g.jsx(oUe,{}),connect:g.jsx(HUe,{}),profile:g.jsx($ze,{}),switchNetworks:g.jsx(Hze,{}),signInWithEthereum:g.jsx(qze,{})};function p(){o.setOpen(!1)}return j.useEffect(()=>{var m;s?(o.route!==it.PROFILE||o.route!==it.SIGNINWITHETHEREUM)&&(o.signInWithEthereum&&!(!((m=o.options)===null||m===void 0)&&m.disableSiweRedirect)?o.setRoute(it.SIGNINWITHETHEREUM):p()):p()},[s]),j.useEffect(()=>o.setMode(e),[e]),j.useEffect(()=>o.setTheme(t),[t]),j.useEffect(()=>o.setCustomTheme(n),[n]),j.useEffect(()=>o.setLang(r),[r]),j.useEffect(()=>{},[o.open]),g.jsx(kje,{theme:t,customTheme:n,mode:e,children:g.jsx(nFe,{open:o.open,pages:h,pageId:o.route,onClose:u?p:void 0,onInfo:d?()=>o.setRoute(it.ABOUT):void 0,onBack:l?f:void 0})})};function Xze(e){j.useEffect(()=>{if(!e)return;e=e.replace(/ /g,"+");const t=document.createElement("link");t.href="https://fonts.googleapis.com",t.rel="preconnect";const n=document.createElement("link");n.href="https://fonts.gstatic.com",n.rel="preconnect",n.crossOrigin="true";const r=document.createElement("link");return r.href=`https://fonts.googleapis.com/css2?family=${e}:wght@400;500;600&display=swap`,r.rel="stylesheet",document.head.appendChild(t),document.head.appendChild(n),document.head.appendChild(r),()=>{document.head.removeChild(t),document.head.removeChild(n),document.head.removeChild(r)}},[e])}function e$e(e){var t;const r=(t={web95:"Lato",retro:"Nunito",midnight:"Inter",minimal:"Inter",rounded:"Nunito"}[e])!==null&&t!==void 0?t:null;Xze(r??"")}const bae=({onConnect:e,onDisconnect:t})=>{fve({onConnect:({address:n,connector:r,isReconnected:i})=>{i||e==null||e({address:n,connectorId:r==null?void 0:r.id})},onDisconnect:()=>t==null?void 0:t()})},it={ONBOARDING:"onboarding",ABOUT:"about",CONNECTORS:"connectors",MOBILECONNECTORS:"mobileConnectors",CONNECT:"connect",DOWNLOAD:"download",PROFILE:"profile",SWITCHNETWORKS:"switchNetworks",SIGNINWITHETHEREUM:"signInWithEthereum"},DI=j.createContext(null),t$e=({children:e,theme:t="auto",mode:n="auto",customTheme:r,options:i,onConnect:o,onDisconnect:s,debugMode:a=!1})=>{var c,u,l,d;if(!Gn.useContext(FO))throw Error("ConnectKitProvider must be within a WagmiProvider");if(Gn.useContext(DI))throw new Error("Multiple, nested usages of ConnectKitProvider detected. Please use only one.");bae({onConnect:o,onDisconnect:s});const f=lae(),h=nae("injected"),p={language:"en-US",hideBalance:!1,hideTooltips:!1,hideQuestionMarkCTA:!1,hideNoWalletCTA:!1,walletConnectCTA:"link",hideRecentBadge:!1,avoidLayoutShift:!0,embedGoogleFonts:!1,truncateLongENSAddress:!0,walletConnectName:void 0,reducedMotion:!1,disclaimer:null,bufferPolyfill:!0,customAvatar:void 0,initialChainId:(c=f==null?void 0:f[0])===null||c===void 0?void 0:c.id,enforceSupportedChains:!1,ethereumOnboardingUrl:void 0,walletOnboardingUrl:void 0,disableSiweRedirect:!1},m=Object.assign({},p,i);typeof window<"u"&&m.bufferPolyfill&&(window.Buffer=(u=window.Buffer)!==null&&u!==void 0?u:bN.Buffer);const[x,y]=j.useState(t),[b,v]=j.useState(n),[w,E]=j.useState(r??{}),[S,I]=j.useState("en-US"),[A,O]=j.useState(!1),[N,R]=j.useState({id:""}),[_,M]=j.useState(it.CONNECTORS),[z,F]=j.useState(""),[$,W]=j.useState(0);m.embedGoogleFonts&&e$e(t),j.useEffect(()=>y(t),[t]),j.useEffect(()=>I(m.language||"en-US"),[m.language]),j.useEffect(()=>F(null),[_,A]);const{chain:G,isConnected:H}=Xo(),L=tp(G==null?void 0:G.id);j.useEffect(()=>{H&&m.enforceSupportedChains&&!L&&(O(!0),M(it.SWITCHNETWORKS))},[H,L,G,_,A]),j.useEffect(()=>{Bse()&&(h==null||h.connect())},[h]);const q=a?console.log:()=>{},V={theme:x,setTheme:y,mode:b,setMode:v,customTheme:r,setCustomTheme:E,lang:S,setLang:I,open:A,setOpen:O,route:_,setRoute:M,connector:N,setConnector:R,signInWithEthereum:(d=(l=Gn.useContext(eae))===null||l===void 0?void 0:l.enabled)!==null&&d!==void 0?d:!1,onConnect:o,options:m,errorMessage:z,debugMode:a,log:q,displayError:(P,K)=>{F(P),console.log("---------CONNECTKIT DEBUG---------"),console.log(P),K&&console.table(K),console.log("---------/CONNECTKIT DEBUG---------")},resize:$,triggerResize:()=>W(P=>P+1)};return j.createElement(DI.Provider,{value:V},g.jsx(g.Fragment,{children:g.jsx(UFe,{enabled:A,children:g.jsxs(xBe,{theme:YDe,children:[e,g.jsx(Jze,{lang:S,theme:x,mode:n,customTheme:w})]})})}))},Cn=()=>{const e=Gn.useContext(DI);if(!e)throw Error("ConnectKit Hook must be inside a Provider.");return e},v9={disconnected:[it.CONNECTORS,it.ABOUT,it.ONBOARDING,it.MOBILECONNECTORS,it.ONBOARDING],connected:[it.PROFILE,it.SWITCHNETWORKS,it.SIGNINWITHETHEREUM]},n$e=[...v9.connected,...v9.disconnected],vae=({onConnect:e,onDisconnect:t}={})=>{const n=Cn();bae({onConnect:e,onDisconnect:t});const{isConnected:r}=Xo(),{signIn:i}=zE(),o=()=>{n.setOpen(!1)},s=()=>{n.setOpen(!0)},a=c=>{let u=c;n$e.includes(c)?r?v9.connected.includes(c)||(u=it.PROFILE,n.log(`Route ${c} is not a valid route when connected, navigating to ${u} instead.`)):v9.disconnected.includes(c)||(u=it.CONNECTORS,n.log(`Route ${c} is not a valid route when disconnected, navigating to ${u} instead.`)):(u=r?it.PROFILE:it.CONNECTORS,n.log(`Route ${c} is not a valid route, navigating to ${u} instead.`)),n.setRoute(u),s()};return{open:n.open,setOpen:c=>{c?a(r?it.PROFILE:it.CONNECTORS):o()},openAbout:()=>a(it.ABOUT),openOnboarding:()=>a(it.ONBOARDING),openProfile:()=>a(it.PROFILE),openSwitchNetworks:()=>a(it.SWITCHNETWORKS),openSIWE:c=>{a(it.SIGNINWITHETHEREUM),c&&i()}}};Ee(Se.div)` + top: 0; + bottom: 0; + left: 0; + display: inline-flex; + align-items: center; + justify-content: center; + white-space: nowrap; +`;Ee(Se.div)` + position: relative; + width: 24px; + height: 24px; + border-radius: 12px; + overflow: hidden; + svg { + display: block; + } +`;Ee(Se.div)` + pointer-events: none; + user-select: none; + position: relative; + width: 24px; + height: 24px; + margin-right: 8px; +`;Ee(Se.div)` + z-index: 1; + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: 100%; + box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02); + background: var(--ck-body-color-danger, red); + color: #fff; + svg { + display: block; + position: relative; + top: -1px; + } +`;const rV=Ee(Se.div)` + display: flex; + align-items: center; + justify-content: flex-start; + position: relative; + height: 40px; + padding: 0; + line-height: 0; + letter-spacing: -0.2px; + font-size: var(--ck-connectbutton-font-size, 16px); + font-weight: var(--ck-connectbutton-font-weight, 500); + text-align: center; + transition: 100ms ease; + transition-property: color, background, box-shadow, border-radius; + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &.primary { + --color: var(--ck-connectbutton-color); + --background: var(--ck-connectbutton-background); + --box-shadow: var(--ck-connectbutton-box-shadow); + --border-radius: var(--ck-connectbutton-border-radius, 12px); + + --hover-color: var(--ck-connectbutton-hover-color, var(--color)); + --hover-background: var( + --ck-connectbutton-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-connectbutton-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-connectbutton-hover-border-radius, + var(--border-radius) + ); + + --active-color: var(--ck-connectbutton-active-color, var(--hover-color)); + --active-background: var( + --ck-connectbutton-active-background, + var(--hover-background) + ); + --active-box-shadow: var( + --ck-connectbutton-active-box-shadow, + var(--hover-box-shadow) + ); + --active-border-radius: var( + --ck-connectbutton-active-border-radius, + var(--hover-border-radius) + ); + } + &.secondary { + --color: var(--ck-connectbutton-balance-color); + --background: var(--ck-connectbutton-balance-background); + --box-shadow: var(--ck-connectbutton-balance-box-shadow); + --border-radius: var( + --ck-connectbutton-balance-border-radius, + var(--ck-connectbutton-border-radius, 12px) + ); + + --hover-color: var(--ck-connectbutton-balance-hover-color, var(--color)); + --hover-background: var( + --ck-connectbutton-balance-hover-background, + var(--background) + ); + --hover-box-shadow: var( + --ck-connectbutton-balance-hover-box-shadow, + var(--box-shadow) + ); + --hover-border-radius: var( + --ck-connectbutton-balance-hover-border-radius, + var(--border-radius) + ); + + --active-color: var( + --ck-connectbutton-balance-active-color, + var(--hover-color) + ); + --active-background: var( + --ck-connectbutton-balance-active-background, + var(--hover-background) + ); + --active-box-shadow: var( + --ck-connectbutton-balance-active-box-shadow, + var(--hover-box-shadow) + ); + --active-border-radius: var( + --ck-connectbutton-balance-active-border-radius, + var(--hover-border-radius) + ); + } +`;Ee.button` + all: initial; + appearance: none; + user-select: none; + position: relative; + padding: 0; + margin: 0; + background: none; + border-radius: var(--ck-border-radius); + + &:disabled { + pointer-events: none; + opacity: 0.3; + } + + display: flex; + flex-wrap: nowrap; + background: none; + cursor: pointer; + * { + cursor: pointer; + } + &:hover { + ${rV} { + color: var(--hover-color, var(--color)); + background: var(--hover-background, var(--background)); + box-shadow: var(--hover-box-shadow, var(--box-shadow)); + border-radius: var(--hover-border-radius, var(--border-radius)); + } + } + &:active { + ${rV} { + color: var(--active-color, var(--hover-color, var(--color))); + background: var( + --active-background, + var(--hover-background, var(--background)) + ); + box-shadow: var( + --active-box-shadow, + var(--hover-box-shadow, var(--box-shadow)) + ); + border-radius: var( + --active-border-radius, + var(--hover-border-radius, var(--border-radius)) + ); + } + } + &:focus-visible { + outline: 2px solid var(--ck-family-brand); + } +`;Ee(Se.div)` + display: flex; + align-items: center; + justify-content: center; + gap: 8px; +`;const r$e=dn` + 0%,100%{ opacity: 0.1; transform: scale(0.75); } + 50%{ opacity: 0.75; transform: scale(1.2) } +`;Ee.div` + pointer-events: none; + user-select: none; + padding: 0 5px; + span { + display: inline-block; + vertical-align: middle; + margin: 0 2px; + width: 3px; + height: 3px; + border-radius: 4px; + background: currentColor; + animation: ${r$e} 1000ms ease infinite both; + } +`;const i$e=({children:e})=>{const t=VE(),n=Cn(),{open:r,setOpen:i}=vae(),{address:o,isConnected:s,chain:a}=Xo(),c=tp(a==null?void 0:a.id),u=DB(),{data:l}=zO({chainId:1,address:o,config:u});function d(){i(!1)}function f(){i(!0),n.setRoute(s?it.PROFILE:it.CONNECTORS)}return!e||!t?null:g.jsx(g.Fragment,{children:e({show:f,hide:d,chain:a,unsupported:!c,isConnected:!!o,isConnecting:r,address:o,truncatedAddress:o?Hse(o):void 0,ensName:l==null?void 0:l.toString()})})};i$e.displayName="ConnectKitButton.Custom";const ik=8,o$e=dn` + 0%{ transform:none; } + 25%{ transform:translateX(${ik}px); } + 50%{ transform:translateX(-${ik}px); } + 75%{ transform:translateX(${ik}px); } + 100%{ transform:none; } +`,s$e=dn` + 0%{ transform:translate(500%,100%); opacity:0; } + 60%{ transform:translate(25%,-20%); opacity:1; } + 70%{ transform:translate(25%,-20%); } + 85%{ transform:translate(25%,-20%) scale(0.9); } + 100%{ transform:translate(25%,-20%) scale(1); opacity:1; } +`;Ee.div` + z-index: 2; + position: absolute; + top: 50%; + left: 50%; + width: 32px; + height: 32px; + border-radius: 50%; + background: rgba(0, 0, 0, 0.5); + box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 4px 6px rgba(0, 0, 0, 0.1); + opacity: 0; + &.play { + animation: ${s$e} 1300ms 200ms cubic-bezier(0.16, 1, 0.6, 1) both; + } +`;Ee.div` + z-index: 1; + position: absolute; + inset: 0; + &.shake { + animation: ${o$e} 300ms 100ms cubic-bezier(0.16, 1, 0.6, 1) both; + } +`;Ee.div` + z-index: 1; + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + &:before { + z-index: 9; + content: ''; + position: absolute; + inset: 0; + } +`;const a$e="1.8.2";/** + * @remix-run/router v1.19.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function jh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function u$e(){return Math.random().toString(36).substr(2,8)}function oV(e,t){return{usr:e.state,key:e.key,idx:t}}function a4(e,t,n,r){return n===void 0&&(n=null),Yn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cl(t):t,{state:n,key:t&&t.key||r||u$e()})}function E5(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function l$e(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=mr.Pop,c=null,u=l();u==null&&(u=0,s.replaceState(Yn({},s.state,{idx:u}),""));function l(){return(s.state||{idx:null}).idx}function d(){a=mr.Pop;let x=l(),y=x==null?null:x-u;u=x,c&&c({action:a,location:m.location,delta:y})}function f(x,y){a=mr.Push;let b=a4(m.location,x,y);n&&n(b,x),u=l()+1;let v=oV(b,u),w=m.createHref(b);try{s.pushState(v,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}o&&c&&c({action:a,location:m.location,delta:1})}function h(x,y){a=mr.Replace;let b=a4(m.location,x,y);n&&n(b,x),u=l();let v=oV(b,u),w=m.createHref(b);s.replaceState(v,"",w),o&&c&&c({action:a,location:m.location,delta:0})}function p(x){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof x=="string"?x:E5(x);return b=b.replace(/ $/,"%20"),Dt(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return a},get location(){return e(i,s)},listen(x){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(iV,d),c=x,()=>{i.removeEventListener(iV,d),c=null}},createHref(x){return t(i,x)},createURL:p,encodeLocation(x){let y=p(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(x){return s.go(x)}};return m}var mn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(mn||(mn={}));const d$e=new Set(["lazy","caseSensitive","path","id","index","children"]);function f$e(e){return e.index===!0}function c4(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let s=[...n,String(o)],a=typeof i.id=="string"?i.id:s.join("-");if(Dt(i.index!==!0||!i.children,"Cannot specify children on an index route"),Dt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),f$e(i)){let c=Yn({},i,t(i),{id:a});return r[a]=c,c}else{let c=Yn({},i,t(i),{id:a,children:void 0});return r[a]=c,i.children&&(c.children=c4(i.children,t,s,r)),c}})}function v0(e,t,n){return n===void 0&&(n="/"),P8(e,t,n,!1)}function P8(e,t,n,r){let i=typeof t=="string"?Cl(t):t,o=C5(i.pathname||"/",n);if(o==null)return null;let s=xae(e);p$e(s);let a=null;for(let c=0;a==null&&c{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Dt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=vh([r,c.relativePath]),l=n.concat(c);o.children&&o.children.length>0&&(Dt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),xae(o.children,t,l,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:w$e(u,o.index),routesMeta:l})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let c of wae(o.path))i(o,s,c)}),t}function wae(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=wae(r.join("/")),a=[];return a.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function p$e(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E$e(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const g$e=/^:[\w-]+$/,m$e=3,y$e=2,b$e=1,v$e=10,x$e=-2,sV=e=>e==="*";function w$e(e,t){let n=e.split("/"),r=n.length;return n.some(sV)&&(r+=x$e),t&&(r+=y$e),n.filter(i=>!sV(i)).reduce((i,o)=>i+(g$e.test(o)?m$e:o===""?b$e:v$e),r)}function E$e(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function C$e(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:h}=l;if(f==="*"){let m=a[d]||"";s=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return h&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function A$e(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function S$e(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jh(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function C5(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function k$e(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cl(e):e;return{pathname:n?n.startsWith("/")?n:T$e(n,t):t,search:R$e(r),hash:N$e(i)}}function T$e(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ok(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Eae(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _$e(e,t){let n=Eae(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function P$e(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cl(e):(i=Yn({},e),Dt(!i.pathname||!i.pathname.includes("?"),ok("?","pathname","search",i)),Dt(!i.pathname||!i.pathname.includes("#"),ok("#","pathname","hash",i)),Dt(!i.search||!i.search.includes("#"),ok("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let c=k$e(i,a),u=s&&s!=="/"&&s.endsWith("/"),l=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||l)&&(c.pathname+="/"),c}const vh=e=>e.join("/").replace(/\/\/+/g,"/"),I$e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R$e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,N$e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class x9{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function WE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Cae=["post","put","patch","delete"],O$e=new Set(Cae),L$e=["get",...Cae],B$e=new Set(L$e),M$e=new Set([301,302,303,307,308]),D$e=new Set([307,308]),sk={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},j$e={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ny={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F$e=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Aae="remix-router-transitions";function U$e(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Dt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let he=e.detectErrorBoundary;i=ye=>({hasErrorBoundary:he(ye)})}else i=F$e;let o={},s=c4(e.routes,i,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||W$e,l=e.unstable_patchRoutesOnNavigation,d=Yn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,h=new Set,p=1e3,m=new Set,x=null,y=null,b=null,v=e.hydrationData!=null,w=v0(s,e.history.location,c),E=null;if(w==null&&!l){let he=Ni(404,{pathname:e.history.location.pathname}),{matches:ye,route:Ae}=yV(s);w=ye,E={[Ae.id]:he}}w&&!e.hydrationData&&hp(w,s,e.history.location.pathname).active&&(w=null);let S;if(w)if(w.some(he=>he.route.lazy))S=!1;else if(!w.some(he=>he.route.loader))S=!0;else if(d.v7_partialHydration){let he=e.hydrationData?e.hydrationData.loaderData:null,ye=e.hydrationData?e.hydrationData.errors:null,Ae=je=>je.route.loader?typeof je.route.loader=="function"&&je.route.loader.hydrate===!0?!1:he&&he[je.route.id]!==void 0||ye&&ye[je.route.id]!==void 0:!0;if(ye){let je=w.findIndex(Ze=>ye[Ze.route.id]!==void 0);S=w.slice(0,je+1).every(Ae)}else S=w.every(Ae)}else S=e.hydrationData!=null;else if(S=!1,w=[],d.v7_partialHydration){let he=hp(null,s,e.history.location.pathname);he.active&&he.matches&&(w=he.matches)}let I,A={historyAction:e.history.action,location:e.history.location,matches:w,initialized:S,navigation:sk,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||E,fetchers:new Map,blockers:new Map},O=mr.Pop,N=!1,R,_=!1,M=new Map,z=null,F=!1,$=!1,W=[],G=new Set,H=new Map,L=0,q=-1,V=new Map,P=new Set,K=new Map,ce=new Map,X=new Set,ke=new Map,me=new Map,Re=new Map,Be=!1;function Le(){if(f=e.history.listen(he=>{let{action:ye,location:Ae,delta:je}=he;if(Be){Be=!1;return}jh(me.size===0||je!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ze=ox({currentLocation:A.location,nextLocation:Ae,historyAction:ye});if(Ze&&je!=null){Be=!0,e.history.go(je*-1),Ka(Ze,{state:"blocked",location:Ae,proceed(){Ka(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),e.history.go(je)},reset(){let rt=new Map(A.blockers);rt.set(Ze,ny),re({blockers:rt})}});return}return Ce(ye,Ae)}),n){iHe(t,M);let he=()=>oHe(t,M);t.addEventListener("pagehide",he),z=()=>t.removeEventListener("pagehide",he)}return A.initialized||Ce(mr.Pop,A.location,{initialHydration:!0}),I}function Ne(){f&&f(),z&&z(),h.clear(),R&&R.abort(),A.fetchers.forEach((he,ye)=>Te(ye)),A.blockers.forEach((he,ye)=>N2(ye))}function Me(he){return h.add(he),()=>h.delete(he)}function re(he,ye){ye===void 0&&(ye={}),A=Yn({},A,he);let Ae=[],je=[];d.v7_fetcherPersist&&A.fetchers.forEach((Ze,rt)=>{Ze.state==="idle"&&(X.has(rt)?je.push(rt):Ae.push(rt))}),[...h].forEach(Ze=>Ze(A,{deletedFetchers:je,unstable_viewTransitionOpts:ye.viewTransitionOpts,unstable_flushSync:ye.flushSync===!0})),d.v7_fetcherPersist&&(Ae.forEach(Ze=>A.fetchers.delete(Ze)),je.forEach(Ze=>Te(Ze)))}function Q(he,ye,Ae){var je,Ze;let{flushSync:rt}=Ae===void 0?{}:Ae,st=A.actionData!=null&&A.navigation.formMethod!=null&&Ca(A.navigation.formMethod)&&A.navigation.state==="loading"&&((je=he.state)==null?void 0:je._isRedirect)!==!0,Ke;ye.actionData?Object.keys(ye.actionData).length>0?Ke=ye.actionData:Ke=null:st?Ke=A.actionData:Ke=null;let wt=ye.loaderData?gV(A.loaderData,ye.loaderData,ye.matches||[],ye.errors):A.loaderData,ct=A.blockers;ct.size>0&&(ct=new Map(ct),ct.forEach((Zt,Jt)=>ct.set(Jt,ny)));let Ct=N===!0||A.navigation.formMethod!=null&&Ca(A.navigation.formMethod)&&((Ze=he.state)==null?void 0:Ze._isRedirect)!==!0;a&&(s=a,a=void 0),F||O===mr.Pop||(O===mr.Push?e.history.push(he,he.state):O===mr.Replace&&e.history.replace(he,he.state));let un;if(O===mr.Pop){let Zt=M.get(A.location.pathname);Zt&&Zt.has(he.pathname)?un={currentLocation:A.location,nextLocation:he}:M.has(he.pathname)&&(un={currentLocation:he,nextLocation:A.location})}else if(_){let Zt=M.get(A.location.pathname);Zt?Zt.add(he.pathname):(Zt=new Set([he.pathname]),M.set(A.location.pathname,Zt)),un={currentLocation:A.location,nextLocation:he}}re(Yn({},ye,{actionData:Ke,loaderData:wt,historyAction:O,location:he,initialized:!0,navigation:sk,revalidation:"idle",restoreScrollPosition:is(he,ye.matches||A.matches),preventScrollReset:Ct,blockers:ct}),{viewTransitionOpts:un,flushSync:rt===!0}),O=mr.Pop,N=!1,_=!1,F=!1,$=!1,W=[]}async function se(he,ye){if(typeof he=="number"){e.history.go(he);return}let Ae=jI(A.location,A.matches,c,d.v7_prependBasename,he,d.v7_relativeSplatPath,ye==null?void 0:ye.fromRouteId,ye==null?void 0:ye.relative),{path:je,submission:Ze,error:rt}=cV(d.v7_normalizeFormMethod,!1,Ae,ye),st=A.location,Ke=a4(A.location,je,ye&&ye.state);Ke=Yn({},Ke,e.history.encodeLocation(Ke));let wt=ye&&ye.replace!=null?ye.replace:void 0,ct=mr.Push;wt===!0?ct=mr.Replace:wt===!1||Ze!=null&&Ca(Ze.formMethod)&&Ze.formAction===A.location.pathname+A.location.search&&(ct=mr.Replace);let Ct=ye&&"preventScrollReset"in ye?ye.preventScrollReset===!0:void 0,un=(ye&&ye.unstable_flushSync)===!0,Zt=ox({currentLocation:st,nextLocation:Ke,historyAction:ct});if(Zt){Ka(Zt,{state:"blocked",location:Ke,proceed(){Ka(Zt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ke}),se(he,ye)},reset(){let Jt=new Map(A.blockers);Jt.set(Zt,ny),re({blockers:Jt})}});return}return await Ce(ct,Ke,{submission:Ze,pendingError:rt,preventScrollReset:Ct,replace:ye&&ye.replace,enableViewTransition:ye&&ye.unstable_viewTransition,flushSync:un})}function oe(){if(B(),re({revalidation:"loading"}),A.navigation.state!=="submitting"){if(A.navigation.state==="idle"){Ce(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}Ce(O||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation})}}async function Ce(he,ye,Ae){R&&R.abort(),R=null,O=he,F=(Ae&&Ae.startUninterruptedRevalidation)===!0,qC(A.location,A.matches),N=(Ae&&Ae.preventScrollReset)===!0,_=(Ae&&Ae.enableViewTransition)===!0;let je=a||s,Ze=Ae&&Ae.overrideNavigation,rt=v0(je,ye,c),st=(Ae&&Ae.flushSync)===!0,Ke=hp(rt,je,ye.pathname);if(Ke.active&&Ke.matches&&(rt=Ke.matches),!rt){let{error:Gt,notFoundMatches:rr,route:jn}=Xs(ye.pathname);Q(ye,{matches:rr,loaderData:{},errors:{[jn.id]:Gt}},{flushSync:st});return}if(A.initialized&&!$&&Z$e(A.location,ye)&&!(Ae&&Ae.submission&&Ca(Ae.submission.formMethod))){Q(ye,{matches:rt},{flushSync:st});return}R=new AbortController;let wt=Ap(e.history,ye,R.signal,Ae&&Ae.submission),ct;if(Ae&&Ae.pendingError)ct=[E1(rt).route.id,{type:mn.error,error:Ae.pendingError}];else if(Ae&&Ae.submission&&Ca(Ae.submission.formMethod)){let Gt=await Fe(wt,ye,Ae.submission,rt,Ke.active,{replace:Ae.replace,flushSync:st});if(Gt.shortCircuited)return;if(Gt.pendingActionResult){let[rr,jn]=Gt.pendingActionResult;if(Do(jn)&&WE(jn.error)&&jn.error.status===404){R=null,Q(ye,{matches:Gt.matches,loaderData:{},errors:{[rr]:jn.error}});return}}rt=Gt.matches||rt,ct=Gt.pendingActionResult,Ze=ak(ye,Ae.submission),st=!1,Ke.active=!1,wt=Ap(e.history,wt.url,wt.signal)}let{shortCircuited:Ct,matches:un,loaderData:Zt,errors:Jt}=await qe(wt,ye,rt,Ke.active,Ze,Ae&&Ae.submission,Ae&&Ae.fetcherSubmission,Ae&&Ae.replace,Ae&&Ae.initialHydration===!0,st,ct);Ct||(R=null,Q(ye,Yn({matches:un||rt},mV(ct),{loaderData:Zt,errors:Jt})))}async function Fe(he,ye,Ae,je,Ze,rt){rt===void 0&&(rt={}),B();let st=nHe(ye,Ae);if(re({navigation:st},{flushSync:rt.flushSync===!0}),Ze){let ct=await pp(je,ye.pathname,he.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){let{boundaryId:Ct,error:un}=fp(ye.pathname,ct);return{matches:ct.partialMatches,pendingActionResult:[Ct,{type:mn.error,error:un}]}}else if(ct.matches)je=ct.matches;else{let{notFoundMatches:Ct,error:un,route:Zt}=Xs(ye.pathname);return{matches:Ct,pendingActionResult:[Zt.id,{type:mn.error,error:un}]}}}let Ke,wt=Lb(je,ye);if(!wt.route.action&&!wt.route.lazy)Ke={type:mn.error,error:Ni(405,{method:he.method,pathname:ye.pathname,routeId:wt.route.id})};else if(Ke=(await U("action",he,[wt],je))[0],he.signal.aborted)return{shortCircuited:!0};if(B0(Ke)){let ct;return rt&&rt.replace!=null?ct=rt.replace:ct=fV(Ke.response.headers.get("Location"),new URL(he.url),c)===A.location.pathname+A.location.search,await fe(he,Ke,{submission:Ae,replace:ct}),{shortCircuited:!0}}if(L0(Ke))throw Ni(400,{type:"defer-action"});if(Do(Ke)){let ct=E1(je,wt.route.id);return(rt&&rt.replace)!==!0&&(O=mr.Push),{matches:je,pendingActionResult:[ct.route.id,Ke]}}return{matches:je,pendingActionResult:[wt.route.id,Ke]}}async function qe(he,ye,Ae,je,Ze,rt,st,Ke,wt,ct,Ct){let un=Ze||ak(ye,rt),Zt=rt||st||wV(un),Jt=!F&&(!d.v7_partialHydration||!wt);if(je){if(Jt){let Fn=Ge(Ct);re(Yn({navigation:un},Fn!==void 0?{actionData:Fn}:{}),{flushSync:ct})}let At=await pp(Ae,ye.pathname,he.signal);if(At.type==="aborted")return{shortCircuited:!0};if(At.type==="error"){let{boundaryId:Fn,error:ki}=fp(ye.pathname,At);return{matches:At.partialMatches,loaderData:{},errors:{[Fn]:ki}}}else if(At.matches)Ae=At.matches;else{let{error:Fn,notFoundMatches:ki,route:An}=Xs(ye.pathname);return{matches:ki,loaderData:{},errors:{[An.id]:Fn}}}}let Gt=a||s,[rr,jn]=uV(e.history,A,Ae,Zt,ye,d.v7_partialHydration&&wt===!0,d.v7_skipActionErrorRevalidation,$,W,G,X,K,P,Gt,c,Ct);if(O2(At=>!(Ae&&Ae.some(Fn=>Fn.route.id===At))||rr&&rr.some(Fn=>Fn.route.id===At)),q=++L,rr.length===0&&jn.length===0){let At=Tt();return Q(ye,Yn({matches:Ae,loaderData:{},errors:Ct&&Do(Ct[1])?{[Ct[0]]:Ct[1].error}:null},mV(Ct),At?{fetchers:new Map(A.fetchers)}:{}),{flushSync:ct}),{shortCircuited:!0}}if(Jt){let At={};if(!je){At.navigation=un;let Fn=Ge(Ct);Fn!==void 0&&(At.actionData=Fn)}jn.length>0&&(At.fetchers=Ie(jn)),re(At,{flushSync:ct})}jn.forEach(At=>{H.has(At.key)&&vt(At.key),At.controller&&H.set(At.key,At.controller)});let Of=()=>jn.forEach(At=>vt(At.key));R&&R.signal.addEventListener("abort",Of);let{loaderResults:bo,fetcherResults:Yc}=await T(A.matches,Ae,rr,jn,he);if(he.signal.aborted)return{shortCircuited:!0};R&&R.signal.removeEventListener("abort",Of),jn.forEach(At=>H.delete(At.key));let Pl=bV([...bo,...Yc]);if(Pl){if(Pl.idx>=rr.length){let At=jn[Pl.idx-rr.length].key;P.add(At)}return await fe(he,Pl.result,{replace:Ke}),{shortCircuited:!0}}let{loaderData:Il,errors:os}=pV(A,Ae,rr,bo,Ct,jn,Yc,ke);ke.forEach((At,Fn)=>{At.subscribe(ki=>{(ki||At.done)&&ke.delete(Fn)})}),d.v7_partialHydration&&wt&&A.errors&&Object.entries(A.errors).filter(At=>{let[Fn]=At;return!rr.some(ki=>ki.route.id===Fn)}).forEach(At=>{let[Fn,ki]=At;os=Object.assign(os||{},{[Fn]:ki})});let Lf=Tt(),gp=Et(q),mp=Lf||gp||jn.length>0;return Yn({matches:Ae,loaderData:Il,errors:os},mp?{fetchers:new Map(A.fetchers)}:{})}function Ge(he){if(he&&!Do(he[1]))return{[he[0]]:he[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Ie(he){return he.forEach(ye=>{let Ae=A.fetchers.get(ye.key),je=ry(void 0,Ae?Ae.data:void 0);A.fetchers.set(ye.key,je)}),new Map(A.fetchers)}function ie(he,ye,Ae,je){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(he)&&vt(he);let Ze=(je&&je.unstable_flushSync)===!0,rt=a||s,st=jI(A.location,A.matches,c,d.v7_prependBasename,Ae,d.v7_relativeSplatPath,ye,je==null?void 0:je.relative),Ke=v0(rt,st,c),wt=hp(Ke,rt,st);if(wt.active&&wt.matches&&(Ke=wt.matches),!Ke){ue(he,ye,Ni(404,{pathname:st}),{flushSync:Ze});return}let{path:ct,submission:Ct,error:un}=cV(d.v7_normalizeFormMethod,!0,st,je);if(un){ue(he,ye,un,{flushSync:Ze});return}let Zt=Lb(Ke,ct);if(N=(je&&je.preventScrollReset)===!0,Ct&&Ca(Ct.formMethod)){te(he,ye,ct,Zt,Ke,wt.active,Ze,Ct);return}K.set(he,{routeId:ye,path:ct}),ve(he,ye,ct,Zt,Ke,wt.active,Ze,Ct)}async function te(he,ye,Ae,je,Ze,rt,st,Ke){B(),K.delete(he);function wt(An){if(!An.route.action&&!An.route.lazy){let ea=Ni(405,{method:Ke.formMethod,pathname:Ae,routeId:ye});return ue(he,ye,ea,{flushSync:st}),!0}return!1}if(!rt&&wt(je))return;let ct=A.fetchers.get(he);Y(he,rHe(Ke,ct),{flushSync:st});let Ct=new AbortController,un=Ap(e.history,Ae,Ct.signal,Ke);if(rt){let An=await pp(Ze,Ae,un.signal);if(An.type==="aborted")return;if(An.type==="error"){let{error:ea}=fp(Ae,An);ue(he,ye,ea,{flushSync:st});return}else if(An.matches){if(Ze=An.matches,je=Lb(Ze,Ae),wt(je))return}else{ue(he,ye,Ni(404,{pathname:Ae}),{flushSync:st});return}}H.set(he,Ct);let Zt=L,Gt=(await U("action",un,[je],Ze))[0];if(un.signal.aborted){H.get(he)===Ct&&H.delete(he);return}if(d.v7_fetcherPersist&&X.has(he)){if(B0(Gt)||Do(Gt)){Y(he,Jl(void 0));return}}else{if(B0(Gt))if(H.delete(he),q>Zt){Y(he,Jl(void 0));return}else return P.add(he),Y(he,ry(Ke)),fe(un,Gt,{fetcherSubmission:Ke});if(Do(Gt)){ue(he,ye,Gt.error);return}}if(L0(Gt))throw Ni(400,{type:"defer-action"});let rr=A.navigation.location||A.location,jn=Ap(e.history,rr,Ct.signal),Of=a||s,bo=A.navigation.state!=="idle"?v0(Of,A.navigation.location,c):A.matches;Dt(bo,"Didn't find any matches after fetcher action");let Yc=++L;V.set(he,Yc);let Pl=ry(Ke,Gt.data);A.fetchers.set(he,Pl);let[Il,os]=uV(e.history,A,bo,Ke,rr,!1,d.v7_skipActionErrorRevalidation,$,W,G,X,K,P,Of,c,[je.route.id,Gt]);os.filter(An=>An.key!==he).forEach(An=>{let ea=An.key,cx=A.fetchers.get(ea),XC=ry(void 0,cx?cx.data:void 0);A.fetchers.set(ea,XC),H.has(ea)&&vt(ea),An.controller&&H.set(ea,An.controller)}),re({fetchers:new Map(A.fetchers)});let Lf=()=>os.forEach(An=>vt(An.key));Ct.signal.addEventListener("abort",Lf);let{loaderResults:gp,fetcherResults:mp}=await T(A.matches,bo,Il,os,jn);if(Ct.signal.aborted)return;Ct.signal.removeEventListener("abort",Lf),V.delete(he),H.delete(he),os.forEach(An=>H.delete(An.key));let At=bV([...gp,...mp]);if(At){if(At.idx>=Il.length){let An=os[At.idx-Il.length].key;P.add(An)}return fe(jn,At.result)}let{loaderData:Fn,errors:ki}=pV(A,A.matches,Il,gp,void 0,os,mp,ke);if(A.fetchers.has(he)){let An=Jl(Gt.data);A.fetchers.set(he,An)}Et(Yc),A.navigation.state==="loading"&&Yc>q?(Dt(O,"Expected pending action"),R&&R.abort(),Q(A.navigation.location,{matches:bo,loaderData:Fn,errors:ki,fetchers:new Map(A.fetchers)})):(re({errors:ki,loaderData:gV(A.loaderData,Fn,bo,ki),fetchers:new Map(A.fetchers)}),$=!1)}async function ve(he,ye,Ae,je,Ze,rt,st,Ke){let wt=A.fetchers.get(he);Y(he,ry(Ke,wt?wt.data:void 0),{flushSync:st});let ct=new AbortController,Ct=Ap(e.history,Ae,ct.signal);if(rt){let Gt=await pp(Ze,Ae,Ct.signal);if(Gt.type==="aborted")return;if(Gt.type==="error"){let{error:rr}=fp(Ae,Gt);ue(he,ye,rr,{flushSync:st});return}else if(Gt.matches)Ze=Gt.matches,je=Lb(Ze,Ae);else{ue(he,ye,Ni(404,{pathname:Ae}),{flushSync:st});return}}H.set(he,ct);let un=L,Jt=(await U("loader",Ct,[je],Ze))[0];if(L0(Jt)&&(Jt=await Pae(Jt,Ct.signal,!0)||Jt),H.get(he)===ct&&H.delete(he),!Ct.signal.aborted){if(X.has(he)){Y(he,Jl(void 0));return}if(B0(Jt))if(q>un){Y(he,Jl(void 0));return}else{P.add(he),await fe(Ct,Jt);return}if(Do(Jt)){ue(he,ye,Jt.error);return}Dt(!L0(Jt),"Unhandled fetcher deferred data"),Y(he,Jl(Jt.data))}}async function fe(he,ye,Ae){let{submission:je,fetcherSubmission:Ze,replace:rt}=Ae===void 0?{}:Ae;ye.response.headers.has("X-Remix-Revalidate")&&($=!0);let st=ye.response.headers.get("Location");Dt(st,"Expected a Location header on the redirect Response"),st=fV(st,new URL(he.url),c);let Ke=a4(A.location,st,{_isRedirect:!0});if(n){let Jt=!1;if(ye.response.headers.has("X-Remix-Reload-Document"))Jt=!0;else if(jB.test(st)){const Gt=e.history.createURL(st);Jt=Gt.origin!==t.location.origin||C5(Gt.pathname,c)==null}if(Jt){rt?t.location.replace(st):t.location.assign(st);return}}R=null;let wt=rt===!0||ye.response.headers.has("X-Remix-Replace")?mr.Replace:mr.Push,{formMethod:ct,formAction:Ct,formEncType:un}=A.navigation;!je&&!Ze&&ct&&Ct&&un&&(je=wV(A.navigation));let Zt=je||Ze;if(D$e.has(ye.response.status)&&Zt&&Ca(Zt.formMethod))await Ce(wt,Ke,{submission:Yn({},Zt,{formAction:st}),preventScrollReset:N});else{let Jt=ak(Ke,je);await Ce(wt,Ke,{overrideNavigation:Jt,fetcherSubmission:Ze,preventScrollReset:N})}}async function U(he,ye,Ae,je){try{let Ze=await G$e(u,he,ye,Ae,je,o,i);return await Promise.all(Ze.map((rt,st)=>{if(X$e(rt)){let Ke=rt.result;return{type:mn.redirect,response:Y$e(Ke,ye,Ae[st].route.id,je,c,d.v7_relativeSplatPath)}}return Q$e(rt)}))}catch(Ze){return Ae.map(()=>({type:mn.error,error:Ze}))}}async function T(he,ye,Ae,je,Ze){let[rt,...st]=await Promise.all([Ae.length?U("loader",Ze,Ae,ye):[],...je.map(Ke=>{if(Ke.matches&&Ke.match&&Ke.controller){let wt=Ap(e.history,Ke.path,Ke.controller.signal);return U("loader",wt,[Ke.match],Ke.matches).then(ct=>ct[0])}else return Promise.resolve({type:mn.error,error:Ni(404,{pathname:Ke.path})})})]);return await Promise.all([xV(he,Ae,rt,rt.map(()=>Ze.signal),!1,A.loaderData),xV(he,je.map(Ke=>Ke.match),st,je.map(Ke=>Ke.controller?Ke.controller.signal:null),!0)]),{loaderResults:rt,fetcherResults:st}}function B(){$=!0,W.push(...O2()),K.forEach((he,ye)=>{H.has(ye)&&(G.add(ye),vt(ye))})}function Y(he,ye,Ae){Ae===void 0&&(Ae={}),A.fetchers.set(he,ye),re({fetchers:new Map(A.fetchers)},{flushSync:(Ae&&Ae.flushSync)===!0})}function ue(he,ye,Ae,je){je===void 0&&(je={});let Ze=E1(A.matches,ye);Te(he),re({errors:{[Ze.route.id]:Ae},fetchers:new Map(A.fetchers)},{flushSync:(je&&je.flushSync)===!0})}function xe(he){return d.v7_fetcherPersist&&(ce.set(he,(ce.get(he)||0)+1),X.has(he)&&X.delete(he)),A.fetchers.get(he)||j$e}function Te(he){let ye=A.fetchers.get(he);H.has(he)&&!(ye&&ye.state==="loading"&&V.has(he))&&vt(he),K.delete(he),V.delete(he),P.delete(he),X.delete(he),G.delete(he),A.fetchers.delete(he)}function dt(he){if(d.v7_fetcherPersist){let ye=(ce.get(he)||0)-1;ye<=0?(ce.delete(he),X.add(he)):ce.set(he,ye)}else Te(he);re({fetchers:new Map(A.fetchers)})}function vt(he){let ye=H.get(he);Dt(ye,"Expected fetch controller: "+he),ye.abort(),H.delete(he)}function mt(he){for(let ye of he){let Ae=xe(ye),je=Jl(Ae.data);A.fetchers.set(ye,je)}}function Tt(){let he=[],ye=!1;for(let Ae of P){let je=A.fetchers.get(Ae);Dt(je,"Expected fetcher: "+Ae),je.state==="loading"&&(P.delete(Ae),he.push(Ae),ye=!0)}return mt(he),ye}function Et(he){let ye=[];for(let[Ae,je]of V)if(je0}function QC(he,ye){let Ae=A.blockers.get(he)||ny;return me.get(he)!==ye&&me.set(he,ye),Ae}function N2(he){A.blockers.delete(he),me.delete(he)}function Ka(he,ye){let Ae=A.blockers.get(he)||ny;Dt(Ae.state==="unblocked"&&ye.state==="blocked"||Ae.state==="blocked"&&ye.state==="blocked"||Ae.state==="blocked"&&ye.state==="proceeding"||Ae.state==="blocked"&&ye.state==="unblocked"||Ae.state==="proceeding"&&ye.state==="unblocked","Invalid blocker state transition: "+Ae.state+" -> "+ye.state);let je=new Map(A.blockers);je.set(he,ye),re({blockers:je})}function ox(he){let{currentLocation:ye,nextLocation:Ae,historyAction:je}=he;if(me.size===0)return;me.size>1&&jh(!1,"A router only supports one blocker at a time");let Ze=Array.from(me.entries()),[rt,st]=Ze[Ze.length-1],Ke=A.blockers.get(rt);if(!(Ke&&Ke.state==="proceeding")&&st({currentLocation:ye,nextLocation:Ae,historyAction:je}))return rt}function Xs(he){let ye=Ni(404,{pathname:he}),Ae=a||s,{matches:je,route:Ze}=yV(Ae);return O2(),{notFoundMatches:je,route:Ze,error:ye}}function fp(he,ye){return{boundaryId:E1(ye.partialMatches).route.id,error:Ni(400,{type:"route-discovery",pathname:he,message:ye.error!=null&&"message"in ye.error?ye.error:String(ye.error)})}}function O2(he){let ye=[];return ke.forEach((Ae,je)=>{(!he||he(je))&&(Ae.cancel(),ye.push(je),ke.delete(je))}),ye}function YC(he,ye,Ae){if(x=he,b=ye,y=Ae||null,!v&&A.navigation===sk){v=!0;let je=is(A.location,A.matches);je!=null&&re({restoreScrollPosition:je})}return()=>{x=null,b=null,y=null}}function sx(he,ye){return y&&y(he,ye.map(je=>h$e(je,A.loaderData)))||he.key}function qC(he,ye){if(x&&b){let Ae=sx(he,ye);x[Ae]=b()}}function is(he,ye){if(x){let Ae=sx(he,ye),je=x[Ae];if(typeof je=="number")return je}return null}function hp(he,ye,Ae){if(l){if(m.has(Ae))return{active:!1,matches:he};if(he){if(Object.keys(he[0].params).length>0)return{active:!0,matches:P8(ye,Ae,c,!0)}}else return{active:!0,matches:P8(ye,Ae,c,!0)||[]}}return{active:!1,matches:null}}async function pp(he,ye,Ae){let je=he;for(;;){let Ze=a==null,rt=a||s;try{await V$e(l,ye,je,rt,o,i,Re,Ae)}catch(wt){return{type:"error",error:wt,partialMatches:je}}finally{Ze&&(s=[...s])}if(Ae.aborted)return{type:"aborted"};let st=v0(rt,ye,c);if(st)return ax(ye,m),{type:"success",matches:st};let Ke=P8(rt,ye,c,!0);if(!Ke||je.length===Ke.length&&je.every((wt,ct)=>wt.route.id===Ke[ct].route.id))return ax(ye,m),{type:"success",matches:null};je=Ke}}function ax(he,ye){if(ye.size>=p){let Ae=ye.values().next().value;ye.delete(Ae)}ye.add(he)}function ZC(he){o={},a=c4(he,i,void 0,o)}function JC(he,ye){let Ae=a==null;kae(he,ye,a||s,o,i),Ae&&(s=[...s],re({}))}return I={get basename(){return c},get future(){return d},get state(){return A},get routes(){return s},get window(){return t},initialize:Le,subscribe:Me,enableScrollRestoration:YC,navigate:se,fetch:ie,revalidate:oe,createHref:he=>e.history.createHref(he),encodeLocation:he=>e.history.encodeLocation(he),getFetcher:xe,deleteFetcher:dt,dispose:Ne,getBlocker:QC,deleteBlocker:N2,patchRoutes:JC,_internalFetchControllers:H,_internalActiveDeferreds:ke,_internalSetRoutes:ZC},I}function z$e(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function jI(e,t,n,r,i,o,s,a){let c,u;if(s){c=[];for(let d of t)if(c.push(d),d.route.id===s){u=d;break}}else c=t,u=t[t.length-1];let l=P$e(i||".",_$e(c,o),C5(e.pathname,n)||e.pathname,a==="path");return i==null&&(l.search=e.search,l.hash=e.hash),(i==null||i===""||i===".")&&u&&u.route.index&&!FB(l.search)&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(l.pathname=l.pathname==="/"?n:vh([n,l.pathname])),E5(l)}function cV(e,t,n,r){if(!r||!z$e(r))return{path:n};if(r.formMethod&&!tHe(r.formMethod))return{path:n,error:Ni(405,{method:r.formMethod})};let i=()=>({path:n,error:Ni(400,{type:"invalid-body"})}),o=r.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=Tae(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ca(s))return i();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,p)=>{let[m,x]=p;return""+h+m+"="+x+` +`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Ca(s))return i();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return i()}}}Dt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=FI(r.formData),u=r.formData;else if(r.body instanceof FormData)c=FI(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=hV(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=hV(c)}catch{return i()}let l={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Ca(l.formMethod))return{path:n,submission:l};let d=Cl(n);return t&&d.search&&FB(d.search)&&c.append("index",""),d.search="?"+c,{path:E5(d),submission:l}}function $$e(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function uV(e,t,n,r,i,o,s,a,c,u,l,d,f,h,p,m){let x=m?Do(m[1])?m[1].error:m[1].data:void 0,y=e.createURL(t.location),b=e.createURL(i),v=m&&Do(m[1])?m[0]:void 0,w=v?$$e(n,v):n,E=m?m[1].statusCode:void 0,S=s&&E&&E>=400,I=w.filter((O,N)=>{let{route:R}=O;if(R.lazy)return!0;if(R.loader==null)return!1;if(o)return typeof R.loader!="function"||R.loader.hydrate?!0:t.loaderData[R.id]===void 0&&(!t.errors||t.errors[R.id]===void 0);if(H$e(t.loaderData,t.matches[N],O)||c.some(z=>z===O.route.id))return!0;let _=t.matches[N],M=O;return lV(O,Yn({currentUrl:y,currentParams:_.params,nextUrl:b,nextParams:M.params},r,{actionResult:x,actionStatus:E,defaultShouldRevalidate:S?!1:a||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||Sae(_,M)}))}),A=[];return d.forEach((O,N)=>{if(o||!n.some(F=>F.route.id===O.routeId)||l.has(N))return;let R=v0(h,O.path,p);if(!R){A.push({key:N,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let _=t.fetchers.get(N),M=Lb(R,O.path),z=!1;f.has(N)?z=!1:u.has(N)?(u.delete(N),z=!0):_&&_.state!=="idle"&&_.data===void 0?z=a:z=lV(M,Yn({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:x,actionStatus:E,defaultShouldRevalidate:S?!1:a})),z&&A.push({key:N,routeId:O.routeId,path:O.path,matches:R,match:M,controller:new AbortController})}),[I,A]}function H$e(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Sae(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function lV(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function V$e(e,t,n,r,i,o,s,a){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=s.get(c);u||(u=e({path:t,matches:n,patch:(l,d)=>{a.aborted||kae(l,d,r,i,o)}}),s.set(c,u)),u&&J$e(u)&&await u}finally{s.delete(c)}}function kae(e,t,n,r,i){if(e){var o;let s=r[e];Dt(s,"No route found to patch children into: routeId = "+e);let a=c4(t,i,[e,"patch",String(((o=s.children)==null?void 0:o.length)||"0")],r);s.children?s.children.push(...a):s.children=a}else{let s=c4(t,i,["patch",String(n.length||"0")],r);n.push(...s)}}async function dV(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Dt(i,"No route found in manifest");let o={};for(let s in r){let c=i[s]!==void 0&&s!=="hasErrorBoundary";jh(!c,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!c&&!d$e.has(s)&&(o[s]=r[s])}Object.assign(i,o),Object.assign(i,Yn({},t(i),{lazy:void 0}))}function W$e(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function G$e(e,t,n,r,i,o,s,a){let c=r.reduce((d,f)=>d.add(f.route.id),new Set),u=new Set,l=await e({matches:i.map(d=>{let f=c.has(d.route.id);return Yn({},d,{shouldLoad:f,resolve:p=>(u.add(d.route.id),f?K$e(t,n,d,o,s,p,a):Promise.resolve({type:mn.data,result:void 0}))})}),request:n,params:i[0].params,context:a});return i.forEach(d=>Dt(u.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),l.filter((d,f)=>c.has(i[f].route.id))}async function K$e(e,t,n,r,i,o,s){let a,c,u=l=>{let d,f=new Promise((m,x)=>d=x);c=()=>d(),t.signal.addEventListener("abort",c);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:s},...m!==void 0?[m]:[]),p;return o?p=o(m=>h(m)):p=(async()=>{try{return{type:"data",result:await h()}}catch(m){return{type:"error",result:m}}})(),Promise.race([p,f])};try{let l=n.route[e];if(n.route.lazy)if(l){let d,[f]=await Promise.all([u(l).catch(h=>{d=h}),dV(n.route,i,r)]);if(d!==void 0)throw d;a=f}else if(await dV(n.route,i,r),l=n.route[e],l)a=await u(l);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ni(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:mn.data,result:void 0};else if(l)a=await u(l);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ni(404,{pathname:f})}Dt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:mn.error,result:l}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function Q$e(e){let{result:t,type:n}=e;if(_ae(t)){let u;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(l){return{type:mn.error,error:l}}return n===mn.error?{type:mn.error,error:new x9(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:mn.data,data:u,statusCode:t.status,headers:t.headers}}if(n===mn.error){if(vV(t)){var r;if(t.data instanceof Error){var i;return{type:mn.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new x9(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:mn.error,error:t,statusCode:WE(t)?t.status:void 0}}if(eHe(t)){var o,s;return{type:mn.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}if(vV(t)){var a,c;return{type:mn.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(c=t.init)!=null&&c.headers?new Headers(t.init.headers):void 0}}return{type:mn.data,data:t}}function Y$e(e,t,n,r,i,o){let s=e.headers.get("Location");if(Dt(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!jB.test(s)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);s=jI(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function fV(e,t,n){if(jB.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=C5(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Ap(e,t,n,r){let i=e.createURL(Tae(t)).toString(),o={signal:n};if(r&&Ca(r.formMethod)){let{formMethod:s,formEncType:a}=r;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=FI(r.formData):o.body=r.formData}return new Request(i,o)}function FI(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function hV(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function q$e(e,t,n,r,i,o){let s={},a=null,c,u=!1,l={},d=r&&Do(r[1])?r[1].error:void 0;return n.forEach((f,h)=>{let p=t[h].route.id;if(Dt(!B0(f),"Cannot handle redirect results in processLoaderData"),Do(f)){let m=f.error;d!==void 0&&(m=d,d=void 0),a=a||{};{let x=E1(e,p);a[x.route.id]==null&&(a[x.route.id]=m)}s[p]=void 0,u||(u=!0,c=WE(f.error)?f.error.status:500),f.headers&&(l[p]=f.headers)}else L0(f)?(i.set(p,f.deferredData),s[p]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!u&&(c=f.statusCode),f.headers&&(l[p]=f.headers)):(s[p]=f.data,f.statusCode&&f.statusCode!==200&&!u&&(c=f.statusCode),f.headers&&(l[p]=f.headers))}),d!==void 0&&r&&(a={[r[0]]:d},s[r[0]]=void 0),{loaderData:s,errors:a,statusCode:c||200,loaderHeaders:l}}function pV(e,t,n,r,i,o,s,a){let{loaderData:c,errors:u}=q$e(t,n,r,i,a);for(let l=0;lr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function yV(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ni(e,t){let{pathname:n,routeId:r,method:i,type:o,message:s}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error: +`+s):i&&n&&r?c="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",i&&n&&r?c="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new x9(e||500,a,new Error(c),!0)}function bV(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(B0(n))return{result:n,idx:t}}}function Tae(e){let t=typeof e=="string"?Cl(e):e;return E5(Yn({},t,{hash:""}))}function Z$e(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function J$e(e){return typeof e=="object"&&e!=null&&"then"in e}function X$e(e){return _ae(e.result)&&M$e.has(e.result.status)}function L0(e){return e.type===mn.deferred}function Do(e){return e.type===mn.error}function B0(e){return(e&&e.type)===mn.redirect}function vV(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function eHe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function _ae(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function tHe(e){return B$e.has(e.toLowerCase())}function Ca(e){return O$e.has(e.toLowerCase())}async function xV(e,t,n,r,i,o){for(let s=0;sd.route.id===c.route.id),l=u!=null&&!Sae(u,c)&&(o&&o[c.route.id])!==void 0;if(L0(a)&&(i||l)){let d=r[s];Dt(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Pae(a,d,i).then(f=>{f&&(n[s]=f||n[s])})}}}async function Pae(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:mn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:mn.error,error:i}}return{type:mn.data,data:e.deferredData.data}}}function FB(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Lb(e,t){let n=typeof t=="string"?Cl(t).search:t.search;if(e[e.length-1].route.index&&FB(n||""))return e[e.length-1];let r=Eae(e);return r[r.length-1]}function wV(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function ak(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nHe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ry(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function rHe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Jl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function iHe(e,t){try{let n=e.sessionStorage.getItem(Aae);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function oHe(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Aae,JSON.stringify(n))}catch(r){jh(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.26.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function UI(){return UI=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},m,{params:Object.assign({},a,m.params),pathname:vh([c,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:vh([c,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n,r)}function cHe(){let e=mHe(),t=WE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:i},n):null,null)}const uHe=j.createElement(cHe,null);class lHe extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?j.createElement(GE.Provider,{value:this.props.routeContext},j.createElement(Oae.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dHe(e){let{routeContext:t,match:n,children:r}=e,i=j.useContext(Iae);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),j.createElement(GE.Provider,{value:t},r)}function fHe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let l=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);l>=0||Dt(!1),s=s.slice(0,Math.min(s.length,l+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let l=0;l=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((l,d,f)=>{let h,p=!1,m=null,x=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||uHe,c&&(u<0&&f===0?(yHe("route-fallback"),p=!0,x=null):u===f&&(p=!0,x=d.route.hydrateFallbackElement||null)));let y=t.concat(s.slice(0,f+1)),b=()=>{let v;return h?v=m:p?v=x:d.route.Component?v=j.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=l,j.createElement(dHe,{match:d,routeContext:{outlet:l,matches:y,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?j.createElement(lHe,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var zI=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zI||{});function hHe(e){let t=j.useContext(Rae);return t||Dt(!1),t}function pHe(e){let t=j.useContext(GE);return t||Dt(!1),t}function gHe(e){let t=pHe(),n=t.matches[t.matches.length-1];return n.route.id||Dt(!1),n.route.id}function mHe(){var e;let t=j.useContext(Oae),n=hHe(zI.UseRouteError),r=gHe(zI.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const EV={};function yHe(e,t,n){EV[e]||(EV[e]=!0)}function bHe(e){let{basename:t="/",children:n=null,location:r,navigationType:i=mr.Pop,navigator:o,static:s=!1,future:a}=e;zB()&&Dt(!1);let c=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:c,navigator:o,static:s,future:UI({v7_relativeSplatPath:!1},a)}),[c,a,o,s]);typeof r=="string"&&(r=Cl(r));let{pathname:l="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,m=j.useMemo(()=>{let x=C5(l,c);return x==null?null:{location:{pathname:x,search:d,hash:f,state:h,key:p},navigationType:i}},[c,l,d,f,h,p,i]);return m==null?null:j.createElement(Nae.Provider,{value:u},j.createElement(UB.Provider,{children:n,value:m}))}new Promise(()=>{});function vHe(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:j.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:j.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:j.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.26.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function w9(){return w9=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function IHe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=j.useState(n.state),[s,a]=j.useState(),[c,u]=j.useState({isTransitioning:!1}),[l,d]=j.useState(),[f,h]=j.useState(),[p,m]=j.useState(),x=j.useRef(new Map),{v7_startTransition:y}=r||{},b=j.useCallback(A=>{y?_He(A):A()},[y]),v=j.useCallback((A,O)=>{let{deletedFetchers:N,unstable_flushSync:R,unstable_viewTransitionOpts:_}=O;N.forEach(z=>x.current.delete(z)),A.fetchers.forEach((z,F)=>{z.data!==void 0&&x.current.set(F,z.data)});let M=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!_||M){R?iy(()=>o(A)):b(()=>o(A));return}if(R){iy(()=>{f&&(l&&l.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let z=n.window.document.startViewTransition(()=>{iy(()=>o(A))});z.finished.finally(()=>{iy(()=>{d(void 0),h(void 0),a(void 0),u({isTransitioning:!1})})}),iy(()=>h(z));return}f?(l&&l.resolve(),f.skipTransition(),m({state:A,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(a(A),u({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[n.window,f,l,x,b]);j.useLayoutEffect(()=>n.subscribe(v),[n,v]),j.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new PHe)},[c]),j.useEffect(()=>{if(l&&s&&n.window){let A=s,O=l.promise,N=n.window.document.startViewTransition(async()=>{b(()=>o(A)),await O});N.finished.finally(()=>{d(void 0),h(void 0),a(void 0),u({isTransitioning:!1})}),h(N)}},[b,s,l,n.window]),j.useEffect(()=>{l&&s&&i.location.key===s.location.key&&l.resolve()},[l,f,i.location,s]),j.useEffect(()=>{!c.isTransitioning&&p&&(a(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),m(void 0))},[c.isTransitioning,p]),j.useEffect(()=>{},[]);let w=j.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:A=>n.navigate(A),push:(A,O,N)=>n.navigate(A,{state:O,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(A,O,N)=>n.navigate(A,{replace:!0,state:O,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[n]),E=n.basename||"/",S=j.useMemo(()=>({router:n,navigator:w,static:!1,basename:E}),[n,w,E]),I=j.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return j.createElement(j.Fragment,null,j.createElement(Iae.Provider,{value:S},j.createElement(Rae.Provider,{value:i},j.createElement(SHe.Provider,{value:x.current},j.createElement(AHe.Provider,{value:c},j.createElement(bHe,{basename:E,location:i.location,navigationType:i.historyAction,navigator:w,future:I},i.initialized||n.future.v7_partialHydration?j.createElement(RHe,{routes:n.routes,future:n.future,state:i}):t))))),null)}const RHe=j.memo(NHe);function NHe(e){let{routes:t,future:n,state:r}=e;return aHe(t,void 0,r,n)}var SV;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(SV||(SV={}));var kV;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(kV||(kV={}));function OHe(e){let t;const n=new Set,r=(u,l)=>{const d=typeof u=="function"?u(t):u;if(d!==t){const f=t;t=l?d:Object.assign({},t,d),n.forEach(h=>h(t,f))}},i=()=>t,o=(u,l=i,d=Object.is)=>{let f=l(t);function h(){const p=l(t);if(!d(f,p)){const m=f;u(f=p,m)}}return n.add(h),()=>n.delete(h)},c={setState:r,getState:i,subscribe:(u,l,d)=>l||d?o(u,l,d):(n.add(u),()=>n.delete(u)),destroy:()=>n.clear()};return t=e(r,i,c),c}const LHe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),TV=LHe?j.useEffect:j.useLayoutEffect;function BHe(e){const t=typeof e=="function"?OHe(e):e,n=(r=t.getState,i=Object.is)=>{const[,o]=j.useReducer(m=>m+1,0),s=t.getState(),a=j.useRef(s),c=j.useRef(r),u=j.useRef(i),l=j.useRef(!1),d=j.useRef();d.current===void 0&&(d.current=r(s));let f,h=!1;(a.current!==s||c.current!==r||u.current!==i||l.current)&&(f=r(s),h=!i(d.current,f)),TV(()=>{h&&(d.current=f),a.current=s,c.current=r,u.current=i,l.current=!1});const p=j.useRef(s);return TV(()=>{const m=()=>{try{const y=t.getState(),b=c.current(y);u.current(d.current,b)||(a.current=y,d.current=b,o())}catch{l.current=!0,o()}},x=t.subscribe(m);return t.getState()!==p.current&&m(),x},[]),h?f:d.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var MHe=Object.defineProperty,_V=Object.getOwnPropertySymbols,DHe=Object.prototype.hasOwnProperty,jHe=Object.prototype.propertyIsEnumerable,PV=(e,t,n)=>t in e?MHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ck=(e,t)=>{for(var n in t||(t={}))DHe.call(t,n)&&PV(e,n,t[n]);if(_V)for(var n of _V(t))jHe.call(t,n)&&PV(e,n,t[n]);return e};const E9=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return E9(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return E9(r)(n)}}}},FHe=(e,t)=>(n,r,i)=>{const{name:o,getStorage:s=()=>localStorage,serialize:a=JSON.stringify,deserialize:c=JSON.parse,blacklist:u,whitelist:l,onRehydrateStorage:d,version:f=0,migrate:h,merge:p=(S,I)=>ck(ck({},I),S)}=t||{};let m;try{m=s()}catch{}if(!m)return e((...S)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...S)},r,i);const x=E9(a),y=()=>{const S=ck({},r());l&&Object.keys(S).forEach(O=>{!l.includes(O)&&delete S[O]}),u&&u.forEach(O=>delete S[O]);let I;const A=x({state:S,version:f}).then(O=>m.setItem(o,O)).catch(O=>{I=O});if(I)throw I;return A},b=i.setState;i.setState=(S,I)=>{b(S,I),y()};const v=e((...S)=>{n(...S),y()},r,i);let w;const E=(d==null?void 0:d(r()))||void 0;return E9(m.getItem.bind(m))(o).then(S=>{if(S)return c(S)}).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==f){if(h)return h(S.state,S.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return S.state}).then(S=>(w=p(S,v),n(w,!0),y())).then(()=>{E==null||E(w,void 0)}).catch(S=>{E==null||E(void 0,S)}),w||v};var x0;(function(e){e[e.LAST4=0]="LAST4",e[e.LAST6=1]="LAST6",e[e.FIRST4=2]="FIRST4",e[e.FIRST6=3]="FIRST6",e[e.FIRST4_LAST4=4]="FIRST4_LAST4",e[e.FIRST6_LAST6=5]="FIRST6_LAST6"})(x0||(x0={}));const IV=BHe(FHe(()=>({addressBook:{}}),{name:"ens-address-book"}));function UHe(e){let t=e.address;if(e.customDisplay)return e.customDisplay(t);if(console.log(e),e.displayType)switch(e.displayType){case x0.FIRST4:return`${t==null?void 0:t.slice(0,6)}...`;case x0.FIRST6:return`${t==null?void 0:t.slice(0,8)}...`;case x0.LAST6:return`0x...${t==null?void 0:t.slice(t.length-6)}`;case x0.FIRST4_LAST4:return`${t==null?void 0:t.slice(0,6)}...${t==null?void 0:t.slice(t.length-4)}`;case x0.FIRST6_LAST6:return`${t==null?void 0:t.slice(0,8)}...${t==null?void 0:t.slice(t.length-6)}`}else return`0x...${t==null?void 0:t.slice(t.length-4)}`}const zHe=e=>{var r;console.log("args",e);const t=(r=e.address)==null?void 0:r.toLowerCase(),n=IV(i=>t?i.addressBook[t]||t:null);return console.log("ens name 1:",n),j.useEffect(()=>{var i;!t||!n||n.toLowerCase()==t&&((i=e.provider)==null||i.lookupAddress(t).then(o=>{console.log("ENS lookup",o),IV.setState(s=>({addressBook:{...s.addressBook,[t]:o}}))}))},[n]),(n==null?void 0:n.toLowerCase())==t?UHe(e):n},$He=e=>{const t=zHe(e);return g.jsx(g.Fragment,{children:t},void 0)},A5=[{type:"constructor",inputs:[{name:"solutions_",internalType:"address[]",type:"address[]"},{name:"keys",internalType:"address[]",type:"address[]"},{name:"prize_",internalType:"address",type:"address"}],stateMutability:"nonpayable"},{type:"event",anonymous:!1,inputs:[{name:"player",internalType:"address",type:"address",indexed:!0},{name:"completedChapter",internalType:"uint256",type:"uint256",indexed:!0}],name:"ChapterCompleted"},{type:"event",anonymous:!1,inputs:[{name:"msgSender",internalType:"address",type:"address",indexed:!1}],name:"IncrementCounter"},{type:"event",anonymous:!1,inputs:[{name:"player",internalType:"address",type:"address",indexed:!0},{name:"completedKey",internalType:"uint256",type:"uint256",indexed:!0}],name:"KeyCompleted"},{type:"event",anonymous:!1,inputs:[{name:"previousOwner",internalType:"address",type:"address",indexed:!0},{name:"newOwner",internalType:"address",type:"address",indexed:!0}],name:"OwnershipTransferred"},{type:"event",anonymous:!1,inputs:[{name:"from",internalType:"address",type:"address",indexed:!1},{name:"badgeId",internalType:"uint256",type:"uint256",indexed:!1}],name:"PrizeMinted"},{type:"event",anonymous:!1,inputs:[{name:"role",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"previousAdminRole",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"newAdminRole",internalType:"bytes32",type:"bytes32",indexed:!0}],name:"RoleAdminChanged"},{type:"event",anonymous:!1,inputs:[{name:"role",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"account",internalType:"address",type:"address",indexed:!0},{name:"sender",internalType:"address",type:"address",indexed:!0}],name:"RoleGranted"},{type:"event",anonymous:!1,inputs:[{name:"role",internalType:"bytes32",type:"bytes32",indexed:!0},{name:"account",internalType:"address",type:"address",indexed:!0},{name:"sender",internalType:"address",type:"address",indexed:!0}],name:"RoleRevoked"},{type:"fallback",stateMutability:"payable"},{type:"function",inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[],name:"GAME_MASTER_ROLE",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"solution",internalType:"address",type:"address"}],name:"addSolution",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"uint96",type:"uint96"},{name:"",internalType:"uint256",type:"uint256"}],name:"chapterToPlayers",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"contextCounter",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"currentChapter",outputs:[{name:"",internalType:"uint96",type:"uint96"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"gameMasters",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"a",internalType:"address",type:"address"}],name:"getAddressHash",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"pure"},{type:"function",inputs:[{name:"page",internalType:"uint256",type:"uint256"}],name:"getLeaderboard",outputs:[{name:"leaderboard",internalType:"uint256[32]",type:"uint256[32]"}],stateMutability:"view"},{type:"function",inputs:[],name:"getQuestsRootCID",outputs:[{name:"",internalType:"bytes",type:"bytes"}],stateMutability:"view"},{type:"function",inputs:[{name:"role",internalType:"bytes32",type:"bytes32"}],name:"getRoleAdmin",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"role",internalType:"bytes32",type:"bytes32"},{name:"account",internalType:"address",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"role",internalType:"bytes32",type:"bytes32"},{name:"account",internalType:"address",type:"address"}],name:"hasRole",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"keyToPos",outputs:[{name:"",internalType:"uint8",type:"uint8"}],stateMutability:"view"},{type:"function",inputs:[],name:"owner",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"playerToCurrentChapter",outputs:[{name:"",internalType:"uint96",type:"uint96"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"address",type:"address"}],name:"playerToKeys",outputs:[{name:"",internalType:"uint80",type:"uint80"}],stateMutability:"view"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"players",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"prize",outputs:[{name:"",internalType:"contract ITreasure",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"questsRootCid",outputs:[{name:"",internalType:"bytes",type:"bytes"}],stateMutability:"view"},{type:"function",inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"role",internalType:"bytes32",type:"bytes32"},{name:"account",internalType:"address",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"role",internalType:"bytes32",type:"bytes32"},{name:"account",internalType:"address",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"questsRootCid_",internalType:"bytes",type:"bytes"}],name:"setup",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"",internalType:"uint256",type:"uint256"}],name:"solutions",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"submit",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"v",internalType:"uint8",type:"uint8"},{name:"r",internalType:"bytes32",type:"bytes32"},{name:"s",internalType:"bytes32",type:"bytes32"}],name:"submitKey",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"interfaceId",internalType:"bytes4",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[],name:"totalChapters",outputs:[{name:"",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"totalKeys",outputs:[{name:"",internalType:"uint8",type:"uint8"}],stateMutability:"view"},{type:"function",inputs:[{name:"newOwner",internalType:"address",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"}],u2={11155111:"0xfF016753393916E420c1E66bDF7A3512F3A42676"},HHe=[{address:"0xFa29292B496C971dB55E218BF702fF635b051786",emoji:"🫣"},{address:"0x8267362bEd69721D16956ea023c2DAd2189FE534",emoji:"🫠"}],VHe=["0x6647156e934C829A554F97761550C4d567602dEF","0x6A37bf9E252D8175b3c962b4a8Cfb6E97668Ad58","0x85FEd33308e22Eb55066ae08D22d69a7722D934F"],C9={keys:HHe,chapters:VHe};function S5(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Jr(e){return S5(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Lae="2.21.9";let a6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:Lae};class qt extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof qt?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),i=n.cause instanceof qt&&n.cause.docsPath||n.docsPath,o=(a=a6.getDocsUrl)==null?void 0:a.call(a6,{...n,docsPath:i}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],`Version: ${a6.version}`].join(` +`);super(s,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Lae}walk(t){return Bae(this,t)}}function Bae(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?Bae(e.cause,t):t?null:e}class WHe extends qt{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(` +`),{name:"AbiEncodingArrayLengthMismatchError"})}}class GHe extends qt{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Jr(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class KHe extends qt{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(` +`),{name:"AbiEncodingLengthMismatchError"})}}class QHe extends qt{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class YHe extends qt{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class qHe extends qt{constructor(t){super([`Value "${t}" is not a valid array.`].join(` +`),{name:"InvalidArrayError"})}}class Mae extends qt{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class Dae extends qt{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function l2(e,{dir:t,size:n=32}={}){return typeof e=="string"?rf(e,{dir:t,size:n}):ZHe(e,{dir:t,size:n})}function rf(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Dae({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function ZHe(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Dae({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new XHe({givenSize:Jr(e),maxSize:t})}function $I(e,t={}){const{signed:n}=t;t.size&&d2(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function _t(e,t={}){return typeof e=="number"||typeof e=="bigint"?bi(e,t):typeof e=="string"?S9(e,t):typeof e=="boolean"?jae(e,t):Al(e,t)}function jae(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(d2(n,{size:t.size}),l2(n,{size:t.size})):n}function Al(e,t={}){let n="";for(let i=0;io||i=tu.zero&&e<=tu.nine)return e-tu.zero;if(e>=tu.A&&e<=tu.F)return e-(tu.A-10);if(e>=tu.a&&e<=tu.f)return e-(tu.a-10)}function hl(e,t={}){let n=e;t.size&&(d2(n,{size:t.size}),n=l2(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;s0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function aVe(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");k9(e.outputLen),k9(e.blockLen)}function Im(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function zae(e,t){k5(e);const n=t.outputLen;if(e.length>NV&c6)}:{h:Number(e>>NV&c6)|0,l:Number(e&c6)|0}}function uVe(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;ie<>>32-n,dVe=(e,t,n)=>t<>>32-n,fVe=(e,t,n)=>t<>>64-n,hVe=(e,t,n)=>e<>>64-n,uk=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pVe=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),lk=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Xa=(e,t)=>e<<32-t|e>>>t,OV=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,gVe=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function LV(e){for(let t=0;te().update(KE(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function bVe(e=32){if(uk&&typeof uk.getRandomValues=="function")return uk.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const Hae=[],Vae=[],Wae=[],vVe=BigInt(0),oy=BigInt(1),xVe=BigInt(2),wVe=BigInt(7),EVe=BigInt(256),CVe=BigInt(113);for(let e=0,t=oy,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Hae.push(2*(5*r+n)),Vae.push((e+1)*(e+2)/2%64);let i=vVe;for(let o=0;o<7;o++)t=(t<>wVe)*CVe)%EVe,t&xVe&&(i^=oy<<(oy<n>32?fVe(e,t,n):lVe(e,t,n),MV=(e,t,n)=>n>32?hVe(e,t,n):dVe(e,t,n);function kVe(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const a=(s+8)%10,c=(s+2)%10,u=n[c],l=n[c+1],d=BV(u,l,1)^n[a],f=MV(u,l,1)^n[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){const a=Vae[s],c=BV(i,o,a),u=MV(i,o,a),l=Hae[s];i=e[l],o=e[l+1],e[l]=c,e[l+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=AVe[r],e[1]^=SVe[r]}n.fill(0)}let TVe=class Gae extends $B{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,k9(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=pVe(this.state)}keccak(){OV||LV(this.state32),kVe(this.state32,this.rounds),OV||LV(this.state32),this.posOut=0,this.pos=0}update(t){Im(this);const{blockLen:n,state:r}=this;t=KE(t);const i=t.length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return k9(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(zae(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new Gae(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};const _Ve=(e,t,n)=>$ae(()=>new TVe(t,e,n)),PVe=_Ve(1,136,256/8);function so(e,t){const n=t||"hex",r=PVe(S5(e,{strict:!1})?Fae(e):e);return n==="bytes"?r:_t(r)}class pl extends qt{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Kae extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const dk=new Kae(8192);function Qae(e,t){if(dk.has(`${e}.${t}`))return dk.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=so(Uae(n),"bytes"),i=n.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(r[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());const o=`0x${i.join("")}`;return dk.set(`${e}.${t}`,o),o}const IVe=/^0x[a-fA-F0-9]{40}$/,fk=new Kae(8192);function gl(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(fk.has(r))return fk.get(r);const i=IVe.test(e)?e.toLowerCase()===e?!0:n?Qae(e)===e:!0:!1;return fk.set(r,i),i}function pf(e){return typeof e[0]=="string"?f2(e):RVe(e)}function RVe(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function f2(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Yae(e,t,n,{strict:r}={}){return S5(e,{strict:!1})?OVe(e,t,n,{strict:r}):NVe(e,t,n,{strict:r})}function qae(e,t){if(typeof t=="number"&&t>0&&t>Jr(e)-1)throw new Mae({offset:t,position:"start",size:Jr(e)})}function Zae(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Jr(e)!==n-t)throw new Mae({offset:n,position:"end",size:Jr(e)})}function NVe(e,t,n,{strict:r}={}){qae(e,t);const i=e.slice(t,n);return r&&Zae(i,t,n),i}function OVe(e,t,n,{strict:r}={}){qae(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Zae(i,t,n),i}function Jae(e,t){if(e.length!==t.length)throw new KHe({expectedLength:e.length,givenLength:t.length});const n=LVe({params:e,values:t}),r=VB(n);return r.length===0?"0x":r}function LVe({params:e,values:t}){const n=[];for(let r=0;r0?pf([a,s]):a}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:pf(o.map(({encoded:s})=>s))}}function DVe(e,{param:t}){const[,n]=t.type.split("bytes"),r=Jr(e);if(!n){let i=e;return r%32!==0&&(i=rf(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:pf([rf(bi(r,{size:32})),i])}}if(r!==Number.parseInt(n))throw new GHe({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:rf(e,{dir:"right"})}}function jVe(e){if(typeof e!="boolean")throw new qt(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rf(jae(e))}}function FVe(e,{signed:t}){return{dynamic:!1,encoded:bi(e,{size:32,signed:t})}}function UVe(e){const t=S9(e),n=Math.ceil(Jr(t)/32),r=[];for(let i=0;ii))}}function $Ve(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}class DV extends qt{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class HVe extends qt{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class VVe extends qt{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const WVe={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new VVe({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new HVe({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new DV({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new DV({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Xae(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(WVe);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}const GVe={ether:-9,wei:9};function KVe(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function HI(e,t="wei"){return KVe(e,GVe[t])}function QVe(e){const t=Object.entries(e).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=t.reduce((r,[i])=>Math.max(r,i.length),0);return t.map(([r,i])=>` ${`${r}:`.padEnd(n+1)} ${i}`).join(` +`)}class YVe extends qt{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class qVe extends qt{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",QVe(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ZVe extends qt{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function JVe(e){const t=so(`0x${e.substring(4)}`).substring(26);return Qae(`0x${t}`)}function Fh(e,t="hex"){const n=ece(e),r=Xae(new Uint8Array(n.length));return n.encode(r),t==="hex"?Al(r.bytes):r.bytes}function ece(e){return Array.isArray(e)?XVe(e.map(t=>ece(t))):eWe(e)}function XVe(e){const t=e.reduce((i,o)=>i+o.length,0),n=tce(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function eWe(e){const t=typeof e=="string"?hl(e):e,n=tce(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function tce(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new qt("Length is too large.")}function tWe(e){const{chainId:t,contractAddress:n,nonce:r,to:i}=e,o=so(f2(["0x05",Fh([bi(t),n,r?bi(r):"0x"])]));return i==="bytes"?hl(o):o}class QE extends qt{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${HI(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(QE,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class nce extends qt{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${HI(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${HI(r)} gwei`:""}).`].join(` +`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(nce,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});const WB=2n**256n-1n;function rce(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>hl(o)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?i:i.map(o=>Al(o))}function ice(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>hl(s)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(s=>hl(s)):e.commitments,o=[];for(let s=0;sAl(s))}function nWe(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}const rWe=(e,t,n)=>e&t^~e&n,iWe=(e,t,n)=>e&t^e&n^t&n;let oWe=class extends $B{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=lk(this.buffer)}update(t){Im(this);const{view:n,buffer:r,blockLen:i}=this;t=KE(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let d=s;dl.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d>>3,m=Xa(h,17)^Xa(h,19)^h>>>10;jl[d]=m+jl[d-7]+p+jl[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const f=Xa(a,6)^Xa(a,11)^Xa(a,25),h=l+f+rWe(a,c,u)+sWe[d]+jl[d]|0,m=(Xa(r,2)^Xa(r,13)^Xa(r,22))+iWe(r,i,o)|0;l=u,u=c,c=a,a=s+h|0,s=o,o=i,i=r,r=h+m|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(r,i,o,s,a,c,u,l)}roundClean(){jl.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const oce=$ae(()=>new aWe);function cWe(e,t){return oce(S5(e,{strict:!1})?Fae(e):e)}function uWe(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=cWe(t);return i.set([n],0),r==="bytes"?i:Al(i)}function lWe(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const o of t)i.push(uWe({commitment:o,to:r,version:n}));return i}const jV=6,sce=32,GB=4096,ace=sce*GB,FV=ace*jV-1-1*GB*jV,cce=1;class dWe extends qt{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class uce extends qt{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class fWe extends qt{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class hWe extends qt{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${cce}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function pWe(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?hl(e.data):e.data,r=Jr(n);if(!r)throw new uce;if(r>FV)throw new dWe({maxSize:FV,size:r});const i=[];let o=!0,s=0;for(;o;){const a=Xae(new Uint8Array(ace));let c=0;for(;ca.bytes):i.map(a=>Al(a.bytes))}function gWe(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??pWe({data:t,to:r}),o=e.commitments??rce({blobs:i,kzg:n,to:r}),s=e.proofs??ice({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let c=0;c`${a} ${s}`).join(",")})`;return n}function fce({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||t[i]===void 0)return n;n.add(i);for(const o of t[i])fce({primaryType:o.type,types:t},n);return n}function hce({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},so(dce({data:r,primaryType:n,types:e}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},so(r)];if(n==="string")return[{type:"bytes32"},so(_t(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),o=r.map(s=>hce({name:t,type:i,types:e,value:s}));return[{type:"bytes32"},so(Jae(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:n},r]}function CWe(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(s,a)=>{for(const c of s){const{name:u,type:l}=c,d=a[u],f=l.match(bWe);if(f&&(typeof d=="number"||typeof d=="bigint")){const[m,x,y]=f;bi(d,{signed:x==="int",size:Number.parseInt(y)/8})}if(l==="address"&&typeof d=="string"&&!gl(d))throw new pl({address:d});const h=l.match(yWe);if(h){const[m,x]=h;if(x&&Jr(d)!==Number.parseInt(x))throw new QHe({expectedSize:Number.parseInt(x),givenSize:Jr(d)})}const p=i[l];p&&o(p,d)}};i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"&&o(i[r],n)}function AWe({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const SWe=`Ethereum Signed Message: +`;function kWe(e){const t=typeof e=="string"?S9(e):typeof e.raw=="string"?e.raw:Al(e.raw),n=S9(`${SWe}${Jr(t)}`);return pf([n,t])}function TWe(e,t){return so(kWe(e),t)}function _We(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:r,chainId:i}=n;if(!gl(r))throw new pl({address:r});if(i<=0)throw new YE({chainId:i})}KB(e)}function PWe(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new uce;for(const n of t){const r=Jr(n),i=eVe(Yae(n,0,1));if(r!==32)throw new fWe({hash:n,size:r});if(i!==cce)throw new hWe({hash:n,version:i})}}KB(e)}function KB(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new YE({chainId:t});if(i&&!gl(i))throw new pl({address:i});if(r&&r>WB)throw new QE({maxFeePerGas:r});if(n&&r&&n>r)throw new nce({maxFeePerGas:r,maxPriorityFeePerGas:n})}function IWe(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new YE({chainId:t});if(o&&!gl(o))throw new pl({address:o});if(n||i)throw new qt("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>WB)throw new QE({maxFeePerGas:r})}function RWe(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!gl(o))throw new pl({address:o});if(typeof t<"u"&&t<=0)throw new YE({chainId:t});if(n||i)throw new qt("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>WB)throw new QE({maxFeePerGas:r})}function NWe(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:r,chainId:i,nonce:o,...s}=n;t.push([_t(i),r,o?_t(o):"0x",...T5({},s)])}return t}function qE(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n"u"||typeof h>"u")){const v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(S=>Al(S)),w=e.kzg,E=rce({blobs:v,kzg:w});if(typeof f>"u"&&(f=lWe({commitments:E})),typeof h>"u"){const S=ice({blobs:v,commitments:E,kzg:w});h=gWe({blobs:v,commitments:E,proofs:S})}}const p=qE(l),m=[_t(n),i?_t(i):"0x",u?_t(u):"0x",c?_t(c):"0x",r?_t(r):"0x",o??"0x",s?_t(s):"0x",d??"0x",p,a?_t(a):"0x",f??[],...T5(e,t)],x=[],y=[],b=[];if(h)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new YVe({v:t.v});return h})(),d=A9(t.r),f=A9(t.s);u=[...u,_t(l),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else n>0&&(u=[...u,_t(n),"0x","0x"]);return Fh(u)}function T5(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const o=A9(n.r),s=A9(n.s);return[typeof i=="number"?i?_t(1):"0x":r===0n?"0x":r===1n?_t(1):r===27n?"0x":_t(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pce=BigInt(0),ZE=BigInt(1),FWe=BigInt(2);function Uh(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function _5(e){if(!Uh(e))throw new Error("Uint8Array expected")}const UWe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Rm(e){_5(e);let t="";for(let n=0;n=nu._0&&e<=nu._9)return e-nu._0;if(e>=nu._A&&e<=nu._F)return e-(nu._A-10);if(e>=nu._a&&e<=nu._f)return e-(nu._a-10)}function Nm(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;ipce;e>>=ZE,t+=1);return t}function WWe(e,t){return e>>BigInt(t)&ZE}function GWe(e,t,n){return e|(n?ZE:pce)<(FWe<new Uint8Array(e),zV=e=>Uint8Array.from(e);function mce(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=hk(e),i=hk(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...d)=>n(i,r,...d),c=(d=hk())=>{i=a(zV([0]),d),r=a(),d.length!==0&&(i=a(zV([1]),d),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const f=[];for(;d{s(),c(d);let h;for(;!(h=f(u()));)c();return s(),h}}const KWe={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Uh(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function P5(e,t,n={}){const r=(i,o,s)=>{const a=KWe[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const c=e[i];if(!(s&&c===void 0)&&!a(c,e))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const QWe=Object.freeze(Object.defineProperty({__proto__:null,abytes:_5,bitGet:WWe,bitLen:VWe,bitMask:ZB,bitSet:GWe,bytesToHex:Rm,bytesToNumberBE:xh,bytesToNumberLE:YB,concatBytes:u4,createHmacDrbg:mce,ensureBytes:ga,equalBytes:$We,hexToBytes:Nm,hexToNumber:QB,isBytes:Uh,numberToBytesBE:Om,numberToBytesLE:qB,numberToHexUnpadded:gce,numberToVarBytesBE:zWe,utf8ToBytes:HWe,validateObject:P5},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Lr=BigInt(0),dr=BigInt(1),w0=BigInt(2),YWe=BigInt(3),VI=BigInt(4),$V=BigInt(5),HV=BigInt(8);BigInt(9);BigInt(16);function eo(e,t){const n=e%t;return n>=Lr?n:t+n}function qWe(e,t,n){if(n<=Lr||t 0");if(n===dr)return Lr;let r=dr;for(;t>Lr;)t&dr&&(r=r*e%n),e=e*e%n,t>>=dr;return r}function us(e,t,n){let r=e;for(;t-- >Lr;)r*=r,r%=n;return r}function WI(e,t){if(e===Lr||t<=Lr)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=eo(e,t),r=t,i=Lr,o=dr;for(;n!==Lr;){const a=r/n,c=r%n,u=i-o*a;r=n,n=c,i=o,o=u}if(r!==dr)throw new Error("invert: does not exist");return eo(i,t)}function ZWe(e){const t=(e-dr)/w0;let n,r,i;for(n=e-dr,r=0;n%w0===Lr;n/=w0,r++);for(i=w0;i(r[i]="function",r),t);return P5(e,n)}function tGe(e,t,n){if(n 0");if(n===Lr)return e.ONE;if(n===dr)return t;let r=e.ONE,i=t;for(;n>Lr;)n&dr&&(r=e.mul(r,i)),i=e.sqr(i),n>>=dr;return r}function nGe(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function yce(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function rGe(e,t,n=!1,r={}){if(e<=Lr)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=yce(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=JWe(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:ZB(i),ZERO:Lr,ONE:dr,create:c=>eo(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Lr<=c&&cc===Lr,isOdd:c=>(c&dr)===dr,neg:c=>eo(-c,e),eql:(c,u)=>c===u,sqr:c=>eo(c*c,e),add:(c,u)=>eo(c+u,e),sub:(c,u)=>eo(c-u,e),mul:(c,u)=>eo(c*u,e),pow:(c,u)=>tGe(a,c,u),div:(c,u)=>eo(c*WI(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>WI(c,e),sqrt:r.sqrt||(c=>s(a,c)),invertBatch:c=>nGe(a,c),cmov:(c,u,l)=>l?u:c,toBytes:c=>n?qB(c,o):Om(c,o),fromBytes:c=>{if(c.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${c.length}`);return n?YB(c):xh(c)}});return Object.freeze(a)}function bce(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function vce(e){const t=bce(e);return t+Math.ceil(t/2)}function iGe(e,t,n=!1){const r=e.length,i=bce(t),o=vce(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?xh(e):YB(e),a=eo(s,t-dr)+dr;return n?qB(a,i):Om(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oGe=BigInt(0),pk=BigInt(1);function sGe(e,t){const n=(i,o)=>{const s=o.negate();return i?s:o},r=i=>{const o=Math.ceil(t/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,o){let s=e.ZERO,a=i;for(;o>oGe;)o&pk&&(s=s.add(a)),a=a.double(),o>>=pk;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=r(o),c=[];let u=i,l=u;for(let d=0;d>=h,x>c&&(x-=f,s+=pk);const y=m,b=m+Math.abs(x)-1,v=p%2!==0,w=x<0;x===0?l=l.add(n(v,o[y])):u=u.add(n(w,o[b]))}return{p:u,f:l}},wNAFCached(i,o,s,a){const c=i._WINDOW_SIZE||1;let u=o.get(i);return u||(u=this.precomputeWindow(i,c),c!==1&&o.set(i,a(u))),this.wNAF(c,u,s)}}}function xce(e){return eGe(e.Fp),P5(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...yce(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function aGe(e){const t=xce(e);P5(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:cGe,hexToBytes:uGe}=QWe,M0={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=M0;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:cGe(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=M0,n=typeof e=="string"?uGe(e):e;_5(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=M0._parseInt(n.subarray(2)),{d:s,l:a}=M0._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{const l=u.toString(16);return l.length&1?`0${l}`:l},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),c=n(s);return`30${n(s+o+4)}02${c}${i}02${a}${r}`}},Du=BigInt(0),Os=BigInt(1);BigInt(2);const VV=BigInt(3);BigInt(4);function lGe(e){const t=aGe(e),{Fp:n}=t,r=t.toBytes||((p,m,x)=>{const y=m.toAffine();return u4(Uint8Array.from([4]),n.toBytes(y.x),n.toBytes(y.y))}),i=t.fromBytes||(p=>{const m=p.subarray(1),x=n.fromBytes(m.subarray(0,n.BYTES)),y=n.fromBytes(m.subarray(n.BYTES,2*n.BYTES));return{x,y}});function o(p){const{a:m,b:x}=t,y=n.sqr(p),b=n.mul(y,p);return n.add(n.add(b,n.mul(p,m)),x)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(p){return typeof p=="bigint"&&Dun.eql(v,n.ZERO);return b(x)&&b(y)?d.ZERO:new d(x,y,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const x=n.invertBatch(m.map(y=>y.pz));return m.map((y,b)=>y.toAffine(x[b])).map(d.fromAffine)}static fromHex(m){const x=d.fromAffine(i(ga("pointHex",m)));return x.assertValidity(),x}static fromPrivateKey(m){return d.BASE.multiply(c(m))}_setWindowSize(m){this._WINDOW_SIZE=m,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:m,y:x}=this.toAffine();if(!n.isValid(m)||!n.isValid(x))throw new Error("bad point: x or y not FE");const y=n.sqr(x),b=o(m);if(!n.eql(y,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(n.isOdd)return!n.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){l(m);const{px:x,py:y,pz:b}=this,{px:v,py:w,pz:E}=m,S=n.eql(n.mul(x,E),n.mul(v,b)),I=n.eql(n.mul(y,E),n.mul(w,b));return S&&I}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:m,b:x}=t,y=n.mul(x,VV),{px:b,py:v,pz:w}=this;let E=n.ZERO,S=n.ZERO,I=n.ZERO,A=n.mul(b,b),O=n.mul(v,v),N=n.mul(w,w),R=n.mul(b,v);return R=n.add(R,R),I=n.mul(b,w),I=n.add(I,I),E=n.mul(m,I),S=n.mul(y,N),S=n.add(E,S),E=n.sub(O,S),S=n.add(O,S),S=n.mul(E,S),E=n.mul(R,E),I=n.mul(y,I),N=n.mul(m,N),R=n.sub(A,N),R=n.mul(m,R),R=n.add(R,I),I=n.add(A,A),A=n.add(I,A),A=n.add(A,N),A=n.mul(A,R),S=n.add(S,A),N=n.mul(v,w),N=n.add(N,N),A=n.mul(N,R),E=n.sub(E,A),I=n.mul(N,O),I=n.add(I,I),I=n.add(I,I),new d(E,S,I)}add(m){l(m);const{px:x,py:y,pz:b}=this,{px:v,py:w,pz:E}=m;let S=n.ZERO,I=n.ZERO,A=n.ZERO;const O=t.a,N=n.mul(t.b,VV);let R=n.mul(x,v),_=n.mul(y,w),M=n.mul(b,E),z=n.add(x,y),F=n.add(v,w);z=n.mul(z,F),F=n.add(R,_),z=n.sub(z,F),F=n.add(x,b);let $=n.add(v,E);return F=n.mul(F,$),$=n.add(R,M),F=n.sub(F,$),$=n.add(y,b),S=n.add(w,E),$=n.mul($,S),S=n.add(_,M),$=n.sub($,S),A=n.mul(O,F),S=n.mul(N,M),A=n.add(S,A),S=n.sub(_,A),A=n.add(_,A),I=n.mul(S,A),_=n.add(R,R),_=n.add(_,R),M=n.mul(O,M),F=n.mul(N,F),_=n.add(_,M),M=n.sub(R,M),M=n.mul(O,M),F=n.add(F,M),R=n.mul(_,F),I=n.add(I,R),R=n.mul($,F),S=n.mul(z,S),S=n.sub(S,R),R=n.mul(z,_),A=n.mul($,A),A=n.add(A,R),new d(S,I,A)}subtract(m){return this.add(m.negate())}is0(){return this.equals(d.ZERO)}wNAF(m){return h.wNAFCached(this,u,m,x=>{const y=n.invertBatch(x.map(b=>b.pz));return x.map((b,v)=>b.toAffine(y[v])).map(d.fromAffine)})}multiplyUnsafe(m){const x=d.ZERO;if(m===Du)return x;if(a(m),m===Os)return this;const{endo:y}=t;if(!y)return h.unsafeLadder(this,m);let{k1neg:b,k1:v,k2neg:w,k2:E}=y.splitScalar(m),S=x,I=x,A=this;for(;v>Du||E>Du;)v&Os&&(S=S.add(A)),E&Os&&(I=I.add(A)),A=A.double(),v>>=Os,E>>=Os;return b&&(S=S.negate()),w&&(I=I.negate()),I=new d(n.mul(I.px,y.beta),I.py,I.pz),S.add(I)}multiply(m){a(m);let x=m,y,b;const{endo:v}=t;if(v){const{k1neg:w,k1:E,k2neg:S,k2:I}=v.splitScalar(x);let{p:A,f:O}=this.wNAF(E),{p:N,f:R}=this.wNAF(I);A=h.constTimeNegate(w,A),N=h.constTimeNegate(S,N),N=new d(n.mul(N.px,v.beta),N.py,N.pz),y=A.add(N),b=O.add(R)}else{const{p:w,f:E}=this.wNAF(x);y=w,b=E}return d.normalizeZ([y,b])[0]}multiplyAndAddUnsafe(m,x,y){const b=d.BASE,v=(E,S)=>S===Du||S===Os||!E.equals(b)?E.multiplyUnsafe(S):E.multiply(S),w=v(this,x).add(v(m,y));return w.is0()?void 0:w}toAffine(m){const{px:x,py:y,pz:b}=this,v=this.is0();m==null&&(m=v?n.ONE:n.inv(b));const w=n.mul(x,m),E=n.mul(y,m),S=n.mul(b,m);if(v)return{x:n.ZERO,y:n.ZERO};if(!n.eql(S,n.ONE))throw new Error("invZ was invalid");return{x:w,y:E}}isTorsionFree(){const{h:m,isTorsionFree:x}=t;if(m===Os)return!0;if(x)return x(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:x}=t;return m===Os?this:x?x(d,this):this.multiplyUnsafe(t.h)}toRawBytes(m=!0){return this.assertValidity(),r(d,this,m)}toHex(m=!0){return Rm(this.toRawBytes(m))}}d.BASE=new d(t.Gx,t.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,h=sGe(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:s}}function dGe(e){const t=xce(e);return P5(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function fGe(e){const t=dGe(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(F){return DuRm(Om(F,t.nByteLength));function p(F){const $=r>>Os;return F>$}function m(F){return p(F)?a(-F):F}const x=(F,$,W)=>xh(F.slice($,W));class y{constructor($,W,G){this.r=$,this.s=W,this.recovery=G,this.assertValidity()}static fromCompact($){const W=t.nByteLength;return $=ga("compactSignature",$,W*2),new y(x($,0,W),x($,W,2*W))}static fromDER($){const{r:W,s:G}=M0.toSig(ga("DER",$));return new y(W,G)}assertValidity(){if(!f(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit($){return new y(this.r,this.s,$)}recoverPublicKey($){const{r:W,s:G,recovery:H}=this,L=I(ga("msgHash",$));if(H==null||![0,1,2,3].includes(H))throw new Error("recovery id invalid");const q=H===2||H===3?W+t.n:W;if(q>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const V=H&1?"03":"02",P=u.fromHex(V+h(q)),K=c(q),ce=a(-L*K),X=a(G*K),ke=u.BASE.multiplyAndAddUnsafe(P,ce,X);if(!ke)throw new Error("point at infinify");return ke.assertValidity(),ke}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Nm(this.toDERHex())}toDERHex(){return M0.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Nm(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const b={isValidPrivateKey(F){try{return l(F),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const F=vce(t.n);return iGe(t.randomBytes(F),t.n)},precompute(F=8,$=u.BASE){return $._setWindowSize(F),$.multiply(BigInt(3)),$}};function v(F,$=!0){return u.fromPrivateKey(F).toRawBytes($)}function w(F){const $=Uh(F),W=typeof F=="string",G=($||W)&&F.length;return $?G===i||G===o:W?G===2*i||G===2*o:F instanceof u}function E(F,$,W=!0){if(w(F))throw new Error("first arg must be private key");if(!w($))throw new Error("second arg must be public key");return u.fromHex($).multiply(l(F)).toRawBytes(W)}const S=t.bits2int||function(F){const $=xh(F),W=F.length*8-t.nBitLength;return W>0?$>>BigInt(W):$},I=t.bits2int_modN||function(F){return a(S(F))},A=ZB(t.nBitLength);function O(F){if(typeof F!="bigint")throw new Error("bigint expected");if(!(Du<=F&&FRe in W))throw new Error("sign() legacy options not supported");const{hash:G,randomBytes:H}=t;let{lowS:L,prehash:q,extraEntropy:V}=W;L==null&&(L=!0),F=ga("msgHash",F),q&&(F=ga("prehashed msgHash",G(F)));const P=I(F),K=l($),ce=[O(K),O(P)];if(V!=null&&V!==!1){const Re=V===!0?H(n.BYTES):V;ce.push(ga("extraEntropy",Re))}const X=u4(...ce),ke=P;function me(Re){const Be=S(Re);if(!f(Be))return;const Le=c(Be),Ne=u.BASE.multiply(Be).toAffine(),Me=a(Ne.x);if(Me===Du)return;const re=a(Le*a(ke+Me*K));if(re===Du)return;let Q=(Ne.x===Me?0:2)|Number(Ne.y&Os),se=re;return L&&p(re)&&(se=m(re),Q^=1),new y(Me,se,Q)}return{seed:X,k2sig:me}}const R={lowS:t.lowS,prehash:!1},_={lowS:t.lowS,prehash:!1};function M(F,$,W=R){const{seed:G,k2sig:H}=N(F,$,W),L=t;return mce(L.hash.outputLen,L.nByteLength,L.hmac)(G,H)}u.BASE._setWindowSize(8);function z(F,$,W,G=_){var Ne;const H=F;if($=ga("msgHash",$),W=ga("publicKey",W),"strict"in G)throw new Error("options.strict was renamed to lowS");const{lowS:L,prehash:q}=G;let V,P;try{if(typeof H=="string"||Uh(H))try{V=y.fromDER(H)}catch(Me){if(!(Me instanceof M0.Err))throw Me;V=y.fromCompact(H)}else if(typeof H=="object"&&typeof H.r=="bigint"&&typeof H.s=="bigint"){const{r:Me,s:re}=H;V=new y(Me,re)}else throw new Error("PARSE");P=u.fromHex(W)}catch(Me){if(Me.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(L&&V.hasHighS())return!1;q&&($=t.hash($));const{r:K,s:ce}=V,X=I($),ke=c(ce),me=a(X*ke),Re=a(K*ke),Be=(Ne=u.BASE.multiplyAndAddUnsafe(P,me,Re))==null?void 0:Ne.toAffine();return Be?a(Be.x)===K:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:E,sign:M,verify:z,ProjectivePoint:u,Signature:y,utils:b}}let wce=class extends $B{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,aVe(t);const r=KE(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew wce(e,t).update(n).digest();Ece.create=(e,t)=>new wce(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hGe(e){return{hash:e,hmac:(t,...n)=>Ece(e,t,yVe(...n)),randomBytes:bVe}}function pGe(e,t){const n=r=>fGe({...e,...hGe(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Cce=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),WV=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),gGe=BigInt(1),GI=BigInt(2),GV=(e,t)=>(e+t/GI)/t;function mGe(e){const t=Cce,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=us(l,n,t)*l%t,f=us(d,n,t)*l%t,h=us(f,GI,t)*u%t,p=us(h,i,t)*h%t,m=us(p,o,t)*p%t,x=us(m,a,t)*m%t,y=us(x,c,t)*x%t,b=us(y,a,t)*m%t,v=us(b,n,t)*l%t,w=us(v,s,t)*p%t,E=us(w,r,t)*u%t,S=us(E,GI,t);if(!KI.eql(KI.sqr(S),e))throw new Error("Cannot find square root");return S}const KI=rGe(Cce,void 0,void 0,{sqrt:mGe}),I5=pGe({a:BigInt(0),b:BigInt(7),Fp:KI,n:WV,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=WV,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-gGe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=GV(o*e,t),c=GV(-r*e,t);let u=eo(e-a*n-c*i,t),l=eo(-a*r-c*o,t);const d=u>s,f=l>s;if(d&&(u=t-u),f&&(l=t-l),u>s||l>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},oce);BigInt(0);I5.ProjectivePoint;function yGe({r:e,s:t,to:n="hex",v:r,yParity:i}){const o=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new I5.Signature($I(e),$I(t)).toCompactHex()}${o===0?"1b":"1c"}`;return n==="hex"?s:hl(s)}function bGe(e){const{r:t,s:n}=I5.Signature.fromCompact(e.slice(2,130)),r=+`0x${e.slice(130)}`,[i,o]=(()=>{if(r===0||r===1)return[void 0,r];if(r===27)return[BigInt(r),0];if(r===28)return[BigInt(r),1];throw new Error("Invalid yParityOrV value")})();return typeof i<"u"?{r:bi(t,{size:32}),s:bi(n,{size:32}),v:i,yParity:o}:{r:bi(t,{size:32}),s:bi(n,{size:32}),yParity:o}}const vGe=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ace=vGe?require("crypto").webcrypto:window.crypto;async function xGe(e){const t=so(_t(e),"bytes");return await Ace.subtle.importKey("raw",t,{name:"AES-GCM"},!0,["encrypt","decrypt"])}async function wGe(e,t){const n=e.slice(0,12),r=e.slice(12),i=await Ace.subtle.decrypt({name:"AES-GCM",iv:n},t,r);return new Uint8Array(i)}async function EGe(e,t){const n=await xGe(t),r=CGe(e),i=await wGe(r,n);return new TextDecoder().decode(i)}function CGe(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r{if(console.log(s),console.log(o),s){const u=s,l=[];for(let d=0;d>BigInt(8)&KV(80)).toString(2).padEnd(i.length,"0").split("").map(y=>Number(y)===1),m=f>>BigInt(96);if(m===BigInt(0))break;const x="0x"+m.toString(16).padStart(40,"0");l.push({chapter:h,keys:p,address:x})}l.length>0&&(n.length>e?(n[Number(e)]=l,r(n)):r(n.concat([l])),l.length===32&&t(e+BigInt(1)))}},[s]);function a(){return n.flat().sort((u,l)=>l.chapter-u.chapter)}function c(u){return`${u==null?void 0:u.slice(0,6)}..${u==null?void 0:u.slice((u==null?void 0:u.length)-3,u==null?void 0:u.length)}`}return g.jsxs(Af,{alignItems:"flex-start",children:[g.jsx(Gr,{children:"Leaderboard"}),g.jsx(yPe,{children:g.jsxs($L,{variant:"simple",children:[g.jsx(Jre,{children:g.jsxs(WP,{children:[g.jsx(E8,{children:"Address"}),g.jsx(E8,{children:"Chapter"}),g.jsx(E8,{children:"Side Quests"})]})}),g.jsx(Xre,{children:a().map(u=>g.jsxs(WP,{children:[g.jsx(w8,{children:g.jsx($He,{customDisplay:c,address:u.address})}),g.jsx(w8,{isNumeric:!0,children:u.chapter}),g.jsx(w8,{children:u.keys.map((l,d)=>l?i[d].emoji:"?").join(",")})]}))})]})}),o==="pending"&&g.jsx(lE,{})]})}const BGe="mnemonic",Tce="currentChapterPassword";function QV(){let e={};for(let t in localStorage)e[t]=localStorage[t];return JSON.stringify(e)}function MGe(e){const t=JSON.parse(e);for(let n in t)localStorage.setItem(n,t[n])}/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function T9(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function DGe(...e){const t=o=>o,n=(o,s)=>a=>o(s(a)),r=e.map(o=>o.encode).reduceRight(n,t),i=e.map(o=>o.decode).reduce(n,t);return{encode:r,decode:i}}function jGe(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function FGe(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function UGe(e,t="="){if(typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of n)if(typeof i!="string")throw new Error(`padding.decode: non-string input=${i}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function QI(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const i=[],o=Array.from(e);for(o.forEach(s=>{if(s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let c=r;ct?_ce(t,e%t):e,_9=(e,t)=>e+(t-_ce(e,t));function YI(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(_9(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${_9(t,n)}`);let i=0,o=0;const s=2**n-1,a=[];for(const c of e){if(c>=2**t)throw new Error(`convertRadix2: invalid data word=${c} from=${t}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)a.push((i>>o-n&s)>>>0);i&=2**o-1}if(i=i<=t)throw new Error("Excess padding");if(!r&&i)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&a.push(i>>>0),a}function zGe(e){return{encode:t=>{if(!T9(t))throw new Error("radix.encode input should be Uint8Array");return QI(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(QI(t,e,2**8))}}}function $Ge(e,t=!1){if(e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(_9(8,e)>32||_9(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!T9(n))throw new Error("radix2.encode input should be Uint8Array");return YI(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(YI(n,e,8,t))}}}function HGe(e,t){if(typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!T9(n))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),i=new Uint8Array(n.length+e);return i.set(n),i.set(r,n.length),i},decode(n){if(!T9(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),i=t(r).slice(0,e),o=n.slice(-e);for(let s=0;s0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function YV(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function KGe(e,t){JB(e);const n=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),ec=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function QGe(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Pce(e){return typeof e=="string"&&(e=QGe(e)),JB(e),e}let YGe=class{clone(){return this._cloneInto()}};function qGe(e){const t=r=>e().update(Pce(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ZGe(e=32){if(Sp&&typeof Sp.getRandomValues=="function")return Sp.getRandomValues(new Uint8Array(e));if(Sp&&typeof Sp.randomBytes=="function")return Sp.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}function JGe(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}const XGe=(e,t,n)=>e&t^~e&n,eKe=(e,t,n)=>e&t^e&n^t&n;class tKe extends YGe{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=gk(this.buffer)}update(t){YV(this);const{view:n,buffer:r,blockLen:i}=this;t=Pce(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let d=s;dl.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d>>3,m=ec(h,17)^ec(h,19)^h>>>10;Ul[d]=m+Ul[d-7]+p+Ul[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const f=ec(a,6)^ec(a,11)^ec(a,25),h=l+f+XGe(a,c,u)+nKe[d]+Ul[d]|0,m=(ec(r,2)^ec(r,13)^ec(r,22))+eKe(r,i,o)|0;l=u,u=c,c=a,a=s+h|0,s=o,o=i,i=r,r=h+m|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(r,i,o,s,a,c,u,l)}roundClean(){Ul.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const iKe=qGe(()=>new rKe);/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const oKe=e=>e[0]==="あいこくしん";function sKe(e){JB(e,16,20,24,28,32)}function aKe(e,t=128){if(WGe(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return lKe(ZGe(t/8),e)}const cKe=e=>{const t=8-e.length/4;return new Uint8Array([iKe(e)[0]>>t<{if(typeof t!="string")throw new Error(`Wordlist: non-string element: ${t}`)}),u6.chain(u6.checksum(1,cKe),u6.radix2(11,!0),u6.alphabet(e))}function lKe(e,t){return sKe(e),uKe(t).encode(e).join(oKe(t)?" ":" ")}function dKe(e,t){return aKe(e,t)}var Ice={},qI=Qe&&Qe.__assign||function(){return qI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return t;try{c.current=window.localStorage.getItem(e);var f=c.current?o(c.current):t;return f}catch(h){return s(h),t}}),l=u[0],d=u[1];return(0,sy.useEffect)(function(){if(!(typeof window>"u")){var f=function(){if(l!==void 0){var h=i(l),p=c.current;c.current=h,window.localStorage.setItem(e,h),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e,newValue:h,oldValue:p}))}else window.localStorage.removeItem(e),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e}))};try{f()}catch(h){s(h)}}},[l]),(0,sy.useEffect)(function(){if(a){var f=function(h){if(!(h.key!==e||h.storageArea!==window.localStorage))try{h.newValue!==c.current&&(c.current=h.newValue,d(h.newValue?o(h.newValue):void 0))}catch(p){s(p)}};if(!(typeof window>"u"))return window.addEventListener("storage",f),function(){return window.removeEventListener("storage",f)}}},[e,a]),[l,d]}var hKe=Ice.default=fKe;const Rce="6.7.0";function pKe(e,t,n){const r=t.split("|").map(o=>o.trim());for(let o=0;oPromise.resolve(e[r])))).reduce((r,i,o)=>(r[t[o]]=i,r),{})}function ot(e,t,n){for(let r in t){let i=t[r];const o=n?n[r]:null;o&&pKe(i,o,r),Object.defineProperty(e,r,{enumerable:!0,value:i,writable:!1})}}function C1(e){if(e==null)return"null";if(Array.isArray(e))return"[ "+e.map(C1).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let n="0x";for(let r=0;r>4],n+=t[e[r]&15];return n}if(typeof e=="object"&&typeof e.toJSON=="function")return C1(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"number":return e.toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map(n=>`${C1(n)}: ${C1(e[n])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function $s(e,t){return e&&e.code===t}function XB(e){return $s(e,"CALL_EXCEPTION")}function wr(e,t,n){{const i=[];if(n){if("message"in n||"code"in n||"name"in n)throw new Error(`value will overwrite populated values: ${C1(n)}`);for(const o in n){const s=n[o];i.push(o+"="+C1(s))}}i.push(`code=${t}`),i.push(`version=${Rce}`),i.length&&(e+=" ("+i.join(", ")+")")}let r;switch(t){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return ot(r,{code:t}),n&&Object.assign(r,n),r}function De(e,t,n,r){if(!e)throw wr(t,n,r)}function pe(e,t,n,r){De(e,t,"INVALID_ARGUMENT",{argument:n,value:r})}function Nce(e,t,n){n==null&&(n=""),n&&(n=": "+n),De(e>=t,"missing arguemnt"+n,"MISSING_ARGUMENT",{count:e,expectedCount:t}),De(e<=t,"too many arguemnts"+n,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const gKe=["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");e.push(t)}catch{}return e},[]);function Oce(e){De(gKe.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function np(e,t,n){if(n==null&&(n=""),e!==t){let r=n,i="new";n&&(r+=".",i+=" "+n),De(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function Lce(e,t,n){if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if(typeof e=="string"&&e.match(/^0x([0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((e.length-2)/2);let i=2;for(let o=0;o>4]+qV[i&15]}return n}function wn(e){return"0x"+e.map(t=>Ve(t).substring(2)).join("")}function Q1(e){return er(e,!0)?(e.length-2)/2:tt(e).length}function Bn(e,t,n){const r=tt(e);return n!=null&&n>r.length&&De(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n}),Ve(r.slice(t??0,n??r.length))}function Mce(e,t,n){const r=tt(e);De(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),n?i.set(r,t-r.length):i.set(r,0),Ve(i)}function zh(e,t){return Mce(e,t,!0)}function mKe(e,t){return Mce(e,t,!1)}const JE=BigInt(0),Ra=BigInt(1),A1=9007199254740991;function yKe(e,t){const n=XE(e,"value"),r=BigInt(It(t,"width"));if(De(n>>r===JE,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),n>>r-Ra){const i=(Ra<=-A1&&e<=A1,"overflow",t||"value",e),BigInt(e);case"string":try{if(e==="")throw new Error("empty string");return e[0]==="-"&&e[1]!=="-"?-BigInt(e.substring(1)):BigInt(e)}catch(n){pe(!1,`invalid BigNumberish string: ${n.message}`,t||"value",e)}}pe(!1,"invalid BigNumberish value",t||"value",e)}function XE(e,t){const n=at(e,t);return De(n>=JE,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),n}const ZV="0123456789abcdef";function eC(e){if(e instanceof Uint8Array){let t="0x0";for(const n of e)t+=ZV[n>>4],t+=ZV[n&15];return BigInt(t)}return at(e)}function It(e,t){switch(typeof e){case"bigint":return pe(e>=-A1&&e<=A1,"overflow",t||"value",e),Number(e);case"number":return pe(Number.isInteger(e),"underflow",t||"value",e),pe(e>=-A1&&e<=A1,"overflow",t||"value",e),e;case"string":try{if(e==="")throw new Error("empty string");return It(BigInt(e),t)}catch(n){pe(!1,`invalid numeric string: ${n.message}`,t||"value",e)}}pe(!1,"invalid numeric value",t||"value",e)}function bKe(e){return It(eC(e))}function ml(e,t){let r=XE(e,"value").toString(16);if(t==null)r.length%2&&(r="0"+r);else{const i=It(t,"width");for(De(i*2>=r.length,`value exceeds width (${i} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length>6===2;s++)o++;return o}return e==="OVERRUN"?n.length-t-1:0}function SKe(e,t,n,r,i){return e==="OVERLONG"?(pe(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),Uce(e,t,n))}const kKe=Object.freeze({error:AKe,ignore:Uce,replace:SKe});function TKe(e,t){t==null&&(t=kKe.error);const n=tt(e,"bytes"),r=[];let i=0;for(;i>7)){r.push(o);continue}let s=null,a=null;if((o&224)===192)s=1,a=127;else if((o&240)===224)s=2,a=2047;else if((o&248)===240)s=3,a=65535;else{(o&192)===128?i+=t("UNEXPECTED_CONTINUE",i-1,n,r):i+=t("BAD_PREFIX",i-1,n,r);continue}if(i-1+s>=n.length){i+=t("OVERRUN",i-1,n,r);continue}let c=o&(1<<8-s-1)-1;for(let u=0;u1114111){i+=t("OUT_OF_RANGE",i-1-s,n,r,c);continue}if(c>=55296&&c<=57343){i+=t("UTF16_SURROGATE",i-1-s,n,r,c);continue}if(c<=a){i+=t("OVERLONG",i-1-s,n,r,c);continue}r.push(c)}}return r}function $i(e,t){t!=null&&(Oce(t),e=e.normalize(t));let n=[];for(let r=0;r>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const o=e.charCodeAt(r);pe(r>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(s&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return new Uint8Array(n)}function _Ke(e){return e.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function eM(e,t){return _Ke(TKe(e,t))}async function PKe(e,t){const n=e.url.split(":")[0].toLowerCase();De(n==="http"||n==="https",`unsupported protocol ${n}`,"UNSUPPORTED_OPERATION",{info:{protocol:n},operation:"request"}),De(n==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let r;if(t){const u=new AbortController;r=u.signal,t.addListener(()=>{u.abort()})}const i={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:r},o=await fetch(e.url,i),s={};o.headers.forEach((u,l)=>{s[l.toLowerCase()]=u});const a=await o.arrayBuffer(),c=a==null?null:new Uint8Array(a);return{statusCode:o.status,statusMessage:o.statusText,headers:s,body:c}}const IKe=12,RKe=250;let JV=PKe;const NKe=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),OKe=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let mk=!1;async function zce(e,t){try{const n=e.match(NKe);if(!n)throw new Error("invalid data");return new of(200,"OK",{"content-type":n[1]||"text/plain"},n[2]?EKe(n[3]):BKe(n[3]))}catch{return new of(599,"BAD REQUEST (invalid data: URI)",{},null,new yl(e))}}function $ce(e){async function t(n,r){try{const i=n.match(OKe);if(!i)throw new Error("invalid link");return new yl(`${e}${i[2]}`)}catch{return new of(599,"BAD REQUEST (invalid IPFS URI)",{},null,new yl(n))}}return t}const d6={data:zce,ipfs:$ce("https://gateway.ipfs.io/ipfs/")},Hce=new WeakMap;var G0,Cd;class LKe{constructor(t){J(this,G0);J(this,Cd);D(this,G0,[]),D(this,Cd,!1),Hce.set(t,()=>{if(!C(this,Cd)){D(this,Cd,!0);for(const n of C(this,G0))setTimeout(()=>{n()},0);D(this,G0,[])}})}addListener(t){De(!C(this,Cd),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),C(this,G0).push(t)}get cancelled(){return C(this,Cd)}checkSignal(){De(!this.cancelled,"cancelled","CANCELLED",{})}}G0=new WeakMap,Cd=new WeakMap;function f6(e){if(e==null)throw new Error("missing signal; should not happen");return e.checkSignal(),e}var hg,pg,ya,wu,gg,mg,Pr,Ro,Eu,K0,Q0,Y0,hc,Cu,q0,Mb;const t7=class t7{constructor(t){J(this,q0);J(this,hg);J(this,pg);J(this,ya);J(this,wu);J(this,gg);J(this,mg);J(this,Pr);J(this,Ro);J(this,Eu);J(this,K0);J(this,Q0);J(this,Y0);J(this,hc);J(this,Cu);D(this,mg,String(t)),D(this,hg,!1),D(this,pg,!0),D(this,ya,{}),D(this,wu,""),D(this,gg,3e5),D(this,Cu,{slotInterval:RKe,maxAttempts:IKe})}get url(){return C(this,mg)}set url(t){D(this,mg,String(t))}get body(){return C(this,Pr)==null?null:new Uint8Array(C(this,Pr))}set body(t){if(t==null)D(this,Pr,void 0),D(this,Ro,void 0);else if(typeof t=="string")D(this,Pr,$i(t)),D(this,Ro,"text/plain");else if(t instanceof Uint8Array)D(this,Pr,t),D(this,Ro,"application/octet-stream");else if(typeof t=="object")D(this,Pr,$i(JSON.stringify(t))),D(this,Ro,"application/json");else throw new Error("invalid body")}hasBody(){return C(this,Pr)!=null}get method(){return C(this,wu)?C(this,wu):this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),D(this,wu,String(t).toUpperCase())}get headers(){const t=Object.assign({},C(this,ya));return C(this,Eu)&&(t.authorization=`Basic ${CKe($i(C(this,Eu)))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&C(this,Ro)&&(t["content-type"]=C(this,Ro)),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,n){C(this,ya)[String(t).toLowerCase()]=String(n)}clearHeaders(){D(this,ya,{})}[Symbol.iterator](){const t=this.headers,n=Object.keys(t);let r=0;return{next:()=>{if(r=0,"timeout must be non-zero","timeout",t),D(this,gg,t)}get preflightFunc(){return C(this,K0)||null}set preflightFunc(t){D(this,K0,t)}get processFunc(){return C(this,Q0)||null}set processFunc(t){D(this,Q0,t)}get retryFunc(){return C(this,Y0)||null}set retryFunc(t){D(this,Y0,t)}toString(){return``}setThrottleParams(t){t.slotInterval!=null&&(C(this,Cu).slotInterval=t.slotInterval),t.maxAttempts!=null&&(C(this,Cu).maxAttempts=t.maxAttempts)}send(){return De(C(this,hc)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),D(this,hc,new LKe(this)),de(this,q0,Mb).call(this,0,XV()+this.timeout,0,this,new of(0,"",{},null,this))}cancel(){De(C(this,hc)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=Hce.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const n=this.url.split(":")[0].toLowerCase(),r=t.split(":")[0].toLowerCase();De(this.method==="GET"&&(n!=="https"||r!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const i=new t7(t);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,D(i,ya,Object.assign({},C(this,ya))),C(this,Pr)&&D(i,Pr,new Uint8Array(C(this,Pr))),D(i,Ro,C(this,Ro)),i}clone(){const t=new t7(this.url);return D(t,wu,C(this,wu)),C(this,Pr)&&D(t,Pr,C(this,Pr)),D(t,Ro,C(this,Ro)),D(t,ya,Object.assign({},C(this,ya))),D(t,Eu,C(this,Eu)),this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),D(t,K0,C(this,K0)),D(t,Q0,C(this,Q0)),D(t,Y0,C(this,Y0)),t}static lockConfig(){mk=!0}static getGateway(t){return d6[t.toLowerCase()]||null}static registerGateway(t,n){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(mk)throw new Error("gateways locked");d6[t]=n}static registerGetUrl(t){if(mk)throw new Error("gateways locked");JV=t}static createDataGateway(){return zce}static createIpfsGatewayFunc(t){return $ce(t)}};hg=new WeakMap,pg=new WeakMap,ya=new WeakMap,wu=new WeakMap,gg=new WeakMap,mg=new WeakMap,Pr=new WeakMap,Ro=new WeakMap,Eu=new WeakMap,K0=new WeakMap,Q0=new WeakMap,Y0=new WeakMap,hc=new WeakMap,Cu=new WeakMap,q0=new WeakSet,Mb=async function(t,n,r,i,o){var l,d,f;if(t>=C(this,Cu).maxAttempts)return o.makeServerError("exceeded maximum retry limit");De(XV()<=n,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await MKe(r);let s=this.clone();const a=(s.url.split(":")[0]||"").toLowerCase();if(a in d6){const h=await d6[a](s.url,f6(C(i,hc)));if(h instanceof of){let p=h;if(this.processFunc){f6(C(i,hc));try{p=await this.processFunc(s,p)}catch(m){(m.throttle==null||typeof m.stall!="number")&&p.makeServerError("error in post-processing function",m).assertOk()}}return p}s=h}this.preflightFunc&&(s=await this.preflightFunc(s));const c=await JV(s,f6(C(i,hc)));let u=new of(c.statusCode,c.statusMessage,c.headers,c.body,i);if(u.statusCode===301||u.statusCode===302){try{const h=u.headers.location||"";return de(l=s.redirect(h),q0,Mb).call(l,t+1,n,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(s,u,t))){const h=u.headers["retry-after"];let p=C(this,Cu).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(p=parseInt(h)),de(d=s.clone(),q0,Mb).call(d,t+1,n,p,i,u)}if(this.processFunc){f6(C(i,hc));try{u=await this.processFunc(s,u)}catch(h){(h.throttle==null||typeof h.stall!="number")&&u.makeServerError("error in post-processing function",h).assertOk();let p=C(this,Cu).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return h.stall>=0&&(p=h.stall),de(f=s.clone(),q0,Mb).call(f,t+1,n,p,i,u)}}return u};let yl=t7;var I4,R4,N4,ba,yg,Z0;const vD=class vD{constructor(t,n,r,i,o){J(this,I4);J(this,R4);J(this,N4);J(this,ba);J(this,yg);J(this,Z0);D(this,I4,t),D(this,R4,n),D(this,N4,Object.keys(r).reduce((s,a)=>(s[a.toLowerCase()]=String(r[a]),s),{})),D(this,ba,i==null?null:new Uint8Array(i)),D(this,yg,o||null),D(this,Z0,{message:""})}toString(){return``}get statusCode(){return C(this,I4)}get statusMessage(){return C(this,R4)}get headers(){return Object.assign({},C(this,N4))}get body(){return C(this,ba)==null?null:new Uint8Array(C(this,ba))}get bodyText(){try{return C(this,ba)==null?"":eM(C(this,ba))}catch{De(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{De(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,n=Object.keys(t);let r=0;return{next:()=>{if(r=0,"invalid stall timeout","stall",n);const r=new Error(t||"throttling requests");throw ot(r,{stall:n,throttle:!0}),r}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return C(this,ba)!=null}get request(){return C(this,yg)}ok(){return C(this,Z0).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:n}=C(this,Z0);t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`),De(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:n})}};I4=new WeakMap,R4=new WeakMap,N4=new WeakMap,ba=new WeakMap,yg=new WeakMap,Z0=new WeakMap;let of=vD;function XV(){return new Date().getTime()}function BKe(e){return $i(e.replace(/%([0-9a-f][0-9a-f])/gi,(t,n)=>String.fromCharCode(parseInt(n,16))))}function MKe(e){return new Promise(t=>setTimeout(t,e))}function DKe(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function eW(e,t,n){let r=0;for(let i=0;i{De(r<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:r})};if(e[t]>=248){const r=e[t]-247;n(t+1+r);const i=eW(e,t+1,r);return n(t+1+r+i),tW(e,t,t+1+r,r+i)}else if(e[t]>=192){const r=e[t]-192;return n(t+1+r),tW(e,t,t+1,r)}else if(e[t]>=184){const r=e[t]-183;n(t+1+r);const i=eW(e,t+1,r);n(t+1+r+i);const o=Ve(e.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:o}}else if(e[t]>=128){const r=e[t]-128;n(t+1+r);const i=Ve(e.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:DKe(e[t])}}function tM(e){const t=tt(e,"data"),n=Vce(t,0);return pe(n.consumed===t.length,"unexpected junk after rlp payload","data",e),n.result}function nW(e){const t=[];for(;e;)t.unshift(e&255),e>>=8;return t}function Wce(e){if(Array.isArray(e)){let r=[];if(e.forEach(function(o){r=r.concat(Wce(o))}),r.length<=55)return r.unshift(192+r.length),r;const i=nW(r.length);return i.unshift(247+i.length),i.concat(r)}const t=Array.prototype.slice.call(tt(e,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const n=nW(t.length);return n.unshift(183+n.length),n.concat(t)}const rW="0123456789abcdef";function l4(e){let t="0x";for(const n of Wce(e))t+=rW[n>>4],t+=rW[n&15];return t}function jKe(e){const t=tt(e,"randomBytes");t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Ve(t);return[n.substring(2,10),n.substring(10,14),n.substring(14,18),n.substring(18,22),n.substring(22,34)].join("-")}const ji=32,XI=new Uint8Array(ji),FKe=["then"],h6={};function ay(e,t){const n=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw n.error=t,n}var Ad;const K3=class K3 extends Array{constructor(...n){const r=n[0];let i=n[1],o=(n[2]||[]).slice(),s=!0;r!==h6&&(i=n,o=[],s=!1);super(i.length);J(this,Ad);i.forEach((c,u)=>{this[u]=c});const a=o.reduce((c,u)=>(typeof u=="string"&&c.set(u,(c.get(u)||0)+1),c),new Map);if(D(this,Ad,Object.freeze(i.map((c,u)=>{const l=o[u];return l!=null&&a.get(l)===1?l:null}))),!!s)return Object.freeze(this),new Proxy(this,{get:(c,u,l)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const f=It(u,"%index");if(f<0||f>=this.length)throw new RangeError("out of result range");const h=c[f];return h instanceof Error&&ay(`index ${f}`,h),h}if(FKe.indexOf(u)>=0)return Reflect.get(c,u,l);const d=c[u];if(d instanceof Function)return function(...f){return d.apply(this===l?c:this,f)};if(!(u in c))return c.getValue.apply(this===l?c:this,[u])}return Reflect.get(c,u,l)}})}toArray(){const n=[];return this.forEach((r,i)=>{r instanceof Error&&ay(`index ${i}`,r),n.push(r)}),n}toObject(){return C(this,Ad).reduce((n,r,i)=>(De(r!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),r in n||(n[r]=this.getValue(r)),n),{})}slice(n,r){n==null&&(n=0),n<0&&(n+=this.length,n<0&&(n=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=[],o=[];for(let s=n;s{C(this,Au)[t]=iW(n)}}}Au=new WeakMap,J0=new WeakMap,bg=new WeakSet,I8=function(t){return C(this,Au).push(t),D(this,J0,C(this,J0)+t.length),t.length};var No,_s,n7,Gce;const xD=class xD{constructor(t,n){J(this,n7);Z(this,"allowLoose");J(this,No);J(this,_s);ot(this,{allowLoose:!!n}),D(this,No,mi(t)),D(this,_s,0)}get data(){return Ve(C(this,No))}get dataLength(){return C(this,No).length}get consumed(){return C(this,_s)}get bytes(){return new Uint8Array(C(this,No))}subReader(t){return new xD(C(this,No).slice(C(this,_s)+t),this.allowLoose)}readBytes(t,n){let r=de(this,n7,Gce).call(this,0,t,!!n);return D(this,_s,C(this,_s)+r.length),r.slice(0,t)}readValue(){return eC(this.readBytes(ji))}readIndex(){return bKe(this.readBytes(ji))}};No=new WeakMap,_s=new WeakMap,n7=new WeakSet,Gce=function(t,n,r){let i=Math.ceil(n/ji)*ji;return C(this,_s)+i>C(this,No).length&&(this.allowLoose&&r&&C(this,_s)+n<=C(this,No).length?i=n:De(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:mi(C(this,No)),length:C(this,No).length,offset:C(this,_s)+i})),C(this,No).slice(C(this,_s),C(this,_s)+i)};let tR=xD;function nR(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function UKe(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function Kce(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function zKe(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");nR(e.outputLen),nR(e.blockLen)}function $Ke(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function HKe(e,t){Kce(e);const n=t.outputLen;if(e.lengthnew Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),R3=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),tc=(e,t)=>e<<32-t|e>>>t,VKe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!VKe)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));const WKe=async()=>{};async function rR(e,t,n){let r=Date.now();for(let i=0;i=0&&oObject.prototype.toString.call(e)==="[object Object]"&&e.constructor===Object;function Qce(e,t){if(t!==void 0&&(typeof t!="object"||!KKe(t)))throw new TypeError("Options should be object or undefined");return Object.assign(e,t)}function h2(e){const t=r=>e().update($h(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function QKe(e){const t=(r,i)=>e(i).update($h(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}class Yce extends I9{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Zn.hash(t);const r=$h(n);if(this.iHash=t.create(),!(this.iHash instanceof I9))throw new TypeError("Expected instance of class which extends utils.Hash");const i=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;const o=new Uint8Array(i);o.set(r.length>this.iHash.blockLen?t.create().update(r).digest():r);for(let s=0;snew Yce(e,t).update(n).digest();tC.create=(e,t)=>new Yce(e,t);const YKe=Object.freeze(Object.defineProperty({__proto__:null,hmac:tC},Symbol.toStringTag,{value:"Module"}));function qce(e,t,n,r){Zn.hash(e);const i=Qce({dkLen:32,asyncTick:10},r),{c:o,dkLen:s,asyncTick:a}=i;if(Zn.number(o),Zn.number(s),Zn.number(a),o<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=$h(t),u=$h(n),l=new Uint8Array(s),d=tC.create(e,c),f=d._cloneInto().update(u);return{c:o,dkLen:s,asyncTick:a,DK:l,PRF:d,PRFSalt:f}}function Zce(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function nC(e,t,n,r){const{c:i,dkLen:o,DK:s,PRF:a,PRFSalt:c}=qce(e,t,n,r);let u;const l=new Uint8Array(4),d=R3(l),f=new Uint8Array(a.outputLen);for(let h=1,p=0;p{c._cloneInto(l).update(h).digestInto(h);for(let b=0;b>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class nM extends I9{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=R3(this.buffer)}update(t){Zn.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=$h(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;ca.setUint32(4*u,c,o))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%n&&t.buffer.set(r),t}}const XKe=(e,t,n)=>e&t^~e&n,eQe=(e,t,n)=>e&t^e&n^t&n,tQe=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]),zl=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$l=new Uint32Array(64);class nQe extends nM{constructor(){super(64,32,8,!1),this.A=zl[0]|0,this.B=zl[1]|0,this.C=zl[2]|0,this.D=zl[3]|0,this.E=zl[4]|0,this.F=zl[5]|0,this.G=zl[6]|0,this.H=zl[7]|0}get(){const{A:t,B:n,C:r,D:i,E:o,F:s,G:a,H:c}=this;return[t,n,r,i,o,s,a,c]}set(t,n,r,i,o,s,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)$l[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const f=$l[d-15],h=$l[d-2],p=tc(f,7)^tc(f,18)^f>>>3,m=tc(h,17)^tc(h,19)^h>>>10;$l[d]=m+$l[d-7]+p+$l[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){const f=tc(a,6)^tc(a,11)^tc(a,25),h=l+f+XKe(a,c,u)+tQe[d]+$l[d]|0,m=(tc(r,2)^tc(r,13)^tc(r,22))+eQe(r,i,o)|0;l=u,u=c,c=a,a=s+h|0,s=o,o=i,i=r,r=h+m|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(r,i,o,s,a,c,u,l)}roundClean(){$l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const p2=h2(()=>new nQe),rQe=Object.freeze(Object.defineProperty({__proto__:null,sha256:p2},Symbol.toStringTag,{value:"Module"})),p6=BigInt(2**32-1),iR=BigInt(32);function Jce(e,t=!1){return t?{h:Number(e&p6),l:Number(e>>iR&p6)}:{h:Number(e>>iR&p6)|0,l:Number(e&p6)|0}}function iQe(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),sQe=(e,t,n)=>e>>>n,aQe=(e,t,n)=>e<<32-n|t>>>n,cQe=(e,t,n)=>e>>>n|t<<32-n,uQe=(e,t,n)=>e<<32-n|t>>>n,lQe=(e,t,n)=>e<<64-n|t>>>n-32,dQe=(e,t,n)=>e>>>n-32|t<<64-n,fQe=(e,t)=>t,hQe=(e,t)=>e,pQe=(e,t,n)=>e<>>32-n,gQe=(e,t,n)=>t<>>32-n,mQe=(e,t,n)=>t<>>64-n,yQe=(e,t,n)=>e<>>64-n;function bQe(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const vQe=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),xQe=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,wQe=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),EQe=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,CQe=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),AQe=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,xt={fromBig:Jce,split:iQe,toBig:oQe,shrSH:sQe,shrSL:aQe,rotrSH:cQe,rotrSL:uQe,rotrBH:lQe,rotrBL:dQe,rotr32H:fQe,rotr32L:hQe,rotlSH:pQe,rotlSL:gQe,rotlBH:mQe,rotlBL:yQe,add:bQe,add3L:vQe,add3H:xQe,add4L:wQe,add4H:EQe,add5H:AQe,add5L:CQe},[SQe,kQe]=xt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Hl=new Uint32Array(80),Vl=new Uint32Array(80);class rC extends nM{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:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:c,Eh:u,El:l,Fh:d,Fl:f,Gh:h,Gl:p,Hh:m,Hl:x}=this;return[t,n,r,i,o,s,a,c,u,l,d,f,h,p,m,x]}set(t,n,r,i,o,s,a,c,u,l,d,f,h,p,m,x){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=l|0,this.Fh=d|0,this.Fl=f|0,this.Gh=h|0,this.Gl=p|0,this.Hh=m|0,this.Hl=x|0}process(t,n){for(let v=0;v<16;v++,n+=4)Hl[v]=t.getUint32(n),Vl[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Hl[v-15]|0,E=Vl[v-15]|0,S=xt.rotrSH(w,E,1)^xt.rotrSH(w,E,8)^xt.shrSH(w,E,7),I=xt.rotrSL(w,E,1)^xt.rotrSL(w,E,8)^xt.shrSL(w,E,7),A=Hl[v-2]|0,O=Vl[v-2]|0,N=xt.rotrSH(A,O,19)^xt.rotrBH(A,O,61)^xt.shrSH(A,O,6),R=xt.rotrSL(A,O,19)^xt.rotrBL(A,O,61)^xt.shrSL(A,O,6),_=xt.add4L(I,R,Vl[v-7],Vl[v-16]),M=xt.add4H(_,S,N,Hl[v-7],Hl[v-16]);Hl[v]=M|0,Vl[v]=_|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:c,Dh:u,Dl:l,Eh:d,El:f,Fh:h,Fl:p,Gh:m,Gl:x,Hh:y,Hl:b}=this;for(let v=0;v<80;v++){const w=xt.rotrSH(d,f,14)^xt.rotrSH(d,f,18)^xt.rotrBH(d,f,41),E=xt.rotrSL(d,f,14)^xt.rotrSL(d,f,18)^xt.rotrBL(d,f,41),S=d&h^~d&m,I=f&p^~f&x,A=xt.add5L(b,E,I,kQe[v],Vl[v]),O=xt.add5H(A,y,w,S,SQe[v],Hl[v]),N=A|0,R=xt.rotrSH(r,i,28)^xt.rotrBH(r,i,34)^xt.rotrBH(r,i,39),_=xt.rotrSL(r,i,28)^xt.rotrBL(r,i,34)^xt.rotrBL(r,i,39),M=r&o^r&a^o&a,z=i&s^i&c^s&c;y=m|0,b=x|0,m=h|0,x=p|0,h=d|0,p=f|0,{h:d,l:f}=xt.add(u|0,l|0,O|0,N|0),u=a|0,l=c|0,a=o|0,c=s|0,o=r|0,s=i|0;const F=xt.add3L(N,_,z);r=xt.add3H(F,O,R,M),i=F|0}({h:r,l:i}=xt.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=xt.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l:c}=xt.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l}=xt.add(this.Dh|0,this.Dl|0,u|0,l|0),{h:d,l:f}=xt.add(this.Eh|0,this.El|0,d|0,f|0),{h,l:p}=xt.add(this.Fh|0,this.Fl|0,h|0,p|0),{h:m,l:x}=xt.add(this.Gh|0,this.Gl|0,m|0,x|0),{h:y,l:b}=xt.add(this.Hh|0,this.Hl|0,y|0,b|0),this.set(r,i,o,s,a,c,u,l,d,f,h,p,m,x,y,b)}roundClean(){Hl.fill(0),Vl.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)}}class TQe extends rC{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class _Qe extends rC{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const iC=h2(()=>new rC),PQe=h2(()=>new TQe),IQe=h2(()=>new _Qe),RQe=Object.freeze(Object.defineProperty({__proto__:null,SHA512:rC,sha384:IQe,sha512:iC,sha512_256:PQe},Symbol.toStringTag,{value:"Module"}));function NQe(){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 oW=NQe(),sW=oW.crypto||oW.msCrypto;function OQe(e){switch(e){case"sha256":return p2.create();case"sha512":return iC.create()}pe(!1,"invalid hashing algorithm name","algorithm",e)}function LQe(e,t){const n={sha256:p2,sha512:iC}[e];return pe(n!=null,"invalid hmac algorithm","algorithm",e),tC.create(n,t)}function BQe(e,t,n,r,i){const o={sha256:p2,sha512:iC}[i];return pe(o!=null,"invalid pbkdf2 algorithm","algorithm",i),nC(o,e,t,{c:n,dkLen:r})}function MQe(e){De(sW!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),pe(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return sW.getRandomValues(t),t}let Xce=!1;const eue=function(e,t,n){return LQe(e,t).update(n).digest()};let tue=eue;function rp(e,t,n){const r=tt(t,"key"),i=tt(n,"data");return Ve(tue(e,r,i))}rp._=eue;rp.lock=function(){Xce=!0};rp.register=function(e){if(Xce)throw new Error("computeHmac is locked");tue=e};Object.freeze(rp);const[nue,rue,iue]=[[],[],[]],DQe=BigInt(0),cy=BigInt(1),jQe=BigInt(2),FQe=BigInt(7),UQe=BigInt(256),zQe=BigInt(113);for(let e=0,t=cy,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],nue.push(2*(5*r+n)),rue.push((e+1)*(e+2)/2%64);let i=DQe;for(let o=0;o<7;o++)t=(t<>FQe)*zQe)%UQe,t&jQe&&(i^=cy<<(cy<n>32?xt.rotlBH(e,t,n):xt.rotlSH(e,t,n),cW=(e,t,n)=>n>32?xt.rotlBL(e,t,n):xt.rotlSL(e,t,n);function oue(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const a=(s+8)%10,c=(s+2)%10,u=n[c],l=n[c+1],d=aW(u,l,1)^n[a],f=cW(u,l,1)^n[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){const a=rue[s],c=aW(i,o,a),u=cW(i,o,a),l=nue[s];i=e[l],o=e[l+1],e[l]=c,e[l+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=$Qe[r],e[1]^=HQe[r]}n.fill(0)}class N5 extends I9{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Zn.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=R8(this.state)}keccak(){oue(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Zn.exists(this);const{blockLen:n,state:r}=this;t=$h(t);const i=t.length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Zn.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Zn.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new N5(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}}const kf=(e,t,n)=>h2(()=>new N5(t,e,n)),VQe=kf(6,144,224/8),WQe=kf(6,136,256/8),GQe=kf(6,104,384/8),KQe=kf(6,72,512/8),QQe=kf(1,144,224/8),sue=kf(1,136,256/8),YQe=kf(1,104,384/8),qQe=kf(1,72,512/8),aue=(e,t,n)=>QKe((r={})=>new N5(t,e,r.dkLen===void 0?n:r.dkLen,!0)),ZQe=aue(31,168,128/8),JQe=aue(31,136,256/8),XQe=Object.freeze(Object.defineProperty({__proto__:null,Keccak:N5,keccakP:oue,keccak_224:QQe,keccak_256:sue,keccak_384:YQe,keccak_512:qQe,sha3_224:VQe,sha3_256:WQe,sha3_384:GQe,sha3_512:KQe,shake128:ZQe,shake256:JQe},Symbol.toStringTag,{value:"Module"}));let cue=!1;const uue=function(e){return sue(e)};let lue=uue;function _n(e){const t=tt(e,"data");return Ve(lue(t))}_n._=uue;_n.lock=function(){cue=!0};_n.register=function(e){if(cue)throw new TypeError("keccak256 is locked");lue=e};Object.freeze(_n);const eYe=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),due=Uint8Array.from({length:16},(e,t)=>t),tYe=due.map(e=>(9*e+5)%16);let rM=[due],iM=[tYe];for(let e=0;e<4;e++)for(let t of[rM,iM])t.push(t[e].map(n=>eYe[n]));const fue=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),nYe=rM.map((e,t)=>e.map(n=>fue[t][n])),rYe=iM.map((e,t)=>e.map(n=>fue[t][n])),iYe=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),oYe=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),g6=(e,t)=>e<>>32-t;function uW(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const m6=new Uint32Array(16);class hue extends nM{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let h=0;h<16;h++,n+=4)m6[h]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,c=a,u=this.h3|0,l=u,d=this.h4|0,f=d;for(let h=0;h<5;h++){const p=4-h,m=iYe[h],x=oYe[h],y=rM[h],b=iM[h],v=nYe[h],w=rYe[h];for(let E=0;E<16;E++){const S=g6(r+uW(h,o,a,u)+m6[y[E]]+m,v[E])+d|0;r=d,d=u,u=g6(a,10)|0,a=o,o=S}for(let E=0;E<16;E++){const S=g6(i+uW(p,s,c,l)+m6[b[E]]+x,w[E])+f|0;i=f,f=l,l=g6(c,10)|0,c=s,s=S}}this.set(this.h1+a+l|0,this.h2+u+f|0,this.h3+d+i|0,this.h4+r+s|0,this.h0+o+c|0)}roundClean(){m6.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const pue=h2(()=>new hue),sYe=Object.freeze(Object.defineProperty({__proto__:null,RIPEMD160:hue,ripemd160:pue},Symbol.toStringTag,{value:"Module"}));let gue=!1;const mue=function(e){return pue(e)};let yue=mue;function g2(e){const t=tt(e,"data");return Ve(yue(t))}g2._=mue;g2.lock=function(){gue=!0};g2.register=function(e){if(gue)throw new TypeError("ripemd160 is locked");yue=e};Object.freeze(g2);let bue=!1;const vue=function(e,t,n,r,i){return BQe(e,t,n,r,i)};let xue=vue;function Tf(e,t,n,r,i){const o=tt(e,"password"),s=tt(t,"salt");return Ve(xue(o,s,n,r,i))}Tf._=vue;Tf.lock=function(){bue=!0};Tf.register=function(e){if(bue)throw new Error("pbkdf2 is locked");xue=e};Object.freeze(Tf);let wue=!1;const Eue=function(e){return new Uint8Array(MQe(e))};let Cue=Eue;function Xu(e){return Cue(e)}Xu._=Eue;Xu.lock=function(){wue=!0};Xu.register=function(e){if(wue)throw new Error("randomBytes is locked");Cue=e};Object.freeze(Xu);const Kt=(e,t)=>e<>>32-t;function lW(e,t,n,r,i,o){let s=e[t++]^n[r++],a=e[t++]^n[r++],c=e[t++]^n[r++],u=e[t++]^n[r++],l=e[t++]^n[r++],d=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],p=e[t++]^n[r++],m=e[t++]^n[r++],x=e[t++]^n[r++],y=e[t++]^n[r++],b=e[t++]^n[r++],v=e[t++]^n[r++],w=e[t++]^n[r++],E=e[t++]^n[r++],S=s,I=a,A=c,O=u,N=l,R=d,_=f,M=h,z=p,F=m,$=x,W=y,G=b,H=v,L=w,q=E;for(let V=0;V<8;V+=2)N^=Kt(S+G|0,7),z^=Kt(N+S|0,9),G^=Kt(z+N|0,13),S^=Kt(G+z|0,18),F^=Kt(R+I|0,7),H^=Kt(F+R|0,9),I^=Kt(H+F|0,13),R^=Kt(I+H|0,18),L^=Kt($+_|0,7),A^=Kt(L+$|0,9),_^=Kt(A+L|0,13),$^=Kt(_+A|0,18),O^=Kt(q+W|0,7),M^=Kt(O+q|0,9),W^=Kt(M+O|0,13),q^=Kt(W+M|0,18),I^=Kt(S+O|0,7),A^=Kt(I+S|0,9),O^=Kt(A+I|0,13),S^=Kt(O+A|0,18),_^=Kt(R+N|0,7),M^=Kt(_+R|0,9),N^=Kt(M+_|0,13),R^=Kt(N+M|0,18),W^=Kt($+F|0,7),z^=Kt(W+$|0,9),F^=Kt(z+W|0,13),$^=Kt(F+z|0,18),G^=Kt(q+L|0,7),H^=Kt(G+q|0,9),L^=Kt(H+G|0,13),q^=Kt(L+H|0,18);i[o++]=s+S|0,i[o++]=a+I|0,i[o++]=c+A|0,i[o++]=u+O|0,i[o++]=l+N|0,i[o++]=d+R|0,i[o++]=f+_|0,i[o++]=h+M|0,i[o++]=p+z|0,i[o++]=m+F|0,i[o++]=x+$|0,i[o++]=y+W|0,i[o++]=b+G|0,i[o++]=v+H|0,i[o++]=w+L|0,i[o++]=E+q|0}function Y1(e,t,n,r,i){let o=r+0,s=r+16*i;for(let a=0;a<16;a++)n[s+a]=e[t+(2*i-1)*16+a];for(let a=0;a0&&(s+=16),lW(n,o,e,t+=16,n,s)}function Aue(e,t,n){const r=Qce({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:i,r:o,p:s,dkLen:a,asyncTick:c,maxmem:u,onProgress:l}=r;if(Zn.number(i),Zn.number(o),Zn.number(s),Zn.number(a),Zn.number(c),Zn.number(u),l!==void 0&&typeof l!="function")throw new Error("progressCb should be function");const d=128*o,f=d/4;if(i<=1||i&i-1||i>=2**(d/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(s<0||s>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const h=d*(i+s);if(h>u)throw new Error(`Scrypt: parameters too large, ${h} (128 * r * (N + p)) > ${u} (maxmem)`);const p=nC(p2,e,t,{c:1,dkLen:d*s}),m=R8(p),x=R8(new Uint8Array(d*i)),y=R8(new Uint8Array(d));let b=()=>{};if(l){const v=2*i*s,w=Math.max(Math.floor(v/1e4),1);let E=0;b=()=>{E++,l&&(!(E%w)||E===v)&&l(E/v)}}return{N:i,r:o,p:s,dkLen:a,blockSize32:f,V:x,B32:m,B:p,tmp:y,blockMixCb:b,asyncTick:c}}function Sue(e,t,n,r,i){const o=nC(p2,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),o}function kue(e,t,n){const{N:r,r:i,p:o,dkLen:s,blockSize32:a,V:c,B32:u,B:l,tmp:d,blockMixCb:f}=Aue(e,t,n);for(let h=0;h{Y1(c,x,c,x+=a,i),f()}),Y1(c,(r-1)*a,u,m,i),f(),await rR(r,h,y=>{const b=u[m+a-16]%r;for(let v=0;v(e+t/$d)/t,y6={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){const{n:t}=bn,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Hn*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=fW(o*e,t),c=fW(-r*e,t);let u=Ye(e-a*n-c*i,t),l=Ye(-a*r-c*o,t);const d=u>s,f=l>s;if(d&&(u=t-u),f&&(l=t-l),u>s||l>s)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}},Oa=32,Hh=32,Due=32,R9=Oa+1,N9=2*Oa+1;function hW(e){const{a:t,b:n}=bn,r=Ye(e*e),i=Ye(r*e);return Ye(i+t*e+n)}const b6=bn.a===$t;class oM extends Error{constructor(t){super(t)}}function pW(e){if(!(e instanceof rn))throw new TypeError("JacobianPoint expected")}class rn{constructor(t,n,r){this.x=t,this.y=n,this.z=r}static fromAffine(t){if(!(t instanceof jt))throw new TypeError("JacobianPoint#fromAffine: expected Point");return t.equals(jt.ZERO)?rn.ZERO:new rn(t.x,t.y,Hn)}static toAffineBatch(t){const n=pYe(t.map(r=>r.z));return t.map((r,i)=>r.toAffine(n[i]))}static normalizeZ(t){return rn.toAffineBatch(t).map(rn.fromAffine)}equals(t){pW(t);const{x:n,y:r,z:i}=this,{x:o,y:s,z:a}=t,c=Ye(i*i),u=Ye(a*a),l=Ye(n*u),d=Ye(o*c),f=Ye(Ye(r*a)*u),h=Ye(Ye(s*i)*c);return l===d&&f===h}negate(){return new rn(this.x,Ye(-this.y),this.z)}double(){const{x:t,y:n,z:r}=this,i=Ye(t*t),o=Ye(n*n),s=Ye(o*o),a=t+o,c=Ye($d*(Ye(a*a)-i-s)),u=Ye(N3*i),l=Ye(u*u),d=Ye(l-$d*c),f=Ye(u*(c-d)-dW*s),h=Ye($d*n*r);return new rn(d,f,h)}add(t){pW(t);const{x:n,y:r,z:i}=this,{x:o,y:s,z:a}=t;if(o===$t||s===$t)return this;if(n===$t||r===$t)return t;const c=Ye(i*i),u=Ye(a*a),l=Ye(n*u),d=Ye(o*c),f=Ye(Ye(r*a)*u),h=Ye(Ye(s*i)*c),p=Ye(d-l),m=Ye(h-f);if(p===$t)return m===$t?this.double():rn.ZERO;const x=Ye(p*p),y=Ye(p*x),b=Ye(l*x),v=Ye(m*m-y-$d*b),w=Ye(m*(b-v)-f*y),E=Ye(i*a*p);return new rn(v,w,E)}subtract(t){return this.add(t.negate())}multiplyUnsafe(t){const n=rn.ZERO;if(typeof t=="bigint"&&t===$t)return n;let r=yW(t);if(r===Hn)return this;if(!b6){let d=n,f=this;for(;r>$t;)r&Hn&&(d=d.add(f)),f=f.double(),r>>=Hn;return d}let{k1neg:i,k1:o,k2neg:s,k2:a}=y6.splitScalar(r),c=n,u=n,l=this;for(;o>$t||a>$t;)o&Hn&&(c=c.add(l)),a&Hn&&(u=u.add(l)),l=l.double(),o>>=Hn,a>>=Hn;return i&&(c=c.negate()),s&&(u=u.negate()),u=new rn(Ye(u.x*y6.beta),u.y,u.z),c.add(u)}precomputeWindow(t){const n=b6?128/t+1:256/t+1,r=[];let i=this,o=i;for(let s=0;s>=d,p>c&&(p-=l,t+=Hn);const m=h,x=h+Math.abs(p)-1,y=f%2!==0,b=p<0;p===0?s=s.add(v6(y,i[m])):o=o.add(v6(b,i[x]))}return{p:o,f:s}}multiply(t,n){let r=yW(t),i,o;if(b6){const{k1neg:s,k1:a,k2neg:c,k2:u}=y6.splitScalar(r);let{p:l,f:d}=this.wNAF(a,n),{p:f,f:h}=this.wNAF(u,n);l=v6(s,l),f=v6(c,f),f=new rn(Ye(f.x*y6.beta),f.y,f.z),i=l.add(f),o=d.add(h)}else{const{p:s,f:a}=this.wNAF(r,n);i=s,o=a}return rn.normalizeZ([i,o])[0]}toAffine(t){const{x:n,y:r,z:i}=this,o=this.equals(rn.ZERO);t==null&&(t=o?dW:b2(i));const s=t,a=Ye(s*s),c=Ye(a*s),u=Ye(n*a),l=Ye(r*c),d=Ye(i*s);if(o)return jt.ZERO;if(d!==Hn)throw new Error("invZ was invalid");return new jt(u,l)}}rn.BASE=new rn(bn.Gx,bn.Gy,Hn);rn.ZERO=new rn($t,Hn,$t);function v6(e,t){const n=t.negate();return e?n:t}const oR=new WeakMap;class jt{constructor(t,n){this.x=t,this.y=n}_setWindowSize(t){this._WINDOW_SIZE=t,oR.delete(this)}hasEvenY(){return this.y%$d===$t}static fromCompressedHex(t){const n=t.length===32,r=Ko(n?t:t.subarray(1));if(!O8(r))throw new Error("Point is not on curve");const i=hW(r);let o=hYe(i);const s=(o&Hn)===Hn;n?s&&(o=Ye(-o)):(t[0]&1)===1!==s&&(o=Ye(-o));const a=new jt(r,o);return a.assertValidity(),a}static fromUncompressedHex(t){const n=Ko(t.subarray(1,Oa+1)),r=Ko(t.subarray(Oa+1,Oa*2+1)),i=new jt(n,r);return i.assertValidity(),i}static fromHex(t){const n=Hc(t),r=n.length,i=n[0];if(r===Oa)return this.fromCompressedHex(n);if(r===R9&&(i===2||i===3))return this.fromCompressedHex(n);if(r===N9&&i===4)return this.fromUncompressedHex(n);throw new Error(`Point.fromHex: received invalid point. Expected 32-${R9} compressed bytes or ${N9} uncompressed bytes, not ${r}`)}static fromPrivateKey(t){return jt.BASE.multiply(Vh(t))}static fromSignature(t,n,r){const{r:i,s:o}=Uue(n);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const s=sM(Hc(t)),{n:a}=bn,c=r===2||r===3?i+a:i,u=b2(c,a),l=Ye(-s*u,a),d=Ye(o*u,a),f=r&1?"03":"02",h=jt.fromHex(f+sf(c)),p=jt.BASE.multiplyAndAddUnsafe(h,l,d);if(!p)throw new Error("Cannot recover signature: point at infinify");return p.assertValidity(),p}toRawBytes(t=!1){return af(this.toHex(t))}toHex(t=!1){const n=sf(this.x);return t?`${this.hasEvenY()?"02":"03"}${n}`:`04${n}${sf(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const t="Point is not on elliptic curve",{x:n,y:r}=this;if(!O8(n)||!O8(r))throw new Error(t);const i=Ye(r*r),o=hW(n);if(Ye(i-o)!==$t)throw new Error(t)}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new jt(this.x,Ye(-this.y))}double(){return rn.fromAffine(this).double().toAffine()}add(t){return rn.fromAffine(this).add(rn.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return rn.fromAffine(this).multiply(t,this).toAffine()}multiplyAndAddUnsafe(t,n,r){const i=rn.fromAffine(this),o=n===$t||n===Hn||this!==jt.BASE?i.multiplyUnsafe(n):i.multiply(n),s=rn.fromAffine(t).multiplyUnsafe(r),a=o.add(s);return a.equals(rn.ZERO)?void 0:a.toAffine()}}jt.BASE=new jt(bn.Gx,bn.Gy);jt.ZERO=new jt($t,$t);function gW(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function mW(e){if(e.length<2||e[0]!==2)throw new Error(`Invalid signature integer tag: ${Lm(e)}`);const t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new Error("Invalid signature integer: wrong length");if(n[0]===0&&n[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:Ko(n),left:e.subarray(t+2)}}function lYe(e){if(e.length<2||e[0]!=48)throw new Error(`Invalid signature tag: ${Lm(e)}`);if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:n}=mW(e.subarray(2)),{data:r,left:i}=mW(n);if(i.length)throw new Error(`Invalid signature: left bytes after parsing: ${Lm(i)}`);return{r:t,s:r}}let wh=class N8{constructor(t,n){this.r=t,this.s=n,this.assertValidity()}static fromCompact(t){const n=t instanceof Uint8Array,r="Signature.fromCompact";if(typeof t!="string"&&!n)throw new TypeError(`${r}: Expected string or Uint8Array`);const i=n?Lm(t):t;if(i.length!==128)throw new Error(`${r}: Expected 64-byte hex`);return new N8(O9(i.slice(0,64)),O9(i.slice(64,128)))}static fromDER(t){const n=t instanceof Uint8Array;if(typeof t!="string"&&!n)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r,s:i}=lYe(n?t:af(t));return new N8(r,i)}static fromHex(t){return this.fromDER(t)}assertValidity(){const{r:t,s:n}=this;if(!Mm(t))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Mm(n))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const t=bn.n>>Hn;return this.s>t}normalizeS(){return this.hasHighS()?new N8(this.r,Ye(-this.s,bn.n)):this}toDERRawBytes(){return af(this.toDERHex())}toDERHex(){const t=gW(uy(this.s)),n=gW(uy(this.r)),r=t.length/2,i=n.length/2,o=uy(r),s=uy(i);return`30${uy(i+r+4)}02${s}${n}02${o}${t}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return af(this.toCompactHex())}toCompactHex(){return sf(this.r)+sf(this.s)}};function hd(...e){if(!e.every(r=>r instanceof Uint8Array))throw new Error("Uint8Array list expected");if(e.length===1)return e[0];const t=e.reduce((r,i)=>r+i.length,0),n=new Uint8Array(t);for(let r=0,i=0;rt.toString(16).padStart(2,"0"));function Lm(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let n=0;n0)return BigInt(e);if(typeof e=="bigint"&&Mm(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function Ye(e,t=bn.P){const n=e%t;return n>=$t?n:t+n}function ls(e,t){const{P:n}=bn;let r=e;for(;t-- >$t;)r*=r,r%=n;return r}function hYe(e){const{P:t}=bn,n=BigInt(6),r=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),c=e*e*e%t,u=c*c*e%t,l=ls(u,N3)*u%t,d=ls(l,N3)*u%t,f=ls(d,$d)*c%t,h=ls(f,r)*f%t,p=ls(h,i)*h%t,m=ls(p,s)*p%t,x=ls(m,a)*m%t,y=ls(x,s)*p%t,b=ls(y,N3)*u%t,v=ls(b,o)*h%t,w=ls(v,n)*c%t,E=ls(w,$d);if(E*E%t!==e)throw new Error("Cannot find square root");return E}function b2(e,t=bn.P){if(e===$t||t<=$t)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Ye(e,t),r=t,i=$t,o=Hn;for(;n!==$t;){const a=r/n,c=r%n,u=i-o*a;r=n,n=c,i=o,o=u}if(r!==Hn)throw new Error("invert: does not exist");return Ye(i,t)}function pYe(e,t=bn.P){const n=new Array(e.length),r=e.reduce((o,s,a)=>s===$t?o:(n[a]=o,Ye(o*s,t)),Hn),i=b2(r,t);return e.reduceRight((o,s,a)=>s===$t?o:(n[a]=Ye(o*n[a],t),Ye(o*s,t)),i),n}function gYe(e){const t=e.length*8-Hh*8,n=Ko(e);return t>0?n>>BigInt(t):n}function sM(e,t=!1){const n=gYe(e);if(t)return n;const{n:r}=bn;return n>=r?n-r:n}let q1,O3;class jue{constructor(t,n){if(this.hashLen=t,this.qByteLen=n,typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(t).fill(1),this.k=new Uint8Array(t).fill(0),this.counter=0}hmac(...t){return co.hmacSha256(this.k,...t)}hmacSync(...t){return O3(this.k,...t)}checkSync(){if(typeof O3!="function")throw new oM("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(t=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),t),this.v=await this.hmac(this.v),t.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),t),this.v=await this.hmac(this.v))}reseedSync(t=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),t),this.v=this.hmacSync(this.v),t.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),t),this.v=this.hmacSync(this.v))}async generate(){this.incr();let t=0;const n=[];for(;t0)t=BigInt(e);else if(typeof e=="string"){if(e.length!==2*Hh)throw new Error("Expected 32 bytes of private key");t=O9(e)}else if(e instanceof Uint8Array){if(e.length!==Hh)throw new Error("Expected 32 bytes of private key");t=Ko(e)}else throw new TypeError("Expected valid private key");if(!Mm(t))throw new Error("Expected private key: 0 < key < n");return t}function aM(e){return e instanceof jt?(e.assertValidity(),e):jt.fromHex(e)}function Uue(e){if(e instanceof wh)return e.assertValidity(),e;try{return wh.fromDER(e)}catch{return wh.fromCompact(e)}}function zue(e,t=!1){return jt.fromPrivateKey(e).toRawBytes(t)}function $ue(e,t,n,r=!1){return jt.fromSignature(e,t,n).toRawBytes(r)}function bW(e){const t=e instanceof Uint8Array,n=typeof e=="string",r=(t||n)&&e.length;return t?r===R9||r===N9:n?r===R9*2||r===N9*2:e instanceof jt}function Hue(e,t,n=!1){if(bW(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!bW(t))throw new TypeError("getSharedSecret: second arg must be public key");const r=aM(t);return r.assertValidity(),r.multiply(Vh(e)).toRawBytes(n)}function Vue(e){const t=e.length>Oa?e.slice(0,Oa):e;return Ko(t)}function mYe(e){const t=Vue(e),n=Ye(t,bn.n);return Wue(n<$t?t:n)}function Wue(e){return Bm(e)}function Gue(e,t,n){if(e==null)throw new Error(`sign: expected valid message hash, not "${e}"`);const r=Hc(e),i=Vh(t),o=[Wue(i),mYe(r)];if(n!=null){n===!0&&(n=co.randomBytes(Oa));const c=Hc(n);if(c.length!==Oa)throw new Error(`sign: Expected ${Oa} bytes of extra data`);o.push(c)}const s=hd(...o),a=Vue(r);return{seed:s,m:a,d:i}}function Kue(e,t){const{sig:n,recovery:r}=e,{der:i,recovered:o}=Object.assign({canonical:!0,der:!0},t),s=i?n.toDERRawBytes():n.toCompactRawBytes();return o?[s,r]:s}async function yYe(e,t,n={}){const{seed:r,m:i,d:o}=Gue(e,t,n.extraEntropy),s=new jue(Due,Hh);await s.reseed(r);let a;for(;!(a=Fue(await s.generate(),i,o,n.canonical));)await s.reseed();return Kue(a,n)}function Que(e,t,n={}){const{seed:r,m:i,d:o}=Gue(e,t,n.extraEntropy),s=new jue(Due,Hh);s.reseedSync(r);let a;for(;!(a=Fue(s.generateSync(),i,o,n.canonical));)s.reseedSync();return Kue(a,n)}const bYe={strict:!0};function vYe(e,t,n,r=bYe){let i;try{i=Uue(e),t=Hc(t)}catch{return!1}const{r:o,s}=i;if(r.strict&&i.hasHighS())return!1;const a=sM(t);let c;try{c=aM(n)}catch{return!1}const{n:u}=bn,l=b2(s,u),d=Ye(a*l,u),f=Ye(o*l,u),h=jt.BASE.multiplyAndAddUnsafe(c,d,f);return h?Ye(h.x,u)===o:!1}function L9(e){return Ye(Ko(e),bn.n)}class Dm{constructor(t,n){this.r=t,this.s=n,this.assertValidity()}static fromHex(t){const n=Hc(t);if(n.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${n.length}`);const r=Ko(n.subarray(0,32)),i=Ko(n.subarray(32,64));return new Dm(r,i)}assertValidity(){const{r:t,s:n}=this;if(!O8(t)||!Mm(n))throw new Error("Invalid signature")}toHex(){return sf(this.r)+sf(this.s)}toRawBytes(){return af(this.toHex())}}function xYe(e){return jt.fromPrivateKey(e).toRawX()}class Yue{constructor(t,n,r=co.randomBytes()){if(t==null)throw new TypeError(`sign: Expected valid message, not "${t}"`);this.m=Hc(t);const{x:i,scalar:o}=this.getScalar(Vh(n));if(this.px=i,this.d=o,this.rand=Hc(r),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(t){const n=jt.fromPrivateKey(t),r=n.hasEvenY()?t:bn.n-t;return{point:n,scalar:r,x:n.toRawX()}}initNonce(t,n){return Bm(t^Ko(n))}finalizeNonce(t){const n=Ye(Ko(t),bn.n);if(n===$t)throw new Error("sign: Creation of signature failed. k is zero");const{point:r,x:i,scalar:o}=this.getScalar(n);return{R:r,rx:i,k:o}}finalizeSig(t,n,r,i){return new Dm(t.x,Ye(n+r*i,bn.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:t,d:n,px:r,rand:i}=this,o=co.taggedHash,s=this.initNonce(n,await o(ad.aux,i)),{R:a,rx:c,k:u}=this.finalizeNonce(await o(ad.nonce,s,r,t)),l=L9(await o(ad.challenge,c,r,t)),d=this.finalizeSig(a,u,l,n);return await Jue(d,t,r)||this.error(),d}calcSync(){const{m:t,d:n,px:r,rand:i}=this,o=co.taggedHashSync,s=this.initNonce(n,o(ad.aux,i)),{R:a,rx:c,k:u}=this.finalizeNonce(o(ad.nonce,s,r,t)),l=L9(o(ad.challenge,c,r,t)),d=this.finalizeSig(a,u,l,n);return Xue(d,t,r)||this.error(),d}}async function wYe(e,t,n){return new Yue(e,t,n).calc()}function EYe(e,t,n){return new Yue(e,t,n).calcSync()}function que(e,t,n){const r=e instanceof Dm,i=r?e:Dm.fromHex(e);return r&&i.assertValidity(),{...i,m:Hc(t),P:aM(n)}}function Zue(e,t,n,r){const i=jt.BASE.multiplyAndAddUnsafe(t,Vh(n),Ye(-r,bn.n));return!(!i||!i.hasEvenY()||i.x!==e)}async function Jue(e,t,n){try{const{r,s:i,m:o,P:s}=que(e,t,n),a=L9(await co.taggedHash(ad.challenge,Bm(r),s.toRawX(),o));return Zue(r,s,i,a)}catch{return!1}}function Xue(e,t,n){try{const{r,s:i,m:o,P:s}=que(e,t,n),a=L9(co.taggedHashSync(ad.challenge,Bm(r),s.toRawX(),o));return Zue(r,s,i,a)}catch(r){if(r instanceof oM)throw r;return!1}}const CYe={Signature:Dm,getPublicKey:xYe,sign:wYe,verify:Jue,signSync:EYe,verifySync:Xue};jt.BASE._setWindowSize(8);const wo={node:uYe,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},ad={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},x6={},co={bytesToHex:Lm,hexToBytes:af,concatBytes:hd,mod:Ye,invert:b2,isValidPrivateKey(e){try{return Vh(e),!0}catch{return!1}},_bigintTo32Bytes:Bm,_normalizePrivateKey:Vh,hashToPrivateKey:e=>{e=Hc(e);const t=Hh+8;if(e.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const n=Ye(Ko(e),bn.n-Hn)+Hn;return Bm(n)},randomBytes:(e=32)=>{if(wo.web)return wo.web.getRandomValues(new Uint8Array(e));if(wo.node){const{randomBytes:t}=wo.node;return Uint8Array.from(t(e))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>co.hashToPrivateKey(co.randomBytes(Hh+8)),precompute(e=8,t=jt.BASE){const n=t===jt.BASE?t:new jt(t.x,t.y);return n._setWindowSize(e),n.multiply(N3),n},sha256:async(...e)=>{if(wo.web){const t=await wo.web.subtle.digest("SHA-256",hd(...e));return new Uint8Array(t)}else if(wo.node){const{createHash:t}=wo.node,n=t("sha256");return e.forEach(r=>n.update(r)),Uint8Array.from(n.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(e,...t)=>{if(wo.web){const n=await wo.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),r=hd(...t),i=await wo.web.subtle.sign("HMAC",n,r);return new Uint8Array(i)}else if(wo.node){const{createHmac:n}=wo.node,r=n("sha256",e);return t.forEach(i=>r.update(i)),Uint8Array.from(r.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(e,...t)=>{let n=x6[e];if(n===void 0){const r=await co.sha256(Uint8Array.from(e,i=>i.charCodeAt(0)));n=hd(r,r),x6[e]=n}return co.sha256(n,...t)},taggedHashSync:(e,...t)=>{if(typeof q1!="function")throw new oM("sha256Sync is undefined, you need to set it");let n=x6[e];if(n===void 0){const r=q1(Uint8Array.from(e,i=>i.charCodeAt(0)));n=hd(r,r),x6[e]=n}return q1(n,...t)},_JacobianPoint:rn};Object.defineProperties(co,{sha256Sync:{configurable:!1,get(){return q1},set(e){q1||(q1=e)}},hmacSha256Sync:{configurable:!1,get(){return O3},set(e){O3||(O3=e)}}});const AYe=Object.freeze(Object.defineProperty({__proto__:null,CURVE:bn,Point:jt,Signature:wh,getPublicKey:zue,getSharedSecret:Hue,recoverPublicKey:$ue,schnorr:CYe,sign:yYe,signSync:Que,utils:co,verify:vYe},Symbol.toStringTag,{value:"Module"})),sR="0x0000000000000000000000000000000000000000",vW="0x0000000000000000000000000000000000000000000000000000000000000000",SYe=`Ethereum Signed Message: +`,xW=BigInt(0),wW=BigInt(1),EW=BigInt(2),CW=BigInt(27),AW=BigInt(28),w6=BigInt(35),kp={};function SW(e){return zh(ao(e),32)}var vg,xg,wg,X0;const fa=class fa{constructor(t,n,r,i){J(this,vg);J(this,xg);J(this,wg);J(this,X0);np(t,kp,"Signature"),D(this,vg,n),D(this,xg,r),D(this,wg,i),D(this,X0,null)}get r(){return C(this,vg)}set r(t){pe(Q1(t)===32,"invalid r","value",t),D(this,vg,Ve(t))}get s(){return C(this,xg)}set s(t){pe(Q1(t)===32,"invalid s","value",t);const n=Ve(t);pe(parseInt(n.substring(0,3))<8,"non-canonical s","value",n),D(this,xg,n)}get v(){return C(this,wg)}set v(t){const n=It(t,"value");pe(n===27||n===28,"invalid v","v",t),D(this,wg,n)}get networkV(){return C(this,X0)}get legacyChainId(){const t=this.networkV;return t==null?null:fa.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=tt(this.s);return this.yParity&&(t[0]|=128),Ve(t)}get compactSerialized(){return wn([this.r,this.yParityAndS])}get serialized(){return wn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new fa(kp,this.r,this.s,this.v);return this.networkV&&D(t,X0,this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(t){const n=at(t,"v");return n==CW||n==AW?xW:(pe(n>=w6,"invalid EIP-155 v","v",t),(n-w6)/EW)}static getChainIdV(t,n){return at(t)*EW+BigInt(35+n-27)}static getNormalizedV(t){const n=at(t);return n===xW||n===CW?27:n===wW||n===AW?28:(pe(n>=w6,"invalid v","v",t),n&wW?27:28)}static from(t){function n(u,l){pe(u,l,"signature",t)}if(t==null)return new fa(kp,vW,vW,27);if(typeof t=="string"){const u=tt(t,"signature");if(u.length===64){const l=Ve(u.slice(0,32)),d=u.slice(32,64),f=d[0]&128?28:27;return d[0]&=127,new fa(kp,l,Ve(d),f)}if(u.length===65){const l=Ve(u.slice(0,32)),d=u.slice(32,64);n((d[0]&128)===0,"non-canonical s");const f=fa.getNormalizedV(u[64]);return new fa(kp,l,Ve(d),f)}n(!1,"invalid raw signature length")}if(t instanceof fa)return t.clone();const r=t.r;n(r!=null,"missing r");const i=SW(r),o=function(u,l){if(u!=null)return SW(u);if(l!=null){n(er(l,32),"invalid yParityAndS");const d=tt(l);return d[0]&=127,Ve(d)}n(!1,"missing s")}(t.s,t.yParityAndS);n((tt(o)[0]&128)==0,"non-canonical s");const{networkV:s,v:a}=function(u,l,d){if(u!=null){const f=at(u);return{networkV:f>=w6?f:void 0,v:fa.getNormalizedV(f)}}if(l!=null)return n(er(l,32),"invalid yParityAndS"),{v:tt(l)[0]&128?28:27};if(d!=null){switch(It(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}n(!1,"invalid yParity")}n(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),c=new fa(kp,i,o,a);return s&&D(c,X0,s),n(t.yParity==null||It(t.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),n(t.yParityAndS==null||t.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};vg=new WeakMap,xg=new WeakMap,wg=new WeakMap,X0=new WeakMap;let Fa=fa;co.hmacSha256Sync=function(e,...t){return tt(rp("sha256",e,wn(t)))};var Su;const A0=class A0{constructor(t){J(this,Su);pe(Q1(t)===32,"invalid private key","privateKey","[REDACTED]"),D(this,Su,Ve(t))}get privateKey(){return C(this,Su)}get publicKey(){return A0.computePublicKey(C(this,Su))}get compressedPublicKey(){return A0.computePublicKey(C(this,Su),!0)}sign(t){pe(Q1(t)===32,"invalid digest length","digest",t);const[n,r]=Que(mi(t),mi(C(this,Su)),{recovered:!0,canonical:!0}),i=wh.fromHex(n);return Fa.from({r:ml("0x"+i.r.toString(16),32),s:ml("0x"+i.s.toString(16),32),v:r?28:27})}computeSharedSecret(t){const n=A0.computePublicKey(t);return Ve(Hue(mi(C(this,Su)),tt(n)))}static computePublicKey(t,n){let r=tt(t,"key");if(r.length===32){const o=zue(r,!!n);return Ve(o)}if(r.length===64){const o=new Uint8Array(65);o[0]=4,o.set(r,1),r=o}const i=jt.fromHex(r);return Ve(i.toRawBytes(n))}static recoverPublicKey(t,n){pe(Q1(t)===32,"invalid digest length","digest",t);const r=Fa.from(n),i=wh.fromCompact(mi(wn([r.r,r.s]))).toDERRawBytes(),o=$ue(mi(t),i,r.yParity);return pe(o!=null,"invalid signautre for digest","signature",n),Ve(o)}static addPoints(t,n,r){const i=jt.fromHex(A0.computePublicKey(t).substring(2)),o=jt.fromHex(A0.computePublicKey(n).substring(2));return"0x"+i.add(o).toHex(!!r)}};Su=new WeakMap;let Uc=A0;const kYe=BigInt(0),TYe=BigInt(36);function kW(e){e=e.toLowerCase();const t=e.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=t[i].charCodeAt(0);const r=tt(_n(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(r[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const cM={};for(let e=0;e<10;e++)cM[String(e)]=String(e);for(let e=0;e<26;e++)cM[String.fromCharCode(65+e)]=String(10+e);const TW=15;function _Ye(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+"00";let t=e.split("").map(r=>cM[r]).join("");for(;t.length>=TW;){let r=t.substring(0,TW);t=parseInt(r,10)%97+t.substring(r.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}const PYe=function(){const e={};for(let t=0;t<36;t++){const n="0123456789abcdefghijklmnopqrstuvwxyz"[t];e[n]=BigInt(t)}return e}();function IYe(e){e=e.toLowerCase();let t=kYe;for(let n=0;nt.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return C(this,eh)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return C(this,eh)===!0?-1:C(this,eh)===!1?this.value.length:null}static from(t,n){return new yu(mu,t,n)}static uint8(t){return Xe(t,8)}static uint16(t){return Xe(t,16)}static uint24(t){return Xe(t,24)}static uint32(t){return Xe(t,32)}static uint40(t){return Xe(t,40)}static uint48(t){return Xe(t,48)}static uint56(t){return Xe(t,56)}static uint64(t){return Xe(t,64)}static uint72(t){return Xe(t,72)}static uint80(t){return Xe(t,80)}static uint88(t){return Xe(t,88)}static uint96(t){return Xe(t,96)}static uint104(t){return Xe(t,104)}static uint112(t){return Xe(t,112)}static uint120(t){return Xe(t,120)}static uint128(t){return Xe(t,128)}static uint136(t){return Xe(t,136)}static uint144(t){return Xe(t,144)}static uint152(t){return Xe(t,152)}static uint160(t){return Xe(t,160)}static uint168(t){return Xe(t,168)}static uint176(t){return Xe(t,176)}static uint184(t){return Xe(t,184)}static uint192(t){return Xe(t,192)}static uint200(t){return Xe(t,200)}static uint208(t){return Xe(t,208)}static uint216(t){return Xe(t,216)}static uint224(t){return Xe(t,224)}static uint232(t){return Xe(t,232)}static uint240(t){return Xe(t,240)}static uint248(t){return Xe(t,248)}static uint256(t){return Xe(t,256)}static uint(t){return Xe(t,256)}static int8(t){return Xe(t,-8)}static int16(t){return Xe(t,-16)}static int24(t){return Xe(t,-24)}static int32(t){return Xe(t,-32)}static int40(t){return Xe(t,-40)}static int48(t){return Xe(t,-48)}static int56(t){return Xe(t,-56)}static int64(t){return Xe(t,-64)}static int72(t){return Xe(t,-72)}static int80(t){return Xe(t,-80)}static int88(t){return Xe(t,-88)}static int96(t){return Xe(t,-96)}static int104(t){return Xe(t,-104)}static int112(t){return Xe(t,-112)}static int120(t){return Xe(t,-120)}static int128(t){return Xe(t,-128)}static int136(t){return Xe(t,-136)}static int144(t){return Xe(t,-144)}static int152(t){return Xe(t,-152)}static int160(t){return Xe(t,-160)}static int168(t){return Xe(t,-168)}static int176(t){return Xe(t,-176)}static int184(t){return Xe(t,-184)}static int192(t){return Xe(t,-192)}static int200(t){return Xe(t,-200)}static int208(t){return Xe(t,-208)}static int216(t){return Xe(t,-216)}static int224(t){return Xe(t,-224)}static int232(t){return Xe(t,-232)}static int240(t){return Xe(t,-240)}static int248(t){return Xe(t,-248)}static int256(t){return Xe(t,-256)}static int(t){return Xe(t,-256)}static bytes1(t){return Qt(t,1)}static bytes2(t){return Qt(t,2)}static bytes3(t){return Qt(t,3)}static bytes4(t){return Qt(t,4)}static bytes5(t){return Qt(t,5)}static bytes6(t){return Qt(t,6)}static bytes7(t){return Qt(t,7)}static bytes8(t){return Qt(t,8)}static bytes9(t){return Qt(t,9)}static bytes10(t){return Qt(t,10)}static bytes11(t){return Qt(t,11)}static bytes12(t){return Qt(t,12)}static bytes13(t){return Qt(t,13)}static bytes14(t){return Qt(t,14)}static bytes15(t){return Qt(t,15)}static bytes16(t){return Qt(t,16)}static bytes17(t){return Qt(t,17)}static bytes18(t){return Qt(t,18)}static bytes19(t){return Qt(t,19)}static bytes20(t){return Qt(t,20)}static bytes21(t){return Qt(t,21)}static bytes22(t){return Qt(t,22)}static bytes23(t){return Qt(t,23)}static bytes24(t){return Qt(t,24)}static bytes25(t){return Qt(t,25)}static bytes26(t){return Qt(t,26)}static bytes27(t){return Qt(t,27)}static bytes28(t){return Qt(t,28)}static bytes29(t){return Qt(t,29)}static bytes30(t){return Qt(t,30)}static bytes31(t){return Qt(t,31)}static bytes32(t){return Qt(t,32)}static address(t){return new yu(mu,"address",t)}static bool(t){return new yu(mu,"bool",!!t)}static bytes(t){return new yu(mu,"bytes",t)}static string(t){return new yu(mu,"string",t)}static array(t,n){throw new Error("not implemented yet")}static tuple(t,n){throw new Error("not implemented yet")}static overrides(t){return new yu(mu,"overrides",Object.assign({},t))}static isTyped(t){return t&&typeof t=="object"&&"_typedSymbol"in t&&t._typedSymbol===_W}static dereference(t,n){if(yu.isTyped(t)){if(t.type!==n)throw new Error(`invalid type: expecetd ${n}, got ${t.type}`);return t.value}return t}};eh=new WeakMap;let wi=yu;class NYe extends Sl{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,n){let r=wi.dereference(n,"string");try{r=Ht(r)}catch(i){return this._throwError(i.message,n)}return t.writeValue(r)}decode(t){return Ht(ml(t.readValue(),20))}}class OYe extends Sl{constructor(n){super(n.name,n.type,"_",n.dynamic);Z(this,"coder");this.coder=n}defaultValue(){return this.coder.defaultValue()}encode(n,r){return this.coder.encode(n,r)}decode(n){return this.coder.decode(n)}}function tle(e,t,n){let r=[];if(Array.isArray(n))r=n;else if(n&&typeof n=="object"){let c={};r=t.map(u=>{const l=u.localName;return De(l,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:n}),De(!c[l],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:n}),c[l]=!0,n[l]})}else pe(!1,"invalid tuple value","tuple",n);pe(t.length===r.length,"types/value length mismatch","tuple",n);let i=new eR,o=new eR,s=[];t.forEach((c,u)=>{let l=r[u];if(c.dynamic){let d=o.length;c.encode(o,l);let f=i.writeUpdatableValue();s.push(h=>{f(h+d)})}else c.encode(i,l)}),s.forEach(c=>{c(i.length)});let a=e.appendWriter(i);return a+=e.appendWriter(o),a}function nle(e,t){let n=[],r=[],i=e.subReader(0);return t.forEach(o=>{let s=null;if(o.dynamic){let a=e.readIndex(),c=i.subReader(a);try{s=o.decode(c)}catch(u){if($s(u,"BUFFER_OVERRUN"))throw u;s=u,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(e)}catch(a){if($s(a,"BUFFER_OVERRUN"))throw a;s=a,s.baseType=o.name,s.name=o.localName,s.type=o.type}if(s==null)throw new Error("investigate");n.push(s),r.push(o.localName||null)}),P9.fromItems(n,r)}class LYe extends Sl{constructor(n,r,i){const o=n.type+"["+(r>=0?r:"")+"]",s=r===-1||n.dynamic;super("array",o,i,s);Z(this,"coder");Z(this,"length");ot(this,{coder:n,length:r})}defaultValue(){const n=this.coder.defaultValue(),r=[];for(let i=0;is||i<-(s+zYe))&&this._throwError("value out-of-bounds",r),i=Dce(i,8*ji)}else(iBb(o,this.size*8))&&this._throwError("value out-of-bounds",r);return n.writeValue(i)}decode(n){let r=Bb(n.readValue(),this.size*8);return this.signed&&(r=yKe(r,this.size*8)),r}}class VYe extends rle{constructor(t){super("string",t)}defaultValue(){return""}encode(t,n){return super.encode(t,$i(wi.dereference(n,"string")))}decode(t){return eM(super.decode(t))}}class E6 extends Sl{constructor(n,r){let i=!1;const o=[];n.forEach(a=>{a.dynamic&&(i=!0),o.push(a.type)});const s="tuple("+o.join(",")+")";super("tuple",s,r,i);Z(this,"coders");ot(this,{coders:Object.freeze(n.slice())})}defaultValue(){const n=[];this.coders.forEach(i=>{n.push(i.defaultValue())});const r=this.coders.reduce((i,o)=>{const s=o.localName;return s&&(i[s]||(i[s]=0),i[s]++),i},{});return this.coders.forEach((i,o)=>{let s=i.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),n[s]==null&&(n[s]=n[o]))}),Object.freeze(n)}encode(n,r){const i=wi.dereference(r,"tuple");return tle(n,this.coders,i)}decode(n){return nle(n,this.coders)}}function bl(e){return _n($i(e))}function WYe(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),i=1,o=[0,1];for(let E=1;E>--c&1}const d=31,f=2**d,h=f>>>1,p=h>>1,m=f-1;let x=0;for(let E=0;E1;){let N=S+I>>>1;E>>1|l(),A=A<<1^h,O=(O^h)<<1|h|1;b=A,v=1+O-A}let w=r-4;return y.map(E=>{switch(E-w){case 3:return w+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return w+256+(e[a++]<<8|e[a++]);case 1:return w+e[a++];default:return E-1}})}function GYe(e){let t=0;return()=>e[t++]}function ile(e){return GYe(WYe(KYe(e)))}function KYe(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>t[i.charCodeAt(0)]=o);let n=e.length,r=new Uint8Array(6*n>>3);for(let i=0,o=0,s=0,a=0;i=8&&(r[o++]=a>>(s-=8));return r}function QYe(e){return e&1?~e>>1:e>>1}function YYe(e,t){let n=Array(e);for(let r=0,i=0;r{let t=gf(e);if(t.length)return t})}function sle(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(qYe(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(ZYe(n,e))}return t.flat()}function d4(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function ale(e,t,n){let r=Array(e).fill().map(()=>[]);for(let i=0;ir[s].push(o));return r}function qYe(e,t){let n=1+t(),r=t(),i=d4(t);return ale(i.length,1+e,t).flatMap((s,a)=>{let[c,...u]=s;return Array(i[a]).fill().map((l,d)=>{let f=d*r;return[c+d*n,u.map(h=>h+f)]})})}function ZYe(e,t){let n=1+t();return ale(n,1+e,t).map(i=>[i[0],i.slice(1)])}var qo=ile("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const PW=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),IW=4;function JYe(e){return e.toString(16).toUpperCase().padStart(2,"0")}function cle(e){return`{${JYe(e)}}`}function uM(e){let t=[];for(let n=0,r=e.length;n>24&255}function lle(e){return e&16777215}const XYe=new Map(ole(lM).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),eqe=new Set(gf(lM)),dle=new Map,aR=new Map;for(let[e,t]of sle(lM)){if(!eqe.has(e)&&t.length==2){let[n,r]=t,i=aR.get(n);i||(i=new Map,aR.set(n,i)),i.set(r,e)}dle.set(e,t.reverse())}const f4=44032,B9=4352,M9=4449,D9=4519,fle=19,hle=21,jm=28,j9=hle*jm,tqe=fle*j9,nqe=f4+tqe,rqe=B9+fle,iqe=M9+hle,oqe=D9+jm;function ple(e){return e>=f4&&e=B9&&e=M9&&tD9&&t0&&i(D9+u)}else{let s=dle.get(o);s?n.push(...s):i(o)}if(!n.length)break;o=n.pop()}if(r&&t.length>1){let o=Db(t[0]);for(let s=1;s0&&i>=s)s==0?(t.push(r,...n),n.length=0,r=a):n.push(a),i=s;else{let c=sqe(r,a);c>=0?r=c:i==0&&s==0?(t.push(r),r=a):(n.push(a),i=s)}}return r>=0&&t.push(r,...n),t}function oC(e){return gle(e).map(lle)}function sC(e){return aqe(gle(e))}const cqe=46,F9=65039,U9=".",mle=1,RW=45;function v2(){return new Set(gf(qo))}const yle=new Map(sle(qo)),ble=v2(),z9=v2(),NW=new Set(gf(qo).map(function(e){return this[e]},[...z9])),uqe=v2(),lqe=v2(),dqe=ole(qo);function OW(){return new Set([gf(qo).map(e=>dqe[e]),gf(qo)].flat(2))}const fqe=qo(),h4=d4(e=>{let t=d4(qo).map(n=>n+96);if(t.length){let n=e>=fqe;t[0]-=32,t=Wh(t),n&&(t=`Restricted[${t}]`);let r=OW(),i=OW(),o=[...r,...i].sort((a,c)=>a-c),s=!qo();return{N:t,P:r,M:s,R:n,V:new Set(o)}}}),LW=v2(),p4=new Map;[...LW,...v2()].sort((e,t)=>e-t).map((e,t,n)=>{let r=qo(),i=n[t]=r?n[t-r]:{V:[],M:new Map};i.V.push(e),LW.has(e)||p4.set(e,i)});for(let{V:e,M:t}of new Set(p4.values())){let n=[];for(let i of e){let o=h4.filter(a=>a.V.has(i)),s=n.find(({G:a})=>o.some(c=>a.has(c)));s||(s={G:new Set,V:[]},n.push(s)),s.V.push(i),o.forEach(a=>s.G.add(a))}let r=n.flatMap(({G:i})=>[...i]);for(let{G:i,V:o}of n){let s=new Set(r.filter(a=>!i.has(a)));for(let a of o)t.set(a,s)}}let g4=new Set,vle=new Set;for(let e of h4)for(let t of e.V)(g4.has(t)?vle:g4).add(t);for(let e of g4)!p4.has(e)&&!vle.has(e)&&p4.set(e,mle);const xle=new Set([...g4,...oC(g4)]),hqe=gf(qo),wle=Ele([]);function Ele(e){let t=d4(()=>{let a=gf(qo).map(c=>hqe[c]);if(a.length)return Ele(a)}).sort((a,c)=>c.Q.size-a.Q.size),n=qo(),r=n%3;n=n/3|0;let i=n&1;n>>=1;let o=n&1,s=n&2;return{B:t,V:r,F:i,S:o,C:s,Q:new Set(e)}}class pqe extends Array{get is_emoji(){return!0}}function O5(e,t=cle){let n=[];Cle(e[0])&&n.push("◌");let r=0,i=e.length;for(let o=0;o=4&&e[2]==RW&&e[3]==RW)throw new Error("invalid label extension")}function BW(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function mqe(e){let t=e[0],n=PW.get(t);if(n)throw L3(`leading ${n}`);let r=e.length,i=-1;for(let o=1;oWh(_le(uM(r),n).flatMap(i=>i.is_emoji?gM(i):i))).join(U9)}function Ale(e){return Sle(pM(e))}function bqe(e){let t=pM(e,!0);for(let{type:n,output:r,error:i}of t)if(!i&&n!=="Greek"){let o=0;for(;;){let s=r.indexOf(958,o);if(s<0)break;r[s]=926,o=s+1}}return Sle(t)}function pM(e,t){let n=0;return e.split(U9).map(r=>{let i=uM(r),o={input:i,offset:n};n+=i.length+1;let s;try{let a=o.tokens=_le(i,sC),c=a.length,u;if(c){let l=a[0],d=c>1||l.is_emoji;if(!d&&l.every(f=>f<128))s=l,BW(s),gqe(s),u="ASCII";else if(d&&(o.emoji=!0,l=a.flatMap(f=>f.is_emoji?[]:f)),s=a.flatMap(f=>!t&&f.is_emoji?gM(f):f),BW(s),!l.length)u="Emoji";else{if(z9.has(s[0]))throw L3("leading combining mark");for(let p=1;ps.has(a)):[...s],!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(o=>i.V.has(o)))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}}function xqe(e){let t=h4;for(let n of e){let r=t.filter(i=>i.V.has(n));if(!r.length)throw t===h4?kle(n):Tle(t[0],n);if(t=r,r.length==1)break}return t}function Sle(e){return e.map(({input:t,error:n,output:r})=>{if(n){let i=n.message;throw new Error(e.length==1?i:`Invalid label ${fM(O5(t))}: ${i}`)}return Wh(r)}).join(U9)}function kle(e){return new Error(`disallowed character: ${dM(e)}`)}function Tle(e,t){let n=dM(t),r=h4.find(i=>i.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function L3(e){return new Error(`illegal placement: ${e}`)}function wqe(e,t){let{V:n,M:r}=e;for(let i of t)if(!n.has(i))throw Tle(e,i);if(r){let i=oC(t);for(let o=1,s=i.length;oIW)throw new Error(`non-spacing marks: too many ${fM(O5(i.slice(o-1,a)))} (${a-o}/${IW})`);o=a}}}function _le(e,t){let n=[],r=[];for(e=e.slice().reverse();e.length;){let i=Ple(e);if(i)r.length&&(n.push(t(r)),r=[]),n.push(i);else{let o=e.pop();if(xle.has(o))r.push(o);else{let s=yle.get(o);if(s)r.push(...s);else if(!ble.has(o))throw kle(o)}}}return r.length&&n.push(t(r)),n}function gM(e){return e.filter(t=>t!=F9)}function Ple(e,t){let n=wle,r,i,o=[],s=e.length;for(t&&(t.length=0);s;){let a=e[--s];if(n=n.B.find(c=>c.Q.has(a)),!n)break;if(n.S)i=a;else if(n.C&&a===i)break;o.push(a),n.F&&(o.push(F9),s>0&&e[s-1]==F9&&s--),n.V&&(r=Ile(o,n),t&&t.push(...e.slice(s).reverse()),e.length=s)}return r}function Ile(e,t){let n=pqe.from(e);return t.V==2&&n.splice(1,1),n}function Eqe(){let e=[];return t(wle,[]),e.sort(ule);function t(n,r,i){if(n.S)i=r[r.length-1];else if(n.C&&i===r[r.length-1])return;n.F&&r.push(F9),n.V&&e.push(Ile(r,n));for(let o of n.B)for(let s of o.Q)t(o,[...r,s],i)}}const B3="valid",Rle="mapped",bk="ignored",Cqe="disallowed",Aqe="emoji",Sqe="nfc",kqe="stop";function Nle(e,{nf:t=!0}={}){let n=uM(e).reverse(),r=[],i=[];for(;n.length;){let o=Ple(n,r);if(o)i.push({type:Aqe,emoji:o,input:r.slice(),cps:gM(o)});else{let s=n.pop();if(s==cqe)i.push({type:kqe,cp:s});else if(xle.has(s))i.push({type:B3,cps:[s]});else if(ble.has(s))i.push({type:bk,cp:s});else{let a=yle.get(s);a?i.push({type:Rle,cp:s,cps:a.slice()}):i.push({type:Cqe,cp:s})}}}if(t)for(let o=0,s=-1;ovk(f.type)?f.cps:[]),d=sC(l);ule(d,l)?(i.splice(s,c-s,{type:Sqe,input:l,cps:d,tokens0:DW(u),tokens:Nle(Wh(d),{nf:!1})}),o=s):o=c-1,s=-1}else s=o;else a.type!==bk&&(s=-1)}return DW(i)}function vk(e){return e==B3||e==Rle}function MW(e){return e.some(t=>lqe.has(t))}function DW(e){for(let t=0;tr.cps)})}return e}const Tqe=Object.freeze(Object.defineProperty({__proto__:null,ens_beautify:bqe,ens_emoji:Eqe,ens_normalize:Ale,ens_normalize_fragment:yqe,ens_split:pM,ens_tokenize:Nle,is_combining_mark:Cle,nfc:sC,nfd:oC,safe_str_from_cps:O5,should_escape:hM},Symbol.toStringTag,{value:"Module"})),Ole=new Uint8Array(32);Ole.fill(0);function jW(e){return pe(e.length!==0,"invalid ENS name; empty component","comp",e),e}function Lle(e){const t=$i(_qe(e)),n=[];if(e.length===0)return n;let r=0;for(let i=0;i{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n})))+"00"}function xk(e,t){return{address:Ht(e),storageKeys:t.map((n,r)=>(pe(er(n,32),"invalid slot",`storageKeys[${r}]`,n),n.toLowerCase()))}}function ip(e){if(Array.isArray(e))return e.map((n,r)=>Array.isArray(n)?(pe(n.length===2,"invalid slot set",`value[${r}]`,n),xk(n[0],n[1])):(pe(n!=null&&typeof n=="object","invalid address-slot set","value",e),xk(n.address,n.storageKeys)));pe(e!=null&&typeof e=="object","invalid access list","value",e);const t=Object.keys(e).map(n=>{const r=e[n].reduce((i,o)=>(i[o]=!0,i),{});return xk(n,Object.keys(r).sort())});return t.sort((n,r)=>n.address.localeCompare(r.address)),t}function L5(e){let t;return typeof e=="string"?t=Uc.computePublicKey(e,!1):t=e.publicKey,Ht(_n("0x"+t.substring(4)).substring(26))}function Iqe(e,t){return L5(Uc.recoverPublicKey(e,t))}const no=BigInt(0),Rqe=BigInt(2),Nqe=BigInt(27),Oqe=BigInt(28),Lqe=BigInt(35),Bqe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function mM(e){return e==="0x"?null:Ht(e)}function Ble(e,t){try{return ip(e)}catch(n){pe(!1,n.message,t,e)}}function aC(e,t){return e==="0x"?0:It(e,t)}function Bi(e,t){if(e==="0x")return no;const n=at(e,t);return pe(n<=Bqe,"value exceeds uint size",t,n),n}function Kr(e,t){const n=at(e,"value"),r=ao(n);return pe(r.length<=32,"value too large",`tx.${t}`,n),r}function Mle(e){return ip(e).map(t=>[t.address,t.storageKeys])}function Mqe(e){const t=tM(e);pe(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",e);const n={type:0,nonce:aC(t[0],"nonce"),gasPrice:Bi(t[1],"gasPrice"),gasLimit:Bi(t[2],"gasLimit"),to:mM(t[3]),value:Bi(t[4],"value"),data:Ve(t[5]),chainId:no};if(t.length===6)return n;const r=Bi(t[6],"v"),i=Bi(t[7],"r"),o=Bi(t[8],"s");if(i===no&&o===no)n.chainId=r;else{let s=(r-Lqe)/Rqe;s=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),De(!n||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),De(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):n?i.push(2):t?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return ud.from(this)}toJSON(){const t=n=>n==null?null:n.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new ud;if(typeof t=="string"){const r=tt(t);if(r[0]>=127)return ud.from(Mqe(r));switch(r[0]){case 1:return ud.from(jqe(r));case 2:return ud.from(Dqe(r))}De(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const n=new ud;return t.type!=null&&(n.type=t.type),t.to!=null&&(n.to=t.to),t.nonce!=null&&(n.nonce=t.nonce),t.gasLimit!=null&&(n.gasLimit=t.gasLimit),t.gasPrice!=null&&(n.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(n.maxFeePerGas=t.maxFeePerGas),t.data!=null&&(n.data=t.data),t.value!=null&&(n.value=t.value),t.chainId!=null&&(n.chainId=t.chainId),t.signature!=null&&(n.signature=Fa.from(t.signature)),t.accessList!=null&&(n.accessList=t.accessList),t.hash!=null&&(pe(n.isSigned(),"unsigned transaction cannot define hash","tx",t),pe(n.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(pe(n.isSigned(),"unsigned transaction cannot define from","tx",t),pe(n.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),n}};ku=new WeakMap,Eg=new WeakMap,Cg=new WeakMap,Ag=new WeakMap,Sg=new WeakMap,kg=new WeakMap,Tg=new WeakMap,_g=new WeakMap,Pg=new WeakMap,Ig=new WeakMap,Rg=new WeakMap,Ng=new WeakMap;let m4=ud;function Fqe(e){return typeof e=="string"&&(e=$i(e)),_n(wn([$i(SYe),$i(String(e.length)),e]))}const jle=new Uint8Array(32);jle.fill(0);const Uqe=BigInt(-1),Fle=BigInt(0),Ule=BigInt(1),zqe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function $qe(e){const t=tt(e),n=t.length%32;return n?wn([t,jle.slice(n)]):Ve(t)}const Hqe=ml(Ule,32),Vqe=ml(Fle,32),$W={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},wk=["name","version","chainId","verifyingContract","salt"];function HW(e){return function(t){return pe(typeof t=="string",`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Wqe={name:HW("name"),version:HW("version"),chainId:function(e){const t=at(e,"domain.chainId");return pe(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):S1(t)},verifyingContract:function(e){try{return Ht(e).toLowerCase()}catch{}pe(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=tt(e,"domain.salt");return pe(t.length===32,'invalid domain value "salt"',"domain.salt",e),Ve(t)}};function Ek(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const n=t[1]==="",r=parseInt(t[2]||"256");pe(r%8===0&&r!==0&&r<=256&&(t[2]==null||t[2]===String(r)),"invalid numeric width","type",e);const i=Bb(zqe,n?r-1:r),o=n?(i+Ule)*Uqe:Fle;return function(s){const a=at(s,"value");return pe(a>=o&&a<=i,`value out-of-bounds for ${e}`,"value",a),ml(n?Dce(a,256):a,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const n=parseInt(t[1]);return pe(n!==0&&n<=32&&t[1]===String(n),"invalid bytes width","type",e),function(r){const i=tt(r);return pe(i.length===n,`invalid length for ${e}`,"value",r),$qe(r)}}}switch(e){case"address":return function(t){return zh(Ht(t),32)};case"bool":return function(t){return t?Hqe:Vqe};case"bytes":return function(t){return _n(t)};case"string":return function(t){return bl(t)}}return null}function VW(e,t){return`${e}(${t.map(({name:n,type:r})=>r+" "+n).join(",")})`}var O4,Tu,Og,r7,zle;const Cs=class Cs{constructor(t){J(this,r7);Z(this,"primaryType");J(this,O4);J(this,Tu);J(this,Og);D(this,O4,JSON.stringify(t)),D(this,Tu,new Map),D(this,Og,new Map);const n=new Map,r=new Map,i=new Map;Object.keys(t).forEach(a=>{n.set(a,new Set),r.set(a,[]),i.set(a,new Set)});for(const a in t){const c=new Set;for(const u of t[a]){pe(!c.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(a)}`,"types",t),c.add(u.name);const l=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;pe(l!==a,`circular type reference to ${JSON.stringify(l)}`,"types",t),!Ek(l)&&(pe(r.has(l),`unknown type ${JSON.stringify(l)}`,"types",t),r.get(l).push(a),n.get(a).add(l))}}const o=Array.from(r.keys()).filter(a=>r.get(a).length===0);pe(o.length!==0,"missing primary type","types",t),pe(o.length===1,`ambiguous primary types or unused types: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"types",t),ot(this,{primaryType:o[0]});function s(a,c){pe(!c.has(a),`circular type reference to ${JSON.stringify(a)}`,"types",t),c.add(a);for(const u of n.get(a))if(r.has(u)){s(u,c);for(const l of c)i.get(l).add(u)}c.delete(a)}s(this.primaryType,new Set);for(const[a,c]of i){const u=Array.from(c);u.sort(),C(this,Tu).set(a,VW(a,t[a])+u.map(l=>VW(l,t[l])).join(""))}}get types(){return JSON.parse(C(this,O4))}getEncoder(t){let n=C(this,Og).get(t);return n||(n=de(this,r7,zle).call(this,t),C(this,Og).set(t,n)),n}encodeType(t){const n=C(this,Tu).get(t);return pe(n,`unknown type: ${JSON.stringify(t)}`,"name",t),n}encodeData(t,n){return this.getEncoder(t)(n)}hashStruct(t,n){return _n(this.encodeData(t,n))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,n,r){if(Ek(t))return r(t,n);const i=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return pe(!i[3]||parseInt(i[3])===n.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",n),n.map(s=>this._visit(i[1],s,r));const o=this.types[t];if(o)return o.reduce((s,{name:a,type:c})=>(s[a]=this._visit(c,n[a],r),s),{});pe(!1,`unknown type: ${t}`,"type",t)}visit(t,n){return this._visit(this.primaryType,t,n)}static from(t){return new Cs(t)}static getPrimaryType(t){return Cs.from(t).primaryType}static hashStruct(t,n,r){return Cs.from(n).hashStruct(t,r)}static hashDomain(t){const n=[];for(const r in t){if(t[r]==null)continue;const i=$W[r];pe(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),n.push({name:r,type:i})}return n.sort((r,i)=>wk.indexOf(r.name)-wk.indexOf(i.name)),Cs.hashStruct("EIP712Domain",{EIP712Domain:n},t)}static encode(t,n,r){return wn(["0x1901",Cs.hashDomain(t),Cs.from(n).hash(r)])}static hash(t,n,r){return _n(Cs.encode(t,n,r))}static async resolveNames(t,n,r,i){t=Object.assign({},t);for(const a in t)t[a]==null&&delete t[a];const o={};t.verifyingContract&&!er(t.verifyingContract,20)&&(o[t.verifyingContract]="0x");const s=Cs.from(n);s.visit(r,(a,c)=>(a==="address"&&!er(c,20)&&(o[c]="0x"),c));for(const a in o)o[a]=await i(a);return t.verifyingContract&&o[t.verifyingContract]&&(t.verifyingContract=o[t.verifyingContract]),r=s.visit(r,(a,c)=>a==="address"&&o[c]?o[c]:c),{domain:t,value:r}}static getPayload(t,n,r){Cs.hashDomain(t);const i={},o=[];wk.forEach(c=>{const u=t[c];u!=null&&(i[c]=Wqe[c](u),o.push({name:c,type:$W[c]}))});const s=Cs.from(n),a=Object.assign({},n);return pe(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",n),a.EIP712Domain=o,s.encode(r),{types:a,domain:i,primaryType:s.primaryType,message:s.visit(r,(c,u)=>{if(c.match(/^bytes(\d*)/))return Ve(tt(u));if(c.match(/^u?int/))return at(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return pe(typeof u=="string","invalid string","value",u),u}pe(!1,"unsupported type","type",c)})}}};O4=new WeakMap,Tu=new WeakMap,Og=new WeakMap,r7=new WeakSet,zle=function(t){{const i=Ek(t);if(i)return i}const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const i=n[1],o=this.getEncoder(i);return s=>{pe(!n[3]||parseInt(n[3])===s.length,`array length mismatch; expected length ${parseInt(n[3])}`,"value",s);let a=s.map(o);return C(this,Tu).has(i)&&(a=a.map(_n)),_n(wn(a))}}const r=this.types[t];if(r){const i=bl(C(this,Tu).get(t));return o=>{const s=r.map(({name:a,type:c})=>{const u=this.getEncoder(c)(o[a]);return C(this,Tu).has(c)?_n(u):u});return s.unshift(i),wn(s)}}pe(!1,`unknown type: ${t}`,"type",t)};let Fm=Cs;function Fi(e){const t=new Set;return e.forEach(n=>t.add(n)),Object.freeze(t)}const Gqe="external public payable",Kqe=Fi(Gqe.split(" ")),$le="constant external internal payable private public pure view",Qqe=Fi($le.split(" ")),Hle="constructor error event fallback function receive struct",Vle=Fi(Hle.split(" ")),Wle="calldata memory storage payable indexed",Yqe=Fi(Wle.split(" ")),qqe="tuple returns",Zqe=[Hle,Wle,qqe,$le].join(" "),Jqe=Fi(Zqe.split(" ")),Xqe={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},eZe=new RegExp("^(\\s*)"),tZe=new RegExp("^([0-9]+)"),nZe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Gle=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Kle=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var $r,va,L4,uR;const i7=class i7{constructor(t){J(this,L4);J(this,$r);J(this,va);D(this,$r,0),D(this,va,t.slice())}get offset(){return C(this,$r)}get length(){return C(this,va).length-C(this,$r)}clone(){return new i7(C(this,va))}reset(){D(this,$r,0)}popKeyword(t){const n=this.peek();if(n.type!=="KEYWORD"||!t.has(n.text))throw new Error(`expected keyword ${n.text}`);return this.pop().text}popType(t){if(this.peek().type!==t)throw new Error(`expected ${t}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const n=de(this,L4,uR).call(this,C(this,$r)+1,t.match+1);return D(this,$r,t.match+1),n}popParams(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const n=[];for(;C(this,$r)=C(this,va).length)throw new Error("out-of-bounds");return C(this,va)[C(this,$r)]}peekKeyword(t){const n=this.peekType("KEYWORD");return n!=null&&t.has(n)?n:null}peekType(t){if(this.length===0)return null;const n=this.peek();return n.type===t?n.text:null}pop(){const t=this.peek();return xo(this,$r)._++,t}toString(){const t=[];for(let n=C(this,$r);n`}};$r=new WeakMap,va=new WeakMap,L4=new WeakSet,uR=function(t=0,n=0){return new i7(C(this,va).slice(t,n).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))};let Ua=i7;function _f(e){const t=[],n=s=>{const a=o0&&t[t.length-1].type==="NUMBER"){const d=t.pop().text;l=d+l,t[t.length-1].value=It(d)}if(t.length===0||t[t.length-1].type!=="BRACKET")throw new Error("missing opening bracket");t[t.length-1].text+=l}continue}if(a=s.match(nZe),a){if(c.text=a[1],o+=c.text.length,Jqe.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(Kle)){c.type="TYPE";continue}c.type="ID";continue}if(a=s.match(tZe),a){c.text=a[1],c.type="NUMBER",o+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${o}`)}return new Ua(t.map(s=>Object.freeze(s)))}function WW(e,t){let n=[];for(const r in t.keys())e.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(", ")}`)}function cC(e,t){if(t.peekKeyword(Vle)){const n=t.pop().text;if(n!==e)throw new Error(`expected ${e}, got ${n}`)}return t.popType("ID")}function vl(e,t){const n=new Set;for(;;){const r=e.peekType("KEYWORD");if(r==null||t&&!t.has(r))break;if(e.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function Qle(e){let t=vl(e,Qqe);return WW(t,Fi("constant payable nonpayable".split(" "))),WW(t,Fi("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function el(e,t){return e.popParams().map(n=>qr.from(n,t))}function Yle(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return at(e.pop().text);throw new Error("invalid gas")}return null}function Gh(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}const rZe=new RegExp(/^(.*)\[([0-9]*)\]$/);function GW(e){const t=e.match(Kle);if(pe(t,"invalid type","type",e),e==="uint")return"uint256";if(e==="int")return"int256";if(t[2]){const n=parseInt(t[2]);pe(n!==0&&n<=32,"invalid bytes length","type",e)}else if(t[3]){const n=parseInt(t[3]);pe(n!==0&&n<=256&&n%8===0,"invalid numeric width","type",e)}return e}const Jn={},go=Symbol.for("_ethers_internal"),KW="_ParamTypeInternal",QW="_ErrorInternal",YW="_EventInternal",qW="_ConstructorInternal",ZW="_FallbackInternal",JW="_FunctionInternal",XW="_StructInternal";var Lg,L8;const As=class As{constructor(t,n,r,i,o,s,a,c){J(this,Lg);Z(this,"name");Z(this,"type");Z(this,"baseType");Z(this,"indexed");Z(this,"components");Z(this,"arrayLength");Z(this,"arrayChildren");if(np(t,Jn,"ParamType"),Object.defineProperty(this,go,{value:KW}),s&&(s=Object.freeze(s.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(s==null)throw new Error("")}else if(s!=null)throw new Error("");ot(this,{name:n,type:r,baseType:i,indexed:o,components:s,arrayLength:a,arrayChildren:c})}format(t){if(t==null&&(t="sighash"),t==="json"){const r=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=r,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(t)))),JSON.stringify(i)}let n="";return this.isArray()?(n+=this.arrayChildren.format(t),n+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(t!=="sighash"&&(n+=this.type),n+="("+this.components.map(r=>r.format(t)).join(t==="full"?", ":",")+")"):n+=this.type,t!=="sighash"&&(this.indexed===!0&&(n+=" indexed"),t==="full"&&this.name&&(n+=" "+this.name)),n}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(t,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return t.map(i=>r.arrayChildren.walk(i,n))}if(this.isTuple()){if(!Array.isArray(t))throw new Error("invalid tuple value");if(t.length!==this.components.length)throw new Error("array is wrong length");const r=this;return t.map((i,o)=>r.components[o].walk(i,n))}return n(this.type,t)}async walkAsync(t,n){const r=[],i=[t];return de(this,Lg,L8).call(this,r,t,n,o=>{i[0]=o}),r.length&&await Promise.all(r),i[0]}static from(t,n){if(As.isParamType(t))return t;if(typeof t=="string")try{return As.from(_f(t),n)}catch{pe(!1,"invalid param type","obj",t)}else if(t instanceof Ua){let a="",c="",u=null;vl(t,Fi(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(c="tuple",u=t.popParams().map(m=>As.from(m)),a=`tuple(${u.map(m=>m.format()).join(",")})`):(a=GW(t.popType("TYPE")),c=a);let l=null,d=null;for(;t.length&&t.peekType("BRACKET");){const m=t.pop();l=new As(Jn,"",a,c,null,u,d,l),d=m.value,a+=m.text,c="array",u=null}let f=null;if(vl(t,Yqe).has("indexed")){if(!n)throw new Error("");f=!0}const p=t.peekType("ID")?t.pop().text:"";if(t.length)throw new Error("leftover tokens");return new As(Jn,p,a,c,f,u,d,l)}const r=t.name;pe(!r||typeof r=="string"&&r.match(Gle),"invalid name","obj.name",r);let i=t.indexed;i!=null&&(pe(n,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let o=t.type,s=o.match(rZe);if(s){const a=parseInt(s[2]||"-1"),c=As.from({type:s[1],components:t.components});return new As(Jn,r||"",o,"array",i,null,a,c)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const a=t.components!=null?t.components.map(u=>As.from(u)):null;return new As(Jn,r||"",o,"tuple",i,a,null,null)}return o=GW(t.type),new As(Jn,r||"",o,o,i,null,null,null)}static isParamType(t){return t&&t[go]===KW}};Lg=new WeakSet,L8=function(t,n,r,i){if(this.isArray()){if(!Array.isArray(n))throw new Error("invalid array value");if(this.arrayLength!==-1&&n.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,a=n.slice();a.forEach((c,u)=>{var l;de(l=s,Lg,L8).call(l,t,c,r,d=>{a[u]=d})}),i(a);return}if(this.isTuple()){const s=this.components;let a;if(Array.isArray(n))a=n.slice();else{if(n==null||typeof n!="object")throw new Error("invalid tuple value");a=s.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in n))throw new Error(`missing value for component ${c.name}`);return n[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,u)=>{var l;de(l=s[u],Lg,L8).call(l,t,c,r,d=>{a[u]=d})}),i(a);return}const o=r(this.type,n);o.then?t.push(async function(){i(await o)}()):i(o)};let qr=As;class Kh{constructor(t,n,r){Z(this,"type");Z(this,"inputs");np(t,Jn,"Fragment"),r=Object.freeze(r.slice()),ot(this,{type:n,inputs:r})}static from(t){if(typeof t=="string"){try{Kh.from(JSON.parse(t))}catch{}return Kh.from(_f(t))}if(t instanceof Ua)switch(t.peekKeyword(Vle)){case"constructor":return $u.from(t);case"error":return ro.from(t);case"event":return kc.from(t);case"fallback":case"receive":return vu.from(t);case"function":return Tc.from(t);case"struct":return Eh.from(t)}else if(typeof t=="object"){switch(t.type){case"constructor":return $u.from(t);case"error":return ro.from(t);case"event":return kc.from(t);case"fallback":case"receive":return vu.from(t);case"function":return Tc.from(t);case"struct":return Eh.from(t)}De(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}pe(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return $u.isFragment(t)}static isError(t){return ro.isFragment(t)}static isEvent(t){return kc.isFragment(t)}static isFunction(t){return Tc.isFragment(t)}static isStruct(t){return Eh.isFragment(t)}}class uC extends Kh{constructor(n,r,i,o){super(n,r,o);Z(this,"name");pe(typeof i=="string"&&i.match(Gle),"invalid identifier","name",i),o=Object.freeze(o.slice()),ot(this,{name:i})}}function y4(e,t){return"("+t.map(n=>n.format(e)).join(e==="full"?", ":",")+")"}class ro extends uC{constructor(t,n,r){super(t,"error",n,r),Object.defineProperty(this,go,{value:QW})}get selector(){return bl(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const n=[];return t!=="sighash"&&n.push("error"),n.push(this.name+y4(t,this.inputs)),n.join(" ")}static from(t){if(ro.isFragment(t))return t;if(typeof t=="string")return ro.from(_f(t));if(t instanceof Ua){const n=cC("error",t),r=el(t);return Gh(t),new ro(Jn,n,r)}return new ro(Jn,t.name,t.inputs?t.inputs.map(qr.from):[])}static isFragment(t){return t&&t[go]===QW}}class kc extends uC{constructor(n,r,i,o){super(n,"event",r,i);Z(this,"anonymous");Object.defineProperty(this,go,{value:YW}),ot(this,{anonymous:o})}get topicHash(){return bl(this.format("sighash"))}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("event"),r.push(this.name+y4(n,this.inputs)),n!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(n,r){return r=(r||[]).map(o=>qr.from(o)),new kc(Jn,n,r,!1).topicHash}static from(n){if(kc.isFragment(n))return n;if(typeof n=="string")try{return kc.from(_f(n))}catch{pe(!1,"invalid event fragment","obj",n)}else if(n instanceof Ua){const r=cC("event",n),i=el(n,!0),o=!!vl(n,Fi(["anonymous"])).has("anonymous");return Gh(n),new kc(Jn,r,i,o)}return new kc(Jn,n.name,n.inputs?n.inputs.map(r=>qr.from(r,!0)):[],!!n.anonymous)}static isFragment(n){return n&&n[go]===YW}}class $u extends Kh{constructor(n,r,i,o,s){super(n,r,i);Z(this,"payable");Z(this,"gas");Object.defineProperty(this,go,{value:qW}),ot(this,{payable:o,gas:s})}format(n){if(De(n!=null&&n!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),n==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n)))});const r=[`constructor${y4(n,this.inputs)}`];return r.push(this.payable?"payable":"nonpayable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(n){if($u.isFragment(n))return n;if(typeof n=="string")try{return $u.from(_f(n))}catch{pe(!1,"invalid constuctor fragment","obj",n)}else if(n instanceof Ua){vl(n,Fi(["constructor"]));const r=el(n),i=!!vl(n,Kqe).has("payable"),o=Yle(n);return Gh(n),new $u(Jn,"constructor",r,i,o)}return new $u(Jn,"constructor",n.inputs?n.inputs.map(qr.from):[],!!n.payable,n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[go]===qW}}class vu extends Kh{constructor(n,r,i){super(n,"fallback",r);Z(this,"payable");Object.defineProperty(this,go,{value:ZW}),ot(this,{payable:i})}format(n){const r=this.inputs.length===0?"receive":"fallback";if(n==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(n){if(vu.isFragment(n))return n;if(typeof n=="string")try{return vu.from(_f(n))}catch{pe(!1,"invalid fallback fragment","obj",n)}else if(n instanceof Ua){const r=n.toString(),i=n.peekKeyword(Fi(["fallback","receive"]));if(pe(i,"type must be fallback or receive","obj",r),n.popKeyword(Fi(["fallback","receive"]))==="receive"){const c=el(n);return pe(c.length===0,"receive cannot have arguments","obj.inputs",c),vl(n,Fi(["payable"])),Gh(n),new vu(Jn,[],!0)}let s=el(n);s.length?pe(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(c=>c.format("minimal")).join(", ")):s=[qr.from("bytes")];const a=Qle(n);if(pe(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),vl(n,Fi(["returns"])).has("returns")){const c=el(n);pe(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(u=>u.format("minimal")).join(", "))}return Gh(n),new vu(Jn,s,a==="payable")}if(n.type==="receive")return new vu(Jn,[],!0);if(n.type==="fallback"){const r=[qr.from("bytes")],i=n.stateMutability==="payable";return new vu(Jn,r,i)}pe(!1,"invalid fallback description","obj",n)}static isFragment(n){return n&&n[go]===ZW}}class Tc extends uC{constructor(n,r,i,o,s,a){super(n,"function",r,o);Z(this,"constant");Z(this,"outputs");Z(this,"stateMutability");Z(this,"payable");Z(this,"gas");Object.defineProperty(this,go,{value:JW}),s=Object.freeze(s.slice()),ot(this,{constant:i==="view"||i==="pure",gas:a,outputs:s,payable:i==="payable",stateMutability:i})}get selector(){return bl(this.format("sighash")).substring(0,10)}format(n){if(n==null&&(n="sighash"),n==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(n))),outputs:this.outputs.map(i=>JSON.parse(i.format(n)))});const r=[];return n!=="sighash"&&r.push("function"),r.push(this.name+y4(n,this.inputs)),n!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(y4(n,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(n,r){return r=(r||[]).map(o=>qr.from(o)),new Tc(Jn,n,"view",r,[],null).selector}static from(n){if(Tc.isFragment(n))return n;if(typeof n=="string")try{return Tc.from(_f(n))}catch{pe(!1,"invalid function fragment","obj",n)}else if(n instanceof Ua){const i=cC("function",n),o=el(n),s=Qle(n);let a=[];vl(n,Fi(["returns"])).has("returns")&&(a=el(n));const c=Yle(n);return Gh(n),new Tc(Jn,i,s,o,a,c)}let r=n.stateMutability;return r==null&&(r="payable",typeof n.constant=="boolean"?(r="view",n.constant||(r="payable",typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable"))):typeof n.payable=="boolean"&&!n.payable&&(r="nonpayable")),new Tc(Jn,n.name,r,n.inputs?n.inputs.map(qr.from):[],n.outputs?n.outputs.map(qr.from):[],n.gas!=null?n.gas:null)}static isFragment(n){return n&&n[go]===JW}}class Eh extends uC{constructor(t,n,r){super(t,"struct",n,r),Object.defineProperty(this,go,{value:XW})}format(){throw new Error("@TODO")}static from(t){if(typeof t=="string")try{return Eh.from(_f(t))}catch{pe(!1,"invalid struct fragment","obj",t)}else if(t instanceof Ua){const n=cC("struct",t),r=el(t);return Gh(t),new Eh(Jn,n,r)}return new Eh(Jn,t.name,t.inputs?t.inputs.map(qr.from):[])}static isFragment(t){return t&&t[go]===XW}}const Va=new Map;Va.set(0,"GENERIC_PANIC");Va.set(1,"ASSERT_FALSE");Va.set(17,"OVERFLOW");Va.set(18,"DIVIDE_BY_ZERO");Va.set(33,"ENUM_RANGE_ERROR");Va.set(34,"BAD_STORAGE_DATA");Va.set(49,"STACK_UNDERFLOW");Va.set(50,"ARRAY_RANGE_ERROR");Va.set(65,"OUT_OF_MEMORY");Va.set(81,"UNINITIALIZED_FUNCTION_CALL");const iZe=new RegExp(/^bytes([0-9]*)$/),oZe=new RegExp(/^(u?int)([0-9]*)$/);let Ck=null;function sZe(e,t,n,r){let i="missing revert data",o=null;const s=null;let a=null;if(n){i="execution reverted";const u=tt(n);if(n=Ve(n),u.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ve(u.slice(0,4))==="0x08c379a0")try{o=r.decode(["string"],u.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ve(u.slice(0,4))==="0x4e487b71")try{const l=Number(r.decode(["uint256"],u.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[l]},o=`Panic due to ${Va.get(l)||"UNKNOWN"}(${l})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:t.to?Ht(t.to):null,data:t.data||"0x"};return t.from&&(c.from=Ht(t.from)),wr(i,"CALL_EXCEPTION",{action:e,data:n,reason:o,transaction:c,invocation:s,revert:a})}var Sd,zp;const o7=class o7{constructor(){J(this,Sd)}getDefaultValue(t){const n=t.map(i=>de(this,Sd,zp).call(this,qr.from(i)));return new E6(n,"_").defaultValue()}encode(t,n){Nce(n.length,t.length,"types/values length mismatch");const r=t.map(s=>de(this,Sd,zp).call(this,qr.from(s))),i=new E6(r,"_"),o=new eR;return i.encode(o,n),o.data}decode(t,n,r){const i=t.map(s=>de(this,Sd,zp).call(this,qr.from(s)));return new E6(i,"_").decode(new tR(n,r))}static defaultAbiCoder(){return Ck==null&&(Ck=new o7),Ck}static getBuiltinCallException(t,n,r){return sZe(t,n,r,o7.defaultAbiCoder())}};Sd=new WeakSet,zp=function(t){if(t.isArray())return new LYe(de(this,Sd,zp).call(this,t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new E6(t.components.map(r=>de(this,Sd,zp).call(this,r)),t.name);switch(t.baseType){case"address":return new NYe(t.name);case"bool":return new BYe(t.name);case"string":return new VYe(t.name);case"bytes":return new MYe(t.name);case"":return new FYe(t.name)}let n=t.type.match(oZe);if(n){let r=parseInt(n[2]||"256");return pe(r!==0&&r<=256&&r%8===0,"invalid "+n[1]+" bit length","param",t),new HYe(r/8,n[1]==="int",t.name)}if(n=t.type.match(iZe),n){let r=parseInt(n[1]);return pe(r!==0&&r<=32,"invalid bytes length","param",t),new DYe(r,t.name)}pe(!1,"invalid type","type",t.type)};let b4=o7;class aZe{constructor(t,n,r){Z(this,"fragment");Z(this,"name");Z(this,"signature");Z(this,"topic");Z(this,"args");const i=t.name,o=t.format();ot(this,{fragment:t,name:i,signature:o,topic:n,args:r})}}class cZe{constructor(t,n,r,i){Z(this,"fragment");Z(this,"name");Z(this,"args");Z(this,"signature");Z(this,"selector");Z(this,"value");const o=t.name,s=t.format();ot(this,{fragment:t,name:o,args:r,signature:s,selector:n,value:i})}}class uZe{constructor(t,n,r){Z(this,"fragment");Z(this,"name");Z(this,"args");Z(this,"signature");Z(this,"selector");const i=t.name,o=t.format();ot(this,{fragment:t,name:i,args:r,signature:o,selector:n})}}class eG{constructor(t){Z(this,"hash");Z(this,"_isIndexed");ot(this,{hash:t,_isIndexed:!0})}static isIndexed(t){return!!(t&&t._isIndexed)}}const tG={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},nG={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&tG[e.toString()]&&(t=tG[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};var pc,gc,mc,ci,zc,B8,M8;const T1=class T1{constructor(t){J(this,zc);Z(this,"fragments");Z(this,"deploy");Z(this,"fallback");Z(this,"receive");J(this,pc);J(this,gc);J(this,mc);J(this,ci);let n=[];typeof t=="string"?n=JSON.parse(t):n=t,D(this,mc,new Map),D(this,pc,new Map),D(this,gc,new Map);const r=[];for(const s of n)try{r.push(Kh.from(s))}catch(a){console.log("EE",a)}ot(this,{fragments:Object.freeze(r)});let i=null,o=!1;D(this,ci,this.getAbiCoder()),this.fragments.forEach((s,a)=>{let c;switch(s.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}ot(this,{deploy:s});return;case"fallback":s.inputs.length===0?o=!0:(pe(!i||s.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,s),i=s,o=i.payable);return;case"function":c=C(this,mc);break;case"event":c=C(this,gc);break;case"error":c=C(this,pc);break;default:return}const u=s.format();c.has(u)||c.set(u,s)}),this.deploy||ot(this,{deploy:$u.from("constructor()")}),ot(this,{fallback:i,receive:o})}format(t){const n=t?"minimal":"full";return this.fragments.map(i=>i.format(n))}formatJson(){const t=this.fragments.map(n=>n.format("json"));return JSON.stringify(t.map(n=>JSON.parse(n)))}getAbiCoder(){return b4.defaultAbiCoder()}getFunctionName(t){const n=de(this,zc,B8).call(this,t,null,!1);return pe(n,"no matching function","key",t),n.name}hasFunction(t){return!!de(this,zc,B8).call(this,t,null,!1)}getFunction(t,n){return de(this,zc,B8).call(this,t,n||null,!0)}forEachFunction(t){const n=Array.from(C(this,mc).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;rr.localeCompare(i));for(let r=0;r1){const o=i.map(s=>JSON.stringify(s.format())).join(", ");pe(!1,`ambiguous error description (i.e. ${o})`,"name",t)}return i[0]}if(t=ro.from(t).format(),t==="Error(string)")return ro.from("error Error(string)");if(t==="Panic(uint256)")return ro.from("error Panic(uint256)");const r=C(this,pc).get(t);return r||null}forEachError(t){const n=Array.from(C(this,pc).keys());n.sort((r,i)=>r.localeCompare(i));for(let r=0;ro.type==="string"?bl(s):o.type==="bytes"?_n(Ve(s)):(o.type==="bool"&&typeof s=="boolean"?s=s?"0x01":"0x00":o.type.match(/^u?int/)?s=ml(s):o.type.match(/^bytes/)?s=mKe(s,32):o.type==="address"&&C(this,ci).encode(["address"],[s]),zh(Ve(s),32));for(n.forEach((o,s)=>{const a=t.inputs[s];if(!a.indexed){pe(o==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,o);return}o==null?r.push(null):a.baseType==="array"||a.baseType==="tuple"?pe(!1,"filtering with tuples or arrays not supported","contract."+a.name,o):Array.isArray(o)?r.push(o.map(c=>i(a,c))):r.push(i(a,o))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(t,n){if(typeof t=="string"){const s=this.getEvent(t);pe(s,"unknown event","eventFragment",t),t=s}const r=[],i=[],o=[];return t.anonymous||r.push(t.topicHash),pe(n.length===t.inputs.length,"event arguments/values mismatch","values",n),t.inputs.forEach((s,a)=>{const c=n[a];if(s.indexed)if(s.type==="string")r.push(bl(c));else if(s.type==="bytes")r.push(_n(c));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");r.push(C(this,ci).encode([s.type],[c]))}else i.push(s),o.push(c)}),{data:C(this,ci).encode(i,o),topics:r}}decodeEventLog(t,n,r){if(typeof t=="string"){const h=this.getEvent(t);pe(h,"unknown event","eventFragment",t),t=h}if(r!=null&&!t.anonymous){const h=t.topicHash;pe(er(r[0],32)&&r[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],o=[],s=[];t.inputs.forEach((h,p)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(qr.from({type:"bytes32",name:h.name})),s.push(!0)):(i.push(h),s.push(!1)):(o.push(h),s.push(!1))});const a=r!=null?C(this,ci).decode(i,wn(r)):null,c=C(this,ci).decode(o,n,!0),u=[],l=[];let d=0,f=0;return t.inputs.forEach((h,p)=>{let m=null;if(h.indexed)if(a==null)m=new eG(null);else if(s[p])m=new eG(a[f++]);else try{m=a[f++]}catch(x){m=x}else try{m=c[d++]}catch(x){m=x}u.push(m),l.push(h.name||null)}),P9.fromItems(u,l)}parseTransaction(t){const n=tt(t.data,"tx.data"),r=at(t.value!=null?t.value:0,"tx.value"),i=this.getFunction(Ve(n.slice(0,4)));if(!i)return null;const o=C(this,ci).decode(i.inputs,n.slice(4));return new cZe(i,i.selector,o,r)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const n=this.getEvent(t.topics[0]);return!n||n.anonymous?null:new aZe(n,n.topicHash,this.decodeEventLog(n,t.data,t.topics))}parseError(t){const n=Ve(t),r=this.getError(Bn(n,0,4));if(!r)return null;const i=C(this,ci).decode(r.inputs,Bn(n,4));return new uZe(r,r.selector,i)}static from(t){return t instanceof T1?t:typeof t=="string"?new T1(JSON.parse(t)):typeof t.format=="function"?new T1(t.format("json")):new T1(t)}};pc=new WeakMap,gc=new WeakMap,mc=new WeakMap,ci=new WeakMap,zc=new WeakSet,B8=function(t,n,r){if(er(t)){const o=t.toLowerCase();for(const s of C(this,mc).values())if(o===s.selector)return s;return null}if(t.indexOf("(")===-1){const o=[];for(const[s,a]of C(this,mc))s.split("(")[0]===t&&o.push(a);if(n){const s=n.length>0?n[n.length-1]:null;let a=n.length,c=!0;wi.isTyped(s)&&s.type==="overrides"&&(c=!1,a--);for(let u=o.length-1;u>=0;u--){const l=o[u].inputs.length;l!==a&&(!c||l!==a-1)&&o.splice(u,1)}for(let u=o.length-1;u>=0;u--){const l=o[u].inputs;for(let d=0;d=l.length){if(n[d].type==="overrides")continue;o.splice(u,1);break}if(n[d].type!==l[d].baseType){o.splice(u,1);break}}}}if(o.length===1&&n&&n.length!==o[0].inputs.length){const s=n[n.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&r){const s=o.map(a=>JSON.stringify(a.format())).join(", ");pe(!1,`ambiguous function description (i.e. matches ${s})`,"key",t)}return o[0]}const i=C(this,mc).get(Tc.from(t).format());return i||null},M8=function(t,n,r){if(er(t)){const o=t.toLowerCase();for(const s of C(this,gc).values())if(o===s.topicHash)return s;return null}if(t.indexOf("(")===-1){const o=[];for(const[s,a]of C(this,gc))s.split("(")[0]===t&&o.push(a);if(n){for(let s=o.length-1;s>=0;s--)o[s].inputs.length=0;s--){const a=o[s].inputs;for(let c=0;c1&&r){const s=o.map(a=>JSON.stringify(a.format())).join(", ");pe(!1,`ambiguous event description (i.e. matches ${s})`,"key",t)}return o[0]}const i=C(this,gc).get(kc.from(t).format());return i||null};let lR=T1;const qle=BigInt(0);function M3(e){return e??null}function gi(e){return e==null?null:e.toString()}class rG{constructor(t,n,r){Z(this,"gasPrice");Z(this,"maxFeePerGas");Z(this,"maxPriorityFeePerGas");ot(this,{gasPrice:M3(t),maxFeePerGas:M3(n),maxPriorityFeePerGas:M3(r)})}toJSON(){const{gasPrice:t,maxFeePerGas:n,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:gi(t),maxFeePerGas:gi(n),maxPriorityFeePerGas:gi(r)}}}function $9(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=Ve(e.data));const n="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of n)!(i in e)||e[i]==null||(t[i]=at(e[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in e)||e[i]==null||(t[i]=It(e[i],`request.${i}`));return e.accessList&&(t.accessList=ip(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),t}var _u;class lZe{constructor(t,n){Z(this,"provider");Z(this,"number");Z(this,"hash");Z(this,"timestamp");Z(this,"parentHash");Z(this,"nonce");Z(this,"difficulty");Z(this,"gasLimit");Z(this,"gasUsed");Z(this,"miner");Z(this,"extraData");Z(this,"baseFeePerGas");J(this,_u);D(this,_u,t.transactions.map(r=>typeof r!="string"?new v4(r,n):r)),ot(this,{provider:n,hash:M3(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,miner:t.miner,extraData:t.extraData,baseFeePerGas:M3(t.baseFeePerGas)})}get transactions(){return C(this,_u).map(t=>typeof t=="string"?t:t.hash)}get prefetchedTransactions(){const t=C(this,_u).slice();return t.length===0?[]:(De(typeof t[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:n,extraData:r,gasLimit:i,gasUsed:o,hash:s,miner:a,nonce:c,number:u,parentHash:l,timestamp:d,transactions:f}=this;return{_type:"Block",baseFeePerGas:gi(t),difficulty:gi(n),extraData:r,gasLimit:gi(i),gasUsed:gi(o),hash:s,miner:a,nonce:c,number:u,parentHash:l,timestamp:d,transactions:f}}[Symbol.iterator](){let t=0;const n=this.transactions;return{next:()=>tnew B5(i,n))));let r=qle;t.effectiveGasPrice!=null?r=t.effectiveGasPrice:t.gasPrice!=null&&(r=t.gasPrice),ot(this,{provider:n,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,gasPrice:r,type:t.type,status:t.status,root:t.root})}get logs(){return C(this,B4)}toJSON(){const{to:t,from:n,contractAddress:r,hash:i,index:o,blockHash:s,blockNumber:a,logsBloom:c,logs:u,status:l,root:d}=this;return{_type:"TransactionReceipt",blockHash:s,blockNumber:a,contractAddress:r,cumulativeGasUsed:gi(this.cumulativeGasUsed),from:n,gasPrice:gi(this.gasPrice),gasUsed:gi(this.gasUsed),hash:i,index:o,logs:u,logsBloom:c,root:d,status:l,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t{if(a)return null;const{blockNumber:f,nonce:h}=await fi({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h{if(f==null||f.status!==0)return f;De(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:f.to,from:f.from,data:""},receipt:f})},l=await this.provider.getTransactionReceipt(this.hash);if(r===0)return u(l);if(l){if(await l.confirmations()>=r)return u(l)}else if(await c(),r===0)return null;return await new Promise((f,h)=>{const p=[],m=()=>{p.forEach(y=>y())};if(p.push(()=>{a=!0}),i>0){const y=setTimeout(()=>{m(),h(wr("wait for transaction timeout","TIMEOUT"))},i);p.push(()=>{clearTimeout(y)})}const x=async y=>{if(await y.confirmations()>=r){m();try{f(u(y))}catch(b){h(b)}}};if(p.push(()=>{this.provider.off(this.hash,x)}),this.provider.on(this.hash,x),o>=0){const y=async()=>{try{await c()}catch(b){if($s(b,"TRANSACTION_REPLACED")){m(),h(b);return}}a||this.provider.once("block",y)};p.push(()=>{this.provider.off("block",y)}),this.provider.once("block",y)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return De(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Xle(this)}reorderedEvent(t){return De(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),De(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Jle(this,t)}replaceableTransaction(t){pe(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);const n=new wD(this,this.provider);return D(n,kd,t),n}};kd=new WeakMap;let v4=wD;function dZe(e){return{orphan:"drop-block",hash:e.hash,number:e.number}}function Jle(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function Xle(e){return{orphan:"drop-transaction",tx:e}}function fZe(e){return{orphan:"drop-log",log:{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}}}class yM extends B5{constructor(n,r,i){super(n,n.provider);Z(this,"interface");Z(this,"fragment");Z(this,"args");const o=r.decodeEventLog(i,n.data,n.topics);ot(this,{args:o,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class ede extends B5{constructor(n,r){super(n,n.provider);Z(this,"error");ot(this,{error:r})}}var Bg;class hZe extends Zle{constructor(n,r,i){super(i,r);J(this,Bg);D(this,Bg,n)}get logs(){return super.logs.map(n=>{const r=n.topics.length?C(this,Bg).getEvent(n.topics[0]):null;if(r)try{return new yM(n,C(this,Bg),r)}catch(i){return new ede(n,i)}return n})}}Bg=new WeakMap;var M4;class bM extends v4{constructor(n,r,i){super(i,r);J(this,M4);D(this,M4,n)}async wait(n){const r=await super.wait(n);return r==null?null:new hZe(C(this,M4),this.provider,r)}}M4=new WeakMap;class tde extends Fce{constructor(n,r,i,o){super(n,r,i);Z(this,"log");ot(this,{log:o})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class pZe extends tde{constructor(t,n,r,i,o){super(t,n,r,new yM(o,t.interface,i));const s=t.interface.decodeEventLog(i,this.log.data,this.log.topics);ot(this,{args:s,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const iG=BigInt(0);function nde(e){return e&&typeof e.call=="function"}function rde(e){return e&&typeof e.estimateGas=="function"}function vM(e){return e&&typeof e.resolveName=="function"}function ide(e){return e&&typeof e.sendTransaction=="function"}var D4;class gZe{constructor(t,n,r){J(this,D4);Z(this,"fragment");if(ot(this,{fragment:n}),n.inputs.lengthr[c]==null?null:a.walkAsync(r[c],(l,d)=>l==="address"?Array.isArray(d)?Promise.all(d.map(f=>vi(f,o))):vi(d,o):d)));return t.interface.encodeFilterTopics(n,s)}())}getTopicFilter(){return C(this,D4)}}D4=new WeakMap;function Qh(e,t){return e==null?null:typeof e[t]=="function"?e:e.provider&&typeof e.provider[t]=="function"?e.provider:null}function D0(e){return e==null?null:e.provider||null}async function ode(e,t){const n=wi.dereference(e,"overrides");pe(typeof n=="object","invalid overrides parameter","overrides",e);const r=$9(n);return pe(r.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),pe(r.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=await vi(r.from)),r}async function mZe(e,t,n){const r=Qh(e,"resolveName"),i=vM(r)?r:null;return await Promise.all(t.map((o,s)=>o.walkAsync(n[s],(a,c)=>(c=wi.dereference(c,a),a==="address"?vi(c,i):c))))}function yZe(e){const t=async function(s){const a=await ode(s,["data"]);a.to=await e.getAddress();const c=e.interface,u=at(a.value||iG,"overrides.value")===iG,l=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!l&&!u&&pe(!1,"cannot send data to receive or send value to non-payable fallback","overrides",s),pe(c.fallback||l,"cannot send data to receive-only contract","overrides.data",a.data);const d=c.receive||c.fallback&&c.fallback.payable;return pe(d||u,"cannot send value to non-payable fallback","overrides.value",a.value),pe(c.fallback||l,"cannot send data to receive-only contract","overrides.data",a.data),a},n=async function(s){const a=Qh(e.runner,"call");De(nde(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await t(s);try{return await a.call(c)}catch(u){throw XB(u)&&u.data?e.interface.makeError(u.data,c):u}},r=async function(s){const a=e.runner;De(ide(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await t(s)),u=D0(e.runner);return new bM(e.interface,u,c)},i=async function(s){const a=Qh(e.runner,"estimateGas");return De(rde(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await t(s))},o=async s=>await r(s);return ot(o,{_contract:e,estimateGas:i,populateTransaction:t,send:r,staticCall:n}),o}function bZe(e,t){const n=function(...u){const l=e.interface.getFunction(t,u);return De(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:u}}),l},r=async function(...u){const l=n(...u);let d={};if(l.inputs.length+1===u.length&&(d=await ode(u.pop())),l.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const f=await mZe(e.runner,l.inputs,u);return Object.assign({},d,await fi({to:e.getAddress(),data:e.interface.encodeFunctionData(l,f)}))},i=async function(...u){const l=await a(...u);return l.length===1?l[0]:l},o=async function(...u){const l=e.runner;De(ide(l),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await l.sendTransaction(await r(...u)),f=D0(e.runner);return new bM(e.interface,f,d)},s=async function(...u){const l=Qh(e.runner,"estimateGas");return De(rde(l),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await l.estimateGas(await r(...u))},a=async function(...u){const l=Qh(e.runner,"call");De(nde(l),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await r(...u);let f="0x";try{f=await l.call(d)}catch(p){throw XB(p)&&p.data?e.interface.makeError(p.data,d):p}const h=n(...u);return e.interface.decodeFunctionResult(h,f)},c=async(...u)=>n(...u).constant?await i(...u):await o(...u);return ot(c,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:n,estimateGas:s,populateTransaction:r,send:o,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const u=e.interface.getFunction(t);return De(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),u}}),c}function vZe(e,t){const n=function(...i){const o=e.interface.getEvent(t,i);return De(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:i}}),o},r=function(...i){return new gZe(e,n(...i),i)};return ot(r,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:n}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=e.interface.getEvent(t);return De(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),i}}),r}const H9=Symbol.for("_ethersInternal_contract"),sde=new WeakMap;function xZe(e,t){sde.set(e[H9],t)}function Po(e){return sde.get(e[H9])}function wZe(e){return e&&typeof e=="object"&&"getTopicFilter"in e&&typeof e.getTopicFilter=="function"&&e.fragment}async function xM(e,t){let n,r=null;if(Array.isArray(t)){const o=function(s){if(er(s,32))return s;const a=e.interface.getEvent(s);return pe(a,"unknown fragment","name",s),a.topicHash};n=t.map(s=>s==null?null:Array.isArray(s)?s.map(o):o(s))}else t==="*"?n=[null]:typeof t=="string"?er(t,32)?n=[t]:(r=e.interface.getEvent(t),pe(r,"unknown fragment","event",t),n=[r.topicHash]):wZe(t)?n=await t.getTopicFilter():"fragment"in t?(r=t.fragment,n=[r.topicHash]):pe(!1,"unknown event name","event",t);n=n.map(o=>{if(o==null)return null;if(Array.isArray(o)){const s=Array.from(new Set(o.map(a=>a.toLowerCase())).values());return s.length===1?s[0]:(s.sort(),s)}return o.toLowerCase()});const i=n.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:r,tag:i,topics:n}}async function jb(e,t){const{subs:n}=Po(e);return n.get((await xM(e,t)).tag)||null}async function oG(e,t,n){const r=D0(e.runner);De(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:s}=await xM(e,n),{addr:a,subs:c}=Po(e);let u=c.get(o);if(!u){const d={address:a||e,topics:s},f=x=>{let y=i;if(y==null)try{y=e.interface.getEvent(x.topics[0])}catch{}if(y){const b=y,v=i?e.interface.decodeEventLog(i,x.data,x.topics):[];fR(e,n,v,w=>new pZe(e,w,n,b,x))}else fR(e,n,[],b=>new tde(e,b,n,x))};let h=[];u={tag:o,listeners:[],start:()=>{h.length||h.push(r.on(d,f))},stop:async()=>{if(h.length==0)return;let x=h;h=[],await Promise.all(x),r.off(d,f)}},c.set(o,u)}return u}let dR=Promise.resolve();async function EZe(e,t,n,r){await dR;const i=await jb(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:s,once:a})=>{const c=Array.from(n);r&&c.push(r(a?null:s));try{s.call(e,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),Po(e).subs.delete(i.tag)),o>0}async function fR(e,t,n,r){try{await dR}catch{}const i=EZe(e,t,n,r);return dR=i,await i}const C6=["then"];var zq;zq=H9;const Q3=class Q3{constructor(t,n,r,i){Z(this,"target");Z(this,"interface");Z(this,"runner");Z(this,"filters");Z(this,zq);Z(this,"fallback");pe(typeof t=="string"||ele(t),"invalid value for Contract target","target",t),r==null&&(r=null);const o=lR.from(n);ot(this,{target:t,runner:r,interface:o}),Object.defineProperty(this,H9,{value:{}});let s,a=null,c=null;if(i){const d=D0(r);c=new bM(this.interface,d,i)}let u=new Map;if(typeof t=="string")if(er(t))a=t,s=Promise.resolve(t);else{const d=Qh(r,"resolveName");if(!vM(d))throw wr("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});s=d.resolveName(t).then(f=>{if(f==null)throw wr("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return Po(this).addr=f,f})}else s=t.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Po(this).addr=d,d});xZe(this,{addrPromise:s,addr:a,deployTx:c,subs:u});const l=new Proxy({},{get:(d,f,h)=>{if(typeof f=="symbol"||C6.indexOf(f)>=0)return Reflect.get(d,f,h);try{return this.getEvent(f)}catch(p){if(!$s(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(d,f)=>C6.indexOf(f)>=0?Reflect.has(d,f):Reflect.has(d,f)||this.interface.hasEvent(String(f))});return ot(this,{filters:l}),ot(this,{fallback:o.receive||o.fallback?yZe(this):null}),new Proxy(this,{get:(d,f,h)=>{if(typeof f=="symbol"||f in d||C6.indexOf(f)>=0)return Reflect.get(d,f,h);try{return d.getFunction(f)}catch(p){if(!$s(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(d,f)=>typeof f=="symbol"||f in d||C6.indexOf(f)>=0?Reflect.has(d,f):d.interface.hasFunction(f)})}connect(t){return new Q3(this.target,this.interface,t)}attach(t){return new Q3(t,this.interface,this.runner)}async getAddress(){return await Po(this).addrPromise}async getDeployedCode(){const t=D0(this.runner);De(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const n=await t.getCode(await this.getAddress());return n==="0x"?null:n}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=D0(this.runner);return De(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",s)}catch(a){o(a)}};s()})}deploymentTransaction(){return Po(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),bZe(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),vZe(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,n,r){n==null&&(n=0),r==null&&(r="latest");const{addr:i,addrPromise:o}=Po(this),s=i||await o,{fragment:a,topics:c}=await xM(this,t),u={address:s,topics:c,fromBlock:n,toBlock:r},l=D0(this.runner);return De(l,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await l.getLogs(u)).map(d=>{let f=a;if(f==null)try{f=this.interface.getEvent(d.topics[0])}catch{}if(f)try{return new yM(d,this.interface,f)}catch(h){return new ede(d,h)}return new B5(d,l)})}async on(t,n){const r=await oG(this,"on",t);return r.listeners.push({listener:n,once:!1}),r.start(),this}async once(t,n){const r=await oG(this,"once",t);return r.listeners.push({listener:n,once:!0}),r.start(),this}async emit(t,...n){return await fR(this,t,n,null)}async listenerCount(t){if(t){const i=await jb(this,t);return i?i.listeners.length:0}const{subs:n}=Po(this);let r=0;for(const{listeners:i}of n.values())r+=i.length;return r}async listeners(t){if(t){const i=await jb(this,t);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:n}=Po(this);let r=[];for(const{listeners:i}of n.values())r=r.concat(i.map(({listener:o})=>o));return r}async off(t,n){const r=await jb(this,t);if(!r)return this;if(n){const i=r.listeners.map(({listener:o})=>o).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(n==null||r.listeners.length===0)&&(r.stop(),Po(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){const n=await jb(this,t);if(!n)return this;n.stop(),Po(this).subs.delete(n.tag)}else{const{subs:n}=Po(this);for(const{tag:r,stop:i}of n.values())i(),n.delete(r)}return this}async addListener(t,n){return await this.on(t,n)}async removeListener(t,n){return await this.off(t,n)}static buildClass(t){class n extends Q3{constructor(i,o=null){super(i,t,o)}}return n}static from(t,n,r){return r==null&&(r=null),new this(t,n,r)}};let hR=Q3;function CZe(){return hR}class D3 extends CZe(){}function Ak(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):pe(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class AZe{constructor(t){Z(this,"name");ot(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,n){throw new Error("unsupported coin")}async decodeAddress(t,n){throw new Error("unsupported coin")}}const ade=new RegExp("^(ipfs)://(.*)$","i"),sG=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ade,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Td,th,_d,$p,s7,cde;const _1=class _1{constructor(t,n,r){J(this,_d);Z(this,"provider");Z(this,"address");Z(this,"name");J(this,Td);J(this,th);ot(this,{provider:t,address:n,name:r}),D(this,Td,null),D(this,th,new D3(n,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t))}async supportsWildcard(){return C(this,Td)==null&&D(this,Td,(async()=>{try{return await C(this,th).supportsInterface("0x9061b923")}catch(t){if($s(t,"CALL_EXCEPTION"))return!1;throw D(this,Td,null),t}})()),await C(this,Td)}async getAddress(t){if(t==null&&(t=60),t===60)try{const o=await de(this,_d,$p).call(this,"addr(bytes32)");return o==null||o===sR?null:o}catch(o){if($s(o,"CALL_EXCEPTION"))return null;throw o}if(t>=0&&t<2147483648){let o=t+2147483648;const s=await de(this,_d,$p).call(this,"addr(bytes32,uint)",[o]);if(er(s,20))return Ht(s)}let n=null;for(const o of this.provider.plugins)if(o instanceof AZe&&o.supportsCoinType(t)){n=o;break}if(n==null)return null;const r=await de(this,_d,$p).call(this,"addr(bytes32,uint)",[t]);if(r==null||r==="0x")return null;const i=await n.decodeAddress(t,r);if(i!=null)return i;De(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:r}})}async getText(t){const n=await de(this,_d,$p).call(this,"text(bytes32,string)",[t]);return n==null||n==="0x"?null:n}async getContentHash(){const t=await de(this,_d,$p).call(this,"contenthash(bytes32)");if(t==null||t==="0x")return null;const n=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const i=n[1]==="e3010170"?"ipfs":"ipns",o=parseInt(n[4],16);if(n[5].length===o*2)return`${i}://${jce("0x"+n[2])}`}const r=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;De(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const n=await this.getText("avatar");if(n==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:n});for(let r=0;r{if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>e(n))}}function M5(e,t){return n=>{const r={};for(const i in e){let o=i;if(t&&i in t&&!(o in n)){for(const s of t[i])if(s in n){o=s;break}}try{const s=e[i](n[o]);s!==void 0&&(r[i]=s)}catch(s){const a=s instanceof Error?s.message:"not-an-error";De(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:n})}}return r}}function SZe(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}pe(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function Um(e){return pe(er(e,!0),"invalid data","value",e),e}function Hs(e){return pe(er(e,32),"invalid hash","value",e),e}const kZe=M5({address:Ht,blockHash:Hs,blockNumber:It,data:Um,index:It,removed:Qn(SZe,!1),topics:wM(Hs),transactionHash:Hs,transactionIndex:It},{index:["logIndex"]});function TZe(e){return kZe(e)}const _Ze=M5({hash:Qn(Hs),parentHash:Hs,number:It,timestamp:It,nonce:Qn(Um),difficulty:at,gasLimit:at,gasUsed:at,miner:Qn(Ht),extraData:Um,baseFeePerGas:Qn(at)});function PZe(e){const t=_Ze(e);return t.transactions=e.transactions.map(n=>typeof n=="string"?n:ude(n)),t}const IZe=M5({transactionIndex:It,blockNumber:It,transactionHash:Hs,address:Ht,topics:wM(Hs),data:Um,index:It,blockHash:Hs},{index:["logIndex"]});function RZe(e){return IZe(e)}const NZe=M5({to:Qn(Ht,null),from:Qn(Ht,null),contractAddress:Qn(Ht,null),index:It,root:Qn(Ve),gasUsed:at,logsBloom:Qn(Um),blockHash:Hs,hash:Hs,logs:wM(RZe),blockNumber:It,cumulativeGasUsed:at,effectiveGasPrice:Qn(at),status:Qn(It),type:Qn(It,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function OZe(e){return NZe(e)}function ude(e){e.to&&at(e.to)===aG&&(e.to="0x0000000000000000000000000000000000000000");const t=M5({hash:Hs,type:n=>n==="0x"||n==null?0:It(n),accessList:Qn(ip,null),blockHash:Qn(Hs,null),blockNumber:Qn(It,null),transactionIndex:Qn(It,null),from:Ht,gasPrice:Qn(at),maxPriorityFeePerGas:Qn(at),maxFeePerGas:Qn(at),gasLimit:at,to:Qn(Ht,null),value:at,nonce:It,data:Um,creates:Qn(Ht,null),chainId:Qn(at,null)},{data:["input"],gasLimit:["gas"]})(e);if(t.to==null&&t.creates==null&&(t.creates=RYe(t)),(e.type===1||e.type===2)&&e.accessList==null&&(t.accessList=[]),e.signature?t.signature=Fa.from(e.signature):t.signature=Fa.from(e),t.chainId==null){const n=t.signature.legacyChainId;n!=null&&(t.chainId=n)}return t.blockHash&&at(t.blockHash)===aG&&(t.blockHash=null),t}const LZe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class D5{constructor(t){Z(this,"name");ot(this,{name:t})}clone(){return new D5(this.name)}}class lC extends D5{constructor(n,r){n==null&&(n=0);super(`org.ethers.network.plugins.GasCost#${n||0}`);Z(this,"effectiveBlock");Z(this,"txBase");Z(this,"txCreate");Z(this,"txDataZero");Z(this,"txDataNonzero");Z(this,"txAccessListStorageKey");Z(this,"txAccessListAddress");const i={effectiveBlock:n};function o(s,a){let c=(r||{})[s];c==null&&(c=a),pe(typeof c=="number",`invalud value for ${s}`,"costs",r),i[s]=c}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),ot(this,i)}clone(){return new lC(this.effectiveBlock,this)}}class dC extends D5{constructor(n,r){super("org.ethers.plugins.network.Ens");Z(this,"address");Z(this,"targetNetwork");ot(this,{address:n||LZe,targetNetwork:r??1})}clone(){return new dC(this.address,this.targetNetwork)}}var j4,F4;class lde extends D5{constructor(n,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");J(this,j4);J(this,F4);D(this,j4,n),D(this,F4,r)}get url(){return C(this,j4)}get processFunc(){return C(this,F4)}clone(){return this}}j4=new WeakMap,F4=new WeakMap;const Sk=new Map;var Mg,Dg,Pd;const P1=class P1{constructor(t,n){J(this,Mg);J(this,Dg);J(this,Pd);D(this,Mg,t),D(this,Dg,at(n)),D(this,Pd,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return C(this,Mg)}set name(t){D(this,Mg,t)}get chainId(){return C(this,Dg)}set chainId(t){D(this,Dg,at(t,"chainId"))}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===at(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===at(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===at(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(C(this,Pd).values())}attachPlugin(t){if(C(this,Pd).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return C(this,Pd).set(t.name,t.clone()),this}getPlugin(t){return C(this,Pd).get(t)||null}getPlugins(t){return this.plugins.filter(n=>n.name.split("#")[0]===t)}clone(){const t=new P1(this.name,this.chainId);return this.plugins.forEach(n=>{t.attachPlugin(n.clone())}),t}computeIntrinsicGas(t){const n=this.getPlugin("org.ethers.plugins.network.GasCost")||new lC;let r=n.txBase;if(t.to==null&&(r+=n.txCreate),t.data)for(let i=2;i9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function uG(e){return new lde(e,async(t,n,r)=>{r.setHeader("User-Agent","ethers");let i;try{i=await r.send();const o=i.bodyJson.standard;return{maxFeePerGas:cG(o.maxFee,9),maxPriorityFeePerGas:cG(o.maxPriorityFee,9)}}catch(o){De(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:o})}})}function BZe(e){return new lde("data:",async(t,n,r)=>{const i=await t();if(i.maxFeePerGas==null||i.maxPriorityFeePerGas==null)return i;const o=i.maxFeePerGas-i.maxPriorityFeePerGas;return{gasPrice:i.gasPrice,maxFeePerGas:o+e,maxPriorityFeePerGas:e}})}let lG=!1;function MZe(){if(lG)return;lG=!0;function e(t,n,r){const i=function(){const o=new Hu(t,n);return r.ensNetwork!=null&&o.attachPlugin(new dC(null,r.ensNetwork)),o.attachPlugin(new lC),(r.plugins||[]).forEach(s=>{o.attachPlugin(s)}),o};Hu.register(t,i),Hu.register(n,i),r.altNames&&r.altNames.forEach(o=>{Hu.register(o,i)})}e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("matic",137,{ensNetwork:1,plugins:[uG("https://gasstation.polygon.technology/v2")]}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[uG("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[BZe(BigInt("1000000"))]}),e("optimism-goerli",420,{}),e("xdai",100,{ensNetwork:1})}function pR(e){return JSON.parse(JSON.stringify(e))}var Pu,Ps,Id,yc,jg,D8;class DZe{constructor(t){J(this,jg);J(this,Pu);J(this,Ps);J(this,Id);J(this,yc);D(this,Pu,t),D(this,Ps,null),D(this,Id,4e3),D(this,yc,-2)}get pollingInterval(){return C(this,Id)}set pollingInterval(t){D(this,Id,t)}start(){C(this,Ps)||(D(this,Ps,C(this,Pu)._setTimeout(de(this,jg,D8).bind(this),C(this,Id))),de(this,jg,D8).call(this))}stop(){C(this,Ps)&&(C(this,Pu)._clearTimeout(C(this,Ps)),D(this,Ps,null))}pause(t){this.stop(),t&&D(this,yc,-2)}resume(){this.start()}}Pu=new WeakMap,Ps=new WeakMap,Id=new WeakMap,yc=new WeakMap,jg=new WeakSet,D8=async function(){try{const t=await C(this,Pu).getBlockNumber();if(C(this,yc)===-2){D(this,yc,t);return}if(t!==C(this,yc)){for(let n=C(this,yc)+1;n<=t;n++){if(C(this,Ps)==null)return;await C(this,Pu).emit("block",n)}D(this,yc,t)}}catch{}C(this,Ps)!=null&&D(this,Ps,C(this,Pu)._setTimeout(de(this,jg,D8).bind(this),C(this,Id)))};var nh,rh,Rd;class dde{constructor(t){J(this,nh);J(this,rh);J(this,Rd);D(this,nh,t),D(this,Rd,!1),D(this,rh,n=>{this._poll(n,C(this,nh))})}async _poll(t,n){throw new Error("sub-classes must override this")}start(){C(this,Rd)||(D(this,Rd,!0),C(this,rh).call(this,-2),C(this,nh).on("block",C(this,rh)))}stop(){C(this,Rd)&&(D(this,Rd,!1),C(this,nh).off("block",C(this,rh)))}pause(t){this.stop()}resume(){this.start()}}nh=new WeakMap,rh=new WeakMap,Rd=new WeakMap;var a7;class jZe extends dde{constructor(n,r){super(n);J(this,a7);D(this,a7,pR(r))}async _poll(n,r){throw new Error("@TODO")}}a7=new WeakMap;var Fg;class FZe extends dde{constructor(n,r){super(n);J(this,Fg);D(this,Fg,r)}async _poll(n,r){const i=await r.getTransactionReceipt(C(this,Fg));i&&r.emit(C(this,Fg),i)}}Fg=new WeakMap;var Iu,Ug,zg,Nd,Is,c7,fde;class EM{constructor(t,n){J(this,c7);J(this,Iu);J(this,Ug);J(this,zg);J(this,Nd);J(this,Is);D(this,Iu,t),D(this,Ug,pR(n)),D(this,zg,de(this,c7,fde).bind(this)),D(this,Nd,!1),D(this,Is,-2)}start(){C(this,Nd)||(D(this,Nd,!0),C(this,Is)===-2&&C(this,Iu).getBlockNumber().then(t=>{D(this,Is,t)}),C(this,Iu).on("block",C(this,zg)))}stop(){C(this,Nd)&&(D(this,Nd,!1),C(this,Iu).off("block",C(this,zg)))}pause(t){this.stop(),t&&D(this,Is,-2)}resume(){this.start()}}Iu=new WeakMap,Ug=new WeakMap,zg=new WeakMap,Nd=new WeakMap,Is=new WeakMap,c7=new WeakSet,fde=async function(t){if(C(this,Is)===-2)return;const n=pR(C(this,Ug));n.fromBlock=C(this,Is)+1,n.toBlock=t;const r=await C(this,Iu).getLogs(n);if(r.length===0){C(this,Is){if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((o,s)=>(o[s]=r[s],o),{})}return r})}class hde{constructor(t){Z(this,"name");ot(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function $Ze(e){return JSON.parse(JSON.stringify(e))}function gR(e){return e=Array.from(new Set(e).values()),e.sort(),e}async function kk(e,t){if(e==null)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),typeof e=="string")switch(e){case"block":case"pending":case"debug":case"error":case"network":return{type:e,tag:e}}if(er(e,32)){const n=e.toLowerCase();return{type:"transaction",tag:j8("tx",{hash:n}),hash:n}}if(e.orphan){const n=e;return{type:"orphan",tag:j8("orphan",n),filter:$Ze(n)}}if(e.address||e.topics){const n=e,r={topics:(n.topics||[]).map(i=>i==null?null:Array.isArray(i)?gR(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(n.address){const i=[],o=[],s=a=>{er(a)?i.push(a):o.push((async()=>{i.push(await vi(a,t))})())};Array.isArray(n.address)?n.address.forEach(s):s(n.address),o.length&&await Promise.all(o),r.address=gR(i.map(a=>a.toLowerCase()))}return{filter:r,tag:j8("event",r),type:"event"}}pe(!1,"unknown ProviderEvent","event",e)}function Tk(){return new Date().getTime()}const HZe={cacheTimeout:250,pollingInterval:4e3};var ui,Od,li,$g,Oo,ih,Ld,Ru,U4,Rs,Hg,Vg,Ot,ms,mR,yR,Fb,bR,Ub,F8;class VZe{constructor(t,n){J(this,Ot);J(this,ui);J(this,Od);J(this,li);J(this,$g);J(this,Oo);J(this,ih);J(this,Ld);J(this,Ru);J(this,U4);J(this,Rs);J(this,Hg);J(this,Vg);if(D(this,Vg,Object.assign({},HZe,n||{})),t==="any")D(this,ih,!0),D(this,Oo,null);else if(t){const r=Hu.from(t);D(this,ih,!1),D(this,Oo,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else D(this,ih,!1),D(this,Oo,null);D(this,Ru,-1),D(this,Ld,new Map),D(this,ui,new Map),D(this,Od,new Map),D(this,li,null),D(this,$g,!1),D(this,U4,1),D(this,Rs,new Map),D(this,Hg,!1)}get pollingInterval(){return C(this,Vg).pollingInterval}get provider(){return this}get plugins(){return Array.from(C(this,Od).values())}attachPlugin(t){if(C(this,Od).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return C(this,Od).set(t.name,t.connect(this)),this}getPlugin(t){return C(this,Od).get(t)||null}get disableCcipRead(){return C(this,Hg)}set disableCcipRead(t){D(this,Hg,!!t)}async ccipReadFetch(t,n,r){if(this.disableCcipRead||r.length===0||t.to==null)return null;const i=t.to.toLowerCase(),o=n.toLowerCase(),s=[];for(let a=0;a=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:c,errorMessage:d}}),s.push(d)}De(!1,`error encountered during CCIP fetch: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:r,errorMessages:s}})}_wrapBlock(t,n){return new lZe(PZe(t),this)}_wrapLog(t,n){return new B5(TZe(t),this)}_wrapTransactionReceipt(t,n){return new Zle(OZe(t),this)}_wrapTransactionResponse(t,n){return new v4(ude(t),this)}_detectNetwork(){De(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){De(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=It(await de(this,Ot,ms).call(this,{method:"getBlockNumber"}),"%response");return C(this,Ru)>=0&&D(this,Ru,t),t}_getAddress(t){return vi(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if(er(t))return er(t,32)?t:S1(t);if(typeof t=="bigint"&&(t=It(t,"blockTag")),typeof t=="number")return t>=0?S1(t):C(this,Ru)>=0?S1(C(this,Ru)+t):this.getBlockNumber().then(n=>S1(n+t));pe(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const n=(t.topics||[]).map(c=>c==null?null:Array.isArray(c)?gR(c.map(u=>u.toLowerCase())):c.toLowerCase()),r="blockHash"in t?t.blockHash:void 0,i=(c,u,l)=>{let d;switch(c.length){case 0:break;case 1:d=c[0];break;default:c.sort(),d=c}if(r&&(u!=null||l!=null))throw new Error("invalid filter");const f={};return d&&(f.address=d),n.length&&(f.topics=n),u&&(f.fromBlock=u),l&&(f.toBlock=l),r&&(f.blockHash=r),f};let o=[];if(t.address)if(Array.isArray(t.address))for(const c of t.address)o.push(this._getAddress(c));else o.push(this._getAddress(t.address));let s;"fromBlock"in t&&(s=this._getBlockTag(t.fromBlock));let a;return"toBlock"in t&&(a=this._getBlockTag(t.toBlock)),o.filter(c=>typeof c!="string").length||s!=null&&typeof s!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(o),s,a]).then(c=>i(c[0],c[1],c[2])):i(o,s,a)}_getTransactionRequest(t){const n=$9(t),r=[];if(["to","from"].forEach(i=>{if(n[i]==null)return;const o=vi(n[i]);A6(o)?r.push(async function(){n[i]=await o}()):n[i]=o}),n.blockTag!=null){const i=this._getBlockTag(n.blockTag);A6(i)?r.push(async function(){n.blockTag=await i}()):n.blockTag=i}return r.length?async function(){return await Promise.all(r),n}():n}async getNetwork(){if(C(this,Oo)==null){const i=this._detectNetwork().then(o=>(this.emit("network",o,null),o),o=>{throw C(this,Oo)===i&&D(this,Oo,null),o});return D(this,Oo,i),(await i).clone()}const t=C(this,Oo),[n,r]=await Promise.all([t,this._detectNetwork()]);return n.chainId!==r.chainId&&(C(this,ih)?(this.emit("network",r,n),C(this,Oo)===t&&D(this,Oo,Promise.resolve(r))):De(!1,`network changed: ${n.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),n.clone()}async getFeeData(){const t=await this.getNetwork(),n=async()=>{const{_block:i,gasPrice:o}=await fi({_block:de(this,Ot,bR).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await de(this,Ot,ms).call(this,{method:"getGasPrice"});return at(u,"%response")}catch{}return null})()});let s=null,a=null;const c=this._wrapBlock(i,t);return c&&c.baseFeePerGas&&(a=BigInt("1000000000"),s=c.baseFeePerGas*UZe+a),new rG(o,s,a)},r=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new yl(r.url),o=await r.processFunc(n,this,i);return new rG(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await n()}async estimateGas(t){let n=this._getTransactionRequest(t);return A6(n)&&(n=await n),at(await de(this,Ot,ms).call(this,{method:"estimateGas",transaction:n}),"%response")}async call(t){const{tx:n,blockTag:r}=await fi({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await de(this,Ot,yR).call(this,de(this,Ot,mR).call(this,n,r,t.enableCcipRead?0:-1))}async getBalance(t,n){return at(await de(this,Ot,Fb).call(this,{method:"getBalance"},t,n),"%response")}async getTransactionCount(t,n){return It(await de(this,Ot,Fb).call(this,{method:"getTransactionCount"},t,n),"%response")}async getCode(t,n){return Ve(await de(this,Ot,Fb).call(this,{method:"getCode"},t,n))}async getStorage(t,n,r){const i=at(n,"position");return Ve(await de(this,Ot,Fb).call(this,{method:"getStorage",position:i},t,r))}async broadcastTransaction(t){const{blockNumber:n,hash:r,network:i}=await fi({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),o=m4.from(t);if(o.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(n)}async getBlock(t,n){const{network:r,params:i}=await fi({network:this.getNetwork(),params:de(this,Ot,bR).call(this,t,!!n)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(t){const{network:n,params:r}=await fi({network:this.getNetwork(),params:de(this,Ot,ms).call(this,{method:"getTransaction",hash:t})});return r==null?null:this._wrapTransactionResponse(r,n)}async getTransactionReceipt(t){const{network:n,params:r}=await fi({network:this.getNetwork(),params:de(this,Ot,ms).call(this,{method:"getTransactionReceipt",hash:t})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await de(this,Ot,ms).call(this,{method:"getTransaction",hash:t});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,n)}async getTransactionResult(t){const{result:n}=await fi({network:this.getNetwork(),result:de(this,Ot,ms).call(this,{method:"getTransactionResult",hash:t})});return n==null?null:Ve(n)}async getLogs(t){let n=this._getFilter(t);A6(n)&&(n=await n);const{network:r,params:i}=await fi({network:this.getNetwork(),params:de(this,Ot,ms).call(this,{method:"getLogs",filter:n})});return i.map(o=>this._wrapLog(o,r))}_getProvider(t){De(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await V9.fromName(this,t)}async getAvatar(t){const n=await this.getResolver(t);return n?await n.getAvatar():null}async resolveName(t){const n=await this.getResolver(t);return n?await n.getAddress():null}async lookupAddress(t){t=Ht(t);const n=cR(t.substring(2).toLowerCase()+".addr.reverse");try{const r=await V9.getEnsAddress(this),o=await new D3(r,["function resolver(bytes32) view returns (address)"],this).resolver(n);if(o==null||o===sR)return null;const a=await new D3(o,["function name(bytes32) view returns (string)"],this).name(n);return await this.resolveName(a)!==t?null:a}catch(r){if($s(r,"BAD_DATA")&&r.value==="0x"||$s(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(t,n,r){const i=n??1;return i===0?this.getTransactionReceipt(t):new Promise(async(o,s)=>{let a=null;const c=async u=>{try{const l=await this.getTransactionReceipt(t);if(l!=null&&u-l.blockNumber+1>=i){o(l),a&&(clearTimeout(a),a=null);return}}catch(l){console.log("EEE",l)}this.once("block",c)};r!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),s(wr("timeout","TIMEOUT",{reason:"timeout"})))},r)),c(await this.getBlockNumber())})}async waitForBlock(t){De(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const n=C(this,Rs).get(t);n&&(n.timer&&clearTimeout(n.timer),C(this,Rs).delete(t))}_setTimeout(t,n){n==null&&(n=0);const r=xo(this,U4)._++,i=()=>{C(this,Rs).delete(r),t()};if(this.paused)C(this,Rs).set(r,{timer:null,func:i,time:n});else{const o=setTimeout(i,n);C(this,Rs).set(r,{timer:o,func:i,time:Tk()})}return r}_forEachSubscriber(t){for(const n of C(this,ui).values())t(n.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new hde(t.type);case"block":{const n=new DZe(this);return n.pollingInterval=this.pollingInterval,n}case"event":return new EM(this,t.filter);case"transaction":return new FZe(this,t.hash);case"orphan":return new jZe(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,n){for(const r of C(this,ui).values())if(r.subscriber===t){r.started&&r.subscriber.stop(),r.subscriber=n,r.started&&n.start(),C(this,li)!=null&&n.pause(C(this,li));break}}async on(t,n){const r=await de(this,Ot,F8).call(this,t);return r.listeners.push({listener:n,once:!1}),r.started||(r.subscriber.start(),r.started=!0,C(this,li)!=null&&r.subscriber.pause(C(this,li))),this}async once(t,n){const r=await de(this,Ot,F8).call(this,t);return r.listeners.push({listener:n,once:!0}),r.started||(r.subscriber.start(),r.started=!0,C(this,li)!=null&&r.subscriber.pause(C(this,li))),this}async emit(t,...n){const r=await de(this,Ot,Ub).call(this,t,n);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:o,once:s})=>{const a=new Fce(this,s?null:o,t);try{o.call(this,...n,a)}catch{}return!s}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),C(this,ui).delete(r.tag)),i>0}async listenerCount(t){if(t){const r=await de(this,Ot,Ub).call(this,t);return r?r.listeners.length:0}let n=0;for(const{listeners:r}of C(this,ui).values())n+=r.length;return n}async listeners(t){if(t){const r=await de(this,Ot,Ub).call(this,t);return r?r.listeners.map(({listener:i})=>i):[]}let n=[];for(const{listeners:r}of C(this,ui).values())n=n.concat(r.map(({listener:i})=>i));return n}async off(t,n){const r=await de(this,Ot,Ub).call(this,t);if(!r)return this;if(n){const i=r.listeners.map(({listener:o})=>o).indexOf(n);i>=0&&r.listeners.splice(i,1)}return(!n||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),C(this,ui).delete(r.tag)),this}async removeAllListeners(t){if(t){const{tag:n,started:r,subscriber:i}=await de(this,Ot,F8).call(this,t);r&&i.stop(),C(this,ui).delete(n)}else for(const[n,{started:r,subscriber:i}]of C(this,ui))r&&i.stop(),C(this,ui).delete(n);return this}async addListener(t,n){return await this.on(t,n)}async removeListener(t,n){return this.off(t,n)}get destroyed(){return C(this,$g)}destroy(){this.removeAllListeners();for(const t of C(this,Rs).keys())this._clearTimeout(t);D(this,$g,!0)}get paused(){return C(this,li)!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(D(this,Ru,-1),C(this,li)!=null){if(C(this,li)==!!t)return;De(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(n=>n.pause(t)),D(this,li,!!t);for(const n of C(this,Rs).values())n.timer&&clearTimeout(n.timer),n.time=Tk()-n.time}resume(){if(C(this,li)!=null){this._forEachSubscriber(t=>t.resume()),D(this,li,null);for(const t of C(this,Rs).values()){let n=t.time;n<0&&(n=0),t.time=Tk(),setTimeout(t.func,n)}}}}ui=new WeakMap,Od=new WeakMap,li=new WeakMap,$g=new WeakMap,Oo=new WeakMap,ih=new WeakMap,Ld=new WeakMap,Ru=new WeakMap,U4=new WeakMap,Rs=new WeakMap,Hg=new WeakMap,Vg=new WeakMap,Ot=new WeakSet,ms=async function(t){const n=C(this,Vg).cacheTimeout;if(n<0)return await this._perform(t);const r=j8(t.method,t);let i=C(this,Ld).get(r);return i||(i=this._perform(t),C(this,Ld).set(r,i),setTimeout(()=>{C(this,Ld).get(r)===i&&C(this,Ld).delete(r)},n)),await i},mR=async function(t,n,r){De(r=0&&n==="latest"&&i.to!=null&&Bn(o.data,0,4)==="0x556f1830"){const s=o.data,a=await vi(i.to,this);let c;try{c=YZe(Bn(o.data,4))}catch(d){De(!1,d.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:s}})}De(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const u=await this.ccipReadFetch(i,c.calldata,c.urls);De(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:c.errorArgs}});const l={to:a,data:wn([c.selector,QZe([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const d=await de(this,Ot,mR).call(this,l,n,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:d}),d}catch(d){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:d}),d}}throw o}},yR=async function(t){const{value:n}=await fi({network:this.getNetwork(),value:t});return n},Fb=async function(t,n,r){let i=this._getAddress(n),o=this._getBlockTag(r);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await de(this,Ot,yR).call(this,de(this,Ot,ms).call(this,Object.assign(t,{address:i,blockTag:o})))},bR=async function(t,n){if(er(t,32))return await de(this,Ot,ms).call(this,{method:"getBlock",blockHash:t,includeTransactions:n});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await de(this,Ot,ms).call(this,{method:"getBlock",blockTag:r,includeTransactions:n})},Ub=async function(t,n){let r=await kk(t,this);return r.type==="event"&&n&&n.length>0&&n[0].removed===!0&&(r=await kk({orphan:"drop-log",log:n[0]},this)),C(this,ui).get(r.tag)||null},F8=async function(t){const n=await kk(t,this),r=n.tag;let i=C(this,ui).get(r);return i||(i={subscriber:this._getSubscriber(n),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},C(this,ui).set(r,i)),i};function WZe(e,t){try{const n=vR(e,t);if(n)return eM(n)}catch{}return null}function vR(e,t){if(e==="0x")return null;try{const n=It(Bn(e,t,t+32)),r=It(Bn(e,n,n+32));return Bn(e,n+32,n+32+r)}catch{}return null}function dG(e){const t=ao(e);if(t.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(t,32-t.length),n}function GZe(e){if(e.length%32===0)return e;const t=new Uint8Array(Math.ceil(e.length/32)*32);return t.set(e),t}const KZe=new Uint8Array([]);function QZe(e){const t=[];let n=0;for(let r=0;r=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const n=Bn(e,0,32);De(Bn(n,0,12)===Bn(fG,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=Bn(n,12);try{const r=[],i=It(Bn(e,32,64)),o=It(Bn(e,i,i+32)),s=Bn(e,i+32);for(let a=0;at[r]),t}function Tp(e,t){if(e.provider)return e.provider;De(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function hG(e,t){let n=$9(t);if(n.to!=null&&(n.to=vi(n.to,e)),n.from!=null){const r=n.from;n.from=Promise.all([e.getAddress(),vi(r,e)]).then(([i,o])=>(pe(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else n.from=e.getAddress();return await fi(n)}class CM{constructor(t){Z(this,"provider");ot(this,{provider:t||null})}async getNonce(t){return Tp(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await hG(this,t)}async populateTransaction(t){const n=Tp(this,"populateTransaction"),r=await hG(this,t);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const s=at(r.chainId);pe(s===i.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else r.chainId=i.chainId;const o=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||o)?pe(!1,"eip-1559 transaction do not support gasPrice","tx",t):(r.type===0||r.type===1)&&o&&pe(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const s=await n.getFeeData();De(s.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice)}else{const s=await n.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const a=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=a,r.maxPriorityFeePerGas=a}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(De(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):De(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return await fi(r)}async estimateGas(t){return Tp(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return Tp(this,"call").call(await this.populateCall(t))}async resolveName(t){return await Tp(this,"resolveName").resolveName(t)}async sendTransaction(t){const n=Tp(this,"sendTransaction"),r=await this.populateTransaction(t);delete r.from;const i=m4.from(r);return await n.broadcastTransaction(await this.signTransaction(i))}}var Wg,U8;const ED=class ED extends CM{constructor(n,r){super(r);J(this,Wg);Z(this,"address");ot(this,{address:n})}async getAddress(){return this.address}connect(n){return new ED(this.address,n)}async signTransaction(n){de(this,Wg,U8).call(this,"transactions","signTransaction")}async signMessage(n){de(this,Wg,U8).call(this,"messages","signMessage")}async signTypedData(n,r,i){de(this,Wg,U8).call(this,"typed-data","signTypedData")}};Wg=new WeakSet,U8=function(n,r){De(!1,`VoidSigner cannot sign ${n}`,"UNSUPPORTED_OPERATION",{operation:r})};let xR=ED;function qZe(e){return JSON.parse(JSON.stringify(e))}var Xi,bc,oh,Bd,sh,Gg,mf,wR,ER;class pde{constructor(t){J(this,mf);J(this,Xi);J(this,bc);J(this,oh);J(this,Bd);J(this,sh);J(this,Gg);D(this,Xi,t),D(this,bc,null),D(this,oh,de(this,mf,wR).bind(this)),D(this,Bd,!1),D(this,sh,null),D(this,Gg,!1)}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,n){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}start(){C(this,Bd)||(D(this,Bd,!0),de(this,mf,wR).call(this,-2))}stop(){C(this,Bd)&&(D(this,Bd,!1),D(this,Gg,!0),de(this,mf,ER).call(this),C(this,Xi).off("block",C(this,oh)))}pause(t){t&&de(this,mf,ER).call(this),C(this,Xi).off("block",C(this,oh))}resume(){this.start()}}Xi=new WeakMap,bc=new WeakMap,oh=new WeakMap,Bd=new WeakMap,sh=new WeakMap,Gg=new WeakMap,mf=new WeakSet,wR=async function(t){try{C(this,bc)==null&&D(this,bc,this._subscribe(C(this,Xi)));let n=null;try{n=await C(this,bc)}catch(o){if(!$s(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(n==null){D(this,bc,null),C(this,Xi)._recoverSubscriber(this,this._recover(C(this,Xi)));return}const r=await C(this,Xi).getNetwork();if(C(this,sh)||D(this,sh,r),C(this,sh).chainId!==r.chainId)throw new Error("chaid changed");if(C(this,Gg))return;const i=await C(this,Xi).send("eth_getFilterChanges",[n]);await this._emitResults(C(this,Xi),i)}catch(n){console.log("@TODO",n)}C(this,Xi).once("block",C(this,oh))},ER=function(){const t=C(this,bc);t&&(D(this,bc,null),t.then(n=>{C(this,Xi).send("eth_uninstallFilter",[n])}))};var ah;class ZZe extends pde{constructor(n,r){super(n);J(this,ah);D(this,ah,qZe(r))}_recover(n){return new EM(n,C(this,ah))}async _subscribe(n){return await n.send("eth_newFilter",[C(this,ah)])}async _emitResults(n,r){for(const i of r)n.emit(C(this,ah),n._wrapLog(i,n._network))}}ah=new WeakMap;class JZe extends pde{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,n){for(const r of n)t.emit("pending",r)}}const XZe="bigint,boolean,function,number,string,symbol".split(/,/g);function z8(e){if(e==null||XZe.indexOf(typeof e)>=0||typeof e.getAddress=="function")return e;if(Array.isArray(e))return e.map(z8);if(typeof e=="object")return Object.keys(e).reduce((t,n)=>(t[n]=e[n],t),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function eJe(e){return new Promise(t=>{setTimeout(t,e)})}function _p(e){return e&&e.toLowerCase()}function pG(e){return e&&typeof e.pollingInterval=="number"}const tJe={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class _k extends CM{constructor(n,r){super(n);Z(this,"address");r=Ht(r),ot(this,{address:r})}connect(n){De(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(n){return await this.populateCall(n)}async sendUncheckedTransaction(n){const r=z8(n),i=[];if(r.from){const s=r.from;i.push((async()=>{const a=await vi(s,this.provider);pe(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=a})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const s=r.to;i.push((async()=>{r.to=await vi(s,this.provider)})())}i.length&&await Promise.all(i);const o=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[o])}async sendTransaction(n){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(n);return await new Promise((o,s)=>{const a=[1e3,100],c=async()=>{const u=await this.provider.getTransaction(i);if(u!=null){o(u.replaceableTransaction(r));return}this.provider._setTimeout(()=>{c()},a.pop()||4e3)};c()})}async signTransaction(n){const r=z8(n);if(r.from){const o=await vi(r.from,this.provider);pe(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",n),r.from=o}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(n){const r=typeof n=="string"?$i(n):n;return await this.provider.send("personal_sign",[Ve(r),this.address.toLowerCase()])}async signTypedData(n,r,i){const o=z8(i),s=await Fm.resolveNames(n,r,o,async a=>{const c=await vi(a);return pe(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Fm.getPayload(s.domain,r,s.value))])}async unlock(n){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),n,null])}async _legacySignMessage(n){const r=typeof n=="string"?$i(n):n;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ve(r)])}}var ch,Kg,Nu,vc,xa,Ou,z4,CR;class nJe extends VZe{constructor(n,r){super(n,r);J(this,z4);J(this,ch);J(this,Kg);J(this,Nu);J(this,vc);J(this,xa);J(this,Ou);D(this,Kg,1),D(this,ch,Object.assign({},tJe,r||{})),D(this,Nu,[]),D(this,vc,null),D(this,Ou,null);{let o=null;const s=new Promise(a=>{o=a});D(this,xa,{promise:s,resolve:o})}const i=this._getOption("staticNetwork");i&&(pe(n==null||i.matches(n),"staticNetwork MUST match network object","options",r),D(this,Ou,i))}_getOption(n){return C(this,ch)[n]}get _network(){return De(C(this,Ou),"network is not available yet","NETWORK_ERROR"),C(this,Ou)}async _perform(n){if(n.method==="call"||n.method==="estimateGas"){let i=n.transaction;if(i&&i.type!=null&&at(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=await this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(n=Object.assign({},n,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(n);return r!=null?await this.send(r.method,r.args):super._perform(n)}async _detectNetwork(){const n=this._getOption("staticNetwork");if(n)return n;if(this.ready)return Hu.from(at(await this.send("eth_chainId",[])));const r={id:xo(this,Kg)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0]}catch(o){throw this.emit("debug",{action:"receiveRpcError",error:o}),o}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return Hu.from(at(i.result));throw this.getRpcError(r,i)}_start(){C(this,xa)==null||C(this,xa).resolve==null||(C(this,xa).resolve(),D(this,xa,null),(async()=>{for(;C(this,Ou)==null&&!this.destroyed;)try{D(this,Ou,await this._detectNetwork())}catch(n){console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",wr("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:n}})),await eJe(1e3)}de(this,z4,CR).call(this)})())}async _waitUntilReady(){if(C(this,xa)!=null)return await C(this,xa).promise}_getSubscriber(n){return n.type==="pending"?new JZe(this):n.type==="event"?this._getOption("polling")?new EM(this,n.filter):new ZZe(this,n.filter):n.type==="orphan"&&n.filter.orphan==="drop-log"?new hde("orphan"):super._getSubscriber(n)}get ready(){return C(this,xa)==null}getRpcTransaction(n){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(n[i]==null)return;let o=i;i==="gasLimit"&&(o="gas"),r[o]=S1(at(n[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{n[i]!=null&&(r[i]=Ve(n[i]))}),n.accessList&&(r.accessList=ip(n.accessList)),r}getRpcRequest(n){switch(n.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[_p(n.address),n.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[_p(n.address),n.blockTag]};case"getCode":return{method:"eth_getCode",args:[_p(n.address),n.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[_p(n.address),"0x"+n.position.toString(16),n.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[n.signedTransaction]};case"getBlock":if("blockTag"in n)return{method:"eth_getBlockByNumber",args:[n.blockTag,!!n.includeTransactions]};if("blockHash"in n)return{method:"eth_getBlockByHash",args:[n.blockHash,!!n.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[n.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[n.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(n.transaction),n.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(n.transaction)]};case"getLogs":return n.filter&&n.filter.address!=null&&(Array.isArray(n.filter.address)?n.filter.address=n.filter.address.map(_p):n.filter.address=_p(n.filter.address)),{method:"eth_getLogs",args:[n.filter]}}return null}getRpcError(n,r){const{method:i}=n,{error:o}=r;if(i==="eth_estimateGas"&&o.message){const c=o.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return wr("insufficient funds","INSUFFICIENT_FUNDS",{transaction:n.params[0],info:{payload:n,error:o}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=AR(o),u=b4.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",n.params[0],c?c.data:null);return u.info={error:o,payload:n},u}const s=JSON.stringify(oJe(o));if(typeof o.message=="string"&&o.message.match(/user denied|ethers-user-denied/i))return wr("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:n,error:o}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const c=n.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return wr("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:o}});if(s.match(/nonce/i)&&s.match(/too low/i))return wr("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:o}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return wr("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:o}});if(s.match(/only replay-protected/i))return wr("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:c,info:{error:o}}})}let a=!!s.match(/the method .* does not exist/i);return a||o&&o.details&&o.details.startsWith("Unauthorized method:")&&(a=!0),a?wr("unsupported operation","UNSUPPORTED_OPERATION",{operation:n.method,info:{error:o,payload:n}}):wr("could not coalesce error","UNKNOWN_ERROR",{error:o,payload:n})}send(n,r){if(this.destroyed)return Promise.reject(wr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n}));const i=xo(this,Kg)._++,o=new Promise((s,a)=>{C(this,Nu).push({resolve:s,reject:a,payload:{method:n,params:r,id:i,jsonrpc:"2.0"}})});return de(this,z4,CR).call(this),o}async getSigner(n){n==null&&(n=0);const r=this.send("eth_accounts",[]);if(typeof n=="number"){const o=await r;if(n>=o.length)throw new Error("no such account");return new _k(this,o[n])}const{accounts:i}=await fi({network:this.getNetwork(),accounts:r});n=Ht(n);for(const o of i)if(Ht(o)===n)return new _k(this,n);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new _k(this,r))}destroy(){C(this,vc)&&(clearTimeout(C(this,vc)),D(this,vc,null));for(const{payload:n,reject:r}of C(this,Nu))r(wr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:n.method}));D(this,Nu,[]),super.destroy()}}ch=new WeakMap,Kg=new WeakMap,Nu=new WeakMap,vc=new WeakMap,xa=new WeakMap,Ou=new WeakMap,z4=new WeakSet,CR=function(){if(C(this,vc))return;const n=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");D(this,vc,setTimeout(()=>{D(this,vc,null);const r=C(this,Nu);for(D(this,Nu,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==C(this,ch).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(s=>s.payload)).length>C(this,ch).batchMaxSize){r.unshift(i.pop());break}(async()=>{const o=i.length===1?i[0].payload:i.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:o});try{const s=await this._send(o);this.emit("debug",{action:"receiveRpcResult",result:s});for(const{resolve:a,reject:c,payload:u}of i){if(this.destroyed){c(wr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const l=s.filter(d=>d.id===u.id)[0];if(l==null){const d=wr("missing response for request","BAD_DATA",{value:s,info:{payload:u}});this.emit("error",d),c(d);continue}if("error"in l){c(this.getRpcError(u,l));continue}a(l.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(const{reject:a}of i)a(s)}})()}},n))};var Md;class rJe extends nJe{constructor(n,r){super(n,r);J(this,Md);D(this,Md,4e3)}_getSubscriber(n){const r=super._getSubscriber(n);return pG(r)&&(r.pollingInterval=C(this,Md)),r}get pollingInterval(){return C(this,Md)}set pollingInterval(n){if(!Number.isInteger(n)||n<0)throw new Error("invalid interval");D(this,Md,n),this._forEachSubscriber(r=>{pG(r)&&(r.pollingInterval=C(this,Md))})}}Md=new WeakMap;var Qg;class iJe extends rJe{constructor(n,r,i){n==null&&(n="http://localhost:8545");super(r,i);J(this,Qg);typeof n=="string"?D(this,Qg,new yl(n)):D(this,Qg,n.clone())}_getConnection(){return C(this,Qg).clone()}async send(n,r){return await this._start(),await super.send(n,r)}async _send(n){const r=this._getConnection();r.body=JSON.stringify(n),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let o=i.bodyJson;return Array.isArray(o)||(o=[o]),o}}Qg=new WeakMap;function AR(e){if(e==null)return null;if(typeof e.message=="string"&&e.message.match(/revert/i)&&er(e.data))return{message:e.message,data:e.data};if(typeof e=="object"){for(const t in e){const n=AR(e[t]);if(n)return n}return null}if(typeof e=="string")try{return AR(JSON.parse(e))}catch{}return null}function SR(e,t){if(e!=null){if(typeof e.message=="string"&&t.push(e.message),typeof e=="object")for(const n in e)SR(e[n],t);if(typeof e=="string")try{return SR(JSON.parse(e),t)}catch{}}}function oJe(e){const t=[];return SR(e,t),t}var Yg;const CD=class CD extends CM{constructor(n,r){super(r);Z(this,"address");J(this,Yg);pe(n&&typeof n.sign=="function","invalid private key","privateKey","[ REDACTED ]"),D(this,Yg,n);const i=L5(this.signingKey.publicKey);ot(this,{address:i})}get signingKey(){return C(this,Yg)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(n){return new CD(C(this,Yg),n)}async signTransaction(n){const{to:r,from:i}=await fi({to:n.to?vi(n.to,this.provider):void 0,from:n.from?vi(n.from,this.provider):void 0});r!=null&&(n.to=r),i!=null&&(n.from=i),n.from!=null&&(pe(Ht(n.from)===this.address,"transaction from address mismatch","tx.from",n.from),delete n.from);const o=m4.from(n);return o.signature=this.signingKey.sign(o.unsignedHash),o.serialized}async signMessage(n){return this.signMessageSync(n)}signMessageSync(n){return this.signingKey.sign(Fqe(n)).serialized}async signTypedData(n,r,i){const o=await Fm.resolveNames(n,r,i,async s=>{De(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:s}});const a=await this.provider.resolveName(s);return De(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:s}),a});return this.signingKey.sign(Fm.hash(o.domain,r,o.value)).serialized}};Yg=new WeakMap;let W9=CD;const G9=" !#$%&'()*+,-./<=>?@[]^_`{|}~",sJe=/^[a-z]*$/i;function gG(e,t){let n=97;return e.reduce((r,i)=>(i===t?n++:i.match(sJe)?r.push(String.fromCharCode(n)+i):(n=97,r.push(i)),r),[])}function aJe(e,t){for(let i=G9.length-1;i>=0;i--)e=e.split(G9[i]).join(t.substring(2*i,2*i+2));const n=[],r=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,o,s,a)=>{if(s)for(let c=parseInt(s);c>=0;c--)n.push(";");else n.push(o.toLowerCase());return""});if(r)throw new Error(`leftovers: ${JSON.stringify(r)}`);return gG(gG(n,";"),":")}function cJe(e){return pe(e[0]==="0","unsupported auwl data","data",e),aJe(e.substring(1+2*G9.length),e.substring(1,1+2*G9.length))}class uJe{constructor(t){Z(this,"locale");ot(this,{locale:t})}split(t){return t.toLowerCase().split(/\s+/g)}join(t){return t.join(" ")}}var qg,$4,uh,H4,kR;class lJe extends uJe{constructor(n,r,i){super(n);J(this,H4);J(this,qg);J(this,$4);J(this,uh);D(this,qg,r),D(this,$4,i),D(this,uh,null)}get _data(){return C(this,qg)}_decodeWords(){return cJe(C(this,qg))}getWord(n){const r=de(this,H4,kR).call(this);return pe(n>=0&&n=12&&n.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const r=new Uint8Array(Math.ceil(11*n.length/8));let i=0;for(let u=0;u=0,`invalid mnemonic word at index ${u}`,"mnemonic","[ REDACTED ]");for(let d=0;d<11;d++)l&1<<10-d&&(r[i>>3]|=1<<7-i%8),i++}const o=32*n.length/3,s=n.length/3,a=gde(s),c=tt(ja(r.slice(0,o/8)))[0]&a;return pe(c===(r[r.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),Ve(r.slice(0,o/8))}function Rk(e,t){pe(e.length%4===0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),t==null&&(t=Yh.wordlist());const n=[0];let r=11;for(let s=0;s8?(n[n.length-1]<<=8,n[n.length-1]|=e[s],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[s]>>8-r,n.push(e[s]&hJe(8-r)),r+=3);const i=e.length/4,o=parseInt(ja(e).substring(2,4),16)&gde(i);return n[n.length-1]<<=i,n[n.length-1]|=o>>8-i,t.join(n.map(s=>t.getWord(s)))}const Nk={};class zm{constructor(t,n,r,i,o){Z(this,"phrase");Z(this,"password");Z(this,"wordlist");Z(this,"entropy");i==null&&(i=""),o==null&&(o=Yh.wordlist()),np(t,Nk,"Mnemonic"),ot(this,{phrase:r,password:i,wordlist:o,entropy:n})}computeSeed(){const t=$i("mnemonic"+this.password,"NFKD");return Tf($i(this.phrase,"NFKD"),t,2048,64,"sha512")}static fromPhrase(t,n,r){const i=Ik(t,r);return t=Rk(tt(i),r),new zm(Nk,i,t,n,r)}static fromEntropy(t,n,r){const i=tt(t,"entropy"),o=Rk(i,r);return new zm(Nk,Ve(i),o,n,r)}static entropyToPhrase(t,n){const r=tt(t,"entropy");return Rk(r,n)}static phraseToEntropy(t,n){return Ik(t,n)}static isValidMnemonic(t,n){try{return Ik(t,n),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var Ur=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Ok=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},$8,ys,rc;const pJe={16:10,24:12,32:14},gJe=[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],ds=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],S6=[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],mJe=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],yJe=[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],bJe=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],vJe=[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],xJe=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],wJe=[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],EJe=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],CJe=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],AJe=[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],SJe=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],kJe=[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],TJe=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Lk(e){const t=[];for(let n=0;n>2,Ur(this,rc,"f")[s][l%4]=o[l],Ur(this,ys,"f")[n-s][l%4]=o[l];let a=0,c=i,u;for(;c>16&255]<<24^ds[u>>8&255]<<16^ds[u&255]<<8^ds[u>>24&255]^gJe[a]<<24,a+=1,i!=8)for(let h=1;h>8&255]<<8^ds[u>>16&255]<<16^ds[u>>24&255]<<24;for(let h=i/2+1;h>2,f=c%4,Ur(this,rc,"f")[d][f]=o[l],Ur(this,ys,"f")[n-d][f]=o[l++],c++}for(let l=1;l>24&255]^SJe[u>>16&255]^kJe[u>>8&255]^TJe[u&255]}encrypt(t){if(t.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const n=Ur(this,rc,"f").length-1,r=[0,0,0,0];let i=Lk(t);for(let a=0;a<4;a++)i[a]^=Ur(this,rc,"f")[0][a];for(let a=1;a>24&255]^yJe[i[(c+1)%4]>>16&255]^bJe[i[(c+2)%4]>>8&255]^vJe[i[(c+3)%4]&255]^Ur(this,rc,"f")[a][c];i=r.slice()}const o=new Uint8Array(16);let s=0;for(let a=0;a<4;a++)s=Ur(this,rc,"f")[n][a],o[4*a]=(ds[i[a]>>24&255]^s>>24)&255,o[4*a+1]=(ds[i[(a+1)%4]>>16&255]^s>>16)&255,o[4*a+2]=(ds[i[(a+2)%4]>>8&255]^s>>8)&255,o[4*a+3]=(ds[i[(a+3)%4]&255]^s)&255;return o}decrypt(t){if(t.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const n=Ur(this,ys,"f").length-1,r=[0,0,0,0];let i=Lk(t);for(let a=0;a<4;a++)i[a]^=Ur(this,ys,"f")[0][a];for(let a=1;a>24&255]^wJe[i[(c+3)%4]>>16&255]^EJe[i[(c+2)%4]>>8&255]^CJe[i[(c+1)%4]&255]^Ur(this,ys,"f")[a][c];i=r.slice()}const o=new Uint8Array(16);let s=0;for(let a=0;a<4;a++)s=Ur(this,ys,"f")[n][a],o[4*a]=(S6[i[a]>>24&255]^s>>24)&255,o[4*a+1]=(S6[i[(a+3)%4]>>16&255]^s>>16)&255,o[4*a+2]=(S6[i[(a+2)%4]>>8&255]^s>>8)&255,o[4*a+3]=(S6[i[(a+1)%4]&255]^s)&255;return o}}$8=new WeakMap,ys=new WeakMap,rc=new WeakMap;class x2{constructor(t,n,r){if(r&&!(this instanceof r))throw new Error(`${t} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new fC(n)},name:{enumerable:!0,value:t}})}}var k6=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Pp=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},zb,du;class hC extends x2{constructor(t,n){if(super("ECC",t,hC),zb.set(this,void 0),du.set(this,void 0),n){if(n.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");k6(this,zb,new Uint8Array(n),"f")}else k6(this,zb,new Uint8Array(16),"f");k6(this,du,this.iv,"f")}get iv(){return new Uint8Array(Pp(this,zb,"f"))}encrypt(t){if(t.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const n=new Uint8Array(t.length);for(let r=0;rNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let n=15;n>=0;--n)fs(this,bs,"f")[n]=t%256,t=Math.floor(t/256)}setCounterBytes(t){if(t.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");fs(this,bs,"f").set(t)}increment(){for(let t=15;t>=0;t--)if(fs(this,bs,"f")[t]===255)fs(this,bs,"f")[t]=0;else{fs(this,bs,"f")[t]++;break}}encrypt(t){var n,r;const i=new Uint8Array(t);for(let o=0;o16)throw new TypeError("PKCS#7 padding byte out of range");const n=e.length-t;for(let r=0;r0&&(r&r-1)===0,"invalid kdf.N","kdf.N",r),pe(i>0&&o>0,"invalid kdf","kdf",t);const s=ur(e,"crypto.kdfparams.dklen:int!");return pe(s===32,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:n,N:r,r:i,p:o,dkLen:64}}else if(t.toLowerCase()==="pbkdf2"){const n=ur(e,"crypto.kdfparams.salt:data!"),r=ur(e,"crypto.kdfparams.prf:string!"),i=r.split("-").pop();pe(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",r);const o=ur(e,"crypto.kdfparams.c:int!"),s=ur(e,"crypto.kdfparams.dklen:int!");return pe(s===32,"invalid kdf.dklen","kdf.dklen",s),{name:"pbkdf2",salt:n,count:o,dkLen:s,algorithm:i}}}pe(!1,"unsupported key-derivation function","kdf",t)}function RJe(e,t){const n=JSON.parse(e),r=j5(t),i=vde(n);if(i.name==="pbkdf2"){const{salt:d,count:f,dkLen:h,algorithm:p}=i,m=Tf(r,d,f,h,p);return K9(n,m)}De(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:o,N:s,r:a,p:c,dkLen:u}=i,l=y2(r,o,s,a,c,u);return K9(n,l)}function yG(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}async function NJe(e,t,n){const r=JSON.parse(e),i=j5(t),o=vde(r);if(o.name==="pbkdf2"){n&&(n(0),await yG(0));const{salt:f,count:h,dkLen:p,algorithm:m}=o,x=Tf(i,f,h,p,m);return n&&(n(1),await yG(0)),K9(r,x)}De(o.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:o});const{salt:s,N:a,r:c,p:u,dkLen:l}=o,d=await m2(i,s,a,c,u,l,n);return K9(r,d)}function xde(e){const t=e.salt!=null?tt(e.salt,"options.salt"):Xu(32);let n=1<<17,r=8,i=1;return e.scrypt&&(e.scrypt.N&&(n=e.scrypt.N),e.scrypt.r&&(r=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),pe(typeof n=="number"&&n>0&&Number.isSafeInteger(n)&&(BigInt(n)&BigInt(n-1))===BigInt(0),"invalid scrypt N parameter","options.N",n),pe(typeof r=="number"&&r>0&&Number.isSafeInteger(r),"invalid scrypt r parameter","options.r",r),pe(typeof i=="number"&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:n,r,p:i}}function wde(e,t,n,r){const i=tt(n.privateKey,"privateKey"),o=r.iv!=null?tt(r.iv,"options.iv"):Xu(16);pe(o.length===16,"invalid options.iv length","options.iv",r.iv);const s=r.uuid!=null?tt(r.uuid,"options.uuid"):Xu(16);pe(s.length===16,"invalid options.uuid length","options.uuid",r.iv);const a=e.slice(0,16),c=e.slice(16,32),u=new qh(a,o),l=tt(u.encrypt(i)),d=_n(wn([c,l])),f={address:n.address.substring(2).toLowerCase(),id:jKe(s),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Ve(o).substring(2)},ciphertext:Ve(l).substring(2),kdf:"scrypt",kdfparams:{salt:Ve(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:d.substring(2)}};if(n.mnemonic){const h=r.client!=null?r.client:`ethers/${Rce}`,p=n.mnemonic.path||bde,m=n.mnemonic.locale||"en",x=e.slice(32,64),y=tt(n.mnemonic.entropy,"account.mnemonic.entropy"),b=Xu(16),v=new qh(x,b),w=tt(v.encrypt(y)),E=new Date,I="UTC--"+(E.getUTCFullYear()+"-"+dy(E.getUTCMonth()+1,2)+"-"+dy(E.getUTCDate(),2)+"T"+dy(E.getUTCHours(),2)+"-"+dy(E.getUTCMinutes(),2)+"-"+dy(E.getUTCSeconds(),2)+".0Z")+"--"+f.address;f["x-ethers"]={client:h,gethFilename:I,path:p,locale:m,mnemonicCounter:Ve(b).substring(2),mnemonicCiphertext:Ve(w).substring(2),version:"0.1"}}return JSON.stringify(f)}function Ede(e,t,n){n==null&&(n={});const r=j5(t),i=xde(n),o=y2(r,i.salt,i.N,i.r,i.p,64);return wde(tt(o),i,e,n)}async function Cde(e,t,n){n==null&&(n={});const r=j5(t),i=xde(n),o=await m2(r,i.salt,i.N,i.r,i.p,64,n.progressCallback);return wde(tt(o),i,e,n)}const Mk="m/44'/60'/0'/0/0",OJe=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),cf=2147483648,LJe=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),BJe="0123456789abcdef";function Q9(e,t){let n="";for(;e;)n=BJe[e%16]+n,e=Math.trunc(e/16);for(;n.length=0;s-=8)i[33+(s>>3)]=e>>24-s&255;const o=tt(rp("sha512",t,i));return{IL:o.slice(0,32),IR:o.slice(32)}}function Sde(e,t){const n=t.split("/");pe(n.length>0&&(n[0]==="m"||e.depth>0),"invalid path","path",t),n[0]==="m"&&n.shift();let r=e;for(let i=0;i=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const o=tt(rp("sha512",OJe,i)),s=new Uc(Ve(o.slice(0,32)));return new ha(cc,s,"0x00000000",Ve(o.slice(32)),"m",0,0,r,null)},J(ha,lh);let j3=ha;class x4 extends xR{constructor(n,r,i,o,s,a,c,u,l){super(r,l);Z(this,"publicKey");Z(this,"fingerprint");Z(this,"parentFingerprint");Z(this,"chainCode");Z(this,"path");Z(this,"index");Z(this,"depth");np(n,cc,"HDNodeVoidWallet"),ot(this,{publicKey:i});const d=Bn(g2(ja(i)),0,4);ot(this,{publicKey:i,fingerprint:d,parentFingerprint:o,chainCode:s,path:a,index:c,depth:u})}connect(n){return new x4(cc,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,n)}get extendedKey(){return De(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),_R(wn(["0x0488B21E",Q9(this.depth,1),this.parentFingerprint,Q9(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(n){const r=It(n,"index");pe(r<=4294967295,"invalid index","index",r);let i=this.path;i&&(i+="/"+(r&~cf),r&cf&&(i+="'"));const{IR:o,IL:s}=Ade(r,this.chainCode,this.publicKey,null),a=Uc.addPoints(s,this.publicKey,!0),c=L5(a);return new x4(cc,c,a,this.fingerprint,Ve(o),i,r,this.depth+1,this.provider)}derivePath(n){return Sde(this,n)}}function bG(e){try{if(JSON.parse(e).encseed)return!0}catch{}return!1}function vG(e,t){const n=JSON.parse(e),r=j5(t),i=Ht(ur(n,"ethaddr:string!")),o=yde(ur(n,"encseed:string!"));pe(o&&o.length%16===0,"invalid encseed","json",e);const s=tt(Tf(r,r,2e3,32,"sha256")).slice(0,16),a=o.slice(0,16),c=o.slice(16),u=new hC(s,a),l=mde(tt(u.decrypt(c)));let d="";for(let f=0;f{setTimeout(()=>{t()},e)})}var W4,IR;const S0=class S0 extends W9{constructor(t,n){typeof t=="string"&&!t.startsWith("0x")&&(t="0x"+t);let r=typeof t=="string"?new Uc(t):t;super(r,n)}connect(t){return new S0(this.signingKey,t)}async encrypt(t,n){const r={address:this.address,privateKey:this.privateKey};return await Cde(r,t,{progressCallback:n})}encryptSync(t){const n={address:this.address,privateKey:this.privateKey};return Ede(n,t)}static async fromEncryptedJson(t,n,r){var o;let i=null;return mG(t)?i=await NJe(t,n,r):bG(t)&&(r&&(r(0),await xG(0)),i=vG(t,n),r&&(r(1),await xG(0))),de(o=S0,W4,IR).call(o,i)}static fromEncryptedJsonSync(t,n){var i;let r=null;return mG(t)?r=RJe(t,n):bG(t)?r=vG(t,n):pe(!1,"invalid JSON wallet","json","[ REDACTED ]"),de(i=S0,W4,IR).call(i,r)}static createRandom(t){const n=j3.createRandom();return t?n.connect(t):n}static fromPhrase(t,n){const r=j3.fromPhrase(t);return n?r.connect(n):r}};W4=new WeakSet,IR=function(t){if(pe(t,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in t&&t.mnemonic&&t.mnemonic.locale==="en"){const r=zm.fromEntropy(t.mnemonic.entropy),i=j3.fromMnemonic(r,t.mnemonic.path);if(i.address===t.address&&i.privateKey===t.privateKey)return i;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const n=new S0(t.privateKey);return pe(n.address===t.address,"address/privateKey mismatch","json","[ REDACTED ]"),n},J(S0,W4);let Y9=S0;function kde(){const e=FL(),[t,n]=hKe(BGe,""),[r,i]=j.useState();function o(s){try{Y9.fromPhrase(s),n(s)}catch{e({title:"Invalid Seed Phrase.",description:"The seed phrase you typed is not a valid BIP39 english mnemonic",status:"error",duration:9e3,isClosable:!0})}}return j.useEffect(()=>{if(t==="")o(dKe(VGe));else{const s=Y9.fromPhrase(t).connect(new iJe(tie));i(s)}},[t]),{burnerWallet:r,mnemonic:t,setMnemonic:o,resetMnemonic:()=>n("")}}var pC={},Tde={L:1,M:0,Q:3,H:2},_de={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},MJe=_de;function Pde(e){this.mode=MJe.MODE_8BIT_BYTE,this.data=e}Pde.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t>>7-e%8&1)==1},put:function(e,t){for(var n=0;n>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var FJe=Ide,Na={glog:function(e){if(e<1)throw new Error("glog("+e+")");return Na.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return Na.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Qr=0;Qr<8;Qr++)Na.EXP_TABLE[Qr]=1<=0;)t^=zr.G15<=0;)t^=zr.G18<>>=1;return t},getPatternPosition:function(e){return zr.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case Wl.PATTERN000:return(t+n)%2==0;case Wl.PATTERN001:return t%2==0;case Wl.PATTERN010:return n%3==0;case Wl.PATTERN011:return(t+n)%3==0;case Wl.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case Wl.PATTERN101:return t*n%2+t*n%3==0;case Wl.PATTERN110:return(t*n%2+t*n%3)%2==0;case Wl.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new wG([1],0),n=0;n5&&(n+=3+o-5)}for(var r=0;r=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=Nc.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)};ns.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(0<=n&&n<=6&&(r==0||r==6)||0<=r&&r<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[e+n][t+r]=!0:this.modules[e+n][t+r]=!1)};ns.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=Pf.getLostPoint(this);(n==0||e>r)&&(e=r,t=n)}return t};ns.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n),i=1;this.make();for(var o=0;o>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(var n=0;n<18;n++){var r=!e&&(t>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}};ns.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=Pf.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&(r>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(var i=0;i<15;i++){var o=!e&&(r>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e};ns.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(s==6&&s--;;){for(var a=0;a<2;a++)if(this.modules[r][s-a]==null){var c=!1;o>>i&1)==1);var u=Pf.getMask(t,r,s-a);u&&(c=!c),this.modules[r][s-a]=c,i--,i==-1&&(o++,i=7)}if(r+=n,r<0||this.moduleCount<=r){r-=n,n=-n;break}}};Nc.PAD0=236;Nc.PAD1=17;Nc.createData=function(e,t,n){for(var r=Ode.getRSBlocks(e,t),i=new Lde,o=0;oa*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+a*8+")");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(Nc.PAD0,8),i.getLengthInBits()>=a*8));)i.put(Nc.PAD1,8);return Nc.createBytes(i,r)};Nc.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),a=0;a=0?h.get(p):0}}for(var m=0,l=0;l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var QJe={bgColor:ps.default.oneOfType([ps.default.object,ps.default.string]).isRequired,bgD:ps.default.string.isRequired,fgColor:ps.default.oneOfType([ps.default.object,ps.default.string]).isRequired,fgD:ps.default.string.isRequired,size:ps.default.number.isRequired,title:ps.default.string,viewBoxSize:ps.default.number.isRequired,xmlns:ps.default.string},_M=(0,Bde.forwardRef)(function(e,t){var n=e.bgColor,r=e.bgD,i=e.fgD,o=e.fgColor,s=e.size,a=e.title,c=e.viewBoxSize,u=e.xmlns,l=u===void 0?"http://www.w3.org/2000/svg":u,d=KJe(e,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return _6.default.createElement("svg",WJe({},d,{height:s,ref:t,viewBox:"0 0 "+c+" "+c,width:s,xmlns:l}),a?_6.default.createElement("title",null,a):null,_6.default.createElement("path",{d:r,fill:n}),_6.default.createElement("path",{d:i,fill:o}))});_M.displayName="QRCodeSvg";_M.propTypes=QJe;TM.default=_M;Object.defineProperty(pC,"__esModule",{value:!0});pC.QRCode=void 0;var YJe=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var oXe={bgColor:ru.default.oneOfType([ru.default.object,ru.default.string]),fgColor:ru.default.oneOfType([ru.default.object,ru.default.string]),level:ru.default.string,size:ru.default.number,value:ru.default.string.isRequired},gC=(0,Dde.forwardRef)(function(e,t){var n=e.bgColor,r=n===void 0?"#FFFFFF":n,i=e.fgColor,o=i===void 0?"#000000":i,s=e.level,a=s===void 0?"L":s,c=e.size,u=c===void 0?256:c,l=e.value,d=iXe(e,["bgColor","fgColor","level","size","value"]),f=new eXe.default(-1,JJe.default[a]);f.addData(l),f.make();var h=f.modules;return tXe.default.createElement(rXe.default,YJe({},d,{bgColor:r,bgD:h.map(function(p,m){return p.map(function(x,y){return x?"":"M "+y+" "+m+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:o,fgD:h.map(function(p,m){return p.map(function(x,y){return x?"M "+y+" "+m+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:t,size:u,viewBoxSize:h.length}))});pC.QRCode=gC;gC.displayName="QRCode";gC.propTypes=oXe;var sXe=pC.default=gC;function aXe(){const{burnerWallet:e,mnemonic:t,setMnemonic:n,resetMnemonic:r}=kde(),i=FL();let[o,s]=j.useState(t||""),[a,c]=j.useState(QV()),u=h=>{let p=h.target.value;s(p)},l=h=>{let p=h.target.value;c(p)};function d(){localStorage.clear(),r()}function f(){a!==""?(MGe(a),i({title:"Success!",description:"You restored your game!",status:"success",duration:9e3,isClosable:!0})):i({title:"No dump",description:"There is not dump in the text area",status:"info",duration:9e3,isClosable:!0})}return j.useEffect(()=>{t!==""&&s(t),c(QV())},[t]),g.jsxs(Af,{alignItems:"flex-start",children:[g.jsx(Gr,{marginBottom:"40px",children:"Settings"}),g.jsx(Gr,{variant:"h2",children:"Wallet Address"}),g.jsx(hi,{children:"You are connected with the burner wallet"}),g.jsx(hi,{children:e==null?void 0:e.address}),e!==void 0&&g.jsx(sXe,{value:e==null?void 0:e.address}),g.jsx(Gr,{variant:"h2",marginTop:"40px",children:"Network"}),g.jsx(hi,{children:"Optimism"}),g.jsx(Gr,{variant:"h2",marginTop:"40px",children:"Smart Contract"}),g.jsx(hi,{children:u2[Mh]}),g.jsx(Gr,{variant:"h2",marginTop:"40px",children:"Change Seedphrase"}),g.jsx(hi,{fontWeight:"bold",children:"Mnemonic"}),g.jsx(C8,{value:o,isInvalid:o==="",onChange:u,placeholder:"Your seedphrase"}),g.jsx(Ls,{onClick:()=>n(o),children:"Change"}),g.jsx(Gr,{variant:"h2",marginTop:"40px",children:"Reset Game"}),g.jsx(hi,{children:"Reset the current session, you'll start from Chapter 0 again. You should make a backup first."}),g.jsx(C8,{value:a,onChange:l,placeholder:"Your dump"}),g.jsx(Ls,{onClick:()=>d(),children:"Reset Game"}),g.jsx(Gr,{variant:"h2",marginTop:"40px",children:"Restore"}),g.jsx(hi,{children:"Restore the game providing a dump"}),g.jsx(C8,{value:a,onChange:l,placeholder:"Your dump"}),g.jsx(Ls,{onClick:()=>f(),children:"Restore from dump"})]})}function cXe(){return g.jsxs(Af,{gap:"20px",className:"content-pane",align:"flex-start",children:[g.jsx(Gr,{children:"FAQ"}),g.jsxs(R0,{layerStyle:"base",children:[g.jsx(Gr,{variant:"h3",children:"I'm stuck, can I get a hint?"}),g.jsxs(hE,{children:[g.jsx(Kw,{children:"We made this game for people to haffun, if you need a bit of help to get going with your THC (Treasure Hunt Challenge) join our Matrix channel, or visit us at, we are in the third floor (check the map!)."}),g.jsx(Kw,{children:"Or write us on twitter, we will do our best to be responsive."})]})]}),g.jsxs(R0,{layerStyle:"base",children:[g.jsx(Gr,{variant:"h3",children:'What are the "side quests"'}),g.jsx(hi,{children:"The side quests are optional puzzles. All documents start with the hashtag symbol #. They may require specific technical skills. Don't expect them to be easy. Actually, we really hope all of them will be solved at one point, we put so much sweat 😓 on them (figuratively). You don't need to do them, but you earn extra points if you complete them."})]}),g.jsxs(R0,{layerStyle:"base",children:[g.jsx(Gr,{variant:"h3",children:"I want to speak to the manager"}),g.jsxs(hi,{children:[eie," is a Treasure Hunt Challenge (THC for short) created by",g.jsx(Bo,{href:"https://dist0rtion.com",isExternal:!0,children:"Social Dist0rtion Protocol"}),". We do this for the clout so don't forget to follow on tweeeeetererer:"," ",g.jsx(Bo,{href:"https://dist0rtion.com/dist0rtionproto",isExternal:!0,children:"@dist0rtionporoto"})]})]}),g.jsxs(R0,{layerStyle:"base",children:[g.jsx(Gr,{variant:"h3",children:"Show me the code"}),g.jsxs(hi,{children:["The Holy Code of Treasure Hunt Creator (or THC for short) is published on"," ",g.jsx(Bo,{href:"https://github.com/social-dist0rtion-protocol/thc",isExternal:!0,children:"GitHub"}),"."]})]})]})}var PM={},jde={},mC={},ei={},yC={},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS=Yt.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS=Yt.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS=Yt.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS=Yt.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS=Yt.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS=Yt.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS=Yt.GELATO_RELAY_ERC2771_ADDRESS=Yt.USER_NONCE_ABI=Yt.DEFAULT_DEADLINE_GAP=Yt.DEFAULT_INTERNAL_ERROR_MESSAGE=Yt.SIGN_TYPED_DATA_V4=Yt.GELATO_RELAY_URL=void 0;Yt.GELATO_RELAY_URL="https://api.gelato.digital";Yt.SIGN_TYPED_DATA_V4="eth_signTypedData_v4";Yt.DEFAULT_INTERNAL_ERROR_MESSAGE="Internal Error";Yt.DEFAULT_DEADLINE_GAP=86400;Yt.USER_NONCE_ABI=["function userNonce(address account) external view returns (uint256)"];Yt.GELATO_RELAY_ERC2771_ADDRESS="0xb539068872230f20456CF38EC52EF2f91AF4AE49";Yt.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS="0xd8253782c45a12053594b9deB72d8e8aB2Fca54c";Yt.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS="0x22DCC39b2AC376862183dd35A1664798dafC7Da6";Yt.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS="0x97015cD4C3d456997DD1C40e2a18c79108FCc412";Yt.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS="0x8598806401A63Ddf52473F1B3C55bC9E33e2d73b";Yt.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS="0xc65d82ECE367EF06bf2AB791B3f3CF037Dc0e816";Yt.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS="0xBa4082F4961c8Fb76231995C967CD9aa40f321b5";Yt.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS="0xB8828e4c662D1a7e4f3d1f622EfAE6B63D852ED8";var w2={};Object.defineProperty(w2,"__esModule",{value:!0});w2.isSigner=void 0;const uXe=e=>"signTransaction"in e;w2.isSigner=uXe;var lXe=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(yC,"__esModule",{value:!0});yC.signTypedDataV4=void 0;const EG=Yt,dXe=w2,fXe=(e,t,n)=>lXe(void 0,void 0,void 0,function*(){return(0,dXe.isSigner)(e)?yield e.signTypedData(n.domain,n.types,n.message):e.provider.isMagic?yield e.send(EG.SIGN_TYPED_DATA_V4,[t,n]):(yield e.send(EG.SIGN_TYPED_DATA_V4,[t,JSON.stringify(n)])).replace(/00$/,"1b").replace(/01$/,"1c")});yC.signTypedDataV4=fXe;var U5={};Object.defineProperty(U5,"__esModule",{value:!0});U5.calculateDeadline=void 0;const hXe=e=>Math.floor(Date.now()/1e3)+e;U5.calculateDeadline=hXe;var z5={},E2={},RR=function(e,t){return RR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},RR(e,t)};function pXe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");RR(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var NR=function(){return NR=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function yXe(e,t){return function(n,r){t(n,r,e)}}function bXe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function vXe(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function xXe(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fde(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function EXe(){for(var e=[],t=0;t1||a(f,h)})})}function a(f,h){try{c(r[f](h))}catch(p){d(o[0][3],p)}}function c(f){f.value instanceof w4?Promise.resolve(f.value.v).then(u,l):d(o[0][2],f)}function u(f){a("next",f)}function l(f){a("throw",f)}function d(f,h){f(h),o.shift(),o.length&&a(o[0][0],o[0][1])}}function kXe(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,o){t[i]=e[i]?function(s){return(n=!n)?{value:w4(e[i](s)),done:i==="return"}:o?o(s):s}:o}}function TXe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof OR=="function"?OR(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function _Xe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var PXe=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function IXe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&IM(t,e,n);return PXe(t,e),t}function RXe(e){return e&&e.__esModule?e:{default:e}}function NXe(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function OXe(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function LXe(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}const BXe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return NR},__asyncDelegator:kXe,__asyncGenerator:SXe,__asyncValues:TXe,__await:w4,__awaiter:vXe,__classPrivateFieldGet:NXe,__classPrivateFieldIn:LXe,__classPrivateFieldSet:OXe,__createBinding:IM,__decorate:mXe,__exportStar:wXe,__extends:pXe,__generator:xXe,__importDefault:RXe,__importStar:IXe,__makeTemplateObject:_Xe,__metadata:bXe,__param:yXe,__read:Fde,__rest:gXe,__spread:EXe,__spreadArray:AXe,__spreadArrays:CXe,__values:OR},Symbol.toStringTag,{value:"Module"})),Ude=Qs(BXe);var Dk={},fy={},CG;function RM(){return CG||(CG=1,Object.defineProperty(fy,"__esModule",{value:!0}),fy.version=void 0,fy.version="6.7.0"),fy}var jk={},hy={},Fk={},zf={},In={},xr={},$f={},AG;function op(){if(AG)return $f;AG=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.defineProperties=$f.resolveProperties=void 0;function e(r,i,o){const s=i.split("|").map(c=>c.trim());for(let c=0;cPromise.resolve(r[s])))).reduce((s,a,c)=>(s[i[c]]=a,s),{})}$f.resolveProperties=t;function n(r,i,o){for(let s in i){let a=i[s];const c=o?o[s]:null;c&&e(a,c,s),Object.defineProperty(r,s,{enumerable:!0,value:a,writable:!1})}}return $f.defineProperties=n,$f}var SG;function Gc(){if(SG)return xr;SG=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.assertPrivate=xr.assertNormalize=xr.assertArgumentCount=xr.assertArgument=xr.assert=xr.makeError=xr.isCallException=xr.isError=void 0;const e=RM(),t=op();function n(f){if(f==null)return"null";if(Array.isArray(f))return"[ "+f.map(n).join(", ")+" ]";if(f instanceof Uint8Array){const h="0123456789abcdef";let p="0x";for(let m=0;m>4],p+=h[f[m]&15];return p}if(typeof f=="object"&&typeof f.toJSON=="function")return n(f.toJSON());switch(typeof f){case"boolean":case"symbol":return f.toString();case"bigint":return BigInt(f).toString();case"number":return f.toString();case"string":return JSON.stringify(f);case"object":{const h=Object.keys(f);return h.sort(),"{ "+h.map(p=>`${n(p)}: ${n(f[p])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function r(f,h){return f&&f.code===h}xr.isError=r;function i(f){return r(f,"CALL_EXCEPTION")}xr.isCallException=i;function o(f,h,p){{const x=[];if(p){if("message"in p||"code"in p||"name"in p)throw new Error(`value will overwrite populated values: ${n(p)}`);for(const y in p){const b=p[y];x.push(y+"="+n(b))}}x.push(`code=${h}`),x.push(`version=${e.version}`),x.length&&(f+=" ("+x.join(", ")+")")}let m;switch(h){case"INVALID_ARGUMENT":m=new TypeError(f);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":m=new RangeError(f);break;default:m=new Error(f)}return(0,t.defineProperties)(m,{code:h}),p&&Object.assign(m,p),m}xr.makeError=o;function s(f,h,p,m){if(!f)throw o(h,p,m)}xr.assert=s;function a(f,h,p,m){s(f,h,"INVALID_ARGUMENT",{argument:p,value:m})}xr.assertArgument=a;function c(f,h,p){p==null&&(p=""),p&&(p=": "+p),s(f>=h,"missing arguemnt"+p,"MISSING_ARGUMENT",{count:f,expectedCount:h}),s(f<=h,"too many arguemnts"+p,"UNEXPECTED_ARGUMENT",{count:f,expectedCount:h})}xr.assertArgumentCount=c;const u=["NFD","NFC","NFKD","NFKC"].reduce((f,h)=>{try{if("test".normalize(h)!=="test")throw new Error("bad");if(h==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");f.push(h)}catch{}return f},[]);function l(f){s(u.indexOf(f)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:f}})}xr.assertNormalize=l;function d(f,h,p){if(p==null&&(p=""),f!==h){let m=p,x="new";p&&(m+=".",x+=" "+p),s(!1,`private constructor; use ${m}from* methods`,"UNSUPPORTED_OPERATION",{operation:x})}}return xr.assertPrivate=d,xr}var kG;function za(){if(kG)return In;kG=1,Object.defineProperty(In,"__esModule",{value:!0}),In.zeroPadBytes=In.zeroPadValue=In.stripZerosLeft=In.dataSlice=In.dataLength=In.concat=In.hexlify=In.isBytesLike=In.isHexString=In.getBytesCopy=In.getBytes=void 0;const e=Gc();function t(m,x,y){if(m instanceof Uint8Array)return y?new Uint8Array(m):m;if(typeof m=="string"&&m.match(/^0x([0-9a-f][0-9a-f])*$/i)){const b=new Uint8Array((m.length-2)/2);let v=2;for(let w=0;w>4]+s[v&15]}return y}In.hexlify=a;function c(m){return"0x"+m.map(x=>a(x).substring(2)).join("")}In.concat=c;function u(m){return i(m,!0)?(m.length-2)/2:n(m).length}In.dataLength=u;function l(m,x,y){const b=n(m);return y!=null&&y>b.length&&(0,e.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:b,length:b.length,offset:y}),a(b.slice(x??0,y??b.length))}In.dataSlice=l;function d(m){let x=a(m).substring(2);for(;x.startsWith("00");)x=x.substring(2);return"0x"+x}In.stripZerosLeft=d;function f(m,x,y){const b=n(m);(0,e.assert)(x>=b.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(b),length:x,offset:x+1});const v=new Uint8Array(x);return v.fill(0),y?v.set(b,x-b.length):v.set(b,0),a(v)}function h(m,x){return f(m,x,!0)}In.zeroPadValue=h;function p(m,x){return f(m,x,!1)}return In.zeroPadBytes=p,In}var Rn={},TG;function $5(){if(TG)return Rn;TG=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.toQuantity=Rn.toBeArray=Rn.toBeHex=Rn.toNumber=Rn.getNumber=Rn.toBigInt=Rn.getUint=Rn.getBigInt=Rn.mask=Rn.toTwos=Rn.fromTwos=void 0;const e=za(),t=Gc(),n=BigInt(0),r=BigInt(1),i=9007199254740991;function o(y,b){const v=u(y,"value"),w=BigInt(f(b,"width"));if((0,t.assert)(v>>w===n,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:y}),v>>w-r){const E=(r<=-i&&y<=i,"overflow",b||"value",y),BigInt(y);case"string":try{if(y==="")throw new Error("empty string");return y[0]==="-"&&y[1]!=="-"?-BigInt(y.substring(1)):BigInt(y)}catch(v){(0,t.assertArgument)(!1,`invalid BigNumberish string: ${v.message}`,b||"value",y)}}(0,t.assertArgument)(!1,"invalid BigNumberish value",b||"value",y)}Rn.getBigInt=c;function u(y,b){const v=c(y,b);return(0,t.assert)(v>=n,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:y}),v}Rn.getUint=u;const l="0123456789abcdef";function d(y){if(y instanceof Uint8Array){let b="0x0";for(const v of y)b+=l[v>>4],b+=l[v&15];return BigInt(b)}return c(y)}Rn.toBigInt=d;function f(y,b){switch(typeof y){case"bigint":return(0,t.assertArgument)(y>=-i&&y<=i,"overflow",b||"value",y),Number(y);case"number":return(0,t.assertArgument)(Number.isInteger(y),"underflow",b||"value",y),(0,t.assertArgument)(y>=-i&&y<=i,"overflow",b||"value",y),y;case"string":try{if(y==="")throw new Error("empty string");return f(BigInt(y),b)}catch(v){(0,t.assertArgument)(!1,`invalid numeric string: ${v.message}`,b||"value",y)}}(0,t.assertArgument)(!1,"invalid numeric value",b||"value",y)}Rn.getNumber=f;function h(y){return f(d(y))}Rn.toNumber=h;function p(y,b){let w=u(y,"value").toString(16);if(b==null)w.length%2&&(w="0"+w);else{const E=f(b,"width");for((0,t.assert)(E*2>=w.length,`value exceeds width (${E} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:y});w.length>6===2;y++)x++;return x}return d==="OVERRUN"?h.length-f-1:0}function o(d,f,h,p,m){return d==="OVERLONG"?((0,n.assertArgument)(typeof m=="number","invalid bad code point for replacement","badCodepoint",m),p.push(m),0):(p.push(65533),i(d,f,h))}e.Utf8ErrorFuncs=Object.freeze({error:r,ignore:i,replace:o});function s(d,f){f==null&&(f=e.Utf8ErrorFuncs.error);const h=(0,t.getBytes)(d,"bytes"),p=[];let m=0;for(;m>7)){p.push(x);continue}let y=null,b=null;if((x&224)===192)y=1,b=127;else if((x&240)===224)y=2,b=2047;else if((x&248)===240)y=3,b=65535;else{(x&192)===128?m+=f("UNEXPECTED_CONTINUE",m-1,h,p):m+=f("BAD_PREFIX",m-1,h,p);continue}if(m-1+y>=h.length){m+=f("OVERRUN",m-1,h,p);continue}let v=x&(1<<8-y-1)-1;for(let w=0;w1114111){m+=f("OUT_OF_RANGE",m-1-y,h,p,v);continue}if(v>=55296&&v<=57343){m+=f("UTF16_SURROGATE",m-1-y,h,p,v);continue}if(v<=b){m+=f("OVERLONG",m-1-y,h,p,v);continue}p.push(v)}}return p}function a(d,f){f!=null&&((0,n.assertNormalize)(f),d=d.normalize(f));let h=[];for(let p=0;p>6|192),h.push(m&63|128);else if((m&64512)==55296){p++;const x=d.charCodeAt(p);(0,n.assertArgument)(p>18|240),h.push(y>>12&63|128),h.push(y>>6&63|128),h.push(y&63|128)}else h.push(m>>12|224),h.push(m>>6&63|128),h.push(m&63|128)}return new Uint8Array(h)}e.toUtf8Bytes=a;function c(d){return d.map(f=>f<=65535?String.fromCharCode(f):(f-=65536,String.fromCharCode((f>>10&1023)+55296,(f&1023)+56320))).join("")}function u(d,f){return c(s(d,f))}e.toUtf8String=u;function l(d,f){return s(a(d,f))}e.toUtf8CodePoints=l}(Uk)),Uk}var gy={},NG;function jXe(){if(NG)return gy;NG=1,Object.defineProperty(gy,"__esModule",{value:!0}),gy.getUrl=void 0;const e=Gc();async function t(n,r){const i=n.url.split(":")[0].toLowerCase();(0,e.assert)(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,e.assert)(i==="https"||!n.credentials||n.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o;if(r){const d=new AbortController;o=d.signal,r.addListener(()=>{d.abort()})}const s={method:n.method,headers:new Headers(Array.from(n)),body:n.body||void 0,signal:o},a=await fetch(n.url,s),c={};a.headers.forEach((d,f)=>{c[f.toLowerCase()]=d});const u=await a.arrayBuffer(),l=u==null?null:new Uint8Array(u);return{statusCode:a.status,statusMessage:a.statusText,headers:c,body:l}}return gy.getUrl=t,gy}var OG;function FXe(){var I,A,O,N,R,_,M,z,F,$,W,G,H,L,q,V,P,Gb,X,ke,me,Re,Be,Le;if(OG)return iu;OG=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.FetchResponse=iu.FetchRequest=iu.FetchCancelSignal=void 0;const e=zde(),t=za(),n=Gc(),r=op(),i=NM(),o=jXe(),s=12,a=250;let c=o.getUrl;const u=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),l=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let d=!1;async function f(Me,re){try{const Q=Me.match(u);if(!Q)throw new Error("invalid data");return new v(200,"OK",{"content-type":Q[1]||"text/plain"},Q[2]?(0,e.decodeBase64)(Q[3]):E(Q[3]))}catch{return new v(599,"BAD REQUEST (invalid data: URI)",{},null,new b(Me))}}function h(Me){async function re(Q,se){try{const oe=Q.match(l);if(!oe)throw new Error("invalid link");return new b(`${Me}${oe[2]}`)}catch{return new v(599,"BAD REQUEST (invalid IPFS URI)",{},null,new b(Q))}}return re}const p={data:f,ipfs:h("https://gateway.ipfs.io/ipfs/")},m=new WeakMap;class x{constructor(re){J(this,I);J(this,A);D(this,I,[]),D(this,A,!1),m.set(re,()=>{if(!C(this,A)){D(this,A,!0);for(const Q of C(this,I))setTimeout(()=>{Q()},0);D(this,I,[])}})}addListener(re){(0,n.assert)(!C(this,A),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),C(this,I).push(re)}get cancelled(){return C(this,A)}checkSignal(){(0,n.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}I=new WeakMap,A=new WeakMap,iu.FetchCancelSignal=x;function y(Me){if(Me==null)throw new Error("missing signal; should not happen");return Me.checkSignal(),Me}const ce=class ce{constructor(re){J(this,P);J(this,O);J(this,N);J(this,R);J(this,_);J(this,M);J(this,z);J(this,F);J(this,$);J(this,W);J(this,G);J(this,H);J(this,L);J(this,q);J(this,V);D(this,z,String(re)),D(this,O,!1),D(this,N,!0),D(this,R,{}),D(this,_,""),D(this,M,3e5),D(this,V,{slotInterval:a,maxAttempts:s})}get url(){return C(this,z)}set url(re){D(this,z,String(re))}get body(){return C(this,F)==null?null:new Uint8Array(C(this,F))}set body(re){if(re==null)D(this,F,void 0),D(this,$,void 0);else if(typeof re=="string")D(this,F,(0,i.toUtf8Bytes)(re)),D(this,$,"text/plain");else if(re instanceof Uint8Array)D(this,F,re),D(this,$,"application/octet-stream");else if(typeof re=="object")D(this,F,(0,i.toUtf8Bytes)(JSON.stringify(re))),D(this,$,"application/json");else throw new Error("invalid body")}hasBody(){return C(this,F)!=null}get method(){return C(this,_)?C(this,_):this.hasBody()?"POST":"GET"}set method(re){re==null&&(re=""),D(this,_,String(re).toUpperCase())}get headers(){const re=Object.assign({},C(this,R));return C(this,W)&&(re.authorization=`Basic ${(0,e.encodeBase64)((0,i.toUtf8Bytes)(C(this,W)))}`),this.allowGzip&&(re["accept-encoding"]="gzip"),re["content-type"]==null&&C(this,$)&&(re["content-type"]=C(this,$)),this.body&&(re["content-length"]=String(this.body.length)),re}getHeader(re){return this.headers[re.toLowerCase()]}setHeader(re,Q){C(this,R)[String(re).toLowerCase()]=String(Q)}clearHeaders(){D(this,R,{})}[Symbol.iterator](){const re=this.headers,Q=Object.keys(re);let se=0;return{next:()=>{if(se=0,"timeout must be non-zero","timeout",re),D(this,M,re)}get preflightFunc(){return C(this,G)||null}set preflightFunc(re){D(this,G,re)}get processFunc(){return C(this,H)||null}set processFunc(re){D(this,H,re)}get retryFunc(){return C(this,L)||null}set retryFunc(re){D(this,L,re)}toString(){return``}setThrottleParams(re){re.slotInterval!=null&&(C(this,V).slotInterval=re.slotInterval),re.maxAttempts!=null&&(C(this,V).maxAttempts=re.maxAttempts)}send(){return(0,n.assert)(C(this,q)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),D(this,q,new x(this)),de(this,P,Gb).call(this,0,w()+this.timeout,0,this,new v(0,"",{},null,this))}cancel(){(0,n.assert)(C(this,q)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const re=m.get(this);if(!re)throw new Error("missing signal; should not happen");re()}redirect(re){const Q=this.url.split(":")[0].toLowerCase(),se=re.split(":")[0].toLowerCase();(0,n.assert)(this.method==="GET"&&(Q!=="https"||se!=="http")&&re.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(re)})`});const oe=new ce(re);return oe.method="GET",oe.allowGzip=this.allowGzip,oe.timeout=this.timeout,D(oe,R,Object.assign({},C(this,R))),C(this,F)&&D(oe,F,new Uint8Array(C(this,F))),D(oe,$,C(this,$)),oe}clone(){const re=new ce(this.url);return D(re,_,C(this,_)),C(this,F)&&D(re,F,C(this,F)),D(re,$,C(this,$)),D(re,R,Object.assign({},C(this,R))),D(re,W,C(this,W)),this.allowGzip&&(re.allowGzip=!0),re.timeout=this.timeout,this.allowInsecureAuthentication&&(re.allowInsecureAuthentication=!0),D(re,G,C(this,G)),D(re,H,C(this,H)),D(re,L,C(this,L)),re}static lockConfig(){d=!0}static getGateway(re){return p[re.toLowerCase()]||null}static registerGateway(re,Q){if(re=re.toLowerCase(),re==="http"||re==="https")throw new Error(`cannot intercept ${re}; use registerGetUrl`);if(d)throw new Error("gateways locked");p[re]=Q}static registerGetUrl(re){if(d)throw new Error("gateways locked");c=re}static createDataGateway(){return f}static createIpfsGatewayFunc(re){return h(re)}};O=new WeakMap,N=new WeakMap,R=new WeakMap,_=new WeakMap,M=new WeakMap,z=new WeakMap,F=new WeakMap,$=new WeakMap,W=new WeakMap,G=new WeakMap,H=new WeakMap,L=new WeakMap,q=new WeakMap,V=new WeakMap,P=new WeakSet,Gb=async function(re,Q,se,oe,Ce){var ie,te,ve;if(re>=C(this,V).maxAttempts)return Ce.makeServerError("exceeded maximum retry limit");(0,n.assert)(w()<=Q,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:oe}),se>0&&await S(se);let Fe=this.clone();const qe=(Fe.url.split(":")[0]||"").toLowerCase();if(qe in p){const fe=await p[qe](Fe.url,y(C(oe,q)));if(fe instanceof v){let U=fe;if(this.processFunc){y(C(oe,q));try{U=await this.processFunc(Fe,U)}catch(T){(T.throttle==null||typeof T.stall!="number")&&U.makeServerError("error in post-processing function",T).assertOk()}}return U}Fe=fe}this.preflightFunc&&(Fe=await this.preflightFunc(Fe));const Ge=await c(Fe,y(C(oe,q)));let Ie=new v(Ge.statusCode,Ge.statusMessage,Ge.headers,Ge.body,oe);if(Ie.statusCode===301||Ie.statusCode===302){try{const fe=Ie.headers.location||"";return de(ie=Fe.redirect(fe),P,Gb).call(ie,re+1,Q,0,oe,Ie)}catch{}return Ie}else if(Ie.statusCode===429&&(this.retryFunc==null||await this.retryFunc(Fe,Ie,re))){const fe=Ie.headers["retry-after"];let U=C(this,V).slotInterval*Math.trunc(Math.random()*Math.pow(2,re));return typeof fe=="string"&&fe.match(/^[1-9][0-9]*$/)&&(U=parseInt(fe)),de(te=Fe.clone(),P,Gb).call(te,re+1,Q,U,oe,Ie)}if(this.processFunc){y(C(oe,q));try{Ie=await this.processFunc(Fe,Ie)}catch(fe){(fe.throttle==null||typeof fe.stall!="number")&&Ie.makeServerError("error in post-processing function",fe).assertOk();let U=C(this,V).slotInterval*Math.trunc(Math.random()*Math.pow(2,re));return fe.stall>=0&&(U=fe.stall),de(ve=Fe.clone(),P,Gb).call(ve,re+1,Q,U,oe,Ie)}}return Ie};let b=ce;iu.FetchRequest=b;const Ne=class Ne{constructor(re,Q,se,oe,Ce){J(this,X);J(this,ke);J(this,me);J(this,Re);J(this,Be);J(this,Le);D(this,X,re),D(this,ke,Q),D(this,me,Object.keys(se).reduce((Fe,qe)=>(Fe[qe.toLowerCase()]=String(se[qe]),Fe),{})),D(this,Re,oe==null?null:new Uint8Array(oe)),D(this,Be,Ce||null),D(this,Le,{message:""})}toString(){return``}get statusCode(){return C(this,X)}get statusMessage(){return C(this,ke)}get headers(){return Object.assign({},C(this,me))}get body(){return C(this,Re)==null?null:new Uint8Array(C(this,Re))}get bodyText(){try{return C(this,Re)==null?"":(0,i.toUtf8String)(C(this,Re))}catch{(0,n.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{(0,n.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const re=this.headers,Q=Object.keys(re);let se=0;return{next:()=>{if(se=0,"invalid stall timeout","stall",Q);const se=new Error(re||"throttling requests");throw(0,r.defineProperties)(se,{stall:Q,throttle:!0}),se}getHeader(re){return this.headers[re.toLowerCase()]}hasBody(){return C(this,Re)!=null}get request(){return C(this,Be)}ok(){return C(this,Le).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:re,error:Q}=C(this,Le);re===""&&(re=`server response ${this.statusCode} ${this.statusMessage}`),(0,n.assert)(!1,re,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:Q})}};X=new WeakMap,ke=new WeakMap,me=new WeakMap,Re=new WeakMap,Be=new WeakMap,Le=new WeakMap;let v=Ne;iu.FetchResponse=v;function w(){return new Date().getTime()}function E(Me){return(0,i.toUtf8Bytes)(Me.replace(/%([0-9a-f][0-9a-f])/gi,(re,Q)=>String.fromCharCode(parseInt(Q,16))))}function S(Me){return new Promise(re=>setTimeout(re,Me))}return iu}var my={},LG;function $de(){var m,x,y,b,h0,fu,LR,BR,MR,DR;if(LG)return my;LG=1,Object.defineProperty(my,"__esModule",{value:!0}),my.FixedNumber=void 0;const e=za(),t=Gc(),n=$5(),r=op(),i=BigInt(-1),o=BigInt(0),s=BigInt(1),a=BigInt(5),c={};let u="0000";for(;u.length<80;)u+=u;function l(N){let R=u;for(;R.length=-z&&No?N=(0,n.fromTwos)((0,n.mask)(N,M),M):N=-(0,n.fromTwos)((0,n.mask)(-N,M),M)}else{const z=s<=0&&NF[W]==null?H:((0,t.assertArgument)(typeof F[W]===G,"invalid fixed format ("+W+" not "+G+")","format."+W,F[W]),F[W]);R=$("signed","boolean",R),_=$("width","number",_),M=$("decimals","number",M)}(0,t.assertArgument)(_%8===0,"invalid FixedNumber width (not byte aligned)","format.width",_),(0,t.assertArgument)(M<=80,"invalid FixedNumber decimals (too large)","format.decimals",M);const z=(R?"":"u")+"fixed"+String(_)+"x"+String(M);return{signed:R,width:_,decimals:M,name:z}}function h(N,R){let _="";N0?M*=l(z):z<0&&(_*=l(-z)),_M?1:0}eq(R){return this.cmp(R)===0}lt(R){return this.cmp(R)<0}lte(R){return this.cmp(R)<=0}gt(R){return this.cmp(R)>0}gte(R){return this.cmp(R)>=0}floor(){let R=C(this,x);return C(this,x)o&&(R+=C(this,y)-s),R=C(this,x)/C(this,y)*C(this,y),de(this,b,fu).call(this,R,"ceiling")}round(R){if(R==null&&(R=0),R>=this.decimals)return this;const _=this.decimals-R,M=a*l(_-1);let z=this.value+M;const F=l(_);return z=z/F*F,d(z,C(this,m),"round"),new O(c,z,C(this,m))}isZero(){return C(this,x)===o}isNegative(){return C(this,x)0){const G=l(W);(0,t.assert)($%G===o,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:R}),$/=G}else W<0&&($*=l(-W));return d($,F,"fromValue"),new O(c,$,F)}static fromString(R,_){const M=R.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,t.assertArgument)(M&&M[2].length+M[3].length>0,"invalid FixedNumber string value","value",R);const z=f(_);let F=M[2]||"0",$=M[3]||"";for(;$.length{(0,t.assert)(d<=c.length,"data short segment too short","BUFFER_OVERRUN",{buffer:c,length:c.length,offset:d})};if(c[u]>=248){const d=c[u]-247;l(u+1+d);const f=i(c,u+1,d);return l(u+1+d+f),o(c,u,u+1+d,d+f)}else if(c[u]>=192){const d=c[u]-192;return l(u+1+d),o(c,u,u+1,d)}else if(c[u]>=184){const d=c[u]-183;l(u+1+d);const f=i(c,u+1,d);l(u+1+d+f);const h=(0,e.hexlify)(c.slice(u+1+d,u+1+d+f));return{consumed:1+d+f,result:h}}else if(c[u]>=128){const d=c[u]-128;l(u+1+d);const f=(0,e.hexlify)(c.slice(u+1,u+1+d));return{consumed:1+d,result:f}}return{consumed:1,result:r(c[u])}}function a(c){const u=(0,n.getBytes)(c,"data"),l=s(u,0);return(0,t.assertArgument)(l.consumed===u.length,"unexpected junk after rlp payload","data",c),l.result}return yy.decodeRlp=a,yy}var by={},MG;function zXe(){if(MG)return by;MG=1,Object.defineProperty(by,"__esModule",{value:!0}),by.encodeRlp=void 0;const e=za();function t(o){const s=[];for(;o;)s.unshift(o&255),o>>=8;return s}function n(o){if(Array.isArray(o)){let c=[];if(o.forEach(function(l){c=c.concat(n(l))}),c.length<=55)return c.unshift(192+c.length),c;const u=t(c.length);return u.unshift(247+u.length),u.concat(c)}const s=Array.prototype.slice.call((0,e.getBytes)(o,"object"));if(s.length===1&&s[0]<=127)return s;if(s.length<=55)return s.unshift(128+s.length),s;const a=t(s.length);return a.unshift(183+a.length),a.concat(s)}const r="0123456789abcdef";function i(o){let s="0x";for(const a of n(o))s+=r[a>>4],s+=r[a&15];return s}return by.encodeRlp=i,by}var oa={},DG;function $Xe(){if(DG)return oa;DG=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.parseEther=oa.formatEther=oa.parseUnits=oa.formatUnits=void 0;const e=Gc(),t=$de(),n=$5(),r=["wei","kwei","mwei","gwei","szabo","finney","ether"];function i(c,u){let l=18;if(typeof u=="string"){const d=r.indexOf(u);(0,e.assertArgument)(d>=0,"invalid unit","unit",u),l=3*d}else u!=null&&(l=(0,n.getNumber)(u,"unit"));return t.FixedNumber.fromValue(c,l,{decimals:l,width:512}).toString()}oa.formatUnits=i;function o(c,u){(0,e.assertArgument)(typeof c=="string","value must be a string","value",c);let l=18;if(typeof u=="string"){const d=r.indexOf(u);(0,e.assertArgument)(d>=0,"invalid unit","unit",u),l=3*d}else u!=null&&(l=(0,n.getNumber)(u,"unit"));return t.FixedNumber.fromString(c,{decimals:l,width:512}).value}oa.parseUnits=o;function s(c){return i(c,18)}oa.formatEther=s;function a(c){return o(c,18)}return oa.parseEther=a,oa}var vy={},jG;function HXe(){if(jG)return vy;jG=1,Object.defineProperty(vy,"__esModule",{value:!0}),vy.uuidV4=void 0;const e=za();function t(n){const r=(0,e.getBytes)(n,"randomBytes");r[6]=r[6]&15|64,r[8]=r[8]&63|128;const i=(0,e.hexlify)(r);return[i.substring(2,10),i.substring(10,14),i.substring(14,18),i.substring(18,22),i.substring(22,34)].join("-")}return vy.uuidV4=t,vy}var FG;function Je(){return FG||(FG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toUtf8String=e.toUtf8CodePoints=e.toUtf8Bytes=e.parseUnits=e.formatUnits=e.parseEther=e.formatEther=e.encodeRlp=e.decodeRlp=e.defineProperties=e.resolveProperties=e.toQuantity=e.toBeArray=e.toBeHex=e.toNumber=e.toBigInt=e.getUint=e.getNumber=e.getBigInt=e.mask=e.toTwos=e.fromTwos=e.FixedNumber=e.FetchCancelSignal=e.FetchResponse=e.FetchRequest=e.EventPayload=e.makeError=e.assertNormalize=e.assertPrivate=e.assertArgumentCount=e.assertArgument=e.assert=e.isError=e.isCallException=e.zeroPadBytes=e.zeroPadValue=e.stripZerosLeft=e.dataSlice=e.dataLength=e.concat=e.hexlify=e.isBytesLike=e.isHexString=e.getBytesCopy=e.getBytes=e.encodeBase64=e.decodeBase64=e.encodeBase58=e.decodeBase58=void 0,e.uuidV4=e.Utf8ErrorFuncs=void 0;var t=MXe();Object.defineProperty(e,"decodeBase58",{enumerable:!0,get:function(){return t.decodeBase58}}),Object.defineProperty(e,"encodeBase58",{enumerable:!0,get:function(){return t.encodeBase58}});var n=zde();Object.defineProperty(e,"decodeBase64",{enumerable:!0,get:function(){return n.decodeBase64}}),Object.defineProperty(e,"encodeBase64",{enumerable:!0,get:function(){return n.encodeBase64}});var r=za();Object.defineProperty(e,"getBytes",{enumerable:!0,get:function(){return r.getBytes}}),Object.defineProperty(e,"getBytesCopy",{enumerable:!0,get:function(){return r.getBytesCopy}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}}),Object.defineProperty(e,"isBytesLike",{enumerable:!0,get:function(){return r.isBytesLike}}),Object.defineProperty(e,"hexlify",{enumerable:!0,get:function(){return r.hexlify}}),Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return r.concat}}),Object.defineProperty(e,"dataLength",{enumerable:!0,get:function(){return r.dataLength}}),Object.defineProperty(e,"dataSlice",{enumerable:!0,get:function(){return r.dataSlice}}),Object.defineProperty(e,"stripZerosLeft",{enumerable:!0,get:function(){return r.stripZerosLeft}}),Object.defineProperty(e,"zeroPadValue",{enumerable:!0,get:function(){return r.zeroPadValue}}),Object.defineProperty(e,"zeroPadBytes",{enumerable:!0,get:function(){return r.zeroPadBytes}});var i=Gc();Object.defineProperty(e,"isCallException",{enumerable:!0,get:function(){return i.isCallException}}),Object.defineProperty(e,"isError",{enumerable:!0,get:function(){return i.isError}}),Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(e,"assertArgument",{enumerable:!0,get:function(){return i.assertArgument}}),Object.defineProperty(e,"assertArgumentCount",{enumerable:!0,get:function(){return i.assertArgumentCount}}),Object.defineProperty(e,"assertPrivate",{enumerable:!0,get:function(){return i.assertPrivate}}),Object.defineProperty(e,"assertNormalize",{enumerable:!0,get:function(){return i.assertNormalize}}),Object.defineProperty(e,"makeError",{enumerable:!0,get:function(){return i.makeError}});var o=DXe();Object.defineProperty(e,"EventPayload",{enumerable:!0,get:function(){return o.EventPayload}});var s=FXe();Object.defineProperty(e,"FetchRequest",{enumerable:!0,get:function(){return s.FetchRequest}}),Object.defineProperty(e,"FetchResponse",{enumerable:!0,get:function(){return s.FetchResponse}}),Object.defineProperty(e,"FetchCancelSignal",{enumerable:!0,get:function(){return s.FetchCancelSignal}});var a=$de();Object.defineProperty(e,"FixedNumber",{enumerable:!0,get:function(){return a.FixedNumber}});var c=$5();Object.defineProperty(e,"fromTwos",{enumerable:!0,get:function(){return c.fromTwos}}),Object.defineProperty(e,"toTwos",{enumerable:!0,get:function(){return c.toTwos}}),Object.defineProperty(e,"mask",{enumerable:!0,get:function(){return c.mask}}),Object.defineProperty(e,"getBigInt",{enumerable:!0,get:function(){return c.getBigInt}}),Object.defineProperty(e,"getNumber",{enumerable:!0,get:function(){return c.getNumber}}),Object.defineProperty(e,"getUint",{enumerable:!0,get:function(){return c.getUint}}),Object.defineProperty(e,"toBigInt",{enumerable:!0,get:function(){return c.toBigInt}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return c.toNumber}}),Object.defineProperty(e,"toBeHex",{enumerable:!0,get:function(){return c.toBeHex}}),Object.defineProperty(e,"toBeArray",{enumerable:!0,get:function(){return c.toBeArray}}),Object.defineProperty(e,"toQuantity",{enumerable:!0,get:function(){return c.toQuantity}});var u=op();Object.defineProperty(e,"resolveProperties",{enumerable:!0,get:function(){return u.resolveProperties}}),Object.defineProperty(e,"defineProperties",{enumerable:!0,get:function(){return u.defineProperties}});var l=UXe();Object.defineProperty(e,"decodeRlp",{enumerable:!0,get:function(){return l.decodeRlp}});var d=zXe();Object.defineProperty(e,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}});var f=$Xe();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return f.formatEther}}),Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return f.parseEther}}),Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return f.formatUnits}}),Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return f.parseUnits}});var h=NM();Object.defineProperty(e,"toUtf8Bytes",{enumerable:!0,get:function(){return h.toUtf8Bytes}}),Object.defineProperty(e,"toUtf8CodePoints",{enumerable:!0,get:function(){return h.toUtf8CodePoints}}),Object.defineProperty(e,"toUtf8String",{enumerable:!0,get:function(){return h.toUtf8String}}),Object.defineProperty(e,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return h.Utf8ErrorFuncs}});var p=HXe();Object.defineProperty(e,"uuidV4",{enumerable:!0,get:function(){return p.uuidV4}})}(Fk)),Fk}var zk={},UG;function Wa(){return UG||(UG=1,function(e){var f,p,m,x,W8,b,v,w,Hde;Object.defineProperty(e,"__esModule",{value:!0}),e.Reader=e.Writer=e.Coder=e.checkResultErrors=e.Result=e.WordSize=void 0;const t=Je();e.WordSize=32;const n=new Uint8Array(e.WordSize),r=["then"],i={};function o(I,A){const O=new Error(`deferred error during ABI decoding triggered accessing ${I}`);throw O.error=A,O}const h=class h extends Array{constructor(...O){const N=O[0];let R=O[1],_=(O[2]||[]).slice(),M=!0;N!==i&&(R=O,_=[],M=!1);super(R.length);J(this,f);R.forEach((F,$)=>{this[$]=F});const z=_.reduce((F,$)=>(typeof $=="string"&&F.set($,(F.get($)||0)+1),F),new Map);if(D(this,f,Object.freeze(R.map((F,$)=>{const W=_[$];return W!=null&&z.get(W)===1?W:null}))),!!M)return Object.freeze(this),new Proxy(this,{get:(F,$,W)=>{if(typeof $=="string"){if($.match(/^[0-9]+$/)){const H=(0,t.getNumber)($,"%index");if(H<0||H>=this.length)throw new RangeError("out of result range");const L=F[H];return L instanceof Error&&o(`index ${H}`,L),L}if(r.indexOf($)>=0)return Reflect.get(F,$,W);const G=F[$];if(G instanceof Function)return function(...H){return G.apply(this===W?F:this,H)};if(!($ in F))return F.getValue.apply(this===W?F:this,[$])}return Reflect.get(F,$,W)}})}toArray(){const O=[];return this.forEach((N,R)=>{N instanceof Error&&o(`index ${R}`,N),O.push(N)}),O}toObject(){return C(this,f).reduce((O,N,R)=>((0,t.assert)(N!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),N in O||(O[N]=this.getValue(N)),O),{})}slice(O,N){O==null&&(O=0),O<0&&(O+=this.length,O<0&&(O=0)),N==null&&(N=this.length),N<0&&(N+=this.length,N<0&&(N=0)),N>this.length&&(N=this.length);const R=[],_=[];for(let M=O;M{C(this,p)[A]=c(O)}}}p=new WeakMap,m=new WeakMap,x=new WeakSet,W8=function(A){return C(this,p).push(A),D(this,m,C(this,m)+A.length),A.length},e.Writer=l;const S=class S{constructor(A,O){J(this,w);Z(this,"allowLoose");J(this,b);J(this,v);(0,t.defineProperties)(this,{allowLoose:!!O}),D(this,b,(0,t.getBytesCopy)(A)),D(this,v,0)}get data(){return(0,t.hexlify)(C(this,b))}get dataLength(){return C(this,b).length}get consumed(){return C(this,v)}get bytes(){return new Uint8Array(C(this,b))}subReader(A){return new S(C(this,b).slice(C(this,v)+A),this.allowLoose)}readBytes(A,O){let N=de(this,w,Hde).call(this,0,A,!!O);return D(this,v,C(this,v)+N.length),N.slice(0,A)}readValue(){return(0,t.toBigInt)(this.readBytes(e.WordSize))}readIndex(){return(0,t.toNumber)(this.readBytes(e.WordSize))}};b=new WeakMap,v=new WeakMap,w=new WeakSet,Hde=function(A,O,N){let R=Math.ceil(O/e.WordSize)*e.WordSize;return C(this,v)+R>C(this,b).length&&(this.allowLoose&&N&&C(this,v)+O<=C(this,b).length?R=O:(0,t.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,t.getBytesCopy)(C(this,b)),length:C(this,b).length,offset:C(this,v)+R})),C(this,b).slice(C(this,v),C(this,v)+R)};let d=S;e.Reader=d}(zk)),zk}var xy={},$k={},Vf={},Hk={},wy={},sa={};const VXe=Qs(YKe),WXe=Qs(ZKe),GXe=Qs(rQe),KXe=Qs(RQe);var zG;function bC(){if(zG)return sa;zG=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.randomBytes=sa.pbkdf2Sync=sa.createHmac=sa.createHash=void 0;const e=VXe,t=WXe,n=GXe,r=KXe,i=Je();function o(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Qe<"u")return Qe;throw new Error("unable to locate global object")}const s=o(),a=s.crypto||s.msCrypto;function c(f){switch(f){case"sha256":return n.sha256.create();case"sha512":return r.sha512.create()}(0,i.assertArgument)(!1,"invalid hashing algorithm name","algorithm",f)}sa.createHash=c;function u(f,h){const p={sha256:n.sha256,sha512:r.sha512}[f];return(0,i.assertArgument)(p!=null,"invalid hmac algorithm","algorithm",f),e.hmac.create(p,h)}sa.createHmac=u;function l(f,h,p,m,x){const y={sha256:n.sha256,sha512:r.sha512}[x];return(0,i.assertArgument)(y!=null,"invalid pbkdf2 algorithm","algorithm",x),(0,t.pbkdf2)(y,f,h,{c:p,dkLen:m})}sa.pbkdf2Sync=l;function d(f){(0,i.assert)(a!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,i.assertArgument)(Number.isInteger(f)&&f>0&&f<=1024,"invalid length","length",f);const h=new Uint8Array(f);return a.getRandomValues(h),h}return sa.randomBytes=d,sa}var $G;function Vde(){if($G)return wy;$G=1,Object.defineProperty(wy,"__esModule",{value:!0}),wy.computeHmac=void 0;const e=bC(),t=Je();let n=!1;const r=function(s,a,c){return(0,e.createHmac)(s,a).update(c).digest()};let i=r;function o(s,a,c){const u=(0,t.getBytes)(a,"key"),l=(0,t.getBytes)(c,"data");return(0,t.hexlify)(i(s,u,l))}return wy.computeHmac=o,o._=r,o.lock=function(){n=!0},o.register=function(s){if(n)throw new Error("computeHmac is locked");i=s},Object.freeze(o),wy}var Ey={};const QXe=Qs(XQe);var HG;function YXe(){if(HG)return Ey;HG=1,Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.keccak256=void 0;const e=QXe,t=Je();let n=!1;const r=function(s){return(0,e.keccak_256)(s)};let i=r;function o(s){const a=(0,t.getBytes)(s,"data");return(0,t.hexlify)(i(a))}return Ey.keccak256=o,o._=r,o.lock=function(){n=!0},o.register=function(s){if(n)throw new TypeError("keccak256 is locked");i=s},Object.freeze(o),Ey}var Cy={};const qXe=Qs(sYe);var VG;function ZXe(){if(VG)return Cy;VG=1,Object.defineProperty(Cy,"__esModule",{value:!0}),Cy.ripemd160=void 0;const e=qXe,t=Je();let n=!1;const r=function(s){return(0,e.ripemd160)(s)};let i=r;function o(s){const a=(0,t.getBytes)(s,"data");return(0,t.hexlify)(i(a))}return Cy.ripemd160=o,o._=r,o.lock=function(){n=!0},o.register=function(s){if(n)throw new TypeError("ripemd160 is locked");i=s},Object.freeze(o),Cy}var Ay={},WG;function JXe(){if(WG)return Ay;WG=1,Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.pbkdf2=void 0;const e=bC(),t=Je();let n=!1;const r=function(s,a,c,u,l){return(0,e.pbkdf2Sync)(s,a,c,u,l)};let i=r;function o(s,a,c,u,l){const d=(0,t.getBytes)(s,"password"),f=(0,t.getBytes)(a,"salt");return(0,t.hexlify)(i(d,f,c,u,l))}return Ay.pbkdf2=o,o._=r,o.lock=function(){n=!0},o.register=function(s){if(n)throw new Error("pbkdf2 is locked");i=s},Object.freeze(o),Ay}var Sy={},GG;function XXe(){if(GG)return Sy;GG=1,Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.randomBytes=void 0;const e=bC();let t=!1;const n=function(o){return new Uint8Array((0,e.randomBytes)(o))};let r=n;function i(o){return r(o)}return Sy.randomBytes=i,i._=n,i.lock=function(){t=!0},i.register=function(o){if(t)throw new Error("randomBytes is locked");r=o},Object.freeze(i),Sy}var Wf={};const eet=Qs(aYe);var KG;function tet(){if(KG)return Wf;KG=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.scryptSync=Wf.scrypt=void 0;const e=eet,t=Je();let n=!1,r=!1;const i=async function(l,d,f,h,p,m,x){return await(0,e.scryptAsync)(l,d,{N:f,r:h,p,dkLen:m,onProgress:x})},o=function(l,d,f,h,p,m){return(0,e.scrypt)(l,d,{N:f,r:h,p,dkLen:m})};let s=i,a=o;async function c(l,d,f,h,p,m,x){const y=(0,t.getBytes)(l,"passwd"),b=(0,t.getBytes)(d,"salt");return(0,t.hexlify)(await s(y,b,f,h,p,m,x))}Wf.scrypt=c,c._=i,c.lock=function(){r=!0},c.register=function(l){if(r)throw new Error("scrypt is locked");s=l},Object.freeze(c);function u(l,d,f,h,p,m){const x=(0,t.getBytes)(l,"passwd"),y=(0,t.getBytes)(d,"salt");return(0,t.hexlify)(a(x,y,f,h,p,m))}return Wf.scryptSync=u,u._=o,u.lock=function(){n=!0},u.register=function(l){if(n)throw new Error("scryptSync is locked");a=l},Object.freeze(u),Wf}var Gf={},QG;function net(){if(QG)return Gf;QG=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.sha512=Gf.sha256=void 0;const e=bC(),t=Je(),n=function(l){return(0,e.createHash)("sha256").update(l).digest()},r=function(l){return(0,e.createHash)("sha512").update(l).digest()};let i=n,o=r,s=!1,a=!1;function c(l){const d=(0,t.getBytes)(l,"data");return(0,t.hexlify)(i(d))}Gf.sha256=c,c._=n,c.lock=function(){s=!0},c.register=function(l){if(s)throw new Error("sha256 is locked");i=l},Object.freeze(c);function u(l){const d=(0,t.getBytes)(l,"data");return(0,t.hexlify)(o(d))}return Gf.sha512=u,u._=r,u.lock=function(){a=!0},u.register=function(l){if(a)throw new Error("sha512 is locked");o=l},Object.freeze(c),Gf}var ky={};const ret=Qs(AYe);var Ty={},Vk={},_y={},YG;function iet(){return YG||(YG=1,Object.defineProperty(_y,"__esModule",{value:!0}),_y.ZeroAddress=void 0,_y.ZeroAddress="0x0000000000000000000000000000000000000000"),_y}var Py={},qG;function oet(){return qG||(qG=1,Object.defineProperty(Py,"__esModule",{value:!0}),Py.ZeroHash=void 0,Py.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),Py}var Eo={},ZG;function set(){return ZG||(ZG=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.MaxInt256=Eo.MinInt256=Eo.MaxUint256=Eo.WeiPerEther=Eo.N=void 0,Eo.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Eo.WeiPerEther=BigInt("1000000000000000000"),Eo.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Eo.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),Eo.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),Eo}var Kf={},JG;function aet(){return JG||(JG=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.MessagePrefix=Kf.EtherSymbol=void 0,Kf.EtherSymbol="Ξ",Kf.MessagePrefix=`Ethereum Signed Message: +`),Kf}var XG;function H5(){return XG||(XG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MessagePrefix=e.EtherSymbol=e.MaxInt256=e.MinInt256=e.MaxUint256=e.WeiPerEther=e.N=e.ZeroHash=e.ZeroAddress=void 0;var t=iet();Object.defineProperty(e,"ZeroAddress",{enumerable:!0,get:function(){return t.ZeroAddress}});var n=oet();Object.defineProperty(e,"ZeroHash",{enumerable:!0,get:function(){return n.ZeroHash}});var r=set();Object.defineProperty(e,"N",{enumerable:!0,get:function(){return r.N}}),Object.defineProperty(e,"WeiPerEther",{enumerable:!0,get:function(){return r.WeiPerEther}}),Object.defineProperty(e,"MaxUint256",{enumerable:!0,get:function(){return r.MaxUint256}}),Object.defineProperty(e,"MinInt256",{enumerable:!0,get:function(){return r.MinInt256}}),Object.defineProperty(e,"MaxInt256",{enumerable:!0,get:function(){return r.MaxInt256}});var i=aet();Object.defineProperty(e,"EtherSymbol",{enumerable:!0,get:function(){return i.EtherSymbol}}),Object.defineProperty(e,"MessagePrefix",{enumerable:!0,get:function(){return i.MessagePrefix}})}(Vk)),Vk}var eK;function Wde(){var d,f,h,p;if(eK)return Ty;eK=1,Object.defineProperty(Ty,"__esModule",{value:!0}),Ty.Signature=void 0;const e=H5(),t=Je(),n=BigInt(0),r=BigInt(1),i=BigInt(2),o=BigInt(27),s=BigInt(28),a=BigInt(35),c={};function u(x){return(0,t.zeroPadValue)((0,t.toBeArray)(x),32)}const m=class m{constructor(y,b,v,w){J(this,d);J(this,f);J(this,h);J(this,p);(0,t.assertPrivate)(y,c,"Signature"),D(this,d,b),D(this,f,v),D(this,h,w),D(this,p,null)}get r(){return C(this,d)}set r(y){(0,t.assertArgument)((0,t.dataLength)(y)===32,"invalid r","value",y),D(this,d,(0,t.hexlify)(y))}get s(){return C(this,f)}set s(y){(0,t.assertArgument)((0,t.dataLength)(y)===32,"invalid s","value",y);const b=(0,t.hexlify)(y);(0,t.assertArgument)(parseInt(b.substring(0,3))<8,"non-canonical s","value",b),D(this,f,b)}get v(){return C(this,h)}set v(y){const b=(0,t.getNumber)(y,"value");(0,t.assertArgument)(b===27||b===28,"invalid v","v",y),D(this,h,b)}get networkV(){return C(this,p)}get legacyChainId(){const y=this.networkV;return y==null?null:m.getChainId(y)}get yParity(){return this.v===27?0:1}get yParityAndS(){const y=(0,t.getBytes)(this.s);return this.yParity&&(y[0]|=128),(0,t.hexlify)(y)}get compactSerialized(){return(0,t.concat)([this.r,this.yParityAndS])}get serialized(){return(0,t.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const y=new m(c,this.r,this.s,this.v);return this.networkV&&D(y,p,this.networkV),y}toJSON(){const y=this.networkV;return{_type:"signature",networkV:y!=null?y.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(y){const b=(0,t.getBigInt)(y,"v");return b==o||b==s?n:((0,t.assertArgument)(b>=a,"invalid EIP-155 v","v",y),(b-a)/i)}static getChainIdV(y,b){return(0,t.getBigInt)(y)*i+BigInt(35+b-27)}static getNormalizedV(y){const b=(0,t.getBigInt)(y);return b===n||b===o?27:b===r||b===s?28:((0,t.assertArgument)(b>=a,"invalid v","v",y),b&r?27:28)}static from(y){function b(O,N){(0,t.assertArgument)(O,N,"signature",y)}if(y==null)return new m(c,e.ZeroHash,e.ZeroHash,27);if(typeof y=="string"){const O=(0,t.getBytes)(y,"signature");if(O.length===64){const N=(0,t.hexlify)(O.slice(0,32)),R=O.slice(32,64),_=R[0]&128?28:27;return R[0]&=127,new m(c,N,(0,t.hexlify)(R),_)}if(O.length===65){const N=(0,t.hexlify)(O.slice(0,32)),R=O.slice(32,64);b((R[0]&128)===0,"non-canonical s");const _=m.getNormalizedV(O[64]);return new m(c,N,(0,t.hexlify)(R),_)}b(!1,"invalid raw signature length")}if(y instanceof m)return y.clone();const v=y.r;b(v!=null,"missing r");const w=u(v),E=function(O,N){if(O!=null)return u(O);if(N!=null){b((0,t.isHexString)(N,32),"invalid yParityAndS");const R=(0,t.getBytes)(N);return R[0]&=127,(0,t.hexlify)(R)}b(!1,"missing s")}(y.s,y.yParityAndS);b(((0,t.getBytes)(E)[0]&128)==0,"non-canonical s");const{networkV:S,v:I}=function(O,N,R){if(O!=null){const _=(0,t.getBigInt)(O);return{networkV:_>=a?_:void 0,v:m.getNormalizedV(_)}}if(N!=null)return b((0,t.isHexString)(N,32),"invalid yParityAndS"),{v:(0,t.getBytes)(N)[0]&128?28:27};if(R!=null){switch((0,t.getNumber)(R,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}b(!1,"invalid yParity")}b(!1,"missing v")}(y.v,y.yParityAndS,y.yParity),A=new m(c,w,E,I);return S&&D(A,p,S),b(y.yParity==null||(0,t.getNumber)(y.yParity,"sig.yParity")===A.yParity,"yParity mismatch"),b(y.yParityAndS==null||y.yParityAndS===A.yParityAndS,"yParityAndS mismatch"),A}};d=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap;let l=m;return Ty.Signature=l,Ty}var tK;function cet(){var s;if(tK)return ky;tK=1,Object.defineProperty(ky,"__esModule",{value:!0}),ky.SigningKey=void 0;const t=Ude.__importStar(ret),n=Je(),r=Vde(),i=Wde();t.utils.hmacSha256Sync=function(c,...u){return(0,n.getBytes)((0,r.computeHmac)("sha256",c,(0,n.concat)(u)))};const a=class a{constructor(u){J(this,s);(0,n.assertArgument)((0,n.dataLength)(u)===32,"invalid private key","privateKey","[REDACTED]"),D(this,s,(0,n.hexlify)(u))}get privateKey(){return C(this,s)}get publicKey(){return a.computePublicKey(C(this,s))}get compressedPublicKey(){return a.computePublicKey(C(this,s),!0)}sign(u){(0,n.assertArgument)((0,n.dataLength)(u)===32,"invalid digest length","digest",u);const[l,d]=t.signSync((0,n.getBytesCopy)(u),(0,n.getBytesCopy)(C(this,s)),{recovered:!0,canonical:!0}),f=t.Signature.fromHex(l);return i.Signature.from({r:(0,n.toBeHex)("0x"+f.r.toString(16),32),s:(0,n.toBeHex)("0x"+f.s.toString(16),32),v:d?28:27})}computeSharedSecret(u){const l=a.computePublicKey(u);return(0,n.hexlify)(t.getSharedSecret((0,n.getBytesCopy)(C(this,s)),(0,n.getBytes)(l)))}static computePublicKey(u,l){let d=(0,n.getBytes)(u,"key");if(d.length===32){const h=t.getPublicKey(d,!!l);return(0,n.hexlify)(h)}if(d.length===64){const h=new Uint8Array(65);h[0]=4,h.set(d,1),d=h}const f=t.Point.fromHex(d);return(0,n.hexlify)(f.toRawBytes(l))}static recoverPublicKey(u,l){(0,n.assertArgument)((0,n.dataLength)(u)===32,"invalid digest length","digest",u);const d=i.Signature.from(l),f=t.Signature.fromCompact((0,n.getBytesCopy)((0,n.concat)([d.r,d.s]))).toDERRawBytes(),h=t.recoverPublicKey((0,n.getBytesCopy)(u),f,d.yParity);return(0,n.assertArgument)(h!=null,"invalid signautre for digest","signature",l),(0,n.hexlify)(h)}static addPoints(u,l,d){const f=t.Point.fromHex(a.computePublicKey(u).substring(2)),h=t.Point.fromHex(a.computePublicKey(l).substring(2));return"0x"+f.add(h).toHex(!!d)}};s=new WeakMap;let o=a;return ky.SigningKey=o,ky}var nK;function ti(){return nK||(nK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lock=e.Signature=e.SigningKey=e.scryptSync=e.scrypt=e.pbkdf2=e.sha512=e.sha256=e.ripemd160=e.keccak256=e.randomBytes=e.computeHmac=void 0;const t=Vde();Object.defineProperty(e,"computeHmac",{enumerable:!0,get:function(){return t.computeHmac}});const n=YXe();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return n.keccak256}});const r=ZXe();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return r.ripemd160}});const i=JXe();Object.defineProperty(e,"pbkdf2",{enumerable:!0,get:function(){return i.pbkdf2}});const o=XXe();Object.defineProperty(e,"randomBytes",{enumerable:!0,get:function(){return o.randomBytes}});const s=tet();Object.defineProperty(e,"scrypt",{enumerable:!0,get:function(){return s.scrypt}}),Object.defineProperty(e,"scryptSync",{enumerable:!0,get:function(){return s.scryptSync}});const a=net();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return a.sha256}}),Object.defineProperty(e,"sha512",{enumerable:!0,get:function(){return a.sha512}});var c=cet();Object.defineProperty(e,"SigningKey",{enumerable:!0,get:function(){return c.SigningKey}});var u=Wde();Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return u.Signature}});function l(){t.computeHmac.lock(),n.keccak256.lock(),i.pbkdf2.lock(),o.randomBytes.lock(),r.ripemd160.lock(),s.scrypt.lock(),s.scryptSync.lock(),a.sha256.lock(),a.sha512.lock(),o.randomBytes.lock()}e.lock=l}(Hk)),Hk}var rK;function OM(){if(rK)return Vf;rK=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.getIcapAddress=Vf.getAddress=void 0;const e=ti(),t=Je(),n=BigInt(0),r=BigInt(36);function i(f){f=f.toLowerCase();const h=f.substring(2).split(""),p=new Uint8Array(40);for(let x=0;x<40;x++)p[x]=h[x].charCodeAt(0);const m=(0,t.getBytes)((0,e.keccak256)(p));for(let x=0;x<40;x+=2)m[x>>1]>>4>=8&&(h[x]=h[x].toUpperCase()),(m[x>>1]&15)>=8&&(h[x+1]=h[x+1].toUpperCase());return"0x"+h.join("")}const o={};for(let f=0;f<10;f++)o[String(f)]=String(f);for(let f=0;f<26;f++)o[String.fromCharCode(65+f)]=String(10+f);const s=15;function a(f){f=f.toUpperCase(),f=f.substring(4)+f.substring(0,2)+"00";let h=f.split("").map(m=>o[m]).join("");for(;h.length>=s;){let m=h.substring(0,s);h=parseInt(m,10)%97+h.substring(m.length)}let p=String(98-parseInt(h,10)%97);for(;p.length<2;)p="0"+p;return p}const c=function(){const f={};for(let h=0;h<36;h++){const p="0123456789abcdefghijklmnopqrstuvwxyz"[h];f[p]=BigInt(h)}return f}();function u(f){f=f.toLowerCase();let h=n;for(let p=0;pu.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return C(this,s)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return C(this,s)===!0?-1:C(this,s)===!1?this.value.length:null}static from(u,l){return new a(t,u,l)}static uint8(u){return n(u,8)}static uint16(u){return n(u,16)}static uint24(u){return n(u,24)}static uint32(u){return n(u,32)}static uint40(u){return n(u,40)}static uint48(u){return n(u,48)}static uint56(u){return n(u,56)}static uint64(u){return n(u,64)}static uint72(u){return n(u,72)}static uint80(u){return n(u,80)}static uint88(u){return n(u,88)}static uint96(u){return n(u,96)}static uint104(u){return n(u,104)}static uint112(u){return n(u,112)}static uint120(u){return n(u,120)}static uint128(u){return n(u,128)}static uint136(u){return n(u,136)}static uint144(u){return n(u,144)}static uint152(u){return n(u,152)}static uint160(u){return n(u,160)}static uint168(u){return n(u,168)}static uint176(u){return n(u,176)}static uint184(u){return n(u,184)}static uint192(u){return n(u,192)}static uint200(u){return n(u,200)}static uint208(u){return n(u,208)}static uint216(u){return n(u,216)}static uint224(u){return n(u,224)}static uint232(u){return n(u,232)}static uint240(u){return n(u,240)}static uint248(u){return n(u,248)}static uint256(u){return n(u,256)}static uint(u){return n(u,256)}static int8(u){return n(u,-8)}static int16(u){return n(u,-16)}static int24(u){return n(u,-24)}static int32(u){return n(u,-32)}static int40(u){return n(u,-40)}static int48(u){return n(u,-48)}static int56(u){return n(u,-56)}static int64(u){return n(u,-64)}static int72(u){return n(u,-72)}static int80(u){return n(u,-80)}static int88(u){return n(u,-88)}static int96(u){return n(u,-96)}static int104(u){return n(u,-104)}static int112(u){return n(u,-112)}static int120(u){return n(u,-120)}static int128(u){return n(u,-128)}static int136(u){return n(u,-136)}static int144(u){return n(u,-144)}static int152(u){return n(u,-152)}static int160(u){return n(u,-160)}static int168(u){return n(u,-168)}static int176(u){return n(u,-176)}static int184(u){return n(u,-184)}static int192(u){return n(u,-192)}static int200(u){return n(u,-200)}static int208(u){return n(u,-208)}static int216(u){return n(u,-216)}static int224(u){return n(u,-224)}static int232(u){return n(u,-232)}static int240(u){return n(u,-240)}static int248(u){return n(u,-248)}static int256(u){return n(u,-256)}static int(u){return n(u,-256)}static bytes1(u){return r(u,1)}static bytes2(u){return r(u,2)}static bytes3(u){return r(u,3)}static bytes4(u){return r(u,4)}static bytes5(u){return r(u,5)}static bytes6(u){return r(u,6)}static bytes7(u){return r(u,7)}static bytes8(u){return r(u,8)}static bytes9(u){return r(u,9)}static bytes10(u){return r(u,10)}static bytes11(u){return r(u,11)}static bytes12(u){return r(u,12)}static bytes13(u){return r(u,13)}static bytes14(u){return r(u,14)}static bytes15(u){return r(u,15)}static bytes16(u){return r(u,16)}static bytes17(u){return r(u,17)}static bytes18(u){return r(u,18)}static bytes19(u){return r(u,19)}static bytes20(u){return r(u,20)}static bytes21(u){return r(u,21)}static bytes22(u){return r(u,22)}static bytes23(u){return r(u,23)}static bytes24(u){return r(u,24)}static bytes25(u){return r(u,25)}static bytes26(u){return r(u,26)}static bytes27(u){return r(u,27)}static bytes28(u){return r(u,28)}static bytes29(u){return r(u,29)}static bytes30(u){return r(u,30)}static bytes31(u){return r(u,31)}static bytes32(u){return r(u,32)}static address(u){return new a(t,"address",u)}static bool(u){return new a(t,"bool",!!u)}static bytes(u){return new a(t,"bytes",u)}static string(u){return new a(t,"string",u)}static array(u,l){throw new Error("not implemented yet")}static tuple(u,l){throw new Error("not implemented yet")}static overrides(u){return new a(t,"overrides",Object.assign({},u))}static isTyped(u){return u&&typeof u=="object"&&"_typedSymbol"in u&&u._typedSymbol===i}static dereference(u,l){if(a.isTyped(u)){if(u.type!==l)throw new Error(`invalid type: expecetd ${l}, got ${u.type}`);return u.value}return u}};s=new WeakMap;let o=a;return Iy.Typed=o,Iy}var cK;function fet(){if(cK)return xy;cK=1,Object.defineProperty(xy,"__esModule",{value:!0}),xy.AddressCoder=void 0;const e=jr(),t=$5(),n=kl(),r=Wa();class i extends r.Coder{constructor(s){super("address","address",s,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(s,a){let c=n.Typed.dereference(a,"string");try{c=(0,e.getAddress)(c)}catch(u){return this._throwError(u.message,a)}return s.writeValue(c)}decode(s){return(0,e.getAddress)((0,t.toBeHex)(s.readValue(),20))}}return xy.AddressCoder=i,xy}var su={},Ry={},uK;function het(){if(uK)return Ry;uK=1,Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.AnonymousCoder=void 0;const e=Wa();class t extends e.Coder{constructor(i){super(i.name,i.type,"_",i.dynamic);Z(this,"coder");this.coder=i}defaultValue(){return this.coder.defaultValue()}encode(i,o){return this.coder.encode(i,o)}decode(i){return this.coder.decode(i)}}return Ry.AnonymousCoder=t,Ry}var lK;function Gde(){if(lK)return su;lK=1,Object.defineProperty(su,"__esModule",{value:!0}),su.ArrayCoder=su.unpack=su.pack=void 0;const e=Je(),t=kl(),n=Wa(),r=het();function i(a,c,u){let l=[];if(Array.isArray(u))l=u;else if(u&&typeof u=="object"){let m={};l=c.map(x=>{const y=x.localName;return(0,e.assert)(y,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:x},value:u}),(0,e.assert)(!m[y],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:x},value:u}),m[y]=!0,u[y]})}else(0,e.assertArgument)(!1,"invalid tuple value","tuple",u);(0,e.assertArgument)(c.length===l.length,"types/value length mismatch","tuple",u);let d=new n.Writer,f=new n.Writer,h=[];c.forEach((m,x)=>{let y=l[x];if(m.dynamic){let b=f.length;m.encode(f,y);let v=d.writeUpdatableValue();h.push(w=>{v(w+b)})}else m.encode(d,y)}),h.forEach(m=>{m(d.length)});let p=a.appendWriter(d);return p+=a.appendWriter(f),p}su.pack=i;function o(a,c){let u=[],l=[],d=a.subReader(0);return c.forEach(f=>{let h=null;if(f.dynamic){let p=a.readIndex(),m=d.subReader(p);try{h=f.decode(m)}catch(x){if((0,e.isError)(x,"BUFFER_OVERRUN"))throw x;h=x,h.baseType=f.name,h.name=f.localName,h.type=f.type}}else try{h=f.decode(a)}catch(p){if((0,e.isError)(p,"BUFFER_OVERRUN"))throw p;h=p,h.baseType=f.name,h.name=f.localName,h.type=f.type}if(h==null)throw new Error("investigate");u.push(h),l.push(f.localName||null)}),n.Result.fromItems(u,l)}su.unpack=o;class s extends n.Coder{constructor(u,l,d){const f=u.type+"["+(l>=0?l:"")+"]",h=l===-1||u.dynamic;super("array",f,d,h);Z(this,"coder");Z(this,"length");(0,e.defineProperties)(this,{coder:u,length:l})}defaultValue(){const u=this.coder.defaultValue(),l=[];for(let d=0;dh||d<-(h+i))&&this._throwError("value out-of-bounds",l),d=(0,e.toTwos)(d,8*n.WordSize)}else(d(0,e.mask)(f,this.size*8))&&this._throwError("value out-of-bounds",l);return u.writeValue(d)}decode(u){let l=(0,e.mask)(u.readValue(),this.size*8);return this.signed&&(l=(0,e.fromTwos)(l,this.size*8)),l}}return By.NumberCoder=s,By}var My={},mK;function bet(){if(mK)return My;mK=1,Object.defineProperty(My,"__esModule",{value:!0}),My.StringCoder=void 0;const e=NM(),t=kl(),n=Kde();class r extends n.DynamicBytesCoder{constructor(o){super("string",o)}defaultValue(){return""}encode(o,s){return super.encode(o,(0,e.toUtf8Bytes)(t.Typed.dereference(s,"string")))}decode(o){return(0,e.toUtf8String)(super.decode(o))}}return My.StringCoder=r,My}var Dy={},yK;function vet(){if(yK)return Dy;yK=1,Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.TupleCoder=void 0;const e=op(),t=kl(),n=Wa(),r=Gde();class i extends n.Coder{constructor(a,c){let u=!1;const l=[];a.forEach(f=>{f.dynamic&&(u=!0),l.push(f.type)});const d="tuple("+l.join(",")+")";super("tuple",d,c,u);Z(this,"coders");(0,e.defineProperties)(this,{coders:Object.freeze(a.slice())})}defaultValue(){const a=[];this.coders.forEach(u=>{a.push(u.defaultValue())});const c=this.coders.reduce((u,l)=>{const d=l.localName;return d&&(u[d]||(u[d]=0),u[d]++),u},{});return this.coders.forEach((u,l)=>{let d=u.localName;!d||c[d]!==1||(d==="length"&&(d="_length"),a[d]==null&&(a[d]=a[l]))}),Object.freeze(a)}encode(a,c){const u=t.Typed.dereference(c,"tuple");return(0,r.pack)(a,this.coders,u)}decode(a){return(0,r.unpack)(a,this.coders)}}return Dy.TupleCoder=i,Dy}var ar={},Wk={},jy={},bK;function Qde(){if(bK)return jy;bK=1,Object.defineProperty(jy,"__esModule",{value:!0}),jy.id=void 0;const e=ti(),t=Je();function n(r){return(0,e.keccak256)((0,t.toUtf8Bytes)(r))}return jy.id=n,jy}var aa={};const xet=Qs(Tqe);var vK;function wet(){if(vK)return aa;vK=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.dnsEncode=aa.namehash=aa.isValidName=aa.ensNormalize=void 0;const e=ti(),t=Je(),n=xet,r=new Uint8Array(32);r.fill(0);function i(l){return(0,t.assertArgument)(l.length!==0,"invalid ENS name; empty component","comp",l),l}function o(l){const d=(0,t.toUtf8Bytes)(s(l)),f=[];if(l.length===0)return f;let h=0;for(let p=0;p{if(d.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const f=new Uint8Array(d.length+1);return f.set(d,1),f[0]=f.length-1,f})))+"00"}return aa.dnsEncode=u,aa}var qf={},Gk={},Fy={},xK;function Yde(){if(xK)return Fy;xK=1,Object.defineProperty(Fy,"__esModule",{value:!0}),Fy.accessListify=void 0;const e=jr(),t=Je();function n(i,o){return{address:(0,e.getAddress)(i),storageKeys:o.map((s,a)=>((0,t.assertArgument)((0,t.isHexString)(s,32),"invalid slot",`storageKeys[${a}]`,s),s.toLowerCase()))}}function r(i){if(Array.isArray(i))return i.map((s,a)=>Array.isArray(s)?((0,t.assertArgument)(s.length===2,"invalid slot set",`value[${a}]`,s),n(s[0],s[1])):((0,t.assertArgument)(s!=null&&typeof s=="object","invalid address-slot set","value",i),n(s.address,s.storageKeys)));(0,t.assertArgument)(i!=null&&typeof i=="object","invalid access list","value",i);const o=Object.keys(i).map(s=>{const a=i[s].reduce((c,u)=>(c[u]=!0,c),{});return n(s,Object.keys(a).sort())});return o.sort((s,a)=>s.address.localeCompare(a.address)),o}return Fy.accessListify=r,Fy}var Zf={},wK;function qde(){if(wK)return Zf;wK=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.recoverAddress=Zf.computeAddress=void 0;const e=jr(),t=ti();function n(i){let o;return typeof i=="string"?o=t.SigningKey.computePublicKey(i,!1):o=i.publicKey,(0,e.getAddress)((0,t.keccak256)("0x"+o.substring(4)).substring(26))}Zf.computeAddress=n;function r(i,o){return n(t.SigningKey.recoverPublicKey(i,o))}return Zf.recoverAddress=r,Zf}var Uy={},EK;function Eet(){var O,N,R,_,M,z,F,$,W,G,H,L;if(EK)return Uy;EK=1,Object.defineProperty(Uy,"__esModule",{value:!0}),Uy.Transaction=void 0;const e=jr(),t=ti(),n=Je(),r=Yde(),i=qde(),o=BigInt(0),s=BigInt(2),a=BigInt(27),c=BigInt(28),u=BigInt(35),l=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function d(V){return V==="0x"?null:(0,e.getAddress)(V)}function f(V,P){try{return(0,r.accessListify)(V)}catch(K){(0,n.assertArgument)(!1,K.message,P,V)}}function h(V,P){return V==="0x"?0:(0,n.getNumber)(V,P)}function p(V,P){if(V==="0x")return o;const K=(0,n.getBigInt)(V,P);return(0,n.assertArgument)(K<=l,"value exceeds uint size",P,K),K}function m(V,P){const K=(0,n.getBigInt)(V,"value"),ce=(0,n.toBeArray)(K);return(0,n.assertArgument)(ce.length<=32,"value too large",`tx.${P}`,K),ce}function x(V){return(0,r.accessListify)(V).map(P=>[P.address,P.storageKeys])}function y(V){const P=(0,n.decodeRlp)(V);(0,n.assertArgument)(Array.isArray(P)&&(P.length===9||P.length===6),"invalid field count for legacy transaction","data",V);const K={type:0,nonce:h(P[0],"nonce"),gasPrice:p(P[1],"gasPrice"),gasLimit:p(P[2],"gasLimit"),to:d(P[3]),value:p(P[4],"value"),data:(0,n.hexlify)(P[5]),chainId:o};if(P.length===6)return K;const ce=p(P[6],"v"),X=p(P[7],"r"),ke=p(P[8],"s");if(X===o&&ke===o)K.chainId=ce;else{let me=(ce-u)/s;me=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,n.assert)(!K||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,n.assert)(this.type!==0||!ce,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const X=[];return this.type!=null?X.push(this.type):K?X.push(2):P?(X.push(1),ce||X.push(0)):ce?(X.push(1),X.push(2)):(X.push(0),X.push(1),X.push(2)),X.sort(),X}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return q.from(this)}toJSON(){const P=K=>K==null?null:K.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:P(this.gasLimit),gasPrice:P(this.gasPrice),maxPriorityFeePerGas:P(this.maxPriorityFeePerGas),maxFeePerGas:P(this.maxFeePerGas),value:P(this.value),chainId:P(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(P){if(P==null)return new q;if(typeof P=="string"){const ce=(0,n.getBytes)(P);if(ce[0]>=127)return q.from(y(ce));switch(ce[0]){case 1:return q.from(S(ce));case 2:return q.from(w(ce))}(0,n.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const K=new q;return P.type!=null&&(K.type=P.type),P.to!=null&&(K.to=P.to),P.nonce!=null&&(K.nonce=P.nonce),P.gasLimit!=null&&(K.gasLimit=P.gasLimit),P.gasPrice!=null&&(K.gasPrice=P.gasPrice),P.maxPriorityFeePerGas!=null&&(K.maxPriorityFeePerGas=P.maxPriorityFeePerGas),P.maxFeePerGas!=null&&(K.maxFeePerGas=P.maxFeePerGas),P.data!=null&&(K.data=P.data),P.value!=null&&(K.value=P.value),P.chainId!=null&&(K.chainId=P.chainId),P.signature!=null&&(K.signature=t.Signature.from(P.signature)),P.accessList!=null&&(K.accessList=P.accessList),P.hash!=null&&((0,n.assertArgument)(K.isSigned(),"unsigned transaction cannot define hash","tx",P),(0,n.assertArgument)(K.hash===P.hash,"hash mismatch","tx",P)),P.from!=null&&((0,n.assertArgument)(K.isSigned(),"unsigned transaction cannot define from","tx",P),(0,n.assertArgument)(K.from.toLowerCase()===(P.from||"").toLowerCase(),"from mismatch","tx",P)),K}};O=new WeakMap,N=new WeakMap,R=new WeakMap,_=new WeakMap,M=new WeakMap,z=new WeakMap,F=new WeakMap,$=new WeakMap,W=new WeakMap,G=new WeakMap,H=new WeakMap,L=new WeakMap;let A=q;return Uy.Transaction=A,Uy}var CK;function rs(){return CK||(CK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Transaction=e.recoverAddress=e.computeAddress=e.accessListify=void 0;var t=Yde();Object.defineProperty(e,"accessListify",{enumerable:!0,get:function(){return t.accessListify}});var n=qde();Object.defineProperty(e,"computeAddress",{enumerable:!0,get:function(){return n.computeAddress}}),Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return n.recoverAddress}});var r=Eet();Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return r.Transaction}})}(Gk)),Gk}var AK;function Cet(){if(AK)return qf;AK=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.verifyMessage=qf.hashMessage=void 0;const e=ti(),t=H5(),n=rs(),r=Je();function i(s){return typeof s=="string"&&(s=(0,r.toUtf8Bytes)(s)),(0,e.keccak256)((0,r.concat)([(0,r.toUtf8Bytes)(t.MessagePrefix),(0,r.toUtf8Bytes)(String(s.length)),s]))}qf.hashMessage=i;function o(s,a){const c=i(s);return(0,n.recoverAddress)(c,a)}return qf.verifyMessage=o,qf}var au={},SK;function Aet(){if(SK)return au;SK=1,Object.defineProperty(au,"__esModule",{value:!0}),au.solidityPackedSha256=au.solidityPackedKeccak256=au.solidityPacked=void 0;const e=jr(),t=ti(),n=Je(),r=new RegExp("^bytes([0-9]+)$"),i=new RegExp("^(u?int)([0-9]*)$"),o=new RegExp("^(.*)\\[([0-9]*)\\]$");function s(l,d,f){switch(l){case"address":return f?(0,n.getBytes)((0,n.zeroPadValue)(d,32)):(0,n.getBytes)((0,e.getAddress)(d));case"string":return(0,n.toUtf8Bytes)(d);case"bytes":return(0,n.getBytes)(d);case"bool":return d=d?"0x01":"0x00",f?(0,n.getBytes)((0,n.zeroPadValue)(d,32)):(0,n.getBytes)(d)}let h=l.match(i);if(h){let p=h[1]==="int",m=parseInt(h[2]||"256");return(0,n.assertArgument)((!h[2]||h[2]===String(m))&&m%8===0&&m!==0&&m<=256,"invalid number type","type",l),f&&(m=256),p&&(d=(0,n.toTwos)(d,m)),(0,n.getBytes)((0,n.zeroPadValue)((0,n.toBeArray)(d),m/8))}if(h=l.match(r),h){const p=parseInt(h[1]);return(0,n.assertArgument)(String(p)===h[1]&&p!==0&&p<=32,"invalid bytes type","type",l),(0,n.assertArgument)((0,n.dataLength)(d)===p,`invalid value for ${l}`,"value",d),f?(0,n.getBytes)((0,n.zeroPadBytes)(d,32)):d}if(h=l.match(o),h&&Array.isArray(d)){const p=h[1],m=parseInt(h[2]||String(d.length));(0,n.assertArgument)(m===d.length,`invalid array length for ${l}`,"value",d);const x=[];return d.forEach(function(y){x.push(s(p,y,!0))}),(0,n.getBytes)((0,n.concat)(x))}(0,n.assertArgument)(!1,"invalid type","type",l)}function a(l,d){(0,n.assertArgument)(l.length===d.length,"wrong number of values; expected ${ types.length }","values",d);const f=[];return l.forEach(function(h,p){f.push(s(h,d[p]))}),(0,n.hexlify)((0,n.concat)(f))}au.solidityPacked=a;function c(l,d){return(0,t.keccak256)(a(l,d))}au.solidityPackedKeccak256=c;function u(l,d){return(0,t.sha256)(a(l,d))}return au.solidityPackedSha256=u,au}var Jf={},kK;function ket(){var E,S,I,A,Zde;if(kK)return Jf;kK=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.verifyTypedData=Jf.TypedDataEncoder=void 0;const e=jr(),t=ti(),n=rs(),r=Je(),i=Qde(),o=new Uint8Array(32);o.fill(0);const s=BigInt(-1),a=BigInt(0),c=BigInt(1),u=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function l(R){const _=(0,r.getBytes)(R),M=_.length%32;return M?(0,r.concat)([_,o.slice(M)]):(0,r.hexlify)(_)}const d=(0,r.toBeHex)(c,32),f=(0,r.toBeHex)(a,32),h={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},p=["name","version","chainId","verifyingContract","salt"];function m(R){return function(_){return(0,r.assertArgument)(typeof _=="string",`invalid domain value for ${JSON.stringify(R)}`,`domain.${R}`,_),_}}const x={name:m("name"),version:m("version"),chainId:function(R){const _=(0,r.getBigInt)(R,"domain.chainId");return(0,r.assertArgument)(_>=0,"invalid chain ID","domain.chainId",R),Number.isSafeInteger(_)?Number(_):(0,r.toQuantity)(_)},verifyingContract:function(R){try{return(0,e.getAddress)(R).toLowerCase()}catch{}(0,r.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",R)},salt:function(R){const _=(0,r.getBytes)(R,"domain.salt");return(0,r.assertArgument)(_.length===32,'invalid domain value "salt"',"domain.salt",R),(0,r.hexlify)(_)}};function y(R){{const _=R.match(/^(u?)int(\d*)$/);if(_){const M=_[1]==="",z=parseInt(_[2]||"256");(0,r.assertArgument)(z%8===0&&z!==0&&z<=256&&(_[2]==null||_[2]===String(z)),"invalid numeric width","type",R);const F=(0,r.mask)(u,M?z-1:z),$=M?(F+c)*s:a;return function(W){const G=(0,r.getBigInt)(W,"value");return(0,r.assertArgument)(G>=$&&G<=F,`value out-of-bounds for ${R}`,"value",G),(0,r.toBeHex)(M?(0,r.toTwos)(G,256):G,32)}}}{const _=R.match(/^bytes(\d+)$/);if(_){const M=parseInt(_[1]);return(0,r.assertArgument)(M!==0&&M<=32&&_[1]===String(M),"invalid bytes width","type",R),function(z){const F=(0,r.getBytes)(z);return(0,r.assertArgument)(F.length===M,`invalid length for ${R}`,"value",z),l(z)}}}switch(R){case"address":return function(_){return(0,r.zeroPadValue)((0,e.getAddress)(_),32)};case"bool":return function(_){return _?d:f};case"bytes":return function(_){return(0,t.keccak256)(_)};case"string":return function(_){return(0,i.id)(_)}}return null}function b(R,_){return`${R}(${_.map(({name:M,type:z})=>z+" "+M).join(",")})`}const N=class N{constructor(_){J(this,A);Z(this,"primaryType");J(this,E);J(this,S);J(this,I);D(this,E,JSON.stringify(_)),D(this,S,new Map),D(this,I,new Map);const M=new Map,z=new Map,F=new Map;Object.keys(_).forEach(G=>{M.set(G,new Set),z.set(G,[]),F.set(G,new Set)});for(const G in _){const H=new Set;for(const L of _[G]){(0,r.assertArgument)(!H.has(L.name),`duplicate variable name ${JSON.stringify(L.name)} in ${JSON.stringify(G)}`,"types",_),H.add(L.name);const q=L.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;(0,r.assertArgument)(q!==G,`circular type reference to ${JSON.stringify(q)}`,"types",_),!y(q)&&((0,r.assertArgument)(z.has(q),`unknown type ${JSON.stringify(q)}`,"types",_),z.get(q).push(G),M.get(G).add(q))}}const $=Array.from(z.keys()).filter(G=>z.get(G).length===0);(0,r.assertArgument)($.length!==0,"missing primary type","types",_),(0,r.assertArgument)($.length===1,`ambiguous primary types or unused types: ${$.map(G=>JSON.stringify(G)).join(", ")}`,"types",_),(0,r.defineProperties)(this,{primaryType:$[0]});function W(G,H){(0,r.assertArgument)(!H.has(G),`circular type reference to ${JSON.stringify(G)}`,"types",_),H.add(G);for(const L of M.get(G))if(z.has(L)){W(L,H);for(const q of H)F.get(q).add(L)}H.delete(G)}W(this.primaryType,new Set);for(const[G,H]of F){const L=Array.from(H);L.sort(),C(this,S).set(G,b(G,_[G])+L.map(q=>b(q,_[q])).join(""))}}get types(){return JSON.parse(C(this,E))}getEncoder(_){let M=C(this,I).get(_);return M||(M=de(this,A,Zde).call(this,_),C(this,I).set(_,M)),M}encodeType(_){const M=C(this,S).get(_);return(0,r.assertArgument)(M,`unknown type: ${JSON.stringify(_)}`,"name",_),M}encodeData(_,M){return this.getEncoder(_)(M)}hashStruct(_,M){return(0,t.keccak256)(this.encodeData(_,M))}encode(_){return this.encodeData(this.primaryType,_)}hash(_){return this.hashStruct(this.primaryType,_)}_visit(_,M,z){if(y(_))return z(_,M);const F=_.match(/^(.*)(\x5b(\d*)\x5d)$/);if(F)return(0,r.assertArgument)(!F[3]||parseInt(F[3])===M.length,`array length mismatch; expected length ${parseInt(F[3])}`,"value",M),M.map(W=>this._visit(F[1],W,z));const $=this.types[_];if($)return $.reduce((W,{name:G,type:H})=>(W[G]=this._visit(H,M[G],z),W),{});(0,r.assertArgument)(!1,`unknown type: ${_}`,"type",_)}visit(_,M){return this._visit(this.primaryType,_,M)}static from(_){return new N(_)}static getPrimaryType(_){return N.from(_).primaryType}static hashStruct(_,M,z){return N.from(M).hashStruct(_,z)}static hashDomain(_){const M=[];for(const z in _){if(_[z]==null)continue;const F=h[z];(0,r.assertArgument)(F,`invalid typed-data domain key: ${JSON.stringify(z)}`,"domain",_),M.push({name:z,type:F})}return M.sort((z,F)=>p.indexOf(z.name)-p.indexOf(F.name)),N.hashStruct("EIP712Domain",{EIP712Domain:M},_)}static encode(_,M,z){return(0,r.concat)(["0x1901",N.hashDomain(_),N.from(M).hash(z)])}static hash(_,M,z){return(0,t.keccak256)(N.encode(_,M,z))}static async resolveNames(_,M,z,F){_=Object.assign({},_);for(const G in _)_[G]==null&&delete _[G];const $={};_.verifyingContract&&!(0,r.isHexString)(_.verifyingContract,20)&&($[_.verifyingContract]="0x");const W=N.from(M);W.visit(z,(G,H)=>(G==="address"&&!(0,r.isHexString)(H,20)&&($[H]="0x"),H));for(const G in $)$[G]=await F(G);return _.verifyingContract&&$[_.verifyingContract]&&(_.verifyingContract=$[_.verifyingContract]),z=W.visit(z,(G,H)=>G==="address"&&$[H]?$[H]:H),{domain:_,value:z}}static getPayload(_,M,z){N.hashDomain(_);const F={},$=[];p.forEach(H=>{const L=_[H];L!=null&&(F[H]=x[H](L),$.push({name:H,type:h[H]}))});const W=N.from(M),G=Object.assign({},M);return(0,r.assertArgument)(G.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",M),G.EIP712Domain=$,W.encode(z),{types:G,domain:F,primaryType:W.primaryType,message:W.visit(z,(H,L)=>{if(H.match(/^bytes(\d*)/))return(0,r.hexlify)((0,r.getBytes)(L));if(H.match(/^u?int/))return(0,r.getBigInt)(L).toString();switch(H){case"address":return L.toLowerCase();case"bool":return!!L;case"string":return(0,r.assertArgument)(typeof L=="string","invalid string","value",L),L}(0,r.assertArgument)(!1,"unsupported type","type",H)})}}};E=new WeakMap,S=new WeakMap,I=new WeakMap,A=new WeakSet,Zde=function(_){{const F=y(_);if(F)return F}const M=_.match(/^(.*)(\x5b(\d*)\x5d)$/);if(M){const F=M[1],$=this.getEncoder(F);return W=>{(0,r.assertArgument)(!M[3]||parseInt(M[3])===W.length,`array length mismatch; expected length ${parseInt(M[3])}`,"value",W);let G=W.map($);return C(this,S).has(F)&&(G=G.map(t.keccak256)),(0,t.keccak256)((0,r.concat)(G))}}const z=this.types[_];if(z){const F=(0,i.id)(C(this,S).get(_));return $=>{const W=z.map(({name:G,type:H})=>{const L=this.getEncoder(H)($[G]);return C(this,S).has(H)?(0,t.keccak256)(L):L});return W.unshift(F),(0,r.concat)(W)}}(0,r.assertArgument)(!1,`unknown type: ${_}`,"type",_)};let v=N;Jf.TypedDataEncoder=v;function w(R,_,M,z){return(0,n.recoverAddress)(v.hash(R,_,M),z)}return Jf.verifyTypedData=w,Jf}var TK;function Tl(){return TK||(TK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTypedData=e.TypedDataEncoder=e.solidityPackedSha256=e.solidityPackedKeccak256=e.solidityPacked=e.verifyMessage=e.hashMessage=e.dnsEncode=e.namehash=e.isValidName=e.ensNormalize=e.id=void 0;var t=Qde();Object.defineProperty(e,"id",{enumerable:!0,get:function(){return t.id}});var n=wet();Object.defineProperty(e,"ensNormalize",{enumerable:!0,get:function(){return n.ensNormalize}}),Object.defineProperty(e,"isValidName",{enumerable:!0,get:function(){return n.isValidName}}),Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return n.namehash}}),Object.defineProperty(e,"dnsEncode",{enumerable:!0,get:function(){return n.dnsEncode}});var r=Cet();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return r.hashMessage}}),Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return r.verifyMessage}});var i=Aet();Object.defineProperty(e,"solidityPacked",{enumerable:!0,get:function(){return i.solidityPacked}}),Object.defineProperty(e,"solidityPackedKeccak256",{enumerable:!0,get:function(){return i.solidityPackedKeccak256}}),Object.defineProperty(e,"solidityPackedSha256",{enumerable:!0,get:function(){return i.solidityPackedSha256}});var o=ket();Object.defineProperty(e,"TypedDataEncoder",{enumerable:!0,get:function(){return o.TypedDataEncoder}}),Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return o.verifyTypedData}})}(Wk)),Wk}var _K;function LM(){var re,Q,se,jR,Fe,G8;if(_K)return ar;_K=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.StructFragment=ar.FunctionFragment=ar.FallbackFragment=ar.ConstructorFragment=ar.EventFragment=ar.ErrorFragment=ar.NamedFragment=ar.Fragment=ar.ParamType=void 0;const e=Je(),t=Tl();function n(Ie){const ie=new Set;return Ie.forEach(te=>ie.add(te)),Object.freeze(ie)}const i=n("external public payable".split(" ")),o="constant external internal payable private public pure view",s=n(o.split(" ")),a="constructor error event fallback function receive struct",c=n(a.split(" ")),u="calldata memory storage payable indexed",l=n(u.split(" ")),f=[a,u,"tuple returns",o].join(" "),h=n(f.split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},m=new RegExp("^(\\s*)"),x=new RegExp("^([0-9]+)"),y=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),b=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),Ce=class Ce{constructor(ie){J(this,se);J(this,re);J(this,Q);D(this,re,0),D(this,Q,ie.slice())}get offset(){return C(this,re)}get length(){return C(this,Q).length-C(this,re)}clone(){return new Ce(C(this,Q))}reset(){D(this,re,0)}popKeyword(ie){const te=this.peek();if(te.type!=="KEYWORD"||!ie.has(te.text))throw new Error(`expected keyword ${te.text}`);return this.pop().text}popType(ie){if(this.peek().type!==ie)throw new Error(`expected ${ie}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const ie=this.peek();if(ie.type!=="OPEN_PAREN")throw new Error("bad start");const te=de(this,se,jR).call(this,C(this,re)+1,ie.match+1);return D(this,re,ie.match+1),te}popParams(){const ie=this.peek();if(ie.type!=="OPEN_PAREN")throw new Error("bad start");const te=[];for(;C(this,re)=C(this,Q).length)throw new Error("out-of-bounds");return C(this,Q)[C(this,re)]}peekKeyword(ie){const te=this.peekType("KEYWORD");return te!=null&&ie.has(te)?te:null}peekType(ie){if(this.length===0)return null;const te=this.peek();return te.type===ie?te.text:null}pop(){const ie=this.peek();return xo(this,re)._++,ie}toString(){const ie=[];for(let te=C(this,re);te`}};re=new WeakMap,Q=new WeakMap,se=new WeakSet,jR=function(ie=0,te=0){return new Ce(C(this,Q).slice(ie,te).map(ve=>Object.freeze(Object.assign({},ve,{match:ve.match-ie,linkBack:ve.linkBack-ie,linkNext:ve.linkNext-ie}))))};let w=Ce;function E(Ie){const ie=[],te=T=>{const B=U0&&ie[ie.length-1].type==="NUMBER"){const Te=ie.pop().text;xe=Te+xe,ie[ie.length-1].value=(0,e.getNumber)(Te)}if(ie.length===0||ie[ie.length-1].type!=="BRACKET")throw new Error("missing opening bracket");ie[ie.length-1].text+=xe}continue}if(B=T.match(y),B){if(Y.text=B[1],U+=Y.text.length,h.has(Y.text)){Y.type="KEYWORD";continue}if(Y.text.match(v)){Y.type="TYPE";continue}Y.type="ID";continue}if(B=T.match(x),B){Y.text=B[1],Y.type="NUMBER",U+=Y.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(T[0])} at position ${U}`)}return new w(ie.map(T=>Object.freeze(T)))}function S(Ie,ie){let te=[];for(const ve in ie.keys())Ie.has(ve)&&te.push(ve);if(te.length>1)throw new Error(`conflicting types: ${te.join(", ")}`)}function I(Ie,ie){if(ie.peekKeyword(c)){const te=ie.pop().text;if(te!==Ie)throw new Error(`expected ${Ie}, got ${te}`)}return ie.popType("ID")}function A(Ie,ie){const te=new Set;for(;;){const ve=Ie.peekType("KEYWORD");if(ve==null||ie&&!ie.has(ve))break;if(Ie.pop(),te.has(ve))throw new Error(`duplicate keywords: ${JSON.stringify(ve)}`);te.add(ve)}return Object.freeze(te)}function O(Ie){let ie=A(Ie,s);return S(ie,n("constant payable nonpayable".split(" "))),S(ie,n("pure view payable nonpayable".split(" "))),ie.has("view")?"view":ie.has("pure")?"pure":ie.has("payable")?"payable":ie.has("nonpayable")?"nonpayable":ie.has("constant")?"view":"nonpayable"}function N(Ie,ie){return Ie.popParams().map(te=>K.from(te,ie))}function R(Ie){if(Ie.peekType("AT")){if(Ie.pop(),Ie.peekType("NUMBER"))return(0,e.getBigInt)(Ie.pop().text);throw new Error("invalid gas")}return null}function _(Ie){if(Ie.length)throw new Error(`unexpected tokens: ${Ie.toString()}`)}const M=new RegExp(/^(.*)\[([0-9]*)\]$/);function z(Ie){const ie=Ie.match(v);if((0,e.assertArgument)(ie,"invalid type","type",Ie),Ie==="uint")return"uint256";if(Ie==="int")return"int256";if(ie[2]){const te=parseInt(ie[2]);(0,e.assertArgument)(te!==0&&te<=32,"invalid bytes length","type",Ie)}else if(ie[3]){const te=parseInt(ie[3]);(0,e.assertArgument)(te!==0&&te<=256&&te%8===0,"invalid numeric width","type",Ie)}return Ie}const F={},$=Symbol.for("_ethers_internal"),W="_ParamTypeInternal",G="_ErrorInternal",H="_EventInternal",L="_ConstructorInternal",q="_FallbackInternal",V="_FunctionInternal",P="_StructInternal",Ge=class Ge{constructor(ie,te,ve,fe,U,T,B,Y){J(this,Fe);Z(this,"name");Z(this,"type");Z(this,"baseType");Z(this,"indexed");Z(this,"components");Z(this,"arrayLength");Z(this,"arrayChildren");if((0,e.assertPrivate)(ie,F,"ParamType"),Object.defineProperty(this,$,{value:W}),T&&(T=Object.freeze(T.slice())),fe==="array"){if(B==null||Y==null)throw new Error("")}else if(B!=null||Y!=null)throw new Error("");if(fe==="tuple"){if(T==null)throw new Error("")}else if(T!=null)throw new Error("");(0,e.defineProperties)(this,{name:te,type:ve,baseType:fe,indexed:U,components:T,arrayLength:B,arrayChildren:Y})}format(ie){if(ie==null&&(ie="sighash"),ie==="json"){const ve=this.name||"";if(this.isArray()){const U=JSON.parse(this.arrayChildren.format("json"));return U.name=ve,U.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(U)}const fe={type:this.baseType==="tuple"?"tuple":this.type,name:ve};return typeof this.indexed=="boolean"&&(fe.indexed=this.indexed),this.isTuple()&&(fe.components=this.components.map(U=>JSON.parse(U.format(ie)))),JSON.stringify(fe)}let te="";return this.isArray()?(te+=this.arrayChildren.format(ie),te+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(ie!=="sighash"&&(te+=this.type),te+="("+this.components.map(ve=>ve.format(ie)).join(ie==="full"?", ":",")+")"):te+=this.type,ie!=="sighash"&&(this.indexed===!0&&(te+=" indexed"),ie==="full"&&this.name&&(te+=" "+this.name)),te}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(ie,te){if(this.isArray()){if(!Array.isArray(ie))throw new Error("invalid array value");if(this.arrayLength!==-1&&ie.length!==this.arrayLength)throw new Error("array is wrong length");const ve=this;return ie.map(fe=>ve.arrayChildren.walk(fe,te))}if(this.isTuple()){if(!Array.isArray(ie))throw new Error("invalid tuple value");if(ie.length!==this.components.length)throw new Error("array is wrong length");const ve=this;return ie.map((fe,U)=>ve.components[U].walk(fe,te))}return te(this.type,ie)}async walkAsync(ie,te){const ve=[],fe=[ie];return de(this,Fe,G8).call(this,ve,ie,te,U=>{fe[0]=U}),ve.length&&await Promise.all(ve),fe[0]}static from(ie,te){if(Ge.isParamType(ie))return ie;if(typeof ie=="string")try{return Ge.from(E(ie),te)}catch{(0,e.assertArgument)(!1,"invalid param type","obj",ie)}else if(ie instanceof w){let B="",Y="",ue=null;A(ie,n(["tuple"])).has("tuple")||ie.peekType("OPEN_PAREN")?(Y="tuple",ue=ie.popParams().map(Tt=>Ge.from(Tt)),B=`tuple(${ue.map(Tt=>Tt.format()).join(",")})`):(B=z(ie.popType("TYPE")),Y=B);let xe=null,Te=null;for(;ie.length&&ie.peekType("BRACKET");){const Tt=ie.pop();xe=new Ge(F,"",B,Y,null,ue,Te,xe),Te=Tt.value,B+=Tt.text,Y="array",ue=null}let dt=null;if(A(ie,l).has("indexed")){if(!te)throw new Error("");dt=!0}const mt=ie.peekType("ID")?ie.pop().text:"";if(ie.length)throw new Error("leftover tokens");return new Ge(F,mt,B,Y,dt,ue,Te,xe)}const ve=ie.name;(0,e.assertArgument)(!ve||typeof ve=="string"&&ve.match(b),"invalid name","obj.name",ve);let fe=ie.indexed;fe!=null&&((0,e.assertArgument)(te,"parameter cannot be indexed","obj.indexed",ie.indexed),fe=!!fe);let U=ie.type,T=U.match(M);if(T){const B=parseInt(T[2]||"-1"),Y=Ge.from({type:T[1],components:ie.components});return new Ge(F,ve||"",U,"array",fe,null,B,Y)}if(U==="tuple"||U.startsWith("tuple(")||U.startsWith("(")){const B=ie.components!=null?ie.components.map(ue=>Ge.from(ue)):null;return new Ge(F,ve||"",U,"tuple",fe,B,null,null)}return U=z(ie.type),new Ge(F,ve||"",U,U,fe,null,null,null)}static isParamType(ie){return ie&&ie[$]===W}};Fe=new WeakSet,G8=function(ie,te,ve,fe){if(this.isArray()){if(!Array.isArray(te))throw new Error("invalid array value");if(this.arrayLength!==-1&&te.length!==this.arrayLength)throw new Error("array is wrong length");const T=this.arrayChildren,B=te.slice();B.forEach((Y,ue)=>{var xe;de(xe=T,Fe,G8).call(xe,ie,Y,ve,Te=>{B[ue]=Te})}),fe(B);return}if(this.isTuple()){const T=this.components;let B;if(Array.isArray(te))B=te.slice();else{if(te==null||typeof te!="object")throw new Error("invalid tuple value");B=T.map(Y=>{if(!Y.name)throw new Error("cannot use object value with unnamed components");if(!(Y.name in te))throw new Error(`missing value for component ${Y.name}`);return te[Y.name]})}if(B.length!==this.components.length)throw new Error("array is wrong length");B.forEach((Y,ue)=>{var xe;de(xe=T[ue],Fe,G8).call(xe,ie,Y,ve,Te=>{B[ue]=Te})}),fe(B);return}const U=ve(this.type,te);U.then?ie.push(async function(){fe(await U)}()):fe(U)};let K=Ge;ar.ParamType=K;class ce{constructor(ie,te,ve){Z(this,"type");Z(this,"inputs");(0,e.assertPrivate)(ie,F,"Fragment"),ve=Object.freeze(ve.slice()),(0,e.defineProperties)(this,{type:te,inputs:ve})}static from(ie){if(typeof ie=="string"){try{ce.from(JSON.parse(ie))}catch{}return ce.from(E(ie))}if(ie instanceof w)switch(ie.peekKeyword(c)){case"constructor":return Be.from(ie);case"error":return me.from(ie);case"event":return Re.from(ie);case"fallback":case"receive":return Le.from(ie);case"function":return Ne.from(ie);case"struct":return Me.from(ie)}else if(typeof ie=="object"){switch(ie.type){case"constructor":return Be.from(ie);case"error":return me.from(ie);case"event":return Re.from(ie);case"fallback":case"receive":return Le.from(ie);case"function":return Ne.from(ie);case"struct":return Me.from(ie)}(0,e.assert)(!1,`unsupported type: ${ie.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,e.assertArgument)(!1,"unsupported frgament object","obj",ie)}static isConstructor(ie){return Be.isFragment(ie)}static isError(ie){return me.isFragment(ie)}static isEvent(ie){return Re.isFragment(ie)}static isFunction(ie){return Ne.isFragment(ie)}static isStruct(ie){return Me.isFragment(ie)}}ar.Fragment=ce;class X extends ce{constructor(te,ve,fe,U){super(te,ve,U);Z(this,"name");(0,e.assertArgument)(typeof fe=="string"&&fe.match(b),"invalid identifier","name",fe),U=Object.freeze(U.slice()),(0,e.defineProperties)(this,{name:fe})}}ar.NamedFragment=X;function ke(Ie,ie){return"("+ie.map(te=>te.format(Ie)).join(Ie==="full"?", ":",")+")"}class me extends X{constructor(ie,te,ve){super(ie,"error",te,ve),Object.defineProperty(this,$,{value:G})}get selector(){return(0,t.id)(this.format("sighash")).substring(0,10)}format(ie){if(ie==null&&(ie="sighash"),ie==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(ve=>JSON.parse(ve.format(ie)))});const te=[];return ie!=="sighash"&&te.push("error"),te.push(this.name+ke(ie,this.inputs)),te.join(" ")}static from(ie){if(me.isFragment(ie))return ie;if(typeof ie=="string")return me.from(E(ie));if(ie instanceof w){const te=I("error",ie),ve=N(ie);return _(ie),new me(F,te,ve)}return new me(F,ie.name,ie.inputs?ie.inputs.map(K.from):[])}static isFragment(ie){return ie&&ie[$]===G}}ar.ErrorFragment=me;class Re extends X{constructor(te,ve,fe,U){super(te,"event",ve,fe);Z(this,"anonymous");Object.defineProperty(this,$,{value:H}),(0,e.defineProperties)(this,{anonymous:U})}get topicHash(){return(0,t.id)(this.format("sighash"))}format(te){if(te==null&&(te="sighash"),te==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(fe=>JSON.parse(fe.format(te)))});const ve=[];return te!=="sighash"&&ve.push("event"),ve.push(this.name+ke(te,this.inputs)),te!=="sighash"&&this.anonymous&&ve.push("anonymous"),ve.join(" ")}static getTopicHash(te,ve){return ve=(ve||[]).map(U=>K.from(U)),new Re(F,te,ve,!1).topicHash}static from(te){if(Re.isFragment(te))return te;if(typeof te=="string")try{return Re.from(E(te))}catch{(0,e.assertArgument)(!1,"invalid event fragment","obj",te)}else if(te instanceof w){const ve=I("event",te),fe=N(te,!0),U=!!A(te,n(["anonymous"])).has("anonymous");return _(te),new Re(F,ve,fe,U)}return new Re(F,te.name,te.inputs?te.inputs.map(ve=>K.from(ve,!0)):[],!!te.anonymous)}static isFragment(te){return te&&te[$]===H}}ar.EventFragment=Re;class Be extends ce{constructor(te,ve,fe,U,T){super(te,ve,fe);Z(this,"payable");Z(this,"gas");Object.defineProperty(this,$,{value:L}),(0,e.defineProperties)(this,{payable:U,gas:T})}format(te){if((0,e.assert)(te!=null&&te!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),te==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(fe=>JSON.parse(fe.format(te)))});const ve=[`constructor${ke(te,this.inputs)}`];return ve.push(this.payable?"payable":"nonpayable"),this.gas!=null&&ve.push(`@${this.gas.toString()}`),ve.join(" ")}static from(te){if(Be.isFragment(te))return te;if(typeof te=="string")try{return Be.from(E(te))}catch{(0,e.assertArgument)(!1,"invalid constuctor fragment","obj",te)}else if(te instanceof w){A(te,n(["constructor"]));const ve=N(te),fe=!!A(te,i).has("payable"),U=R(te);return _(te),new Be(F,"constructor",ve,fe,U)}return new Be(F,"constructor",te.inputs?te.inputs.map(K.from):[],!!te.payable,te.gas!=null?te.gas:null)}static isFragment(te){return te&&te[$]===L}}ar.ConstructorFragment=Be;class Le extends ce{constructor(te,ve,fe){super(te,"fallback",ve);Z(this,"payable");Object.defineProperty(this,$,{value:q}),(0,e.defineProperties)(this,{payable:fe})}format(te){const ve=this.inputs.length===0?"receive":"fallback";if(te==="json"){const fe=this.payable?"payable":"nonpayable";return JSON.stringify({type:ve,stateMutability:fe})}return`${ve}()${this.payable?" payable":""}`}static from(te){if(Le.isFragment(te))return te;if(typeof te=="string")try{return Le.from(E(te))}catch{(0,e.assertArgument)(!1,"invalid fallback fragment","obj",te)}else if(te instanceof w){const ve=te.toString(),fe=te.peekKeyword(n(["fallback","receive"]));if((0,e.assertArgument)(fe,"type must be fallback or receive","obj",ve),te.popKeyword(n(["fallback","receive"]))==="receive"){const Y=N(te);return(0,e.assertArgument)(Y.length===0,"receive cannot have arguments","obj.inputs",Y),A(te,n(["payable"])),_(te),new Le(F,[],!0)}let T=N(te);T.length?(0,e.assertArgument)(T.length===1&&T[0].type==="bytes","invalid fallback inputs","obj.inputs",T.map(Y=>Y.format("minimal")).join(", ")):T=[K.from("bytes")];const B=O(te);if((0,e.assertArgument)(B==="nonpayable"||B==="payable","fallback cannot be constants","obj.stateMutability",B),A(te,n(["returns"])).has("returns")){const Y=N(te);(0,e.assertArgument)(Y.length===1&&Y[0].type==="bytes","invalid fallback outputs","obj.outputs",Y.map(ue=>ue.format("minimal")).join(", "))}return _(te),new Le(F,T,B==="payable")}if(te.type==="receive")return new Le(F,[],!0);if(te.type==="fallback"){const ve=[K.from("bytes")],fe=te.stateMutability==="payable";return new Le(F,ve,fe)}(0,e.assertArgument)(!1,"invalid fallback description","obj",te)}static isFragment(te){return te&&te[$]===q}}ar.FallbackFragment=Le;class Ne extends X{constructor(te,ve,fe,U,T,B){super(te,"function",ve,U);Z(this,"constant");Z(this,"outputs");Z(this,"stateMutability");Z(this,"payable");Z(this,"gas");Object.defineProperty(this,$,{value:V}),T=Object.freeze(T.slice());const Y=fe==="view"||fe==="pure",ue=fe==="payable";(0,e.defineProperties)(this,{constant:Y,gas:B,outputs:T,payable:ue,stateMutability:fe})}get selector(){return(0,t.id)(this.format("sighash")).substring(0,10)}format(te){if(te==null&&(te="sighash"),te==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(fe=>JSON.parse(fe.format(te))),outputs:this.outputs.map(fe=>JSON.parse(fe.format(te)))});const ve=[];return te!=="sighash"&&ve.push("function"),ve.push(this.name+ke(te,this.inputs)),te!=="sighash"&&(this.stateMutability!=="nonpayable"&&ve.push(this.stateMutability),this.outputs&&this.outputs.length&&(ve.push("returns"),ve.push(ke(te,this.outputs))),this.gas!=null&&ve.push(`@${this.gas.toString()}`)),ve.join(" ")}static getSelector(te,ve){return ve=(ve||[]).map(U=>K.from(U)),new Ne(F,te,"view",ve,[],null).selector}static from(te){if(Ne.isFragment(te))return te;if(typeof te=="string")try{return Ne.from(E(te))}catch{(0,e.assertArgument)(!1,"invalid function fragment","obj",te)}else if(te instanceof w){const fe=I("function",te),U=N(te),T=O(te);let B=[];A(te,n(["returns"])).has("returns")&&(B=N(te));const Y=R(te);return _(te),new Ne(F,fe,T,U,B,Y)}let ve=te.stateMutability;return ve==null&&(ve="payable",typeof te.constant=="boolean"?(ve="view",te.constant||(ve="payable",typeof te.payable=="boolean"&&!te.payable&&(ve="nonpayable"))):typeof te.payable=="boolean"&&!te.payable&&(ve="nonpayable")),new Ne(F,te.name,ve,te.inputs?te.inputs.map(K.from):[],te.outputs?te.outputs.map(K.from):[],te.gas!=null?te.gas:null)}static isFragment(te){return te&&te[$]===V}}ar.FunctionFragment=Ne;class Me extends X{constructor(ie,te,ve){super(ie,"struct",te,ve),Object.defineProperty(this,$,{value:P})}format(){throw new Error("@TODO")}static from(ie){if(typeof ie=="string")try{return Me.from(E(ie))}catch{(0,e.assertArgument)(!1,"invalid struct fragment","obj",ie)}else if(ie instanceof w){const te=I("struct",ie),ve=N(ie);return _(ie),new Me(F,te,ve)}return new Me(F,ie.name,ie.inputs?ie.inputs.map(K.from):[])}static isFragment(ie){return ie&&ie[$]===P}}return ar.StructFragment=Me,ar}var PK;function Jde(){var w,Vp;if(PK)return hy;PK=1,Object.defineProperty(hy,"__esModule",{value:!0}),hy.AbiCoder=void 0;const e=Je(),t=Wa(),n=fet(),r=Gde(),i=pet(),o=Kde(),s=get(),a=met(),c=yet(),u=bet(),l=vet(),d=LM(),f=jr(),h=Je(),p=new Map;p.set(0,"GENERIC_PANIC"),p.set(1,"ASSERT_FALSE"),p.set(17,"OVERFLOW"),p.set(18,"DIVIDE_BY_ZERO"),p.set(33,"ENUM_RANGE_ERROR"),p.set(34,"BAD_STORAGE_DATA"),p.set(49,"STACK_UNDERFLOW"),p.set(50,"ARRAY_RANGE_ERROR"),p.set(65,"OUT_OF_MEMORY"),p.set(81,"UNINITIALIZED_FUNCTION_CALL");const m=new RegExp(/^bytes([0-9]*)$/),x=new RegExp(/^(u?int)([0-9]*)$/);let y=null;function b(I,A,O,N){let R="missing revert data",_=null;const M=null;let z=null;if(O){R="execution reverted";const $=(0,h.getBytes)(O);if(O=(0,h.hexlify)(O),$.length===0)R+=" (no data present; likely require(false) occurred",_="require(false)";else if($.length%32!==4)R+=" (could not decode reason; invalid data length)";else if((0,h.hexlify)($.slice(0,4))==="0x08c379a0")try{_=N.decode(["string"],$.slice(4))[0],z={signature:"Error(string)",name:"Error",args:[_]},R+=`: ${JSON.stringify(_)}`}catch{R+=" (could not decode reason; invalid string data)"}else if((0,h.hexlify)($.slice(0,4))==="0x4e487b71")try{const W=Number(N.decode(["uint256"],$.slice(4))[0]);z={signature:"Panic(uint256)",name:"Panic",args:[W]},_=`Panic due to ${p.get(W)||"UNKNOWN"}(${W})`,R+=`: ${_}`}catch{R+=" (could not decode panic code)"}else R+=" (unknown custom error)"}const F={to:A.to?(0,f.getAddress)(A.to):null,data:A.data||"0x"};return A.from&&(F.from=(0,f.getAddress)(A.from)),(0,h.makeError)(R,"CALL_EXCEPTION",{action:I,data:O,reason:_,transaction:F,invocation:M,revert:z})}const S=class S{constructor(){J(this,w)}getDefaultValue(A){const O=A.map(R=>de(this,w,Vp).call(this,d.ParamType.from(R)));return new l.TupleCoder(O,"_").defaultValue()}encode(A,O){(0,e.assertArgumentCount)(O.length,A.length,"types/values length mismatch");const N=A.map(M=>de(this,w,Vp).call(this,d.ParamType.from(M))),R=new l.TupleCoder(N,"_"),_=new t.Writer;return R.encode(_,O),_.data}decode(A,O,N){const R=A.map(M=>de(this,w,Vp).call(this,d.ParamType.from(M)));return new l.TupleCoder(R,"_").decode(new t.Reader(O,N))}static defaultAbiCoder(){return y==null&&(y=new S),y}static getBuiltinCallException(A,O,N){return b(A,O,N,S.defaultAbiCoder())}};w=new WeakSet,Vp=function(A){if(A.isArray())return new r.ArrayCoder(de(this,w,Vp).call(this,A.arrayChildren),A.arrayLength,A.name);if(A.isTuple())return new l.TupleCoder(A.components.map(N=>de(this,w,Vp).call(this,N)),A.name);switch(A.baseType){case"address":return new n.AddressCoder(A.name);case"bool":return new i.BooleanCoder(A.name);case"string":return new u.StringCoder(A.name);case"bytes":return new o.BytesCoder(A.name);case"":return new a.NullCoder(A.name)}let O=A.type.match(x);if(O){let N=parseInt(O[2]||"256");return(0,e.assertArgument)(N!==0&&N<=256&&N%8===0,"invalid "+O[1]+" bit length","param",A),new c.NumberCoder(N/8,O[1]==="int",A.name)}if(O=A.type.match(m),O){let N=parseInt(O[1]);return(0,e.assertArgument)(N!==0&&N<=32,"invalid bytes length","param",A),new s.FixedBytesCoder(N,A.name)}(0,e.assertArgument)(!1,"invalid type","type",A.type)};let v=S;return hy.AbiCoder=v,hy}var Xf={},IK;function Tet(){if(IK)return Xf;IK=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.decodeBytes32String=Xf.encodeBytes32String=void 0;const e=Je();function t(r){const i=(0,e.toUtf8Bytes)(r);if(i.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,e.zeroPadBytes)(i,32)}Xf.encodeBytes32String=t;function n(r){const i=(0,e.getBytes)(r,"bytes");if(i.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(i[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let o=31;for(;i[o-1]===0;)o--;return(0,e.toUtf8String)(i.slice(0,o))}return Xf.decodeBytes32String=n,Xf}var Kk={},RK;function _et(){return RK||(RK=1,function(e){var m,x,y,b,v,K8,Q8;Object.defineProperty(e,"__esModule",{value:!0}),e.Interface=e.Indexed=e.ErrorDescription=e.TransactionDescription=e.LogDescription=e.Result=e.checkResultErrors=void 0;const t=ti(),n=Tl(),r=Je(),i=Jde(),o=Wa();Object.defineProperty(e,"checkResultErrors",{enumerable:!0,get:function(){return o.checkResultErrors}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return o.Result}});const s=LM(),a=kl();class c{constructor(A,O,N){Z(this,"fragment");Z(this,"name");Z(this,"signature");Z(this,"topic");Z(this,"args");const R=A.name,_=A.format();(0,r.defineProperties)(this,{fragment:A,name:R,signature:_,topic:O,args:N})}}e.LogDescription=c;class u{constructor(A,O,N,R){Z(this,"fragment");Z(this,"name");Z(this,"args");Z(this,"signature");Z(this,"selector");Z(this,"value");const _=A.name,M=A.format();(0,r.defineProperties)(this,{fragment:A,name:_,args:N,signature:M,selector:O,value:R})}}e.TransactionDescription=u;class l{constructor(A,O,N){Z(this,"fragment");Z(this,"name");Z(this,"args");Z(this,"signature");Z(this,"selector");const R=A.name,_=A.format();(0,r.defineProperties)(this,{fragment:A,name:R,args:N,signature:_,selector:O})}}e.ErrorDescription=l;class d{constructor(A){Z(this,"hash");Z(this,"_isIndexed");(0,r.defineProperties)(this,{hash:A,_isIndexed:!0})}static isIndexed(A){return!!(A&&A._isIndexed)}}e.Indexed=d;const f={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},h={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:I=>`reverted with reason string ${JSON.stringify(I)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:I=>{let A="unknown panic code";return I>=0&&I<=255&&f[I.toString()]&&(A=f[I.toString()]),`reverted with panic code 0x${I.toString(16)} (${A})`}}},S=class S{constructor(A){J(this,v);Z(this,"fragments");Z(this,"deploy");Z(this,"fallback");Z(this,"receive");J(this,m);J(this,x);J(this,y);J(this,b);let O=[];typeof A=="string"?O=JSON.parse(A):O=A,D(this,y,new Map),D(this,m,new Map),D(this,x,new Map);const N=[];for(const M of O)try{N.push(s.Fragment.from(M))}catch(z){console.log("EE",z)}(0,r.defineProperties)(this,{fragments:Object.freeze(N)});let R=null,_=!1;D(this,b,this.getAbiCoder()),this.fragments.forEach((M,z)=>{let F;switch(M.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}(0,r.defineProperties)(this,{deploy:M});return;case"fallback":M.inputs.length===0?_=!0:((0,r.assertArgument)(!R||M.payable!==R.payable,"conflicting fallback fragments",`fragments[${z}]`,M),R=M,_=R.payable);return;case"function":F=C(this,y);break;case"event":F=C(this,x);break;case"error":F=C(this,m);break;default:return}const $=M.format();F.has($)||F.set($,M)}),this.deploy||(0,r.defineProperties)(this,{deploy:s.ConstructorFragment.from("constructor()")}),(0,r.defineProperties)(this,{fallback:R,receive:_})}format(A){const O=A?"minimal":"full";return this.fragments.map(R=>R.format(O))}formatJson(){const A=this.fragments.map(O=>O.format("json"));return JSON.stringify(A.map(O=>JSON.parse(O)))}getAbiCoder(){return i.AbiCoder.defaultAbiCoder()}getFunctionName(A){const O=de(this,v,K8).call(this,A,null,!1);return(0,r.assertArgument)(O,"no matching function","key",A),O.name}hasFunction(A){return!!de(this,v,K8).call(this,A,null,!1)}getFunction(A,O){return de(this,v,K8).call(this,A,O||null,!0)}forEachFunction(A){const O=Array.from(C(this,y).keys());O.sort((N,R)=>N.localeCompare(R));for(let N=0;NN.localeCompare(R));for(let N=0;N1){const _=R.map(M=>JSON.stringify(M.format())).join(", ");(0,r.assertArgument)(!1,`ambiguous error description (i.e. ${_})`,"name",A)}return R[0]}if(A=s.ErrorFragment.from(A).format(),A==="Error(string)")return s.ErrorFragment.from("error Error(string)");if(A==="Panic(uint256)")return s.ErrorFragment.from("error Panic(uint256)");const N=C(this,m).get(A);return N||null}forEachError(A){const O=Array.from(C(this,m).keys());O.sort((N,R)=>N.localeCompare(R));for(let N=0;N_.type==="string"?(0,n.id)(M):_.type==="bytes"?(0,t.keccak256)((0,r.hexlify)(M)):(_.type==="bool"&&typeof M=="boolean"?M=M?"0x01":"0x00":_.type.match(/^u?int/)?M=(0,r.toBeHex)(M):_.type.match(/^bytes/)?M=(0,r.zeroPadBytes)(M,32):_.type==="address"&&C(this,b).encode(["address"],[M]),(0,r.zeroPadValue)((0,r.hexlify)(M),32));for(O.forEach((_,M)=>{const z=A.inputs[M];if(!z.indexed){(0,r.assertArgument)(_==null,"cannot filter non-indexed parameters; must be null","contract."+z.name,_);return}_==null?N.push(null):z.baseType==="array"||z.baseType==="tuple"?(0,r.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+z.name,_):Array.isArray(_)?N.push(_.map(F=>R(z,F))):N.push(R(z,_))});N.length&&N[N.length-1]===null;)N.pop();return N}encodeEventLog(A,O){if(typeof A=="string"){const M=this.getEvent(A);(0,r.assertArgument)(M,"unknown event","eventFragment",A),A=M}const N=[],R=[],_=[];return A.anonymous||N.push(A.topicHash),(0,r.assertArgument)(O.length===A.inputs.length,"event arguments/values mismatch","values",O),A.inputs.forEach((M,z)=>{const F=O[z];if(M.indexed)if(M.type==="string")N.push((0,n.id)(F));else if(M.type==="bytes")N.push((0,t.keccak256)(F));else{if(M.baseType==="tuple"||M.baseType==="array")throw new Error("not implemented");N.push(C(this,b).encode([M.type],[F]))}else R.push(M),_.push(F)}),{data:C(this,b).encode(R,_),topics:N}}decodeEventLog(A,O,N){if(typeof A=="string"){const L=this.getEvent(A);(0,r.assertArgument)(L,"unknown event","eventFragment",A),A=L}if(N!=null&&!A.anonymous){const L=A.topicHash;(0,r.assertArgument)((0,r.isHexString)(N[0],32)&&N[0].toLowerCase()===L,"fragment/topic mismatch","topics[0]",N[0]),N=N.slice(1)}const R=[],_=[],M=[];A.inputs.forEach((L,q)=>{L.indexed?L.type==="string"||L.type==="bytes"||L.baseType==="tuple"||L.baseType==="array"?(R.push(s.ParamType.from({type:"bytes32",name:L.name})),M.push(!0)):(R.push(L),M.push(!1)):(_.push(L),M.push(!1))});const z=N!=null?C(this,b).decode(R,(0,r.concat)(N)):null,F=C(this,b).decode(_,O,!0),$=[],W=[];let G=0,H=0;return A.inputs.forEach((L,q)=>{let V=null;if(L.indexed)if(z==null)V=new d(null);else if(M[q])V=new d(z[H++]);else try{V=z[H++]}catch(P){V=P}else try{V=F[G++]}catch(P){V=P}$.push(V),W.push(L.name||null)}),o.Result.fromItems($,W)}parseTransaction(A){const O=(0,r.getBytes)(A.data,"tx.data"),N=(0,r.getBigInt)(A.value!=null?A.value:0,"tx.value"),R=this.getFunction((0,r.hexlify)(O.slice(0,4)));if(!R)return null;const _=C(this,b).decode(R.inputs,O.slice(4));return new u(R,R.selector,_,N)}parseCallResult(A){throw new Error("@TODO")}parseLog(A){const O=this.getEvent(A.topics[0]);return!O||O.anonymous?null:new c(O,O.topicHash,this.decodeEventLog(O,A.data,A.topics))}parseError(A){const O=(0,r.hexlify)(A),N=this.getError((0,r.dataSlice)(O,0,4));if(!N)return null;const R=C(this,b).decode(N.inputs,(0,r.dataSlice)(O,4));return new l(N,N.selector,R)}static from(A){return A instanceof S?A:typeof A=="string"?new S(JSON.parse(A)):typeof A.format=="function"?new S(A.format("json")):new S(A)}};m=new WeakMap,x=new WeakMap,y=new WeakMap,b=new WeakMap,v=new WeakSet,K8=function(A,O,N){if((0,r.isHexString)(A)){const _=A.toLowerCase();for(const M of C(this,y).values())if(_===M.selector)return M;return null}if(A.indexOf("(")===-1){const _=[];for(const[M,z]of C(this,y))M.split("(")[0]===A&&_.push(z);if(O){const M=O.length>0?O[O.length-1]:null;let z=O.length,F=!0;a.Typed.isTyped(M)&&M.type==="overrides"&&(F=!1,z--);for(let $=_.length-1;$>=0;$--){const W=_[$].inputs.length;W!==z&&(!F||W!==z-1)&&_.splice($,1)}for(let $=_.length-1;$>=0;$--){const W=_[$].inputs;for(let G=0;G=W.length){if(O[G].type==="overrides")continue;_.splice($,1);break}if(O[G].type!==W[G].baseType){_.splice($,1);break}}}}if(_.length===1&&O&&O.length!==_[0].inputs.length){const M=O[O.length-1];(M==null||Array.isArray(M)||typeof M!="object")&&_.splice(0,1)}if(_.length===0)return null;if(_.length>1&&N){const M=_.map(z=>JSON.stringify(z.format())).join(", ");(0,r.assertArgument)(!1,`ambiguous function description (i.e. matches ${M})`,"key",A)}return _[0]}const R=C(this,y).get(s.FunctionFragment.from(A).format());return R||null},Q8=function(A,O,N){if((0,r.isHexString)(A)){const _=A.toLowerCase();for(const M of C(this,x).values())if(_===M.topicHash)return M;return null}if(A.indexOf("(")===-1){const _=[];for(const[M,z]of C(this,x))M.split("(")[0]===A&&_.push(z);if(O){for(let M=_.length-1;M>=0;M--)_[M].inputs.length=0;M--){const z=_[M].inputs;for(let F=0;F1&&N){const M=_.map(z=>JSON.stringify(z.format())).join(", ");(0,r.assertArgument)(!1,`ambiguous event description (i.e. matches ${M})`,"key",A)}return _[0]}const R=C(this,x).get(s.EventFragment.from(A).format());return R||null};let p=S;e.Interface=p}(Kk)),Kk}var NK;function V5(){return NK||(NK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Typed=e.Result=e.TransactionDescription=e.LogDescription=e.ErrorDescription=e.Interface=e.Indexed=e.checkResultErrors=e.StructFragment=e.ParamType=e.NamedFragment=e.FunctionFragment=e.Fragment=e.FallbackFragment=e.EventFragment=e.ErrorFragment=e.ConstructorFragment=e.encodeBytes32String=e.decodeBytes32String=e.AbiCoder=void 0;var t=Jde();Object.defineProperty(e,"AbiCoder",{enumerable:!0,get:function(){return t.AbiCoder}});var n=Tet();Object.defineProperty(e,"decodeBytes32String",{enumerable:!0,get:function(){return n.decodeBytes32String}}),Object.defineProperty(e,"encodeBytes32String",{enumerable:!0,get:function(){return n.encodeBytes32String}});var r=LM();Object.defineProperty(e,"ConstructorFragment",{enumerable:!0,get:function(){return r.ConstructorFragment}}),Object.defineProperty(e,"ErrorFragment",{enumerable:!0,get:function(){return r.ErrorFragment}}),Object.defineProperty(e,"EventFragment",{enumerable:!0,get:function(){return r.EventFragment}}),Object.defineProperty(e,"FallbackFragment",{enumerable:!0,get:function(){return r.FallbackFragment}}),Object.defineProperty(e,"Fragment",{enumerable:!0,get:function(){return r.Fragment}}),Object.defineProperty(e,"FunctionFragment",{enumerable:!0,get:function(){return r.FunctionFragment}}),Object.defineProperty(e,"NamedFragment",{enumerable:!0,get:function(){return r.NamedFragment}}),Object.defineProperty(e,"ParamType",{enumerable:!0,get:function(){return r.ParamType}}),Object.defineProperty(e,"StructFragment",{enumerable:!0,get:function(){return r.StructFragment}});var i=_et();Object.defineProperty(e,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(e,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(e,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(e,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(e,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(e,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return i.Result}});var o=kl();Object.defineProperty(e,"Typed",{enumerable:!0,get:function(){return o.Typed}})}(jk)),jk}var Qk={},ca={},Ti={},OK;function W5(){var m,x,y;if(OK)return Ti;OK=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.TransactionResponse=Ti.TransactionReceipt=Ti.Log=Ti.Block=Ti.copyRequest=Ti.FeeData=void 0;const e=Je(),t=rs(),n=BigInt(0);function r(v){return v??null}function i(v){return v==null?null:v.toString()}class o{constructor(w,E,S){Z(this,"gasPrice");Z(this,"maxFeePerGas");Z(this,"maxPriorityFeePerGas");(0,e.defineProperties)(this,{gasPrice:r(w),maxFeePerGas:r(E),maxPriorityFeePerGas:r(S)})}toJSON(){const{gasPrice:w,maxFeePerGas:E,maxPriorityFeePerGas:S}=this;return{_type:"FeeData",gasPrice:i(w),maxFeePerGas:i(E),maxPriorityFeePerGas:i(S)}}}Ti.FeeData=o;function s(v){const w={};v.to&&(w.to=v.to),v.from&&(w.from=v.from),v.data&&(w.data=(0,e.hexlify)(v.data));const E="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const I of E)!(I in v)||v[I]==null||(w[I]=(0,e.getBigInt)(v[I],`request.${I}`));const S="type,nonce".split(/,/);for(const I of S)!(I in v)||v[I]==null||(w[I]=(0,e.getNumber)(v[I],`request.${I}`));return v.accessList&&(w.accessList=(0,t.accessListify)(v.accessList)),"blockTag"in v&&(w.blockTag=v.blockTag),"enableCcipRead"in v&&(w.enableCcipRead=!!v.enableCcipRead),"customData"in v&&(w.customData=v.customData),w}Ti.copyRequest=s;class a{constructor(w,E){Z(this,"provider");Z(this,"number");Z(this,"hash");Z(this,"timestamp");Z(this,"parentHash");Z(this,"nonce");Z(this,"difficulty");Z(this,"gasLimit");Z(this,"gasUsed");Z(this,"miner");Z(this,"extraData");Z(this,"baseFeePerGas");J(this,m);D(this,m,w.transactions.map(S=>typeof S!="string"?new l(S,E):S)),(0,e.defineProperties)(this,{provider:E,hash:r(w.hash),number:w.number,timestamp:w.timestamp,parentHash:w.parentHash,nonce:w.nonce,difficulty:w.difficulty,gasLimit:w.gasLimit,gasUsed:w.gasUsed,miner:w.miner,extraData:w.extraData,baseFeePerGas:r(w.baseFeePerGas)})}get transactions(){return C(this,m).map(w=>typeof w=="string"?w:w.hash)}get prefetchedTransactions(){const w=C(this,m).slice();return w.length===0?[]:((0,e.assert)(typeof w[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),w)}toJSON(){const{baseFeePerGas:w,difficulty:E,extraData:S,gasLimit:I,gasUsed:A,hash:O,miner:N,nonce:R,number:_,parentHash:M,timestamp:z,transactions:F}=this;return{_type:"Block",baseFeePerGas:i(w),difficulty:i(E),extraData:S,gasLimit:i(I),gasUsed:i(A),hash:O,miner:N,nonce:R,number:_,parentHash:M,timestamp:z,transactions:F}}[Symbol.iterator](){let w=0;const E=this.transactions;return{next:()=>wnew c(I,E))));let S=n;w.effectiveGasPrice!=null?S=w.effectiveGasPrice:w.gasPrice!=null&&(S=w.gasPrice),(0,e.defineProperties)(this,{provider:E,to:w.to,from:w.from,contractAddress:w.contractAddress,hash:w.hash,index:w.index,blockHash:w.blockHash,blockNumber:w.blockNumber,logsBloom:w.logsBloom,gasUsed:w.gasUsed,cumulativeGasUsed:w.cumulativeGasUsed,gasPrice:S,type:w.type,status:w.status,root:w.root})}get logs(){return C(this,x)}toJSON(){const{to:w,from:E,contractAddress:S,hash:I,index:A,blockHash:O,blockNumber:N,logsBloom:R,logs:_,status:M,root:z}=this;return{_type:"TransactionReceipt",blockHash:O,blockNumber:N,contractAddress:S,cumulativeGasUsed:i(this.cumulativeGasUsed),from:E,gasPrice:i(this.gasPrice),gasUsed:i(this.gasUsed),hash:I,index:A,logs:_,logsBloom:R,root:z,status:M,to:w}}get length(){return this.logs.length}[Symbol.iterator](){let w=0;return{next:()=>w{if(N)return null;const{blockNumber:F,nonce:$}=await(0,e.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(${if(F==null||F.status!==0)return F;(0,e.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:F.to,from:F.from,data:""},receipt:F})},M=await this.provider.getTransactionReceipt(this.hash);if(S===0)return _(M);if(M){if(await M.confirmations()>=S)return _(M)}else if(await R(),S===0)return null;return await new Promise((F,$)=>{const W=[],G=()=>{W.forEach(L=>L())};if(W.push(()=>{N=!0}),I>0){const L=setTimeout(()=>{G(),$((0,e.makeError)("wait for transaction timeout","TIMEOUT"))},I);W.push(()=>{clearTimeout(L)})}const H=async L=>{if(await L.confirmations()>=S){G();try{F(_(L))}catch(q){$(q)}}};if(W.push(()=>{this.provider.off(this.hash,H)}),this.provider.on(this.hash,H),A>=0){const L=async()=>{try{await R()}catch(q){if((0,e.isError)(q,"TRANSACTION_REPLACED")){G(),$(q);return}}N||this.provider.once("block",L)};W.push(()=>{this.provider.off("block",L)}),this.provider.once("block",L)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return(0,e.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this)}reorderedEvent(w){return(0,e.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,e.assert)(!w||w.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),f(this,w)}replaceableTransaction(w){(0,e.assertArgument)(Number.isInteger(w)&&w>=0,"invalid startBlock","startBlock",w);const E=new b(this,this.provider);return D(E,y,w),E}};y=new WeakMap;let l=b;Ti.TransactionResponse=l;function d(v){return{orphan:"drop-block",hash:v.hash,number:v.number}}function f(v,w){return{orphan:"reorder-transaction",tx:v,other:w}}function h(v){return{orphan:"drop-transaction",tx:v}}function p(v){return{orphan:"drop-log",log:{transactionHash:v.transactionHash,blockHash:v.blockHash,blockNumber:v.blockNumber,address:v.address,data:v.data,topics:Object.freeze(v.topics.slice()),index:v.index}}}return Ti}var _i={},LK;function Xde(){var c,u;if(LK)return _i;LK=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.ContractEventPayload=_i.ContractUnknownEventPayload=_i.ContractTransactionResponse=_i.ContractTransactionReceipt=_i.UndecodedEventLog=_i.EventLog=void 0;const e=W5(),t=Je();class n extends e.Log{constructor(f,h,p){super(f,f.provider);Z(this,"interface");Z(this,"fragment");Z(this,"args");const m=h.decodeEventLog(p,f.data,f.topics);(0,t.defineProperties)(this,{args:m,fragment:p,interface:h})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}_i.EventLog=n;class r extends e.Log{constructor(f,h){super(f,f.provider);Z(this,"error");(0,t.defineProperties)(this,{error:h})}}_i.UndecodedEventLog=r;class i extends e.TransactionReceipt{constructor(f,h,p){super(p,h);J(this,c);D(this,c,f)}get logs(){return super.logs.map(f=>{const h=f.topics.length?C(this,c).getEvent(f.topics[0]):null;if(h)try{return new n(f,C(this,c),h)}catch(p){return new r(f,p)}return f})}}c=new WeakMap,_i.ContractTransactionReceipt=i;class o extends e.TransactionResponse{constructor(f,h,p){super(p,h);J(this,u);D(this,u,f)}async wait(f){const h=await super.wait(f);return h==null?null:new i(C(this,u),this.provider,h)}}u=new WeakMap,_i.ContractTransactionResponse=o;class s extends t.EventPayload{constructor(f,h,p,m){super(f,h,p);Z(this,"log");(0,t.defineProperties)(this,{log:m})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}_i.ContractUnknownEventPayload=s;class a extends s{constructor(d,f,h,p,m){super(d,f,h,new n(m,d.interface,p));const x=d.interface.decodeEventLog(p,this.log.data,this.log.topics);(0,t.defineProperties)(this,{args:x,fragment:p})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}return _i.ContractEventPayload=a,_i}var BK;function efe(){var W,G;if(BK)return ca;BK=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.Contract=ca.BaseContract=ca.resolveArgs=ca.copyOverrides=void 0;const e=V5(),t=jr(),n=W5(),r=Je(),i=Xde(),o=BigInt(0);function s(L){return L&&typeof L.call=="function"}function a(L){return L&&typeof L.estimateGas=="function"}function c(L){return L&&typeof L.resolveName=="function"}function u(L){return L&&typeof L.sendTransaction=="function"}class l{constructor(q,V,P){J(this,W);Z(this,"fragment");if((0,r.defineProperties)(this,{fragment:V}),V.inputs.lengthP[me]==null?null:ke.walkAsync(P[me],(Be,Le)=>Be==="address"?Array.isArray(Le)?Promise.all(Le.map(Ne=>(0,t.resolveAddress)(Ne,ce))):(0,t.resolveAddress)(Le,ce):Le)));return q.interface.encodeFilterTopics(V,X)}())}getTopicFilter(){return C(this,W)}}W=new WeakMap;function d(L,q){return L==null?null:typeof L[q]=="function"?L:L.provider&&typeof L.provider[q]=="function"?L.provider:null}function f(L){return L==null?null:L.provider||null}async function h(L,q){const V=e.Typed.dereference(L,"overrides");(0,r.assertArgument)(typeof V=="object","invalid overrides parameter","overrides",L);const P=(0,n.copyRequest)(V);return(0,r.assertArgument)(P.to==null||(q||[]).indexOf("to")>=0,"cannot override to","overrides.to",P.to),(0,r.assertArgument)(P.data==null||(q||[]).indexOf("data")>=0,"cannot override data","overrides.data",P.data),P.from&&(P.from=await(0,t.resolveAddress)(P.from)),P}ca.copyOverrides=h;async function p(L,q,V){const P=d(L,"resolveName"),K=c(P)?P:null;return await Promise.all(q.map((ce,X)=>ce.walkAsync(V[X],(ke,me)=>(me=e.Typed.dereference(me,ke),ke==="address"?(0,t.resolveAddress)(me,K):me))))}ca.resolveArgs=p;function m(L){const q=async function(X){const ke=await h(X,["data"]);ke.to=await L.getAddress();const me=L.interface,Re=(0,r.getBigInt)(ke.value||o,"overrides.value")===o,Be=(ke.data||"0x")==="0x";me.fallback&&!me.fallback.payable&&me.receive&&!Be&&!Re&&(0,r.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",X),(0,r.assertArgument)(me.fallback||Be,"cannot send data to receive-only contract","overrides.data",ke.data);const Le=me.receive||me.fallback&&me.fallback.payable;return(0,r.assertArgument)(Le||Re,"cannot send value to non-payable fallback","overrides.value",ke.value),(0,r.assertArgument)(me.fallback||Be,"cannot send data to receive-only contract","overrides.data",ke.data),ke},V=async function(X){const ke=d(L.runner,"call");(0,r.assert)(s(ke),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const me=await q(X);try{return await ke.call(me)}catch(Re){throw(0,r.isCallException)(Re)&&Re.data?L.interface.makeError(Re.data,me):Re}},P=async function(X){const ke=L.runner;(0,r.assert)(u(ke),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const me=await ke.sendTransaction(await q(X)),Re=f(L.runner);return new i.ContractTransactionResponse(L.interface,Re,me)},K=async function(X){const ke=d(L.runner,"estimateGas");return(0,r.assert)(a(ke),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await ke.estimateGas(await q(X))},ce=async X=>await P(X);return(0,r.defineProperties)(ce,{_contract:L,estimateGas:K,populateTransaction:q,send:P,staticCall:V}),ce}function x(L,q){const V=function(...Re){const Be=L.interface.getFunction(q,Re);return(0,r.assert)(Be,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:q,args:Re}}),Be},P=async function(...Re){const Be=V(...Re);let Le={};if(Be.inputs.length+1===Re.length&&(Le=await h(Re.pop())),Be.inputs.length!==Re.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const Ne=await p(L.runner,Be.inputs,Re);return Object.assign({},Le,await(0,r.resolveProperties)({to:L.getAddress(),data:L.interface.encodeFunctionData(Be,Ne)}))},K=async function(...Re){const Be=await ke(...Re);return Be.length===1?Be[0]:Be},ce=async function(...Re){const Be=L.runner;(0,r.assert)(u(Be),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const Le=await Be.sendTransaction(await P(...Re)),Ne=f(L.runner);return new i.ContractTransactionResponse(L.interface,Ne,Le)},X=async function(...Re){const Be=d(L.runner,"estimateGas");return(0,r.assert)(a(Be),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await Be.estimateGas(await P(...Re))},ke=async function(...Re){const Be=d(L.runner,"call");(0,r.assert)(s(Be),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const Le=await P(...Re);let Ne="0x";try{Ne=await Be.call(Le)}catch(re){throw(0,r.isCallException)(re)&&re.data?L.interface.makeError(re.data,Le):re}const Me=V(...Re);return L.interface.decodeFunctionResult(Me,Ne)},me=async(...Re)=>V(...Re).constant?await K(...Re):await ce(...Re);return(0,r.defineProperties)(me,{name:L.interface.getFunctionName(q),_contract:L,_key:q,getFragment:V,estimateGas:X,populateTransaction:P,send:ce,staticCall:K,staticCallResult:ke}),Object.defineProperty(me,"fragment",{configurable:!1,enumerable:!0,get:()=>{const Re=L.interface.getFunction(q);return(0,r.assert)(Re,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:q}}),Re}}),me}function y(L,q){const V=function(...K){const ce=L.interface.getEvent(q,K);return(0,r.assert)(ce,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:q,args:K}}),ce},P=function(...K){return new l(L,V(...K),K)};return(0,r.defineProperties)(P,{name:L.interface.getEventName(q),_contract:L,_key:q,getFragment:V}),Object.defineProperty(P,"fragment",{configurable:!1,enumerable:!0,get:()=>{const K=L.interface.getEvent(q);return(0,r.assert)(K,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:q}}),K}}),P}const b=Symbol.for("_ethersInternal_contract"),v=new WeakMap;function w(L,q){v.set(L[b],q)}function E(L){return v.get(L[b])}function S(L){return L&&typeof L=="object"&&"getTopicFilter"in L&&typeof L.getTopicFilter=="function"&&L.fragment}async function I(L,q){let V,P=null;if(Array.isArray(q)){const ce=function(X){if((0,r.isHexString)(X,32))return X;const ke=L.interface.getEvent(X);return(0,r.assertArgument)(ke,"unknown fragment","name",X),ke.topicHash};V=q.map(X=>X==null?null:Array.isArray(X)?X.map(ce):ce(X))}else q==="*"?V=[null]:typeof q=="string"?(0,r.isHexString)(q,32)?V=[q]:(P=L.interface.getEvent(q),(0,r.assertArgument)(P,"unknown fragment","event",q),V=[P.topicHash]):S(q)?V=await q.getTopicFilter():"fragment"in q?(P=q.fragment,V=[P.topicHash]):(0,r.assertArgument)(!1,"unknown event name","event",q);V=V.map(ce=>{if(ce==null)return null;if(Array.isArray(ce)){const X=Array.from(new Set(ce.map(ke=>ke.toLowerCase())).values());return X.length===1?X[0]:(X.sort(),X)}return ce.toLowerCase()});const K=V.map(ce=>ce==null?"null":Array.isArray(ce)?ce.join("|"):ce).join("&");return{fragment:P,tag:K,topics:V}}async function A(L,q){const{subs:V}=E(L);return V.get((await I(L,q)).tag)||null}async function O(L,q,V){const P=f(L.runner);(0,r.assert)(P,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:q});const{fragment:K,tag:ce,topics:X}=await I(L,V),{addr:ke,subs:me}=E(L);let Re=me.get(ce);if(!Re){const Le={address:ke||L,topics:X},Ne=se=>{let oe=K;if(oe==null)try{oe=L.interface.getEvent(se.topics[0])}catch{}if(oe){const Ce=oe,Fe=K?L.interface.decodeEventLog(K,se.data,se.topics):[];_(L,V,Fe,qe=>new i.ContractEventPayload(L,qe,V,Ce,se))}else _(L,V,[],Ce=>new i.ContractUnknownEventPayload(L,Ce,V,se))};let Me=[];Re={tag:ce,listeners:[],start:()=>{Me.length||Me.push(P.on(Le,Ne))},stop:async()=>{if(Me.length==0)return;let se=Me;Me=[],await Promise.all(se),P.off(Le,Ne)}},me.set(ce,Re)}return Re}let N=Promise.resolve();async function R(L,q,V,P){await N;const K=await A(L,q);if(!K)return!1;const ce=K.listeners.length;return K.listeners=K.listeners.filter(({listener:X,once:ke})=>{const me=Array.from(V);P&&me.push(P(ke?null:X));try{X.call(L,...me)}catch{}return!ke}),K.listeners.length===0&&(K.stop(),E(L).subs.delete(K.tag)),ce>0}async function _(L,q,V,P){try{await N}catch{}const K=R(L,q,V,P);return N=K,await K}const M=["then"];G=b;const H=class H{constructor(q,V,P,K){Z(this,"target");Z(this,"interface");Z(this,"runner");Z(this,"filters");Z(this,G);Z(this,"fallback");(0,r.assertArgument)(typeof q=="string"||(0,t.isAddressable)(q),"invalid value for Contract target","target",q),P==null&&(P=null);const ce=e.Interface.from(V);(0,r.defineProperties)(this,{target:q,runner:P,interface:ce}),Object.defineProperty(this,b,{value:{}});let X,ke=null,me=null;if(K){const Le=f(P);me=new i.ContractTransactionResponse(this.interface,Le,K)}let Re=new Map;if(typeof q=="string")if((0,r.isHexString)(q))ke=q,X=Promise.resolve(q);else{const Le=d(P,"resolveName");if(!c(Le))throw(0,r.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});X=Le.resolveName(q).then(Ne=>{if(Ne==null)throw(0,r.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:q});return E(this).addr=Ne,Ne})}else X=q.getAddress().then(Le=>{if(Le==null)throw new Error("TODO");return E(this).addr=Le,Le});w(this,{addrPromise:X,addr:ke,deployTx:me,subs:Re});const Be=new Proxy({},{get:(Le,Ne,Me)=>{if(typeof Ne=="symbol"||M.indexOf(Ne)>=0)return Reflect.get(Le,Ne,Me);try{return this.getEvent(Ne)}catch(re){if(!(0,r.isError)(re,"INVALID_ARGUMENT")||re.argument!=="key")throw re}},has:(Le,Ne)=>M.indexOf(Ne)>=0?Reflect.has(Le,Ne):Reflect.has(Le,Ne)||this.interface.hasEvent(String(Ne))});return(0,r.defineProperties)(this,{filters:Be}),(0,r.defineProperties)(this,{fallback:ce.receive||ce.fallback?m(this):null}),new Proxy(this,{get:(Le,Ne,Me)=>{if(typeof Ne=="symbol"||Ne in Le||M.indexOf(Ne)>=0)return Reflect.get(Le,Ne,Me);try{return Le.getFunction(Ne)}catch(re){if(!(0,r.isError)(re,"INVALID_ARGUMENT")||re.argument!=="key")throw re}},has:(Le,Ne)=>typeof Ne=="symbol"||Ne in Le||M.indexOf(Ne)>=0?Reflect.has(Le,Ne):Le.interface.hasFunction(Ne)})}connect(q){return new H(this.target,this.interface,q)}attach(q){return new H(q,this.interface,this.runner)}async getAddress(){return await E(this).addrPromise}async getDeployedCode(){const q=f(this.runner);(0,r.assert)(q,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const V=await q.getCode(await this.getAddress());return V==="0x"?null:V}async waitForDeployment(){const q=this.deploymentTransaction();if(q)return await q.wait(),this;if(await this.getDeployedCode()!=null)return this;const P=f(this.runner);return(0,r.assert)(P!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((K,ce)=>{const X=async()=>{try{if(await this.getDeployedCode()!=null)return K(this);P.once("block",X)}catch(ke){ce(ke)}};X()})}deploymentTransaction(){return E(this).deployTx}getFunction(q){return typeof q!="string"&&(q=q.format()),x(this,q)}getEvent(q){return typeof q!="string"&&(q=q.format()),y(this,q)}async queryTransaction(q){throw new Error("@TODO")}async queryFilter(q,V,P){V==null&&(V=0),P==null&&(P="latest");const{addr:K,addrPromise:ce}=E(this),X=K||await ce,{fragment:ke,topics:me}=await I(this,q),Re={address:X,topics:me,fromBlock:V,toBlock:P},Be=f(this.runner);return(0,r.assert)(Be,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await Be.getLogs(Re)).map(Le=>{let Ne=ke;if(Ne==null)try{Ne=this.interface.getEvent(Le.topics[0])}catch{}if(Ne)try{return new i.EventLog(Le,this.interface,Ne)}catch(Me){return new i.UndecodedEventLog(Le,Me)}return new n.Log(Le,Be)})}async on(q,V){const P=await O(this,"on",q);return P.listeners.push({listener:V,once:!1}),P.start(),this}async once(q,V){const P=await O(this,"once",q);return P.listeners.push({listener:V,once:!0}),P.start(),this}async emit(q,...V){return await _(this,q,V,null)}async listenerCount(q){if(q){const K=await A(this,q);return K?K.listeners.length:0}const{subs:V}=E(this);let P=0;for(const{listeners:K}of V.values())P+=K.length;return P}async listeners(q){if(q){const K=await A(this,q);return K?K.listeners.map(({listener:ce})=>ce):[]}const{subs:V}=E(this);let P=[];for(const{listeners:K}of V.values())P=P.concat(K.map(({listener:ce})=>ce));return P}async off(q,V){const P=await A(this,q);if(!P)return this;if(V){const K=P.listeners.map(({listener:ce})=>ce).indexOf(V);K>=0&&P.listeners.splice(K,1)}return(V==null||P.listeners.length===0)&&(P.stop(),E(this).subs.delete(P.tag)),this}async removeAllListeners(q){if(q){const V=await A(this,q);if(!V)return this;V.stop(),E(this).subs.delete(V.tag)}else{const{subs:V}=E(this);for(const{tag:P,stop:K}of V.values())K(),V.delete(P)}return this}async addListener(q,V){return await this.on(q,V)}async removeListener(q,V){return await this.off(q,V)}static buildClass(q){class V extends H{constructor(K,ce=null){super(K,q,ce)}}return V}static from(q,V,P){return P==null&&(P=null),new this(q,V,P)}};let z=H;ca.BaseContract=z;function F(){return z}class $ extends F(){}return ca.Contract=$,ca}var zy={},MK;function Pet(){if(MK)return zy;MK=1,Object.defineProperty(zy,"__esModule",{value:!0}),zy.ContractFactory=void 0;const e=V5(),t=jr(),n=Je(),r=efe();class i{constructor(s,a,c){Z(this,"interface");Z(this,"bytecode");Z(this,"runner");const u=e.Interface.from(s);a instanceof Uint8Array||(typeof a=="object"&&(a=a.object),a.startsWith("0x")||(a="0x"+a)),a=(0,n.hexlify)((0,n.getBytes)(a)),(0,n.defineProperties)(this,{bytecode:a,interface:u,runner:c||null})}attach(s){return new r.BaseContract(s,this.interface,this.runner)}async getDeployTransaction(...s){let a={};const c=this.interface.deploy;if(c.inputs.length+1===s.length&&(a=await(0,r.copyOverrides)(s.pop())),c.inputs.length!==s.length)throw new Error("incorrect number of arguments to constructor");const u=await(0,r.resolveArgs)(this.runner,c.inputs,s),l=(0,n.concat)([this.bytecode,this.interface.encodeDeploy(u)]);return Object.assign({},a,{data:l})}async deploy(...s){const a=await this.getDeployTransaction(...s);(0,n.assert)(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await this.runner.sendTransaction(a),u=(0,t.getCreateAddress)(c);return new r.BaseContract(u,this.interface,this.runner,c)}connect(s){return new i(this.interface,this.bytecode,s)}static fromSolidity(s,a){(0,n.assertArgument)(s!=null,"bad compiler output","output",s),typeof s=="string"&&(s=JSON.parse(s));const c=s.abi;let u="";return s.bytecode?u=s.bytecode:s.evm&&s.evm.bytecode&&(u=s.evm.bytecode),new this(c,u,a)}}return zy.ContractFactory=i,zy}var DK;function vC(){return DK||(DK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndecodedEventLog=e.EventLog=e.ContractTransactionResponse=e.ContractTransactionReceipt=e.ContractUnknownEventPayload=e.ContractEventPayload=e.ContractFactory=e.Contract=e.BaseContract=void 0;var t=efe();Object.defineProperty(e,"BaseContract",{enumerable:!0,get:function(){return t.BaseContract}}),Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return t.Contract}});var n=Pet();Object.defineProperty(e,"ContractFactory",{enumerable:!0,get:function(){return n.ContractFactory}});var r=Xde();Object.defineProperty(e,"ContractEventPayload",{enumerable:!0,get:function(){return r.ContractEventPayload}}),Object.defineProperty(e,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return r.ContractUnknownEventPayload}}),Object.defineProperty(e,"ContractTransactionReceipt",{enumerable:!0,get:function(){return r.ContractTransactionReceipt}}),Object.defineProperty(e,"ContractTransactionResponse",{enumerable:!0,get:function(){return r.ContractTransactionResponse}}),Object.defineProperty(e,"EventLog",{enumerable:!0,get:function(){return r.EventLog}}),Object.defineProperty(e,"UndecodedEventLog",{enumerable:!0,get:function(){return r.UndecodedEventLog}})}(Qk)),Qk}var Yk={},e0={},cu={},jK;function nfe(){var f,h,p,Wp,x,tfe;if(jK)return cu;jK=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.EnsResolver=cu.BasicMulticoinProviderPlugin=cu.MulticoinProviderPlugin=void 0;const e=jr(),t=H5(),n=vC(),r=Tl(),i=Je();function o(v){return v.match(/^ipfs:\/\/ipfs\//i)?v=v.substring(12):v.match(/^ipfs:\/\//i)?v=v.substring(7):(0,i.assertArgument)(!1,"unsupported IPFS format","link",v),`https://gateway.ipfs.io/ipfs/${v}`}class s{constructor(w){Z(this,"name");(0,i.defineProperties)(this,{name:w})}connect(w){return this}supportsCoinType(w){return!1}async encodeAddress(w,E){throw new Error("unsupported coin")}async decodeAddress(w,E){throw new Error("unsupported coin")}}cu.MulticoinProviderPlugin=s;const a="org.ethers.plugins.provider.BasicMulticoin";class c extends s{constructor(){super(a)}}cu.BasicMulticoinProviderPlugin=c;const u=new RegExp("^(ipfs)://(.*)$","i"),l=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),u,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],b=class b{constructor(w,E,S){J(this,p);Z(this,"provider");Z(this,"address");Z(this,"name");J(this,f);J(this,h);(0,i.defineProperties)(this,{provider:w,address:E,name:S}),D(this,f,null),D(this,h,new n.Contract(E,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],w))}async supportsWildcard(){return C(this,f)==null&&D(this,f,(async()=>{try{return await C(this,h).supportsInterface("0x9061b923")}catch(w){if((0,i.isError)(w,"CALL_EXCEPTION"))return!1;throw D(this,f,null),w}})()),await C(this,f)}async getAddress(w){if(w==null&&(w=60),w===60)try{const A=await de(this,p,Wp).call(this,"addr(bytes32)");return A==null||A===t.ZeroAddress?null:A}catch(A){if((0,i.isError)(A,"CALL_EXCEPTION"))return null;throw A}if(w>=0&&w<2147483648){let A=w+2147483648;const O=await de(this,p,Wp).call(this,"addr(bytes32,uint)",[A]);if((0,i.isHexString)(O,20))return(0,e.getAddress)(O)}let E=null;for(const A of this.provider.plugins)if(A instanceof s&&A.supportsCoinType(w)){E=A;break}if(E==null)return null;const S=await de(this,p,Wp).call(this,"addr(bytes32,uint)",[w]);if(S==null||S==="0x")return null;const I=await E.decodeAddress(w,S);if(I!=null)return I;(0,i.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${w})`,info:{coinType:w,data:S}})}async getText(w){const E=await de(this,p,Wp).call(this,"text(bytes32,string)",[w]);return E==null||E==="0x"?null:E}async getContentHash(){const w=await de(this,p,Wp).call(this,"contenthash(bytes32)");if(w==null||w==="0x")return null;const E=w.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(E){const I=E[1]==="e3010170"?"ipfs":"ipns",A=parseInt(E[4],16);if(E[5].length===A*2)return`${I}://${(0,i.encodeBase58)("0x"+E[2])}`}const S=w.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(S&&S[1].length===64)return`bzz://${S[1]}`;(0,i.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:w}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const w=[{type:"name",value:this.name}];try{const E=await this.getText("avatar");if(E==null)return w.push({type:"!avatar",value:""}),{url:null,linkage:w};w.push({type:"avatar",value:E});for(let S=0;S{if(!Array.isArray(S))throw new Error("not an array");return S.map(I=>E(I))}}xn.arrayOf=s;function a(E,S){return I=>{const A={};for(const O in E){let N=O;if(S&&O in S&&!(N in I)){for(const R of S[O])if(R in I){N=R;break}}try{const R=E[O](I[N]);R!==void 0&&(A[O]=R)}catch(R){const _=R instanceof Error?R.message:"not-an-error";(0,r.assert)(!1,`invalid value for value.${O} (${_})`,"BAD_DATA",{value:I})}}return A}}xn.object=a;function c(E){switch(E){case!0:case"true":return!0;case!1:case"false":return!1}(0,r.assertArgument)(!1,`invalid boolean; ${JSON.stringify(E)}`,"value",E)}xn.formatBoolean=c;function u(E){return(0,r.assertArgument)((0,r.isHexString)(E,!0),"invalid data","value",E),E}xn.formatData=u;function l(E){return(0,r.assertArgument)((0,r.isHexString)(E,32),"invalid hash","value",E),E}xn.formatHash=l;function d(E){if(!(0,r.isHexString)(E))throw new Error("invalid uint256");return(0,r.zeroPadValue)(E,32)}xn.formatUint256=d;const f=a({address:e.getAddress,blockHash:l,blockNumber:r.getNumber,data:u,index:r.getNumber,removed:o(c,!1),topics:s(l),transactionHash:l,transactionIndex:r.getNumber},{index:["logIndex"]});function h(E){return f(E)}xn.formatLog=h;const p=a({hash:o(l),parentHash:l,number:r.getNumber,timestamp:r.getNumber,nonce:o(u),difficulty:r.getBigInt,gasLimit:r.getBigInt,gasUsed:r.getBigInt,miner:o(e.getAddress),extraData:u,baseFeePerGas:o(r.getBigInt)});function m(E){const S=p(E);return S.transactions=E.transactions.map(I=>typeof I=="string"?I:w(I)),S}xn.formatBlock=m;const x=a({transactionIndex:r.getNumber,blockNumber:r.getNumber,transactionHash:l,address:e.getAddress,topics:s(l),data:u,index:r.getNumber,blockHash:l},{index:["logIndex"]});function y(E){return x(E)}xn.formatReceiptLog=y;const b=a({to:o(e.getAddress,null),from:o(e.getAddress,null),contractAddress:o(e.getAddress,null),index:r.getNumber,root:o(r.hexlify),gasUsed:r.getBigInt,logsBloom:o(u),blockHash:l,hash:l,logs:s(y),blockNumber:r.getNumber,cumulativeGasUsed:r.getBigInt,effectiveGasPrice:o(r.getBigInt),status:o(r.getNumber),type:o(r.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(E){return b(E)}xn.formatTransactionReceipt=v;function w(E){E.to&&(0,r.getBigInt)(E.to)===i&&(E.to="0x0000000000000000000000000000000000000000");const S=a({hash:l,type:I=>I==="0x"||I==null?0:(0,r.getNumber)(I),accessList:o(n.accessListify,null),blockHash:o(l,null),blockNumber:o(r.getNumber,null),transactionIndex:o(r.getNumber,null),from:e.getAddress,gasPrice:o(r.getBigInt),maxPriorityFeePerGas:o(r.getBigInt),maxFeePerGas:o(r.getBigInt),gasLimit:r.getBigInt,to:o(e.getAddress,null),value:r.getBigInt,nonce:r.getNumber,data:u,creates:o(e.getAddress,null),chainId:o(r.getBigInt,null)},{data:["input"],gasLimit:["gas"]})(E);if(S.to==null&&S.creates==null&&(S.creates=(0,e.getCreateAddress)(S)),(E.type===1||E.type===2)&&E.accessList==null&&(S.accessList=[]),E.signature?S.signature=t.Signature.from(E.signature):S.signature=t.Signature.from(E),S.chainId==null){const I=S.signature.legacyChainId;I!=null&&(S.chainId=I)}return S.blockHash&&(0,r.getBigInt)(S.blockHash)===i&&(S.blockHash=null),S}return xn.formatTransactionResponse=w,xn}var $y={},Co={},UK;function BM(){var c,l,d;if(UK)return Co;UK=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.FetchUrlFeeDataNetworkPlugin=Co.FeeDataNetworkPlugin=Co.EnsPlugin=Co.GasCostPlugin=Co.NetworkPlugin=void 0;const e=op(),t=Je(),n="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class r{constructor(h){Z(this,"name");(0,e.defineProperties)(this,{name:h})}clone(){return new r(this.name)}}Co.NetworkPlugin=r;class i extends r{constructor(p,m){p==null&&(p=0);super(`org.ethers.network.plugins.GasCost#${p||0}`);Z(this,"effectiveBlock");Z(this,"txBase");Z(this,"txCreate");Z(this,"txDataZero");Z(this,"txDataNonzero");Z(this,"txAccessListStorageKey");Z(this,"txAccessListAddress");const x={effectiveBlock:p};function y(b,v){let w=(m||{})[b];w==null&&(w=v),(0,t.assertArgument)(typeof w=="number",`invalud value for ${b}`,"costs",m),x[b]=w}y("txBase",21e3),y("txCreate",32e3),y("txDataZero",4),y("txDataNonzero",16),y("txAccessListStorageKey",1900),y("txAccessListAddress",2400),(0,e.defineProperties)(this,x)}clone(){return new i(this.effectiveBlock,this)}}Co.GasCostPlugin=i;class o extends r{constructor(p,m){super("org.ethers.plugins.network.Ens");Z(this,"address");Z(this,"targetNetwork");(0,e.defineProperties)(this,{address:p||n,targetNetwork:m??1})}clone(){return new o(this.address,this.targetNetwork)}}Co.EnsPlugin=o;const u=class u extends r{constructor(p){super("org.ethers.plugins.network.FeeData");J(this,c);D(this,c,p)}get feeDataFunc(){return C(this,c)}async getFeeData(p){return await C(this,c).call(this,p)}clone(){return new u(C(this,c))}};c=new WeakMap;let s=u;Co.FeeDataNetworkPlugin=s;class a extends r{constructor(p,m){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");J(this,l);J(this,d);D(this,l,p),D(this,d,m)}get url(){return C(this,l)}get processFunc(){return C(this,d)}clone(){return this}}return l=new WeakMap,d=new WeakMap,Co.FetchUrlFeeDataNetworkPlugin=a,Co}var zK;function Zs(){var l,d,f;if(zK)return $y;zK=1,Object.defineProperty($y,"__esModule",{value:!0}),$y.Network=void 0;const e=rs(),t=Je(),n=BM(),r=new Map,h=class h{constructor(m,x){J(this,l);J(this,d);J(this,f);D(this,l,m),D(this,d,(0,t.getBigInt)(x)),D(this,f,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return C(this,l)}set name(m){D(this,l,m)}get chainId(){return C(this,d)}set chainId(m){D(this,d,(0,t.getBigInt)(m,"chainId"))}matches(m){if(m==null)return!1;if(typeof m=="string"){try{return this.chainId===(0,t.getBigInt)(m)}catch{}return this.name===m}if(typeof m=="number"||typeof m=="bigint"){try{return this.chainId===(0,t.getBigInt)(m)}catch{}return!1}if(typeof m=="object"){if(m.chainId!=null){try{return this.chainId===(0,t.getBigInt)(m.chainId)}catch{}return!1}return m.name!=null?this.name===m.name:!1}return!1}get plugins(){return Array.from(C(this,f).values())}attachPlugin(m){if(C(this,f).get(m.name))throw new Error(`cannot replace existing plugin: ${m.name} `);return C(this,f).set(m.name,m.clone()),this}getPlugin(m){return C(this,f).get(m)||null}getPlugins(m){return this.plugins.filter(x=>x.name.split("#")[0]===m)}clone(){const m=new h(this.name,this.chainId);return this.plugins.forEach(x=>{m.attachPlugin(x.clone())}),m}computeIntrinsicGas(m){const x=this.getPlugin("org.ethers.plugins.network.GasCost")||new n.GasCostPlugin;let y=x.txBase;if(m.to==null&&(y+=x.txCreate),m.data)for(let b=2;b9){let b=BigInt(y[1].substring(0,9));y[1].substring(9).match(/^0+$/)||b++,y[1]=b.toString()}return BigInt(y[0]+y[1])}function s(p){return new n.FetchUrlFeeDataNetworkPlugin(p,async(m,x,y)=>{y.setHeader("User-Agent","ethers");let b;try{b=await y.send();const v=b.bodyJson.standard;return{maxFeePerGas:o(v.maxFee,9),maxPriorityFeePerGas:o(v.maxPriorityFee,9)}}catch(v){(0,t.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(y.url)})`,"SERVER_ERROR",{request:y,response:b,error:v})}})}function a(p){return new n.FetchUrlFeeDataNetworkPlugin("data:",async(m,x,y)=>{const b=await m();if(b.maxFeePerGas==null||b.maxPriorityFeePerGas==null)return b;const v=b.maxFeePerGas-b.maxPriorityFeePerGas;return{gasPrice:b.gasPrice,maxFeePerGas:v+p,maxPriorityFeePerGas:p}})}let c=!1;function u(){if(c)return;c=!0;function p(m,x,y){const b=function(){const v=new i(m,x);return y.ensNetwork!=null&&v.attachPlugin(new n.EnsPlugin(null,y.ensNetwork)),v.attachPlugin(new n.GasCostPlugin),(y.plugins||[]).forEach(w=>{v.attachPlugin(w)}),v};i.register(m,b),i.register(x,b),y.altNames&&y.altNames.forEach(v=>{i.register(v,b)})}p("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),p("ropsten",3,{ensNetwork:3}),p("rinkeby",4,{ensNetwork:4}),p("goerli",5,{ensNetwork:5}),p("kovan",42,{ensNetwork:42}),p("sepolia",11155111,{}),p("classic",61,{}),p("classicKotti",6,{}),p("arbitrum",42161,{ensNetwork:1}),p("arbitrum-goerli",421613,{}),p("bnb",56,{ensNetwork:1}),p("bnbt",97,{}),p("linea",59144,{ensNetwork:1}),p("linea-goerli",59140,{}),p("matic",137,{ensNetwork:1,plugins:[s("https://gasstation.polygon.technology/v2")]}),p("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[s("https://gasstation-testnet.polygon.technology/v2")]}),p("optimism",10,{ensNetwork:1,plugins:[a(BigInt("1000000"))]}),p("optimism-goerli",420,{}),p("xdai",100,{ensNetwork:1})}return $y}var Pi={},$K;function MM(){var c,u,l,d,f,Y8,p,m,x,y,b,v,w,E,S,I,A,rfe;if($K)return Pi;$K=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.PollingEventSubscriber=Pi.PollingTransactionSubscriber=Pi.PollingOrphanSubscriber=Pi.OnBlockSubscriber=Pi.PollingBlockSubscriber=Pi.getPollingSubscriber=void 0;const e=Je();function t(N){return JSON.parse(JSON.stringify(N))}function n(N,R){if(R==="block")return new r(N);if((0,e.isHexString)(R,32))return new s(N,R);(0,e.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:R}})}Pi.getPollingSubscriber=n;class r{constructor(R){J(this,f);J(this,c);J(this,u);J(this,l);J(this,d);D(this,c,R),D(this,u,null),D(this,l,4e3),D(this,d,-2)}get pollingInterval(){return C(this,l)}set pollingInterval(R){D(this,l,R)}start(){C(this,u)||(D(this,u,C(this,c)._setTimeout(de(this,f,Y8).bind(this),C(this,l))),de(this,f,Y8).call(this))}stop(){C(this,u)&&(C(this,c)._clearTimeout(C(this,u)),D(this,u,null))}pause(R){this.stop(),R&&D(this,d,-2)}resume(){this.start()}}c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakSet,Y8=async function(){try{const R=await C(this,c).getBlockNumber();if(C(this,d)===-2){D(this,d,R);return}if(R!==C(this,d)){for(let _=C(this,d)+1;_<=R;_++){if(C(this,u)==null)return;await C(this,c).emit("block",_)}D(this,d,R)}}catch{}C(this,u)!=null&&D(this,u,C(this,c)._setTimeout(de(this,f,Y8).bind(this),C(this,l)))},Pi.PollingBlockSubscriber=r;class i{constructor(R){J(this,p);J(this,m);J(this,x);D(this,p,R),D(this,x,!1),D(this,m,_=>{this._poll(_,C(this,p))})}async _poll(R,_){throw new Error("sub-classes must override this")}start(){C(this,x)||(D(this,x,!0),C(this,m).call(this,-2),C(this,p).on("block",C(this,m)))}stop(){C(this,x)&&(D(this,x,!1),C(this,p).off("block",C(this,m)))}pause(R){this.stop()}resume(){this.start()}}p=new WeakMap,m=new WeakMap,x=new WeakMap,Pi.OnBlockSubscriber=i;class o extends i{constructor(_,M){super(_);J(this,y);D(this,y,t(M))}async _poll(_,M){throw new Error("@TODO")}}y=new WeakMap,Pi.PollingOrphanSubscriber=o;class s extends i{constructor(_,M){super(_);J(this,b);D(this,b,M)}async _poll(_,M){const z=await M.getTransactionReceipt(C(this,b));z&&M.emit(C(this,b),z)}}b=new WeakMap,Pi.PollingTransactionSubscriber=s;class a{constructor(R,_){J(this,A);J(this,v);J(this,w);J(this,E);J(this,S);J(this,I);D(this,v,R),D(this,w,t(_)),D(this,E,de(this,A,rfe).bind(this)),D(this,S,!1),D(this,I,-2)}start(){C(this,S)||(D(this,S,!0),C(this,I)===-2&&C(this,v).getBlockNumber().then(R=>{D(this,I,R)}),C(this,v).on("block",C(this,E)))}stop(){C(this,S)&&(D(this,S,!1),C(this,v).off("block",C(this,E)))}pause(R){this.stop(),R&&D(this,I,-2)}resume(){this.start()}}return v=new WeakMap,w=new WeakMap,E=new WeakMap,S=new WeakMap,I=new WeakMap,A=new WeakSet,rfe=async function(R){if(C(this,I)===-2)return;const _=t(C(this,w));_.fromBlock=C(this,I)+1,_.toBlock=R;const M=await C(this,v).getLogs(_);if(M.length===0){C(this,I){if(oe==null)return"null";if(typeof oe=="bigint")return`bigint:${oe.toString()}`;if(typeof oe=="string")return oe.toLowerCase();if(typeof oe=="object"&&!Array.isArray(oe)){const Ce=Object.keys(oe);return Ce.sort(),Ce.reduce((Fe,qe)=>(Fe[qe]=oe[qe],Fe),{})}return oe})}class m{constructor(Q){Z(this,"name");(0,o.defineProperties)(this,{name:Q})}start(){}stop(){}pause(Q){}resume(){}}e0.UnmanagedSubscriber=m;function x(re){return JSON.parse(JSON.stringify(re))}function y(re){return re=Array.from(new Set(re).values()),re.sort(),re}async function b(re,Q){if(re==null)throw new Error("invalid event");if(Array.isArray(re)&&(re={topics:re}),typeof re=="string")switch(re){case"block":case"pending":case"debug":case"error":case"network":return{type:re,tag:re}}if((0,o.isHexString)(re,32)){const se=re.toLowerCase();return{type:"transaction",tag:p("tx",{hash:se}),hash:se}}if(re.orphan){const se=re;return{type:"orphan",tag:p("orphan",se),filter:x(se)}}if(re.address||re.topics){const se=re,oe={topics:(se.topics||[]).map(Ce=>Ce==null?null:Array.isArray(Ce)?y(Ce.map(Fe=>Fe.toLowerCase())):Ce.toLowerCase())};if(se.address){const Ce=[],Fe=[],qe=Ge=>{(0,o.isHexString)(Ge)?Ce.push(Ge):Fe.push((async()=>{Ce.push(await(0,e.resolveAddress)(Ge,Q))})())};Array.isArray(se.address)?se.address.forEach(qe):qe(se.address),Fe.length&&await Promise.all(Fe),oe.address=y(Ce.map(Ge=>Ge.toLowerCase()))}return{filter:oe,tag:p("event",oe),type:"event"}}(0,o.assertArgument)(!1,"unknown ProviderEvent","event",re)}function v(){return new Date().getTime()}const w={cacheTimeout:250,pollingInterval:4e3};class E{constructor(Q,se){J(this,X);J(this,z);J(this,F);J(this,$);J(this,W);J(this,G);J(this,H);J(this,L);J(this,q);J(this,V);J(this,P);J(this,K);J(this,ce);if(D(this,ce,Object.assign({},w,se||{})),Q==="any")D(this,H,!0),D(this,G,null);else if(Q){const oe=c.Network.from(Q);D(this,H,!1),D(this,G,Promise.resolve(oe)),setTimeout(()=>{this.emit("network",oe,null)},0)}else D(this,H,!1),D(this,G,null);D(this,q,-1),D(this,L,new Map),D(this,z,new Map),D(this,F,new Map),D(this,$,null),D(this,W,!1),D(this,V,1),D(this,P,new Map),D(this,K,!1)}get pollingInterval(){return C(this,ce).pollingInterval}get provider(){return this}get plugins(){return Array.from(C(this,F).values())}attachPlugin(Q){if(C(this,F).get(Q.name))throw new Error(`cannot replace existing plugin: ${Q.name} `);return C(this,F).set(Q.name,Q.connect(this)),this}getPlugin(Q){return C(this,F).get(Q)||null}get disableCcipRead(){return C(this,K)}set disableCcipRead(Q){D(this,K,!!Q)}async ccipReadFetch(Q,se,oe){if(this.disableCcipRead||oe.length===0||Q.to==null)return null;const Ce=Q.to.toLowerCase(),Fe=se.toLowerCase(),qe=[];for(let Ge=0;Ge=500,`response not found during CCIP fetch: ${ve}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:Q,info:{url:Ie,errorMessage:ve}}),qe.push(ve)}(0,o.assert)(!1,`error encountered during CCIP fetch: ${qe.map(Ge=>JSON.stringify(Ge)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:Q,info:{urls:oe,errorMessages:qe}})}_wrapBlock(Q,se){return new u.Block((0,a.formatBlock)(Q),this)}_wrapLog(Q,se){return new u.Log((0,a.formatLog)(Q),this)}_wrapTransactionReceipt(Q,se){return new u.TransactionReceipt((0,a.formatTransactionReceipt)(Q),this)}_wrapTransactionResponse(Q,se){return new u.TransactionResponse((0,a.formatTransactionResponse)(Q),this)}_detectNetwork(){(0,o.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(Q){(0,o.assert)(!1,`unsupported method: ${Q.method}`,"UNSUPPORTED_OPERATION",{operation:Q.method,info:Q})}async getBlockNumber(){const Q=(0,o.getNumber)(await de(this,X,vs).call(this,{method:"getBlockNumber"}),"%response");return C(this,q)>=0&&D(this,q,Q),Q}_getAddress(Q){return(0,e.resolveAddress)(Q,this)}_getBlockTag(Q){if(Q==null)return"latest";switch(Q){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return Q}if((0,o.isHexString)(Q))return(0,o.isHexString)(Q,32)?Q:(0,o.toQuantity)(Q);if(typeof Q=="bigint"&&(Q=(0,o.getNumber)(Q,"blockTag")),typeof Q=="number")return Q>=0?(0,o.toQuantity)(Q):C(this,q)>=0?(0,o.toQuantity)(C(this,q)+Q):this.getBlockNumber().then(se=>(0,o.toQuantity)(se+Q));(0,o.assertArgument)(!1,"invalid blockTag","blockTag",Q)}_getFilter(Q){const se=(Q.topics||[]).map(Ie=>Ie==null?null:Array.isArray(Ie)?y(Ie.map(ie=>ie.toLowerCase())):Ie.toLowerCase()),oe="blockHash"in Q?Q.blockHash:void 0,Ce=(Ie,ie,te)=>{let ve;switch(Ie.length){case 0:break;case 1:ve=Ie[0];break;default:Ie.sort(),ve=Ie}if(oe&&(ie!=null||te!=null))throw new Error("invalid filter");const fe={};return ve&&(fe.address=ve),se.length&&(fe.topics=se),ie&&(fe.fromBlock=ie),te&&(fe.toBlock=te),oe&&(fe.blockHash=oe),fe};let Fe=[];if(Q.address)if(Array.isArray(Q.address))for(const Ie of Q.address)Fe.push(this._getAddress(Ie));else Fe.push(this._getAddress(Q.address));let qe;"fromBlock"in Q&&(qe=this._getBlockTag(Q.fromBlock));let Ge;return"toBlock"in Q&&(Ge=this._getBlockTag(Q.toBlock)),Fe.filter(Ie=>typeof Ie!="string").length||qe!=null&&typeof qe!="string"||Ge!=null&&typeof Ge!="string"?Promise.all([Promise.all(Fe),qe,Ge]).then(Ie=>Ce(Ie[0],Ie[1],Ie[2])):Ce(Fe,qe,Ge)}_getTransactionRequest(Q){const se=(0,u.copyRequest)(Q),oe=[];if(["to","from"].forEach(Ce=>{if(se[Ce]==null)return;const Fe=(0,e.resolveAddress)(se[Ce]);h(Fe)?oe.push(async function(){se[Ce]=await Fe}()):se[Ce]=Fe}),se.blockTag!=null){const Ce=this._getBlockTag(se.blockTag);h(Ce)?oe.push(async function(){se.blockTag=await Ce}()):se.blockTag=Ce}return oe.length?async function(){return await Promise.all(oe),se}():se}async getNetwork(){if(C(this,G)==null){const Ce=this._detectNetwork().then(Fe=>(this.emit("network",Fe,null),Fe),Fe=>{throw C(this,G)===Ce&&D(this,G,null),Fe});return D(this,G,Ce),(await Ce).clone()}const Q=C(this,G),[se,oe]=await Promise.all([Q,this._detectNetwork()]);return se.chainId!==oe.chainId&&(C(this,H)?(this.emit("network",oe,se),C(this,G)===Q&&D(this,G,Promise.resolve(oe))):(0,o.assert)(!1,`network changed: ${se.chainId} => ${oe.chainId} `,"NETWORK_ERROR",{event:"changed"})),se.clone()}async getFeeData(){const Q=await this.getNetwork(),se=async()=>{const{_block:Ce,gasPrice:Fe}=await(0,o.resolveProperties)({_block:de(this,X,zR).call(this,"latest",!1),gasPrice:(async()=>{try{const ie=await de(this,X,vs).call(this,{method:"getGasPrice"});return(0,o.getBigInt)(ie,"%response")}catch{}return null})()});let qe=null,Ge=null;const Ie=this._wrapBlock(Ce,Q);return Ie&&Ie.baseFeePerGas&&(Ge=BigInt("1000000000"),qe=Ie.baseFeePerGas*d+Ge),new u.FeeData(Fe,qe,Ge)},oe=Q.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(oe){const Ce=new o.FetchRequest(oe.url),Fe=await oe.processFunc(se,this,Ce);return new u.FeeData(Fe.gasPrice,Fe.maxFeePerGas,Fe.maxPriorityFeePerGas)}return await se()}async estimateGas(Q){let se=this._getTransactionRequest(Q);return h(se)&&(se=await se),(0,o.getBigInt)(await de(this,X,vs).call(this,{method:"estimateGas",transaction:se}),"%response")}async call(Q){const{tx:se,blockTag:oe}=await(0,o.resolveProperties)({tx:this._getTransactionRequest(Q),blockTag:this._getBlockTag(Q.blockTag)});return await de(this,X,UR).call(this,de(this,X,FR).call(this,se,oe,Q.enableCcipRead?0:-1))}async getBalance(Q,se){return(0,o.getBigInt)(await de(this,X,Kb).call(this,{method:"getBalance"},Q,se),"%response")}async getTransactionCount(Q,se){return(0,o.getNumber)(await de(this,X,Kb).call(this,{method:"getTransactionCount"},Q,se),"%response")}async getCode(Q,se){return(0,o.hexlify)(await de(this,X,Kb).call(this,{method:"getCode"},Q,se))}async getStorage(Q,se,oe){const Ce=(0,o.getBigInt)(se,"position");return(0,o.hexlify)(await de(this,X,Kb).call(this,{method:"getStorage",position:Ce},Q,oe))}async broadcastTransaction(Q){const{blockNumber:se,hash:oe,network:Ce}=await(0,o.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:Q}),network:this.getNetwork()}),Fe=i.Transaction.from(Q);if(Fe.hash!==oe)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(Fe,Ce).replaceableTransaction(se)}async getBlock(Q,se){const{network:oe,params:Ce}=await(0,o.resolveProperties)({network:this.getNetwork(),params:de(this,X,zR).call(this,Q,!!se)});return Ce==null?null:this._wrapBlock(Ce,oe)}async getTransaction(Q){const{network:se,params:oe}=await(0,o.resolveProperties)({network:this.getNetwork(),params:de(this,X,vs).call(this,{method:"getTransaction",hash:Q})});return oe==null?null:this._wrapTransactionResponse(oe,se)}async getTransactionReceipt(Q){const{network:se,params:oe}=await(0,o.resolveProperties)({network:this.getNetwork(),params:de(this,X,vs).call(this,{method:"getTransactionReceipt",hash:Q})});if(oe==null)return null;if(oe.gasPrice==null&&oe.effectiveGasPrice==null){const Ce=await de(this,X,vs).call(this,{method:"getTransaction",hash:Q});if(Ce==null)throw new Error("report this; could not find tx or effectiveGasPrice");oe.effectiveGasPrice=Ce.gasPrice}return this._wrapTransactionReceipt(oe,se)}async getTransactionResult(Q){const{result:se}=await(0,o.resolveProperties)({network:this.getNetwork(),result:de(this,X,vs).call(this,{method:"getTransactionResult",hash:Q})});return se==null?null:(0,o.hexlify)(se)}async getLogs(Q){let se=this._getFilter(Q);h(se)&&(se=await se);const{network:oe,params:Ce}=await(0,o.resolveProperties)({network:this.getNetwork(),params:de(this,X,vs).call(this,{method:"getLogs",filter:se})});return Ce.map(Fe=>this._wrapLog(Fe,oe))}_getProvider(Q){(0,o.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(Q){return await s.EnsResolver.fromName(this,Q)}async getAvatar(Q){const se=await this.getResolver(Q);return se?await se.getAvatar():null}async resolveName(Q){const se=await this.getResolver(Q);return se?await se.getAddress():null}async lookupAddress(Q){Q=(0,e.getAddress)(Q);const se=(0,r.namehash)(Q.substring(2).toLowerCase()+".addr.reverse");try{const oe=await s.EnsResolver.getEnsAddress(this),Fe=await new n.Contract(oe,["function resolver(bytes32) view returns (address)"],this).resolver(se);if(Fe==null||Fe===t.ZeroAddress)return null;const Ge=await new n.Contract(Fe,["function name(bytes32) view returns (string)"],this).name(se);return await this.resolveName(Ge)!==Q?null:Ge}catch(oe){if((0,o.isError)(oe,"BAD_DATA")&&oe.value==="0x"||(0,o.isError)(oe,"CALL_EXCEPTION"))return null;throw oe}return null}async waitForTransaction(Q,se,oe){const Ce=se??1;return Ce===0?this.getTransactionReceipt(Q):new Promise(async(Fe,qe)=>{let Ge=null;const Ie=async ie=>{try{const te=await this.getTransactionReceipt(Q);if(te!=null&&ie-te.blockNumber+1>=Ce){Fe(te),Ge&&(clearTimeout(Ge),Ge=null);return}}catch(te){console.log("EEE",te)}this.once("block",Ie)};oe!=null&&(Ge=setTimeout(()=>{Ge!=null&&(Ge=null,this.off("block",Ie),qe((0,o.makeError)("timeout","TIMEOUT",{reason:"timeout"})))},oe)),Ie(await this.getBlockNumber())})}async waitForBlock(Q){(0,o.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(Q){const se=C(this,P).get(Q);se&&(se.timer&&clearTimeout(se.timer),C(this,P).delete(Q))}_setTimeout(Q,se){se==null&&(se=0);const oe=xo(this,V)._++,Ce=()=>{C(this,P).delete(oe),Q()};if(this.paused)C(this,P).set(oe,{timer:null,func:Ce,time:se});else{const Fe=setTimeout(Ce,se);C(this,P).set(oe,{timer:Fe,func:Ce,time:v()})}return oe}_forEachSubscriber(Q){for(const se of C(this,z).values())Q(se.subscriber)}_getSubscriber(Q){switch(Q.type){case"debug":case"error":case"network":return new m(Q.type);case"block":{const se=new l.PollingBlockSubscriber(this);return se.pollingInterval=this.pollingInterval,se}case"event":return new l.PollingEventSubscriber(this,Q.filter);case"transaction":return new l.PollingTransactionSubscriber(this,Q.hash);case"orphan":return new l.PollingOrphanSubscriber(this,Q.filter)}throw new Error(`unsupported event: ${Q.type}`)}_recoverSubscriber(Q,se){for(const oe of C(this,z).values())if(oe.subscriber===Q){oe.started&&oe.subscriber.stop(),oe.subscriber=se,oe.started&&se.start(),C(this,$)!=null&&se.pause(C(this,$));break}}async on(Q,se){const oe=await de(this,X,q8).call(this,Q);return oe.listeners.push({listener:se,once:!1}),oe.started||(oe.subscriber.start(),oe.started=!0,C(this,$)!=null&&oe.subscriber.pause(C(this,$))),this}async once(Q,se){const oe=await de(this,X,q8).call(this,Q);return oe.listeners.push({listener:se,once:!0}),oe.started||(oe.subscriber.start(),oe.started=!0,C(this,$)!=null&&oe.subscriber.pause(C(this,$))),this}async emit(Q,...se){const oe=await de(this,X,Qb).call(this,Q,se);if(!oe||oe.listeners.length===0)return!1;const Ce=oe.listeners.length;return oe.listeners=oe.listeners.filter(({listener:Fe,once:qe})=>{const Ge=new o.EventPayload(this,qe?null:Fe,Q);try{Fe.call(this,...se,Ge)}catch{}return!qe}),oe.listeners.length===0&&(oe.started&&oe.subscriber.stop(),C(this,z).delete(oe.tag)),Ce>0}async listenerCount(Q){if(Q){const oe=await de(this,X,Qb).call(this,Q);return oe?oe.listeners.length:0}let se=0;for(const{listeners:oe}of C(this,z).values())se+=oe.length;return se}async listeners(Q){if(Q){const oe=await de(this,X,Qb).call(this,Q);return oe?oe.listeners.map(({listener:Ce})=>Ce):[]}let se=[];for(const{listeners:oe}of C(this,z).values())se=se.concat(oe.map(({listener:Ce})=>Ce));return se}async off(Q,se){const oe=await de(this,X,Qb).call(this,Q);if(!oe)return this;if(se){const Ce=oe.listeners.map(({listener:Fe})=>Fe).indexOf(se);Ce>=0&&oe.listeners.splice(Ce,1)}return(!se||oe.listeners.length===0)&&(oe.started&&oe.subscriber.stop(),C(this,z).delete(oe.tag)),this}async removeAllListeners(Q){if(Q){const{tag:se,started:oe,subscriber:Ce}=await de(this,X,q8).call(this,Q);oe&&Ce.stop(),C(this,z).delete(se)}else for(const[se,{started:oe,subscriber:Ce}]of C(this,z))oe&&Ce.stop(),C(this,z).delete(se);return this}async addListener(Q,se){return await this.on(Q,se)}async removeListener(Q,se){return this.off(Q,se)}get destroyed(){return C(this,W)}destroy(){this.removeAllListeners();for(const Q of C(this,P).keys())this._clearTimeout(Q);D(this,W,!0)}get paused(){return C(this,$)!=null}set paused(Q){!!Q!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(Q){if(D(this,q,-1),C(this,$)!=null){if(C(this,$)==!!Q)return;(0,o.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(se=>se.pause(Q)),D(this,$,!!Q);for(const se of C(this,P).values())se.timer&&clearTimeout(se.timer),se.time=v()-se.time}resume(){if(C(this,$)!=null){this._forEachSubscriber(Q=>Q.resume()),D(this,$,null);for(const Q of C(this,P).values()){let se=Q.time;se<0&&(se=0),Q.time=v(),setTimeout(Q.func,se)}}}}z=new WeakMap,F=new WeakMap,$=new WeakMap,W=new WeakMap,G=new WeakMap,H=new WeakMap,L=new WeakMap,q=new WeakMap,V=new WeakMap,P=new WeakMap,K=new WeakMap,ce=new WeakMap,X=new WeakSet,vs=async function(Q){const se=C(this,ce).cacheTimeout;if(se<0)return await this._perform(Q);const oe=p(Q.method,Q);let Ce=C(this,L).get(oe);return Ce||(Ce=this._perform(Q),C(this,L).set(oe,Ce),setTimeout(()=>{C(this,L).get(oe)===Ce&&C(this,L).delete(oe)},se)),await Ce},FR=async function(Q,se,oe){(0,o.assert)(oe=0&&se==="latest"&&Ce.to!=null&&(0,o.dataSlice)(Fe.data,0,4)==="0x556f1830"){const qe=Fe.data,Ge=await(0,e.resolveAddress)(Ce.to,this);let Ie;try{Ie=M((0,o.dataSlice)(Fe.data,4))}catch(ve){(0,o.assert)(!1,ve.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:Ce,info:{data:qe}})}(0,o.assert)(Ie.sender.toLowerCase()===Ge.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:qe,reason:"OffchainLookup",transaction:Ce,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:Ie.errorArgs}});const ie=await this.ccipReadFetch(Ce,Ie.calldata,Ie.urls);(0,o.assert)(ie!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:Ce,info:{data:Fe.data,errorArgs:Ie.errorArgs}});const te={to:Ge,data:(0,o.concat)([Ie.selector,R([ie,Ie.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:te});try{const ve=await de(this,X,FR).call(this,te,se,oe+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},te),result:ve}),ve}catch(ve){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},te),error:ve}),ve}}throw Fe}},UR=async function(Q){const{value:se}=await(0,o.resolveProperties)({network:this.getNetwork(),value:Q});return se},Kb=async function(Q,se,oe){let Ce=this._getAddress(se),Fe=this._getBlockTag(oe);return(typeof Ce!="string"||typeof Fe!="string")&&([Ce,Fe]=await Promise.all([Ce,Fe])),await de(this,X,UR).call(this,de(this,X,vs).call(this,Object.assign(Q,{address:Ce,blockTag:Fe})))},zR=async function(Q,se){if((0,o.isHexString)(Q,32))return await de(this,X,vs).call(this,{method:"getBlock",blockHash:Q,includeTransactions:se});let oe=this._getBlockTag(Q);return typeof oe!="string"&&(oe=await oe),await de(this,X,vs).call(this,{method:"getBlock",blockTag:oe,includeTransactions:se})},Qb=async function(Q,se){let oe=await b(Q,this);return oe.type==="event"&&se&&se.length>0&&se[0].removed===!0&&(oe=await b({orphan:"drop-log",log:se[0]},this)),C(this,z).get(oe.tag)||null},q8=async function(Q){const se=await b(Q,this),oe=se.tag;let Ce=C(this,z).get(oe);return Ce||(Ce={subscriber:this._getSubscriber(se),tag:oe,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},C(this,z).set(oe,Ce)),Ce},e0.AbstractProvider=E;function S(re,Q){try{const se=I(re,Q);if(se)return(0,o.toUtf8String)(se)}catch{}return null}function I(re,Q){if(re==="0x")return null;try{const se=(0,o.getNumber)((0,o.dataSlice)(re,Q,Q+32)),oe=(0,o.getNumber)((0,o.dataSlice)(re,se,se+32));return(0,o.dataSlice)(re,se+32,se+32+oe)}catch{}return null}function A(re){const Q=(0,o.toBeArray)(re);if(Q.length>32)throw new Error("internal; should not happen");const se=new Uint8Array(32);return se.set(Q,32-Q.length),se}function O(re){if(re.length%32===0)return re;const Q=new Uint8Array(Math.ceil(re.length/32)*32);return Q.set(re),Q}const N=new Uint8Array([]);function R(re){const Q=[];let se=0;for(let oe=0;oe=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const se=(0,o.dataSlice)(re,0,32);(0,o.assert)((0,o.dataSlice)(se,0,12)===(0,o.dataSlice)(_,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),Q.sender=(0,o.dataSlice)(se,12);try{const oe=[],Ce=(0,o.getNumber)((0,o.dataSlice)(re,32,64)),Fe=(0,o.getNumber)((0,o.dataSlice)(re,Ce,Ce+32)),qe=(0,o.dataSlice)(re,Ce+32);for(let Ge=0;GeQ[oe]),Q}return e0}var t0={},VK;function DM(){var c,Z8;if(VK)return t0;VK=1,Object.defineProperty(t0,"__esModule",{value:!0}),t0.VoidSigner=t0.AbstractSigner=void 0;const e=jr(),t=rs(),n=Je(),r=W5();function i(d,f){if(d.provider)return d.provider;(0,n.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:f})}async function o(d,f){let h=(0,r.copyRequest)(f);if(h.to!=null&&(h.to=(0,e.resolveAddress)(h.to,d)),h.from!=null){const p=h.from;h.from=Promise.all([d.getAddress(),(0,e.resolveAddress)(p,d)]).then(([m,x])=>((0,n.assertArgument)(m.toLowerCase()===x.toLowerCase(),"transaction from mismatch","tx.from",x),m))}else h.from=d.getAddress();return await(0,n.resolveProperties)(h)}class s{constructor(f){Z(this,"provider");(0,n.defineProperties)(this,{provider:f||null})}async getNonce(f){return i(this,"getTransactionCount").getTransactionCount(await this.getAddress(),f)}async populateCall(f){return await o(this,f)}async populateTransaction(f){const h=i(this,"populateTransaction"),p=await o(this,f);p.nonce==null&&(p.nonce=await this.getNonce("pending")),p.gasLimit==null&&(p.gasLimit=await this.estimateGas(p));const m=await this.provider.getNetwork();if(p.chainId!=null){const y=(0,n.getBigInt)(p.chainId);(0,n.assertArgument)(y===m.chainId,"transaction chainId mismatch","tx.chainId",f.chainId)}else p.chainId=m.chainId;const x=p.maxFeePerGas!=null||p.maxPriorityFeePerGas!=null;if(p.gasPrice!=null&&(p.type===2||x)?(0,n.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",f):(p.type===0||p.type===1)&&x&&(0,n.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",f),(p.type===2||p.type==null)&&p.maxFeePerGas!=null&&p.maxPriorityFeePerGas!=null)p.type=2;else if(p.type===0||p.type===1){const y=await h.getFeeData();(0,n.assert)(y.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),p.gasPrice==null&&(p.gasPrice=y.gasPrice)}else{const y=await h.getFeeData();if(p.type==null)if(y.maxFeePerGas!=null&&y.maxPriorityFeePerGas!=null)if(p.type=2,p.gasPrice!=null){const b=p.gasPrice;delete p.gasPrice,p.maxFeePerGas=b,p.maxPriorityFeePerGas=b}else p.maxFeePerGas==null&&(p.maxFeePerGas=y.maxFeePerGas),p.maxPriorityFeePerGas==null&&(p.maxPriorityFeePerGas=y.maxPriorityFeePerGas);else y.gasPrice!=null?((0,n.assert)(!x,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),p.gasPrice==null&&(p.gasPrice=y.gasPrice),p.type=0):(0,n.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else p.type===2&&(p.maxFeePerGas==null&&(p.maxFeePerGas=y.maxFeePerGas),p.maxPriorityFeePerGas==null&&(p.maxPriorityFeePerGas=y.maxPriorityFeePerGas))}return await(0,n.resolveProperties)(p)}async estimateGas(f){return i(this,"estimateGas").estimateGas(await this.populateCall(f))}async call(f){return i(this,"call").call(await this.populateCall(f))}async resolveName(f){return await i(this,"resolveName").resolveName(f)}async sendTransaction(f){const h=i(this,"sendTransaction"),p=await this.populateTransaction(f);delete p.from;const m=t.Transaction.from(p);return await h.broadcastTransaction(await this.signTransaction(m))}}t0.AbstractSigner=s;const l=class l extends s{constructor(h,p){super(p);J(this,c);Z(this,"address");(0,n.defineProperties)(this,{address:h})}async getAddress(){return this.address}connect(h){return new l(this.address,h)}async signTransaction(h){de(this,c,Z8).call(this,"transactions","signTransaction")}async signMessage(h){de(this,c,Z8).call(this,"messages","signMessage")}async signTypedData(h,p,m){de(this,c,Z8).call(this,"typed-data","signTypedData")}};c=new WeakSet,Z8=function(h,p){(0,n.assert)(!1,`VoidSigner cannot sign ${h}`,"UNSUPPORTED_OPERATION",{operation:p})};let a=l;return t0.VoidSigner=a,t0}var Hy={},WK;function sp(){if(WK)return Hy;WK=1,Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.showThrottleMessage=void 0;const e=new Set;function t(n){e.has(n)||(e.add(n),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${n} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}return Hy.showThrottleMessage=t,Hy}var Vy={},Wy={},ua={},uu={},GK;function Ret(){var s,a,c,u,l,d,f,$R,HR,m;if(GK)return uu;GK=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.FilterIdPendingSubscriber=uu.FilterIdEventSubscriber=uu.FilterIdSubscriber=void 0;const e=Je(),t=MM();function n(x){return JSON.parse(JSON.stringify(x))}class r{constructor(y){J(this,f);J(this,s);J(this,a);J(this,c);J(this,u);J(this,l);J(this,d);D(this,s,y),D(this,a,null),D(this,c,de(this,f,$R).bind(this)),D(this,u,!1),D(this,l,null),D(this,d,!1)}_subscribe(y){throw new Error("subclasses must override this")}_emitResults(y,b){throw new Error("subclasses must override this")}_recover(y){throw new Error("subclasses must override this")}start(){C(this,u)||(D(this,u,!0),de(this,f,$R).call(this,-2))}stop(){C(this,u)&&(D(this,u,!1),D(this,d,!0),de(this,f,HR).call(this),C(this,s).off("block",C(this,c)))}pause(y){y&&de(this,f,HR).call(this),C(this,s).off("block",C(this,c))}resume(){this.start()}}s=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakSet,$R=async function(y){try{C(this,a)==null&&D(this,a,this._subscribe(C(this,s)));let b=null;try{b=await C(this,a)}catch(E){if(!(0,e.isError)(E,"UNSUPPORTED_OPERATION")||E.operation!=="eth_newFilter")throw E}if(b==null){D(this,a,null),C(this,s)._recoverSubscriber(this,this._recover(C(this,s)));return}const v=await C(this,s).getNetwork();if(C(this,l)||D(this,l,v),C(this,l).chainId!==v.chainId)throw new Error("chaid changed");if(C(this,d))return;const w=await C(this,s).send("eth_getFilterChanges",[b]);await this._emitResults(C(this,s),w)}catch(b){console.log("@TODO",b)}C(this,s).once("block",C(this,c))},HR=function(){const y=C(this,a);y&&(D(this,a,null),y.then(b=>{C(this,s).send("eth_uninstallFilter",[b])}))},uu.FilterIdSubscriber=r;class i extends r{constructor(b,v){super(b);J(this,m);D(this,m,n(v))}_recover(b){return new t.PollingEventSubscriber(b,C(this,m))}async _subscribe(b){return await b.send("eth_newFilter",[C(this,m)])}async _emitResults(b,v){for(const w of v)b.emit(C(this,m),b._wrapLog(w,b._network))}}m=new WeakMap,uu.FilterIdEventSubscriber=i;class o extends r{async _subscribe(y){return await y.send("eth_newPendingTransactionFilter",[])}async _emitResults(y,b){for(const v of b)y.emit("pending",v)}}return uu.FilterIdPendingSubscriber=o,uu}var KK;function Kc(){var I,A,O,N,R,_,M,VR,F,$;if(KK)return ua;KK=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.JsonRpcProvider=ua.JsonRpcApiPollingProvider=ua.JsonRpcApiProvider=ua.JsonRpcSigner=void 0;const e=V5(),t=jr(),n=Tl(),r=rs(),i=Je(),o=G5(),s=DM(),a=Zs(),c=Ret(),u=MM(),l="bigint,boolean,function,number,string,symbol".split(/,/g);function d(W){if(W==null||l.indexOf(typeof W)>=0||typeof W.getAddress=="function")return W;if(Array.isArray(W))return W.map(d);if(typeof W=="object")return Object.keys(W).reduce((G,H)=>(G[H]=W[H],G),{});throw new Error(`should not happen: ${W} (${typeof W})`)}function f(W){return new Promise(G=>{setTimeout(G,W)})}function h(W){return W&&W.toLowerCase()}function p(W){return W&&typeof W.pollingInterval=="number"}const m={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class x extends s.AbstractSigner{constructor(H,L){super(H);Z(this,"address");L=(0,t.getAddress)(L),(0,i.defineProperties)(this,{address:L})}connect(H){(0,i.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(H){return await this.populateCall(H)}async sendUncheckedTransaction(H){const L=d(H),q=[];if(L.from){const P=L.from;q.push((async()=>{const K=await(0,t.resolveAddress)(P,this.provider);(0,i.assertArgument)(K!=null&&K.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",H),L.from=K})())}else L.from=this.address;if(L.gasLimit==null&&q.push((async()=>{L.gasLimit=await this.provider.estimateGas({...L,from:this.address})})()),L.to!=null){const P=L.to;q.push((async()=>{L.to=await(0,t.resolveAddress)(P,this.provider)})())}q.length&&await Promise.all(q);const V=this.provider.getRpcTransaction(L);return this.provider.send("eth_sendTransaction",[V])}async sendTransaction(H){const L=await this.provider.getBlockNumber(),q=await this.sendUncheckedTransaction(H);return await new Promise((V,P)=>{const K=[1e3,100],ce=async()=>{const X=await this.provider.getTransaction(q);if(X!=null){V(X.replaceableTransaction(L));return}this.provider._setTimeout(()=>{ce()},K.pop()||4e3)};ce()})}async signTransaction(H){const L=d(H);if(L.from){const V=await(0,t.resolveAddress)(L.from,this.provider);(0,i.assertArgument)(V!=null&&V.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",H),L.from=V}else L.from=this.address;const q=this.provider.getRpcTransaction(L);return await this.provider.send("eth_signTransaction",[q])}async signMessage(H){const L=typeof H=="string"?(0,i.toUtf8Bytes)(H):H;return await this.provider.send("personal_sign",[(0,i.hexlify)(L),this.address.toLowerCase()])}async signTypedData(H,L,q){const V=d(q),P=await n.TypedDataEncoder.resolveNames(H,L,V,async K=>{const ce=await(0,t.resolveAddress)(K);return(0,i.assertArgument)(ce!=null,"TypedData does not support null address","value",K),ce});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(n.TypedDataEncoder.getPayload(P.domain,L,P.value))])}async unlock(H){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),H,null])}async _legacySignMessage(H){const L=typeof H=="string"?(0,i.toUtf8Bytes)(H):H;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,i.hexlify)(L)])}}ua.JsonRpcSigner=x;class y extends o.AbstractProvider{constructor(H,L){super(H,L);J(this,M);J(this,I);J(this,A);J(this,O);J(this,N);J(this,R);J(this,_);D(this,A,1),D(this,I,Object.assign({},m,L||{})),D(this,O,[]),D(this,N,null),D(this,_,null);{let V=null;const P=new Promise(K=>{V=K});D(this,R,{promise:P,resolve:V})}const q=this._getOption("staticNetwork");q&&((0,i.assertArgument)(H==null||q.matches(H),"staticNetwork MUST match network object","options",L),D(this,_,q))}_getOption(H){return C(this,I)[H]}get _network(){return(0,i.assert)(C(this,_),"network is not available yet","NETWORK_ERROR"),C(this,_)}async _perform(H){if(H.method==="call"||H.method==="estimateGas"){let q=H.transaction;if(q&&q.type!=null&&(0,i.getBigInt)(q.type)&&q.maxFeePerGas==null&&q.maxPriorityFeePerGas==null){const V=await this.getFeeData();V.maxFeePerGas==null&&V.maxPriorityFeePerGas==null&&(H=Object.assign({},H,{transaction:Object.assign({},q,{type:void 0})}))}}const L=this.getRpcRequest(H);return L!=null?await this.send(L.method,L.args):super._perform(H)}async _detectNetwork(){const H=this._getOption("staticNetwork");if(H)return H;if(this.ready)return a.Network.from((0,i.getBigInt)(await this.send("eth_chainId",[])));const L={id:xo(this,A)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:L});let q;try{q=(await this._send(L))[0]}catch(V){throw this.emit("debug",{action:"receiveRpcError",error:V}),V}if(this.emit("debug",{action:"receiveRpcResult",result:q}),"result"in q)return a.Network.from((0,i.getBigInt)(q.result));throw this.getRpcError(L,q)}_start(){C(this,R)==null||C(this,R).resolve==null||(C(this,R).resolve(),D(this,R,null),(async()=>{for(;C(this,_)==null&&!this.destroyed;)try{D(this,_,await this._detectNetwork())}catch(H){console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,i.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:H}})),await f(1e3)}de(this,M,VR).call(this)})())}async _waitUntilReady(){if(C(this,R)!=null)return await C(this,R).promise}_getSubscriber(H){return H.type==="pending"?new c.FilterIdPendingSubscriber(this):H.type==="event"?this._getOption("polling")?new u.PollingEventSubscriber(this,H.filter):new c.FilterIdEventSubscriber(this,H.filter):H.type==="orphan"&&H.filter.orphan==="drop-log"?new o.UnmanagedSubscriber("orphan"):super._getSubscriber(H)}get ready(){return C(this,R)==null}getRpcTransaction(H){const L={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(q=>{if(H[q]==null)return;let V=q;q==="gasLimit"&&(V="gas"),L[V]=(0,i.toQuantity)((0,i.getBigInt)(H[q],`tx.${q}`))}),["from","to","data"].forEach(q=>{H[q]!=null&&(L[q]=(0,i.hexlify)(H[q]))}),H.accessList&&(L.accessList=(0,r.accessListify)(H.accessList)),L}getRpcRequest(H){switch(H.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[h(H.address),H.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[h(H.address),H.blockTag]};case"getCode":return{method:"eth_getCode",args:[h(H.address),H.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[h(H.address),"0x"+H.position.toString(16),H.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[H.signedTransaction]};case"getBlock":if("blockTag"in H)return{method:"eth_getBlockByNumber",args:[H.blockTag,!!H.includeTransactions]};if("blockHash"in H)return{method:"eth_getBlockByHash",args:[H.blockHash,!!H.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[H.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[H.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(H.transaction),H.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(H.transaction)]};case"getLogs":return H.filter&&H.filter.address!=null&&(Array.isArray(H.filter.address)?H.filter.address=H.filter.address.map(h):H.filter.address=h(H.filter.address)),{method:"eth_getLogs",args:[H.filter]}}return null}getRpcError(H,L){const{method:q}=H,{error:V}=L;if(q==="eth_estimateGas"&&V.message){const ce=V.message;if(!ce.match(/revert/i)&&ce.match(/insufficient funds/i))return(0,i.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:H.params[0],info:{payload:H,error:V}})}if(q==="eth_call"||q==="eth_estimateGas"){const ce=w(V),X=e.AbiCoder.getBuiltinCallException(q==="eth_call"?"call":"estimateGas",H.params[0],ce?ce.data:null);return X.info={error:V,payload:H},X}const P=JSON.stringify(S(V));if(typeof V.message=="string"&&V.message.match(/user denied|ethers-user-denied/i)){const ce={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,i.makeError)("user rejected action","ACTION_REJECTED",{action:ce[q]||"unknown",reason:"rejected",info:{payload:H,error:V}})}if(q==="eth_sendRawTransaction"||q==="eth_sendTransaction"){const ce=H.params[0];if(P.match(/insufficient funds|base fee exceeds gas limit/i))return(0,i.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:ce,info:{error:V}});if(P.match(/nonce/i)&&P.match(/too low/i))return(0,i.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:ce,info:{error:V}});if(P.match(/replacement transaction/i)&&P.match(/underpriced/i))return(0,i.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:ce,info:{error:V}});if(P.match(/only replay-protected/i))return(0,i.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:q,info:{transaction:ce,info:{error:V}}})}let K=!!P.match(/the method .* does not exist/i);return K||V&&V.details&&V.details.startsWith("Unauthorized method:")&&(K=!0),K?(0,i.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:H.method,info:{error:V,payload:H}}):(0,i.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:V,payload:H})}send(H,L){if(this.destroyed)return Promise.reject((0,i.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:H}));const q=xo(this,A)._++,V=new Promise((P,K)=>{C(this,O).push({resolve:P,reject:K,payload:{method:H,params:L,id:q,jsonrpc:"2.0"}})});return de(this,M,VR).call(this),V}async getSigner(H){H==null&&(H=0);const L=this.send("eth_accounts",[]);if(typeof H=="number"){const V=await L;if(H>=V.length)throw new Error("no such account");return new x(this,V[H])}const{accounts:q}=await(0,i.resolveProperties)({network:this.getNetwork(),accounts:L});H=(0,t.getAddress)(H);for(const V of q)if((0,t.getAddress)(V)===H)return new x(this,H);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(L=>new x(this,L))}destroy(){C(this,N)&&(clearTimeout(C(this,N)),D(this,N,null));for(const{payload:H,reject:L}of C(this,O))L((0,i.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:H.method}));D(this,O,[]),super.destroy()}}I=new WeakMap,A=new WeakMap,O=new WeakMap,N=new WeakMap,R=new WeakMap,_=new WeakMap,M=new WeakSet,VR=function(){if(C(this,N))return;const H=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");D(this,N,setTimeout(()=>{D(this,N,null);const L=C(this,O);for(D(this,O,[]);L.length;){const q=[L.shift()];for(;L.length&&q.length!==C(this,I).batchMaxCount;)if(q.push(L.shift()),JSON.stringify(q.map(P=>P.payload)).length>C(this,I).batchMaxSize){L.unshift(q.pop());break}(async()=>{const V=q.length===1?q[0].payload:q.map(P=>P.payload);this.emit("debug",{action:"sendRpcPayload",payload:V});try{const P=await this._send(V);this.emit("debug",{action:"receiveRpcResult",result:P});for(const{resolve:K,reject:ce,payload:X}of q){if(this.destroyed){ce((0,i.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:X.method}));continue}const ke=P.filter(me=>me.id===X.id)[0];if(ke==null){const me=(0,i.makeError)("missing response for request","BAD_DATA",{value:P,info:{payload:X}});this.emit("error",me),ce(me);continue}if("error"in ke){ce(this.getRpcError(X,ke));continue}K(ke.result)}}catch(P){this.emit("debug",{action:"receiveRpcError",error:P});for(const{reject:K}of q)K(P)}})()}},H))},ua.JsonRpcApiProvider=y;class b extends y{constructor(H,L){super(H,L);J(this,F);D(this,F,4e3)}_getSubscriber(H){const L=super._getSubscriber(H);return p(L)&&(L.pollingInterval=C(this,F)),L}get pollingInterval(){return C(this,F)}set pollingInterval(H){if(!Number.isInteger(H)||H<0)throw new Error("invalid interval");D(this,F,H),this._forEachSubscriber(L=>{p(L)&&(L.pollingInterval=C(this,F))})}}F=new WeakMap,ua.JsonRpcApiPollingProvider=b;class v extends b{constructor(H,L,q){H==null&&(H="http://localhost:8545");super(L,q);J(this,$);typeof H=="string"?D(this,$,new i.FetchRequest(H)):D(this,$,H.clone())}_getConnection(){return C(this,$).clone()}async send(H,L){return await this._start(),await super.send(H,L)}async _send(H){const L=this._getConnection();L.body=JSON.stringify(H),L.setHeader("content-type","application/json");const q=await L.send();q.assertOk();let V=q.bodyJson;return Array.isArray(V)||(V=[V]),V}}$=new WeakMap,ua.JsonRpcProvider=v;function w(W){if(W==null)return null;if(typeof W.message=="string"&&W.message.match(/revert/i)&&(0,i.isHexString)(W.data))return{message:W.message,data:W.data};if(typeof W=="object"){for(const G in W){const H=w(W[G]);if(H)return H}return null}if(typeof W=="string")try{return w(JSON.parse(W))}catch{}return null}function E(W,G){if(W!=null){if(typeof W.message=="string"&&G.push(W.message),typeof W=="object")for(const H in W)E(W[H],G);if(typeof W=="string")try{return E(JSON.parse(W),G)}catch{}}}function S(W){const G=[];return E(W,G),G}return ua}var QK;function ife(){if(QK)return Wy;QK=1,Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.AnkrProvider=void 0;const e=Je(),t=sp(),n=Zs(),r=Kc(),i="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function o(a){switch(a){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"matic":return"rpc.ankr.com/polygon";case"arbitrum":return"rpc.ankr.com/arbitrum"}(0,e.assertArgument)(!1,"unsupported network","network",a)}class s extends r.JsonRpcProvider{constructor(u,l){u==null&&(u="mainnet");const d=n.Network.from(u);l==null&&(l=i);const f={polling:!0,staticNetwork:d},h=s.getRequest(d,l);super(h,d,f);Z(this,"apiKey");(0,e.defineProperties)(this,{apiKey:l})}_getProvider(u){try{return new s(u,this.apiKey)}catch{}return super._getProvider(u)}static getRequest(u,l){l==null&&(l=i);const d=new e.FetchRequest(`https://${o(u.name)}/${l}`);return d.allowGzip=!0,l===i&&(d.retryFunc=async(f,h,p)=>((0,t.showThrottleMessage)("AnkrProvider"),!0)),d}getRpcError(u,l){return u.method==="eth_sendRawTransaction"&&l&&l.error&&l.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(l.error.message="replacement transaction underpriced"),super.getRpcError(u,l)}isCommunityResource(){return this.apiKey===i}}return Wy.AnkrProvider=s,Wy}var Gy={},YK;function ofe(){if(YK)return Gy;YK=1,Object.defineProperty(Gy,"__esModule",{value:!0}),Gy.AlchemyProvider=void 0;const e=Je(),t=sp(),n=Zs(),r=Kc(),i="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function o(a){switch(a){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com"}(0,e.assertArgument)(!1,"unsupported network","network",a)}class s extends r.JsonRpcProvider{constructor(u,l){u==null&&(u="mainnet");const d=n.Network.from(u);l==null&&(l=i);const f=s.getRequest(d,l);super(f,d,{staticNetwork:d});Z(this,"apiKey");(0,e.defineProperties)(this,{apiKey:l})}_getProvider(u){try{return new s(u,this.apiKey)}catch{}return super._getProvider(u)}async _perform(u){if(u.method==="getTransactionResult"){const{trace:l,tx:d}=await(0,e.resolveProperties)({trace:this.send("trace_transaction",[u.hash]),tx:this.getTransaction(u.hash)});if(l==null||d==null)return null;let f,h=!1;try{f=l[0].result.output,h=l[0].error==="Reverted"}catch{}if(f)return(0,e.assert)(!h,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:f,reason:null,transaction:d,invocation:null,revert:null}),f;(0,e.assert)(!1,"could not parse trace result","BAD_DATA",{value:l})}return await super._perform(u)}isCommunityResource(){return this.apiKey===i}static getRequest(u,l){l==null&&(l=i);const d=new e.FetchRequest(`https://${o(u.name)}/v2/${l}`);return d.allowGzip=!0,l===i&&(d.retryFunc=async(f,h,p)=>((0,t.showThrottleMessage)("alchemy"),!0)),d}}return Gy.AlchemyProvider=s,Gy}var Ky={},qK;function sfe(){if(qK)return Ky;qK=1,Object.defineProperty(Ky,"__esModule",{value:!0}),Ky.CloudflareProvider=void 0;const e=Je(),t=Zs(),n=Kc();class r extends n.JsonRpcProvider{constructor(o){o==null&&(o="mainnet");const s=t.Network.from(o);(0,e.assertArgument)(s.name==="mainnet","unsupported network","network",o),super("https://cloudflare-eth.com/",s,{staticNetwork:s})}}return Ky.CloudflareProvider=r,Ky}var n0={},ZK;function afe(){var m;if(ZK)return n0;ZK=1,Object.defineProperty(n0,"__esModule",{value:!0}),n0.EtherscanProvider=n0.EtherscanPlugin=void 0;const e=V5(),t=vC(),n=rs(),r=Je(),i=G5(),o=Zs(),s=BM(),a=sp(),c=2e3;function u(x){return x&&typeof x.then=="function"}const l="org.ethers.plugins.provider.Etherscan";class d extends s.NetworkPlugin{constructor(b){super(l);Z(this,"baseUrl");(0,r.defineProperties)(this,{baseUrl:b})}clone(){return new d(this.baseUrl)}}n0.EtherscanPlugin=d;const f=["enableCcipRead"];let h=1;class p extends i.AbstractProvider{constructor(b,v){const w=v??null;super();Z(this,"network");Z(this,"apiKey");J(this,m);const E=o.Network.from(b);D(this,m,E.getPlugin(l)),(0,r.defineProperties)(this,{apiKey:w,network:E}),this.getBaseUrl()}getBaseUrl(){if(C(this,m))return C(this,m).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"matic":return"https://api.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io";case"bnb":return"http://api.bscscan.com";case"bnbt":return"http://api-testnet.bscscan.com"}(0,r.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(b,v){const w=Object.keys(v).reduce((S,I)=>{const A=v[I];return A!=null&&(S+=`&${I}=${A}`),S},""),E=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${b}${w}${E}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(b,v){return v.module=b,v.apikey=this.apiKey,v}async detectNetwork(){return this.network}async fetch(b,v,w){const E=h++,S=w?this.getPostUrl():this.getUrl(b,v),I=w?this.getPostData(b,v):null;this.emit("debug",{action:"sendRequest",id:E,url:S,payload:I});const A=new r.FetchRequest(S);A.setThrottleParams({slotInterval:1e3}),A.retryFunc=(R,_,M)=>(this.isCommunityResource()&&(0,a.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),A.processFunc=async(R,_)=>{const M=_.hasBody()?JSON.parse((0,r.toUtf8String)(_.body)):{},z=(typeof M.result=="string"?M.result:"").toLowerCase().indexOf("rate limit")>=0;return b==="proxy"?M&&M.status==0&&M.message=="NOTOK"&&z&&(this.emit("debug",{action:"receiveError",id:E,reason:"proxy-NOTOK",error:M}),_.throwThrottleError(M.result,c)):z&&(this.emit("debug",{action:"receiveError",id:E,reason:"null result",error:M.result}),_.throwThrottleError(M.result,c)),_},I&&(A.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),A.body=Object.keys(I).map(R=>`${R}=${I[R]}`).join("&"));const O=await A.send();try{O.assertOk()}catch(R){this.emit("debug",{action:"receiveError",id:E,error:R,reason:"assertOk"}),(0,r.assert)(!1,"response error","SERVER_ERROR",{request:A,response:O})}O.hasBody()||(this.emit("debug",{action:"receiveError",id:E,error:"missing body",reason:"null body"}),(0,r.assert)(!1,"missing response","SERVER_ERROR",{request:A,response:O}));const N=JSON.parse((0,r.toUtf8String)(O.body));return b==="proxy"?(N.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:E,result:N,reason:"invalid JSON-RPC"}),(0,r.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:A,response:O,info:{result:N}})),N.error&&(this.emit("debug",{action:"receiveError",id:E,result:N,reason:"JSON-RPC error"}),(0,r.assert)(!1,"error response","SERVER_ERROR",{request:A,response:O,info:{result:N}})),this.emit("debug",{action:"receiveRequest",id:E,result:N}),N.result):N.status==0&&(N.message==="No records found"||N.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:E,result:N}),N.result):((N.status!=1||typeof N.message=="string"&&!N.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:E,result:N}),(0,r.assert)(!1,"error response","SERVER_ERROR",{request:A,response:O,info:{result:N}})),this.emit("debug",{action:"receiveRequest",id:E,result:N}),N.result)}_getTransactionPostData(b){const v={};for(let w in b){if(f.indexOf(w)>=0||b[w]==null)continue;let E=b[w];w==="type"&&E===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[w]?E=(0,r.toQuantity)(E):w==="accessList"?E="["+(0,n.accessListify)(E).map(S=>`{address:"${S.address}",storageKeys:["${S.storageKeys.join('","')}"]}`).join(",")+"]":E=(0,r.hexlify)(E),v[w]=E)}return v}_checkError(b,v,w){let E="";if((0,r.isError)(v,"SERVER_ERROR")){try{E=v.info.result.error.message}catch{}if(!E)try{E=v.info.message}catch{}}if(b.method==="estimateGas"&&!E.match(/revert/i)&&E.match(/insufficient funds/i)&&(0,r.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:b.transaction}),(b.method==="call"||b.method==="estimateGas")&&E.match(/execution reverted/i)){let S="";try{S=v.info.result.error.data}catch{}const I=e.AbiCoder.getBuiltinCallException(b.method,b.transaction,S);throw I.info={request:b,error:v},I}if(E&&b.method==="broadcastTransaction"){const S=n.Transaction.from(b.signedTransaction);E.match(/replacement/i)&&E.match(/underpriced/i)&&(0,r.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:S}),E.match(/insufficient funds/)&&(0,r.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:S}),E.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,r.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:S})}throw v}async _detectNetwork(){return this.network}async _perform(b){switch(b.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:b.address,tag:b.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:b.address,tag:b.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:b.address,tag:b.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:b.address,position:b.position,tag:b.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:b.signedTransaction},!0).catch(v=>this._checkError(b,v,b.signedTransaction));case"getBlock":if("blockTag"in b)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:b.blockTag,boolean:b.includeTransactions?"true":"false"});(0,r.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:b.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:b.hash});case"call":{if(b.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const v=this._getTransactionPostData(b.transaction);v.module="proxy",v.action="eth_call";try{return await this.fetch("proxy",v,!0)}catch(w){return this._checkError(b,w,b.transaction)}}case"estimateGas":{const v=this._getTransactionPostData(b.transaction);v.module="proxy",v.action="eth_estimateGas";try{return await this.fetch("proxy",v,!0)}catch(w){return this._checkError(b,w,b.transaction)}}}return super._perform(b)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(b){let v=this._getAddress(b);u(v)&&(v=await v);try{const w=await this.fetch("contract",{action:"getabi",address:v}),E=JSON.parse(w);return new t.Contract(v,E,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}return m=new WeakMap,n0.EtherscanProvider=p,n0}var r0={},Qy={},Yy={},JK;function Net(){if(JK)return Yy;JK=1,Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.WebSocket=void 0;function e(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Qe<"u")return Qe;throw new Error("unable to locate global object")}const t=e().WebSocket;return Yy.WebSocket=t,Yy}var Ao={},XK;function WR(){var c,u,l,d,f,h,p,m,x;if(XK)return Ao;XK=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.SocketProvider=Ao.SocketEventSubscriber=Ao.SocketPendingSubscriber=Ao.SocketBlockSubscriber=Ao.SocketSubscriber=void 0;const e=G5(),t=Je(),n=Kc();class r{constructor(b,v){J(this,c);J(this,u);J(this,l);J(this,d);J(this,f);D(this,c,b),D(this,u,JSON.stringify(v)),D(this,l,null),D(this,d,null),D(this,f,null)}get filter(){return JSON.parse(C(this,u))}start(){D(this,l,C(this,c).send("eth_subscribe",this.filter).then(b=>(C(this,c)._register(b,this),b)))}stop(){C(this,l).then(b=>{C(this,c).send("eth_unsubscribe",[b])}),D(this,l,null)}pause(b){(0,t.assert)(b,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),D(this,d,!!b)}resume(){D(this,d,null)}_handleMessage(b){if(C(this,l)!=null&&C(this,d)===null){let v=C(this,f);v==null?v=this._emit(C(this,c),b):v=v.then(async()=>{await this._emit(C(this,c),b)}),D(this,f,v.then(()=>{C(this,f)===v&&D(this,f,null)}))}}async _emit(b,v){throw new Error("sub-classes must implemente this; _emit")}}c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,Ao.SocketSubscriber=r;class i extends r{constructor(b){super(b,["newHeads"])}async _emit(b,v){b.emit("block",parseInt(v.number))}}Ao.SocketBlockSubscriber=i;class o extends r{constructor(b){super(b,["newPendingTransactions"])}async _emit(b,v){b.emit("pending",v)}}Ao.SocketPendingSubscriber=o;class s extends r{constructor(v,w){super(v,["logs",w]);J(this,h);D(this,h,JSON.stringify(w))}get logFilter(){return JSON.parse(C(this,h))}async _emit(v,w){v.emit(this.logFilter,v._wrapLog(w,v._network))}}h=new WeakMap,Ao.SocketEventSubscriber=s;class a extends n.JsonRpcApiProvider{constructor(v){super(v,{batchMaxCount:1});J(this,p);J(this,m);J(this,x);D(this,p,new Map),D(this,m,new Map),D(this,x,new Map)}_getSubscriber(v){switch(v.type){case"close":return new e.UnmanagedSubscriber("close");case"block":return new i(this);case"pending":return new o(this);case"event":return new s(this,v.filter);case"orphan":if(v.filter.orphan==="drop-log")return new e.UnmanagedSubscriber("drop-log")}return super._getSubscriber(v)}_register(v,w){C(this,m).set(v,w);const E=C(this,x).get(v);if(E){for(const S of E)w._handleMessage(S);C(this,x).delete(v)}}async _send(v){(0,t.assertArgument)(!Array.isArray(v),"WebSocket does not support batch send","payload",v);const w=new Promise((E,S)=>{C(this,p).set(v.id,{payload:v,resolve:E,reject:S})});return await this._waitUntilReady(),await this._write(JSON.stringify(v)),[await w]}async _processMessage(v){const w=JSON.parse(v);if(w&&typeof w=="object"&&"id"in w){const E=C(this,p).get(w.id);if(E==null){this.emit("error",(0,t.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:w}));return}C(this,p).delete(w.id),E.resolve(w)}else if(w&&w.method==="eth_subscription"){const E=w.params.subscription,S=C(this,m).get(E);if(S)S._handleMessage(w.params.result);else{let I=C(this,x).get(E);I==null&&(I=[],C(this,x).set(E,I)),I.push(w.params.result)}}else{this.emit("error",(0,t.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:w}));return}}async _write(v){throw new Error("sub-classes must override this")}}return p=new WeakMap,m=new WeakMap,x=new WeakMap,Ao.SocketProvider=a,Ao}var eQ;function jM(){var r,i;if(eQ)return Qy;eQ=1,Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.WebSocketProvider=void 0;const e=Net(),t=WR();class n extends t.SocketProvider{constructor(a,c){super(c);J(this,r);J(this,i);typeof a=="string"?(D(this,r,()=>new e.WebSocket(a)),D(this,i,C(this,r).call(this))):typeof a=="function"?(D(this,r,a),D(this,i,a())):(D(this,r,null),D(this,i,a)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(u){console.log("failed to start WebsocketProvider",u)}},this.websocket.onmessage=u=>{this._processMessage(u.data)}}get websocket(){if(C(this,i)==null)throw new Error("websocket closed");return C(this,i)}async _write(a){this.websocket.send(a)}async destroy(){C(this,i)!=null&&(C(this,i).close(),D(this,i,null)),super.destroy()}}return r=new WeakMap,i=new WeakMap,Qy.WebSocketProvider=n,Qy}var tQ;function cfe(){if(tQ)return r0;tQ=1,Object.defineProperty(r0,"__esModule",{value:!0}),r0.InfuraProvider=r0.InfuraWebSocketProvider=void 0;const e=Je(),t=sp(),n=Zs(),r=Kc(),i=jM(),o="84842078b09946638c03157f83405213";function s(u){switch(u){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io"}(0,e.assertArgument)(!1,"unsupported network","network",u)}class a extends i.WebSocketProvider{constructor(d,f){const h=new c(d,f),p=h._getConnection();(0,e.assert)(!p.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const m=p.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(m,d);Z(this,"projectId");Z(this,"projectSecret");(0,e.defineProperties)(this,{projectId:h.projectId,projectSecret:h.projectSecret})}isCommunityResource(){return this.projectId===o}}r0.InfuraWebSocketProvider=a;class c extends r.JsonRpcProvider{constructor(d,f,h){d==null&&(d="mainnet");const p=n.Network.from(d);f==null&&(f=o),h==null&&(h=null);const m=c.getRequest(p,f,h);super(m,p,{staticNetwork:p});Z(this,"projectId");Z(this,"projectSecret");(0,e.defineProperties)(this,{projectId:f,projectSecret:h})}_getProvider(d){try{return new c(d,this.projectId,this.projectSecret)}catch{}return super._getProvider(d)}isCommunityResource(){return this.projectId===o}static getWebSocketProvider(d,f){return new a(d,f)}static getRequest(d,f,h){f==null&&(f=o),h==null&&(h=null);const p=new e.FetchRequest(`https://${s(d.name)}/v3/${f}`);return p.allowGzip=!0,h&&p.setCredentials("",h),f===o&&(p.retryFunc=async(m,x,y)=>((0,t.showThrottleMessage)("InfuraProvider"),!0)),p}}return r0.InfuraProvider=c,r0}var qy={},nQ;function ufe(){if(nQ)return qy;nQ=1,Object.defineProperty(qy,"__esModule",{value:!0}),qy.QuickNodeProvider=void 0;const e=Je(),t=sp(),n=Zs(),r=Kc(),i="919b412a057b5e9c9b6dce193c5a60242d6efadb";function o(a){switch(a){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro"}(0,e.assertArgument)(!1,"unsupported network","network",a)}class s extends r.JsonRpcProvider{constructor(u,l){u==null&&(u="mainnet");const d=n.Network.from(u);l==null&&(l=i);const f=s.getRequest(d,l);super(f,d,{staticNetwork:d});Z(this,"token");(0,e.defineProperties)(this,{token:l})}_getProvider(u){try{return new s(u,this.token)}catch{}return super._getProvider(u)}isCommunityResource(){return this.token===i}static getRequest(u,l){l==null&&(l=i);const d=new e.FetchRequest(`https://${o(u.name)}/${l}`);return d.allowGzip=!0,l===i&&(d.retryFunc=async(f,h,p)=>((0,t.showThrottleMessage)("QuickNodeProvider"),!0)),d}}return qy.QuickNodeProvider=s,qy}var Zy={},rQ;function hfe(){var v,w,E,S,lfe,GR,dfe,ffe,KR;if(rQ)return Zy;rQ=1,Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.FallbackProvider=void 0;const e=Je(),t=G5(),n=Zs(),r=BigInt("1"),i=BigInt("2");function o(_){for(let M=_.length-1;M>0;M--){const z=Math.floor(Math.random()*(M+1)),F=_[M];_[M]=_[z],_[z]=F}}function s(_){return new Promise(M=>{setTimeout(M,_)})}function a(){return new Date().getTime()}function c(_){return JSON.stringify(_,(M,z)=>typeof z=="bigint"?{type:"bigint",value:z.toString()}:z)}const u={stallTimeout:400,priority:1,weight:1},l={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function d(_,M){for(;(_.blockNumber<0||_.blockNumber{try{const z=await _.provider.getBlockNumber();z>_.blockNumber&&(_.blockNumber=z)}catch(z){_.blockNumber=-2,_._lastFatalError=z,_._lastFatalErrorTimestamp=a()}_._updateNumber=null})()),await _._updateNumber,_.outOfSync++,!_._lastFatalError););}function f(_){if(_==null)return"null";if(Array.isArray(_))return"["+_.map(f).join(",")+"]";if(typeof _=="object"&&typeof _.toJSON=="function")return f(_.toJSON());switch(typeof _){case"boolean":case"symbol":return _.toString();case"bigint":case"number":return BigInt(_).toString();case"string":return JSON.stringify(_);case"object":{const M=Object.keys(_);return M.sort(),"{"+M.map(z=>`${JSON.stringify(z)}:${f(_[z])}`).join(",")+"}"}}throw console.log("Could not serialize",_),new Error("Hmm...")}function h(_){if("error"in _){const z=_.error;return{tag:f(z),value:z}}const M=_.result;return{tag:f(M),value:M}}function p(_,M){const z=new Map;for(const{value:$,tag:W,weight:G}of M){const H=z.get(W)||{value:$,weight:0};H.weight+=G,z.set(W,H)}let F=null;for(const $ of z.values())$.weight>=_&&(!F||$.weight>F.weight)&&(F=$);if(F)return F.value}function m(_,M){let z=0;const F=new Map;let $=null;const W=[];for(const{value:H,tag:L,weight:q}of M)if(H instanceof Error){const V=F.get(L)||{value:H,weight:0};V.weight+=q,F.set(L,V),($==null||V.weight>$.weight)&&($=V)}else W.push(BigInt(H)),z+=q;if(z<_)return $&&$.weight>=_?$.value:void 0;W.sort((H,L)=>HH?1:0);const G=Math.floor(W.length/2);return W.length%2?W[G]:(W[G-1]+W[G]+r)/i}function x(_,M){const z=p(_,M);if(z!==void 0)return z;for(const F of M)if(F.value)return F.value}function y(_,M){if(_===1)return(0,e.getNumber)(m(_,M),"%internal");const z=new Map,F=(G,H)=>{const L=z.get(G)||{result:G,weight:0};L.weight+=H,z.set(G,L)};for(const{weight:G,value:H}of M){const L=(0,e.getNumber)(H);F(L-1,G),F(L,G),F(L+1,G)}let $=0,W;for(const{weight:G,result:H}of z.values())G>=_&&(G>$||W!=null&&G===$&&H>W)&&($=G,W=H);return W}class b extends t.AbstractProvider{constructor(z,F,$){super(F,$);J(this,S);Z(this,"quorum");Z(this,"eventQuorum");Z(this,"eventWorkers");J(this,v);J(this,w);J(this,E);D(this,v,z.map(W=>W instanceof t.AbstractProvider?Object.assign({provider:W},u,l):Object.assign({},u,W,l))),D(this,w,-2),D(this,E,null),$&&$.quorum!=null?this.quorum=$.quorum:this.quorum=Math.ceil(C(this,v).reduce((W,G)=>(W+=G.weight,W),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,e.assertArgument)(this.quorum<=C(this,v).reduce((W,G)=>W+G.weight,0),"quorum exceed provider wieght","quorum",this.quorum)}get providerConfigs(){return C(this,v).map(z=>{const F=Object.assign({},z);for(const $ in F)$[0]==="_"&&delete F[$];return F})}async _detectNetwork(){return n.Network.from((0,e.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(z,F){switch(F.method){case"broadcastTransaction":return await z.broadcastTransaction(F.signedTransaction);case"call":return await z.call(Object.assign({},F.transaction,{blockTag:F.blockTag}));case"chainId":return(await z.getNetwork()).chainId;case"estimateGas":return await z.estimateGas(F.transaction);case"getBalance":return await z.getBalance(F.address,F.blockTag);case"getBlock":{const $="blockHash"in F?F.blockHash:F.blockTag;return await z.getBlock($,F.includeTransactions)}case"getBlockNumber":return await z.getBlockNumber();case"getCode":return await z.getCode(F.address,F.blockTag);case"getGasPrice":return(await z.getFeeData()).gasPrice;case"getLogs":return await z.getLogs(F.filter);case"getStorage":return await z.getStorage(F.address,F.position,F.blockTag);case"getTransaction":return await z.getTransaction(F.hash);case"getTransactionCount":return await z.getTransactionCount(F.address,F.blockTag);case"getTransactionReceipt":return await z.getTransactionReceipt(F.hash);case"getTransactionResult":return await z.getTransactionResult(F.hash)}}async _perform(z){if(z.method==="broadcastTransaction"){const W=await Promise.all(C(this,v).map(async({provider:H,weight:L})=>{try{const q=await H._perform(z);return Object.assign(h({result:q}),{weight:L})}catch(q){return Object.assign(h({error:q}),{weight:L})}})),G=x(this.quorum,W);if((0,e.assert)(G!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:z,results:W.map(c)}}),G instanceof Error)throw G;return G}await de(this,S,dfe).call(this);const F=new Set;for(let W=0;WW.config),$=C(this,v).slice();o($),$.sort((W,G)=>W.priority-G.priority);for(const W of $)if(!W._lastFatalError&&F.indexOf(W)===-1)return W;return null},GR=function(z,F){const $=de(this,S,lfe).call(this,z);if($==null)return null;const W={config:$,result:null,didBump:!1,perform:null,staller:null},G=a();return W.perform=(async()=>{try{$.requests++;const L=await this._translatePerform($.provider,F);W.result={result:L}}catch(L){$.errorResponses++,W.result={error:L}}const H=a()-G;$._totalTime+=H,$.rollingDuration=.95*$.rollingDuration+.05*H,W.perform=null})(),W.staller=(async()=>{await s($.stallTimeout),W.staller=null})(),z.add(W),W},dfe=async function(){let z=C(this,E);if(!z){const F=[];C(this,v).forEach($=>{F.push((async()=>{await d($,0),$._lastFatalError||($._network=await $.provider.getNetwork())})())}),D(this,E,z=(async()=>{await Promise.all(F);let $=null;for(const W of C(this,v)){if(W._lastFatalError)continue;const G=W._network;$==null?$=G.chainId:G.chainId!==$&&(0,e.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await z},ffe=async function(z,F){const $=[];for(const W of z)if(W.result!=null){const{tag:G,value:H}=h(W.result);$.push({tag:G,value:H,weight:W.config.weight})}if(!($.reduce((W,G)=>W+G.weight,0)!G._lastFatalError).map(G=>({value:G.blockNumber,tag:(0,e.getNumber)(G.blockNumber).toString(),weight:G.weight}))))));const W=y(this.quorum,$);return W===void 0?void 0:(W>C(this,w)&&D(this,w,W),C(this,w))}case"getGasPrice":case"estimateGas":return m(this.quorum,$);case"getBlock":return"blockTag"in F&&F.blockTag==="pending"?x(this.quorum,$):p(this.quorum,$);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,$);case"broadcastTransaction":return x(this.quorum,$)}(0,e.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${c(F.method)})`})}},KR=async function(z,F){if(z.size===0)throw new Error("no runners?!");const $=[];let W=0;for(const H of z){if(H.perform&&$.push(H.perform),H.staller){$.push(H.staller);continue}H.didBump||(H.didBump=!0,W++)}const G=await de(this,S,ffe).call(this,z,F);if(G!==void 0){if(G instanceof Error)throw G;return G}for(let H=0;H0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:F,results:Array.from(z).map(H=>c(H.result))}}),await Promise.race($),await de(this,S,KR).call(this,z,F)},Zy.FallbackProvider=b,Zy}var iQ;function Oet(){if(iQ)return Vy;iQ=1,Object.defineProperty(Vy,"__esModule",{value:!0}),Vy.getDefaultProvider=void 0;const e=Je(),t=ife(),n=ofe(),r=sfe(),i=afe(),o=cfe(),s=ufe(),a=hfe(),c=Kc(),u=Zs(),l=jM();function d(p){return p&&typeof p.send=="function"&&typeof p.close=="function"}const f="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function h(p,m){m==null&&(m={});const x=w=>m[w]==="-"?!1:typeof m.exclusive=="string"?w===m.exclusive:Array.isArray(m.exclusive)?m.exclusive.indexOf(w)!==-1:!0;if(typeof p=="string"&&p.match(/^https?:/))return new c.JsonRpcProvider(p);if(typeof p=="string"&&p.match(/^wss?:/)||d(p))return new l.WebSocketProvider(p);let y=null;try{y=u.Network.from(p)}catch{}const b=[];if(x("publicPolygon")&&y&&y.name==="matic"&&b.push(new c.JsonRpcProvider("https://polygon-rpc.com/",y,{staticNetwork:y})),x("alchemy"))try{b.push(new n.AlchemyProvider(p,m.alchemy))}catch{}if(x("ankr")&&m.ankr!=null)try{b.push(new t.AnkrProvider(p,m.ankr))}catch{}if(x("cloudflare"))try{b.push(new r.CloudflareProvider(p))}catch{}if(x("etherscan"))try{b.push(new i.EtherscanProvider(p,m.etherscan))}catch{}if(x("infura"))try{let w=m.infura,E;typeof w=="object"&&(E=w.projectSecret,w=w.projectId),b.push(new o.InfuraProvider(p,w,E))}catch{}if(x("quicknode"))try{let w=m.quicknode;b.push(new s.QuickNodeProvider(p,w))}catch{}if((0,e.assert)(b.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),b.length===1)return b[0];let v=Math.floor(b.length/2);return v>2&&(v=2),y&&f.indexOf(y.name)!==-1&&(v=1),m&&m.quorum&&(v=m.quorum),new a.FallbackProvider(b,void 0,{quorum:v})}return Vy.getDefaultProvider=h,Vy}var Jy={},oQ;function Let(){var r,i;if(oQ)return Jy;oQ=1,Object.defineProperty(Jy,"__esModule",{value:!0}),Jy.NonceManager=void 0;const e=Je(),t=DM(),o=class o extends t.AbstractSigner{constructor(c){super(c.provider);Z(this,"signer");J(this,r);J(this,i);(0,e.defineProperties)(this,{signer:c}),D(this,r,null),D(this,i,0)}async getAddress(){return this.signer.getAddress()}connect(c){return new o(this.signer.connect(c))}async getNonce(c){if(c==="pending"){C(this,r)==null&&D(this,r,super.getNonce("pending"));const u=C(this,i);return await C(this,r)+u}return super.getNonce(c)}increment(){xo(this,i)._++}reset(){D(this,i,0),D(this,r,null)}async sendTransaction(c){const u=this.getNonce("pending");return this.increment(),c=await this.signer.populateTransaction(c),c.nonce=await u,await this.signer.sendTransaction(c)}signTransaction(c){return this.signer.signTransaction(c)}signMessage(c){return this.signer.signMessage(c)}signTypedData(c,u,l){return this.signer.signTypedData(c,u,l)}};r=new WeakMap,i=new WeakMap;let n=o;return Jy.NonceManager=n,Jy}var Xy={},sQ;function Bet(){var r;if(sQ)return Xy;sQ=1,Object.defineProperty(Xy,"__esModule",{value:!0}),Xy.BrowserProvider=void 0;const e=Je(),t=Kc();class n extends t.JsonRpcApiPollingProvider{constructor(s,a){super(a,{batchMaxCount:1});J(this,r);D(this,r,async(c,u)=>{const l={method:c,params:u};this.emit("debug",{action:"sendEip1193Request",payload:l});try{const d=await s.request(l);return this.emit("debug",{action:"receiveEip1193Result",result:d}),d}catch(d){const f=new Error(d.message);throw f.code=d.code,f.data=d.data,f.payload=l,this.emit("debug",{action:"receiveEip1193Error",error:f}),f}})}async send(s,a){return await this._start(),await super.send(s,a)}async _send(s){(0,e.assertArgument)(!Array.isArray(s),"EIP-1193 does not support batch request","payload",s);try{const a=await C(this,r).call(this,s.method,s.params||[]);return[{id:s.id,result:a}]}catch(a){return[{id:s.id,error:{code:a.code,data:a.data,message:a.message}}]}}getRpcError(s,a){switch(a=JSON.parse(JSON.stringify(a)),a.error.code||-1){case 4001:a.error.message=`ethers-user-denied: ${a.error.message}`;break;case 4200:a.error.message=`ethers-unsupported: ${a.error.message}`;break}return super.getRpcError(s,a)}async hasSigner(s){s==null&&(s=0);const a=await this.send("eth_accounts",[]);return typeof s=="number"?a.length>s:(s=s.toLowerCase(),a.filter(c=>c.toLowerCase()===s).length!==0)}async getSigner(s){if(s==null&&(s=0),!await this.hasSigner(s))try{await C(this,r).call(this,"eth_requestAccounts",[])}catch(a){const c=a.payload;throw this.getRpcError(c,{id:c.id,error:a})}return await super.getSigner(s)}}return r=new WeakMap,Xy.BrowserProvider=n,Xy}var eb={},aQ;function Met(){if(aQ)return eb;aQ=1,Object.defineProperty(eb,"__esModule",{value:!0}),eb.PocketProvider=void 0;const e=Je(),t=sp(),n=Zs(),r=Kc(),i="62e1ad51b37b8e00394bda3b";function o(a){switch(a){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,e.assertArgument)(!1,"unsupported network","network",a)}class s extends r.JsonRpcProvider{constructor(u,l,d){u==null&&(u="mainnet");const f=n.Network.from(u);l==null&&(l=i),d==null&&(d=null);const h={staticNetwork:f},p=s.getRequest(f,l,d);super(p,f,h);Z(this,"applicationId");Z(this,"applicationSecret");(0,e.defineProperties)(this,{applicationId:l,applicationSecret:d})}_getProvider(u){try{return new s(u,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(u)}static getRequest(u,l,d){l==null&&(l=i);const f=new e.FetchRequest(`https://${o(u.name)}/v1/lb/${l}`);return f.allowGzip=!0,d&&f.setCredentials("",d),l===i&&(f.retryFunc=async(h,p,m)=>((0,t.showThrottleMessage)("PocketProvider"),!0)),f}isCommunityResource(){return this.applicationId===i}}return eb.PocketProvider=s,eb}var tb={},cQ;function Det(){if(cQ)return tb;cQ=1,Object.defineProperty(tb,"__esModule",{value:!0}),tb.IpcSocketProvider=void 0;const e=void 0;return tb.IpcSocketProvider=e,tb}var uQ;function FM(){return uQ||(uQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SocketEventSubscriber=e.SocketPendingSubscriber=e.SocketBlockSubscriber=e.SocketSubscriber=e.WebSocketProvider=e.SocketProvider=e.IpcSocketProvider=e.QuickNodeProvider=e.PocketProvider=e.InfuraWebSocketProvider=e.InfuraProvider=e.EtherscanPlugin=e.EtherscanProvider=e.CloudflareProvider=e.AnkrProvider=e.AlchemyProvider=e.BrowserProvider=e.JsonRpcSigner=e.JsonRpcProvider=e.JsonRpcApiProvider=e.FallbackProvider=e.copyRequest=e.TransactionResponse=e.TransactionReceipt=e.Log=e.FeeData=e.Block=e.FetchUrlFeeDataNetworkPlugin=e.FeeDataNetworkPlugin=e.EnsPlugin=e.GasCostPlugin=e.NetworkPlugin=e.NonceManager=e.Network=e.MulticoinProviderPlugin=e.EnsResolver=e.getDefaultProvider=e.showThrottleMessage=e.VoidSigner=e.AbstractSigner=e.UnmanagedSubscriber=e.AbstractProvider=void 0;var t=G5();Object.defineProperty(e,"AbstractProvider",{enumerable:!0,get:function(){return t.AbstractProvider}}),Object.defineProperty(e,"UnmanagedSubscriber",{enumerable:!0,get:function(){return t.UnmanagedSubscriber}});var n=DM();Object.defineProperty(e,"AbstractSigner",{enumerable:!0,get:function(){return n.AbstractSigner}}),Object.defineProperty(e,"VoidSigner",{enumerable:!0,get:function(){return n.VoidSigner}});var r=sp();Object.defineProperty(e,"showThrottleMessage",{enumerable:!0,get:function(){return r.showThrottleMessage}});var i=Oet();Object.defineProperty(e,"getDefaultProvider",{enumerable:!0,get:function(){return i.getDefaultProvider}});var o=nfe();Object.defineProperty(e,"EnsResolver",{enumerable:!0,get:function(){return o.EnsResolver}}),Object.defineProperty(e,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return o.MulticoinProviderPlugin}});var s=Zs();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return s.Network}});var a=Let();Object.defineProperty(e,"NonceManager",{enumerable:!0,get:function(){return a.NonceManager}});var c=BM();Object.defineProperty(e,"NetworkPlugin",{enumerable:!0,get:function(){return c.NetworkPlugin}}),Object.defineProperty(e,"GasCostPlugin",{enumerable:!0,get:function(){return c.GasCostPlugin}}),Object.defineProperty(e,"EnsPlugin",{enumerable:!0,get:function(){return c.EnsPlugin}}),Object.defineProperty(e,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return c.FeeDataNetworkPlugin}}),Object.defineProperty(e,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return c.FetchUrlFeeDataNetworkPlugin}});var u=W5();Object.defineProperty(e,"Block",{enumerable:!0,get:function(){return u.Block}}),Object.defineProperty(e,"FeeData",{enumerable:!0,get:function(){return u.FeeData}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.Log}}),Object.defineProperty(e,"TransactionReceipt",{enumerable:!0,get:function(){return u.TransactionReceipt}}),Object.defineProperty(e,"TransactionResponse",{enumerable:!0,get:function(){return u.TransactionResponse}}),Object.defineProperty(e,"copyRequest",{enumerable:!0,get:function(){return u.copyRequest}});var l=hfe();Object.defineProperty(e,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}});var d=Kc();Object.defineProperty(e,"JsonRpcApiProvider",{enumerable:!0,get:function(){return d.JsonRpcApiProvider}}),Object.defineProperty(e,"JsonRpcProvider",{enumerable:!0,get:function(){return d.JsonRpcProvider}}),Object.defineProperty(e,"JsonRpcSigner",{enumerable:!0,get:function(){return d.JsonRpcSigner}});var f=Bet();Object.defineProperty(e,"BrowserProvider",{enumerable:!0,get:function(){return f.BrowserProvider}});var h=ofe();Object.defineProperty(e,"AlchemyProvider",{enumerable:!0,get:function(){return h.AlchemyProvider}});var p=ife();Object.defineProperty(e,"AnkrProvider",{enumerable:!0,get:function(){return p.AnkrProvider}});var m=sfe();Object.defineProperty(e,"CloudflareProvider",{enumerable:!0,get:function(){return m.CloudflareProvider}});var x=afe();Object.defineProperty(e,"EtherscanProvider",{enumerable:!0,get:function(){return x.EtherscanProvider}}),Object.defineProperty(e,"EtherscanPlugin",{enumerable:!0,get:function(){return x.EtherscanPlugin}});var y=cfe();Object.defineProperty(e,"InfuraProvider",{enumerable:!0,get:function(){return y.InfuraProvider}}),Object.defineProperty(e,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return y.InfuraWebSocketProvider}});var b=Met();Object.defineProperty(e,"PocketProvider",{enumerable:!0,get:function(){return b.PocketProvider}});var v=ufe();Object.defineProperty(e,"QuickNodeProvider",{enumerable:!0,get:function(){return v.QuickNodeProvider}});const w=Det();Object.defineProperty(e,"IpcSocketProvider",{enumerable:!0,get:function(){return w.IpcSocketProvider}});var E=WR();Object.defineProperty(e,"SocketProvider",{enumerable:!0,get:function(){return E.SocketProvider}});var S=jM();Object.defineProperty(e,"WebSocketProvider",{enumerable:!0,get:function(){return S.WebSocketProvider}});var I=WR();Object.defineProperty(e,"SocketSubscriber",{enumerable:!0,get:function(){return I.SocketSubscriber}}),Object.defineProperty(e,"SocketBlockSubscriber",{enumerable:!0,get:function(){return I.SocketBlockSubscriber}}),Object.defineProperty(e,"SocketPendingSubscriber",{enumerable:!0,get:function(){return I.SocketPendingSubscriber}}),Object.defineProperty(e,"SocketEventSubscriber",{enumerable:!0,get:function(){return I.SocketEventSubscriber}})}(Yk)),Yk}var qk={},nb={},lQ;function UM(){var s;if(lQ)return nb;lQ=1,Object.defineProperty(nb,"__esModule",{value:!0}),nb.BaseWallet=void 0;const e=jr(),t=Tl(),n=FM(),r=rs(),i=Je(),a=class a extends n.AbstractSigner{constructor(l,d){super(d);Z(this,"address");J(this,s);(0,i.assertArgument)(l&&typeof l.sign=="function","invalid private key","privateKey","[ REDACTED ]"),D(this,s,l);const f=(0,r.computeAddress)(this.signingKey.publicKey);(0,i.defineProperties)(this,{address:f})}get signingKey(){return C(this,s)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(l){return new a(C(this,s),l)}async signTransaction(l){const{to:d,from:f}=await(0,i.resolveProperties)({to:l.to?(0,e.resolveAddress)(l.to,this.provider):void 0,from:l.from?(0,e.resolveAddress)(l.from,this.provider):void 0});d!=null&&(l.to=d),f!=null&&(l.from=f),l.from!=null&&((0,i.assertArgument)((0,e.getAddress)(l.from)===this.address,"transaction from address mismatch","tx.from",l.from),delete l.from);const h=r.Transaction.from(l);return h.signature=this.signingKey.sign(h.unsignedHash),h.serialized}async signMessage(l){return this.signMessageSync(l)}signMessageSync(l){return this.signingKey.sign((0,t.hashMessage)(l)).serialized}async signTypedData(l,d,f){const h=await t.TypedDataEncoder.resolveNames(l,d,f,async p=>{(0,i.assert)(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:p}});const m=await this.provider.resolveName(p);return(0,i.assert)(m!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:p}),m});return this.signingKey.sign(t.TypedDataEncoder.hash(h.domain,d,h.value)).serialized}};s=new WeakMap;let o=a;return nb.BaseWallet=o,nb}var Zk={},rb={},ib={},i0={},dQ;function pfe(){if(dQ)return i0;dQ=1,Object.defineProperty(i0,"__esModule",{value:!0}),i0.decodeOwl=i0.decode=void 0;const e=Je(),t=" !#$%&'()*+,-./<=>?@[]^_`{|}~",n=/^[a-z]*$/i;function r(s,a){let c=97;return s.reduce((u,l)=>(l===a?c++:l.match(n)?u.push(String.fromCharCode(c)+l):(c=97,u.push(l)),u),[])}function i(s,a){for(let l=t.length-1;l>=0;l--)s=s.split(t[l]).join(a.substring(2*l,2*l+2));const c=[],u=s.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(l,d,f,h)=>{if(f)for(let p=parseInt(f);p>=0;p--)c.push(";");else c.push(d.toLowerCase());return""});if(u)throw new Error(`leftovers: ${JSON.stringify(u)}`);return r(r(c,";"),":")}i0.decode=i;function o(s){return(0,e.assertArgument)(s[0]==="0","unsupported auwl data","data",s),i(s.substring(1+2*t.length),s.substring(1,1+2*t.length))}return i0.decodeOwl=o,i0}var ob={},fQ;function gfe(){if(fQ)return ob;fQ=1,Object.defineProperty(ob,"__esModule",{value:!0}),ob.Wordlist=void 0;const e=Je();class t{constructor(r){Z(this,"locale");(0,e.defineProperties)(this,{locale:r})}split(r){return r.toLowerCase().split(/\s+/g)}join(r){return r.join(" ")}}return ob.Wordlist=t,ob}var hQ;function zM(){var o,s,a,c,QR;if(hQ)return ib;hQ=1,Object.defineProperty(ib,"__esModule",{value:!0}),ib.WordlistOwl=void 0;const e=Tl(),t=Je(),n=pfe(),r=gfe();class i extends r.Wordlist{constructor(f,h,p){super(f);J(this,c);J(this,o);J(this,s);J(this,a);D(this,o,h),D(this,s,p),D(this,a,null)}get _data(){return C(this,o)}_decodeWords(){return(0,n.decodeOwl)(C(this,o))}getWord(f){const h=de(this,c,QR).call(this);return(0,t.assertArgument)(f>=0&&furAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO",n="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let r=null;class i extends e.WordlistOwl{constructor(){super("en",t,n)}static wordlist(){return r==null&&(r=new i),r}}return rb.LangEn=i,rb}var sb={},gQ;function $M(){if(gQ)return sb;gQ=1,Object.defineProperty(sb,"__esModule",{value:!0}),sb.Mnemonic=void 0;const e=ti(),t=Je(),n=xC();function r(u){return(1<=12&&d.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const f=new Uint8Array(Math.ceil(11*d.length/8));let h=0;for(let b=0;b=0,`invalid mnemonic word at index ${b}`,"mnemonic","[ REDACTED ]");for(let w=0;w<11;w++)v&1<<10-w&&(f[h>>3]|=1<<7-h%8),h++}const p=32*d.length/3,m=d.length/3,x=r(m),y=(0,t.getBytes)((0,e.sha256)(f.slice(0,p/8)))[0]&x;return(0,t.assertArgument)(y===(f[f.length-1]&x),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,t.hexlify)(f.slice(0,p/8))}function s(u,l){(0,t.assertArgument)(u.length%4===0&&u.length>=16&&u.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),l==null&&(l=n.LangEn.wordlist());const d=[0];let f=11;for(let m=0;m8?(d[d.length-1]<<=8,d[d.length-1]|=u[m],f-=8):(d[d.length-1]<<=f,d[d.length-1]|=u[m]>>8-f,d.push(u[m]&i(8-f)),f+=3);const h=u.length/4,p=parseInt((0,e.sha256)(u).substring(2,4),16)&r(h);return d[d.length-1]<<=h,d[d.length-1]|=p>>8-h,l.join(d.map(m=>l.getWord(m)))}const a={};class c{constructor(l,d,f,h,p){Z(this,"phrase");Z(this,"password");Z(this,"wordlist");Z(this,"entropy");h==null&&(h=""),p==null&&(p=n.LangEn.wordlist()),(0,t.assertPrivate)(l,a,"Mnemonic"),(0,t.defineProperties)(this,{phrase:f,password:h,wordlist:p,entropy:d})}computeSeed(){const l=(0,t.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,e.pbkdf2)((0,t.toUtf8Bytes)(this.phrase,"NFKD"),l,2048,64,"sha512")}static fromPhrase(l,d,f){const h=o(l,f);return l=s((0,t.getBytes)(h),f),new c(a,h,l,d,f)}static fromEntropy(l,d,f){const h=(0,t.getBytes)(l,"entropy"),p=s(h,f);return new c(a,(0,t.hexlify)(h),p,d,f)}static entropyToPhrase(l,d){const f=(0,t.getBytes)(l,"entropy");return s(f,d)}static phraseToEntropy(l,d){return o(l,d)}static isValidMnemonic(l,d){try{return o(l,d),!0}catch{}return!1}}return sb.Mnemonic=c,sb}var So={};const mfe=Qs(PJe);var la={},mQ;function yfe(){if(mQ)return la;mQ=1,Object.defineProperty(la,"__esModule",{value:!0}),la.spelunk=la.getPassword=la.zpad=la.looseArrayify=void 0;const e=Je();function t(o){return typeof o=="string"&&!o.startsWith("0x")&&(o="0x"+o),(0,e.getBytesCopy)(o)}la.looseArrayify=t;function n(o,s){for(o=String(o);o.length0&&(S&S-1)===0,"invalid kdf.N","kdf.N",S),(0,i.assertArgument)(I>0&&A>0,"invalid kdf","kdf",w);const O=(0,o.spelunk)(v,"crypto.kdfparams.dklen:int!");return(0,i.assertArgument)(O===32,"invalid kdf.dklen","kdf.dflen",O),{name:"scrypt",salt:E,N:S,r:I,p:A,dkLen:64}}else if(w.toLowerCase()==="pbkdf2"){const E=(0,o.spelunk)(v,"crypto.kdfparams.salt:data!"),S=(0,o.spelunk)(v,"crypto.kdfparams.prf:string!"),I=S.split("-").pop();(0,i.assertArgument)(I==="sha256"||I==="sha512","invalid kdf.pdf","kdf.pdf",S);const A=(0,o.spelunk)(v,"crypto.kdfparams.c:int!"),O=(0,o.spelunk)(v,"crypto.kdfparams.dklen:int!");return(0,i.assertArgument)(O===32,"invalid kdf.dklen","kdf.dklen",O),{name:"pbkdf2",salt:E,count:A,dkLen:O,algorithm:I}}}(0,i.assertArgument)(!1,"unsupported key-derivation function","kdf",w)}function f(v,w){const E=JSON.parse(v),S=(0,o.getPassword)(w),I=d(E);if(I.name==="pbkdf2"){const{salt:z,count:F,dkLen:$,algorithm:W}=I,G=(0,n.pbkdf2)(S,z,F,$,W);return l(E,G)}(0,i.assert)(I.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:I});const{salt:A,N:O,r:N,p:R,dkLen:_}=I,M=(0,n.scryptSync)(S,A,O,N,R,_);return l(E,M)}So.decryptKeystoreJsonSync=f;function h(v){return new Promise(w=>{setTimeout(()=>{w()},v)})}async function p(v,w,E){const S=JSON.parse(v),I=(0,o.getPassword)(w),A=d(S);if(A.name==="pbkdf2"){E&&(E(0),await h(0));const{salt:F,count:$,dkLen:W,algorithm:G}=A,H=(0,n.pbkdf2)(I,F,$,W,G);return E&&(E(1),await h(0)),l(S,H)}(0,i.assert)(A.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:A});const{salt:O,N,r:R,p:_,dkLen:M}=A,z=await(0,n.scrypt)(I,O,N,R,_,M,E);return l(S,z)}So.decryptKeystoreJson=p;function m(v){const w=v.salt!=null?(0,i.getBytes)(v.salt,"options.salt"):(0,n.randomBytes)(32);let E=1<<17,S=8,I=1;return v.scrypt&&(v.scrypt.N&&(E=v.scrypt.N),v.scrypt.r&&(S=v.scrypt.r),v.scrypt.p&&(I=v.scrypt.p)),(0,i.assertArgument)(typeof E=="number"&&E>0&&Number.isSafeInteger(E)&&(BigInt(E)&BigInt(E-1))===BigInt(0),"invalid scrypt N parameter","options.N",E),(0,i.assertArgument)(typeof S=="number"&&S>0&&Number.isSafeInteger(S),"invalid scrypt r parameter","options.r",S),(0,i.assertArgument)(typeof I=="number"&&I>0&&Number.isSafeInteger(I),"invalid scrypt p parameter","options.p",I),{name:"scrypt",dkLen:32,salt:w,N:E,r:S,p:I}}function x(v,w,E,S){const I=(0,i.getBytes)(E.privateKey,"privateKey"),A=S.iv!=null?(0,i.getBytes)(S.iv,"options.iv"):(0,n.randomBytes)(16);(0,i.assertArgument)(A.length===16,"invalid options.iv length","options.iv",S.iv);const O=S.uuid!=null?(0,i.getBytes)(S.uuid,"options.uuid"):(0,n.randomBytes)(16);(0,i.assertArgument)(O.length===16,"invalid options.uuid length","options.uuid",S.iv);const N=v.slice(0,16),R=v.slice(16,32),_=new e.CTR(N,A),M=(0,i.getBytes)(_.encrypt(I)),z=(0,n.keccak256)((0,i.concat)([R,M])),F={address:E.address.substring(2).toLowerCase(),id:(0,i.uuidV4)(O),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,i.hexlify)(A).substring(2)},ciphertext:(0,i.hexlify)(M).substring(2),kdf:"scrypt",kdfparams:{salt:(0,i.hexlify)(w.salt).substring(2),n:w.N,dklen:32,p:w.p,r:w.r},mac:z.substring(2)}};if(E.mnemonic){const $=S.client!=null?S.client:`ethers/${s.version}`,W=E.mnemonic.path||a,G=E.mnemonic.locale||"en",H=v.slice(32,64),L=(0,i.getBytes)(E.mnemonic.entropy,"account.mnemonic.entropy"),q=(0,n.randomBytes)(16),V=new e.CTR(H,q),P=(0,i.getBytes)(V.encrypt(L)),K=new Date,X="UTC--"+(K.getUTCFullYear()+"-"+(0,o.zpad)(K.getUTCMonth()+1,2)+"-"+(0,o.zpad)(K.getUTCDate(),2)+"T"+(0,o.zpad)(K.getUTCHours(),2)+"-"+(0,o.zpad)(K.getUTCMinutes(),2)+"-"+(0,o.zpad)(K.getUTCSeconds(),2)+".0Z")+"--"+F.address;F["x-ethers"]={client:$,gethFilename:X,path:W,locale:G,mnemonicCounter:(0,i.hexlify)(q).substring(2),mnemonicCiphertext:(0,i.hexlify)(P).substring(2),version:"0.1"}}return JSON.stringify(F)}function y(v,w,E){E==null&&(E={});const S=(0,o.getPassword)(w),I=m(E),A=(0,n.scryptSync)(S,I.salt,I.N,I.r,I.p,64);return x((0,i.getBytes)(A),I,v,E)}So.encryptKeystoreJsonSync=y;async function b(v,w,E){E==null&&(E={});const S=(0,o.getPassword)(w),I=m(E),A=await(0,n.scrypt)(S,I.salt,I.N,I.r,I.p,64,E.progressCallback);return x((0,i.getBytes)(A),I,v,E)}return So.encryptKeystoreJson=b,So}var bQ;function bfe(){return bQ||(bQ=1,function(e){var S,YR,A,Yb;Object.defineProperty(e,"__esModule",{value:!0}),e.getIndexedAccountPath=e.getAccountPath=e.HDNodeVoidWallet=e.HDNodeWallet=e.defaultPath=void 0;const t=ti(),n=FM(),r=rs(),i=Je(),o=xC(),s=UM(),a=$M(),c=HM();e.defaultPath="m/44'/60'/0'/0/0";const u=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),l=2147483648,d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f="0123456789abcdef";function h(R,_){let M="";for(;R;)M=f[R%16]+M,R=Math.trunc(R/16);for(;M.length<_*2;)M="0"+M;return"0x"+M}function p(R){const _=(0,i.getBytes)(R),M=(0,i.dataSlice)((0,t.sha256)((0,t.sha256)(_)),0,4),z=(0,i.concat)([_,M]);return(0,i.encodeBase58)(z)}const m={};function x(R,_,M,z){const F=new Uint8Array(37);R&l?((0,i.assert)(z!=null,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),F.set((0,i.getBytes)(z),1)):F.set((0,i.getBytes)(M));for(let W=24;W>=0;W-=8)F[33+(W>>3)]=R>>24-W&255;const $=(0,i.getBytes)((0,t.computeHmac)("sha512",_,F));return{IL:$.slice(0,32),IR:$.slice(32)}}function y(R,_){const M=_.split("/");(0,i.assertArgument)(M.length>0&&(M[0]==="m"||R.depth>0),"invalid path","path",_),M[0]==="m"&&M.shift();let z=R;for(let F=0;F=16&&F.length<=64,"invalid seed","seed","[REDACTED]");const $=(0,i.getBytes)((0,t.computeHmac)("sha512",u,F)),W=new t.SigningKey((0,i.hexlify)($.slice(0,32)));return new N(m,W,"0x00000000",(0,i.hexlify)($.slice(32)),"m",0,0,z,null)},J(N,A);let b=N;e.HDNodeWallet=b;class v extends n.VoidSigner{constructor(M,z,F,$,W,G,H,L,q){super(z,q);Z(this,"publicKey");Z(this,"fingerprint");Z(this,"parentFingerprint");Z(this,"chainCode");Z(this,"path");Z(this,"index");Z(this,"depth");(0,i.assertPrivate)(M,m,"HDNodeVoidWallet"),(0,i.defineProperties)(this,{publicKey:F});const V=(0,i.dataSlice)((0,t.ripemd160)((0,t.sha256)(F)),0,4);(0,i.defineProperties)(this,{publicKey:F,fingerprint:V,parentFingerprint:$,chainCode:W,path:G,index:H,depth:L})}connect(M){return new v(m,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,M)}get extendedKey(){return(0,i.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),p((0,i.concat)(["0x0488B21E",h(this.depth,1),this.parentFingerprint,h(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(M){const z=(0,i.getNumber)(M,"index");(0,i.assertArgument)(z<=4294967295,"invalid index","index",z);let F=this.path;F&&(F+="/"+(z&~l),z&l&&(F+="'"));const{IR:$,IL:W}=x(z,this.chainCode,this.publicKey,null),G=t.SigningKey.addPoints(W,this.publicKey,!0),H=(0,r.computeAddress)(G);return new v(m,H,G,this.fingerprint,(0,i.hexlify)($),F,z,this.depth+1,this.provider)}derivePath(M){return y(this,M)}}e.HDNodeVoidWallet=v;function w(R){const _=(0,i.getNumber)(R,"index");return(0,i.assertArgument)(_>=0&&_=0&&_{setTimeout(()=>{h()},f)})}const d=class d extends n.BaseWallet{constructor(h,p){typeof h=="string"&&!h.startsWith("0x")&&(h="0x"+h);let m=typeof h=="string"?new e.SigningKey(h):h;super(m,p)}connect(h){return new d(this.signingKey,h)}async encrypt(h,p){const m={address:this.address,privateKey:this.privateKey};return await(0,o.encryptKeystoreJson)(m,h,{progressCallback:p})}encryptSync(h){const p={address:this.address,privateKey:this.privateKey};return(0,o.encryptKeystoreJsonSync)(p,h)}static async fromEncryptedJson(h,p,m){var y;let x=null;return(0,o.isKeystoreJson)(h)?x=await(0,o.decryptKeystoreJson)(h,p,m):(0,i.isCrowdsaleJson)(h)&&(m&&(m(0),await a(0)),x=(0,i.decryptCrowdsaleJson)(h,p),m&&(m(1),await a(0))),de(y=d,u,qR).call(y,x)}static fromEncryptedJsonSync(h,p){var x;let m=null;return(0,o.isKeystoreJson)(h)?m=(0,o.decryptKeystoreJsonSync)(h,p):(0,i.isCrowdsaleJson)(h)?m=(0,i.decryptCrowdsaleJson)(h,p):(0,t.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),de(x=d,u,qR).call(x,m)}static createRandom(h){const p=r.HDNodeWallet.createRandom();return h?p.connect(h):p}static fromPhrase(h,p){const m=r.HDNodeWallet.fromPhrase(h);return p?m.connect(p):m}};u=new WeakSet,qR=function(h){if((0,t.assertArgument)(h,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in h&&h.mnemonic&&h.mnemonic.locale==="en"){const m=s.Mnemonic.fromEntropy(h.mnemonic.entropy),x=r.HDNodeWallet.fromMnemonic(m,h.mnemonic.path);if(x.address===h.address&&x.privateKey===h.privateKey)return x;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const p=new d(h.privateKey);return(0,t.assertArgument)(p.address===h.address,"address/privateKey mismatch","json","[ REDACTED ]"),p},J(d,u);let c=d;return ab.Wallet=c,ab}var wQ;function Fet(){return wQ||(wQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wallet=e.Mnemonic=e.encryptKeystoreJsonSync=e.encryptKeystoreJson=e.decryptKeystoreJson=e.decryptKeystoreJsonSync=e.isKeystoreJson=e.decryptCrowdsaleJson=e.isCrowdsaleJson=e.HDNodeVoidWallet=e.HDNodeWallet=e.getIndexedAccountPath=e.getAccountPath=e.defaultPath=e.BaseWallet=void 0;var t=UM();Object.defineProperty(e,"BaseWallet",{enumerable:!0,get:function(){return t.BaseWallet}});var n=bfe();Object.defineProperty(e,"defaultPath",{enumerable:!0,get:function(){return n.defaultPath}}),Object.defineProperty(e,"getAccountPath",{enumerable:!0,get:function(){return n.getAccountPath}}),Object.defineProperty(e,"getIndexedAccountPath",{enumerable:!0,get:function(){return n.getIndexedAccountPath}}),Object.defineProperty(e,"HDNodeWallet",{enumerable:!0,get:function(){return n.HDNodeWallet}}),Object.defineProperty(e,"HDNodeVoidWallet",{enumerable:!0,get:function(){return n.HDNodeVoidWallet}});var r=vfe();Object.defineProperty(e,"isCrowdsaleJson",{enumerable:!0,get:function(){return r.isCrowdsaleJson}}),Object.defineProperty(e,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return r.decryptCrowdsaleJson}});var i=HM();Object.defineProperty(e,"isKeystoreJson",{enumerable:!0,get:function(){return i.isKeystoreJson}}),Object.defineProperty(e,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return i.decryptKeystoreJsonSync}}),Object.defineProperty(e,"decryptKeystoreJson",{enumerable:!0,get:function(){return i.decryptKeystoreJson}}),Object.defineProperty(e,"encryptKeystoreJson",{enumerable:!0,get:function(){return i.encryptKeystoreJson}}),Object.defineProperty(e,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return i.encryptKeystoreJsonSync}});var o=$M();Object.defineProperty(e,"Mnemonic",{enumerable:!0,get:function(){return o.Mnemonic}});var s=jet();Object.defineProperty(e,"Wallet",{enumerable:!0,get:function(){return s.Wallet}})}(qk)),qk}var Jk={},cb={},ub={},lb={},EQ;function Uet(){if(EQ)return lb;EQ=1,Object.defineProperty(lb,"__esModule",{value:!0}),lb.decodeBits=void 0;const e=")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";function t(n,r){const i=(1<=n;){const l=s>>a-n;s&=(1<{const c=a.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,e.assertArgument)(c!==null,"internal error parsing accents","accents",o);let u=0;const l=(0,t.decodeBits)(parseInt(c[3]),c[4]),d=parseInt(c[2]),f=new RegExp(`([${c[1]}])`,"g");s=s.replace(f,(h,p)=>(--l[u]===0&&(p=String.fromCharCode(p.charCodeAt(0),d),u++),p))}),s.split(",")}return ub.decodeOwlA=r,ub}var AQ;function $et(){var r;if(AQ)return cb;AQ=1,Object.defineProperty(cb,"__esModule",{value:!0}),cb.WordlistOwlA=void 0;const e=zM(),t=zet();class n extends e.WordlistOwl{constructor(s,a,c,u){super(s,a,u);J(this,r);D(this,r,c)}get _accent(){return C(this,r)}_decodeWords(){return(0,t.decodeOwlA)(this._data,this._accent)}}return r=new WeakMap,cb.WordlistOwlA=n,cb}var db={},SQ;function Het(){if(SQ)return db;SQ=1,Object.defineProperty(db,"__esModule",{value:!0}),db.wordlists=void 0;const e=xC();return db.wordlists={en:e.LangEn.wordlist()},db}var kQ;function Vet(){return kQ||(kQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wordlists=e.WordlistOwlA=e.WordlistOwl=e.LangEn=e.Wordlist=void 0;var t=gfe();Object.defineProperty(e,"Wordlist",{enumerable:!0,get:function(){return t.Wordlist}});var n=xC();Object.defineProperty(e,"LangEn",{enumerable:!0,get:function(){return n.LangEn}});var r=zM();Object.defineProperty(e,"WordlistOwl",{enumerable:!0,get:function(){return r.WordlistOwl}});var i=$et();Object.defineProperty(e,"WordlistOwlA",{enumerable:!0,get:function(){return i.WordlistOwlA}});var o=Het();Object.defineProperty(e,"wordlists",{enumerable:!0,get:function(){return o.wordlists}})}(Jk)),Jk}var TQ;function _Q(){return TQ||(TQ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ripemd160=e.keccak256=e.randomBytes=e.computeHmac=e.UndecodedEventLog=e.EventLog=e.ContractUnknownEventPayload=e.ContractTransactionResponse=e.ContractTransactionReceipt=e.ContractEventPayload=e.ContractFactory=e.Contract=e.BaseContract=e.MessagePrefix=e.EtherSymbol=e.ZeroHash=e.N=e.MaxInt256=e.MinInt256=e.MaxUint256=e.WeiPerEther=e.ZeroAddress=e.resolveAddress=e.isAddress=e.isAddressable=e.getCreate2Address=e.getCreateAddress=e.getIcapAddress=e.getAddress=e.Typed=e.TransactionDescription=e.Result=e.LogDescription=e.Interface=e.Indexed=e.ErrorDescription=e.checkResultErrors=e.StructFragment=e.ParamType=e.NamedFragment=e.FunctionFragment=e.FallbackFragment=e.Fragment=e.EventFragment=e.ErrorFragment=e.ConstructorFragment=e.AbiCoder=e.encodeBytes32String=e.decodeBytes32String=e.version=void 0,e.EtherscanPlugin=e.EnsPlugin=e.Network=e.EnsResolver=e.WebSocketProvider=e.SocketProvider=e.IpcSocketProvider=e.QuickNodeProvider=e.PocketProvider=e.InfuraWebSocketProvider=e.InfuraProvider=e.EtherscanProvider=e.CloudflareProvider=e.AnkrProvider=e.AlchemyProvider=e.BrowserProvider=e.JsonRpcSigner=e.JsonRpcProvider=e.JsonRpcApiProvider=e.FallbackProvider=e.AbstractProvider=e.VoidSigner=e.NonceManager=e.AbstractSigner=e.TransactionResponse=e.TransactionReceipt=e.Log=e.FeeData=e.Block=e.getDefaultProvider=e.verifyTypedData=e.TypedDataEncoder=e.solidityPackedSha256=e.solidityPackedKeccak256=e.solidityPacked=e.verifyMessage=e.hashMessage=e.dnsEncode=e.namehash=e.isValidName=e.ensNormalize=e.id=e.SigningKey=e.Signature=e.lock=e.scryptSync=e.scrypt=e.pbkdf2=e.sha512=e.sha256=void 0,e.toBeArray=e.getUint=e.getNumber=e.getBigInt=e.FixedNumber=e.FetchCancelSignal=e.FetchResponse=e.FetchRequest=e.EventPayload=e.isError=e.isCallException=e.makeError=e.assertPrivate=e.assertNormalize=e.assertArgumentCount=e.assertArgument=e.assert=e.resolveProperties=e.defineProperties=e.zeroPadValue=e.zeroPadBytes=e.stripZerosLeft=e.isBytesLike=e.isHexString=e.hexlify=e.getBytesCopy=e.getBytes=e.dataSlice=e.dataLength=e.concat=e.encodeBase64=e.decodeBase64=e.encodeBase58=e.decodeBase58=e.Transaction=e.recoverAddress=e.computeAddress=e.accessListify=e.showThrottleMessage=e.copyRequest=e.UnmanagedSubscriber=e.SocketSubscriber=e.SocketPendingSubscriber=e.SocketEventSubscriber=e.SocketBlockSubscriber=e.MulticoinProviderPlugin=e.NetworkPlugin=e.GasCostPlugin=e.FetchUrlFeeDataNetworkPlugin=e.FeeDataNetworkPlugin=void 0,e.wordlists=e.WordlistOwlA=e.WordlistOwl=e.LangEn=e.Wordlist=e.encryptKeystoreJsonSync=e.encryptKeystoreJson=e.decryptKeystoreJson=e.decryptKeystoreJsonSync=e.decryptCrowdsaleJson=e.isKeystoreJson=e.isCrowdsaleJson=e.getIndexedAccountPath=e.getAccountPath=e.defaultPath=e.Wallet=e.HDNodeVoidWallet=e.HDNodeWallet=e.BaseWallet=e.Mnemonic=e.uuidV4=e.encodeRlp=e.decodeRlp=e.Utf8ErrorFuncs=e.toUtf8String=e.toUtf8CodePoints=e.toUtf8Bytes=e.parseUnits=e.formatUnits=e.parseEther=e.formatEther=e.mask=e.toTwos=e.fromTwos=e.toQuantity=e.toNumber=e.toBeHex=e.toBigInt=void 0;var t=RM();Object.defineProperty(e,"version",{enumerable:!0,get:function(){return t.version}});var n=V5();Object.defineProperty(e,"decodeBytes32String",{enumerable:!0,get:function(){return n.decodeBytes32String}}),Object.defineProperty(e,"encodeBytes32String",{enumerable:!0,get:function(){return n.encodeBytes32String}}),Object.defineProperty(e,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}}),Object.defineProperty(e,"ConstructorFragment",{enumerable:!0,get:function(){return n.ConstructorFragment}}),Object.defineProperty(e,"ErrorFragment",{enumerable:!0,get:function(){return n.ErrorFragment}}),Object.defineProperty(e,"EventFragment",{enumerable:!0,get:function(){return n.EventFragment}}),Object.defineProperty(e,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(e,"FallbackFragment",{enumerable:!0,get:function(){return n.FallbackFragment}}),Object.defineProperty(e,"FunctionFragment",{enumerable:!0,get:function(){return n.FunctionFragment}}),Object.defineProperty(e,"NamedFragment",{enumerable:!0,get:function(){return n.NamedFragment}}),Object.defineProperty(e,"ParamType",{enumerable:!0,get:function(){return n.ParamType}}),Object.defineProperty(e,"StructFragment",{enumerable:!0,get:function(){return n.StructFragment}}),Object.defineProperty(e,"checkResultErrors",{enumerable:!0,get:function(){return n.checkResultErrors}}),Object.defineProperty(e,"ErrorDescription",{enumerable:!0,get:function(){return n.ErrorDescription}}),Object.defineProperty(e,"Indexed",{enumerable:!0,get:function(){return n.Indexed}}),Object.defineProperty(e,"Interface",{enumerable:!0,get:function(){return n.Interface}}),Object.defineProperty(e,"LogDescription",{enumerable:!0,get:function(){return n.LogDescription}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return n.Result}}),Object.defineProperty(e,"TransactionDescription",{enumerable:!0,get:function(){return n.TransactionDescription}}),Object.defineProperty(e,"Typed",{enumerable:!0,get:function(){return n.Typed}});var r=jr();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return r.getAddress}}),Object.defineProperty(e,"getIcapAddress",{enumerable:!0,get:function(){return r.getIcapAddress}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return r.getCreateAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return r.getCreate2Address}}),Object.defineProperty(e,"isAddressable",{enumerable:!0,get:function(){return r.isAddressable}}),Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return r.isAddress}}),Object.defineProperty(e,"resolveAddress",{enumerable:!0,get:function(){return r.resolveAddress}});var i=H5();Object.defineProperty(e,"ZeroAddress",{enumerable:!0,get:function(){return i.ZeroAddress}}),Object.defineProperty(e,"WeiPerEther",{enumerable:!0,get:function(){return i.WeiPerEther}}),Object.defineProperty(e,"MaxUint256",{enumerable:!0,get:function(){return i.MaxUint256}}),Object.defineProperty(e,"MinInt256",{enumerable:!0,get:function(){return i.MinInt256}}),Object.defineProperty(e,"MaxInt256",{enumerable:!0,get:function(){return i.MaxInt256}}),Object.defineProperty(e,"N",{enumerable:!0,get:function(){return i.N}}),Object.defineProperty(e,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}}),Object.defineProperty(e,"EtherSymbol",{enumerable:!0,get:function(){return i.EtherSymbol}}),Object.defineProperty(e,"MessagePrefix",{enumerable:!0,get:function(){return i.MessagePrefix}});var o=vC();Object.defineProperty(e,"BaseContract",{enumerable:!0,get:function(){return o.BaseContract}}),Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractFactory",{enumerable:!0,get:function(){return o.ContractFactory}}),Object.defineProperty(e,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(e,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(e,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(e,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(e,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(e,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}});var s=ti();Object.defineProperty(e,"computeHmac",{enumerable:!0,get:function(){return s.computeHmac}}),Object.defineProperty(e,"randomBytes",{enumerable:!0,get:function(){return s.randomBytes}}),Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return s.keccak256}}),Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return s.ripemd160}}),Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return s.sha256}}),Object.defineProperty(e,"sha512",{enumerable:!0,get:function(){return s.sha512}}),Object.defineProperty(e,"pbkdf2",{enumerable:!0,get:function(){return s.pbkdf2}}),Object.defineProperty(e,"scrypt",{enumerable:!0,get:function(){return s.scrypt}}),Object.defineProperty(e,"scryptSync",{enumerable:!0,get:function(){return s.scryptSync}}),Object.defineProperty(e,"lock",{enumerable:!0,get:function(){return s.lock}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return s.Signature}}),Object.defineProperty(e,"SigningKey",{enumerable:!0,get:function(){return s.SigningKey}});var a=Tl();Object.defineProperty(e,"id",{enumerable:!0,get:function(){return a.id}}),Object.defineProperty(e,"ensNormalize",{enumerable:!0,get:function(){return a.ensNormalize}}),Object.defineProperty(e,"isValidName",{enumerable:!0,get:function(){return a.isValidName}}),Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return a.namehash}}),Object.defineProperty(e,"dnsEncode",{enumerable:!0,get:function(){return a.dnsEncode}}),Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return a.hashMessage}}),Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return a.verifyMessage}}),Object.defineProperty(e,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(e,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(e,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}}),Object.defineProperty(e,"TypedDataEncoder",{enumerable:!0,get:function(){return a.TypedDataEncoder}}),Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return a.verifyTypedData}});var c=FM();Object.defineProperty(e,"getDefaultProvider",{enumerable:!0,get:function(){return c.getDefaultProvider}}),Object.defineProperty(e,"Block",{enumerable:!0,get:function(){return c.Block}}),Object.defineProperty(e,"FeeData",{enumerable:!0,get:function(){return c.FeeData}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return c.Log}}),Object.defineProperty(e,"TransactionReceipt",{enumerable:!0,get:function(){return c.TransactionReceipt}}),Object.defineProperty(e,"TransactionResponse",{enumerable:!0,get:function(){return c.TransactionResponse}}),Object.defineProperty(e,"AbstractSigner",{enumerable:!0,get:function(){return c.AbstractSigner}}),Object.defineProperty(e,"NonceManager",{enumerable:!0,get:function(){return c.NonceManager}}),Object.defineProperty(e,"VoidSigner",{enumerable:!0,get:function(){return c.VoidSigner}}),Object.defineProperty(e,"AbstractProvider",{enumerable:!0,get:function(){return c.AbstractProvider}}),Object.defineProperty(e,"FallbackProvider",{enumerable:!0,get:function(){return c.FallbackProvider}}),Object.defineProperty(e,"JsonRpcApiProvider",{enumerable:!0,get:function(){return c.JsonRpcApiProvider}}),Object.defineProperty(e,"JsonRpcProvider",{enumerable:!0,get:function(){return c.JsonRpcProvider}}),Object.defineProperty(e,"JsonRpcSigner",{enumerable:!0,get:function(){return c.JsonRpcSigner}}),Object.defineProperty(e,"BrowserProvider",{enumerable:!0,get:function(){return c.BrowserProvider}}),Object.defineProperty(e,"AlchemyProvider",{enumerable:!0,get:function(){return c.AlchemyProvider}}),Object.defineProperty(e,"AnkrProvider",{enumerable:!0,get:function(){return c.AnkrProvider}}),Object.defineProperty(e,"CloudflareProvider",{enumerable:!0,get:function(){return c.CloudflareProvider}}),Object.defineProperty(e,"EtherscanProvider",{enumerable:!0,get:function(){return c.EtherscanProvider}}),Object.defineProperty(e,"InfuraProvider",{enumerable:!0,get:function(){return c.InfuraProvider}}),Object.defineProperty(e,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return c.InfuraWebSocketProvider}}),Object.defineProperty(e,"PocketProvider",{enumerable:!0,get:function(){return c.PocketProvider}}),Object.defineProperty(e,"QuickNodeProvider",{enumerable:!0,get:function(){return c.QuickNodeProvider}}),Object.defineProperty(e,"IpcSocketProvider",{enumerable:!0,get:function(){return c.IpcSocketProvider}}),Object.defineProperty(e,"SocketProvider",{enumerable:!0,get:function(){return c.SocketProvider}}),Object.defineProperty(e,"WebSocketProvider",{enumerable:!0,get:function(){return c.WebSocketProvider}}),Object.defineProperty(e,"EnsResolver",{enumerable:!0,get:function(){return c.EnsResolver}}),Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return c.Network}}),Object.defineProperty(e,"EnsPlugin",{enumerable:!0,get:function(){return c.EnsPlugin}}),Object.defineProperty(e,"EtherscanPlugin",{enumerable:!0,get:function(){return c.EtherscanPlugin}}),Object.defineProperty(e,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return c.FeeDataNetworkPlugin}}),Object.defineProperty(e,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return c.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(e,"GasCostPlugin",{enumerable:!0,get:function(){return c.GasCostPlugin}}),Object.defineProperty(e,"NetworkPlugin",{enumerable:!0,get:function(){return c.NetworkPlugin}}),Object.defineProperty(e,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return c.MulticoinProviderPlugin}}),Object.defineProperty(e,"SocketBlockSubscriber",{enumerable:!0,get:function(){return c.SocketBlockSubscriber}}),Object.defineProperty(e,"SocketEventSubscriber",{enumerable:!0,get:function(){return c.SocketEventSubscriber}}),Object.defineProperty(e,"SocketPendingSubscriber",{enumerable:!0,get:function(){return c.SocketPendingSubscriber}}),Object.defineProperty(e,"SocketSubscriber",{enumerable:!0,get:function(){return c.SocketSubscriber}}),Object.defineProperty(e,"UnmanagedSubscriber",{enumerable:!0,get:function(){return c.UnmanagedSubscriber}}),Object.defineProperty(e,"copyRequest",{enumerable:!0,get:function(){return c.copyRequest}}),Object.defineProperty(e,"showThrottleMessage",{enumerable:!0,get:function(){return c.showThrottleMessage}});var u=rs();Object.defineProperty(e,"accessListify",{enumerable:!0,get:function(){return u.accessListify}}),Object.defineProperty(e,"computeAddress",{enumerable:!0,get:function(){return u.computeAddress}}),Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return u.recoverAddress}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return u.Transaction}});var l=Je();Object.defineProperty(e,"decodeBase58",{enumerable:!0,get:function(){return l.decodeBase58}}),Object.defineProperty(e,"encodeBase58",{enumerable:!0,get:function(){return l.encodeBase58}}),Object.defineProperty(e,"decodeBase64",{enumerable:!0,get:function(){return l.decodeBase64}}),Object.defineProperty(e,"encodeBase64",{enumerable:!0,get:function(){return l.encodeBase64}}),Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return l.concat}}),Object.defineProperty(e,"dataLength",{enumerable:!0,get:function(){return l.dataLength}}),Object.defineProperty(e,"dataSlice",{enumerable:!0,get:function(){return l.dataSlice}}),Object.defineProperty(e,"getBytes",{enumerable:!0,get:function(){return l.getBytes}}),Object.defineProperty(e,"getBytesCopy",{enumerable:!0,get:function(){return l.getBytesCopy}}),Object.defineProperty(e,"hexlify",{enumerable:!0,get:function(){return l.hexlify}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return l.isHexString}}),Object.defineProperty(e,"isBytesLike",{enumerable:!0,get:function(){return l.isBytesLike}}),Object.defineProperty(e,"stripZerosLeft",{enumerable:!0,get:function(){return l.stripZerosLeft}}),Object.defineProperty(e,"zeroPadBytes",{enumerable:!0,get:function(){return l.zeroPadBytes}}),Object.defineProperty(e,"zeroPadValue",{enumerable:!0,get:function(){return l.zeroPadValue}}),Object.defineProperty(e,"defineProperties",{enumerable:!0,get:function(){return l.defineProperties}}),Object.defineProperty(e,"resolveProperties",{enumerable:!0,get:function(){return l.resolveProperties}}),Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return l.assert}}),Object.defineProperty(e,"assertArgument",{enumerable:!0,get:function(){return l.assertArgument}}),Object.defineProperty(e,"assertArgumentCount",{enumerable:!0,get:function(){return l.assertArgumentCount}}),Object.defineProperty(e,"assertNormalize",{enumerable:!0,get:function(){return l.assertNormalize}}),Object.defineProperty(e,"assertPrivate",{enumerable:!0,get:function(){return l.assertPrivate}}),Object.defineProperty(e,"makeError",{enumerable:!0,get:function(){return l.makeError}}),Object.defineProperty(e,"isCallException",{enumerable:!0,get:function(){return l.isCallException}}),Object.defineProperty(e,"isError",{enumerable:!0,get:function(){return l.isError}}),Object.defineProperty(e,"EventPayload",{enumerable:!0,get:function(){return l.EventPayload}}),Object.defineProperty(e,"FetchRequest",{enumerable:!0,get:function(){return l.FetchRequest}}),Object.defineProperty(e,"FetchResponse",{enumerable:!0,get:function(){return l.FetchResponse}}),Object.defineProperty(e,"FetchCancelSignal",{enumerable:!0,get:function(){return l.FetchCancelSignal}}),Object.defineProperty(e,"FixedNumber",{enumerable:!0,get:function(){return l.FixedNumber}}),Object.defineProperty(e,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(e,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(e,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(e,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(e,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(e,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(e,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}}),Object.defineProperty(e,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(e,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(e,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return l.formatEther}}),Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return l.parseEther}}),Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return l.formatUnits}}),Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return l.parseUnits}}),Object.defineProperty(e,"toUtf8Bytes",{enumerable:!0,get:function(){return l.toUtf8Bytes}}),Object.defineProperty(e,"toUtf8CodePoints",{enumerable:!0,get:function(){return l.toUtf8CodePoints}}),Object.defineProperty(e,"toUtf8String",{enumerable:!0,get:function(){return l.toUtf8String}}),Object.defineProperty(e,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return l.Utf8ErrorFuncs}}),Object.defineProperty(e,"decodeRlp",{enumerable:!0,get:function(){return l.decodeRlp}}),Object.defineProperty(e,"encodeRlp",{enumerable:!0,get:function(){return l.encodeRlp}}),Object.defineProperty(e,"uuidV4",{enumerable:!0,get:function(){return l.uuidV4}});var d=Fet();Object.defineProperty(e,"Mnemonic",{enumerable:!0,get:function(){return d.Mnemonic}}),Object.defineProperty(e,"BaseWallet",{enumerable:!0,get:function(){return d.BaseWallet}}),Object.defineProperty(e,"HDNodeWallet",{enumerable:!0,get:function(){return d.HDNodeWallet}}),Object.defineProperty(e,"HDNodeVoidWallet",{enumerable:!0,get:function(){return d.HDNodeVoidWallet}}),Object.defineProperty(e,"Wallet",{enumerable:!0,get:function(){return d.Wallet}}),Object.defineProperty(e,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(e,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(e,"getIndexedAccountPath",{enumerable:!0,get:function(){return d.getIndexedAccountPath}}),Object.defineProperty(e,"isCrowdsaleJson",{enumerable:!0,get:function(){return d.isCrowdsaleJson}}),Object.defineProperty(e,"isKeystoreJson",{enumerable:!0,get:function(){return d.isKeystoreJson}}),Object.defineProperty(e,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return d.decryptCrowdsaleJson}}),Object.defineProperty(e,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return d.decryptKeystoreJsonSync}}),Object.defineProperty(e,"decryptKeystoreJson",{enumerable:!0,get:function(){return d.decryptKeystoreJson}}),Object.defineProperty(e,"encryptKeystoreJson",{enumerable:!0,get:function(){return d.encryptKeystoreJson}}),Object.defineProperty(e,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return d.encryptKeystoreJsonSync}});var f=Vet();Object.defineProperty(e,"Wordlist",{enumerable:!0,get:function(){return f.Wordlist}}),Object.defineProperty(e,"LangEn",{enumerable:!0,get:function(){return f.LangEn}}),Object.defineProperty(e,"WordlistOwl",{enumerable:!0,get:function(){return f.WordlistOwl}}),Object.defineProperty(e,"WordlistOwlA",{enumerable:!0,get:function(){return f.WordlistOwlA}}),Object.defineProperty(e,"wordlists",{enumerable:!0,get:function(){return f.wordlists}})}(Dk)),Dk}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ethers=void 0;const t=Ude,n=t.__importStar(_Q());e.ethers=n,t.__exportStar(_Q(),e)})(E2);var C2={},ap={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ERC2771Type=e.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA=e.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA=e.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA=e.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA=void 0,e.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA={SponsoredCallERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userNonce",type:"uint256"},{name:"userDeadline",type:"uint256"}]},e.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA={CallWithSyncFeeERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userNonce",type:"uint256"},{name:"userDeadline",type:"uint256"}]},e.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA={SponsoredCallConcurrentERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userSalt",type:"bytes32"},{name:"userDeadline",type:"uint256"}]},e.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA={CallWithSyncFeeConcurrentERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userSalt",type:"bytes32"},{name:"userDeadline",type:"uint256"}]},function(t){t.CallWithSyncFee="CallWithSyncFee",t.SponsoredCall="SponsoredCall",t.ConcurrentCallWithSyncFee="ConcurrentCallWithSyncFee",t.ConcurrentSponsoredCall="ConcurrentSponsoredCall"}(e.ERC2771Type||(e.ERC2771Type={}))})(ap);var K5={};Object.defineProperty(K5,"__esModule",{value:!0});K5.isZkSync=void 0;const Wet=e=>e===BigInt(324)||e===BigInt(280);K5.isZkSync=Wet;Object.defineProperty(C2,"__esModule",{value:!0});C2.getGelatoRelayERC2771Address=void 0;const Gl=E2,P6=ap,I6=K5,Get=(e,t)=>{const{chainId:n,type:r}=e;switch(r){case P6.ERC2771Type.CallWithSyncFee:return(0,I6.isZkSync)(n)?(0,Gl.getAddress)(t.contract.relayERC2771zkSync):(0,Gl.getAddress)(t.contract.relayERC2771);case P6.ERC2771Type.SponsoredCall:return(0,I6.isZkSync)(n)?(0,Gl.getAddress)(t.contract.relay1BalanceERC2771zkSync):(0,Gl.getAddress)(t.contract.relay1BalanceERC2771);case P6.ERC2771Type.ConcurrentCallWithSyncFee:return(0,I6.isZkSync)(n)?(0,Gl.getAddress)(t.contract.relayConcurrentERC2771zkSync):(0,Gl.getAddress)(t.contract.relayConcurrentERC2771);case P6.ERC2771Type.ConcurrentSponsoredCall:return(0,I6.isZkSync)(n)?(0,Gl.getAddress)(t.contract.relay1BalanceConcurrentERC2771zkSync):(0,Gl.getAddress)(t.contract.relay1BalanceConcurrentERC2771);default:return r}};C2.getGelatoRelayERC2771Address=Get;var A2={},Ket=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(A2,"__esModule",{value:!0});A2.getProviderChainId=void 0;const Qet=w2,Yet=e=>Ket(void 0,void 0,void 0,function*(){let t;if((0,Qet.isSigner)(e)){if(!e.provider)throw new Error("Missing provider");t=e.provider}else t=e;const{chainId:n}=yield t.getNetwork();return n});A2.getProviderChainId=Yet;var qet=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(z5,"__esModule",{value:!0});z5.getUserNonce=void 0;const Zet=E2,Jet=Yt,Xet=C2,ett=A2,ttt=(e,t)=>qet(void 0,void 0,void 0,function*(){const{account:n,type:r,signerOrProvider:i}=e;if(!i.provider)throw new Error("Missing provider");const o=yield(0,ett.getProviderChainId)(i);return yield new Zet.Contract((0,Xet.getGelatoRelayERC2771Address)({chainId:o,type:r},t),Jet.USER_NONCE_ABI,i).userNonce(n)});z5.getUserNonce=ttt;var wC={};Object.defineProperty(wC,"__esModule",{value:!0});wC.getEIP712Domain=void 0;const R6=ap,N6=C2,ntt=(e,t)=>{const{chainId:n,type:r}=e;switch(r){case R6.ERC2771Type.CallWithSyncFee:return{name:"GelatoRelayERC2771",version:"1",chainId:n.toString(),verifyingContract:(0,N6.getGelatoRelayERC2771Address)({chainId:n,type:r},t)};case R6.ERC2771Type.SponsoredCall:return{name:"GelatoRelay1BalanceERC2771",version:"1",chainId:n.toString(),verifyingContract:(0,N6.getGelatoRelayERC2771Address)({chainId:n,type:r},t)};case R6.ERC2771Type.ConcurrentCallWithSyncFee:return{name:"GelatoRelayConcurrentERC2771",version:"1",chainId:n.toString(),verifyingContract:(0,N6.getGelatoRelayERC2771Address)({chainId:n,type:r},t)};case R6.ERC2771Type.ConcurrentSponsoredCall:return{name:"GelatoRelay1BalanceConcurrentERC2771",version:"1",chainId:n.toString(),verifyingContract:(0,N6.getGelatoRelayERC2771Address)({chainId:n,type:r},t)};default:return r}};wC.getEIP712Domain=ntt;var Q5={};Object.defineProperty(Q5,"__esModule",{value:!0});Q5.getHttpErrorMessage=void 0;const rtt=Yt,itt=e=>{var t,n,r,i;return(i=(r=(n=(t=e.response)===null||t===void 0?void 0:t.data)===null||n===void 0?void 0:n.message)!==null&&r!==void 0?r:e.message)!==null&&i!==void 0?i:rtt.DEFAULT_INTERNAL_ERROR_MESSAGE};Q5.getHttpErrorMessage=itt;var EC={},Y5={};Object.defineProperty(Y5,"__esModule",{value:!0});Y5.isConcurrentRequest=void 0;const ott=e=>!!e.isConcurrent;Y5.isConcurrentRequest=ott;var q5={};Object.defineProperty(q5,"__esModule",{value:!0});q5.generateSalt=void 0;const PQ=E2,stt=()=>{const e=Math.floor(Math.random()*1e6),t=PQ.AbiCoder.defaultAbiCoder().encode(["uint256","uint256"],[e,new Date().getMilliseconds()]);return(0,PQ.keccak256)(t)};q5.generateSalt=stt;var att=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(EC,"__esModule",{value:!0});EC.populateOptionalUserParameters=void 0;const IQ=Yt,RQ=U5,ctt=z5,utt=Y5,ltt=q5,dtt=A2;function ftt(e,t){return att(this,void 0,void 0,function*(){if((0,utt.isConcurrentRequest)(e.request)){const{request:n}=e,r={};return n.userDeadline||(r.userDeadline=(0,RQ.calculateDeadline)(IQ.DEFAULT_DEADLINE_GAP)),n.userSalt||(r.userSalt=(0,ltt.generateSalt)()),r}else{const{type:n,signerOrProvider:r,request:i}=e,o={};if(i.userDeadline||(o.userDeadline=(0,RQ.calculateDeadline)(IQ.DEFAULT_DEADLINE_GAP)),i.userNonce===void 0){if(!r||!r.provider)throw new Error("Missing provider.");const s=yield(0,dtt.getProviderChainId)(r);if(i.chainId!==s)throw new Error(`Request and provider chain id mismatch. Request: [${i.chainId.toString()}], provider: [${s.toString()}]`);o.userNonce=yield(0,ctt.getUserNonce)({account:i.user,type:n,signerOrProvider:r},t)}return o}})}EC.populateOptionalUserParameters=ftt;var CC={},_l={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EIP712_DOMAIN_TYPE_DATA=e.RelayCall=void 0,function(t){t[t.CallWithSyncFee=0]="CallWithSyncFee",t[t.CallWithSyncFeeERC2771=1]="CallWithSyncFeeERC2771",t[t.SponsoredCall=2]="SponsoredCall",t[t.SponsoredCallERC2771=3]="SponsoredCallERC2771"}(e.RelayCall||(e.RelayCall={})),e.EIP712_DOMAIN_TYPE_DATA={EIP712Domain:[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}]}})(_l);var Z5={},VM={exports:{}},xfe=function(t,n){return function(){for(var i=new Array(arguments.length),o=0;o"u"}function ptt(e){return e!==null&&!q9(e)&&e.constructor!==null&&!q9(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var wfe=cp("ArrayBuffer");function gtt(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wfe(e.buffer),t}function mtt(e){return typeof e=="string"}function ytt(e){return typeof e=="number"}function Efe(e){return e!==null&&typeof e=="object"}function J8(e){if(GM(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var btt=cp("Date"),vtt=cp("File"),xtt=cp("Blob"),wtt=cp("FileList");function QM(e){return WM.call(e)==="[object Function]"}function Ett(e){return Efe(e)&&QM(e.pipe)}function Ctt(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||WM.call(e)===t||QM(e.toString)&&e.toString()===t)}var Att=cp("URLSearchParams");function Stt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ktt(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function YM(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),KM(e))for(var n=0,r=e.length;n0;)o=r[i],s[o]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function Rtt(e,t,n){e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return r!==-1&&r===n}function Ntt(e){if(!e)return null;var t=e.length;if(q9(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var Ott=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),ni={isArray:KM,isArrayBuffer:wfe,isBuffer:ptt,isFormData:Ctt,isArrayBufferView:gtt,isString:mtt,isNumber:ytt,isObject:Efe,isPlainObject:J8,isUndefined:q9,isDate:btt,isFile:vtt,isBlob:xtt,isFunction:QM,isStream:Ett,isURLSearchParams:Att,isStandardBrowserEnv:ktt,forEach:YM,merge:ZR,extend:Ttt,trim:Stt,stripBOM:_tt,inherits:Ptt,toFlatObject:Itt,kindOf:GM,kindOfTest:cp,endsWith:Rtt,toArray:Ntt,isTypedArray:Ott,isFileList:wtt},Rp=ni;function NQ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Cfe=function(t,n,r){if(!n)return t;var i;if(r)i=r(n);else if(Rp.isURLSearchParams(n))i=n.toString();else{var o=[];Rp.forEach(n,function(c,u){c===null||typeof c>"u"||(Rp.isArray(c)?u=u+"[]":c=[c],Rp.forEach(c,function(d){Rp.isDate(d)?d=d.toISOString():Rp.isObject(d)&&(d=JSON.stringify(d)),o.push(NQ(u)+"="+NQ(d))}))}),i=o.join("&")}if(i){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t},Ltt=ni;function AC(){this.handlers=[]}AC.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};AC.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};AC.prototype.forEach=function(t){Ltt.forEach(this.handlers,function(r){r!==null&&t(r)})};var Btt=AC,Mtt=ni,Dtt=function(t,n){Mtt.forEach(t,function(i,o){o!==n&&o.toUpperCase()===n.toUpperCase()&&(t[n]=i,delete t[o])})},Afe=ni;function $m(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Afe.inherits($m,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Sfe=$m.prototype,kfe={};["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"].forEach(function(e){kfe[e]={value:e}});Object.defineProperties($m,kfe);Object.defineProperty(Sfe,"isAxiosError",{value:!0});$m.from=function(e,t,n,r,i,o){var s=Object.create(Sfe);return Afe.toFlatObject(e,s,function(c){return c!==Error.prototype}),$m.call(s,e.message,t,n,r,i),s.name=e.name,o&&Object.assign(s,o),s};var S2=$m,Tfe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},da=ni;function jtt(e,t){t=t||new FormData;var n=[];function r(o){return o===null?"":da.isDate(o)?o.toISOString():da.isArrayBuffer(o)||da.isTypedArray(o)?typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function i(o,s){if(da.isPlainObject(o)||da.isArray(o)){if(n.indexOf(o)!==-1)throw Error("Circular reference detected in "+s);n.push(o),da.forEach(o,function(c,u){if(!da.isUndefined(c)){var l=s?s+"."+u:u,d;if(c&&!s&&typeof c=="object"){if(da.endsWith(u,"{}"))c=JSON.stringify(c);else if(da.endsWith(u,"[]")&&(d=da.toArray(c))){d.forEach(function(f){!da.isUndefined(f)&&t.append(l,r(f))});return}}i(c,l)}}),n.pop()}else t.append(s,r(o))}return i(e),t}var _fe=jtt,Xk,OQ;function Ftt(){if(OQ)return Xk;OQ=1;var e=S2;return Xk=function(n,r,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?n(i):r(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Xk}var eT,LQ;function Utt(){if(LQ)return eT;LQ=1;var e=ni;return eT=e.isStandardBrowserEnv()?function(){return{write:function(r,i,o,s,a,c){var u=[];u.push(r+"="+encodeURIComponent(i)),e.isNumber(o)&&u.push("expires="+new Date(o).toGMTString()),e.isString(s)&&u.push("path="+s),e.isString(a)&&u.push("domain="+a),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),eT}var ztt=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},$tt=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},Htt=ztt,Vtt=$tt,Pfe=function(t,n){return t&&!Htt(n)?Vtt(t,n):n},tT,BQ;function Wtt(){if(BQ)return tT;BQ=1;var e=ni,t=["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"];return tT=function(r){var i={},o,s,a;return r&&e.forEach(r.split(` +`),function(u){if(a=u.indexOf(":"),o=e.trim(u.substr(0,a)).toLowerCase(),s=e.trim(u.substr(a+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([s]):i[o]=i[o]?i[o]+", "+s:s}}),i},tT}var nT,MQ;function Gtt(){if(MQ)return nT;MQ=1;var e=ni;return nT=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function o(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=o(window.location.href),function(a){var c=e.isString(a)?o(a):a;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}(),nT}var rT,DQ;function SC(){if(DQ)return rT;DQ=1;var e=S2,t=ni;function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),rT=n,rT}var iT,jQ;function Ktt(){return jQ||(jQ=1,iT=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),iT}var oT,FQ;function UQ(){if(FQ)return oT;FQ=1;var e=ni,t=Ftt(),n=Utt(),r=Cfe,i=Pfe,o=Wtt(),s=Gtt(),a=Tfe,c=S2,u=SC(),l=Ktt();return oT=function(f){return new Promise(function(p,m){var x=f.data,y=f.headers,b=f.responseType,v;function w(){f.cancelToken&&f.cancelToken.unsubscribe(v),f.signal&&f.signal.removeEventListener("abort",v)}e.isFormData(x)&&e.isStandardBrowserEnv()&&delete y["Content-Type"];var E=new XMLHttpRequest;if(f.auth){var S=f.auth.username||"",I=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";y.Authorization="Basic "+btoa(S+":"+I)}var A=i(f.baseURL,f.url);E.open(f.method.toUpperCase(),r(A,f.params,f.paramsSerializer),!0),E.timeout=f.timeout;function O(){if(E){var _="getAllResponseHeaders"in E?o(E.getAllResponseHeaders()):null,M=!b||b==="text"||b==="json"?E.responseText:E.response,z={data:M,status:E.status,statusText:E.statusText,headers:_,config:f,request:E};t(function($){p($),w()},function($){m($),w()},z),E=null}}if("onloadend"in E?E.onloadend=O:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(O)},E.onabort=function(){E&&(m(new c("Request aborted",c.ECONNABORTED,f,E)),E=null)},E.onerror=function(){m(new c("Network Error",c.ERR_NETWORK,f,E,E)),E=null},E.ontimeout=function(){var M=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",z=f.transitional||a;f.timeoutErrorMessage&&(M=f.timeoutErrorMessage),m(new c(M,z.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,f,E)),E=null},e.isStandardBrowserEnv()){var N=(f.withCredentials||s(A))&&f.xsrfCookieName?n.read(f.xsrfCookieName):void 0;N&&(y[f.xsrfHeaderName]=N)}"setRequestHeader"in E&&e.forEach(y,function(M,z){typeof x>"u"&&z.toLowerCase()==="content-type"?delete y[z]:E.setRequestHeader(z,M)}),e.isUndefined(f.withCredentials)||(E.withCredentials=!!f.withCredentials),b&&b!=="json"&&(E.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&E.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&E.upload&&E.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(v=function(_){E&&(m(!_||_&&_.type?new u:_),E.abort(),E=null)},f.cancelToken&&f.cancelToken.subscribe(v),f.signal&&(f.signal.aborted?v():f.signal.addEventListener("abort",v))),x||(x=null);var R=l(A);if(R&&["http","https","file"].indexOf(R)===-1){m(new c("Unsupported protocol "+R+":",c.ERR_BAD_REQUEST,f));return}E.send(x)})},oT}var sT,zQ;function Qtt(){return zQ||(zQ=1,sT=null),sT}var Ir=ni,$Q=Dtt,HQ=S2,Ytt=Tfe,qtt=_fe,Ztt={"Content-Type":"application/x-www-form-urlencoded"};function VQ(e,t){!Ir.isUndefined(e)&&Ir.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function Jtt(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=UQ()),e}function Xtt(e,t,n){if(Ir.isString(e))try{return(t||JSON.parse)(e),Ir.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}var kC={transitional:Ytt,adapter:Jtt(),transformRequest:[function(t,n){if($Q(n,"Accept"),$Q(n,"Content-Type"),Ir.isFormData(t)||Ir.isArrayBuffer(t)||Ir.isBuffer(t)||Ir.isStream(t)||Ir.isFile(t)||Ir.isBlob(t))return t;if(Ir.isArrayBufferView(t))return t.buffer;if(Ir.isURLSearchParams(t))return VQ(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r=Ir.isObject(t),i=n&&n["Content-Type"],o;if((o=Ir.isFileList(t))||r&&i==="multipart/form-data"){var s=this.env&&this.env.FormData;return qtt(o?{"files[]":t}:t,s&&new s)}else if(r||i==="application/json")return VQ(n,"application/json"),Xtt(t);return t}],transformResponse:[function(t){var n=this.transitional||kC.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,o=!r&&this.responseType==="json";if(o||i&&Ir.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?HQ.from(s,HQ.ERR_BAD_RESPONSE,this,null,this.response):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qtt()},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ir.forEach(["delete","get","head"],function(t){kC.headers[t]={}});Ir.forEach(["post","put","patch"],function(t){kC.headers[t]=Ir.merge(Ztt)});var qM=kC,ent=ni,tnt=qM,nnt=function(t,n,r){var i=this||tnt;return ent.forEach(r,function(s){t=s.call(i,t,n)}),t},aT,WQ;function Ife(){return WQ||(WQ=1,aT=function(t){return!!(t&&t.__CANCEL__)}),aT}var GQ=ni,cT=nnt,rnt=Ife(),int=qM,ont=SC();function uT(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ont}var snt=function(t){uT(t),t.headers=t.headers||{},t.data=cT.call(t,t.data,t.headers,t.transformRequest),t.headers=GQ.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),GQ.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||int.adapter;return n(t).then(function(i){return uT(t),i.data=cT.call(t,i.data,i.headers,t.transformResponse),i},function(i){return rnt(i)||(uT(t),i&&i.response&&(i.response.data=cT.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},ko=ni,Rfe=function(t,n){n=n||{};var r={};function i(l,d){return ko.isPlainObject(l)&&ko.isPlainObject(d)?ko.merge(l,d):ko.isPlainObject(d)?ko.merge({},d):ko.isArray(d)?d.slice():d}function o(l){if(ko.isUndefined(n[l])){if(!ko.isUndefined(t[l]))return i(void 0,t[l])}else return i(t[l],n[l])}function s(l){if(!ko.isUndefined(n[l]))return i(void 0,n[l])}function a(l){if(ko.isUndefined(n[l])){if(!ko.isUndefined(t[l]))return i(void 0,t[l])}else return i(void 0,n[l])}function c(l){if(l in n)return i(t[l],n[l]);if(l in t)return i(void 0,t[l])}var u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return ko.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var f=u[d]||o,h=f(d);ko.isUndefined(h)&&f!==c||(r[d]=h)}),r},lT,KQ;function Nfe(){return KQ||(KQ=1,lT={version:"0.27.2"}),lT}var ant=Nfe().version,cd=S2,ZM={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){ZM[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var QQ={};ZM.transitional=function(t,n,r){function i(o,s){return"[Axios v"+ant+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return function(o,s,a){if(t===!1)throw new cd(i(s," has been removed"+(n?" in "+n:"")),cd.ERR_DEPRECATED);return n&&!QQ[s]&&(QQ[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function cnt(e,t,n){if(typeof e!="object")throw new cd("options must be an object",cd.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new cd("option "+o+" must be "+c,cd.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new cd("Unknown option "+o,cd.ERR_BAD_OPTION)}}var unt={assertOptions:cnt,validators:ZM},Ofe=ni,lnt=Cfe,YQ=Btt,qQ=snt,TC=Rfe,dnt=Pfe,Lfe=unt,Np=Lfe.validators;function Hm(e){this.defaults=e,this.interceptors={request:new YQ,response:new YQ}}Hm.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=TC(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&Lfe.assertOptions(r,{silentJSONParsing:Np.transitional(Np.boolean),forcedJSONParsing:Np.transitional(Np.boolean),clarifyTimeoutError:Np.transitional(Np.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(o=o&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});var s=[];this.interceptors.response.forEach(function(h){s.push(h.fulfilled,h.rejected)});var a;if(!o){var c=[qQ,void 0];for(Array.prototype.unshift.apply(c,i),c=c.concat(s),a=Promise.resolve(n);c.length;)a=a.then(c.shift(),c.shift());return a}for(var u=n;i.length;){var l=i.shift(),d=i.shift();try{u=l(u)}catch(f){d(f);break}}try{a=qQ(u)}catch(f){return Promise.reject(f)}for(;s.length;)a=a.then(s.shift(),s.shift());return a};Hm.prototype.getUri=function(t){t=TC(this.defaults,t);var n=dnt(t.baseURL,t.url);return lnt(n,t.params,t.paramsSerializer)};Ofe.forEach(["delete","get","head","options"],function(t){Hm.prototype[t]=function(n,r){return this.request(TC(r||{},{method:t,url:n,data:(r||{}).data}))}});Ofe.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(TC(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Hm.prototype[t]=n(),Hm.prototype[t+"Form"]=n(!0)});var fnt=Hm,dT,ZQ;function hnt(){if(ZQ)return dT;ZQ=1;var e=SC();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var i=this;this.promise.then(function(o){if(i._listeners){var s,a=i._listeners.length;for(s=0;sCnt(void 0,void 0,void 0,function*(){try{const{relayCall:n,request:r}=e;let i;switch(n){case O6.RelayCall.CallWithSyncFee:i=`${t.url}/relays/v2/call-with-sync-fee`;break;case O6.RelayCall.CallWithSyncFeeERC2771:i=`${t.url}/relays/v2/call-with-sync-fee-erc2771`;break;case O6.RelayCall.SponsoredCall:i=`${t.url}/relays/v2/sponsored-call`;break;case O6.RelayCall.SponsoredCallERC2771:i=`${t.url}/relays/v2/sponsored-call-erc2771`;break;default:return n}return(yield Ant.axiosInstance.post(i,r)).data}catch(n){throw new Error((0,Snt.getHttpErrorMessage)(n))}});CC.post=knt;var _C={};Object.defineProperty(_C,"__esModule",{value:!0});_C.isConcurrentStruct=void 0;const Tnt=e=>!!e.userSalt;_C.isConcurrentStruct=Tnt;var J5={},JM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TaskState=void 0,function(t){t.CheckPending="CheckPending",t.ExecPending="ExecPending",t.WaitingForConfirmation="WaitingForConfirmation",t.ExecSuccess="ExecSuccess",t.ExecReverted="ExecReverted",t.Cancelled="Cancelled"}(e.TaskState||(e.TaskState={}))})(JM);Object.defineProperty(J5,"__esModule",{value:!0});J5.isFinalTaskState=void 0;const pT=JM,_nt=e=>{switch(e){case pT.TaskState.ExecSuccess:case pT.TaskState.ExecReverted:case pT.TaskState.Cancelled:return!0;default:return!1}};J5.isFinalTaskState=_nt;var PC={},Gp=null;typeof WebSocket<"u"?Gp=WebSocket:typeof MozWebSocket<"u"?Gp=MozWebSocket:typeof global<"u"?Gp=global.WebSocket||global.MozWebSocket:typeof window<"u"?Gp=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Gp=self.WebSocket||self.MozWebSocket);const Pnt=Gp,Int=Object.freeze(Object.defineProperty({__proto__:null,default:Pnt},Symbol.toStringTag,{value:"Module"})),Rnt=Qs(Int);var Mfe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WebsocketEvent=void 0,function(t){t.ERROR="error",t.UPDATE="update"}(e.WebsocketEvent||(e.WebsocketEvent={}))})(Mfe);var s0=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})},fb=Qe&&Qe.__classPrivateFieldSet||function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},Vt=Qe&&Qe.__classPrivateFieldGet||function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Nnt=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qb,p0,Xl,ed,Tr,JR,XR;Object.defineProperty(PC,"__esModule",{value:!0});PC.WebsocketHandler=void 0;const L6=Nnt(Rnt),Ont=J5,tY=Mfe;class Lnt{constructor(t){qb.set(this,void 0),p0.set(this,new Set),Xl.set(this,[]),ed.set(this,[]),Tr.set(this,void 0),JR.set(this,1e3),XR.set(this,1e4),fb(this,qb,`${t}/tasks/ws/status`,"f")}onUpdate(t){if(!t)throw new Error("Callback handler is not provided");Vt(this,Xl,"f").push(t),this._connect()}offUpdate(t){if(!t)throw new Error("Callback handler is not provided");fb(this,Xl,Vt(this,Xl,"f").filter(n=>n!==t),"f"),this._disconnectIfUnused()}onError(t){if(!t)throw new Error("Callback handler is not provided");Vt(this,ed,"f").push(t),this._connect()}offError(t){if(!t)throw new Error("Callback handler is not provided");fb(this,ed,Vt(this,ed,"f").filter(n=>n!==t),"f"),this._disconnectIfUnused()}subscribe(t){return s0(this,void 0,void 0,function*(){Vt(this,p0,"f").has(t)||(Vt(this,p0,"f").add(t),yield this._sendWebsocketMessage({action:"subscribe",taskId:t}))})}unsubscribe(t){return s0(this,void 0,void 0,function*(){Vt(this,p0,"f").has(t)&&(Vt(this,p0,"f").delete(t),yield this._sendWebsocketMessage({action:"unsubscribe",taskId:t}))})}hasHandlers(){return Vt(this,Xl,"f").length>0||Vt(this,ed,"f").length>0}_connect(){Vt(this,Tr,"f")||(fb(this,Tr,new L6.default(Vt(this,qb,"f")),"f"),Vt(this,Tr,"f").onopen=()=>s0(this,void 0,void 0,function*(){Vt(this,p0,"f").forEach(t=>{this._sendWebsocketMessage({action:"subscribe",taskId:t})})}),Vt(this,Tr,"f").onclose=()=>{setTimeout(()=>{this._reconnect()},Vt(this,JR,"f"))},Vt(this,Tr,"f").onerror=t=>{this._handleError(t)},Vt(this,Tr,"f").onmessage=t=>s0(this,void 0,void 0,function*(){const n=JSON.parse(t.data.toString());switch(n.event){case tY.WebsocketEvent.ERROR:{const i=n.payload;this._handleError(i);break}case tY.WebsocketEvent.UPDATE:{const i=n.payload;Vt(this,Xl,"f").forEach(o=>{o(i)}),(0,Ont.isFinalTaskState)(i.taskState)&&(yield this.unsubscribe(i.taskId));break}}}))}_sendWebsocketMessage(t){return s0(this,void 0,void 0,function*(){(yield this._ensureIsConnected())&&Vt(this,Tr,"f").send(JSON.stringify(t))})}_disconnectIfUnused(){Vt(this,Xl,"f").length===0&&Vt(this,ed,"f").length===0&&Vt(this,Tr,"f")&&this._disconnect()}_disconnect(){Vt(this,Tr,"f")&&(Vt(this,Tr,"f").close(),fb(this,Tr,void 0,"f"))}_reconnect(){this._disconnect(),this._connect()}_ensureIsConnected(){return s0(this,void 0,void 0,function*(){return Vt(this,Tr,"f")?Vt(this,Tr,"f").readyState!==L6.default.CONNECTING&&Vt(this,Tr,"f").readyState!==L6.default.OPEN&&this._reconnect():this._connect(),yield this._awaitConnection()})}_awaitConnection(){return s0(this,void 0,void 0,function*(){const t=Date.now();for(;!Vt(this,Tr,"f")||Vt(this,Tr,"f").readyState!==L6.default.OPEN;){const n=Date.now()-t;if(n>Vt(this,XR,"f"))return this._handleError(new Error(`Timeout connecting to ${Vt(this,qb,"f")} after ${n}ms`)),!1;yield new Promise(r=>setTimeout(r,10))}return!0})}_handleError(t){Vt(this,ed,"f").forEach(n=>{n(t)})}}PC.WebsocketHandler=Lnt;qb=new WeakMap,p0=new WeakMap,Xl=new WeakMap,ed=new WeakMap,Tr=new WeakMap,JR=new WeakMap,XR=new WeakMap;(function(e){var t=Qe&&Qe.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=Qe&&Qe.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(yC,e),n(U5,e),n(z5,e),n(wC,e),n(Q5,e),n(EC,e),n(CC,e),n(w2,e),n(C2,e),n(K5,e),n(A2,e),n(Z5,e),n(_C,e),n(Y5,e),n(q5,e),n(J5,e),n(PC,e)})(ei);var up={};(function(e){var t=Qe&&Qe.__awaiter||function(o,s,a,c){function u(l){return l instanceof a?l:new a(function(d){d(l)})}return new(a||(a=Promise))(function(l,d){function f(m){try{p(c.next(m))}catch(x){d(x)}}function h(m){try{p(c.throw(m))}catch(x){d(x)}}function p(m){m.done?l(m.value):u(m.value).then(f,h)}p((c=c.apply(o,s||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.getSupportedNetworks=e.isNetworkSupported=void 0;const n=ei,r=(o,s)=>t(void 0,void 0,void 0,function*(){return(yield(0,e.getSupportedNetworks)(s)).includes(o.chainId.toString())});e.isNetworkSupported=r;const i=o=>t(void 0,void 0,void 0,function*(){try{return(yield n.axiosInstance.get(`${o.url}/relays/v2`)).data.relays}catch(s){throw new Error(`GelatoRelaySDK/getSupportedNetworks: Failed with error: ${(0,n.getHttpErrorMessage)(s)}`)}});e.getSupportedNetworks=i})(up);var Bnt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(mC,"__esModule",{value:!0});mC.relayWithSyncFee=void 0;const nY=ei,Mnt=up,Dnt=_l,jnt=(e,t)=>Bnt(void 0,void 0,void 0,function*(){var n;try{const{request:r,options:i,sponsorApiKey:o}=e;if(!(yield(0,Mnt.isNetworkSupported)({chainId:r.chainId},t)))throw new Error(`Chain id [${r.chainId}] is not supported`);return yield(0,nY.post)({relayCall:Dnt.RelayCall.CallWithSyncFee,request:Object.assign(Object.assign({},r),{isRelayContext:(n=r.isRelayContext)!==null&&n!==void 0?n:!0,sponsorApiKey:o,chainId:r.chainId.toString(),gasLimit:i!=null&&i.gasLimit?i.gasLimit.toString():void 0,retries:i==null?void 0:i.retries})},t)}catch(r){throw new Error(`GelatoRelaySDK/relayWithSyncFee: Failed with error: ${(0,nY.getHttpErrorMessage)(r)}`)}});mC.relayWithSyncFee=jnt;var IC={},Dfe=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(IC,"__esModule",{value:!0});IC.relayWithSponsoredCall=void 0;const Fnt=E2,Unt=ei,znt=up,$nt=_l,Hnt=(e,t)=>Dfe(void 0,void 0,void 0,function*(){return yield Wnt(e,t)});IC.relayWithSponsoredCall=Hnt;const Vnt=e=>({chainId:e.chainId.toString(),target:(0,Fnt.getAddress)(e.target),data:e.data}),Wnt=(e,t)=>Dfe(void 0,void 0,void 0,function*(){try{const{request:n,sponsorApiKey:r,options:i}=e;if(!(yield(0,znt.isNetworkSupported)({chainId:n.chainId},t)))throw new Error(`Chain id [${n.chainId}] is not supported`);const s=yield Vnt(n);return yield(0,Unt.post)({relayCall:$nt.RelayCall.SponsoredCall,request:Object.assign(Object.assign({},s),{sponsorApiKey:r,gasLimit:i!=null&&i.gasLimit?i.gasLimit.toString():void 0,retries:i==null?void 0:i.retries})},t)}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/sponsoredCall: Failed with error: ${r}`)}});var jfe={},k2={},X5={},Ffe={},RC={},NC={},Gnt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(NC,"__esModule",{value:!0});NC.mapRequestToStruct=void 0;const B6=E2,Knt=ei;function Qnt(e,t){var n,r,i;return Gnt(this,void 0,void 0,function*(){if(!t.userDeadline&&!e.userDeadline)throw new Error("userDeadline is not found in the request, nor fetched");if((0,Knt.isConcurrentRequest)(e)){const o=t;return{userDeadline:(n=o.userDeadline)!==null&&n!==void 0?n:e.userDeadline,chainId:e.chainId,target:(0,B6.getAddress)(e.target),data:e.data,user:(0,B6.getAddress)(e.user),userSalt:(r=o.userSalt)!==null&&r!==void 0?r:e.userSalt}}else{const o=t;if(o.userNonce===void 0&&e.userNonce===void 0)throw new Error("userNonce is not found in the request, nor fetched");return{userDeadline:(i=o.userDeadline)!==null&&i!==void 0?i:e.userDeadline,chainId:e.chainId,target:(0,B6.getAddress)(e.target),data:e.data,user:(0,B6.getAddress)(e.user),userNonce:o.userNonce!==void 0?o.userNonce:e.userNonce}}})}NC.mapRequestToStruct=Qnt;var OC={};Object.defineProperty(OC,"__esModule",{value:!0});OC.getPayloadToSign=void 0;const Ynt=ei,M6=_l,gs=ap;function qnt(e,t){const{isSigner:n,struct:r,type:i}=e,o=(0,Ynt.getEIP712Domain)({chainId:BigInt(r.chainId),type:i},t);switch(i){case gs.ERC2771Type.SponsoredCall:return n?{domain:o,types:Object.assign({},gs.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA),message:r}:{domain:o,types:Object.assign(Object.assign({},gs.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA),M6.EIP712_DOMAIN_TYPE_DATA),primaryType:"SponsoredCallERC2771",message:r};case gs.ERC2771Type.CallWithSyncFee:return n?{domain:o,types:Object.assign({},gs.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA),message:r}:{domain:o,types:Object.assign(Object.assign({},gs.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA),M6.EIP712_DOMAIN_TYPE_DATA),primaryType:"CallWithSyncFeeERC2771",message:r};case gs.ERC2771Type.ConcurrentSponsoredCall:return n?{domain:o,types:Object.assign({},gs.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA),message:r}:{domain:o,types:Object.assign(Object.assign({},gs.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA),M6.EIP712_DOMAIN_TYPE_DATA),primaryType:"SponsoredCallConcurrentERC2771",message:r};case gs.ERC2771Type.ConcurrentCallWithSyncFee:return n?{domain:o,types:Object.assign({},gs.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA),message:r}:{domain:o,types:Object.assign(Object.assign({},gs.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA),M6.EIP712_DOMAIN_TYPE_DATA),primaryType:"CallWithSyncFeeConcurrentERC2771",message:r};default:return i}}OC.getPayloadToSign=qnt;var If={};Object.defineProperty(If,"__esModule",{value:!0});If.safeTransformStruct=void 0;const Znt=ei;function Jnt(e){return(0,Znt.isConcurrentStruct)(e)?Object.assign(Object.assign({},e),{chainId:e.chainId.toString()}):Object.assign(Object.assign({},e),{chainId:e.chainId.toString(),userNonce:e.userNonce.toString()})}If.safeTransformStruct=Jnt;var Xnt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(RC,"__esModule",{value:!0});RC.populatePayloadToSign=void 0;const hb=ei,rY=NC,iY=OC,oY=If;function ert(e,t){return Xnt(this,void 0,void 0,function*(){const{request:n,signerOrProvider:r}=e;if((0,hb.isConcurrentRequest)(n)){const i=e.type,o=yield(0,hb.populateOptionalUserParameters)({request:n,type:i,signerOrProvider:r},t),s=yield(0,rY.mapRequestToStruct)(n,o),a=(0,oY.safeTransformStruct)(s),c=(0,iY.getPayloadToSign)({struct:a,type:i,isSigner:r?(0,hb.isSigner)(r):void 0},t);return{struct:s,typedData:c}}else{const i=e.type,o=yield(0,hb.populateOptionalUserParameters)({request:n,type:i,signerOrProvider:r},t),s=yield(0,rY.mapRequestToStruct)(n,o),a=(0,oY.safeTransformStruct)(s),c=(0,iY.getPayloadToSign)({struct:a,type:i,isSigner:r?(0,hb.isSigner)(r):void 0},t);return{struct:s,typedData:c}}})}RC.populatePayloadToSign=ert;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.populatePayloadToSign=void 0;var t=RC;Object.defineProperty(e,"populatePayloadToSign",{enumerable:!0,get:function(){return t.populatePayloadToSign}})})(Ffe);var trt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(X5,"__esModule",{value:!0});X5.getDataToSignERC2771=void 0;const nrt=ei,rrt=up,sY=Ffe;function irt(e,t){return trt(this,void 0,void 0,function*(){try{const{request:n,signerOrProvider:r}=e,{chainId:i}=n;if(!(yield(0,rrt.isNetworkSupported)({chainId:i},t)))throw new Error(`Chain id [${i.toString()}] is not supported`);if((0,nrt.isConcurrentRequest)(n)){const s=e.type,{struct:a,typedData:c}=yield(0,sY.populatePayloadToSign)({request:n,type:s,signerOrProvider:r},t);return{struct:a,typedData:c}}else{const s=e.type,{struct:a,typedData:c}=yield(0,sY.populatePayloadToSign)({request:n,type:s,signerOrProvider:r},t);return{struct:a,typedData:c}}}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/getDataToSignERC2771: Failed with error: ${r}`)}})}X5.getDataToSignERC2771=irt;var ort=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(k2,"__esModule",{value:!0});k2.getSignatureDataERC2771=void 0;const gT=ei,aY=X5;function srt(e,t){return ort(this,void 0,void 0,function*(){try{const{request:n,signerOrProvider:r}=e;if((0,gT.isConcurrentRequest)(n)){const i=e.type,{struct:o,typedData:s}=yield(0,aY.getDataToSignERC2771)({request:n,signerOrProvider:r,type:i},t),a=yield(0,gT.signTypedDataV4)(r,n.user,s);return{struct:o,signature:a}}else{const i=e.type,{struct:o,typedData:s}=yield(0,aY.getDataToSignERC2771)({request:n,signerOrProvider:r,type:i},t),a=yield(0,gT.signTypedDataV4)(r,n.user,s);return{struct:o,signature:a}}}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/getSignatureDataERC2771: Failed with error: ${r}`)}})}k2.getSignatureDataERC2771=srt;var LC={},Ufe=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(LC,"__esModule",{value:!0});LC.relayWithSponsoredCallERC2771=void 0;const mT=ei,cY=_l,uY=ap,lY=k2,dY=If,art=(e,t)=>Ufe(void 0,void 0,void 0,function*(){return yield crt(e,t)});LC.relayWithSponsoredCallERC2771=art;const crt=(e,t)=>Ufe(void 0,void 0,void 0,function*(){try{const{request:n,sponsorApiKey:r,signerOrProvider:i,options:o}=e;if((0,mT.isConcurrentRequest)(n)){const a=uY.ERC2771Type.ConcurrentSponsoredCall,{struct:c,signature:u}=yield(0,lY.getSignatureDataERC2771)({request:n,signerOrProvider:i,type:a},t);return yield(0,mT.post)({relayCall:cY.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,dY.safeTransformStruct)(c)),{userSignature:u,sponsorApiKey:r,isConcurrent:!0,gasLimit:o!=null&&o.gasLimit?o.gasLimit.toString():void 0,retries:o==null?void 0:o.retries})},t)}else{const a=uY.ERC2771Type.SponsoredCall,{struct:c,signature:u}=yield(0,lY.getSignatureDataERC2771)({request:n,signerOrProvider:i,type:a},t);return yield(0,mT.post)({relayCall:cY.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,dY.safeTransformStruct)(c)),{userSignature:u,sponsorApiKey:r,isConcurrent:!1,gasLimit:o!=null&&o.gasLimit?o.gasLimit.toString():void 0,retries:o==null?void 0:o.retries})},t)}}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/sponsoredCallERC2771: Failed with error: ${r}`)}});var BC={},urt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(BC,"__esModule",{value:!0});BC.sponsoredCallERC2771WithSignature=void 0;const yT=ei,lrt=up,fY=_l,hY=If,drt=(e,t)=>urt(void 0,void 0,void 0,function*(){try{const{signature:n,sponsorApiKey:r,struct:i,options:o}=e;if(!(yield(0,lrt.isNetworkSupported)({chainId:i.chainId},t)))throw new Error(`Chain id [${i.chainId}] is not supported`);return(0,yT.isConcurrentStruct)(i)?yield(0,yT.post)({relayCall:fY.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,hY.safeTransformStruct)(i)),{userSignature:n,sponsorApiKey:r,isConcurrent:!0,gasLimit:o!=null&&o.gasLimit?o.gasLimit.toString():void 0,retries:o==null?void 0:o.retries})},t):yield(0,yT.post)({relayCall:fY.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,hY.safeTransformStruct)(i)),{userSignature:n,sponsorApiKey:r,isConcurrent:!1,gasLimit:o!=null&&o.gasLimit?o.gasLimit.toString():void 0,retries:o==null?void 0:o.retries})},t)}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/sponsoredCallERC2771WithSignature: Failed with error: ${r}`)}});BC.sponsoredCallERC2771WithSignature=drt;var MC={},frt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(MC,"__esModule",{value:!0});MC.relayWithCallWithSyncFeeERC2771=void 0;const pY=ei,gY=_l,mY=ap,yY=k2,bY=If,hrt=(e,t)=>frt(void 0,void 0,void 0,function*(){try{const{request:n,signerOrProvider:r,options:i,sponsorApiKey:o}=e;if(n.isConcurrent){const{isRelayContext:a,feeToken:c}=n,u=mY.ERC2771Type.ConcurrentCallWithSyncFee,{struct:l,signature:d}=yield(0,yY.getSignatureDataERC2771)({request:n,signerOrProvider:r,type:u},t);return yield(0,pY.post)({relayCall:gY.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign({},(0,bY.safeTransformStruct)(l)),{feeToken:c,isRelayContext:a??!0,userSignature:d,isConcurrent:!0,sponsorApiKey:o,gasLimit:i!=null&&i.gasLimit?i.gasLimit.toString():void 0,retries:i==null?void 0:i.retries})},t)}else{const{isRelayContext:a,feeToken:c}=n,u=mY.ERC2771Type.CallWithSyncFee,{struct:l,signature:d}=yield(0,yY.getSignatureDataERC2771)({request:n,signerOrProvider:r,type:u},t);return yield(0,pY.post)({relayCall:gY.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign({},(0,bY.safeTransformStruct)(l)),{feeToken:c,isRelayContext:a??!0,userSignature:d,isConcurrent:!1,sponsorApiKey:o,gasLimit:i!=null&&i.gasLimit?i.gasLimit.toString():void 0,retries:i==null?void 0:i.retries})},t)}}catch(n){const r=n.message;throw new Error(`GelatoRelaySDK/callWithSyncFeeERC2771: Failed with error: ${r}`)}});MC.relayWithCallWithSyncFeeERC2771=hrt;var DC={},prt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(DC,"__esModule",{value:!0});DC.callWithSyncFeeERC2771WithSignature=void 0;const bT=ei,grt=up,vY=_l,xY=If,mrt=(e,t)=>prt(void 0,void 0,void 0,function*(){var n,r;try{const{signature:i,struct:o,syncFeeParams:s,options:a,sponsorApiKey:c}=e;if(!(yield(0,grt.isNetworkSupported)({chainId:o.chainId},t)))throw new Error(`Chain id [${o.chainId}] is not supported`);return(0,bT.isConcurrentStruct)(o)?yield(0,bT.post)({relayCall:vY.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign(Object.assign({},(0,xY.safeTransformStruct)(o)),s),{isRelayContext:(n=s.isRelayContext)!==null&&n!==void 0?n:!0,userSignature:i,isConcurrent:!0,sponsorApiKey:c,gasLimit:a!=null&&a.gasLimit?a.gasLimit.toString():void 0,retries:a==null?void 0:a.retries})},t):yield(0,bT.post)({relayCall:vY.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign(Object.assign({},(0,xY.safeTransformStruct)(o)),s),{isRelayContext:(r=s.isRelayContext)!==null&&r!==void 0?r:!0,userSignature:i,isConcurrent:!1,sponsorApiKey:c,gasLimit:a!=null&&a.gasLimit?a.gasLimit.toString():void 0,retries:a==null?void 0:a.retries})},t)}catch(i){const o=i.message;throw new Error(`GelatoRelaySDK/callWithSyncFeeERC2771WithSignature: Failed with error: ${o}`)}});DC.callWithSyncFeeERC2771WithSignature=mrt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.callWithSyncFeeERC2771WithSignature=e.relayWithCallWithSyncFeeERC2771=e.sponsoredCallERC2771WithSignature=e.relayWithSponsoredCallERC2771=e.getDataToSignERC2771=e.getSignatureDataERC2771=void 0;var t=k2;Object.defineProperty(e,"getSignatureDataERC2771",{enumerable:!0,get:function(){return t.getSignatureDataERC2771}});var n=X5;Object.defineProperty(e,"getDataToSignERC2771",{enumerable:!0,get:function(){return n.getDataToSignERC2771}});var r=LC;Object.defineProperty(e,"relayWithSponsoredCallERC2771",{enumerable:!0,get:function(){return r.relayWithSponsoredCallERC2771}});var i=BC;Object.defineProperty(e,"sponsoredCallERC2771WithSignature",{enumerable:!0,get:function(){return i.sponsoredCallERC2771WithSignature}});var o=MC;Object.defineProperty(e,"relayWithCallWithSyncFeeERC2771",{enumerable:!0,get:function(){return o.relayWithCallWithSyncFeeERC2771}});var s=DC;Object.defineProperty(e,"callWithSyncFeeERC2771WithSignature",{enumerable:!0,get:function(){return s.callWithSyncFeeERC2771WithSignature}})})(jfe);var zfe={};(function(e){var t=Qe&&Qe.__awaiter||function(a,c,u,l){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function p(y){try{x(l.next(y))}catch(b){h(b)}}function m(y){try{x(l.throw(y))}catch(b){h(b)}}function x(y){y.done?f(y.value):d(y.value).then(p,m)}x((l=l.apply(a,c||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.getEstimatedFee=e.getPaymentTokens=e.getGelatoOracles=e.isOracleActive=void 0;const n=ei,r=(a,c)=>t(void 0,void 0,void 0,function*(){return(yield(0,e.getGelatoOracles)(c)).includes(a.chainId.toString())});e.isOracleActive=r;const i=a=>t(void 0,void 0,void 0,function*(){try{return(yield n.axiosInstance.get(`${a.url}/oracles/`)).data.oracles}catch(c){throw new Error(`GelatoRelaySDK/getGelatoOracles: Failed with error: ${(0,n.getHttpErrorMessage)(c)}`)}});e.getGelatoOracles=i;const o=(a,c)=>t(void 0,void 0,void 0,function*(){try{return(yield n.axiosInstance.get(`${c.url}/oracles/${a.chainId.toString()}/paymentTokens/`)).data.paymentTokens}catch(u){throw new Error(`GelatoRelaySDK/getPaymentTokens: Failed with error: ${(0,n.getHttpErrorMessage)(u)}`)}});e.getPaymentTokens=o;const s=(a,c)=>t(void 0,void 0,void 0,function*(){const{chainId:u,gasLimit:l,gasLimitL1:d,isHighPriority:f,paymentToken:h}=a,p={paymentToken:h,gasLimit:l.toString(),isHighPriority:f,gasLimitL1:d.toString()};try{const m=yield n.axiosInstance.get(`${c.url}/oracles/${u.toString()}/estimate`,{params:p});return BigInt(m.data.estimatedFee)}catch(m){throw new Error(`GelatoRelaySDK/getEstimatedFee: Failed with error: ${(0,n.getHttpErrorMessage)(m)}`)}});e.getEstimatedFee=s})(zfe);var jC={},yrt=Qe&&Qe.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(jC,"__esModule",{value:!0});jC.getTaskStatus=void 0;const wY=ei,brt=(e,t)=>yrt(void 0,void 0,void 0,function*(){try{return(yield wY.axiosInstance.get(`${t.url}/tasks/status/${e.taskId}`)).data.task}catch(n){throw new Error(`GelatoRelaySDK/getTaskStatus: Failed with error: ${(0,wY.getHttpErrorMessage)(n)}`)}});jC.getTaskStatus=brt;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getTaskStatus=e.isNetworkSupported=e.getSupportedNetworks=e.isOracleActive=e.getPaymentTokens=e.getGelatoOracles=e.getEstimatedFee=e.relayWithCallWithSyncFeeERC2771=e.callWithSyncFeeERC2771WithSignature=e.sponsoredCallERC2771WithSignature=e.getDataToSignERC2771=e.getSignatureDataERC2771=e.relayWithSponsoredCallERC2771=e.relayWithSponsoredCall=e.relayWithSyncFee=void 0;var t=mC;Object.defineProperty(e,"relayWithSyncFee",{enumerable:!0,get:function(){return t.relayWithSyncFee}});var n=IC;Object.defineProperty(e,"relayWithSponsoredCall",{enumerable:!0,get:function(){return n.relayWithSponsoredCall}});var r=jfe;Object.defineProperty(e,"relayWithSponsoredCallERC2771",{enumerable:!0,get:function(){return r.relayWithSponsoredCallERC2771}}),Object.defineProperty(e,"getSignatureDataERC2771",{enumerable:!0,get:function(){return r.getSignatureDataERC2771}}),Object.defineProperty(e,"getDataToSignERC2771",{enumerable:!0,get:function(){return r.getDataToSignERC2771}}),Object.defineProperty(e,"sponsoredCallERC2771WithSignature",{enumerable:!0,get:function(){return r.sponsoredCallERC2771WithSignature}}),Object.defineProperty(e,"callWithSyncFeeERC2771WithSignature",{enumerable:!0,get:function(){return r.callWithSyncFeeERC2771WithSignature}}),Object.defineProperty(e,"relayWithCallWithSyncFeeERC2771",{enumerable:!0,get:function(){return r.relayWithCallWithSyncFeeERC2771}});var i=zfe;Object.defineProperty(e,"getEstimatedFee",{enumerable:!0,get:function(){return i.getEstimatedFee}}),Object.defineProperty(e,"getGelatoOracles",{enumerable:!0,get:function(){return i.getGelatoOracles}}),Object.defineProperty(e,"getPaymentTokens",{enumerable:!0,get:function(){return i.getPaymentTokens}}),Object.defineProperty(e,"isOracleActive",{enumerable:!0,get:function(){return i.isOracleActive}});var o=up;Object.defineProperty(e,"getSupportedNetworks",{enumerable:!0,get:function(){return o.getSupportedNetworks}}),Object.defineProperty(e,"isNetworkSupported",{enumerable:!0,get:function(){return o.isNetworkSupported}});var s=jC;Object.defineProperty(e,"getTaskStatus",{enumerable:!0,get:function(){return s.getTaskStatus}})})(jde);(function(e){var t=Qe&&Qe.__createBinding||(Object.create?function(m,x,y,b){b===void 0&&(b=y);var v=Object.getOwnPropertyDescriptor(x,y);(!v||("get"in v?!x.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return x[y]}}),Object.defineProperty(m,b,v)}:function(m,x,y,b){b===void 0&&(b=y),m[b]=x[y]}),n=Qe&&Qe.__setModuleDefault||(Object.create?function(m,x){Object.defineProperty(m,"default",{enumerable:!0,value:x})}:function(m,x){m.default=x}),r=Qe&&Qe.__importStar||function(m){if(m&&m.__esModule)return m;var x={};if(m!=null)for(var y in m)y!=="default"&&Object.prototype.hasOwnProperty.call(m,y)&&t(x,m,y);return n(x,m),x},i=Qe&&Qe.__awaiter||function(m,x,y,b){function v(w){return w instanceof y?w:new y(function(E){E(w)})}return new(y||(y=Promise))(function(w,E){function S(O){try{A(b.next(O))}catch(N){E(N)}}function I(O){try{A(b.throw(O))}catch(N){E(N)}}function A(O){O.done?w(O.value):v(O.value).then(S,I)}A((b=b.apply(m,x||[])).next())})},o=Qe&&Qe.__classPrivateFieldSet||function(m,x,y,b,v){if(b==="m")throw new TypeError("Private method is not writable");if(b==="a"&&!v)throw new TypeError("Private accessor was defined without a setter");if(typeof x=="function"?m!==x||!v:!x.has(m))throw new TypeError("Cannot write private member to an object whose class did not declare it");return b==="a"?v.call(m,y):v?v.value=y:x.set(m,y),y},s=Qe&&Qe.__classPrivateFieldGet||function(m,x,y,b){if(y==="a"&&!b)throw new TypeError("Private accessor was defined without a getter");if(typeof x=="function"?m!==x||!b:!x.has(m))throw new TypeError("Cannot read private member from an object whose class did not declare it");return y==="m"?b:y==="a"?b.call(m):b?b.value:x.get(m)},a,c;Object.defineProperty(e,"__esModule",{value:!0}),e.GelatoRelay=e.TaskState=e.ERC2771Type=void 0;const u=r(jde),l=ap;Object.defineProperty(e,"ERC2771Type",{enumerable:!0,get:function(){return l.ERC2771Type}});const d=JM;Object.defineProperty(e,"TaskState",{enumerable:!0,get:function(){return d.TaskState}});const f=Yt,h=ei;class p{constructor(x){a.set(this,void 0),c.set(this,void 0),this.configure=y=>{o(this,a,this._getConfiguration(y),"f")},this._getConfiguration=y=>{var b,v,w,E,S,I,A,O,N,R,_,M,z,F,$,W,G;const H=(b=y==null?void 0:y.url)!==null&&b!==void 0?b:f.GELATO_RELAY_URL;return{url:H,websocketUrl:H.replace(/^http/,"ws"),contract:{relayERC2771:(w=(v=y==null?void 0:y.contract)===null||v===void 0?void 0:v.relayERC2771)!==null&&w!==void 0?w:f.GELATO_RELAY_ERC2771_ADDRESS,relay1BalanceERC2771:(S=(E=y==null?void 0:y.contract)===null||E===void 0?void 0:E.relay1BalanceERC2771)!==null&&S!==void 0?S:f.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS,relayERC2771zkSync:(A=(I=y==null?void 0:y.contract)===null||I===void 0?void 0:I.relayERC2771zkSync)!==null&&A!==void 0?A:f.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS,relay1BalanceERC2771zkSync:(N=(O=y==null?void 0:y.contract)===null||O===void 0?void 0:O.relay1BalanceERC2771zkSync)!==null&&N!==void 0?N:f.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS,relayConcurrentERC2771:(_=(R=y==null?void 0:y.contract)===null||R===void 0?void 0:R.relayConcurrentERC2771)!==null&&_!==void 0?_:f.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS,relay1BalanceConcurrentERC2771:(z=(M=y==null?void 0:y.contract)===null||M===void 0?void 0:M.relay1BalanceConcurrentERC2771)!==null&&z!==void 0?z:f.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS,relayConcurrentERC2771zkSync:($=(F=y==null?void 0:y.contract)===null||F===void 0?void 0:F.relayConcurrentERC2771zkSync)!==null&&$!==void 0?$:f.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS,relay1BalanceConcurrentERC2771zkSync:(G=(W=y==null?void 0:y.contract)===null||W===void 0?void 0:W.relay1BalanceConcurrentERC2771zkSync)!==null&&G!==void 0?G:f.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS}}},this.callWithSyncFee=(y,b,v)=>i(this,void 0,void 0,function*(){const w=yield u.relayWithSyncFee({request:y,sponsorApiKey:v,options:b},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(w.taskId)),w}),this.callWithSyncFeeERC2771=(y,b,v,w)=>i(this,void 0,void 0,function*(){const E=yield u.relayWithCallWithSyncFeeERC2771({request:y,signerOrProvider:b,sponsorApiKey:w,options:v},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(E.taskId)),E}),this.sponsoredCall=(y,b,v)=>i(this,void 0,void 0,function*(){const w=yield u.relayWithSponsoredCall({request:y,sponsorApiKey:b,options:v},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(w.taskId)),w}),this.sponsoredCallERC2771=(y,b,v,w)=>i(this,void 0,void 0,function*(){const E=yield u.relayWithSponsoredCallERC2771({request:y,signerOrProvider:b,sponsorApiKey:v,options:w},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(E.taskId)),E}),this.getSignatureDataERC2771=(y,b,v)=>u.getSignatureDataERC2771({request:y,signerOrProvider:b,type:v},s(this,a,"f")),this.getDataToSignERC2771=(y,b,v)=>u.getDataToSignERC2771({request:y,signerOrProvider:v,type:b},s(this,a,"f")),this.sponsoredCallERC2771WithSignature=(y,b,v,w)=>i(this,void 0,void 0,function*(){const E=yield u.sponsoredCallERC2771WithSignature({struct:y,signature:b,sponsorApiKey:v,options:w},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(E.taskId)),E}),this.callWithSyncFeeERC2771WithSignature=(y,b,v,w,E)=>i(this,void 0,void 0,function*(){const S=yield u.callWithSyncFeeERC2771WithSignature({struct:y,syncFeeParams:b,signature:v,options:w,sponsorApiKey:E},s(this,a,"f"));return s(this,c,"f").hasHandlers()&&(yield s(this,c,"f").subscribe(S.taskId)),S}),this.isNetworkSupported=y=>u.isNetworkSupported({chainId:y},s(this,a,"f")),this.getSupportedNetworks=()=>u.getSupportedNetworks(s(this,a,"f")),this.isOracleActive=y=>u.isOracleActive({chainId:y},s(this,a,"f")),this.getGelatoOracles=()=>u.getGelatoOracles(s(this,a,"f")),this.getPaymentTokens=y=>u.getPaymentTokens({chainId:y},s(this,a,"f")),this.getEstimatedFee=(y,b,v,w,E=BigInt(0))=>u.getEstimatedFee({chainId:y,paymentToken:b,gasLimit:v,isHighPriority:w,gasLimitL1:E},s(this,a,"f")),this.getTaskStatus=y=>u.getTaskStatus({taskId:y},s(this,a,"f")),this.onTaskStatusUpdate=y=>{s(this,c,"f").onUpdate(y)},this.offTaskStatusUpdate=y=>{s(this,c,"f").offUpdate(y)},this.onError=y=>{s(this,c,"f").onError(y)},this.offError=y=>{s(this,c,"f").offError(y)},this.subscribeTaskStatusUpdate=y=>i(this,void 0,void 0,function*(){yield s(this,c,"f").subscribe(y)}),this.unsubscribeTaskStatusUpdate=y=>i(this,void 0,void 0,function*(){yield s(this,c,"f").unsubscribe(y)}),o(this,a,this._getConfiguration(x),"f"),o(this,c,new h.WebsocketHandler(s(this,a,"f").websocketUrl),"f")}}e.GelatoRelay=p,a=new WeakMap,c=new WeakMap})(PM);function vrt(e,t){const[n,r]=j.useState(0);return j.useEffect(()=>{if(console.log(`${n} rounds ${e}`),e){const i=setTimeout(()=>{r(n+1)},t);return()=>clearInterval(i)}else r(0)},[e,n]),{rounds:n}}const xrt=10;function wrt(e,t,n,r,i){const[o,s]=j.useState(),[a,c]=j.useState(),[u,l]=rie(`${eie}/taskStatus/${i}/${(r!==void 0?r.toString():"unknown").toString()}`),[d,f]=j.useState(),[h,p]=j.useState(),[m,x]=j.useState(!1),{rounds:y}=vrt(m,4e3);function b(){const I=u==null?void 0:u.taskState;["CheckPending","ExecPending","WaitingForConfirmation"].includes(I)?p("pending"):["ExecSuccess"].includes(I)&&(u!=null&&u.transactionHash)?S("success",{data:u==null?void 0:u.transactionHash}):["ExecReverted","Cancelled"].includes(I)&&S("error",{error:u==null?void 0:u.lastCheckMessage})}async function v(){if(console.log(`relay ${e}`),!t||!n)throw"missing account";const{r:I,s:A,v:O}=await RGe(e,t),N=t2({args:[Number(O),I,A],abi:A5,functionName:i});p("pending");const R=await Ert(N,t,n);await E(R.taskId),console.log(`set ${r} to taskId ${R.taskId}`)}async function w(){u&&(await E(u.taskId),b())}async function E(I){const A=new PM.GelatoRelay;let O,N=3;for(;N>0;)try{O=await A.getTaskStatus(I),l(O);return}catch(R){console.log(R),N--}N===0&&S("error",{error:"error fetching status"})}function S(I,A){p(I),s(A==null?void 0:A.error),c(A==null?void 0:A.data),x(!1),I=="error"&&l(void 0)}return j.useEffect(()=>{e!==""&&t&&n&&!u&&r!==void 0&&v()},[e]),j.useEffect(()=>{f(u?u.taskId:void 0)},[u]),j.useEffect(()=>{d?(w(),x(!0)):(p(void 0),x(!1))},[d]),j.useEffect(()=>{y!==0&&(y>xrt?S("error",{error:"too many failed attempt with gelato"}):w())},[y]),{status:h,error:o,data:a}}async function Ert(e,t,n){const r=new PM.GelatoRelay,i={chainId:BigInt(Mh),target:u2[Mh],data:e,user:t,feeToken:_Pe,isRelayContext:!0};return await r.callWithSyncFeeERC2771(i,n)}function XM(){const{burnerWallet:e}=kde();return e}function $fe(e){const t=FL(),n=XM(),r=j.useRef(null),[i,o]=rie("password",""),[s,a]=j.useState(),{status:c,error:u}=wrt(i,n==null?void 0:n.address,n,s,e.submitFunctionName);j.useEffect(()=>{c==="error"&&(t({title:"Error",description:`An error occurred: ${u}`,status:"error",duration:9e3,isClosable:!0}),o(""))},[c]),j.useEffect(()=>{e.index!==void 0&&e.index!==s&&(i!==""&&s!=null&&(t({title:"Success!",description:"Transaction finalized. Congrats!",status:"success",duration:9e3,isClosable:!0}),o(""),r.current&&(r.current.value="")),a(e.index))},[e.index]);function l(){if(!n)t({title:"Error",description:"Account not available",status:"error",duration:9e3,isClosable:!0});else if(e.index!==void 0&&r.current!==null){const d=r.current.value;e.solutionMatcher(d)?(t({title:"Correct!",description:"Correct solution. Waiting for the transaction to be finalized...",status:"info",duration:9e3,isClosable:!0}),e.setPasswordAtIndex(e.index,d),o(d)):t({title:"Error",description:"Wrong solution",status:"error",duration:9e3,isClosable:!0})}}return g.jsxs(Af,{layerStyle:"base",align:"flex-start",children:[e.children,g.jsx(zL,{ref:r,placeholder:"password"}),g.jsx(Ls,{isDisabled:c==="pending",onClick:()=>l(),children:"Submit"})]})}function Crt(e){const[t,n]=j.useState(),r=B7({abi:A5,address:u2[Mh],functionName:"playerToKeys",args:[e],query:{enabled:e!==void 0,refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0}});return j.useEffect(()=>{if(r.data!==void 0){const o=r.data.toString(2).split("").filter(s=>s==="1").length;n(o),console.log(o)}}),t}function Art(){const e=XM();return{currentSmartContractSideQuestIndex:Crt(e==null?void 0:e.address)}}function Srt(){const{currentSmartContractSideQuestIndex:e}=Art();return g.jsx($fe,{index:e,setPasswordAtIndex:()=>{},submitFunctionName:"submitKey",solutionMatcher:t=>OGe(t),children:g.jsxs(Af,{className:"content-pane",align:"flex-start",children:[g.jsxs(Gr,{variant:"h2",children:["You solved ",e," side quests."]}),g.jsxs(hi,{children:["Did you find a side quest? Submit the password with this form to add it to your score in the leaderboard. More info in the"," ",g.jsx(Bo,{href:"/#faq",children:"FAQs"}),"."]})]})})}function Hfe(e){return`undefined/${e}`}function krt(){return B7({abi:A5,address:u2[Mh],functionName:"questsRootCid"}).data}function Trt(e){const[t,n]=j.useState(),r=B7({abi:A5,address:u2[Mh],functionName:"playerToCurrentChapter",args:[e],query:{enabled:e!==void 0,refetchInterval:5e3,refetchOnMount:!0,refetchOnWindowFocus:!0}});return j.useEffect(()=>{r.data!==void 0&&(n(Number(r.data)),console.log(r.data))}),t}function _rt(e,t){localStorage.setItem(Hfe(`${Tce}/${e}`),t)}function Prt(e){return localStorage.getItem(Hfe(`${Tce}/${e}`))||""}function Irt(){const e=XM(),[t,n]=j.useState(""),r=krt(),i=Trt(e==null?void 0:e.address);async function o(s){const c=await(await fetch(`game-data/${r}/${s}`)).text();if(console.log(i),s>0){const u=Prt(s-1),l=await EGe(c,u);n(l)}else n(c)}return j.useEffect(()=>{r===void 0||i===void 0||o(i)},[r,i]),{currentSmartContractChapterIndex:i,setChapterPassword:_rt,currentChapterContent:t}}function EY(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const s=n.slice(i,r).trim();(s||!o)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Vfe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Rrt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nrt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ort={};function CY(e,t){return(Ort.jsx?Nrt:Rrt).test(e)}const Lrt=/[ \t\n\f\r]/g;function Brt(e){return typeof e=="object"?e.type==="text"?AY(e.value):!1:AY(e)}function AY(e){return e.replace(Lrt,"")===""}class ex{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ex.prototype.property={};ex.prototype.normal={};ex.prototype.space=null;function Wfe(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&Urt.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(kY,Hrt);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!kY.test(o)){let s=o.replace(zrt,$rt);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=eD}return new i(r,t)}function $rt(e){return"-"+e.toLowerCase()}function Hrt(e){return e.charAt(1).toUpperCase()}const Vrt={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},tx=Wfe([Qfe,Kfe,Zfe,Jfe,jrt],"html"),Rf=Wfe([Qfe,Kfe,Zfe,Jfe,Frt],"svg");function TY(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Xfe(e){return e.join(" ").trim()}var e0e={},_Y=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wrt=/\n/g,Grt=/^\s*/,Krt=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Qrt=/^:\s*/,Yrt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,qrt=/^[;\s]*/,Zrt=/^\s+|\s+$/g,Jrt=` +`,PY="/",IY="*",E0="",Xrt="comment",eit="declaration",tit=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var m=p.match(Wrt);m&&(n+=m.length);var x=p.lastIndexOf(Jrt);r=~x?p.length-x:r+p.length}function o(){var p={line:n,column:r};return function(m){return m.position=new s(p),u(),m}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(p){var m=p.exec(e);if(m){var x=m[0];return i(x),e=e.slice(x.length),m}}function u(){c(Grt)}function l(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=o();if(!(PY!=e.charAt(0)||IY!=e.charAt(1))){for(var m=2;E0!=e.charAt(m)&&(IY!=e.charAt(m)||PY!=e.charAt(m+1));)++m;if(m+=2,E0===e.charAt(m-1))return a("End of comment missing");var x=e.slice(2,m-2);return r+=2,i(x),e=e.slice(m),r+=2,p({type:Xrt,comment:x})}}function f(){var p=o(),m=c(Krt);if(m){if(d(),!c(Qrt))return a("property missing ':'");var x=c(Yrt),y=p({type:eit,property:RY(m[0].replace(_Y,E0)),value:x?RY(x[0].replace(_Y,E0)):E0});return c(qrt),y}}function h(){var p=[];l(p);for(var m;m=f();)m!==!1&&(p.push(m),l(p));return p}return u(),h()};function RY(e){return e?e.replace(Zrt,E0):E0}var nit=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e0e,"__esModule",{value:!0});var NY=e0e.default=iit,rit=nit(tit);function iit(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,rit.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?t(s,a,o):a&&(n=n||{},n[s]=a)}}),n}const oit=NY.default||NY,UC=t0e("end"),Qc=t0e("start");function t0e(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function sit(e){const t=Qc(e),n=UC(e);if(t&&n)return{start:t,end:n}}function F3(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?OY(e.position):"start"in e||"end"in e?OY(e):"line"in e||"column"in e?tN(e):""}function tN(e){return LY(e&&e.line)+":"+LY(e&&e.column)}function OY(e){return tN(e&&e.start)+"-"+tN(e&&e.end)}function LY(e){return e&&typeof e=="number"?e:1}class Ai extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=F3(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ai.prototype.file="";Ai.prototype.name="";Ai.prototype.reason="";Ai.prototype.message="";Ai.prototype.stack="";Ai.prototype.column=void 0;Ai.prototype.line=void 0;Ai.prototype.ancestors=void 0;Ai.prototype.cause=void 0;Ai.prototype.fatal=void 0;Ai.prototype.place=void 0;Ai.prototype.ruleId=void 0;Ai.prototype.source=void 0;const tD={}.hasOwnProperty,ait=new Map,cit=/[A-Z]/g,uit=/-([a-z])/g,lit=new Set(["table","tbody","thead","tfoot","tr"]),dit=new Set(["td","th"]),n0e="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fit(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=xit(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vit(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Rf:tx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=r0e(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function r0e(e,t,n){if(t.type==="element")return hit(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pit(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mit(e,t,n);if(t.type==="mdxjsEsm")return git(e,t);if(t.type==="root")return yit(e,t,n);if(t.type==="text")return bit(e,t)}function hit(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const o=o0e(e,t.tagName,!1),s=wit(e,t);let a=rD(e,t);return lit.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Brt(c):!0})),i0e(e,s,o,t),nD(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function pit(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}C4(e,t.position)}function git(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);C4(e,t.position)}function mit(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Rf,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:o0e(e,t.name,!0),s=Eit(e,t),a=rD(e,t);return i0e(e,s,o,t),nD(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function yit(e,t,n){const r={};return nD(r,rD(e,t)),e.create(t,e.Fragment,r,n)}function bit(e,t){return t.value}function i0e(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function nD(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vit(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function xit(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),c=Qc(r);return t(i,o,s,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function wit(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&tD.call(t.properties,i)){const o=Cit(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&dit.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Eit(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else C4(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else C4(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function rD(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ait;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?(xl(e,e.length,0,t),e):t}const DY={}.hasOwnProperty;function Nit(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function J1(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pc=Nf(/[A-Za-z]/),zo=Nf(/[\dA-Za-z]/),Bit=Nf(/[#-'*+\--9=?A-Z^-~]/);function nN(e){return e!==null&&(e<32||e===127)}const rN=Nf(/\d/),Mit=Nf(/[\dA-Fa-f]/),Dit=Nf(/[!-/:-@[-`{-~]/);function bt(e){return e!==null&&e<-2}function ho(e){return e!==null&&(e<0||e===32)}function an(e){return e===-2||e===-1||e===32}const jit=Nf(new RegExp("\\p{P}|\\p{S}","u")),Fit=Nf(/\s/);function Nf(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _2(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Pn(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return an(c)?(e.enter(n),a(c)):t(c)}function a(c){return an(c)&&o++s))return;const I=t.events.length;let A=I,O,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(O){N=t.events[A][1].end;break}O=!0}for(y(r),S=I;Sv;){const E=n[w];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Vit(e,t,n){return Pn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function FY(e){if(e===null||ho(e)||Fit(e))return 1;if(jit(e))return 2}function oD(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[r][1].end),f=Object.assign({},e[n][1].start);UY(d,-c),UY(f,c),s={type:c>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},a={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},o={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ds(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ds(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Ds(u,oD(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ds(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(l=2,u=Ds(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):l=0,xl(e,r-1,n-r+3,u),n=r+u.length-l-2;break}}for(n=-1;++n0&&an(S)?Pn(e,b,"linePrefix",o+1)(S):b(S)}function b(S){return S===null||bt(S)?e.check(zY,m,w)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||bt(S)?(e.exit("codeFlowValue"),b(S)):(e.consume(S),v)}function w(S){return e.exit("codeFenced"),t(S)}function E(S,I,A){let O=0;return N;function N(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),R}function R(F){return S.enter("codeFencedFence"),an(F)?Pn(S,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):_(F)}function _(F){return F===a?(S.enter("codeFencedFenceSequence"),M(F)):A(F)}function M(F){return F===a?(O++,S.consume(F),M):O>=s?(S.exit("codeFencedFenceSequence"),an(F)?Pn(S,z,"whitespace")(F):z(F)):A(F)}function z(F){return F===null||bt(F)?(S.exit("codeFencedFence"),I(F)):A(F)}}}function not(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const wT={name:"codeIndented",tokenize:iot},rot={tokenize:oot,partial:!0};function iot(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Pn(e,o,"linePrefix",5)(u)}function o(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):bt(u)?e.attempt(rot,s,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||bt(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function oot(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):bt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Pn(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):bt(s)?i(s):n(s)}}const sot={name:"codeText",tokenize:uot,resolve:aot,previous:cot};function aot(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&pb(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pb(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pb(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function f0e(e,t,n,r,i,o,s,a,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||nN(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),f(y)):y===null||y===60||bt(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!l&&(y===null||y===41||ho(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):l999||h===null||h===91||h===93&&!c||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):bt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||bt(h)||a++>999?(e.exit("chunkString"),l(h)):(e.consume(h),c||(c=!an(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function p0e(e,t,n,r,i,o){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,c):n(f)}function c(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===s?(e.exit(o),c(s)):f===null?n(f):bt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Pn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(f){return f===s||f===null||bt(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:l)}function d(f){return f===s||f===92?(e.consume(f),l):l(f)}}function U3(e,t){let n;return r;function r(i){return bt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):an(i)?Pn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const yot={name:"definition",tokenize:vot},bot={tokenize:xot,partial:!0};function vot(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return h0e.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=J1(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return ho(h)?U3(e,u)(h):u(h)}function u(h){return f0e(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function l(h){return e.attempt(bot,d,d)(h)}function d(h){return an(h)?Pn(e,f,"whitespace")(h):f(h)}function f(h){return h===null||bt(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function xot(e,t,n){return r;function r(a){return ho(a)?U3(e,i)(a):n(a)}function i(a){return p0e(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return an(a)?Pn(e,s,"whitespace")(a):s(a)}function s(a){return a===null||bt(a)?t(a):n(a)}}const wot={name:"hardBreakEscape",tokenize:Eot};function Eot(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return bt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Cot={name:"headingAtx",tokenize:Sot,resolve:Aot};function Aot(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xl(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Sot(e,t,n){let r=0;return i;function i(l){return e.enter("atxHeading"),o(l)}function o(l){return e.enter("atxHeadingSequence"),s(l)}function s(l){return l===35&&r++<6?(e.consume(l),s):l===null||ho(l)?(e.exit("atxHeadingSequence"),a(l)):n(l)}function a(l){return l===35?(e.enter("atxHeadingSequence"),c(l)):l===null||bt(l)?(e.exit("atxHeading"),t(l)):an(l)?Pn(e,a,"whitespace")(l):(e.enter("atxHeadingText"),u(l))}function c(l){return l===35?(e.consume(l),c):(e.exit("atxHeadingSequence"),a(l))}function u(l){return l===null||l===35||ho(l)?(e.exit("atxHeadingText"),a(l)):(e.consume(l),u)}}const kot=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],HY=["pre","script","style","textarea"],Tot={name:"htmlFlow",tokenize:Rot,resolveTo:Iot,concrete:!0},_ot={tokenize:Oot,partial:!0},Pot={tokenize:Not,partial:!0};function Iot(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Rot(e,t,n){const r=this;let i,o,s,a,c;return u;function u(P){return l(P)}function l(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),o=!0,m):P===63?(e.consume(P),i=3,r.interrupt?t:L):Pc(P)?(e.consume(P),s=String.fromCharCode(P),x):n(P)}function f(P){return P===45?(e.consume(P),i=2,h):P===91?(e.consume(P),i=5,a=0,p):Pc(P)?(e.consume(P),i=4,r.interrupt?t:L):n(P)}function h(P){return P===45?(e.consume(P),r.interrupt?t:L):n(P)}function p(P){const K="CDATA[";return P===K.charCodeAt(a++)?(e.consume(P),a===K.length?r.interrupt?t:_:p):n(P)}function m(P){return Pc(P)?(e.consume(P),s=String.fromCharCode(P),x):n(P)}function x(P){if(P===null||P===47||P===62||ho(P)){const K=P===47,ce=s.toLowerCase();return!K&&!o&&HY.includes(ce)?(i=1,r.interrupt?t(P):_(P)):kot.includes(s.toLowerCase())?(i=6,K?(e.consume(P),y):r.interrupt?t(P):_(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):o?b(P):v(P))}return P===45||zo(P)?(e.consume(P),s+=String.fromCharCode(P),x):n(P)}function y(P){return P===62?(e.consume(P),r.interrupt?t:_):n(P)}function b(P){return an(P)?(e.consume(P),b):N(P)}function v(P){return P===47?(e.consume(P),N):P===58||P===95||Pc(P)?(e.consume(P),w):an(P)?(e.consume(P),v):N(P)}function w(P){return P===45||P===46||P===58||P===95||zo(P)?(e.consume(P),w):E(P)}function E(P){return P===61?(e.consume(P),S):an(P)?(e.consume(P),E):v(P)}function S(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),c=P,I):an(P)?(e.consume(P),S):A(P)}function I(P){return P===c?(e.consume(P),c=null,O):P===null||bt(P)?n(P):(e.consume(P),I)}function A(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ho(P)?E(P):(e.consume(P),A)}function O(P){return P===47||P===62||an(P)?v(P):n(P)}function N(P){return P===62?(e.consume(P),R):n(P)}function R(P){return P===null||bt(P)?_(P):an(P)?(e.consume(P),R):n(P)}function _(P){return P===45&&i===2?(e.consume(P),$):P===60&&i===1?(e.consume(P),W):P===62&&i===4?(e.consume(P),q):P===63&&i===3?(e.consume(P),L):P===93&&i===5?(e.consume(P),H):bt(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_ot,V,M)(P)):P===null||bt(P)?(e.exit("htmlFlowData"),M(P)):(e.consume(P),_)}function M(P){return e.check(Pot,z,V)(P)}function z(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),F}function F(P){return P===null||bt(P)?M(P):(e.enter("htmlFlowData"),_(P))}function $(P){return P===45?(e.consume(P),L):_(P)}function W(P){return P===47?(e.consume(P),s="",G):_(P)}function G(P){if(P===62){const K=s.toLowerCase();return HY.includes(K)?(e.consume(P),q):_(P)}return Pc(P)&&s.length<8?(e.consume(P),s+=String.fromCharCode(P),G):_(P)}function H(P){return P===93?(e.consume(P),L):_(P)}function L(P){return P===62?(e.consume(P),q):P===45&&i===2?(e.consume(P),L):_(P)}function q(P){return P===null||bt(P)?(e.exit("htmlFlowData"),V(P)):(e.consume(P),q)}function V(P){return e.exit("htmlFlow"),t(P)}}function Not(e,t,n){const r=this;return i;function i(s){return bt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Oot(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(zC,t,n)}}const Lot={name:"htmlText",tokenize:Bot};function Bot(e,t,n){const r=this;let i,o,s;return a;function a(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),E):L===63?(e.consume(L),v):Pc(L)?(e.consume(L),A):n(L)}function u(L){return L===45?(e.consume(L),l):L===91?(e.consume(L),o=0,p):Pc(L)?(e.consume(L),b):n(L)}function l(L){return L===45?(e.consume(L),h):n(L)}function d(L){return L===null?n(L):L===45?(e.consume(L),f):bt(L)?(s=d,W(L)):(e.consume(L),d)}function f(L){return L===45?(e.consume(L),h):d(L)}function h(L){return L===62?$(L):L===45?f(L):d(L)}function p(L){const q="CDATA[";return L===q.charCodeAt(o++)?(e.consume(L),o===q.length?m:p):n(L)}function m(L){return L===null?n(L):L===93?(e.consume(L),x):bt(L)?(s=m,W(L)):(e.consume(L),m)}function x(L){return L===93?(e.consume(L),y):m(L)}function y(L){return L===62?$(L):L===93?(e.consume(L),y):m(L)}function b(L){return L===null||L===62?$(L):bt(L)?(s=b,W(L)):(e.consume(L),b)}function v(L){return L===null?n(L):L===63?(e.consume(L),w):bt(L)?(s=v,W(L)):(e.consume(L),v)}function w(L){return L===62?$(L):v(L)}function E(L){return Pc(L)?(e.consume(L),S):n(L)}function S(L){return L===45||zo(L)?(e.consume(L),S):I(L)}function I(L){return bt(L)?(s=I,W(L)):an(L)?(e.consume(L),I):$(L)}function A(L){return L===45||zo(L)?(e.consume(L),A):L===47||L===62||ho(L)?O(L):n(L)}function O(L){return L===47?(e.consume(L),$):L===58||L===95||Pc(L)?(e.consume(L),N):bt(L)?(s=O,W(L)):an(L)?(e.consume(L),O):$(L)}function N(L){return L===45||L===46||L===58||L===95||zo(L)?(e.consume(L),N):R(L)}function R(L){return L===61?(e.consume(L),_):bt(L)?(s=R,W(L)):an(L)?(e.consume(L),R):O(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,M):bt(L)?(s=_,W(L)):an(L)?(e.consume(L),_):(e.consume(L),z)}function M(L){return L===i?(e.consume(L),i=void 0,F):L===null?n(L):bt(L)?(s=M,W(L)):(e.consume(L),M)}function z(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||ho(L)?O(L):(e.consume(L),z)}function F(L){return L===47||L===62||ho(L)?O(L):n(L)}function $(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function W(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),G}function G(L){return an(L)?Pn(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):H(L)}function H(L){return e.enter("htmlTextData"),s(L)}}const sD={name:"labelEnd",tokenize:zot,resolveTo:Uot,resolveAll:Fot},Mot={tokenize:$ot},Dot={tokenize:Hot},jot={tokenize:Vot};function Fot(e){let t=-1;for(;++t=3&&(u===null||bt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),an(u)?Pn(e,a,"whitespace")(u):a(u))}}const qi={name:"list",tokenize:Xot,continuation:{tokenize:est},exit:nst},Zot={tokenize:rst,partial:!0},Jot={tokenize:tst,partial:!0};function Xot(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:rN(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(ew,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return rN(h)&&++s<10?(e.consume(h),c):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zC,r.interrupt?n:l,e.attempt(Zot,f,d))}function l(h){return r.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return an(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function est(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zC,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pn(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!an(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jot,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pn(e,e.attempt(qi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tst(e,t,n){const r=this;return Pn(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function nst(e){e.exit(this.containerState.type)}function rst(e,t,n){const r=this;return Pn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!an(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const VY={name:"setextUnderline",tokenize:ost,resolveTo:ist};function ist(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function ost(e,t,n){const r=this;let i;return o;function o(u){let l=r.events.length,d;for(;l--;)if(r.events[l][1].type!=="lineEnding"&&r.events[l][1].type!=="linePrefix"&&r.events[l][1].type!=="content"){d=r.events[l][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),an(u)?Pn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||bt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const sst={tokenize:ast};function ast(e){const t=this,n=e.attempt(zC,r,e.attempt(this.parser.constructs.flowInitial,i,Pn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fot,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const cst={resolveAll:m0e()},ust=g0e("string"),lst=g0e("text");function g0e(e){return{tokenize:t,resolveAll:m0e(e==="text"?dst:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(l){return u(l)?o(l):a(l)}function a(l){if(l===null){n.consume(l);return}return n.enter("data"),n.consume(l),c}function c(l){return u(l)?(n.exit("data"),o(l)):(n.consume(l),c)}function u(l){if(l===null)return!0;const d=i[l];let f=-1;if(d)for(;++f-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function pst(e,t){let n=-1;const r=[];let i;for(;++n0){const ue=T.tokenStack[T.tokenStack.length-1];(ue[1]||GY).call(T,void 0,ue[0])}for(U.position={start:Kl(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Kl(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function zst(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $st(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function v0e(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Hst(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return v0e(e,t);const i={src:_2(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Vst(e,t){const n={src:_2(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Wst(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Gst(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return v0e(e,t);const i={href:_2(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Kst(e,t){const n={href:_2(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Qst(e,t,n){const r=e.all(t),i=n?Yst(n):x0e(t),o={},s=[];if(typeof t.checked=="boolean"){const l=r[0];let d;l&&l.type==="element"&&l.tagName==="p"?d=l:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function qst(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Qc(t.children[1]),c=UC(t.children[t.children.length-1]);a&&c&&(s.position={start:a,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function tat(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let c=-1;const u=[];for(;++c0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(YY(t.slice(i),i>0,!1)),o.join("")}function YY(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===KY||o===QY;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===KY||o===QY;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function iat(e,t){const n={type:"text",value:rat(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function oat(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sat={blockquote:Bst,break:Mst,code:Dst,delete:jst,emphasis:Fst,footnoteReference:Ust,heading:zst,html:$st,imageReference:Hst,image:Vst,inlineCode:Wst,linkReference:Gst,link:Kst,listItem:Qst,list:qst,paragraph:Zst,root:Jst,strong:Xst,table:eat,tableCell:nat,tableRow:tat,text:iat,thematicBreak:oat,toml:D6,yaml:D6,definition:D6,footnoteDefinition:D6};function D6(){}const w0e=-1,$C=0,Z9=1,J9=2,aD=3,cD=4,uD=5,lD=6,E0e=7,C0e=8,qY=typeof self=="object"?self:globalThis,aat=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case $C:case w0e:return n(s,i);case Z9:{const a=n([],i);for(const c of s)a.push(r(c));return a}case J9:{const a=n({},i);for(const[c,u]of s)a[r(c)]=r(u);return a}case aD:return n(new Date(s),i);case cD:{const{source:a,flags:c}=s;return n(new RegExp(a,c),i)}case uD:{const a=n(new Map,i);for(const[c,u]of s)a.set(r(c),r(u));return a}case lD:{const a=n(new Set,i);for(const c of s)a.add(r(c));return a}case E0e:{const{name:a,message:c}=s;return n(new qY[a](c),i)}case C0e:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new qY[o](s),i)};return r},ZY=e=>aat(new Map,e)(0),Op="",{toString:cat}={},{keys:uat}=Object,gb=e=>{const t=typeof e;if(t!=="object"||!e)return[$C,t];const n=cat.call(e).slice(8,-1);switch(n){case"Array":return[Z9,Op];case"Object":return[J9,Op];case"Date":return[aD,Op];case"RegExp":return[cD,Op];case"Map":return[uD,Op];case"Set":return[lD,Op]}return n.includes("Array")?[Z9,n]:n.includes("Error")?[E0e,n]:[J9,n]},j6=([e,t])=>e===$C&&(t==="function"||t==="symbol"),lat=(e,t,n,r)=>{const i=(s,a)=>{const c=r.push(s)-1;return n.set(a,c),c},o=s=>{if(n.has(s))return n.get(s);let[a,c]=gb(s);switch(a){case $C:{let l=s;switch(c){case"bigint":a=C0e,l=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);l=null;break;case"undefined":return i([w0e],s)}return i([a,l],s)}case Z9:{if(c)return i([c,[...s]],s);const l=[],d=i([a,l],s);for(const f of s)l.push(o(f));return d}case J9:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const l=[],d=i([a,l],s);for(const f of uat(s))(e||!j6(gb(s[f])))&&l.push([o(f),o(s[f])]);return d}case aD:return i([a,s.toISOString()],s);case cD:{const{source:l,flags:d}=s;return i([a,{source:l,flags:d}],s)}case uD:{const l=[],d=i([a,l],s);for(const[f,h]of s)(e||!(j6(gb(f))||j6(gb(h))))&&l.push([o(f),o(h)]);return d}case lD:{const l=[],d=i([a,l],s);for(const f of s)(e||!j6(gb(f)))&&l.push(o(f));return d}}const{message:u}=s;return i([a,{name:c,message:u}],s)};return o},JY=(e,{json:t,lossy:n}={})=>{const r=[];return lat(!(t||n),!!t,new Map,r)(e),r},Vm=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ZY(JY(e,t)):structuredClone(e):(e,t)=>ZY(JY(e,t));function dat(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function fat(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hat(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dat,r=e.options.footnoteBackLabel||fat,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c0&&p.push({type:"text",value:" "});let b=typeof n=="string"?n:n(c,h);typeof b=="string"&&(b={type:"text",value:b}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=l[l.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...p)}else l.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(l,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Vm(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` +`}]}}const A0e=function(e){if(e==null)return yat;if(typeof e=="function")return HC(e);if(typeof e=="object")return Array.isArray(e)?pat(e):gat(e);if(typeof e=="string")return mat(e);throw new Error("Expected function, string, or object as test")};function pat(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let h=S0e,p,m,x;if((!t||o(c,u,l[l.length-1]||void 0))&&(h=Eat(n(c,l)),h[0]===XY))return h;if("children"in c&&c.children){const y=c;if(y.children&&h[0]!==xat)for(m=(r?y.children.length:-1)+s,x=l.concat(y);m>-1&&m0&&n.push({type:"text",value:` +`}),n}function eq(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tq(e,t){const n=Aat(e,t),r=n.one(e,void 0),i=hat(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function Pat(e,t){return e&&"run"in e?async function(n,r){const i=tq(n,{file:r,...t});await e.run(i,r)}:function(n,r){return tq(n,{file:r,...t||e})}}function nq(e){if(e)throw e}var tw=Object.prototype.hasOwnProperty,k0e=Object.prototype.toString,rq=Object.defineProperty,iq=Object.getOwnPropertyDescriptor,oq=function(t){return typeof Array.isArray=="function"?Array.isArray(t):k0e.call(t)==="[object Array]"},sq=function(t){if(!t||k0e.call(t)!=="[object Object]")return!1;var n=tw.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&tw.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||tw.call(t,i)},aq=function(t,n){rq&&n.name==="__proto__"?rq(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},cq=function(t,n){if(n==="__proto__")if(tw.call(t,n)){if(iq)return iq(t,n).value}else return;return t[n]},Iat=function e(){var t,n,r,i,o,s,a=arguments[0],c=1,u=arguments.length,l=!1;for(typeof a=="boolean"&&(l=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});cs.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(u){const l=u;if(a&&n)throw l;return i(l)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const sc={basename:Oat,dirname:Lat,extname:Bat,join:Mat,sep:"/"};function Oat(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nx(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Lat(e){if(nx(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Bat(e){nx(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Mat(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function jat(e,t){let n="",r=0,i=-1,o=0,s=-1,a,c;for(;++s<=e.length;){if(s2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function nx(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fat={cwd:Uat};function Uat(){return"/"}function aN(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zat(e){if(typeof e=="string")e=new URL(e);else if(!aN(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return $at(e)}function $at(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[h,...p]=l;const m=r[f][1];sN(m)&&sN(h)&&(h=CT(!0,m,h)),r[f]=[u,h,...p]}}}}const Gat=new fD().freeze();function TT(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _T(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function PT(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lq(e){if(!sN(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dq(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function F6(e){return Kat(e)?e:new T0e(e)}function Kat(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Qat(e){return typeof e=="string"||Yat(e)}function Yat(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qat="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fq=[],hq={allowDangerousHtml:!0},Zat=/^(https?|ircs?|mailto|xmpp)$/i,Jat=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Xat(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,s=e.disallowedElements,a=e.rehypePlugins||fq,c=e.remarkPlugins||fq,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hq}:hq,l=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||ect,h=Gat().use(Lst).use(c).use(Pat,u).use(a),p=new T0e;typeof r=="string"&&(p.value=r);for(const b of Jat)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+qat+b.id,void 0);const m=h.parse(p);let x=h.runSync(m,p);return i&&(x={type:"element",tagName:"div",properties:{className:i},children:x.type==="root"?x.children:[x]}),dD(x,y),fit(x,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function y(b,v,w){if(b.type==="raw"&&w&&typeof v=="number")return l?w.children.splice(v,1):w.children[v]={type:"text",value:b.value},v;if(b.type==="element"){let E;for(E in xT)if(Object.hasOwn(xT,E)&&Object.hasOwn(b.properties,E)){const S=b.properties[E],I=xT[E];(I===null||I.includes(b.tagName))&&(b.properties[E]=f(String(S||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):s?s.includes(b.tagName):!1;if(!E&&n&&typeof v=="number"&&(E=!n(b,v,w)),E&&w&&typeof v=="number")return d&&b.children?w.children.splice(v,1,...b.children):w.children.splice(v,1),v}}}function ect(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Zat.test(e.slice(0,t))?e:""}var tct=function(t){return nct(t)&&!rct(t)};function nct(e){return!!e&&typeof e=="object"}function rct(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||sct(e)}var ict=typeof Symbol=="function"&&Symbol.for,oct=ict?Symbol.for("react.element"):60103;function sct(e){return e.$$typeof===oct}function act(e){return Array.isArray(e)?[]:{}}function A4(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wm(act(e),e,t):e}function cct(e,t,n){return e.concat(t).map(function(r){return A4(r,n)})}function uct(e,t){if(!t.customMerge)return Wm;var n=t.customMerge(e);return typeof n=="function"?n:Wm}function lct(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function pq(e){return Object.keys(e).concat(lct(e))}function _0e(e,t){try{return t in e}catch{return!1}}function dct(e,t){return _0e(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function fct(e,t,n){var r={};return n.isMergeableObject(e)&&pq(e).forEach(function(i){r[i]=A4(e[i],n)}),pq(t).forEach(function(i){dct(e,i)||(_0e(e,i)&&n.isMergeableObject(t[i])?r[i]=uct(i,n)(e[i],t[i],n):r[i]=A4(t[i],n))}),r}function Wm(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||cct,n.isMergeableObject=n.isMergeableObject||tct,n.cloneUnlessOtherwiseSpecified=A4;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):fct(e,t,n):A4(t,n)}Wm.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Wm(r,i,n)},{})};var hct=Wm,pct=hct;const gct=wl(pct);/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var xs=function(){return(xs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1&&o<=t.length){let s=0;for(;;){let a=n[s];if(a===void 0){const c=yq(t,n[s-1]);a=c===-1?t.length+1:c+1,n[s]=a}if(a>o)return{line:s+1,column:o-(s>0?n[s-1]:0)+1,offset:o};s++}}}function i(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length1?n[o.line-2]:0)+o.column-1;if(s=55296&&e<=57343}function Hct(e){return e>=56320&&e<=57343}function Vct(e,t){return(e-55296)*1024+9216+t}function B0e(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function M0e(e){return e>=64976&&e<=65007||$ct.has(e)}var Pe;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Pe=Pe||(Pe={}));const Wct=65536;class Gct{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Wct,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t){const{line:n,col:r,offset:i}=this;return{code:t,startLine:n,endLine:n,startCol:r,endCol:r,startOffset:i,endOffset:i}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Hct(n))return this.pos++,this._addGap(),Vct(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ee.EOF;return this._err(Pe.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ee.EOF;const r=this.html.charCodeAt(n);return r===ee.CARRIAGE_RETURN?ee.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ee.EOF;let t=this.html.charCodeAt(this.pos);return t===ee.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,ee.LINE_FEED):t===ee.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,L0e(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===ee.LINE_FEED||t===ee.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){B0e(t)?this._err(Pe.controlCharacterInInputStream):M0e(t)&&this._err(Pe.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const td=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Kct=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var IT;const Qct=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Yct=(IT=String.fromCodePoint)!==null&&IT!==void 0?IT:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function qct(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Qct.get(e))!==null&&t!==void 0?t:e}var Nr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Nr||(Nr={}));const Zct=32;var Oc;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Oc||(Oc={}));function lN(e){return e>=Nr.ZERO&&e<=Nr.NINE}function Jct(e){return e>=Nr.UPPER_A&&e<=Nr.UPPER_F||e>=Nr.LOWER_A&&e<=Nr.LOWER_F}function Xct(e){return e>=Nr.UPPER_A&&e<=Nr.UPPER_Z||e>=Nr.LOWER_A&&e<=Nr.LOWER_Z||lN(e)}function eut(e){return e===Nr.EQUALS||Xct(e)}var _r;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(_r||(_r={}));var C0;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(C0||(C0={}));class tut{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=_r.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C0.Strict}startEntity(t){this.decodeMode=t,this.state=_r.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case _r.EntityStart:return t.charCodeAt(n)===Nr.NUM?(this.state=_r.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=_r.NamedEntity,this.stateNamedEntity(t,n));case _r.NumericStart:return this.stateNumericStart(t,n);case _r.NumericDecimal:return this.stateNumericDecimal(t,n);case _r.NumericHex:return this.stateNumericHex(t,n);case _r.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Zct)===Nr.LOWER_X?(this.state=_r.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=_r.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(s===Nr.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==C0.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Oc.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Oc.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case _r.NamedEntity:return this.result!==0&&(this.decodeMode!==C0.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case _r.NumericDecimal:return this.emitNumericEntity(0,2);case _r.NumericHex:return this.emitNumericEntity(0,3);case _r.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case _r.EntityStart:return 0}}}function j0e(e){let t="";const n=new tut(e,r=>t+=Yct(r));return function(i,o){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(o);const u=n.write(i,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}const c=t+i.slice(s);return t="",c}}function F0e(e,t,n,r){const i=(t&Oc.BRANCH_LENGTH)>>7,o=t&Oc.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const c=r-o;return c<0||c>=i?-1:e[n+c]-1}let s=n,a=s+i-1;for(;s<=a;){const c=s+a>>>1,u=e[c];if(ur)a=c-1;else return e[c+i]}return-1}j0e(td);j0e(Kct);var Oe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Oe=Oe||(Oe={}));var uf;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(uf=uf||(uf={}));var jo;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(jo=jo||(jo={}));var we;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(we=we||(we={}));var k;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"})(k=k||(k={}));const nut=new Map([[we.A,k.A],[we.ADDRESS,k.ADDRESS],[we.ANNOTATION_XML,k.ANNOTATION_XML],[we.APPLET,k.APPLET],[we.AREA,k.AREA],[we.ARTICLE,k.ARTICLE],[we.ASIDE,k.ASIDE],[we.B,k.B],[we.BASE,k.BASE],[we.BASEFONT,k.BASEFONT],[we.BGSOUND,k.BGSOUND],[we.BIG,k.BIG],[we.BLOCKQUOTE,k.BLOCKQUOTE],[we.BODY,k.BODY],[we.BR,k.BR],[we.BUTTON,k.BUTTON],[we.CAPTION,k.CAPTION],[we.CENTER,k.CENTER],[we.CODE,k.CODE],[we.COL,k.COL],[we.COLGROUP,k.COLGROUP],[we.DD,k.DD],[we.DESC,k.DESC],[we.DETAILS,k.DETAILS],[we.DIALOG,k.DIALOG],[we.DIR,k.DIR],[we.DIV,k.DIV],[we.DL,k.DL],[we.DT,k.DT],[we.EM,k.EM],[we.EMBED,k.EMBED],[we.FIELDSET,k.FIELDSET],[we.FIGCAPTION,k.FIGCAPTION],[we.FIGURE,k.FIGURE],[we.FONT,k.FONT],[we.FOOTER,k.FOOTER],[we.FOREIGN_OBJECT,k.FOREIGN_OBJECT],[we.FORM,k.FORM],[we.FRAME,k.FRAME],[we.FRAMESET,k.FRAMESET],[we.H1,k.H1],[we.H2,k.H2],[we.H3,k.H3],[we.H4,k.H4],[we.H5,k.H5],[we.H6,k.H6],[we.HEAD,k.HEAD],[we.HEADER,k.HEADER],[we.HGROUP,k.HGROUP],[we.HR,k.HR],[we.HTML,k.HTML],[we.I,k.I],[we.IMG,k.IMG],[we.IMAGE,k.IMAGE],[we.INPUT,k.INPUT],[we.IFRAME,k.IFRAME],[we.KEYGEN,k.KEYGEN],[we.LABEL,k.LABEL],[we.LI,k.LI],[we.LINK,k.LINK],[we.LISTING,k.LISTING],[we.MAIN,k.MAIN],[we.MALIGNMARK,k.MALIGNMARK],[we.MARQUEE,k.MARQUEE],[we.MATH,k.MATH],[we.MENU,k.MENU],[we.META,k.META],[we.MGLYPH,k.MGLYPH],[we.MI,k.MI],[we.MO,k.MO],[we.MN,k.MN],[we.MS,k.MS],[we.MTEXT,k.MTEXT],[we.NAV,k.NAV],[we.NOBR,k.NOBR],[we.NOFRAMES,k.NOFRAMES],[we.NOEMBED,k.NOEMBED],[we.NOSCRIPT,k.NOSCRIPT],[we.OBJECT,k.OBJECT],[we.OL,k.OL],[we.OPTGROUP,k.OPTGROUP],[we.OPTION,k.OPTION],[we.P,k.P],[we.PARAM,k.PARAM],[we.PLAINTEXT,k.PLAINTEXT],[we.PRE,k.PRE],[we.RB,k.RB],[we.RP,k.RP],[we.RT,k.RT],[we.RTC,k.RTC],[we.RUBY,k.RUBY],[we.S,k.S],[we.SCRIPT,k.SCRIPT],[we.SECTION,k.SECTION],[we.SELECT,k.SELECT],[we.SOURCE,k.SOURCE],[we.SMALL,k.SMALL],[we.SPAN,k.SPAN],[we.STRIKE,k.STRIKE],[we.STRONG,k.STRONG],[we.STYLE,k.STYLE],[we.SUB,k.SUB],[we.SUMMARY,k.SUMMARY],[we.SUP,k.SUP],[we.TABLE,k.TABLE],[we.TBODY,k.TBODY],[we.TEMPLATE,k.TEMPLATE],[we.TEXTAREA,k.TEXTAREA],[we.TFOOT,k.TFOOT],[we.TD,k.TD],[we.TH,k.TH],[we.THEAD,k.THEAD],[we.TITLE,k.TITLE],[we.TR,k.TR],[we.TRACK,k.TRACK],[we.TT,k.TT],[we.U,k.U],[we.UL,k.UL],[we.SVG,k.SVG],[we.VAR,k.VAR],[we.WBR,k.WBR],[we.XMP,k.XMP]]);function I2(e){var t;return(t=nut.get(e))!==null&&t!==void 0?t:k.UNKNOWN}const Ue=k,rut={[Oe.HTML]:new Set([Ue.ADDRESS,Ue.APPLET,Ue.AREA,Ue.ARTICLE,Ue.ASIDE,Ue.BASE,Ue.BASEFONT,Ue.BGSOUND,Ue.BLOCKQUOTE,Ue.BODY,Ue.BR,Ue.BUTTON,Ue.CAPTION,Ue.CENTER,Ue.COL,Ue.COLGROUP,Ue.DD,Ue.DETAILS,Ue.DIR,Ue.DIV,Ue.DL,Ue.DT,Ue.EMBED,Ue.FIELDSET,Ue.FIGCAPTION,Ue.FIGURE,Ue.FOOTER,Ue.FORM,Ue.FRAME,Ue.FRAMESET,Ue.H1,Ue.H2,Ue.H3,Ue.H4,Ue.H5,Ue.H6,Ue.HEAD,Ue.HEADER,Ue.HGROUP,Ue.HR,Ue.HTML,Ue.IFRAME,Ue.IMG,Ue.INPUT,Ue.LI,Ue.LINK,Ue.LISTING,Ue.MAIN,Ue.MARQUEE,Ue.MENU,Ue.META,Ue.NAV,Ue.NOEMBED,Ue.NOFRAMES,Ue.NOSCRIPT,Ue.OBJECT,Ue.OL,Ue.P,Ue.PARAM,Ue.PLAINTEXT,Ue.PRE,Ue.SCRIPT,Ue.SECTION,Ue.SELECT,Ue.SOURCE,Ue.STYLE,Ue.SUMMARY,Ue.TABLE,Ue.TBODY,Ue.TD,Ue.TEMPLATE,Ue.TEXTAREA,Ue.TFOOT,Ue.TH,Ue.THEAD,Ue.TITLE,Ue.TR,Ue.TRACK,Ue.UL,Ue.WBR,Ue.XMP]),[Oe.MATHML]:new Set([Ue.MI,Ue.MO,Ue.MN,Ue.MS,Ue.MTEXT,Ue.ANNOTATION_XML]),[Oe.SVG]:new Set([Ue.TITLE,Ue.FOREIGN_OBJECT,Ue.DESC]),[Oe.XLINK]:new Set,[Oe.XML]:new Set,[Oe.XMLNS]:new Set};function U0e(e){return e===Ue.H1||e===Ue.H2||e===Ue.H3||e===Ue.H4||e===Ue.H5||e===Ue.H6}we.STYLE,we.SCRIPT,we.XMP,we.IFRAME,we.NOEMBED,we.NOFRAMES,we.PLAINTEXT;const iut=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var ne;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(ne||(ne={}));const fr={DATA:ne.DATA,RCDATA:ne.RCDATA,RAWTEXT:ne.RAWTEXT,SCRIPT_DATA:ne.SCRIPT_DATA,PLAINTEXT:ne.PLAINTEXT,CDATA_SECTION:ne.CDATA_SECTION};function z3(e){return e>=ee.DIGIT_0&&e<=ee.DIGIT_9}function Zb(e){return e>=ee.LATIN_CAPITAL_A&&e<=ee.LATIN_CAPITAL_Z}function out(e){return e>=ee.LATIN_SMALL_A&&e<=ee.LATIN_SMALL_Z}function nd(e){return out(e)||Zb(e)}function dN(e){return nd(e)||z3(e)}function z0e(e){return e>=ee.LATIN_CAPITAL_A&&e<=ee.LATIN_CAPITAL_F}function $0e(e){return e>=ee.LATIN_SMALL_A&&e<=ee.LATIN_SMALL_F}function sut(e){return z3(e)||z0e(e)||$0e(e)}function U6(e){return e+32}function H0e(e){return e===ee.SPACE||e===ee.LINE_FEED||e===ee.TABULATION||e===ee.FORM_FEED}function aut(e){return e===ee.EQUALS_SIGN||dN(e)}function xq(e){return H0e(e)||e===ee.SOLIDUS||e===ee.GREATER_THAN_SIGN}class cut{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ne.DATA,this.returnState=ne.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Gct(n),this.currentLocation=this.getCurrentLocation(-1)}_err(t){var n,r;(r=(n=this.handler).onParseError)===null||r===void 0||r.call(n,this.preprocessor.getError(t))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(t){this.consumedAfterSnapshot-=t,this.preprocessor.retreat(t)}_reconsumeInState(t,n){this.state=t,this._callState(n)}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n0&&this._err(Pe.endTagWithAttributes),t.selfClosing&&this._err(Pe.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Pt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Pt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==t)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=n;return}this._createCharacterToken(t,n)}_emitCodePoint(t){const n=H0e(t)?Pt.WHITESPACE_CHARACTER:t===ee.NULL?Pt.NULL_CHARACTER:Pt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pt.CHARACTER,t)}_matchNamedCharacterReference(t){let n=null,r=0,i=!1;for(let o=0,s=td[0];o>=0&&(o=F0e(td,s,o+1,t),!(o<0));t=this._consume()){r+=1,s=td[o];const a=s&Oc.VALUE_LENGTH;if(a){const c=(a>>14)-1;if(t!==ee.SEMICOLON&&this._isCharacterReferenceInAttribute()&&aut(this.preprocessor.peek(1))?(n=[ee.AMPERSAND],o+=c):(n=c===0?[td[o]&~Oc.VALUE_LENGTH]:c===1?[td[++o]]:[td[++o],td[++o]],r=0,i=t!==ee.SEMICOLON),c===0){this._consume();break}}}return this._unconsume(r),i&&!this.preprocessor.endOfChunkHit&&this._err(Pe.missingSemicolonAfterCharacterReference),this._unconsume(1),n}_isCharacterReferenceInAttribute(){return this.returnState===ne.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ne.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ne.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case ne.DATA:{this._stateData(t);break}case ne.RCDATA:{this._stateRcdata(t);break}case ne.RAWTEXT:{this._stateRawtext(t);break}case ne.SCRIPT_DATA:{this._stateScriptData(t);break}case ne.PLAINTEXT:{this._statePlaintext(t);break}case ne.TAG_OPEN:{this._stateTagOpen(t);break}case ne.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case ne.TAG_NAME:{this._stateTagName(t);break}case ne.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case ne.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case ne.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case ne.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case ne.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case ne.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case ne.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case ne.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case ne.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case ne.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case ne.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case ne.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case ne.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case ne.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case ne.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case ne.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case ne.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case ne.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case ne.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case ne.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case ne.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case ne.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case ne.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case ne.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case ne.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case ne.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case ne.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case ne.BOGUS_COMMENT:{this._stateBogusComment(t);break}case ne.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case ne.COMMENT_START:{this._stateCommentStart(t);break}case ne.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case ne.COMMENT:{this._stateComment(t);break}case ne.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case ne.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case ne.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case ne.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case ne.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case ne.COMMENT_END:{this._stateCommentEnd(t);break}case ne.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case ne.DOCTYPE:{this._stateDoctype(t);break}case ne.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case ne.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case ne.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case ne.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case ne.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case ne.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case ne.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case ne.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case ne.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case ne.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case ne.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case ne.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case ne.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case ne.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case ne.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case ne.CDATA_SECTION:{this._stateCdataSection(t);break}case ne.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case ne.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case ne.CHARACTER_REFERENCE:{this._stateCharacterReference(t);break}case ne.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(t);break}case ne.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}case ne.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(t);break}case ne.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(t);break}case ne.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(t);break}case ne.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(t);break}case ne.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case ee.LESS_THAN_SIGN:{this.state=ne.TAG_OPEN;break}case ee.AMPERSAND:{this.returnState=ne.DATA,this.state=ne.CHARACTER_REFERENCE;break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this._emitCodePoint(t);break}case ee.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case ee.AMPERSAND:{this.returnState=ne.RCDATA,this.state=ne.CHARACTER_REFERENCE;break}case ee.LESS_THAN_SIGN:{this.state=ne.RCDATA_LESS_THAN_SIGN;break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this._emitChars($n);break}case ee.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case ee.LESS_THAN_SIGN:{this.state=ne.RAWTEXT_LESS_THAN_SIGN;break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this._emitChars($n);break}case ee.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case ee.LESS_THAN_SIGN:{this.state=ne.SCRIPT_DATA_LESS_THAN_SIGN;break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this._emitChars($n);break}case ee.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this._emitChars($n);break}case ee.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nd(t))this._createStartTagToken(),this.state=ne.TAG_NAME,this._stateTagName(t);else switch(t){case ee.EXCLAMATION_MARK:{this.state=ne.MARKUP_DECLARATION_OPEN;break}case ee.SOLIDUS:{this.state=ne.END_TAG_OPEN;break}case ee.QUESTION_MARK:{this._err(Pe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ne.BOGUS_COMMENT,this._stateBogusComment(t);break}case ee.EOF:{this._err(Pe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Pe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ne.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nd(t))this._createEndTagToken(),this.state=ne.TAG_NAME,this._stateTagName(t);else switch(t){case ee.GREATER_THAN_SIGN:{this._err(Pe.missingEndTagName),this.state=ne.DATA;break}case ee.EOF:{this._err(Pe.eofBeforeTagName),this._emitChars("");break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this.state=ne.SCRIPT_DATA_ESCAPED,this._emitChars($n);break}case ee.EOF:{this._err(Pe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ne.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===ee.SOLIDUS?this.state=ne.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nd(t)?(this._emitChars("<"),this.state=ne.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=ne.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nd(t)?(this.state=ne.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case ee.NULL:{this._err(Pe.unexpectedNullCharacter),this.state=ne.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($n);break}case ee.EOF:{this._err(Pe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ne.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===ee.SOLIDUS?(this.state=ne.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ne.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Qi.SCRIPT,!1)&&xq(this.preprocessor.peek(Qi.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n1114111)this._err(Pe.characterReferenceOutsideUnicodeRange),this.charRefCode=ee.REPLACEMENT_CHARACTER;else if(L0e(this.charRefCode))this._err(Pe.surrogateCharacterReference),this.charRefCode=ee.REPLACEMENT_CHARACTER;else if(M0e(this.charRefCode))this._err(Pe.noncharacterCharacterReference);else if(B0e(this.charRefCode)||this.charRefCode===ee.CARRIAGE_RETURN){this._err(Pe.controlCharacterReference);const n=iut.get(this.charRefCode);n!==void 0&&(this.charRefCode=n)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,t)}}const V0e=new Set([k.DD,k.DT,k.LI,k.OPTGROUP,k.OPTION,k.P,k.RB,k.RP,k.RT,k.RTC]),wq=new Set([...V0e,k.CAPTION,k.COLGROUP,k.TBODY,k.TD,k.TFOOT,k.TH,k.THEAD,k.TR]),z6=new Map([[k.APPLET,Oe.HTML],[k.CAPTION,Oe.HTML],[k.HTML,Oe.HTML],[k.MARQUEE,Oe.HTML],[k.OBJECT,Oe.HTML],[k.TABLE,Oe.HTML],[k.TD,Oe.HTML],[k.TEMPLATE,Oe.HTML],[k.TH,Oe.HTML],[k.ANNOTATION_XML,Oe.MATHML],[k.MI,Oe.MATHML],[k.MN,Oe.MATHML],[k.MO,Oe.MATHML],[k.MS,Oe.MATHML],[k.MTEXT,Oe.MATHML],[k.DESC,Oe.SVG],[k.FOREIGN_OBJECT,Oe.SVG],[k.TITLE,Oe.SVG]]),uut=[k.H1,k.H2,k.H3,k.H4,k.H5,k.H6],lut=[k.TR,k.TEMPLATE,k.HTML],dut=[k.TBODY,k.TFOOT,k.THEAD,k.TEMPLATE,k.HTML],fut=[k.TABLE,k.TEMPLATE,k.HTML],hut=[k.TD,k.TH];class put{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=k.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===k.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Oe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==Oe.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;r--)if(t.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(fut,Oe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dut,Oe.HTML)}clearBackToTableRowContext(){this.clearBackTo(lut,Oe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===k.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===k.HTML}hasInScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n],i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Oe.HTML)return!0;if(z6.get(r)===i)return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(U0e(n)&&r===Oe.HTML)return!0;if(z6.get(n)===r)return!1}return!0}hasInListItemScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n],i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Oe.HTML)return!0;if((r===k.UL||r===k.OL)&&i===Oe.HTML||z6.get(r)===i)return!1}return!0}hasInButtonScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n],i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===Oe.HTML)return!0;if(r===k.BUTTON&&i===Oe.HTML||z6.get(r)===i)return!1}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Oe.HTML){if(r===t)return!0;if(r===k.TABLE||r===k.TEMPLATE||r===k.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===Oe.HTML){if(n===k.TBODY||n===k.THEAD||n===k.TFOOT)return!0;if(n===k.TABLE||n===k.HTML)return!1}}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];if(this.treeAdapter.getNamespaceURI(this.items[n])===Oe.HTML){if(r===t)return!0;if(r!==k.OPTION&&r!==k.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;V0e.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;wq.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&wq.has(this.currentTagId);)this.pop()}}const RT=3;var _a;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_a=_a||(_a={}));const Eq={type:_a.Marker};class gut{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let a=0;a[s.name,s.value]));let o=0;for(let s=0;si.get(c.name)===c.value)&&(o+=1,o>=RT&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(Eq)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_a.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_a.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Eq);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_a.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_a.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_a.Element&&n.element===t)}}function Cq(e){return{nodeName:"#text",value:e,parentNode:null}}const Kp={createDocument(){return{nodeName:"#document",mode:jo.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(o=>o.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Kp.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Kp.isTextNode(n)){n.value+=t;return}}Kp.appendChild(e,Cq(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Kp.isTextNode(r)?r.value+=t:Kp.insertBefore(e,Cq(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;re.startsWith(n))}function wut(e){return e.name===W0e&&e.publicId===null&&(e.systemId===null||e.systemId===mut)}function Eut(e){if(e.name!==W0e)return jo.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yut)return jo.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),vut.has(n))return jo.QUIRKS;let r=t===null?but:G0e;if(Aq(n,r))return jo.QUIRKS;if(r=t===null?K0e:xut,Aq(n,r))return jo.LIMITED_QUIRKS}return jo.NO_QUIRKS}const Sq={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cut="definitionurl",Aut="definitionURL",Sut=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),kut=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Oe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Oe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Oe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Oe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Oe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Oe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Oe.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:Oe.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:Oe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Oe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Oe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Oe.XMLNS}]]),Tut=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),_ut=new Set([k.B,k.BIG,k.BLOCKQUOTE,k.BODY,k.BR,k.CENTER,k.CODE,k.DD,k.DIV,k.DL,k.DT,k.EM,k.EMBED,k.H1,k.H2,k.H3,k.H4,k.H5,k.H6,k.HEAD,k.HR,k.I,k.IMG,k.LI,k.LISTING,k.MENU,k.META,k.NOBR,k.OL,k.P,k.PRE,k.RUBY,k.S,k.SMALL,k.SPAN,k.STRONG,k.STRIKE,k.SUB,k.SUP,k.TABLE,k.TT,k.U,k.UL,k.VAR]);function Put(e){const t=e.tagID;return t===k.FONT&&e.attrs.some(({name:r})=>r===uf.COLOR||r===uf.SIZE||r===uf.FACE)||_ut.has(t)}function Q0e(e){for(let t=0;t0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===Oe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Oe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=le.TEXT}switchToPlaintextParsing(){this.insertionMode=le.TEXT,this.originalInsertionMode=le.IN_BODY,this.tokenizer.state=fr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===we.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Oe.HTML))switch(this.fragmentContextID){case k.TITLE:case k.TEXTAREA:{this.tokenizer.state=fr.RCDATA;break}case k.STYLE:case k.XMP:case k.IFRAME:case k.NOEMBED:case k.NOFRAMES:case k.NOSCRIPT:{this.tokenizer.state=fr.RAWTEXT;break}case k.SCRIPT:{this.tokenizer.state=fr.SCRIPT_DATA;break}case k.PLAINTEXT:{this.tokenizer.state=fr.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,Oe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Oe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(we.HTML,Oe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,k.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),o=r?i.lastIndexOf(r):i.length,s=i[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:c,endCol:u,endOffset:l}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:c,endCol:u,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),o=n.type===Pt.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===k.SVG&&this.treeAdapter.getTagName(n)===we.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Oe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===k.MGLYPH||t.tagID===k.MALIGNMARK)&&!this._isIntegrationPoint(r,n,Oe.HTML)}_processToken(t){switch(t.type){case Pt.CHARACTER:{this.onCharacter(t);break}case Pt.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pt.COMMENT:{this.onComment(t);break}case Pt.DOCTYPE:{this.onDoctype(t);break}case Pt.START_TAG:{this._processStartTag(t);break}case Pt.END_TAG:{this.onEndTag(t);break}case Pt.EOF:{this.onEof(t);break}case Pt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return Out(t,i,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===_a.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const o=this.activeFormattingElements.entries[i];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=le.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(k.P),this.openElements.popUntilTagNamePopped(k.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case k.TR:{this.insertionMode=le.IN_ROW;return}case k.TBODY:case k.THEAD:case k.TFOOT:{this.insertionMode=le.IN_TABLE_BODY;return}case k.CAPTION:{this.insertionMode=le.IN_CAPTION;return}case k.COLGROUP:{this.insertionMode=le.IN_COLUMN_GROUP;return}case k.TABLE:{this.insertionMode=le.IN_TABLE;return}case k.BODY:{this.insertionMode=le.IN_BODY;return}case k.FRAMESET:{this.insertionMode=le.IN_FRAMESET;return}case k.SELECT:{this._resetInsertionModeForSelect(t);return}case k.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case k.HTML:{this.insertionMode=this.headElement?le.AFTER_HEAD:le.BEFORE_HEAD;return}case k.TD:case k.TH:{if(t>0){this.insertionMode=le.IN_CELL;return}break}case k.HEAD:{if(t>0){this.insertionMode=le.IN_HEAD;return}break}}this.insertionMode=le.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===k.TEMPLATE)break;if(r===k.TABLE){this.insertionMode=le.IN_SELECT_IN_TABLE;return}}this.insertionMode=le.IN_SELECT}_isElementCausesFosterParenting(t){return q0e.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case k.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Oe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case k.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return rut[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hdt(this,t);return}switch(this.insertionMode){case le.INITIAL:{yb(this,t);break}case le.BEFORE_HTML:{$3(this,t);break}case le.BEFORE_HEAD:{H3(this,t);break}case le.IN_HEAD:{V3(this,t);break}case le.IN_HEAD_NO_SCRIPT:{W3(this,t);break}case le.AFTER_HEAD:{G3(this,t);break}case le.IN_BODY:case le.IN_CAPTION:case le.IN_CELL:case le.IN_TEMPLATE:{J0e(this,t);break}case le.TEXT:case le.IN_SELECT:case le.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case le.IN_TABLE:case le.IN_TABLE_BODY:case le.IN_ROW:{NT(this,t);break}case le.IN_TABLE_TEXT:{ihe(this,t);break}case le.IN_COLUMN_GROUP:{X9(this,t);break}case le.AFTER_BODY:{e7(this,t);break}case le.AFTER_AFTER_BODY:{rw(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fdt(this,t);return}switch(this.insertionMode){case le.INITIAL:{yb(this,t);break}case le.BEFORE_HTML:{$3(this,t);break}case le.BEFORE_HEAD:{H3(this,t);break}case le.IN_HEAD:{V3(this,t);break}case le.IN_HEAD_NO_SCRIPT:{W3(this,t);break}case le.AFTER_HEAD:{G3(this,t);break}case le.TEXT:{this._insertCharacters(t);break}case le.IN_TABLE:case le.IN_TABLE_BODY:case le.IN_ROW:{NT(this,t);break}case le.IN_COLUMN_GROUP:{X9(this,t);break}case le.AFTER_BODY:{e7(this,t);break}case le.AFTER_AFTER_BODY:{rw(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){fN(this,t);return}switch(this.insertionMode){case le.INITIAL:case le.BEFORE_HTML:case le.BEFORE_HEAD:case le.IN_HEAD:case le.IN_HEAD_NO_SCRIPT:case le.AFTER_HEAD:case le.IN_BODY:case le.IN_TABLE:case le.IN_CAPTION:case le.IN_COLUMN_GROUP:case le.IN_TABLE_BODY:case le.IN_ROW:case le.IN_CELL:case le.IN_SELECT:case le.IN_SELECT_IN_TABLE:case le.IN_TEMPLATE:case le.IN_FRAMESET:case le.AFTER_FRAMESET:{fN(this,t);break}case le.IN_TABLE_TEXT:{bb(this,t);break}case le.AFTER_BODY:{Vut(this,t);break}case le.AFTER_AFTER_BODY:case le.AFTER_AFTER_FRAMESET:{Wut(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case le.INITIAL:{Gut(this,t);break}case le.BEFORE_HEAD:case le.IN_HEAD:case le.IN_HEAD_NO_SCRIPT:case le.AFTER_HEAD:{this._err(t,Pe.misplacedDoctype);break}case le.IN_TABLE_TEXT:{bb(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Pe.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?pdt(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case le.INITIAL:{yb(this,t);break}case le.BEFORE_HTML:{Kut(this,t);break}case le.BEFORE_HEAD:{Yut(this,t);break}case le.IN_HEAD:{Ga(this,t);break}case le.IN_HEAD_NO_SCRIPT:{Jut(this,t);break}case le.AFTER_HEAD:{elt(this,t);break}case le.IN_BODY:{Si(this,t);break}case le.IN_TABLE:{Gm(this,t);break}case le.IN_TABLE_TEXT:{bb(this,t);break}case le.IN_CAPTION:{qlt(this,t);break}case le.IN_COLUMN_GROUP:{bD(this,t);break}case le.IN_TABLE_BODY:{GC(this,t);break}case le.IN_ROW:{KC(this,t);break}case le.IN_CELL:{Xlt(this,t);break}case le.IN_SELECT:{ahe(this,t);break}case le.IN_SELECT_IN_TABLE:{tdt(this,t);break}case le.IN_TEMPLATE:{rdt(this,t);break}case le.AFTER_BODY:{odt(this,t);break}case le.IN_FRAMESET:{sdt(this,t);break}case le.AFTER_FRAMESET:{cdt(this,t);break}case le.AFTER_AFTER_BODY:{ldt(this,t);break}case le.AFTER_AFTER_FRAMESET:{ddt(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gdt(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case le.INITIAL:{yb(this,t);break}case le.BEFORE_HTML:{Qut(this,t);break}case le.BEFORE_HEAD:{qut(this,t);break}case le.IN_HEAD:{Zut(this,t);break}case le.IN_HEAD_NO_SCRIPT:{Xut(this,t);break}case le.AFTER_HEAD:{tlt(this,t);break}case le.IN_BODY:{WC(this,t);break}case le.TEXT:{Ult(this,t);break}case le.IN_TABLE:{S4(this,t);break}case le.IN_TABLE_TEXT:{bb(this,t);break}case le.IN_CAPTION:{Zlt(this,t);break}case le.IN_COLUMN_GROUP:{Jlt(this,t);break}case le.IN_TABLE_BODY:{hN(this,t);break}case le.IN_ROW:{she(this,t);break}case le.IN_CELL:{edt(this,t);break}case le.IN_SELECT:{che(this,t);break}case le.IN_SELECT_IN_TABLE:{ndt(this,t);break}case le.IN_TEMPLATE:{idt(this,t);break}case le.AFTER_BODY:{lhe(this,t);break}case le.IN_FRAMESET:{adt(this,t);break}case le.AFTER_FRAMESET:{udt(this,t);break}case le.AFTER_AFTER_BODY:{rw(this,t);break}}}onEof(t){switch(this.insertionMode){case le.INITIAL:{yb(this,t);break}case le.BEFORE_HTML:{$3(this,t);break}case le.BEFORE_HEAD:{H3(this,t);break}case le.IN_HEAD:{V3(this,t);break}case le.IN_HEAD_NO_SCRIPT:{W3(this,t);break}case le.AFTER_HEAD:{G3(this,t);break}case le.IN_BODY:case le.IN_TABLE:case le.IN_CAPTION:case le.IN_COLUMN_GROUP:case le.IN_TABLE_BODY:case le.IN_ROW:case le.IN_CELL:case le.IN_SELECT:case le.IN_SELECT_IN_TABLE:{nhe(this,t);break}case le.TEXT:{zlt(this,t);break}case le.IN_TABLE_TEXT:{bb(this,t);break}case le.IN_TEMPLATE:{uhe(this,t);break}case le.AFTER_BODY:case le.IN_FRAMESET:case le.AFTER_FRAMESET:case le.AFTER_AFTER_BODY:case le.AFTER_AFTER_FRAMESET:{yD(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===ee.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case le.IN_HEAD:case le.IN_HEAD_NO_SCRIPT:case le.AFTER_HEAD:case le.TEXT:case le.IN_COLUMN_GROUP:case le.IN_SELECT:case le.IN_SELECT_IN_TABLE:case le.IN_FRAMESET:case le.AFTER_FRAMESET:{this._insertCharacters(t);break}case le.IN_BODY:case le.IN_CAPTION:case le.IN_CELL:case le.IN_TEMPLATE:case le.AFTER_BODY:case le.AFTER_AFTER_BODY:case le.AFTER_AFTER_FRAMESET:{Z0e(this,t);break}case le.IN_TABLE:case le.IN_TABLE_BODY:case le.IN_ROW:{NT(this,t);break}case le.IN_TABLE_TEXT:{rhe(this,t);break}}}}function jut(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):the(e,t),n}function Fut(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function Uut(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),c=a&&o>=Mut;!a||c?(c&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=zut(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function zut(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $ut(e,t,n){const r=e.treeAdapter.getTagName(t),i=I2(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);i===k.TEMPLATE&&o===Oe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Hut(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function mD(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&e._setEndLocation(o,t)}}}}function Gut(e,t){e._setDocumentType(t);const n=t.forceQuirks?jo.QUIRKS:Eut(t);wut(t)||e._err(t,Pe.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=le.BEFORE_HTML}function yb(e,t){e._err(t,Pe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,jo.QUIRKS),e.insertionMode=le.BEFORE_HTML,e._processToken(t)}function Kut(e,t){t.tagID===k.HTML?(e._insertElement(t,Oe.HTML),e.insertionMode=le.BEFORE_HEAD):$3(e,t)}function Qut(e,t){const n=t.tagID;(n===k.HTML||n===k.HEAD||n===k.BODY||n===k.BR)&&$3(e,t)}function $3(e,t){e._insertFakeRootElement(),e.insertionMode=le.BEFORE_HEAD,e._processToken(t)}function Yut(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.HEAD:{e._insertElement(t,Oe.HTML),e.headElement=e.openElements.current,e.insertionMode=le.IN_HEAD;break}default:H3(e,t)}}function qut(e,t){const n=t.tagID;n===k.HEAD||n===k.BODY||n===k.HTML||n===k.BR?H3(e,t):e._err(t,Pe.endTagWithoutMatchingOpenElement)}function H3(e,t){e._insertFakeElement(we.HEAD,k.HEAD),e.headElement=e.openElements.current,e.insertionMode=le.IN_HEAD,e._processToken(t)}function Ga(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.BASE:case k.BASEFONT:case k.BGSOUND:case k.LINK:case k.META:{e._appendElement(t,Oe.HTML),t.ackSelfClosing=!0;break}case k.TITLE:{e._switchToTextParsing(t,fr.RCDATA);break}case k.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fr.RAWTEXT):(e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_HEAD_NO_SCRIPT);break}case k.NOFRAMES:case k.STYLE:{e._switchToTextParsing(t,fr.RAWTEXT);break}case k.SCRIPT:{e._switchToTextParsing(t,fr.SCRIPT_DATA);break}case k.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=le.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(le.IN_TEMPLATE);break}case k.HEAD:{e._err(t,Pe.misplacedStartTagForHeadElement);break}default:V3(e,t)}}function Zut(e,t){switch(t.tagID){case k.HEAD:{e.openElements.pop(),e.insertionMode=le.AFTER_HEAD;break}case k.BODY:case k.BR:case k.HTML:{V3(e,t);break}case k.TEMPLATE:{dp(e,t);break}default:e._err(t,Pe.endTagWithoutMatchingOpenElement)}}function dp(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==k.TEMPLATE&&e._err(t,Pe.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(k.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Pe.endTagWithoutMatchingOpenElement)}function V3(e,t){e.openElements.pop(),e.insertionMode=le.AFTER_HEAD,e._processToken(t)}function Jut(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.BASEFONT:case k.BGSOUND:case k.HEAD:case k.LINK:case k.META:case k.NOFRAMES:case k.STYLE:{Ga(e,t);break}case k.NOSCRIPT:{e._err(t,Pe.nestedNoscriptInHead);break}default:W3(e,t)}}function Xut(e,t){switch(t.tagID){case k.NOSCRIPT:{e.openElements.pop(),e.insertionMode=le.IN_HEAD;break}case k.BR:{W3(e,t);break}default:e._err(t,Pe.endTagWithoutMatchingOpenElement)}}function W3(e,t){const n=t.type===Pt.EOF?Pe.openElementsLeftAfterEof:Pe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=le.IN_HEAD,e._processToken(t)}function elt(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.BODY:{e._insertElement(t,Oe.HTML),e.framesetOk=!1,e.insertionMode=le.IN_BODY;break}case k.FRAMESET:{e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_FRAMESET;break}case k.BASE:case k.BASEFONT:case k.BGSOUND:case k.LINK:case k.META:case k.NOFRAMES:case k.SCRIPT:case k.STYLE:case k.TEMPLATE:case k.TITLE:{e._err(t,Pe.abandonedHeadElementChild),e.openElements.push(e.headElement,k.HEAD),Ga(e,t),e.openElements.remove(e.headElement);break}case k.HEAD:{e._err(t,Pe.misplacedStartTagForHeadElement);break}default:G3(e,t)}}function tlt(e,t){switch(t.tagID){case k.BODY:case k.HTML:case k.BR:{G3(e,t);break}case k.TEMPLATE:{dp(e,t);break}default:e._err(t,Pe.endTagWithoutMatchingOpenElement)}}function G3(e,t){e._insertFakeElement(we.BODY,k.BODY),e.insertionMode=le.IN_BODY,VC(e,t)}function VC(e,t){switch(t.type){case Pt.CHARACTER:{J0e(e,t);break}case Pt.WHITESPACE_CHARACTER:{Z0e(e,t);break}case Pt.COMMENT:{fN(e,t);break}case Pt.START_TAG:{Si(e,t);break}case Pt.END_TAG:{WC(e,t);break}case Pt.EOF:{nhe(e,t);break}}}function Z0e(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function J0e(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nlt(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rlt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ilt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_FRAMESET)}function olt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML)}function slt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),U0e(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Oe.HTML)}function alt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function clt(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML),n||(e.formElement=e.openElements.current))}function ult(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===k.LI&&i===k.LI||(n===k.DD||n===k.DT)&&(i===k.DD||i===k.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==k.ADDRESS&&i!==k.DIV&&i!==k.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML)}function llt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML),e.tokenizer.state=fr.PLAINTEXT}function dlt(e,t){e.openElements.hasInScope(k.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(k.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML),e.framesetOk=!1}function flt(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(we.A);n&&(mD(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hlt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function plt(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(k.NOBR)&&(mD(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function glt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function mlt(e,t){e.treeAdapter.getDocumentMode(e.document)!==jo.QUIRKS&&e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._insertElement(t,Oe.HTML),e.framesetOk=!1,e.insertionMode=le.IN_TABLE}function X0e(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ehe(e){const t=D0e(e,uf.TYPE);return t!=null&&t.toLowerCase()===Lut}function ylt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Oe.HTML),ehe(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function blt(e,t){e._appendElement(t,Oe.HTML),t.ackSelfClosing=!0}function vlt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._appendElement(t,Oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xlt(e,t){t.tagName=we.IMG,t.tagID=k.IMG,X0e(e,t)}function wlt(e,t){e._insertElement(t,Oe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=le.TEXT}function Elt(e,t){e.openElements.hasInButtonScope(k.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fr.RAWTEXT)}function Clt(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fr.RAWTEXT)}function _q(e,t){e._switchToTextParsing(t,fr.RAWTEXT)}function Alt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===le.IN_TABLE||e.insertionMode===le.IN_CAPTION||e.insertionMode===le.IN_TABLE_BODY||e.insertionMode===le.IN_ROW||e.insertionMode===le.IN_CELL?le.IN_SELECT_IN_TABLE:le.IN_SELECT}function Slt(e,t){e.openElements.currentTagId===k.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML)}function klt(e,t){e.openElements.hasInScope(k.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Oe.HTML)}function Tlt(e,t){e.openElements.hasInScope(k.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(k.RTC),e._insertElement(t,Oe.HTML)}function _lt(e,t){e._reconstructActiveFormattingElements(),Q0e(t),gD(t),t.selfClosing?e._appendElement(t,Oe.MATHML):e._insertElement(t,Oe.MATHML),t.ackSelfClosing=!0}function Plt(e,t){e._reconstructActiveFormattingElements(),Y0e(t),gD(t),t.selfClosing?e._appendElement(t,Oe.SVG):e._insertElement(t,Oe.SVG),t.ackSelfClosing=!0}function Pq(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oe.HTML)}function Si(e,t){switch(t.tagID){case k.I:case k.S:case k.B:case k.U:case k.EM:case k.TT:case k.BIG:case k.CODE:case k.FONT:case k.SMALL:case k.STRIKE:case k.STRONG:{hlt(e,t);break}case k.A:{flt(e,t);break}case k.H1:case k.H2:case k.H3:case k.H4:case k.H5:case k.H6:{slt(e,t);break}case k.P:case k.DL:case k.OL:case k.UL:case k.DIV:case k.DIR:case k.NAV:case k.MAIN:case k.MENU:case k.ASIDE:case k.CENTER:case k.FIGURE:case k.FOOTER:case k.HEADER:case k.HGROUP:case k.DIALOG:case k.DETAILS:case k.ADDRESS:case k.ARTICLE:case k.SECTION:case k.SUMMARY:case k.FIELDSET:case k.BLOCKQUOTE:case k.FIGCAPTION:{olt(e,t);break}case k.LI:case k.DD:case k.DT:{ult(e,t);break}case k.BR:case k.IMG:case k.WBR:case k.AREA:case k.EMBED:case k.KEYGEN:{X0e(e,t);break}case k.HR:{vlt(e,t);break}case k.RB:case k.RTC:{klt(e,t);break}case k.RT:case k.RP:{Tlt(e,t);break}case k.PRE:case k.LISTING:{alt(e,t);break}case k.XMP:{Elt(e,t);break}case k.SVG:{Plt(e,t);break}case k.HTML:{nlt(e,t);break}case k.BASE:case k.LINK:case k.META:case k.STYLE:case k.TITLE:case k.SCRIPT:case k.BGSOUND:case k.BASEFONT:case k.TEMPLATE:{Ga(e,t);break}case k.BODY:{rlt(e,t);break}case k.FORM:{clt(e,t);break}case k.NOBR:{plt(e,t);break}case k.MATH:{_lt(e,t);break}case k.TABLE:{mlt(e,t);break}case k.INPUT:{ylt(e,t);break}case k.PARAM:case k.TRACK:case k.SOURCE:{blt(e,t);break}case k.IMAGE:{xlt(e,t);break}case k.BUTTON:{dlt(e,t);break}case k.APPLET:case k.OBJECT:case k.MARQUEE:{glt(e,t);break}case k.IFRAME:{Clt(e,t);break}case k.SELECT:{Alt(e,t);break}case k.OPTION:case k.OPTGROUP:{Slt(e,t);break}case k.NOEMBED:{_q(e,t);break}case k.FRAMESET:{ilt(e,t);break}case k.TEXTAREA:{wlt(e,t);break}case k.NOSCRIPT:{e.options.scriptingEnabled?_q(e,t):Pq(e,t);break}case k.PLAINTEXT:{llt(e,t);break}case k.COL:case k.TH:case k.TD:case k.TR:case k.HEAD:case k.FRAME:case k.TBODY:case k.TFOOT:case k.THEAD:case k.CAPTION:case k.COLGROUP:break;default:Pq(e,t)}}function Ilt(e,t){if(e.openElements.hasInScope(k.BODY)&&(e.insertionMode=le.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Rlt(e,t){e.openElements.hasInScope(k.BODY)&&(e.insertionMode=le.AFTER_BODY,lhe(e,t))}function Nlt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Olt(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(k.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(k.FORM):n&&e.openElements.remove(n))}function Llt(e){e.openElements.hasInButtonScope(k.P)||e._insertFakeElement(we.P,k.P),e._closePElement()}function Blt(e){e.openElements.hasInListItemScope(k.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(k.LI),e.openElements.popUntilTagNamePopped(k.LI))}function Mlt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Dlt(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function jlt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Flt(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(we.BR,k.BR),e.openElements.pop(),e.framesetOk=!1}function the(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const o=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==k.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(o,s))break}}function WC(e,t){switch(t.tagID){case k.A:case k.B:case k.I:case k.S:case k.U:case k.EM:case k.TT:case k.BIG:case k.CODE:case k.FONT:case k.NOBR:case k.SMALL:case k.STRIKE:case k.STRONG:{mD(e,t);break}case k.P:{Llt(e);break}case k.DL:case k.UL:case k.OL:case k.DIR:case k.DIV:case k.NAV:case k.PRE:case k.MAIN:case k.MENU:case k.ASIDE:case k.BUTTON:case k.CENTER:case k.FIGURE:case k.FOOTER:case k.HEADER:case k.HGROUP:case k.DIALOG:case k.ADDRESS:case k.ARTICLE:case k.DETAILS:case k.SECTION:case k.SUMMARY:case k.LISTING:case k.FIELDSET:case k.BLOCKQUOTE:case k.FIGCAPTION:{Nlt(e,t);break}case k.LI:{Blt(e);break}case k.DD:case k.DT:{Mlt(e,t);break}case k.H1:case k.H2:case k.H3:case k.H4:case k.H5:case k.H6:{Dlt(e);break}case k.BR:{Flt(e);break}case k.BODY:{Ilt(e,t);break}case k.HTML:{Rlt(e,t);break}case k.FORM:{Olt(e);break}case k.APPLET:case k.OBJECT:case k.MARQUEE:{jlt(e,t);break}case k.TEMPLATE:{dp(e,t);break}default:the(e,t)}}function nhe(e,t){e.tmplInsertionModeStack.length>0?uhe(e,t):yD(e,t)}function Ult(e,t){var n;t.tagID===k.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zlt(e,t){e._err(t,Pe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function NT(e,t){if(q0e.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=le.IN_TABLE_TEXT,t.type){case Pt.CHARACTER:{ihe(e,t);break}case Pt.WHITESPACE_CHARACTER:{rhe(e,t);break}}else rx(e,t)}function $lt(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_CAPTION}function Hlt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_COLUMN_GROUP}function Vlt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(we.COLGROUP,k.COLGROUP),e.insertionMode=le.IN_COLUMN_GROUP,bD(e,t)}function Wlt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Oe.HTML),e.insertionMode=le.IN_TABLE_BODY}function Glt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(we.TBODY,k.TBODY),e.insertionMode=le.IN_TABLE_BODY,GC(e,t)}function Klt(e,t){e.openElements.hasInTableScope(k.TABLE)&&(e.openElements.popUntilTagNamePopped(k.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Qlt(e,t){ehe(t)?e._appendElement(t,Oe.HTML):rx(e,t),t.ackSelfClosing=!0}function Ylt(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Oe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Gm(e,t){switch(t.tagID){case k.TD:case k.TH:case k.TR:{Glt(e,t);break}case k.STYLE:case k.SCRIPT:case k.TEMPLATE:{Ga(e,t);break}case k.COL:{Vlt(e,t);break}case k.FORM:{Ylt(e,t);break}case k.TABLE:{Klt(e,t);break}case k.TBODY:case k.TFOOT:case k.THEAD:{Wlt(e,t);break}case k.INPUT:{Qlt(e,t);break}case k.CAPTION:{$lt(e,t);break}case k.COLGROUP:{Hlt(e,t);break}default:rx(e,t)}}function S4(e,t){switch(t.tagID){case k.TABLE:{e.openElements.hasInTableScope(k.TABLE)&&(e.openElements.popUntilTagNamePopped(k.TABLE),e._resetInsertionMode());break}case k.TEMPLATE:{dp(e,t);break}case k.BODY:case k.CAPTION:case k.COL:case k.COLGROUP:case k.HTML:case k.TBODY:case k.TD:case k.TFOOT:case k.TH:case k.THEAD:case k.TR:break;default:rx(e,t)}}function rx(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,VC(e,t),e.fosterParentingEnabled=n}function rhe(e,t){e.pendingCharacterTokens.push(t)}function ihe(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function bb(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===k.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===k.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===k.OPTGROUP&&e.openElements.pop();break}case k.OPTION:{e.openElements.currentTagId===k.OPTION&&e.openElements.pop();break}case k.SELECT:{e.openElements.hasInSelectScope(k.SELECT)&&(e.openElements.popUntilTagNamePopped(k.SELECT),e._resetInsertionMode());break}case k.TEMPLATE:{dp(e,t);break}}}function tdt(e,t){const n=t.tagID;n===k.CAPTION||n===k.TABLE||n===k.TBODY||n===k.TFOOT||n===k.THEAD||n===k.TR||n===k.TD||n===k.TH?(e.openElements.popUntilTagNamePopped(k.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ahe(e,t)}function ndt(e,t){const n=t.tagID;n===k.CAPTION||n===k.TABLE||n===k.TBODY||n===k.TFOOT||n===k.THEAD||n===k.TR||n===k.TD||n===k.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(k.SELECT),e._resetInsertionMode(),e.onEndTag(t)):che(e,t)}function rdt(e,t){switch(t.tagID){case k.BASE:case k.BASEFONT:case k.BGSOUND:case k.LINK:case k.META:case k.NOFRAMES:case k.SCRIPT:case k.STYLE:case k.TEMPLATE:case k.TITLE:{Ga(e,t);break}case k.CAPTION:case k.COLGROUP:case k.TBODY:case k.TFOOT:case k.THEAD:{e.tmplInsertionModeStack[0]=le.IN_TABLE,e.insertionMode=le.IN_TABLE,Gm(e,t);break}case k.COL:{e.tmplInsertionModeStack[0]=le.IN_COLUMN_GROUP,e.insertionMode=le.IN_COLUMN_GROUP,bD(e,t);break}case k.TR:{e.tmplInsertionModeStack[0]=le.IN_TABLE_BODY,e.insertionMode=le.IN_TABLE_BODY,GC(e,t);break}case k.TD:case k.TH:{e.tmplInsertionModeStack[0]=le.IN_ROW,e.insertionMode=le.IN_ROW,KC(e,t);break}default:e.tmplInsertionModeStack[0]=le.IN_BODY,e.insertionMode=le.IN_BODY,Si(e,t)}}function idt(e,t){t.tagID===k.TEMPLATE&&dp(e,t)}function uhe(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(k.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):yD(e,t)}function odt(e,t){t.tagID===k.HTML?Si(e,t):e7(e,t)}function lhe(e,t){var n;if(t.tagID===k.HTML){if(e.fragmentContext||(e.insertionMode=le.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===k.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else e7(e,t)}function e7(e,t){e.insertionMode=le.IN_BODY,VC(e,t)}function sdt(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.FRAMESET:{e._insertElement(t,Oe.HTML);break}case k.FRAME:{e._appendElement(t,Oe.HTML),t.ackSelfClosing=!0;break}case k.NOFRAMES:{Ga(e,t);break}}}function adt(e,t){t.tagID===k.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==k.FRAMESET&&(e.insertionMode=le.AFTER_FRAMESET))}function cdt(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.NOFRAMES:{Ga(e,t);break}}}function udt(e,t){t.tagID===k.HTML&&(e.insertionMode=le.AFTER_AFTER_FRAMESET)}function ldt(e,t){t.tagID===k.HTML?Si(e,t):rw(e,t)}function rw(e,t){e.insertionMode=le.IN_BODY,VC(e,t)}function ddt(e,t){switch(t.tagID){case k.HTML:{Si(e,t);break}case k.NOFRAMES:{Ga(e,t);break}}}function fdt(e,t){t.chars=$n,e._insertCharacters(t)}function hdt(e,t){e._insertCharacters(t),e.framesetOk=!1}function dhe(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Oe.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function pdt(e,t){if(Put(t))dhe(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Oe.MATHML?Q0e(t):r===Oe.SVG&&(Iut(t),Y0e(t)),gD(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gdt(e,t){if(t.tagID===k.P||t.tagID===k.BR){dhe(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Oe.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}we.AREA,we.BASE,we.BASEFONT,we.BGSOUND,we.BR,we.COL,we.EMBED,we.FRAME,we.HR,we.IMG,we.INPUT,we.KEYGEN,we.LINK,we.META,we.PARAM,we.SOURCE,we.TRACK,we.WBR;const mdt=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Iq={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function fhe(e,t){const n=kdt(e),r=N0e("type",{handlers:{root:ydt,element:bdt,text:vdt,comment:phe,doctype:xdt,raw:Edt},unknown:Cdt}),i={parser:n?new Tq(Iq):Tq.getFragmentParser(void 0,Iq),handle(a){r(a,i)},stitches:!1,options:t||{}};r(e,i),R2(i,Qc());const o=n?i.parser.document:i.parser.getFragment(),s=_ct(o,{file:i.options.file});return i.stitches&&dD(s,"comment",function(a,c,u){const l=a;if(l.value.stitch&&u&&c!==void 0){const d=u.children;return d[c]=l.value.stitch,c}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function hhe(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);const n={type:Pt.CHARACTER,chars:e.value,location:ix(e)};R2(t,Qc(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function xdt(e,t){const n={type:Pt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ix(e)};R2(t,Qc(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wdt(e,t){t.stitches=!0;const n=Tdt(e);if("children"in e&&"children"in n){const r=fhe({type:"root",children:e.children},t.options);n.children=r.children}phe({type:"comment",value:{stitch:n}},t)}function phe(e,t){const n=e.value,r={type:Pt.COMMENT,data:n,location:ix(e)};R2(t,Qc(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Edt(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,ghe(t,Qc(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Cdt(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))wdt(n,t);else{let r="";throw mdt.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function R2(e,t){ghe(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=fr.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ghe(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Adt(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fr.PLAINTEXT)return;R2(t,Qc(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:j0.html;i===j0.html&&n==="svg"&&(i=j0.svg);const o=Oct({...e,children:[]},{space:i===j0.svg?"svg":"html"}),s={type:Pt.START_TAG,tagName:n,tagID:I2(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:ix(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Sdt(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zct.includes(n)||t.parser.tokenizer.state===fr.PLAINTEXT)return;R2(t,UC(e));const r={type:Pt.END_TAG,tagName:n,tagID:I2(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ix(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fr.RCDATA||t.parser.tokenizer.state===fr.RAWTEXT||t.parser.tokenizer.state===fr.SCRIPT_DATA)&&(t.parser.tokenizer.state=fr.DATA)}function kdt(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ix(e){const t=Qc(e)||{line:void 0,column:void 0,offset:void 0},n=UC(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Tdt(e){return"children"in e?Vm({...e,children:[]}):Vm(e)}function _dt(e){return function(t,n){return fhe(t,{...e,file:n})}}function Pdt(){const{currentSmartContractChapterIndex:e,currentChapterContent:t,setChapterPassword:n}=Irt();return g.jsx($fe,{index:e,setPasswordAtIndex:n,submitFunctionName:"submit",solutionMatcher:r=>NGe(r,e),children:g.jsxs(Af,{align:"flex-start",children:[g.jsxs(Gr,{variant:"h2",children:["Chapter ",e]}),g.jsx(Xat,{components:mct(),urlTransform:r=>r,rehypePlugins:[_dt],children:t})]})})}const{definePartsStyle:Idt,defineMultiStyleConfig:Rdt}=En(gte.keys),Ndt={baseStyle:{textTransform:"uppercase",width:"100%"},variants:{main:{background:"rgba(230, 91, 84, 0.666)",color:"white",borderRadius:"0px",transition:"all 0.5s",_hover:{background:"rgba(230, 91, 84, 1)"},_disabled:{color:"rgb(148, 148, 148)",background:"#7a7a7a",cursor:"not-allowed"}},menu:{fontFamily:"OCR",background:"rgba(230, 91, 84, 0.666)",color:"black",borderRadius:"full",fontSize:"0.8em",transition:"all 0.5s",fontWeight:"bold",height:"30px"}},defaultProps:{variant:"main"}},Odt=Rdt({sizes:{md:Idt({field:{borderRadius:"none"}})}}),Ldt={variants:{base:{borderRadius:"0px",background:"rgba(255, 255, 255, 0.666)"}},defaultProps:{variant:"base"}},Bdt={baseStyle:{fontFamily:"OCR",textTransform:"uppercase",fontWeight:"bold"},variants:{h1:e=>({fontSize:"2em"}),h2:e=>({fontSize:"1.5em",marginBottom:"10px"}),h3:e=>({fontSize:"1.2em",marginBottom:"10px"})},defaultProps:{variant:"h1"}},Mdt=zEe({fonts:{heading:'"Roboto", "Arial", "serif"',body:'"Roboto", "Arial", "serif"'},styles:{global:{html:{background:"url(./images/bg.png)",backgroundSize:"contain",backgroundPosition:"center"},body:{background:"transparent"}}},layerStyles:{base:{background:"rgba(255, 255, 255, 0.666)",padding:"10px"}},components:{Button:Ndt,Heading:Bdt,Input:Odt,Textarea:Ldt}});globalThis.Buffer=bN.Buffer;const Ddt=new kpe,jdt=wHe([{path:"/",element:g.jsx(Pdt,{})},{path:"/leaderboard",element:g.jsx(LGe,{})},{path:"/settings",element:g.jsx(aXe,{})},{path:"/sides",element:g.jsx(Srt,{})},{path:"/faq",element:g.jsx(cXe,{})}]);GT.createRoot(document.getElementById("root")).render(g.jsx(Gn.StrictMode,{children:g.jsx(U3e,{config:GPe,children:g.jsx(Rpe,{client:Ddt,children:g.jsx(m_e,{theme:Mdt,children:g.jsx(t$e,{children:g.jsx(MPe,{children:g.jsx(IHe,{router:jdt})})})})})})}));export{We as B,a3 as H,Gs as I,P7 as _,Qs as a,bN as b,Qe as c,iie as d,_3e as e,uYe as f,wl as g,kO as h,Hi as i,Yye as j,sbe as k,Ph as l,NX as m,Xh as n,v5 as o,Xd as s,Tft as t}; diff --git a/assets/index-BR8S8Tjb.js b/assets/index-BR8S8Tjb.js new file mode 100644 index 0000000..c4ae6fb --- /dev/null +++ b/assets/index-BR8S8Tjb.js @@ -0,0 +1,47 @@ +import{n as fe,s as Ke,T as k,t as P,a as g,o as Y,R as Dr,p as H,y as ae}from"./index-CB5etGIE.js";import{o as Ur}from"./index-B5bDTh7Y.js";class jr{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}function Hr(t,e){t.indexOf(e)===-1&&t.push(e)}const br=(t,e,r)=>Math.min(Math.max(r,t),e),D={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Ye=t=>typeof t=="number",we=t=>Array.isArray(t)&&!Ye(t[0]),Br=(t,e,r)=>{const i=e-t;return((r-t)%i+i)%i+t};function Zr(t,e){return we(t)?t[Br(0,t.length,e)]:t}const yr=(t,e,r)=>-r*t+r*e+t,xr=()=>{},G=t=>t,jt=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function $r(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const o=jt(0,e,i);t.push(yr(r,1,o))}}function zr(t){const e=[0];return $r(e,t-1),e}function Vr(t,e=zr(t.length),r=G){const i=t.length,o=i-e.length;return o>0&&$r(e,o),n=>{let a=0;for(;aArray.isArray(t)&&Ye(t[0]),Lt=t=>typeof t=="object"&&!!t.createAnimation,be=t=>typeof t=="function",Fr=t=>typeof t=="string",Re={ms:t=>t*1e3,s:t=>t/1e3},Ar=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,qr=1e-7,Kr=12;function Qr(t,e,r,i,o){let n,a,s=0;do a=e+(r-e)/2,n=Ar(a,i,o)-t,n>0?r=a:e=a;while(Math.abs(n)>qr&&++sQr(n,0,1,t,r);return n=>n===0||n===1?n:Ar(o(n),e,i)}const Yr=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);const i=r*t,o=e==="end"?Math.floor(i):Math.ceil(i);return br(0,1,o/t)},Gr={ease:Me(.25,.1,.25,1),"ease-in":Me(.42,0,1,1),"ease-in-out":Me(.42,0,.58,1),"ease-out":Me(0,0,.58,1)},Xr=/\((.*?)\)/;function Vt(t){if(be(t))return t;if(Cr(t))return Me(...t);const e=Gr[t];if(e)return e;if(t.startsWith("steps")){const r=Xr.exec(t);if(r){const i=r[1].split(",");return Yr(parseFloat(i[0]),i[1].trim())}}return G}class _r{constructor(e,r=[0,1],{easing:i,duration:o=D.duration,delay:n=D.delay,endDelay:a=D.endDelay,repeat:s=D.repeat,offset:c,direction:d="normal",autoplay:x=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=G,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((m,_)=>{this.resolve=m,this.reject=_}),i=i||D.easing,Lt(i)){const m=i.createAnimation(r);i=m.easing,r=m.keyframes||r,o=m.duration||o}this.repeat=s,this.easing=we(i)?G:Vt(i),this.updateDuration(o);const $=Vr(r,c,we(i)?i.map(Vt):G);this.tick=m=>{var _;n=n;let f=0;this.pauseTime!==void 0?f=this.pauseTime:f=(m-this.startTime)*this.rate,this.t=f,f/=1e3,f=Math.max(f-n,0),this.playState==="finished"&&this.pauseTime===void 0&&(f=this.totalDuration);const u=f/this.duration;let I=Math.floor(u),b=u%1;!b&&u>=1&&(b=1),b===1&&I--;const R=I%2;(d==="reverse"||d==="alternate"&&R||d==="alternate-reverse"&&!R)&&(b=1-b);const S=f>=this.totalDuration?1:Math.min(b,1),N=$(this.easing(S));e(N),this.pauseTime===void 0&&(this.playState==="finished"||f>=this.totalDuration+a)?(this.playState="finished",(_=this.resolve)===null||_===void 0||_.call(this,N)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},x&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Qe=window,Ht=Qe.ShadowRoot&&(Qe.ShadyCSS===void 0||Qe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Bt=Symbol(),Ft=new WeakMap;let Er=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Bt)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(Ht&&e===void 0){const i=r!==void 0&&r.length===1;i&&(e=Ft.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ft.set(r,e))}return e}toString(){return this.cssText}};const Jr=t=>new Er(typeof t=="string"?t:t+"",void 0,Bt),C=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((i,o,n)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[n+1],t[0]);return new Er(r,t,Bt)},eo=(t,e)=>{Ht?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{const i=document.createElement("style"),o=Qe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,t.appendChild(i)})},qt=Ht?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const i of e.cssRules)r+=i.cssText;return Jr(r)})(t):t;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var rt;const Ge=window,Kt=Ge.trustedTypes,to=Kt?Kt.emptyScript:"",Qt=Ge.reactiveElementPolyfillSupport,Pt={toAttribute(t,e){switch(e){case Boolean:t=t?to: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}},kr=(t,e)=>e!==t&&(e==e||t==t),ot={attribute:!0,type:String,converter:Pt,reflect:!1,hasChanged:kr},Wt="finalized";let ue=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((r,i)=>{const o=this._$Ep(i,r);o!==void 0&&(this._$Ev.set(o,i),e.push(o))}),e}static createProperty(e,r=ot){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,i,r);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(o){const n=this[e];this[r]=o,this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||ot}static finalize(){if(this.hasOwnProperty(Wt))return!1;this[Wt]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(const o of i)this.createProperty(o,r[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)r.unshift(qt(o))}else e!==void 0&&r.push(qt(e));return r}static _$Ep(e,r){const i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;const r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return eo(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=ot){var o;const n=this.constructor._$Ep(e,i);if(n!==void 0&&i.reflect===!0){const a=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:Pt).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$El=null}}_$AK(e,r){var i;const o=this.constructor,n=o._$Ev.get(e);if(n!==void 0&&this._$El!==n){const a=o.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:Pt;this._$El=n,this[n]=s.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let o=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||kr)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,n)=>this[n]=o),this._$Ei=void 0);let r=!1;const i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(o=>{var n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.call(o)}),this.update(i)):this._$Ek()}catch(o){throw r=!1,this._$Ek(),o}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};ue[Wt]=!0,ue.elementProperties=new Map,ue.elementStyles=[],ue.shadowRootOptions={mode:"open"},Qt==null||Qt({ReactiveElement:ue}),((rt=Ge.reactiveElementVersions)!==null&&rt!==void 0?rt:Ge.reactiveElementVersions=[]).push("1.6.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var it;const Xe=window,ye=Xe.trustedTypes,Yt=ye?ye.createPolicy("lit-html",{createHTML:t=>t}):void 0,Nt="$lit$",Q=`lit$${(Math.random()+"").slice(9)}$`,Or="?"+Q,ro=`<${Or}>`,se=document,Se=()=>se.createComment(""),Le=t=>t===null||typeof t!="object"&&typeof t!="function",Ir=Array.isArray,oo=t=>Ir(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",nt=`[ +\f\r]`,Ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,Xt=/>/g,ee=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,er=/"/g,Tr=/^(?:script|style|textarea|title)$/i,Mr=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),l=Mr(1),E=Mr(2),le=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),tr=new WeakMap,ie=se.createTreeWalker(se,129,null,!1);function Rr(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Yt!==void 0?Yt.createHTML(e):e}const io=(t,e)=>{const r=t.length-1,i=[];let o,n=e===2?"":"",a=Ce;for(let s=0;s"?(a=o??Ce,$=-1):x[1]===void 0?$=-2:($=a.lastIndex-x[2].length,d=x[1],a=x[3]===void 0?ee:x[3]==='"'?er:Jt):a===er||a===Jt?a=ee:a===Gt||a===Xt?a=Ce:(a=ee,o=void 0);const _=a===ee&&t[s+1].startsWith("/>")?" ":"";n+=a===Ce?c+ro:$>=0?(i.push(d),c.slice(0,$)+Nt+c.slice($)+Q+_):c+Q+($===-2?(i.push(void 0),s):_)}return[Rr(t,n+(t[r]||"")+(e===2?"":"")),i]};class Pe{constructor({strings:e,_$litType$:r},i){let o;this.parts=[];let n=0,a=0;const s=e.length-1,c=this.parts,[d,x]=io(e,r);if(this.el=Pe.createElement(d,i),ie.currentNode=this.el.content,r===2){const $=this.el.content,m=$.firstChild;m.remove(),$.append(...m.childNodes)}for(;(o=ie.nextNode())!==null&&c.length0){o.textContent=ye?ye.emptyScript:"";for(let _=0;_2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,o){const n=this.strings;let a=!1;if(n===void 0)e=xe(this,e,r,0),a=!Le(e)||e!==this._$AH&&e!==le,a&&(this._$AH=e);else{const s=e;let c,d;for(e=n[0],c=0;c{var i,o;const n=(i=r==null?void 0:r.renderBefore)!==null&&i!==void 0?i:e;let a=n._$litPart$;if(a===void 0){const s=(o=r==null?void 0:r.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=a=new Ne(e.insertBefore(Se(),s),s,void 0,r??{})}return a._$AI(t),a};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var at,st;class w extends ue{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;const i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mo(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return le}}w.finalized=!0,w._$litElement$=!0,(at=globalThis.litElementHydrateSupport)===null||at===void 0||at.call(globalThis,{LitElement:w});const or=globalThis.litElementPolyfillSupport;or==null||or({LitElement:w});((st=globalThis.litElementVersions)!==null&&st!==void 0?st:globalThis.litElementVersions=[]).push("3.3.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const y=t=>e=>typeof e=="function"?((r,i)=>(customElements.define(r,i),i))(t,e):((r,i)=>{const{kind:o,elements:n}=i;return{kind:o,elements:n,finisher(a){customElements.define(r,a)}}})(t,e);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const po=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}},uo=(t,e,r)=>{e.constructor.createProperty(r,t)};function p(t){return(e,r)=>r!==void 0?uo(t,e,r):po(t,e)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function W(t){return p({...t,state:!0})}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var lt;((lt=window.HTMLSlotElement)===null||lt===void 0?void 0:lt.prototype.assignedElements)!=null;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const go={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},wo=t=>(...e)=>({_$litDirective$:t,values:e});class vo{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Z=wo(class extends vo{constructor(t){var e;if(super(t),t.type!==go.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,i;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!(!((r=this.nt)===null||r===void 0)&&r.has(n))&&this.it.add(n);return this.render(e)}const o=t.element.classList;this.it.forEach(n=>{n in e||(o.remove(n),this.it.delete(n))});for(const n in e){const a=!!e[n];a===this.it.has(n)||!((i=this.nt)===null||i===void 0)&&i.has(n)||(a?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return le}}),ct=new WeakMap;function Sr(t){return ct.has(t)||ct.set(t,{transforms:[],values:new Map}),ct.get(t)}function fo(t,e){return t.has(e)||t.set(e,new jr),t.get(e)}const bo=["","X","Y","Z"],yo=["translate","scale","rotate","skew"],Je={x:"translateX",y:"translateY",z:"translateZ"},ir={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},xo={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:ir,scale:{syntax:"",initialValue:1,toDefaultUnit:G},skew:ir},We=new Map,Zt=t=>`--motion-${t}`,et=["x","y","z"];yo.forEach(t=>{bo.forEach(e=>{et.push(t+e),We.set(Zt(t+e),xo[t])})});const $o=(t,e)=>et.indexOf(t)-et.indexOf(e),Co=new Set(et),Lr=t=>Co.has(t),Ao=(t,e)=>{Je[e]&&(e=Je[e]);const{transforms:r}=Sr(t);Hr(r,e),t.style.transform=_o(r)},_o=t=>t.sort($o).reduce(Eo,"").trim(),Eo=(t,e)=>`${t} ${e}(var(${Zt(e)}))`,Dt=t=>t.startsWith("--"),nr=new Set;function ko(t){if(!nr.has(t)){nr.add(t);try{const{syntax:e,initialValue:r}=We.has(t)?We.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}const dt=(t,e)=>document.createElement("div").animate(t,e),ar={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{dt({opacity:[1]})}catch{return!1}return!0},finished:()=>!!dt({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{dt({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},ht={},ge={};for(const t in ar)ge[t]=()=>(ht[t]===void 0&&(ht[t]=ar[t]()),ht[t]);const Oo=.015,Io=(t,e)=>{let r="";const i=Math.round(e/Oo);for(let o=0;obe(t)?ge.linearEasing()?`linear(${Io(t,e)})`:D.easing:Cr(t)?To(t):t,To=([t,e,r,i])=>`cubic-bezier(${t}, ${e}, ${r}, ${i})`;function Mo(t,e){for(let r=0;rArray.isArray(t)?t:[t];function Ut(t){return Je[t]&&(t=Je[t]),Lr(t)?Zt(t):t}const je={get:(t,e)=>{e=Ut(e);let r=Dt(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){const i=We.get(e);i&&(r=i.initialValue)}return r},set:(t,e,r)=>{e=Ut(e),Dt(e)?t.style.setProperty(e,r):t.style[e]=r}};function Pr(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function So(t,e){var r;let i=(e==null?void 0:e.toDefaultUnit)||G;const o=t[t.length-1];if(Fr(o)){const n=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";n&&(i=a=>a+n)}return i}function Lo(){return window.__MOTION_DEV_TOOLS_RECORD}function Po(t,e,r,i={},o){const n=Lo(),a=i.record!==!1&&n;let s,{duration:c=D.duration,delay:d=D.delay,endDelay:x=D.endDelay,repeat:$=D.repeat,easing:m=D.easing,persist:_=!1,direction:f,offset:u,allowWebkitAcceleration:I=!1,autoplay:b=!0}=i;const R=Sr(t),S=Lr(e);let N=ge.waapi();S&&Ao(t,e);const U=Ut(e),De=fo(R.values,U),z=We.get(U);return Pr(De.animation,!(Lt(m)&&De.generator)&&i.record!==!1),()=>{const Ue=()=>{var O,$e;return($e=(O=je.get(t,U))!==null&&O!==void 0?O:z==null?void 0:z.initialValue)!==null&&$e!==void 0?$e:0};let T=Mo(Ro(r),Ue);const zt=So(T,z);if(Lt(m)){const O=m.createAnimation(T,e!=="opacity",Ue,U,De);m=O.easing,T=O.keyframes||T,c=O.duration||c}if(Dt(U)&&(ge.cssRegisterProperty()?ko(U):N=!1),S&&!ge.linearEasing()&&(be(m)||we(m)&&m.some(be))&&(N=!1),N){z&&(T=T.map(J=>Ye(J)?z.toDefaultUnit(J):J)),T.length===1&&(!ge.partialKeyframes()||a)&&T.unshift(Ue());const O={delay:Re.ms(d),duration:Re.ms(c),endDelay:Re.ms(x),easing:we(m)?void 0:sr(m,c),direction:f,iterations:$+1,fill:"both"};s=t.animate({[U]:T,offset:u,easing:we(m)?m.map(J=>sr(J,c)):void 0},O),s.finished||(s.finished=new Promise((J,Nr)=>{s.onfinish=J,s.oncancel=Nr}));const $e=T[T.length-1];s.finished.then(()=>{_||(je.set(t,U,$e),s.cancel())}).catch(xr),I||(s.playbackRate=1.000001)}else if(o&&S)T=T.map(O=>typeof O=="string"?parseFloat(O):O),T.length===1&&T.unshift(parseFloat(Ue())),s=new o(O=>{je.set(t,U,zt?zt(O):O)},T,Object.assign(Object.assign({},i),{duration:c,easing:m}));else{const O=T[T.length-1];je.set(t,U,z&&Ye(O)?z.toDefaultUnit(O):O)}return a&&n(t,e,T,{duration:c,delay:d,easing:m,repeat:$,offset:u},"motion-one"),De.setAnimation(s),s&&!b&&s.pause(),s}}const Wo=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function No(t,e){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Do=t=>t(),Wr=(t,e,r=D.duration)=>new Proxy({animations:t.map(Do).filter(Boolean),duration:r,options:e},jo),Uo=t=>t.animations[0],jo={get:(t,e)=>{const r=Uo(t);switch(e){case"duration":return t.duration;case"currentTime":return Re.s((r==null?void 0:r[e])||0);case"playbackRate":case"playState":return r==null?void 0:r[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Ho)).catch(xr)),t.finished;case"stop":return()=>{t.animations.forEach(i=>Pr(i))};case"forEachNative":return i=>{t.animations.forEach(o=>i(o,t))};default:return typeof(r==null?void 0:r[e])>"u"?void 0:()=>t.animations.forEach(i=>i[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=Re.ms(r);case"playbackRate":for(let i=0;it.finished;function Bo(t,e,r){return be(t)?t(e,r):t}function Zo(t){return function(r,i,o={}){r=No(r);const n=r.length,a=[];for(let s=0;s{const r=new _r(t,[0,1],e);return r.finished.catch(()=>{}),r}],e,e.duration)}function ne(t,e,r){return(be(t)?Vo:zo)(t,e,r)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const L=t=>t??M;var Fo=Object.defineProperty,lr=Object.getOwnPropertySymbols,qo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable,cr=(t,e,r)=>e in t?Fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mt=(t,e)=>{for(var r in e||(e={}))qo.call(e,r)&&cr(t,r,e[r]);if(lr)for(var r of lr(e))Ko.call(e,r)&&cr(t,r,e[r]);return t};function Qo(){var t;const e=(t=fe.state.themeMode)!=null?t:"dark",r={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--wcm-color-fg-1":r.foreground[1],"--wcm-color-fg-2":r.foreground[2],"--wcm-color-fg-3":r.foreground[3],"--wcm-color-bg-1":r.background[1],"--wcm-color-bg-2":r.background[2],"--wcm-color-bg-3":r.background[3],"--wcm-color-overlay":r.overlay}}function dr(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const v={getPreset(t){return dr()[t]},setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=fe.state;if(t){const r=mt(mt(mt({},Qo()),dr()),e);Object.entries(r).forEach(([i,o])=>t.style.setProperty(i,o))}},globalCss:C`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Yo=C`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Go=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,ce=(t,e,r,i)=>{for(var o=i>1?void 0:i?Xo(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Go(e,r,o),o};let V=class extends w{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const t={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),l``}};V.styles=[v.globalCss,Yo],ce([p({type:Boolean})],V.prototype,"disabled",2),ce([p()],V.prototype,"iconLeft",2),ce([p()],V.prototype,"iconRight",2),ce([p()],V.prototype,"onClick",2),ce([p()],V.prototype,"variant",2),V=ce([y("wcm-button")],V);const Jo=C`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,pt=(t,e,r,i)=>{for(var o=i>1?void 0:i?ti(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&ei(e,r,o),o};let Ae=class extends w{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"wcm-secondary":this.variant==="secondary"};return l``}};Ae.styles=[v.globalCss,Jo],pt([p({type:Boolean})],Ae.prototype,"disabled",2),pt([p()],Ae.prototype,"variant",2),Ae=pt([y("wcm-button-big")],Ae);const ri=C`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var oi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let ut=class extends w{render(){return l`
`}};ut.styles=[v.globalCss,ri],ut=oi([y("wcm-info-footer")],ut);const A={CROSS_ICON:E``,WALLET_CONNECT_LOGO:E``,WALLET_CONNECT_ICON:E``,WALLET_CONNECT_ICON_COLORED:E``,BACK_ICON:E``,COPY_ICON:E``,RETRY_ICON:E``,DESKTOP_ICON:E``,MOBILE_ICON:E``,ARROW_DOWN_ICON:E``,ARROW_UP_RIGHT_ICON:E``,ARROW_RIGHT_ICON:E``,QRCODE_ICON:E``,SCAN_ICON:E``,CHECKMARK_ICON:E``,SEARCH_ICON:E``,WALLET_PLACEHOLDER:E``,GLOBE_ICON:E``},ii=C`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var ni=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let gt=class extends w{render(){return l`
${A.WALLET_CONNECT_LOGO}
`}};gt.styles=[v.globalCss,ii],gt=ni([y("wcm-modal-backcard")],gt);const ai=C`main{padding:20px;padding-top:0;width:100%}`;var si=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let wt=class extends w{render(){return l`
`}};wt.styles=[v.globalCss,ai],wt=si([y("wcm-modal-content")],wt);const li=C`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var ci=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let vt=class extends w{render(){return l`
`}};vt.styles=[v.globalCss,li],vt=ci([y("wcm-modal-footer")],vt);const di=C`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var hi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,_e=(t,e,r,i)=>{for(var o=i>1?void 0:i?mi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&hi(e,r,o),o};let te=class extends w{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return l``}actionBtnTemplate(){return l``}render(){const t={"wcm-border":this.border},e=k.state.history.length>1,r=this.title?l`${this.title}`:l``;return l`
${e?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}
`}};te.styles=[v.globalCss,di],_e([p()],te.prototype,"title",2),_e([p()],te.prototype,"onAction",2),_e([p()],te.prototype,"actionIcon",2),_e([p({type:Boolean})],te.prototype,"border",2),te=_e([y("wcm-modal-header")],te);const h={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(t,e){const r=t.renderRoot.querySelector(e);if(!r)throw new Error(`${e} not found`);return r},getWalletIcon({id:t,image_id:e}){const{walletImages:r}=ae.state;return r!=null&&r[t]?r[t]:e?P.getWalletImageUrl(e):""},getWalletName(t,e=!1){return e&&t.length>8?`${t.substring(0,8)}..`:t},isMobileAnimation(){return window.innerWidth<=h.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((r,i)=>{const o=new Image;o.onload=r,o.onerror=i,o.crossOrigin="anonymous",o.src=t});return Promise.race([e,g.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let r;return(...i)=>{function o(){t(...i)}r&&clearTimeout(r),r=setTimeout(o,e)}},handleMobileLinking(t){const{walletConnectUri:e}=H.state,{mobile:r,name:i}=t,o=r==null?void 0:r.native,n=r==null?void 0:r.universal;h.setRecentWallet(t);function a(s){let c="";o?c=g.formatUniversalUrl(o,s,i):n&&(c=g.formatNativeUrl(n,s,i)),g.openHref(c,"_self")}e&&a(e)},handleAndroidLinking(){const{walletConnectUri:t}=H.state;t&&(g.setWalletConnectAndroidDeepLink(t),g.openHref(t,"_self"))},async handleUriCopy(){const{walletConnectUri:t}=H.state;if(t)try{await navigator.clipboard.writeText(t),Y.openToast("Link copied","success")}catch{Y.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:t}=ae.state,e=Object.values(t??{});return Object.values(e)},truncate(t,e=8){return t.length<=e?t:`${t.substring(0,4)}...${t.substring(t.length-4)}`},setRecentWallet(t){try{localStorage.setItem(h.WCM_RECENT_WALLET_DATA,JSON.stringify(t))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const t=localStorage.getItem(h.WCM_RECENT_WALLET_DATA);return t?JSON.parse(t):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){g.openHref(h.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:t,mobile:e}=g.getWalletRouterData(),r=!!(t!=null&&t.native),i=!!(t!=null&&t.universal),o=!!(e!=null&&e.native)||!!(e!=null&&e.universal);return{isDesktop:r,isMobile:o,isWeb:i}},goToConnectingView(t){k.setData({Wallet:t});const e=g.isMobile(),{isDesktop:r,isWeb:i,isMobile:o}=h.getCachedRouterWalletPlatforms();e?o?k.push("MobileConnecting"):i?k.push("WebConnecting"):k.push("InstallWallet"):r?k.push("DesktopConnecting"):i?k.push("WebConnecting"):o?k.push("MobileQrcodeConnecting"):k.push("InstallWallet")}},pi=C`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var ui=Object.defineProperty,gi=Object.getOwnPropertyDescriptor,ft=(t,e,r,i)=>{for(var o=i>1?void 0:i?gi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&ui(e,r,o),o};let Ee=class extends w{constructor(){super(),this.view=k.state.view,this.prevView=k.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=k.subscribe(t=>{this.view!==t.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([t])=>{const e=`${t.contentRect.height}px`;this.oldHeight!=="0px"&&ne(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;(t=this.unsubscribe)==null||t.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return h.getShadowRootElement(this,".wcm-router")}get contentEl(){return h.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return l``;case"DesktopConnecting":return l``;case"MobileConnecting":return l``;case"WebConnecting":return l``;case"MobileQrcodeConnecting":return l``;case"WalletExplorer":return l``;case"Qrcode":return l``;case"InstallWallet":return l``;default:return l`
Not Found
`}}async onChangeRoute(){await ne(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=k.state.view,ne(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return l`
${this.viewTemplate()}
`}};Ee.styles=[v.globalCss,pi],ft([W()],Ee.prototype,"view",2),ft([W()],Ee.prototype,"prevView",2),Ee=ft([y("wcm-modal-router")],Ee);const wi=C`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var vi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,hr=(t,e,r,i)=>{for(var o=i>1?void 0:i?fi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&vi(e,r,o),o};let He=class extends w{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=Y.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>Y.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),Y.closeToast()}render(){const{message:t,variant:e}=Y.state,r={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?l`
${e==="success"?A.CHECKMARK_ICON:null} ${e==="error"?A.CROSS_ICON:null}${t}
`:null}};He.styles=[v.globalCss,wi],hr([W()],He.prototype,"open",2),He=hr([y("wcm-modal-toast")],He);const bi=.1,mr=2.5,B=7;function bt(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+bi}function yi(t,e){const r=Array.prototype.slice.call(Ur.create(t,{errorCorrectionLevel:e}).modules.data,0),i=Math.sqrt(r.length);return r.reduce((o,n,a)=>(a%i===0?o.push([n]):o[o.length-1].push(n))&&o,[])}const xi={generate(t,e,r){const i="#141414",o="#ffffff",n=[],a=yi(t,"Q"),s=e/a.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach(({x:f,y:u})=>{const I=(a.length-B)*s*f,b=(a.length-B)*s*u,R=.45;for(let S=0;S`)}});const d=Math.floor((r+25)/s),x=a.length/2-d/2,$=a.length/2+d/2-1,m=[];a.forEach((f,u)=>{f.forEach((I,b)=>{if(a[u][b]&&!(ua.length-(B+1)&&ba.length-(B+1))&&!(u>x&&u<$&&b>x&&b<$)){const R=u*s+s/2,S=b*s+s/2;m.push([R,S])}})});const _={};return m.forEach(([f,u])=>{_[f]?_[f].push(u):_[f]=[u]}),Object.entries(_).map(([f,u])=>{const I=u.filter(b=>u.every(R=>!bt(b,R,s)));return[Number(f),I]}).forEach(([f,u])=>{u.forEach(I=>{n.push(E``)})}),Object.entries(_).filter(([f,u])=>u.length>1).map(([f,u])=>{const I=u.filter(b=>u.some(R=>bt(b,R,s)));return[Number(f),I]}).map(([f,u])=>{u.sort((b,R)=>bS.some(N=>bt(b,N,s)));R?R.push(b):I.push([b])}return[f,I.map(b=>[b[0],b[b.length-1]])]}).forEach(([f,u])=>{u.forEach(([I,b])=>{n.push(E``)})}),n}},$i=C`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Ci=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,de=(t,e,r,i)=>{for(var o=i>1?void 0:i?Ai(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ci(e,r,o),o};let F=class extends w{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const t=fe.state.themeMode==="light"?this.size:this.size-36;return E`${xi.generate(this.uri,t,t/4)}`}render(){const t={"wcm-dark":fe.state.themeMode==="dark"};return l`
${this.walletId||this.imageUrl?l``:A.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};F.styles=[v.globalCss,$i],de([p()],F.prototype,"uri",2),de([p({type:Number})],F.prototype,"size",2),de([p()],F.prototype,"imageId",2),de([p()],F.prototype,"walletId",2),de([p()],F.prototype,"imageUrl",2),F=de([y("wcm-qrcode")],F);const _i=C`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ei=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,pr=(t,e,r,i)=>{for(var o=i>1?void 0:i?ki(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ei(e,r,o),o};let Be=class extends w{constructor(){super(...arguments),this.onChange=()=>null}render(){return l` ${A.SEARCH_ICON}`}};Be.styles=[v.globalCss,_i],pr([p()],Be.prototype,"onChange",2),Be=pr([y("wcm-search-input")],Be);const Oi=C`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Ii=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let yt=class extends w{render(){return l``}};yt.styles=[v.globalCss,Oi],yt=Ii([y("wcm-spinner")],yt);const Ti=C`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Mi=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,xt=(t,e,r,i)=>{for(var o=i>1?void 0:i?Ri(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Mi(e,r,o),o};let ke=class extends w{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return l``}};ke.styles=[v.globalCss,Ti],xt([p()],ke.prototype,"variant",2),xt([p()],ke.prototype,"color",2),ke=xt([y("wcm-text")],ke);const Si=C`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Li=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,q=(t,e,r,i)=>{for(var o=i>1?void 0:i?Pi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Li(e,r,o),o};let j=class extends w{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?l`RECENT`:this.installed?l`INSTALLED`:null}handleClick(){Dr.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var t;return l``}};j.styles=[v.globalCss,Si],q([p()],j.prototype,"onClick",2),q([p()],j.prototype,"name",2),q([p()],j.prototype,"walletId",2),q([p()],j.prototype,"label",2),q([p()],j.prototype,"imageId",2),q([p({type:Boolean})],j.prototype,"installed",2),q([p({type:Boolean})],j.prototype,"recent",2),j=q([y("wcm-wallet-button")],j);const Wi=C`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ni=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,Ze=(t,e,r,i)=>{for(var o=i>1?void 0:i?Di(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ni(e,r,o),o};let he=class extends w{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var t;const e=(t=this.imageUrl)!=null&&t.length?this.imageUrl:h.getWalletIcon({id:this.walletId,image_id:this.imageId});return l`${e.length?l`
${this.id}
`:A.WALLET_PLACEHOLDER}`}};he.styles=[v.globalCss,Wi],Ze([p()],he.prototype,"walletId",2),Ze([p()],he.prototype,"imageId",2),Ze([p()],he.prototype,"imageUrl",2),he=Ze([y("wcm-wallet-image")],he);var Ui=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,ur=(t,e,r,i)=>{for(var o=i>1?void 0:i?ji(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Ui(e,r,o),o};let $t=class extends w{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>h.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){if(ae.state.enableExplorer){await P.getRecomendedWallets(),H.setIsDataLoaded(!0);const{recomendedWallets:t}=P.state,e=t.map(r=>h.getWalletIcon(r));await this.loadImages(e)}else H.setIsDataLoaded(!0)}async preloadCustomImages(){const t=h.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),Y.openToast("Failed preloading","error")}}};ur([W()],$t.prototype,"preload",2),$t=ur([y("wcm-explorer-context")],$t);var Hi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let gr=class extends w{constructor(){super(),this.unsubscribeTheme=void 0,v.setTheme(),this.unsubscribeTheme=fe.subscribe(v.setTheme)}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}};gr=Hi([y("wcm-theme-context")],gr);const Bi=C`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Zi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Ct=class extends w{onGoToQrcode(){k.push("Qrcode")}render(){const{recomendedWallets:t}=P.state,e=[...t,...t],r=g.RECOMMENDED_WALLET_AMOUNT*2;return l`
${A.MOBILE_ICON}WalletConnect
${[...Array(r)].map((i,o)=>{const n=e[o%e.length];return n?l``:A.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Ct.styles=[v.globalCss,Bi],Ct=Zi([y("wcm-android-wallet-selection")],Ct);const zi=C`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Vi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,me=(t,e,r,i)=>{for(var o=i>1?void 0:i?Fi(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&Vi(e,r,o),o};let K=class extends w{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var t,e;const r=(e=(t=fe.state.themeVariables)==null?void 0:t["--wcm-wallet-icon-large-border-radius"])!=null?e:v.getPreset("--wcm-wallet-icon-large-border-radius");let i=0;r.includes("%")?i=88/100*parseInt(r,10):i=parseInt(r,10),i*=1.17;const o=317-i*1.57,n=425-i*1.8;return l``}render(){const t={"wcm-error":this.isError,"wcm-stale":this.isStale};return l`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};K.styles=[v.globalCss,zi],me([p()],K.prototype,"walletId",2),me([p()],K.prototype,"imageId",2),me([p({type:Boolean})],K.prototype,"isError",2),me([p({type:Boolean})],K.prototype,"isStale",2),me([p()],K.prototype,"label",2),K=me([y("wcm-connector-waiting")],K);const ve={manualWallets(){var t,e;const{mobileWallets:r,desktopWallets:i}=ae.state,o=(t=ve.recentWallet())==null?void 0:t.id,n=g.isMobile()?r:i,a=n==null?void 0:n.filter(s=>o!==s.id);return(e=g.isMobile()?a==null?void 0:a.map(({id:s,name:c,links:d})=>({id:s,name:c,mobile:d,links:d})):a==null?void 0:a.map(({id:s,name:c,links:d})=>({id:s,name:c,desktop:d,links:d})))!=null?e:[]},recentWallet(){return h.getRecentWallet()},recomendedWallets(t=!1){var e;const r=t||(e=ve.recentWallet())==null?void 0:e.id,{recomendedWallets:i}=P.state;return i.filter(o=>r!==o.id)}},X={onConnecting(t){h.goToConnectingView(t)},manualWalletsTemplate(){return ve.manualWallets().map(t=>l``)},recomendedWalletsTemplate(t=!1){return ve.recomendedWallets(t).map(e=>l``)},recentWalletTemplate(){const t=ve.recentWallet();if(t)return l``}},qi=C`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var Ki=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let At=class extends w{render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=ae.state,r=t!=="ALL"&&e,i=X.manualWalletsTemplate(),o=X.recomendedWalletsTemplate();let n=[X.recentWalletTemplate(),...i,...o];n=n.filter(Boolean);const a=n.length>4||r;let s=[];a?s=n.slice(0,3):s=n;const c=!!s.length;return l`
${A.MOBILE_ICON}Mobile
${A.SCAN_ICON}Scan with your wallet
${c?l`
${A.DESKTOP_ICON}Desktop
${s} ${a?l``:null}
`:null}`}};At.styles=[v.globalCss,qi],At=Ki([y("wcm-desktop-wallet-selection")],At);const Qi=C`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Yi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let _t=class extends w{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=ae.state;return t??e?l`
By connecting your wallet to this app, you agree to the app's ${t?l`Terms of Service`:null} ${t&&e?"and":null} ${e?l`Privacy Policy`:null}
`:null}};_t.styles=[v.globalCss,Qi],_t=Yi([y("wcm-legal-notice")],_t);const Gi=C`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var Xi=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Et=class extends w{onQrcode(){k.push("Qrcode")}render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=ae.state,r=t!=="ALL"&&e,i=X.manualWalletsTemplate(),o=X.recomendedWalletsTemplate();let n=[X.recentWalletTemplate(),...i,...o];n=n.filter(Boolean);const a=n.length>8||r;let s=[];a?s=n.slice(0,7):s=n;const c=!!s.length;return l`${c?l`
${s} ${a?l``:null}
`:null}`}};Et.styles=[v.globalCss,Gi],Et=Xi([y("wcm-mobile-wallet-selection")],Et);const Ji=C`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var en=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,kt=(t,e,r,i)=>{for(var o=i>1?void 0:i?tn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&en(e,r,o),o};let Oe=class extends w{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=Ke.subscribe(t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var t;(t=this.unsubscribeModal)==null||t.call(this)}get overlayEl(){return h.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return h.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(t){if(document.querySelector("body"))if(t){const e=document.getElementById("wcm-styles");e==null||e.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(t){t.target===t.currentTarget&&Ke.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const t=h.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,r=.2;await Promise.all([ne(this.overlayEl,{opacity:[0,1]},{delay:e,duration:r}).finished,ne(this.containerEl,t,{delay:e,duration:r}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const t=h.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([ne(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,ne(this.containerEl,t,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",t=>{var e;t.key==="Escape"?Ke.close():t.key==="Tab"&&((e=t.target)!=null&&e.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;(t=this.abortController)==null||t.abort(),this.abortController=void 0}render(){const t={"wcm-overlay":!0,"wcm-active":this.active};return l`
${this.open?l`
`:null}
`}};Oe.styles=[v.globalCss,Ji],kt([W()],Oe.prototype,"open",2),kt([W()],Oe.prototype,"active",2),Oe=kt([y("wcm-modal")],Oe);const rn=C`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var on=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,Ie=(t,e,r,i)=>{for(var o=i>1?void 0:i?nn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&on(e,r,o),o};let re=class extends w{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){g.isMobile()?k.replace("MobileConnecting"):k.replace("MobileQrcodeConnecting")}onDesktop(){k.replace("DesktopConnecting")}onWeb(){k.replace("WebConnecting")}render(){return l`
${this.isRetry?l``:null} ${this.isMobile?l`Mobile`:null} ${this.isDesktop?l`Desktop`:null} ${this.isWeb?l`Web`:null}
`}};re.styles=[v.globalCss,rn],Ie([p({type:Boolean})],re.prototype,"isMobile",2),Ie([p({type:Boolean})],re.prototype,"isDesktop",2),Ie([p({type:Boolean})],re.prototype,"isWeb",2),Ie([p({type:Boolean})],re.prototype,"isRetry",2),re=Ie([y("wcm-platform-selection")],re);const an=C`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var sn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Ot=class extends w{onClick(){k.push("WalletExplorer")}render(){const{recomendedWallets:t}=P.state,e=ve.manualWallets(),r=[...t,...e].reverse().slice(0,4);return l``}};Ot.styles=[v.globalCss,an],Ot=sn([y("wcm-view-all-wallets-button")],Ot);const ln=C`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,ze=(t,e,r,i)=>{for(var o=i>1?void 0:i?dn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&cn(e,r,o),o};let pe=class extends w{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:t}=H.state;this.uri=t},0)}get overlayEl(){return h.getShadowRootElement(this,".wcm-qr-container")}render(){return l`
${this.uri?l``:l``}
`}};pe.styles=[v.globalCss,ln],ze([p()],pe.prototype,"walletId",2),ze([p()],pe.prototype,"imageId",2),ze([W()],pe.prototype,"uri",2),pe=ze([y("wcm-walletconnect-qr")],pe);var hn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let It=class extends w{viewTemplate(){return g.isAndroid()?l``:g.isMobile()?l``:l``}render(){return l`${this.viewTemplate()}`}};It.styles=[v.globalCss],It=hn([y("wcm-connect-wallet-view")],It);const mn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,wr=(t,e,r,i)=>{for(var o=i>1?void 0:i?un(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&pn(e,r,o),o};let Ve=class extends w{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(t){const{desktop:e,name:r}=g.getWalletRouterData(),i=e==null?void 0:e.native;if(i){const o=g.formatNativeUrl(i,t,r);g.openHref(o,"_self")}}openDesktopApp(){const{walletConnectUri:t}=H.state,e=g.getWalletRouterData();h.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isMobile:i,isWeb:o}=h.getCachedRouterWalletPlatforms();return l`${`Connection can continue loading if ${t} is not installed on your device`}Retry`}};Ve.styles=[v.globalCss,mn],wr([W()],Ve.prototype,"isError",2),Ve=wr([y("wcm-desktop-connecting-view")],Ve);const gn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var wn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Tt=class extends w{onInstall(t){t&&g.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,homepage:i}=g.getWalletRouterData();return l`${`Download ${t} to continue. If multiple browser extensions are installed, disable non ${t} ones and try again`}Download`}};Tt.styles=[v.globalCss,gn],Tt=wn([y("wcm-install-wallet-view")],Tt);const vn=C`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var fn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,vr=(t,e,r,i)=>{for(var o=i>1?void 0:i?bn(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&fn(e,r,o),o};let Fe=class extends w{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(t,e=!1){const{mobile:r,name:i}=g.getWalletRouterData(),o=r==null?void 0:r.native,n=r==null?void 0:r.universal;if(o&&!e){const a=g.formatNativeUrl(o,t,i);g.openHref(a,"_self")}else if(n){const a=g.formatUniversalUrl(n,t,i);g.openHref(a,"_self")}}openMobileApp(t=!1){const{walletConnectUri:e}=H.state,r=g.getWalletRouterData();h.setRecentWallet(r),e&&this.onFormatAndRedirect(e,t)}onGoToAppStore(t){t&&g.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:r,app:i,mobile:o}=g.getWalletRouterData(),{isWeb:n}=h.getCachedRouterWalletPlatforms(),a=i==null?void 0:i.ios,s=o==null?void 0:o.universal;return l`Retry${s?l`Still doesn't work? Try this alternate link`:null}
${`Get ${t}`}
App Store
`}};Fe.styles=[v.globalCss,vn],vr([W()],Fe.prototype,"isError",2),Fe=vr([y("wcm-mobile-connecting-view")],Fe);const yn=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var xn=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Mt=class extends w{render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isDesktop:i,isWeb:o}=h.getCachedRouterWalletPlatforms();return l`${`Scan this QR Code with your phone's camera or inside ${t} app`}`}};Mt.styles=[v.globalCss,yn],Mt=xn([y("wcm-mobile-qr-connecting-view")],Mt);var $n=(t,e,r,i)=>{for(var o=e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=a(o)||o);return o};let Rt=class extends w{render(){return l``}};Rt.styles=[v.globalCss],Rt=$n([y("wcm-qrcode-view")],Rt);const Cn=C`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var An=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,Te=(t,e,r,i)=>{for(var o=i>1?void 0:i?_n(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&An(e,r,o),o};const St=40;let oe=class extends w{constructor(){super(...arguments),this.loading=!P.state.wallets.listings.length,this.firstFetch=!P.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=h.debounce(t=>{t.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=t,P.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),P.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect()}get placeholderEl(){return h.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=P.state,{listings:r,total:i}=this.search?e:t;return i<=St||r.length>=i}async fetchWallets(){var t;const{wallets:e,search:r}=P.state,{listings:i,total:o,page:n}=this.search?r:e;if(!this.endReached&&(this.firstFetch||o>St&&i.lengthh.getWalletIcon(d));await Promise.all([...c.map(async d=>h.preloadImage(d)),g.wait(300)]),this.endReached=this.isLastPage()}catch(a){console.error(a),Y.openToast(h.getErrorMessage(a),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(t){g.isAndroid()?h.handleMobileLinking(t):h.goToConnectingView(t)}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=P.state,{listings:r}=this.search?e:t,i=this.loading&&!r.length,o=this.search.length>=3;let n=X.manualWalletsTemplate(),a=X.recomendedWalletsTemplate(!0);o&&(n=n.filter(({values:d})=>h.caseSafeIncludes(d[0],this.search)),a=a.filter(({values:d})=>h.caseSafeIncludes(d[0],this.search)));const s=!this.loading&&!r.length&&!a.length,c={"wcm-loading":i,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":s};return l`
${i?null:n} ${i?null:a} ${i?null:r.map(d=>l`${d?l``:null}`)}
${s?l`No results found`:null} ${!s&&this.loading?l``:null}
`}};oe.styles=[v.globalCss,Cn],Te([W()],oe.prototype,"loading",2),Te([W()],oe.prototype,"firstFetch",2),Te([W()],oe.prototype,"search",2),Te([W()],oe.prototype,"endReached",2),oe=Te([y("wcm-wallet-explorer-view")],oe);const En=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var kn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,fr=(t,e,r,i)=>{for(var o=i>1?void 0:i?On(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(o=(i?a(e,r,o):a(o))||o);return i&&o&&kn(e,r,o),o};let qe=class extends w{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(t){const{desktop:e,name:r}=g.getWalletRouterData(),i=e==null?void 0:e.universal;if(i){const o=g.formatUniversalUrl(i,t,r);g.openHref(o,"_blank")}}openWebWallet(){const{walletConnectUri:t}=H.state,e=g.getWalletRouterData();h.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:r}=g.getWalletRouterData(),{isMobile:i,isDesktop:o}=h.getCachedRouterWalletPlatforms(),n=g.isMobile();return l`${`${t} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};qe.styles=[v.globalCss,En],fr([W()],qe.prototype,"isError",2),qe=fr([y("wcm-web-connecting-view")],qe);export{Oe as WcmModal,F as WcmQrCode}; diff --git a/assets/index-BRISspn-.js b/assets/index-BRISspn-.js new file mode 100644 index 0000000..b55edee --- /dev/null +++ b/assets/index-BRISspn-.js @@ -0,0 +1,7 @@ +import{c as O,a as ra,t as Tc,e as Pc,g as $c}from"./index-B5bDTh7Y.js";import{r as Oc,e as na}from"./___vite-browser-external_commonjs-proxy-DtqXsXYi.js";import{s as Bc,a as Ke,b as an,r as Sr,j as Fc}from"./hooks.module-D8pHM5EM.js";var sa={},br={},cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.walletLogo=void 0;const Dc=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};cn.walletLogo=Dc;var ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.LINK_API_URL=void 0;ln.LINK_API_URL="https://www.walletlink.org";var A={},Vs={exports:{}};Vs.exports;(function(t){(function(e,r){function n(_,o){if(!_)throw new Error(o||"Assertion failed")}function i(_,o){_.super_=o;var l=function(){};l.prototype=o.prototype,_.prototype=new l,_.prototype.constructor=_}function s(_,o,l){if(s.isBN(_))return _;this.negative=0,this.words=null,this.length=0,this.red=null,_!==null&&((o==="le"||o==="be")&&(l=o,o=10),this._init(_||0,o||10,l||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=Oc.Buffer}catch{}s.isBN=function(o){return o instanceof s?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,l){return o.cmp(l)>0?o:l},s.min=function(o,l){return o.cmp(l)<0?o:l},s.prototype._init=function(o,l,f){if(typeof o=="number")return this._initNumber(o,l,f);if(typeof o=="object")return this._initArray(o,l,f);l==="hex"&&(l=16),n(l===(l|0)&&l>=2&&l<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g=0;g-=3)y=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[v]|=y<>>26-S&67108863,S+=24,S>=26&&(S-=26,v++);else if(f==="le")for(g=0,v=0;g>>26-S&67108863,S+=24,S>=26&&(S-=26,v++);return this._strip()};function u(_,o){var l=_.charCodeAt(o);if(l>=48&&l<=57)return l-48;if(l>=65&&l<=70)return l-55;if(l>=97&&l<=102)return l-87;n(!1,"Invalid character in "+_)}function h(_,o,l){var f=u(_,l);return l-1>=o&&(f|=u(_,l-1)<<4),f}s.prototype._parseHex=function(o,l,f){this.length=Math.ceil((o.length-l)/6),this.words=new Array(this.length);for(var g=0;g=l;g-=2)S=h(o,l,g)<=18?(v-=18,y+=1,this.words[y]|=S>>>26):v+=8;else{var m=o.length-l;for(g=m%2===0?l+1:l;g=18?(v-=18,y+=1,this.words[y]|=S>>>26):v+=8}this._strip()};function d(_,o,l,f){for(var g=0,v=0,y=Math.min(_.length,l),S=o;S=49?v=m-49+10:m>=17?v=m-17+10:v=m,n(m>=0&&v1&&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")]=b}catch{s.prototype.inspect=b}else s.prototype.inspect=b;function b(){return(this.red?""}var E=["","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"],M=[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],k=[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(o,l){o=o||10,l=l|0||1;var f;if(o===16||o==="hex"){f="";for(var g=0,v=0,y=0;y>>24-g&16777215,g+=2,g>=26&&(g-=26,y--),v!==0||y!==this.length-1?f=E[6-m.length]+m+f:f=m+f}for(v!==0&&(f=v.toString(16)+f);f.length%l!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(o===(o|0)&&o>=2&&o<=36){var a=M[o],w=k[o];f="";var x=this.clone();for(x.negative=0;!x.isZero();){var R=x.modrn(w).toString(o);x=x.idivn(w),x.isZero()?f=R+f:f=E[a-R.length]+R+f}for(this.isZero()&&(f="0"+f);f.length%l!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},s.prototype.toJSON=function(){return this.toString(16,2)},c&&(s.prototype.toBuffer=function(o,l){return this.toArrayLike(c,o,l)}),s.prototype.toArray=function(o,l){return this.toArrayLike(Array,o,l)};var N=function(o,l){return o.allocUnsafe?o.allocUnsafe(l):new o(l)};s.prototype.toArrayLike=function(o,l,f){this._strip();var g=this.byteLength(),v=f||Math.max(1,g);n(g<=v,"byte array longer than desired length"),n(v>0,"Requested array length <= 0");var y=N(o,v),S=l==="le"?"LE":"BE";return this["_toArrayLike"+S](y,g),y},s.prototype._toArrayLikeLE=function(o,l){for(var f=0,g=0,v=0,y=0;v>8&255),f>16&255),y===6?(f>24&255),g=0,y=0):(g=S>>>24,y+=2)}if(f=0&&(o[f--]=S>>8&255),f>=0&&(o[f--]=S>>16&255),y===6?(f>=0&&(o[f--]=S>>24&255),g=0,y=0):(g=S>>>24,y+=2)}if(f>=0)for(o[f--]=g;f>=0;)o[f--]=0},Math.clz32?s.prototype._countBits=function(o){return 32-Math.clz32(o)}:s.prototype._countBits=function(o){var l=o,f=0;return l>=4096&&(f+=13,l>>>=13),l>=64&&(f+=7,l>>>=7),l>=8&&(f+=4,l>>>=4),l>=2&&(f+=2,l>>>=2),f+l},s.prototype._zeroBits=function(o){if(o===0)return 26;var l=o,f=0;return l&8191||(f+=13,l>>>=13),l&127||(f+=7,l>>>=7),l&15||(f+=4,l>>>=4),l&3||(f+=2,l>>>=2),l&1||f++,f},s.prototype.bitLength=function(){var o=this.words[this.length-1],l=this._countBits(o);return(this.length-1)*26+l};function L(_){for(var o=new Array(_.bitLength()),l=0;l>>g&1}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,l=0;lo.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var l;this.length>o.length?l=o:l=this;for(var f=0;fo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var l,f;this.length>o.length?(l=this,f=o):(l=o,f=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){n(typeof o=="number"&&o>=0);var l=Math.ceil(o/26)|0,f=o%26;this._expand(l),f>0&&l--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-f),this._strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,l){n(typeof o=="number"&&o>=0);var f=o/26|0,g=o%26;return this._expand(f+1),l?this.words[f]=this.words[f]|1<o.length?(f=this,g=o):(f=o,g=this);for(var v=0,y=0;y>>26;for(;v!==0&&y>>26;if(this.length=f.length,v!==0)this.words[this.length]=v,this.length++;else if(f!==this)for(;yo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var l=this.iadd(o);return o.negative=1,l._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var f=this.cmp(o);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,v;f>0?(g=this,v=o):(g=o,v=this);for(var y=0,S=0;S>26,this.words[S]=l&67108863;for(;y!==0&&S>26,this.words[S]=l&67108863;if(y===0&&S>>26,x=m&67108863,R=Math.min(a,o.length-1),B=Math.max(0,a-_.length+1);B<=R;B++){var qe=a-B|0;g=_.words[qe]|0,v=o.words[B]|0,y=g*v+x,w+=y/67108864|0,x=y&67108863}l.words[a]=x|0,m=w|0}return m!==0?l.words[a]=m|0:l.length--,l._strip()}var T=function(o,l,f){var g=o.words,v=l.words,y=f.words,S=0,m,a,w,x=g[0]|0,R=x&8191,B=x>>>13,qe=g[1]|0,G=qe&8191,Z=qe>>>13,Ci=g[2]|0,te=Ci&8191,re=Ci>>>13,Ri=g[3]|0,ne=Ri&8191,se=Ri>>>13,Ii=g[4]|0,ie=Ii&8191,oe=Ii>>>13,Ai=g[5]|0,ae=Ai&8191,ce=Ai>>>13,Ni=g[6]|0,le=Ni&8191,ue=Ni>>>13,Li=g[7]|0,de=Li&8191,he=Li>>>13,xi=g[8]|0,fe=xi&8191,ge=xi>>>13,Ti=g[9]|0,pe=Ti&8191,me=Ti>>>13,Pi=v[0]|0,ve=Pi&8191,we=Pi>>>13,$i=v[1]|0,ye=$i&8191,be=$i>>>13,Oi=v[2]|0,_e=Oi&8191,Ee=Oi>>>13,Bi=v[3]|0,Se=Bi&8191,Me=Bi>>>13,Fi=v[4]|0,ke=Fi&8191,Ce=Fi>>>13,Di=v[5]|0,Re=Di&8191,Ie=Di>>>13,ji=v[6]|0,Ae=ji&8191,Ne=ji>>>13,Hi=v[7]|0,Le=Hi&8191,xe=Hi>>>13,Ui=v[8]|0,Te=Ui&8191,Pe=Ui>>>13,Vi=v[9]|0,$e=Vi&8191,Oe=Vi>>>13;f.negative=o.negative^l.negative,f.length=19,m=Math.imul(R,ve),a=Math.imul(R,we),a=a+Math.imul(B,ve)|0,w=Math.imul(B,we);var Xn=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,m=Math.imul(G,ve),a=Math.imul(G,we),a=a+Math.imul(Z,ve)|0,w=Math.imul(Z,we),m=m+Math.imul(R,ye)|0,a=a+Math.imul(R,be)|0,a=a+Math.imul(B,ye)|0,w=w+Math.imul(B,be)|0;var Yn=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,m=Math.imul(te,ve),a=Math.imul(te,we),a=a+Math.imul(re,ve)|0,w=Math.imul(re,we),m=m+Math.imul(G,ye)|0,a=a+Math.imul(G,be)|0,a=a+Math.imul(Z,ye)|0,w=w+Math.imul(Z,be)|0,m=m+Math.imul(R,_e)|0,a=a+Math.imul(R,Ee)|0,a=a+Math.imul(B,_e)|0,w=w+Math.imul(B,Ee)|0;var es=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(es>>>26)|0,es&=67108863,m=Math.imul(ne,ve),a=Math.imul(ne,we),a=a+Math.imul(se,ve)|0,w=Math.imul(se,we),m=m+Math.imul(te,ye)|0,a=a+Math.imul(te,be)|0,a=a+Math.imul(re,ye)|0,w=w+Math.imul(re,be)|0,m=m+Math.imul(G,_e)|0,a=a+Math.imul(G,Ee)|0,a=a+Math.imul(Z,_e)|0,w=w+Math.imul(Z,Ee)|0,m=m+Math.imul(R,Se)|0,a=a+Math.imul(R,Me)|0,a=a+Math.imul(B,Se)|0,w=w+Math.imul(B,Me)|0;var ts=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ts>>>26)|0,ts&=67108863,m=Math.imul(ie,ve),a=Math.imul(ie,we),a=a+Math.imul(oe,ve)|0,w=Math.imul(oe,we),m=m+Math.imul(ne,ye)|0,a=a+Math.imul(ne,be)|0,a=a+Math.imul(se,ye)|0,w=w+Math.imul(se,be)|0,m=m+Math.imul(te,_e)|0,a=a+Math.imul(te,Ee)|0,a=a+Math.imul(re,_e)|0,w=w+Math.imul(re,Ee)|0,m=m+Math.imul(G,Se)|0,a=a+Math.imul(G,Me)|0,a=a+Math.imul(Z,Se)|0,w=w+Math.imul(Z,Me)|0,m=m+Math.imul(R,ke)|0,a=a+Math.imul(R,Ce)|0,a=a+Math.imul(B,ke)|0,w=w+Math.imul(B,Ce)|0;var rs=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(rs>>>26)|0,rs&=67108863,m=Math.imul(ae,ve),a=Math.imul(ae,we),a=a+Math.imul(ce,ve)|0,w=Math.imul(ce,we),m=m+Math.imul(ie,ye)|0,a=a+Math.imul(ie,be)|0,a=a+Math.imul(oe,ye)|0,w=w+Math.imul(oe,be)|0,m=m+Math.imul(ne,_e)|0,a=a+Math.imul(ne,Ee)|0,a=a+Math.imul(se,_e)|0,w=w+Math.imul(se,Ee)|0,m=m+Math.imul(te,Se)|0,a=a+Math.imul(te,Me)|0,a=a+Math.imul(re,Se)|0,w=w+Math.imul(re,Me)|0,m=m+Math.imul(G,ke)|0,a=a+Math.imul(G,Ce)|0,a=a+Math.imul(Z,ke)|0,w=w+Math.imul(Z,Ce)|0,m=m+Math.imul(R,Re)|0,a=a+Math.imul(R,Ie)|0,a=a+Math.imul(B,Re)|0,w=w+Math.imul(B,Ie)|0;var ns=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ns>>>26)|0,ns&=67108863,m=Math.imul(le,ve),a=Math.imul(le,we),a=a+Math.imul(ue,ve)|0,w=Math.imul(ue,we),m=m+Math.imul(ae,ye)|0,a=a+Math.imul(ae,be)|0,a=a+Math.imul(ce,ye)|0,w=w+Math.imul(ce,be)|0,m=m+Math.imul(ie,_e)|0,a=a+Math.imul(ie,Ee)|0,a=a+Math.imul(oe,_e)|0,w=w+Math.imul(oe,Ee)|0,m=m+Math.imul(ne,Se)|0,a=a+Math.imul(ne,Me)|0,a=a+Math.imul(se,Se)|0,w=w+Math.imul(se,Me)|0,m=m+Math.imul(te,ke)|0,a=a+Math.imul(te,Ce)|0,a=a+Math.imul(re,ke)|0,w=w+Math.imul(re,Ce)|0,m=m+Math.imul(G,Re)|0,a=a+Math.imul(G,Ie)|0,a=a+Math.imul(Z,Re)|0,w=w+Math.imul(Z,Ie)|0,m=m+Math.imul(R,Ae)|0,a=a+Math.imul(R,Ne)|0,a=a+Math.imul(B,Ae)|0,w=w+Math.imul(B,Ne)|0;var ss=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ss>>>26)|0,ss&=67108863,m=Math.imul(de,ve),a=Math.imul(de,we),a=a+Math.imul(he,ve)|0,w=Math.imul(he,we),m=m+Math.imul(le,ye)|0,a=a+Math.imul(le,be)|0,a=a+Math.imul(ue,ye)|0,w=w+Math.imul(ue,be)|0,m=m+Math.imul(ae,_e)|0,a=a+Math.imul(ae,Ee)|0,a=a+Math.imul(ce,_e)|0,w=w+Math.imul(ce,Ee)|0,m=m+Math.imul(ie,Se)|0,a=a+Math.imul(ie,Me)|0,a=a+Math.imul(oe,Se)|0,w=w+Math.imul(oe,Me)|0,m=m+Math.imul(ne,ke)|0,a=a+Math.imul(ne,Ce)|0,a=a+Math.imul(se,ke)|0,w=w+Math.imul(se,Ce)|0,m=m+Math.imul(te,Re)|0,a=a+Math.imul(te,Ie)|0,a=a+Math.imul(re,Re)|0,w=w+Math.imul(re,Ie)|0,m=m+Math.imul(G,Ae)|0,a=a+Math.imul(G,Ne)|0,a=a+Math.imul(Z,Ae)|0,w=w+Math.imul(Z,Ne)|0,m=m+Math.imul(R,Le)|0,a=a+Math.imul(R,xe)|0,a=a+Math.imul(B,Le)|0,w=w+Math.imul(B,xe)|0;var is=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(is>>>26)|0,is&=67108863,m=Math.imul(fe,ve),a=Math.imul(fe,we),a=a+Math.imul(ge,ve)|0,w=Math.imul(ge,we),m=m+Math.imul(de,ye)|0,a=a+Math.imul(de,be)|0,a=a+Math.imul(he,ye)|0,w=w+Math.imul(he,be)|0,m=m+Math.imul(le,_e)|0,a=a+Math.imul(le,Ee)|0,a=a+Math.imul(ue,_e)|0,w=w+Math.imul(ue,Ee)|0,m=m+Math.imul(ae,Se)|0,a=a+Math.imul(ae,Me)|0,a=a+Math.imul(ce,Se)|0,w=w+Math.imul(ce,Me)|0,m=m+Math.imul(ie,ke)|0,a=a+Math.imul(ie,Ce)|0,a=a+Math.imul(oe,ke)|0,w=w+Math.imul(oe,Ce)|0,m=m+Math.imul(ne,Re)|0,a=a+Math.imul(ne,Ie)|0,a=a+Math.imul(se,Re)|0,w=w+Math.imul(se,Ie)|0,m=m+Math.imul(te,Ae)|0,a=a+Math.imul(te,Ne)|0,a=a+Math.imul(re,Ae)|0,w=w+Math.imul(re,Ne)|0,m=m+Math.imul(G,Le)|0,a=a+Math.imul(G,xe)|0,a=a+Math.imul(Z,Le)|0,w=w+Math.imul(Z,xe)|0,m=m+Math.imul(R,Te)|0,a=a+Math.imul(R,Pe)|0,a=a+Math.imul(B,Te)|0,w=w+Math.imul(B,Pe)|0;var os=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(os>>>26)|0,os&=67108863,m=Math.imul(pe,ve),a=Math.imul(pe,we),a=a+Math.imul(me,ve)|0,w=Math.imul(me,we),m=m+Math.imul(fe,ye)|0,a=a+Math.imul(fe,be)|0,a=a+Math.imul(ge,ye)|0,w=w+Math.imul(ge,be)|0,m=m+Math.imul(de,_e)|0,a=a+Math.imul(de,Ee)|0,a=a+Math.imul(he,_e)|0,w=w+Math.imul(he,Ee)|0,m=m+Math.imul(le,Se)|0,a=a+Math.imul(le,Me)|0,a=a+Math.imul(ue,Se)|0,w=w+Math.imul(ue,Me)|0,m=m+Math.imul(ae,ke)|0,a=a+Math.imul(ae,Ce)|0,a=a+Math.imul(ce,ke)|0,w=w+Math.imul(ce,Ce)|0,m=m+Math.imul(ie,Re)|0,a=a+Math.imul(ie,Ie)|0,a=a+Math.imul(oe,Re)|0,w=w+Math.imul(oe,Ie)|0,m=m+Math.imul(ne,Ae)|0,a=a+Math.imul(ne,Ne)|0,a=a+Math.imul(se,Ae)|0,w=w+Math.imul(se,Ne)|0,m=m+Math.imul(te,Le)|0,a=a+Math.imul(te,xe)|0,a=a+Math.imul(re,Le)|0,w=w+Math.imul(re,xe)|0,m=m+Math.imul(G,Te)|0,a=a+Math.imul(G,Pe)|0,a=a+Math.imul(Z,Te)|0,w=w+Math.imul(Z,Pe)|0,m=m+Math.imul(R,$e)|0,a=a+Math.imul(R,Oe)|0,a=a+Math.imul(B,$e)|0,w=w+Math.imul(B,Oe)|0;var as=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(as>>>26)|0,as&=67108863,m=Math.imul(pe,ye),a=Math.imul(pe,be),a=a+Math.imul(me,ye)|0,w=Math.imul(me,be),m=m+Math.imul(fe,_e)|0,a=a+Math.imul(fe,Ee)|0,a=a+Math.imul(ge,_e)|0,w=w+Math.imul(ge,Ee)|0,m=m+Math.imul(de,Se)|0,a=a+Math.imul(de,Me)|0,a=a+Math.imul(he,Se)|0,w=w+Math.imul(he,Me)|0,m=m+Math.imul(le,ke)|0,a=a+Math.imul(le,Ce)|0,a=a+Math.imul(ue,ke)|0,w=w+Math.imul(ue,Ce)|0,m=m+Math.imul(ae,Re)|0,a=a+Math.imul(ae,Ie)|0,a=a+Math.imul(ce,Re)|0,w=w+Math.imul(ce,Ie)|0,m=m+Math.imul(ie,Ae)|0,a=a+Math.imul(ie,Ne)|0,a=a+Math.imul(oe,Ae)|0,w=w+Math.imul(oe,Ne)|0,m=m+Math.imul(ne,Le)|0,a=a+Math.imul(ne,xe)|0,a=a+Math.imul(se,Le)|0,w=w+Math.imul(se,xe)|0,m=m+Math.imul(te,Te)|0,a=a+Math.imul(te,Pe)|0,a=a+Math.imul(re,Te)|0,w=w+Math.imul(re,Pe)|0,m=m+Math.imul(G,$e)|0,a=a+Math.imul(G,Oe)|0,a=a+Math.imul(Z,$e)|0,w=w+Math.imul(Z,Oe)|0;var cs=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(cs>>>26)|0,cs&=67108863,m=Math.imul(pe,_e),a=Math.imul(pe,Ee),a=a+Math.imul(me,_e)|0,w=Math.imul(me,Ee),m=m+Math.imul(fe,Se)|0,a=a+Math.imul(fe,Me)|0,a=a+Math.imul(ge,Se)|0,w=w+Math.imul(ge,Me)|0,m=m+Math.imul(de,ke)|0,a=a+Math.imul(de,Ce)|0,a=a+Math.imul(he,ke)|0,w=w+Math.imul(he,Ce)|0,m=m+Math.imul(le,Re)|0,a=a+Math.imul(le,Ie)|0,a=a+Math.imul(ue,Re)|0,w=w+Math.imul(ue,Ie)|0,m=m+Math.imul(ae,Ae)|0,a=a+Math.imul(ae,Ne)|0,a=a+Math.imul(ce,Ae)|0,w=w+Math.imul(ce,Ne)|0,m=m+Math.imul(ie,Le)|0,a=a+Math.imul(ie,xe)|0,a=a+Math.imul(oe,Le)|0,w=w+Math.imul(oe,xe)|0,m=m+Math.imul(ne,Te)|0,a=a+Math.imul(ne,Pe)|0,a=a+Math.imul(se,Te)|0,w=w+Math.imul(se,Pe)|0,m=m+Math.imul(te,$e)|0,a=a+Math.imul(te,Oe)|0,a=a+Math.imul(re,$e)|0,w=w+Math.imul(re,Oe)|0;var ls=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ls>>>26)|0,ls&=67108863,m=Math.imul(pe,Se),a=Math.imul(pe,Me),a=a+Math.imul(me,Se)|0,w=Math.imul(me,Me),m=m+Math.imul(fe,ke)|0,a=a+Math.imul(fe,Ce)|0,a=a+Math.imul(ge,ke)|0,w=w+Math.imul(ge,Ce)|0,m=m+Math.imul(de,Re)|0,a=a+Math.imul(de,Ie)|0,a=a+Math.imul(he,Re)|0,w=w+Math.imul(he,Ie)|0,m=m+Math.imul(le,Ae)|0,a=a+Math.imul(le,Ne)|0,a=a+Math.imul(ue,Ae)|0,w=w+Math.imul(ue,Ne)|0,m=m+Math.imul(ae,Le)|0,a=a+Math.imul(ae,xe)|0,a=a+Math.imul(ce,Le)|0,w=w+Math.imul(ce,xe)|0,m=m+Math.imul(ie,Te)|0,a=a+Math.imul(ie,Pe)|0,a=a+Math.imul(oe,Te)|0,w=w+Math.imul(oe,Pe)|0,m=m+Math.imul(ne,$e)|0,a=a+Math.imul(ne,Oe)|0,a=a+Math.imul(se,$e)|0,w=w+Math.imul(se,Oe)|0;var us=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(us>>>26)|0,us&=67108863,m=Math.imul(pe,ke),a=Math.imul(pe,Ce),a=a+Math.imul(me,ke)|0,w=Math.imul(me,Ce),m=m+Math.imul(fe,Re)|0,a=a+Math.imul(fe,Ie)|0,a=a+Math.imul(ge,Re)|0,w=w+Math.imul(ge,Ie)|0,m=m+Math.imul(de,Ae)|0,a=a+Math.imul(de,Ne)|0,a=a+Math.imul(he,Ae)|0,w=w+Math.imul(he,Ne)|0,m=m+Math.imul(le,Le)|0,a=a+Math.imul(le,xe)|0,a=a+Math.imul(ue,Le)|0,w=w+Math.imul(ue,xe)|0,m=m+Math.imul(ae,Te)|0,a=a+Math.imul(ae,Pe)|0,a=a+Math.imul(ce,Te)|0,w=w+Math.imul(ce,Pe)|0,m=m+Math.imul(ie,$e)|0,a=a+Math.imul(ie,Oe)|0,a=a+Math.imul(oe,$e)|0,w=w+Math.imul(oe,Oe)|0;var ds=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ds>>>26)|0,ds&=67108863,m=Math.imul(pe,Re),a=Math.imul(pe,Ie),a=a+Math.imul(me,Re)|0,w=Math.imul(me,Ie),m=m+Math.imul(fe,Ae)|0,a=a+Math.imul(fe,Ne)|0,a=a+Math.imul(ge,Ae)|0,w=w+Math.imul(ge,Ne)|0,m=m+Math.imul(de,Le)|0,a=a+Math.imul(de,xe)|0,a=a+Math.imul(he,Le)|0,w=w+Math.imul(he,xe)|0,m=m+Math.imul(le,Te)|0,a=a+Math.imul(le,Pe)|0,a=a+Math.imul(ue,Te)|0,w=w+Math.imul(ue,Pe)|0,m=m+Math.imul(ae,$e)|0,a=a+Math.imul(ae,Oe)|0,a=a+Math.imul(ce,$e)|0,w=w+Math.imul(ce,Oe)|0;var hs=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(hs>>>26)|0,hs&=67108863,m=Math.imul(pe,Ae),a=Math.imul(pe,Ne),a=a+Math.imul(me,Ae)|0,w=Math.imul(me,Ne),m=m+Math.imul(fe,Le)|0,a=a+Math.imul(fe,xe)|0,a=a+Math.imul(ge,Le)|0,w=w+Math.imul(ge,xe)|0,m=m+Math.imul(de,Te)|0,a=a+Math.imul(de,Pe)|0,a=a+Math.imul(he,Te)|0,w=w+Math.imul(he,Pe)|0,m=m+Math.imul(le,$e)|0,a=a+Math.imul(le,Oe)|0,a=a+Math.imul(ue,$e)|0,w=w+Math.imul(ue,Oe)|0;var fs=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(fs>>>26)|0,fs&=67108863,m=Math.imul(pe,Le),a=Math.imul(pe,xe),a=a+Math.imul(me,Le)|0,w=Math.imul(me,xe),m=m+Math.imul(fe,Te)|0,a=a+Math.imul(fe,Pe)|0,a=a+Math.imul(ge,Te)|0,w=w+Math.imul(ge,Pe)|0,m=m+Math.imul(de,$e)|0,a=a+Math.imul(de,Oe)|0,a=a+Math.imul(he,$e)|0,w=w+Math.imul(he,Oe)|0;var gs=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(gs>>>26)|0,gs&=67108863,m=Math.imul(pe,Te),a=Math.imul(pe,Pe),a=a+Math.imul(me,Te)|0,w=Math.imul(me,Pe),m=m+Math.imul(fe,$e)|0,a=a+Math.imul(fe,Oe)|0,a=a+Math.imul(ge,$e)|0,w=w+Math.imul(ge,Oe)|0;var ps=(S+m|0)+((a&8191)<<13)|0;S=(w+(a>>>13)|0)+(ps>>>26)|0,ps&=67108863,m=Math.imul(pe,$e),a=Math.imul(pe,Oe),a=a+Math.imul(me,$e)|0,w=Math.imul(me,Oe);var ms=(S+m|0)+((a&8191)<<13)|0;return S=(w+(a>>>13)|0)+(ms>>>26)|0,ms&=67108863,y[0]=Xn,y[1]=Yn,y[2]=es,y[3]=ts,y[4]=rs,y[5]=ns,y[6]=ss,y[7]=is,y[8]=os,y[9]=as,y[10]=cs,y[11]=ls,y[12]=us,y[13]=ds,y[14]=hs,y[15]=fs,y[16]=gs,y[17]=ps,y[18]=ms,S!==0&&(y[19]=S,f.length++),f};Math.imul||(T=$);function C(_,o,l){l.negative=o.negative^_.negative,l.length=_.length+o.length;for(var f=0,g=0,v=0;v>>26)|0,g+=y>>>26,y&=67108863}l.words[v]=S,f=y,y=g}return f!==0?l.words[v]=f:l.length--,l._strip()}function H(_,o,l){return C(_,o,l)}s.prototype.mulTo=function(o,l){var f,g=this.length+o.length;return this.length===10&&o.length===10?f=T(this,o,l):g<63?f=$(this,o,l):g<1024?f=C(this,o,l):f=H(this,o,l),f},s.prototype.mul=function(o){var l=new s(null);return l.words=new Array(this.length+o.length),this.mulTo(o,l)},s.prototype.mulf=function(o){var l=new s(null);return l.words=new Array(this.length+o.length),H(this,o,l)},s.prototype.imul=function(o){return this.clone().mulTo(o,this)},s.prototype.imuln=function(o){var l=o<0;l&&(o=-o),n(typeof o=="number"),n(o<67108864);for(var f=0,g=0;g>=26,f+=v/67108864|0,f+=y>>>26,this.words[g]=y&67108863}return f!==0&&(this.words[g]=f,this.length++),l?this.ineg():this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var l=L(o);if(l.length===0)return new s(1);for(var f=this,g=0;g=0);var l=o%26,f=(o-l)/26,g=67108863>>>26-l<<26-l,v;if(l!==0){var y=0;for(v=0;v>>26-l}y&&(this.words[v]=y,this.length++)}if(f!==0){for(v=this.length-1;v>=0;v--)this.words[v+f]=this.words[v];for(v=0;v=0);var g;l?g=(l-l%26)/26:g=0;var v=o%26,y=Math.min((o-v)/26,this.length),S=67108863^67108863>>>v<y)for(this.length-=y,a=0;a=0&&(w!==0||a>=g);a--){var x=this.words[a]|0;this.words[a]=w<<26-v|x>>>v,w=x&S}return m&&w!==0&&(m.words[m.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(o,l,f){return n(this.negative===0),this.iushrn(o,l,f)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){n(typeof o=="number"&&o>=0);var l=o%26,f=(o-l)/26,g=1<=0);var l=o%26,f=(o-l)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(l!==0&&f++,this.length=Math.min(f,this.length),l!==0){var g=67108863^67108863>>>l<=67108864;l++)this.words[l]-=67108864,l===this.length-1?this.words[l+1]=1:this.words[l+1]++;return this.length=Math.max(this.length,l+1),this},s.prototype.isubn=function(o){if(n(typeof o=="number"),n(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var l=0;l>26)-(m/67108864|0),this.words[v+f]=y&67108863}for(;v>26,this.words[v+f]=y&67108863;if(S===0)return this._strip();for(n(S===-1),S=0,v=0;v>26,this.words[v]=y&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(o,l){var f=this.length-o.length,g=this.clone(),v=o,y=v.words[v.length-1]|0,S=this._countBits(y);f=26-S,f!==0&&(v=v.ushln(f),g.iushln(f),y=v.words[v.length-1]|0);var m=g.length-v.length,a;if(l!=="mod"){a=new s(null),a.length=m+1,a.words=new Array(a.length);for(var w=0;w=0;R--){var B=(g.words[v.length+R]|0)*67108864+(g.words[v.length+R-1]|0);for(B=Math.min(B/y|0,67108863),g._ishlnsubmul(v,B,R);g.negative!==0;)B--,g.negative=0,g._ishlnsubmul(v,1,R),g.isZero()||(g.negative^=1);a&&(a.words[R]=B)}return a&&a._strip(),g._strip(),l!=="div"&&f!==0&&g.iushrn(f),{div:a||null,mod:g}},s.prototype.divmod=function(o,l,f){if(n(!o.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var g,v,y;return this.negative!==0&&o.negative===0?(y=this.neg().divmod(o,l),l!=="mod"&&(g=y.div.neg()),l!=="div"&&(v=y.mod.neg(),f&&v.negative!==0&&v.iadd(o)),{div:g,mod:v}):this.negative===0&&o.negative!==0?(y=this.divmod(o.neg(),l),l!=="mod"&&(g=y.div.neg()),{div:g,mod:y.mod}):this.negative&o.negative?(y=this.neg().divmod(o.neg(),l),l!=="div"&&(v=y.mod.neg(),f&&v.negative!==0&&v.isub(o)),{div:y.div,mod:v}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:o.length===1?l==="div"?{div:this.divn(o.words[0]),mod:null}:l==="mod"?{div:null,mod:new s(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modrn(o.words[0]))}:this._wordDiv(o,l)},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var l=this.divmod(o);if(l.mod.isZero())return l.div;var f=l.div.negative!==0?l.mod.isub(o):l.mod,g=o.ushrn(1),v=o.andln(1),y=f.cmp(g);return y<0||v===1&&y===0?l.div:l.div.negative!==0?l.div.isubn(1):l.div.iaddn(1)},s.prototype.modrn=function(o){var l=o<0;l&&(o=-o),n(o<=67108863);for(var f=(1<<26)%o,g=0,v=this.length-1;v>=0;v--)g=(f*g+(this.words[v]|0))%o;return l?-g:g},s.prototype.modn=function(o){return this.modrn(o)},s.prototype.idivn=function(o){var l=o<0;l&&(o=-o),n(o<=67108863);for(var f=0,g=this.length-1;g>=0;g--){var v=(this.words[g]|0)+f*67108864;this.words[g]=v/o|0,f=v%o}return this._strip(),l?this.ineg():this},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){n(o.negative===0),n(!o.isZero());var l=this,f=o.clone();l.negative!==0?l=l.umod(o):l=l.clone();for(var g=new s(1),v=new s(0),y=new s(0),S=new s(1),m=0;l.isEven()&&f.isEven();)l.iushrn(1),f.iushrn(1),++m;for(var a=f.clone(),w=l.clone();!l.isZero();){for(var x=0,R=1;!(l.words[0]&R)&&x<26;++x,R<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(g.isOdd()||v.isOdd())&&(g.iadd(a),v.isub(w)),g.iushrn(1),v.iushrn(1);for(var B=0,qe=1;!(f.words[0]&qe)&&B<26;++B,qe<<=1);if(B>0)for(f.iushrn(B);B-- >0;)(y.isOdd()||S.isOdd())&&(y.iadd(a),S.isub(w)),y.iushrn(1),S.iushrn(1);l.cmp(f)>=0?(l.isub(f),g.isub(y),v.isub(S)):(f.isub(l),y.isub(g),S.isub(v))}return{a:y,b:S,gcd:f.iushln(m)}},s.prototype._invmp=function(o){n(o.negative===0),n(!o.isZero());var l=this,f=o.clone();l.negative!==0?l=l.umod(o):l=l.clone();for(var g=new s(1),v=new s(0),y=f.clone();l.cmpn(1)>0&&f.cmpn(1)>0;){for(var S=0,m=1;!(l.words[0]&m)&&S<26;++S,m<<=1);if(S>0)for(l.iushrn(S);S-- >0;)g.isOdd()&&g.iadd(y),g.iushrn(1);for(var a=0,w=1;!(f.words[0]&w)&&a<26;++a,w<<=1);if(a>0)for(f.iushrn(a);a-- >0;)v.isOdd()&&v.iadd(y),v.iushrn(1);l.cmp(f)>=0?(l.isub(f),g.isub(v)):(f.isub(l),v.isub(g))}var x;return l.cmpn(1)===0?x=g:x=v,x.cmpn(0)<0&&x.iadd(o),x},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var l=this.clone(),f=o.clone();l.negative=0,f.negative=0;for(var g=0;l.isEven()&&f.isEven();g++)l.iushrn(1),f.iushrn(1);do{for(;l.isEven();)l.iushrn(1);for(;f.isEven();)f.iushrn(1);var v=l.cmp(f);if(v<0){var y=l;l=f,f=y}else if(v===0||f.cmpn(1)===0)break;l.isub(f)}while(!0);return f.iushln(g)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){n(typeof o=="number");var l=o%26,f=(o-l)/26,g=1<>>26,S&=67108863,this.words[y]=S}return v!==0&&(this.words[y]=v,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(o){var l=o<0;if(this.negative!==0&&!l)return-1;if(this.negative===0&&l)return 1;this._strip();var f;if(this.length>1)f=1;else{l&&(o=-o),n(o<=67108863,"Number is too big");var g=this.words[0]|0;f=g===o?0:go.length)return 1;if(this.length=0;f--){var g=this.words[f]|0,v=o.words[f]|0;if(g!==v){gv&&(l=1);break}}return l},s.prototype.gtn=function(o){return this.cmpn(o)===1},s.prototype.gt=function(o){return this.cmp(o)===1},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return this.cmpn(o)===-1},s.prototype.lt=function(o){return this.cmp(o)===-1},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return this.cmpn(o)===0},s.prototype.eq=function(o){return this.cmp(o)===0},s.red=function(o){return new U(o)},s.prototype.toRed=function(o){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return n(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},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(o){return n(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var I={k256:null,p224:null,p192:null,p25519:null};function P(_,o){this.name=_,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},P.prototype.ireduce=function(o){var l=o,f;do this.split(l,this.tmp),l=this.imulK(l),l=l.iadd(this.tmp),f=l.bitLength();while(f>this.n);var g=f0?l.isub(this.p):l.strip!==void 0?l.strip():l._strip(),l},P.prototype.split=function(o,l){o.iushrn(this.n,0,l)},P.prototype.imulK=function(o){return o.imul(this.k)};function q(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(q,P),q.prototype.split=function(o,l){for(var f=4194303,g=Math.min(o.length,9),v=0;v>>22,y=S}y>>>=22,o.words[v-10]=y,y===0&&o.length>10?o.length-=10:o.length-=9},q.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var l=0,f=0;f>>=26,o.words[f]=v,l=g}return l!==0&&(o.words[o.length++]=l),o},s._prime=function(o){if(I[o])return I[o];var l;if(o==="k256")l=new q;else if(o==="p224")l=new Fe;else if(o==="p192")l=new ze;else if(o==="p25519")l=new Y;else throw new Error("Unknown prime "+o);return I[o]=l,l};function U(_){if(typeof _=="string"){var o=s._prime(_);this.m=o.p,this.prime=o}else n(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}U.prototype._verify1=function(o){n(o.negative===0,"red works only with positives"),n(o.red,"red works only with red numbers")},U.prototype._verify2=function(o,l){n((o.negative|l.negative)===0,"red works only with positives"),n(o.red&&o.red===l.red,"red works only with red numbers")},U.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(p(o,o.umod(this.m)._forceRed(this)),o)},U.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},U.prototype.add=function(o,l){this._verify2(o,l);var f=o.add(l);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},U.prototype.iadd=function(o,l){this._verify2(o,l);var f=o.iadd(l);return f.cmp(this.m)>=0&&f.isub(this.m),f},U.prototype.sub=function(o,l){this._verify2(o,l);var f=o.sub(l);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},U.prototype.isub=function(o,l){this._verify2(o,l);var f=o.isub(l);return f.cmpn(0)<0&&f.iadd(this.m),f},U.prototype.shl=function(o,l){return this._verify1(o),this.imod(o.ushln(l))},U.prototype.imul=function(o,l){return this._verify2(o,l),this.imod(o.imul(l))},U.prototype.mul=function(o,l){return this._verify2(o,l),this.imod(o.mul(l))},U.prototype.isqr=function(o){return this.imul(o,o.clone())},U.prototype.sqr=function(o){return this.mul(o,o)},U.prototype.sqrt=function(o){if(o.isZero())return o.clone();var l=this.m.andln(3);if(n(l%2===1),l===3){var f=this.m.add(new s(1)).iushrn(2);return this.pow(o,f)}for(var g=this.m.subn(1),v=0;!g.isZero()&&g.andln(1)===0;)v++,g.iushrn(1);n(!g.isZero());var y=new s(1).toRed(this),S=y.redNeg(),m=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new s(2*a*a).toRed(this);this.pow(a,m).cmp(S)!==0;)a.redIAdd(S);for(var w=this.pow(a,g),x=this.pow(o,g.addn(1).iushrn(1)),R=this.pow(o,g),B=v;R.cmp(y)!==0;){for(var qe=R,G=0;qe.cmp(y)!==0;G++)qe=qe.redSqr();n(G=0;v--){for(var w=l.words[v],x=a-1;x>=0;x--){var R=w>>x&1;if(y!==g[0]&&(y=this.sqr(y)),R===0&&S===0){m=0;continue}S<<=1,S|=R,m++,!(m!==f&&(v!==0||x!==0))&&(y=this.mul(y,g[S]),m=0,S=0)}a=26}return y},U.prototype.convertTo=function(o){var l=o.umod(this.m);return l===o?l.clone():l},U.prototype.convertFrom=function(o){var l=o.clone();return l.red=null,l},s.mont=function(o){return new J(o)};function J(_){U.call(this,_),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(J,U),J.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},J.prototype.convertFrom=function(o){var l=this.imod(o.mul(this.rinv));return l.red=null,l},J.prototype.imul=function(o,l){if(o.isZero()||l.isZero())return o.words[0]=0,o.length=1,o;var f=o.imul(l),g=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(g).iushrn(this.shift),y=v;return v.cmp(this.m)>=0?y=v.isub(this.m):v.cmpn(0)<0&&(y=v.iadd(this.m)),y._forceRed(this)},J.prototype.mul=function(o,l){if(o.isZero()||l.isZero())return new s(0)._forceRed(this);var f=o.mul(l),g=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=f.isub(g).iushrn(this.shift),y=v;return v.cmp(this.m)>=0?y=v.isub(this.m):v.cmpn(0)<0&&(y=v.iadd(this.m)),y._forceRed(this)},J.prototype.invm=function(o){var l=this.imod(o._invmp(this.m).mul(this.r2));return l._forceRed(this)}})(t,O)})(Vs);var un=Vs.exports,Mr={},St={};Object.defineProperty(St,"__esModule",{value:!0});St.errorValues=St.standardErrorCodes=void 0;St.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};St.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var dn={},hn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.getErrorCode=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=St,r="Unspecified error message.";t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(E,M=r){if(E&&Number.isInteger(E)){const k=E.toString();if(p(e.errorValues,k))return e.errorValues[k].message;if(h(E))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return M}t.getMessageFromCode=n;function i(E){if(!Number.isInteger(E))return!1;const M=E.toString();return!!(e.errorValues[M]||h(E))}t.isValidCode=i;function s(E){var M;if(typeof E=="number")return E;if(c(E))return(M=E.code)!==null&&M!==void 0?M:E.errorCode}t.getErrorCode=s;function c(E){return typeof E=="object"&&E!==null&&(typeof E.code=="number"||typeof E.errorCode=="number")}function u(E,{shouldIncludeStack:M=!1}={}){const k={};if(E&&typeof E=="object"&&!Array.isArray(E)&&p(E,"code")&&i(E.code)){const N=E;k.code=N.code,N.message&&typeof N.message=="string"?(k.message=N.message,p(N,"data")&&(k.data=N.data)):(k.message=n(k.code),k.data={originalError:d(E)})}else k.code=e.standardErrorCodes.rpc.internal,k.message=b(E,"message")?E.message:r,k.data={originalError:d(E)};return M&&(k.stack=b(E,"stack")?E.stack:void 0),k}t.serialize=u;function h(E){return E>=-32099&&E<=-32e3}function d(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function p(E,M){return Object.prototype.hasOwnProperty.call(E,M)}function b(E,M){return typeof E=="object"&&E!==null&&M in E&&typeof E[M]=="string"}})(hn);Object.defineProperty(dn,"__esModule",{value:!0});dn.standardErrors=void 0;const Ue=St,ia=hn;dn.standardErrors={rpc:{parse:t=>rt(Ue.standardErrorCodes.rpc.parse,t),invalidRequest:t=>rt(Ue.standardErrorCodes.rpc.invalidRequest,t),invalidParams:t=>rt(Ue.standardErrorCodes.rpc.invalidParams,t),methodNotFound:t=>rt(Ue.standardErrorCodes.rpc.methodNotFound,t),internal:t=>rt(Ue.standardErrorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return rt(e,t)},invalidInput:t=>rt(Ue.standardErrorCodes.rpc.invalidInput,t),resourceNotFound:t=>rt(Ue.standardErrorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>rt(Ue.standardErrorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>rt(Ue.standardErrorCodes.rpc.transactionRejected,t),methodNotSupported:t=>rt(Ue.standardErrorCodes.rpc.methodNotSupported,t),limitExceeded:t=>rt(Ue.standardErrorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Wt(Ue.standardErrorCodes.provider.userRejectedRequest,t),unauthorized:t=>Wt(Ue.standardErrorCodes.provider.unauthorized,t),unsupportedMethod:t=>Wt(Ue.standardErrorCodes.provider.unsupportedMethod,t),disconnected:t=>Wt(Ue.standardErrorCodes.provider.disconnected,t),chainDisconnected:t=>Wt(Ue.standardErrorCodes.provider.chainDisconnected,t),unsupportedChain:t=>Wt(Ue.standardErrorCodes.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ca(e,r,n)}}};function rt(t,e){const[r,n]=oa(e);return new aa(t,r||(0,ia.getMessageFromCode)(t),n)}function Wt(t,e){const[r,n]=oa(e);return new ca(t,r||(0,ia.getMessageFromCode)(t),n)}function oa(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}let aa=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},ca=class extends aa{constructor(e,r,n){if(!jc(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};function jc(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}var fn={},cr={};Object.defineProperty(cr,"__esModule",{value:!0});cr.isErrorResponse=void 0;function Hc(t){return t.errorMessage!==void 0}cr.isErrorResponse=Hc;var lr={};Object.defineProperty(lr,"__esModule",{value:!0});lr.LIB_VERSION=void 0;lr.LIB_VERSION="3.9.3";Object.defineProperty(fn,"__esModule",{value:!0});fn.serializeError=void 0;const Uc=cr,Vc=lr,Wc=St,zc=hn;function qc(t,e){const r=(0,zc.serialize)(Jc(t),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Vc.LIB_VERSION),n.searchParams.set("code",r.code.toString());const i=Gc(r.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}fn.serializeError=qc;function Jc(t){return typeof t=="string"?{message:t,code:Wc.standardErrorCodes.rpc.internal}:(0,Uc.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method}}):t}function Gc(t,e){const r=t==null?void 0:t.method;if(r)return r;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=t.standardErrorCodes=t.serializeError=t.getMessageFromCode=t.getErrorCode=void 0;const e=St;Object.defineProperty(t,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});const r=dn;Object.defineProperty(t,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=fn;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=hn;Object.defineProperty(t,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(Mr);var De={};Object.defineProperty(De,"__esModule",{value:!0});De.ProviderType=De.RegExpString=De.IntNumber=De.BigIntString=De.AddressString=De.HexString=De.OpaqueType=void 0;function kr(){return t=>t}De.OpaqueType=kr;De.HexString=kr();De.AddressString=kr();De.BigIntString=kr();function Zc(t){return Math.floor(t)}De.IntNumber=Zc;De.RegExpString=kr();var Wi;(function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""})(Wi||(De.ProviderType=Wi={}));var Qc=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A,"__esModule",{value:!0});A.isMobileWeb=A.getLocation=A.isInIFrame=A.createQrUrl=A.getFavicon=A.range=A.isBigNumber=A.ensureParsedJSONObject=A.ensureBN=A.ensureRegExpString=A.ensureIntNumber=A.ensureBuffer=A.ensureAddressString=A.ensureEvenLengthHexString=A.ensureHexString=A.isHexString=A.prepend0x=A.strip0x=A.has0xPrefix=A.hexStringFromIntNumber=A.intNumberFromHexString=A.bigIntStringFromBN=A.hexStringFromBuffer=A.hexStringToUint8Array=A.uint8ArrayToHex=A.randomBytesHex=void 0;const Ct=Qc(un),Ht=Mr,ot=De,la=/^[0-9]*$/,ua=/^[a-f0-9]*$/;function Kc(t){return da(crypto.getRandomValues(new Uint8Array(t)))}A.randomBytesHex=Kc;function da(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}A.uint8ArrayToHex=da;function Xc(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}A.hexStringToUint8Array=Xc;function Yc(t,e=!1){const r=t.toString("hex");return(0,ot.HexString)(e?`0x${r}`:r)}A.hexStringFromBuffer=Yc;function el(t){return(0,ot.BigIntString)(t.toString(10))}A.bigIntStringFromBN=el;function tl(t){return(0,ot.IntNumber)(new Ct.default(Rr(t,!1),16).toNumber())}A.intNumberFromHexString=tl;function rl(t){return(0,ot.HexString)(`0x${new Ct.default(t).toString(16)}`)}A.hexStringFromIntNumber=rl;function Ws(t){return t.startsWith("0x")||t.startsWith("0X")}A.has0xPrefix=Ws;function gn(t){return Ws(t)?t.slice(2):t}A.strip0x=gn;function ha(t){return Ws(t)?`0x${t.slice(2)}`:`0x${t}`}A.prepend0x=ha;function Cr(t){if(typeof t!="string")return!1;const e=gn(t).toLowerCase();return ua.test(e)}A.isHexString=Cr;function fa(t,e=!1){if(typeof t=="string"){const r=gn(t).toLowerCase();if(ua.test(r))return(0,ot.HexString)(e?`0x${r}`:r)}throw Ht.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}A.ensureHexString=fa;function Rr(t,e=!1){let r=fa(t,!1);return r.length%2===1&&(r=(0,ot.HexString)(`0${r}`)),e?(0,ot.HexString)(`0x${r}`):r}A.ensureEvenLengthHexString=Rr;function nl(t){if(typeof t=="string"){const e=gn(t).toLowerCase();if(Cr(e)&&e.length===40)return(0,ot.AddressString)(ha(e))}throw Ht.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}A.ensureAddressString=nl;function sl(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string"){if(Cr(t)){const e=Rr(t,!1);return Buffer.from(e,"hex")}return Buffer.from(t,"utf8")}throw Ht.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}A.ensureBuffer=sl;function ga(t){if(typeof t=="number"&&Number.isInteger(t))return(0,ot.IntNumber)(t);if(typeof t=="string"){if(la.test(t))return(0,ot.IntNumber)(Number(t));if(Cr(t))return(0,ot.IntNumber)(new Ct.default(Rr(t,!1),16).toNumber())}throw Ht.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}A.ensureIntNumber=ga;function il(t){if(t instanceof RegExp)return(0,ot.RegExpString)(t.toString());throw Ht.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}A.ensureRegExpString=il;function ol(t){if(t!==null&&(Ct.default.isBN(t)||pa(t)))return new Ct.default(t.toString(10),10);if(typeof t=="number")return new Ct.default(ga(t));if(typeof t=="string"){if(la.test(t))return new Ct.default(t,10);if(Cr(t))return new Ct.default(Rr(t,!1),16)}throw Ht.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}A.ensureBN=ol;function al(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Ht.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}A.ensureParsedJSONObject=al;function pa(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}A.isBigNumber=pa;function cl(t,e){return Array.from({length:e-t},(r,n)=>t+n)}A.range=cl;function ll(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}A.getFavicon=ll;function ul(t,e,r,n,i,s){const c=n?"parent-id":"id",u=new URLSearchParams({[c]:t,secret:e,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${u}`}A.createQrUrl=ul;function ma(){try{return window.frameElement!==null}catch{return!1}}A.isInIFrame=ma;function dl(){try{return ma()&&window.top?window.top.location:window.location}catch{return window.location}}A.getLocation=dl;function hl(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window==null?void 0:window.navigator)===null||t===void 0?void 0:t.userAgent)}A.isMobileWeb=hl;var pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.ScopedLocalStorage=void 0;class fl{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}pn.ScopedLocalStorage=fl;var rr={},Ir={},Ar={},ur={};Object.defineProperty(ur,"__esModule",{value:!0});ur.EVENTS=void 0;ur.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var it={};Object.defineProperty(it,"__esModule",{value:!0});it.RelayAbstract=it.APP_VERSION_KEY=it.LOCAL_STORAGE_ADDRESSES_KEY=it.WALLET_USER_NAME_KEY=void 0;const zi=Mr;it.WALLET_USER_NAME_KEY="walletUsername";it.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";it.APP_VERSION_KEY="AppVersion";class gl{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw zi.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,zi.serializeError)(s,e.method);return i})}}it.RelayAbstract=gl;var dr={};Object.defineProperty(dr,"__esModule",{value:!0});dr.Session=void 0;const qi=Bc,Ji=A,Gi="session:id",Zi="session:secret",Qi="session:linked";class zs{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Ji.randomBytesHex)(16),this._secret=n||(0,Ji.randomBytesHex)(32),this._key=new qi.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Gi),n=e.getItem(Qi),i=e.getItem(Zi);return r&&i?new zs(e,r,i,n==="1"):null}static hash(e){return new qi.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Gi,this._id),this._storage.setItem(Zi,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Qi,this._linked?"1":"0")}}dr.Session=zs;var mn={},vn={};Object.defineProperty(vn,"__esModule",{value:!0});vn.Cipher=void 0;const Wr=A;class pl{constructor(e){this.secret=e}async encrypt(e){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,Wr.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,c=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(e)),u=16,h=c.slice(c.byteLength-u),d=c.slice(0,c.byteLength-u),p=new Uint8Array(h),b=new Uint8Array(d),E=new Uint8Array([...n,...p,...b]);return(0,Wr.uint8ArrayToHex)(E)}async decrypt(e){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,Wr.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),c=(0,Wr.hexStringToUint8Array)(e),u=c.slice(0,12),h=c.slice(12,28),d=c.slice(28),p=new Uint8Array([...d,...h]),b={name:"AES-GCM",iv:new Uint8Array(u)};try{const E=await window.crypto.subtle.decrypt(b,s,p),M=new TextDecoder;n(M.decode(E))}catch(E){i(E)}})()})}}vn.Cipher=pl;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});wn.WalletLinkHTTP=void 0;class ml{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;const i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var e;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(e=n==null?void 0:n.filter(c=>c.event==="Web3Response").map(c=>({type:"Event",sessionId:this.sessionId,eventId:c.id,event:c.event,data:c.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${r.status}`)}}wn.WalletLinkHTTP=ml;var nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.WalletLinkWebSocket=nr.ConnectionState=void 0;var Kt;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})(Kt||(nr.ConnectionState=Kt={}));class vl{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){r(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Kt.CONNECTING),i.onclose=s=>{var c;this.clearWebSocket(),r(new Error(`websocket error ${s.code}: ${s.reason}`)),(c=this.connectionStateListener)===null||c===void 0||c.call(this,Kt.DISCONNECTED)},i.onopen=s=>{var c;e(),(c=this.connectionStateListener)===null||c===void 0||c.call(this,Kt.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(h=>this.sendData(h)),this.pendingData=[])},i.onmessage=s=>{var c,u;if(s.data==="h")(c=this.incomingDataListener)===null||c===void 0||c.call(this,{type:"Heartbeat"});else try{const h=JSON.parse(s.data);(u=this.incomingDataListener)===null||u===void 0||u.call(this,h)}catch{}}})}disconnect(){var e;const{webSocket:r}=this;if(r){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Kt.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){const{webSocket:r}=this;if(!r){this.pendingData.push(e),this.connect();return}r.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}nr.WalletLinkWebSocket=vl;Object.defineProperty(mn,"__esModule",{value:!0});mn.WalletLinkConnection=void 0;const zt=De,wl=vn,ht=ur,Ki=it,qt=dr,yl=wn,zr=nr,Xi=1e4,bl=6e4;class _l{constructor({session:e,linkAPIUrl:r,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,zt.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=u=>{if(!u)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",d=>u.JsonRpcUrl&&this.handleChainUpdated(d,u.JsonRpcUrl)]]).forEach((d,p)=>{const b=u[p];b!==void 0&&d(b)})},this.handleDestroyed=u=>{var h,d;u==="1"&&((h=this.listener)===null||h===void 0||h.resetAndReload(),(d=this.diagnostic)===null||d===void 0||d.log(ht.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:qt.Session.hash(this.session.id)}))},this.handleAccountUpdated=async u=>{var h,d;try{const p=await this.cipher.decrypt(u);(h=this.listener)===null||h===void 0||h.accountUpdated(p)}catch{(d=this.diagnostic)===null||d===void 0||d.log(ht.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(u,h)=>{var d,p;try{const b=await this.cipher.decrypt(h);(d=this.listener)===null||d===void 0||d.metadataUpdated(u,b)}catch{(p=this.diagnostic)===null||p===void 0||p.log(ht.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:u})}},this.handleWalletUsernameUpdated=async u=>{this.handleMetadataUpdated(Ki.WALLET_USER_NAME_KEY,u)},this.handleAppVersionUpdated=async u=>{this.handleMetadataUpdated(Ki.APP_VERSION_KEY,u)},this.handleChainUpdated=async(u,h)=>{var d,p;try{const b=await this.cipher.decrypt(u),E=await this.cipher.decrypt(h);(d=this.listener)===null||d===void 0||d.chainUpdated(b,E)}catch{(p=this.diagnostic)===null||p===void 0||p.log(ht.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=e,this.cipher=new wl.Cipher(e.secret),this.diagnostic=i,this.listener=n;const c=new zr.WalletLinkWebSocket(`${r}/rpc`,s);c.setConnectionStateListener(async u=>{var h;(h=this.diagnostic)===null||h===void 0||h.log(ht.EVENTS.CONNECTED_STATE_CHANGE,{state:u,sessionIdHash:qt.Session.hash(e.id)});let d=!1;switch(u){case zr.ConnectionState.DISCONNECTED:if(!this.destroyed){const p=async()=>{await new Promise(b=>setTimeout(b,5e3)),this.destroyed||c.connect().catch(()=>{p()})};p()}break;case zr.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),d=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Xi),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case zr.ConnectionState.CONNECTING:break}this.connected!==d&&(this.connected=d)}),c.setIncomingDataListener(u=>{var h,d,p;switch(u.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const b=u.type==="IsLinkedOK"?u.linked:void 0;(h=this.diagnostic)===null||h===void 0||h.log(ht.EVENTS.LINKED,{sessionIdHash:qt.Session.hash(e.id),linked:b,type:u.type,onlineGuests:u.onlineGuests}),this.linked=b||u.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(d=this.diagnostic)===null||d===void 0||d.log(ht.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:qt.Session.hash(e.id),metadata_keys:u&&u.metadata?Object.keys(u.metadata):void 0}),this.handleSessionMetadataUpdated(u.metadata);break}case"Event":{this.handleIncomingEvent(u);break}}u.id!==void 0&&((p=this.requestResolutions.get(u.id))===null||p===void 0||p(u))}),this.ws=c,this.http=new yl.WalletLinkHTTP(r,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(ht.EVENTS.STARTED_CONNECTING,{sessionIdHash:qt.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(ht.EVENTS.DISCONNECTED,{sessionIdHash:qt.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var r,n;this._connected=e,e&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(r=>{this.connected?e().then(r):this.onceConnected=()=>{e().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(e){var r,n;if(!(e.type!=="Event"||e.event!=="Web3Response"))try{const i=await this.cipher.decrypt(e.data),s=JSON.parse(i);if(s.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(ht.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(e,r){const n={type:"SetSessionConfig",id:(0,zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,r,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const c=await this.makeRequest(s);if(c.type==="Fail")throw new Error(c.error||"failed to publish event");return c.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Xi*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,r=bl){const n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,c)=>{i=window.setTimeout(()=>{c(new Error(`request ${n} timed out`))},r)}),new Promise(s=>{this.requestResolutions.set(n,c=>{clearTimeout(i),s(c),this.requestResolutions.delete(n)})})])}async authenticate(){const e={type:"HostSession",id:(0,zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(e);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const e={type:"IsLinked",id:(0,zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}mn.WalletLinkConnection=_l;var Nr={},Lr={},qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var El=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.injectCssReset=void 0;const Sl=El(qs);function Ml(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(Sl.default)),document.documentElement.appendChild(t)}Lr.injectCssReset=Ml;var yn={},bn={},sr={},_n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.CloseIcon=void 0;const Yi=Ke;function kl(t){return(0,Yi.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,Yi.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}_n.CloseIcon=kl;var En={};Object.defineProperty(En,"__esModule",{value:!0});En.CoinbaseWalletRound=void 0;const qr=Ke;function Cl(t){return(0,qr.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,qr.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,qr.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,qr.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}En.CoinbaseWalletRound=Cl;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.QRCodeIcon=void 0;const pr=Ke;function Rl(t){return(0,pr.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),(0,pr.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,pr.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,pr.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,pr.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}Sn.QRCodeIcon=Rl;var Mn={};function va(t){this.mode=et.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}va.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=wt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=K.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=K.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,c=this.moduleCount-1;c>0;c-=2)for(c==6&&c--;;){for(var u=0;u<2;u++)if(this.modules[n][c-u]==null){var h=!1;s>>i&1)==1);var d=K.getMask(e,n,c-u);d&&(h=!h),this.modules[n][c-u]=h,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};wt.PAD0=236;wt.PAD1=17;wt.createData=function(t,e,r){for(var n=vt.getRSBlocks(t,e),i=new wa,s=0;su*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+u*8+")");for(i.getLengthInBits()+4<=u*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=u*8||(i.put(wt.PAD0,8),i.getLengthInBits()>=u*8));)i.put(wt.PAD1,8);return wt.createBytes(i,n)};wt.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),c=new Array(e.length),u=0;u=0?M.get(k):0}}for(var N=0,p=0;p=0;)e^=K.G15<=0;)e^=K.G18<>>=1;return e},getPatternPosition:function(t){return K.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case Mt.PATTERN000:return(e+r)%2==0;case Mt.PATTERN001:return e%2==0;case Mt.PATTERN010:return r%3==0;case Mt.PATTERN011:return(e+r)%3==0;case Mt.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case Mt.PATTERN101:return e*r%2+e*r%3==0;case Mt.PATTERN110:return(e*r%2+e*r%3)%2==0;case Mt.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new Xt([1],0),r=0;r5&&(r+=3+s-5)}for(var n=0;n=256;)t-=255;return He.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Ve=0;Ve<8;Ve++)He.EXP_TABLE[Ve]=1<>>7-t%8&1)==1},put:function(t,e){for(var r=0;r>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var vs=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function ya(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof t=="string"&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(h){switch(h){case"L":return Rt.L;case"M":return Rt.M;case"Q":return Rt.Q;case"H":return Rt.H;default:throw new Error("Unknwon error correction level: "+h)}}function n(h,d){for(var p=i(h),b=1,E=0,M=0,k=vs.length;M<=k;M++){var N=vs[M];if(!N)throw new Error("Content too long: expected "+E+" but got "+p);switch(d){case"L":E=N[0];break;case"M":E=N[1];break;case"Q":E=N[2];break;case"H":E=N[3];break;default:throw new Error("Unknwon error correction level: "+d)}if(p<=E)break;b++}if(b>vs.length)throw new Error("Content too long");return b}function i(h){var d=encodeURI(h).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return d.length+(d.length!=h?3:0)}var s=this.options.content,c=n(s,this.options.ecl),u=r(this.options.ecl);this.qrcode=new wt(c,u),this.qrcode.addData(s),this.qrcode.make()}ya.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>"u"&&(t={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",s=n?`\r +`:"",c=e.width,u=e.height,h=r.length,d=c/(h+2*e.padding),p=u/(h+2*e.padding),b=typeof e.join<"u"?!!e.join:!1,E=typeof e.swap<"u"?!!e.swap:!1,M=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,k=typeof e.predefined<"u"?!!e.predefined:!1,N=k?i+''+s:"",L=i+''+s,$="",T="",C=0;C'+s:$+=i+''+s}}b&&($=i+'');let U="";if(this.options.image!==void 0&&this.options.image.svg){const _=c*this.options.image.width/100,o=u*this.options.image.height/100,l=c/2-_/2,f=u/2-o/2;U+=``,U+=this.options.image.svg+s,U+=""}var J="";switch(t.container){case"svg":M&&(J+=''+s),J+=''+s,J+=N+L+$,J+=U,J+="";break;case"svg-viewbox":M&&(J+=''+s),J+=''+s,J+=N+L+$,J+=U,J+="";break;case"g":J+=''+s,J+=N+L+$,J+=U,J+="";break;default:J+=(N+L+$+U).replace(/^\s+/,"");break}return J};var Il=ya,Al=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mn,"__esModule",{value:!0});Mn.QRCode=void 0;const Nl=Ke,eo=an,Ll=Al(Il),xl=t=>{const[e,r]=(0,eo.useState)("");return(0,eo.useEffect)(()=>{var n,i;const s=new Ll.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),c=Buffer.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${c}`)},[t.bgColor,t.content,t.fgColor,t.height,t.image,t.width]),e?(0,Nl.h)("img",{src:e,alt:"QR Code"}):null};Mn.QRCode=xl;var kn={},Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var Tl=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kn,"__esModule",{value:!0});kn.Spinner=void 0;const Jr=Ke,Pl=Tl(Js),$l=t=>{var e;const r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,Jr.h)("div",{class:"-cbwsdk-spinner"},(0,Jr.h)("style",null,Pl.default),(0,Jr.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,Jr.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};kn.Spinner=$l;var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var ba=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sr,"__esModule",{value:!0});sr.CoinbaseWalletSteps=sr.ConnectContent=void 0;const Ft=ba(Sr),W=Ke,Ol=A,Bl=lr,Fl=_n,Dl=En,jl=Sn,Hl=Mn,Ul=kn,Vl=ba(Gs),ws={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:_a},Wl=t=>t==="light"?"#FFFFFF":"#0A0B0D";function zl(t){const{theme:e}=t,r=(0,Ol.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),n=ws.steps;return(0,W.h)("div",{"data-testid":"connect-content",className:(0,Ft.default)("-cbwsdk-connect-content",e)},(0,W.h)("style",null,Vl.default),(0,W.h)("div",{className:"-cbwsdk-connect-content-header"},(0,W.h)("h2",{className:(0,Ft.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with our mobile app"),t.onCancel&&(0,W.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,W.h)(Fl.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,W.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,W.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,W.h)(ql,{title:ws.title,description:ws.description,theme:e})),(0,W.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,W.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,W.h)(Hl.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,W.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:Bl.LIB_VERSION}),(0,W.h)("input",{type:"hidden",value:r})),(0,W.h)(n,{theme:e}),!t.isConnected&&(0,W.h)("div",{"data-testid":"connecting-spinner",className:(0,Ft.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,W.h)(Ul.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,W.h)("p",null,"Connecting...")))))}sr.ConnectContent=zl;function ql({title:t,description:e,theme:r}){return(0,W.h)("div",{className:(0,Ft.default)("-cbwsdk-connect-item",r)},(0,W.h)("div",null,(0,W.h)(Dl.CoinbaseWalletRound,null)),(0,W.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,W.h)("h3",{className:"-cbwsdk-connect-item-title"},t),(0,W.h)("p",{className:"-cbwsdk-connect-item-description"},e)))}function _a({theme:t}){return(0,W.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,W.h)("li",{className:(0,Ft.default)("-cbwsdk-wallet-steps-item",t)},(0,W.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,W.h)("li",{className:(0,Ft.default)("-cbwsdk-wallet-steps-item",t)},(0,W.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,W.h)("span",null,"Tap ",(0,W.h)("strong",null,"Scan")," "),(0,W.h)("span",{className:(0,Ft.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,W.h)(jl.QRCodeIcon,{fill:Wl(t)})))))}sr.CoinbaseWalletSteps=_a;var Cn={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ArrowLeftIcon=void 0;const to=Ke;function Jl(t){return(0,to.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,to.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}Rn.ArrowLeftIcon=Jl;var In={};Object.defineProperty(In,"__esModule",{value:!0});In.LaptopIcon=void 0;const ys=Ke;function Gl(t){return(0,ys.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,ys.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,ys.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}In.LaptopIcon=Gl;var An={};Object.defineProperty(An,"__esModule",{value:!0});An.SafeIcon=void 0;const ro=Ke;function Zl(t){return(0,ro.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,ro.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}An.SafeIcon=Zl;var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var Ea=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.TryExtensionContent=void 0;const Nt=Ea(Sr),Be=Ke,bs=an,Ql=Rn,Kl=In,Xl=An,Yl=Ea(Zs);function eu({theme:t}){const[e,r]=(0,bs.useState)(!1),n=(0,bs.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,bs.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,Be.h)("div",{class:(0,Nt.default)("-cbwsdk-try-extension",t)},(0,Be.h)("style",null,Yl.default),(0,Be.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Be.h)("h3",{class:(0,Nt.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,Be.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,Be.h)("button",{class:(0,Nt.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,Be.h)("div",null,!e&&(0,Be.h)(Ql.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,Be.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,Be.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,Be.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Be.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Be.h)("span",{class:(0,Nt.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Be.h)(Kl.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Be.h)("div",{class:(0,Nt.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,Be.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,Be.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,Be.h)("span",{class:(0,Nt.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,Be.h)(Xl.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,Be.h)("div",{class:(0,Nt.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Cn.TryExtensionContent=eu;var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var Sa=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bn,"__esModule",{value:!0});bn.ConnectDialog=void 0;const _s=Sa(Sr),Lt=Ke,Es=an,tu=sr,ru=Cn,nu=Sa(Qs),su=t=>{const{isOpen:e,darkMode:r}=t,[n,i]=(0,Es.useState)(!e),[s,c]=(0,Es.useState)(!e);(0,Es.useEffect)(()=>{const h=[window.setTimeout(()=>{c(!e)},10)];return e?i(!1):h.push(window.setTimeout(()=>{i(!0)},360)),()=>{h.forEach(window.clearTimeout)}},[e]);const u=r?"dark":"light";return(0,Lt.h)("div",{class:(0,_s.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Lt.h)("style",null,nu.default),(0,Lt.h)("div",{class:(0,_s.default)("-cbwsdk-connect-dialog-backdrop",u,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Lt.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Lt.h)("div",{class:(0,_s.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,Lt.h)(tu.ConnectContent,{theme:u,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,Lt.h)(ru.TryExtensionContent,{theme:u}))))};bn.ConnectDialog=su;Object.defineProperty(yn,"__esModule",{value:!0});yn.LinkFlow=void 0;const Ss=Ke,iu=bn;class ou{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,Ss.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,Ss.render)((0,Ss.h)(iu.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}yn.LinkFlow=ou;var Ks={},Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(t){var e=O&&O.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const r=e(Sr),n=Ke,i=an,s=e(Xs),c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",u="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class h{constructor(E){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=E.darkMode}attach(E){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",E.appendChild(this.root),this.render()}presentItem(E){const M=this.nextItemKey++;return this.items.set(M,E),this.render(),()=>{this.items.delete(M),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([E,M])=>(0,n.h)(t.SnackbarInstance,Object.assign({},M,{key:E}))))),this.root)}}t.Snackbar=h;const d=b=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},b.children));t.SnackbarContainer=d;const p=({autoExpand:b,message:E,menuItems:M})=>{const[k,N]=(0,i.useState)(!0),[L,$]=(0,i.useState)(b??!1);(0,i.useEffect)(()=>{const C=[window.setTimeout(()=>{N(!1)},1),window.setTimeout(()=>{$(!0)},1e4)];return()=>{C.forEach(window.clearTimeout)}});const T=()=>{$(!L)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",k&&"-cbwsdk-snackbar-instance-hidden",L&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:T},(0,n.h)("img",{src:c,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},E),(0,n.h)("div",{class:"-gear-container"},!L&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:u,class:"-gear-icon",title:"Expand"}))),M&&M.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},M.map((C,H)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",C.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:C.onClick,key:H},(0,n.h)("svg",{width:C.svgWidth,height:C.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":C.defaultFillRule,"clip-rule":C.defaultClipRule,d:C.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",C.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},C.info)))))};t.SnackbarInstance=p})(Ks);Object.defineProperty(Nr,"__esModule",{value:!0});Nr.WalletLinkRelayUI=void 0;const au=Lr,cu=yn,lu=Ks;class uu{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new lu.Snackbar({darkMode:e.darkMode}),this.linkFlow=new cu.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,au.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}}Nr.WalletLinkRelayUI=uu;Object.defineProperty(Ar,"__esModule",{value:!0});Ar.WalletLinkRelay=void 0;const Jt=Mr,du=De,Q=A,xt=ur,no=it,kt=dr,hu=mn,Tt=cr,fu=Nr;class Et extends no.RelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=c=>{var u;this.isLinked=c;const h=this.storage.getItem(no.LOCAL_STORAGE_ADDRESSES_KEY);if(c&&(this.session.linked=c),this.isUnlinkedErrorState=!1,h){const d=h.split(" "),p=this.storage.getItem("IsStandaloneSigning")==="true";if(d[0]!==""&&!c&&this.session.linked&&!p){this.isUnlinkedErrorState=!0;const b=this.getSessionIdHash();(u=this.diagnostic)===null||u===void 0||u.log(xt.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:b})}}},this.metadataUpdated=(c,u)=>{this.storage.setItem(c,u)},this.chainUpdated=(c,u)=>{this.chainCallbackParams.chainId===c&&this.chainCallbackParams.jsonRpcUrl===u||(this.chainCallbackParams={chainId:c,jsonRpcUrl:u},this.chainCallback&&this.chainCallback(c,u))},this.accountUpdated=c=>{this.accountsCallback&&this.accountsCallback([c]),Et.accountRequestCallbackIds.size>0&&(Array.from(Et.accountRequestCallbackIds.values()).forEach(u=>{const h={type:"WEB3_RESPONSE",id:u,response:{method:"requestEthereumAccounts",result:[c]}};this.invokeCallback(Object.assign(Object.assign({},h),{id:u}))}),Et.accountRequestCallbackIds.clear())},this.connectedUpdated=c=>{this.ui.setConnected(c)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){const e=kt.Session.load(this.storage)||new kt.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,i=new hu.WalletLinkConnection({session:e,linkAPIUrl:r,diagnostic:n,listener:this}),{version:s,darkMode:c}=this.options,u=this.options.uiConstructor({linkAPIUrl:r,version:s,darkMode:c,session:e});return i.connect(),{session:e,ui:u,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,r;const n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log(xt.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=kt.Session.load(this.storage);if((i==null?void 0:i.id)===this._session.id?this.storage.clear():i&&((r=this.diagnostic)===null||r===void 0||r.log(xt.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:kt.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:s,ui:c,connection:u}=this.subscribe();this._session=s,this.connection=u,this.ui=c,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(xt.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,Q.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,Q.hexStringFromBuffer)(e,!0),signature:(0,Q.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Q.bigIntStringFromBN)(e.weiValue),data:(0,Q.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Q.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,Q.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,Q.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,Q.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Q.bigIntStringFromBN)(e.weiValue),data:(0,Q.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Q.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,Q.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,Q.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,Q.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,Q.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,Q.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:"generic",params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null;const n=(0,Q.randomBytesHex)(8),i=c=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,c),r==null||r()};return{promise:new Promise((c,u)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,h=>{if(r==null||r(),(0,Tt.isErrorResponse)(h))return u(new Error(h.errorMessage));c(h)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof fu.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,r){var n;const i={type:"WEB3_REQUEST",id:e,request:r},s=kt.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(xt.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?kt.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(c=>{var u;(u=this.diagnostic)===null||u===void 0||u.log(xt.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?kt.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})}).catch(c=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:r.method,errorMessage:c.message}})})}publishWeb3RequestCanceledEvent(e){const r={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e){var r;const{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(xt.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){Et.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),Et.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;const c=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,Jt.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:r,errorMessage:c,errorCode:i}})}invokeCallback(e){const r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,Q.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,s)};return{promise:new Promise((s,c)=>{if(this.relayEventManager.callbacks.set(r,u=>{if(this.ui.hideRequestEthereumAccounts(),(0,Tt.isErrorResponse)(u))return c(new Error(u.errorMessage));s(u)}),this.ui.inlineAccountsResponse()){const u=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r,response:{method:"requestEthereumAccounts",result:h}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:u})}else{const u=Jt.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(u)})}Et.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,e)}),cancel:n}}selectProvider(e){const r={method:"selectProvider",params:{providerOptions:e}},n=(0,Q.randomBytesHex)(8),i=c=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,c)},s=new Promise((c,u)=>{this.relayEventManager.callbacks.set(n,p=>{if((0,Tt.isErrorResponse)(p))return u(new Error(p.errorMessage));c(p)});const h=p=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:du.ProviderType.Unselected}})},d=p=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:p}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:d,onCancel:h,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,c){const u={method:"watchAsset",params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:c}};let h=null;const d=(0,Q.randomBytesHex)(8),p=E=>{this.publishWeb3RequestCanceledEvent(d),this.handleErrorResponse(d,u.method,E),h==null||h()};this.ui.inlineWatchAsset()||(h=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload}));const b=new Promise((E,M)=>{this.relayEventManager.callbacks.set(d,L=>{if(h==null||h(),(0,Tt.isErrorResponse)(L))return M(new Error(L.errorMessage));E(L)});const k=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:d,response:{method:"watchAsset",result:!1}})},N=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:d,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:N,onCancel:k,type:e,address:r,symbol:n,decimals:i,image:s,chainId:c}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(d,u)});return{cancel:p,promise:b}}addEthereumChain(e,r,n,i,s,c){const u={method:"addEthereumChain",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:c}};let h=null;const d=(0,Q.randomBytesHex)(8),p=E=>{this.publishWeb3RequestCanceledEvent(d),this.handleErrorResponse(d,u.method,E),h==null||h()};return this.ui.inlineAddEthereumChain(e)||(h=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload})),{promise:new Promise((E,M)=>{this.relayEventManager.callbacks.set(d,L=>{if(h==null||h(),(0,Tt.isErrorResponse)(L))return M(new Error(L.errorMessage));E(L)});const k=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:d,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},N=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:d,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:L}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:k,onApprove:N,chainId:u.params.chainId,rpcUrls:u.params.rpcUrls,blockExplorerUrls:u.params.blockExplorerUrls,chainName:u.params.chainName,iconUrls:u.params.iconUrls,nativeCurrency:u.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(d,u)}),cancel:p}}switchEthereumChain(e,r){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:r})},i=(0,Q.randomBytesHex)(8),s=u=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,u)};return{promise:new Promise((u,h)=>{this.relayEventManager.callbacks.set(i,b=>{if((0,Tt.isErrorResponse)(b)&&b.errorCode)return h(Jt.standardErrors.provider.custom({code:b.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,Tt.isErrorResponse)(b))return h(new Error(b.errorMessage));u(b)});const d=b=>{var E;if(b){const M=(E=(0,Jt.getErrorCode)(b))!==null&&E!==void 0?E:Jt.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",b instanceof Error?b:Jt.standardErrors.provider.unsupportedChain(e),M)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},p=b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:b}}})};this.ui.switchEthereumChain({onCancel:d,onApprove:p,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return kt.Session.hash(this._session.id)}sendRequestStandalone(e,r){const n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:s})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}}Ar.WalletLinkRelay=Et;Et.accountRequestCallbackIds=new Set;var xr={},Nn={},Ma={};(function(t){var e=O&&O.__createBinding||(Object.create?function(n,i,s,c){c===void 0&&(c=s);var u=Object.getOwnPropertyDescriptor(i,s);(!u||("get"in u?!i.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,c,u)}:function(n,i,s,c){c===void 0&&(c=s),n[c]=i[s]}),r=O&&O.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ks,t)})(Ma);var Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var ka=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.RedirectDialog=void 0;const gu=ka(Sr),mt=Ke,pu=Lr,mu=Ma,vu=ka(Ys);class wu{constructor(){this.root=null}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,pu.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,mt.render)(null,this.root),e&&(0,mt.render)((0,mt.h)(yu,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}}Nn.RedirectDialog=wu;const yu=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{const s=r?"dark":"light";return(0,mt.h)(mu.SnackbarContainer,{darkMode:r},(0,mt.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,mt.h)("style",null,vu.default),(0,mt.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,mt.h)("div",{class:(0,gu.default)("-cbwsdk-redirect-dialog-box",s)},(0,mt.h)("p",null,t),(0,mt.h)("button",{onClick:n},e))))};Object.defineProperty(xr,"__esModule",{value:!0});xr.MobileRelayUI=void 0;const bu=Nn;class _u{constructor(e){this.attached=!1,this.darkMode=!1,this.redirectDialog=new bu.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}redirectToCoinbaseWallet(e){const r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),e&&r.searchParams.append("wl_url",e);const n=document.createElement("a");n.target="cbw-opener",n.href=r.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}xr.MobileRelayUI=_u;Object.defineProperty(Ir,"__esModule",{value:!0});Ir.MobileRelay=void 0;const Eu=A,Su=Ar,Mu=xr;class ku extends Su.WalletLinkRelay{constructor(e){var r;super(e),this._enableMobileWalletLink=(r=e.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const e=(0,Eu.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,r){if(super.publishWeb3RequestEvent(e,r),!(this._enableMobileWalletLink&&this.ui instanceof Mu.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e)}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}}Ir.MobileRelay=ku;const Cu=Fc,Ru=un;function Ca(t){return Buffer.allocUnsafe(t).fill(0)}function Ra(t,e,r){const n=Ca(e);return t=Ln(t),r?t.length"u")throw new Error("Not an array?");if(r=xa(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(pt(t,e[s]));if(r==="dynamic"){var c=pt("uint256",e.length);i.unshift(c)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([pt("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,Dt.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=Yt(t),r<1||r>32)throw new Error("Invalid bytes width: "+r);return Dt.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=Yt(t),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Buffer,"be",32)}else if(t.startsWith("int")){if(r=Yt(t),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Buffer,"be",32)}else if(t.startsWith("ufixed")){if(r=so(t),n=Pt(e),n<0)throw new Error("Supplied ufixed is negative");return pt("uint256",n.mul(new Ot(2).pow(new Ot(r[1]))))}else if(t.startsWith("fixed"))return r=so(t),pt("int256",Pt(e).mul(new Ot(2).pow(new Ot(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function xu(t){return t==="string"||t==="bytes"||xa(t)==="dynamic"}function Tu(t){return t.lastIndexOf("]")===t.length-1}function Pu(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var c=La(t[s]),u=e[s],h=pt(c,u);xu(c)?(r.push(pt("uint256",i)),n.push(h),i+=h.length):r.push(h)}return Buffer.concat(r.concat(n))}function Ta(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+r);i.push(Dt.setLengthRight(u,r))}else if(c.startsWith("uint")){if(r=Yt(c),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=Pt(u),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(Buffer,"be",r/8))}else if(c.startsWith("int")){if(r=Yt(c),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=Pt(u),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(Buffer,"be",r/8))}else throw new Error("Unsupported or invalid type: "+c)}return Buffer.concat(i)}function $u(t,e){return Dt.keccak(Ta(t,e))}var Ou={rawEncode:Pu,solidityPack:Ta,soliditySHA3:$u};const lt=Na,yr=Ou,Pa={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},Ms={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const c=(u,h,d)=>{if(r[h]!==void 0)return["bytes32",d==null?"0x0000000000000000000000000000000000000000000000000000000000000000":lt.keccak(this.encodeData(h,d,r,n))];if(d===void 0)throw new Error(`missing value for field ${u} of type ${h}`);if(h==="bytes")return["bytes32",lt.keccak(d)];if(h==="string")return typeof d=="string"&&(d=Buffer.from(d,"utf8")),["bytes32",lt.keccak(d)];if(h.lastIndexOf("]")===h.length-1){const p=h.slice(0,h.lastIndexOf("[")),b=d.map(E=>c(u,p,E));return["bytes32",lt.keccak(yr.rawEncode(b.map(([E])=>E),b.map(([,E])=>E)))]}return[h,d]};for(const u of r[t]){const[h,d]=c(u.name,u.type,e[u.name]);i.push(h),s.push(d)}}else for(const c of r[t]){let u=e[c.name];if(u!==void 0)if(c.type==="bytes")i.push("bytes32"),u=lt.keccak(u),s.push(u);else if(c.type==="string")i.push("bytes32"),typeof u=="string"&&(u=Buffer.from(u,"utf8")),u=lt.keccak(u),s.push(u);else if(r[c.type]!==void 0)i.push("bytes32"),u=lt.keccak(this.encodeData(c.type,u,r,n)),s.push(u);else{if(c.type.lastIndexOf("]")===c.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(c.type),s.push(u)}}return yr.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:c,type:u})=>u+" "+c).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return lt.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return lt.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in Pa.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),lt.keccak(Buffer.concat(n))}};var Bu={TYPED_MESSAGE_SCHEMA:Pa,TypedDataUtils:Ms,hashForSignTypedDataLegacy:function(t){return Fu(t.data)},hashForSignTypedData_v3:function(t){return Ms.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return Ms.hash(t.data)}};function Fu(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?lt.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return yr.soliditySHA3(["bytes32","bytes32"],[yr.soliditySHA3(new Array(t.length).fill("string"),i),yr.soliditySHA3(n,r)])}var ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.filterFromParam=ir.FilterPolyfill=void 0;const Qt=De,Ge=A,Du=5*60*1e3,$t={jsonrpc:"2.0",id:0};class ju{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,Qt.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){const r=$a(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,Ge.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,Ge.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,Ge.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,Ge.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,Ge.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(Gr())}async getFilterLogs(e){const r=(0,Ge.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},$t),{method:"eth_getLogs",params:[io(n)]})):Gr()}makeFilterId(){return(0,Qt.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return Gr();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>Number(r.toBlock))return Zr();console.info(`Fetching logs from ${n} to ${s} for filter ${e}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},$t),{method:"eth_getLogs",params:[io(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(c.result)){const u=c.result.map(d=>(0,Ge.intNumberFromHexString)(d.blockNumber||"0x0")),h=Math.max(...u);if(h&&h>n){const d=(0,Qt.IntNumber)(h+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${d}`),this.cursors.set(e,d)}}return c}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return Gr();const n=await this.getCurrentBlockHeight();if(r>n)return Zr();console.info(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,Ge.range)(r,n+1).map(c=>this.getBlockHashByNumber((0,Qt.IntNumber)(c))))).filter(c=>!!c),s=(0,Qt.IntNumber)(r+i.length);return console.info(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},$t),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(Zr())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},Du);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;const r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},$t),{method:"eth_blockNumber",params:[]}));return(0,Ge.intNumberFromHexString)((0,Ge.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},$t),{method:"eth_getBlockByNumber",params:[(0,Ge.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,Ge.ensureHexString)(r.result.hash):null}}ir.FilterPolyfill=ju;function $a(t){return{fromBlock:oo(t.fromBlock),toBlock:oo(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}ir.filterFromParam=$a;function io(t){const e={fromBlock:ao(t.fromBlock),toBlock:ao(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function oo(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,Qt.IntNumber)(0);if((0,Ge.isHexString)(t))return(0,Ge.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function ao(t){return t==="latest"?t:(0,Ge.hexStringFromIntNumber)(t)}function Gr(){return Object.assign(Object.assign({},$t),{error:{code:-32e3,message:"filter not found"}})}function Zr(){return Object.assign(Object.assign({},$t),{result:[]})}var xn={},Oa={},Tn={},ei=Hu;function Hu(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}const co=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(c,u){if(e.multiArgs){const h=new Array(arguments.length-1);for(let d=1;d{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=c=>typeof c=="string"?i===c:c.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):co(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?co(s,e):s}return n},Tr={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const Vu=na;function lo(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Wu(t){const e=t.length,r=new Array(e);for(let n=0;n0&&([c]=r),c instanceof Error)throw c;const u=new Error(`Unhandled error.${c?` (${c.message})`:""}`);throw u.context=c,u}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")lo(s,this,r);else{const c=s.length,u=Wu(s);for(let h=0;ht+e,uo=["sync","latest"];class Qu extends Ju.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*Gu,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){uo.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return uo.map(e=>this.listenerCount(e)).reduce(Zu)}_shouldUseNewBlock(e){const r=this._currentBlock;if(!r)return!0;const n=ho(e),i=ho(r);return this._usePastBlocks&&ni}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){const r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}Tr.BaseBlockTracker=Qu;function ho(t){return Number.parseInt(t,16)}var Ba={},Fa={},We={};class Da extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...c}=e,{path:u}=e,h=u.length===0?i:`At path: ${u.join(".")} -- ${i}`;super(s??h),s!=null&&(this.cause=h),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function Ku(t){return at(t)&&typeof t[Symbol.iterator]=="function"}function at(t){return typeof t=="object"&&t!=null}function fo(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function je(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Xu(t){const{done:e,value:r}=t.next();return e?void 0:r}function Yu(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:c}=r,{refinement:u,message:h=`Expected a value of type \`${c}\`${u?` with refinement \`${u}\``:""}, but received: \`${je(n)}\``}=t;return{value:n,type:c,refinement:u,key:i[i.length-1],path:i,branch:s,...t,message:h}}function*Bs(t,e,r,n){Ku(t)||(t=[t]);for(const i of t){const s=Yu(i,e,r,n);s&&(yield s)}}function*ti(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:c=!1}=r,u={path:n,branch:i};if(s&&(t=e.coercer(t,u),c&&e.type!=="type"&&at(e.schema)&&at(t)&&!Array.isArray(t)))for(const d in t)e.schema[d]===void 0&&delete t[d];let h="valid";for(const d of e.validator(t,u))d.explanation=r.message,h="not_valid",yield[d,void 0];for(let[d,p,b]of e.entries(t,u)){const E=ti(p,b,{path:d===void 0?n:[...n,d],branch:d===void 0?i:[...i,p],coerce:s,mask:c,message:r.message});for(const M of E)M[0]?(h=M[0].refinement!=null?"not_refined":"not_valid",yield[M[0],void 0]):s&&(p=M[1],d===void 0?t=p:t instanceof Map?t.set(d,p):t instanceof Set?t.add(p):at(t)&&(p!==void 0||d in t)&&(t[d]=p))}if(h!=="not_valid")for(const d of e.refiner(t,u))d.explanation=r.message,h="not_refined",yield[d,void 0];h==="valid"&&(yield[void 0,t])}class ee{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:c=h=>h,entries:u=function*(){}}=e;this.type=r,this.schema=n,this.entries=u,this.coercer=c,i?this.validator=(h,d)=>{const p=i(h,d);return Bs(p,d,this,h)}:this.validator=()=>[],s?this.refiner=(h,d)=>{const p=s(h,d);return Bs(p,d,this,h)}:this.refiner=()=>[]}assert(e,r){return ja(e,this,r)}create(e,r){return Ha(e,this,r)}is(e){return ri(e,this)}mask(e,r){return Ua(e,this,r)}validate(e,r={}){return hr(e,this,r)}}function ja(t,e,r){const n=hr(t,e,{message:r});if(n[0])throw n[0]}function Ha(t,e,r){const n=hr(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Ua(t,e,r){const n=hr(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function ri(t,e){return!hr(t,e)[0]}function hr(t,e,r={}){const n=ti(t,e,r),i=Xu(n);return i[0]?[new Da(i[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,i[1]]}function ed(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Or(n):$r(n)}function Xe(t,e){return new ee({type:t,schema:null,validator:e})}function td(t,e){return new ee({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function rd(t){return new ee({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function nd(t){let e;return new ee({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function sd(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return Or(n);default:return $r(n)}}function id(t){const e=t instanceof ee,r=e?{...t.schema}:{...t};for(const n in r)r[n]=Va(r[n]);return e&&t.type==="type"?Or(r):$r(r)}function od(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];switch(t.type){case"type":return Or(n);default:return $r(n)}}function ad(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Xe(t,e)}function cd(){return Xe("any",()=>!0)}function ld(t){return new ee({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${je(e)}`}})}function ud(){return Xe("bigint",t=>typeof t=="bigint")}function dd(){return Xe("boolean",t=>typeof t=="boolean")}function hd(){return Xe("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${je(t)}`)}function fd(t){const e={},r=t.map(n=>je(n)).join();for(const n of t)e[n]=n;return new ee({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${je(n)}`}})}function gd(){return Xe("func",t=>typeof t=="function"||`Expected a function, but received: ${je(t)}`)}function pd(t){return Xe("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${je(e)}`)}function md(){return Xe("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${je(t)}`)}function vd(t){return new ee({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function wd(t){const e=je(t),r=typeof t;return new ee({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${je(n)}`}})}function yd(t,e){return new ee({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${je(r)}`}})}function ni(){return Xe("never",()=>!1)}function bd(t){return new ee({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function _d(){return Xe("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${je(t)}`)}function $r(t){const e=t?Object.keys(t):[],r=ni();return new ee({type:"object",schema:t||null,*entries(n){if(t&&at(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return at(n)||`Expected an object, but received: ${je(n)}`},coercer(n){return at(n)?{...n}:n}})}function Va(t){return new ee({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Ed(t,e){return new ee({type:"record",schema:null,*entries(r){if(at(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return at(r)||`Expected an object, but received: ${je(r)}`}})}function Sd(){return Xe("regexp",t=>t instanceof RegExp)}function Md(t){return new ee({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${je(e)}`}})}function Wa(){return Xe("string",t=>typeof t=="string"||`Expected a string, but received: ${je(t)}`)}function kd(t){const e=ni();return new ee({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;ir.type).join(" | ");return new ee({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...c]=ti(r,s,n),[u]=c;if(u[0])for(const[h]of c)h&&i.push(h);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${je(r)}`,...i]}})}function za(){return Xe("unknown",()=>!0)}function si(t,e,r){return new ee({...t,coercer:(n,i)=>ri(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function Rd(t,e,r={}){return si(t,za(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&fo(n)&&fo(i)){const s={...n};let c=!1;for(const u in i)s[u]===void 0&&(s[u]=i[u],c=!0);if(c)return s}return n})}function Id(t){return si(t,Wa(),e=>e.trim())}function Ad(t){return Ut(t,"empty",e=>{const r=qa(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function qa(t){return t instanceof Map||t instanceof Set?t.size:t.length}function Nd(t,e,r={}){const{exclusive:n}=r;return Ut(t,"max",i=>n?in?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function xd(t){return Ut(t,"nonempty",e=>qa(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function Td(t,e){return Ut(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function Pd(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return Ut(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:c}=s;return e<=c&&c<=r||`${n} with a size ${i} but received one with a size of \`${c}\``}else{const{length:c}=s;return e<=c&&c<=r||`${n} with a length ${i} but received one with a length of \`${c}\``}})}function Ut(t,e,r){return new ee({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),c=Bs(s,i,t,n);for(const u of c)yield{...u,refinement:e}}})}const $d=Object.freeze(Object.defineProperty({__proto__:null,Struct:ee,StructError:Da,any:cd,array:ld,assert:ja,assign:ed,bigint:ud,boolean:dd,coerce:si,create:Ha,date:hd,defaulted:Rd,define:Xe,deprecated:td,dynamic:rd,empty:Ad,enums:fd,func:gd,instance:pd,integer:md,intersection:vd,is:ri,lazy:nd,literal:wd,map:yd,mask:Ua,max:Nd,min:Ld,never:ni,nonempty:xd,nullable:bd,number:_d,object:$r,omit:sd,optional:Va,partial:id,pattern:Td,pick:od,record:Ed,refine:Ut,regexp:Sd,set:Md,size:Pd,string:Wa,struct:ad,trimmed:Id,tuple:kd,type:Or,union:Cd,unknown:za,validate:hr},Symbol.toStringTag,{value:"Module"})),Vt=ra($d);Object.defineProperty(We,"__esModule",{value:!0});We.assertExhaustive=We.assertStruct=We.assert=We.AssertionError=void 0;const Od=Vt;function Bd(t){return typeof t=="object"&&t!==null&&"message"in t}function Fd(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function Dd(t){const e=Bd(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Ja(t,e){return Fd(t)?new t({message:e}):t({message:e})}class ii extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}We.AssertionError=ii;function jd(t,e="Assertion failed.",r=ii){if(!t)throw e instanceof Error?e:Ja(r,e)}We.assert=jd;function Hd(t,e,r="Assertion failed",n=ii){try{(0,Od.assert)(t,e)}catch(i){throw Ja(n,`${r}: ${Dd(i)}.`)}}We.assertStruct=Hd;function Ud(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}We.assertExhaustive=Ud;var Br={};Object.defineProperty(Br,"__esModule",{value:!0});Br.base64=void 0;const Vd=Vt,Wd=We,zd=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let c;s==="base64"?c=String.raw`[A-Za-z0-9+\/]`:((0,Wd.assert)(s==="base64url"),c=String.raw`[-_A-Za-z0-9]`);let u;return i?u=new RegExp(`^(?:${c}{4})*(?:${c}{3}=|${c}{2}==)?$`,"u"):u=new RegExp(`^(?:${c}{4})*(?:${c}{2,3}|${c}{3}=|${c}{2}==)?$`,"u"),(0,Vd.pattern)(t,u)};Br.base64=zd;var z={},Fr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=Vt,r=We;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(d){return(0,e.is)(d,t.HexStruct)}t.isHexString=n;function i(d){return(0,e.is)(d,t.StrictHexStruct)}t.isStrictHexString=i;function s(d){(0,r.assert)(n(d),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function c(d){(0,r.assert)(i(d),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=c;function u(d){return d.startsWith("0x")?d:d.startsWith("0X")?`0x${d.substring(2)}`:`0x${d}`}t.add0x=u;function h(d){return d.startsWith("0x")||d.startsWith("0X")?d.substring(2):d}t.remove0x=h})(Fr);Object.defineProperty(z,"__esModule",{value:!0});z.createDataView=z.concatBytes=z.valueToBytes=z.stringToBytes=z.numberToBytes=z.signedBigIntToBytes=z.bigIntToBytes=z.hexToBytes=z.bytesToString=z.bytesToNumber=z.bytesToSignedBigInt=z.bytesToBigInt=z.bytesToHex=z.assertIsBytes=z.isBytes=void 0;const tt=We,Fs=Fr,go=48,po=58,mo=87;function qd(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const Jd=qd();function oi(t){return t instanceof Uint8Array}z.isBytes=oi;function fr(t){(0,tt.assert)(oi(t),"Value must be a Uint8Array.")}z.assertIsBytes=fr;function Ga(t){if(fr(t),t.length===0)return"0x";const e=Jd(),r=new Array(t.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return Pn(e)}z.bigIntToBytes=Qa;function Kd(t,e){(0,tt.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function Xd(t,e){(0,tt.assert)(typeof t=="bigint","Value must be a bigint."),(0,tt.assert)(typeof e=="number","Byte length must be a number."),(0,tt.assert)(e>0,"Byte length must be greater than 0."),(0,tt.assert)(Kd(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}z.signedBigIntToBytes=Xd;function Ka(t){(0,tt.assert)(typeof t=="number","Value must be a number."),(0,tt.assert)(t>=0,"Value must be a non-negative number."),(0,tt.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return Pn(e)}z.numberToBytes=Ka;function Xa(t){return(0,tt.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}z.stringToBytes=Xa;function Ya(t){if(typeof t=="bigint")return Qa(t);if(typeof t=="number")return Ka(t);if(typeof t=="string")return t.startsWith("0x")?Pn(t):Xa(t);if(oi(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}z.valueToBytes=Ya;function Yd(t){const e=new Array(t.length);let r=0;for(let i=0;ie.call(r,n,i,this))}get(e){return Ze(this,ct,"f").get(e)}has(e){return Ze(this,ct,"f").has(e)}keys(){return Ze(this,ct,"f").keys()}values(){return Ze(this,ct,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}or.FrozenMap=ai;class ci{constructor(e){ft.set(this,void 0),rc(this,ft,new Set(e),"f"),Object.freeze(this)}get size(){return Ze(this,ft,"f").size}[(ft=new WeakMap,Symbol.iterator)](){return Ze(this,ft,"f")[Symbol.iterator]()}entries(){return Ze(this,ft,"f").entries()}forEach(e,r){return Ze(this,ft,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return Ze(this,ft,"f").has(e)}keys(){return Ze(this,ft,"f").keys()}values(){return Ze(this,ft,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}or.FrozenSet=ci;Object.freeze(ai);Object.freeze(ai.prototype);Object.freeze(ci);Object.freeze(ci.prototype);var nc={};Object.defineProperty(nc,"__esModule",{value:!0});var sc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=void 0;const e=Vt,r=We,n=()=>(0,e.define)("finite number",I=>(0,e.is)(I,(0,e.number)())&&Number.isFinite(I));t.UnsafeJsonStruct=(0,e.union)([(0,e.literal)(null),(0,e.boolean)(),n(),(0,e.string)(),(0,e.array)((0,e.lazy)(()=>t.UnsafeJsonStruct)),(0,e.record)((0,e.string)(),(0,e.lazy)(()=>t.UnsafeJsonStruct))]),t.JsonStruct=(0,e.define)("Json",(I,P)=>{function q(Fe,ze){const U=[...ze.validator(Fe,P)];return U.length>0?U:!0}try{const Fe=q(I,t.UnsafeJsonStruct);return Fe!==!0?Fe:q(JSON.parse(JSON.stringify(I)),t.UnsafeJsonStruct)}catch(Fe){return Fe instanceof RangeError?"Circular reference detected":!1}});function i(I){return(0,e.is)(I,t.JsonStruct)}t.isValidJson=i;function s(I){(0,r.assertStruct)(I,t.JsonStruct,"Invalid JSON value");const P=JSON.stringify(I);return new TextEncoder().encode(P).byteLength}t.getJsonSize=s,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function c(I){return(0,e.is)(I,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=c;function u(I,P){(0,r.assertStruct)(I,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",P)}t.assertIsJsonRpcNotification=u;function h(I){return(0,e.is)(I,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=h;function d(I,P){(0,r.assertStruct)(I,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",P)}t.assertIsJsonRpcRequest=d,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function p(I){return(0,e.is)(I,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=p;function b(I,P){(0,r.assertStruct)(I,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",P)}t.assertIsPendingJsonRpcResponse=b;function E(I){return(0,e.is)(I,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=E;function M(I,P){(0,r.assertStruct)(I,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",P)}t.assertIsJsonRpcResponse=M;function k(I){return(0,e.is)(I,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=k;function N(I,P){(0,r.assertStruct)(I,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",P)}t.assertIsJsonRpcSuccess=N;function L(I){return(0,e.is)(I,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=L;function $(I,P){(0,r.assertStruct)(I,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",P)}t.assertIsJsonRpcFailure=$;function T(I){return(0,e.is)(I,t.JsonRpcErrorStruct)}t.isJsonRpcError=T;function C(I,P){(0,r.assertStruct)(I,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",P)}t.assertIsJsonRpcError=C;function H(I){const{permitEmptyString:P,permitFractions:q,permitNull:Fe}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},I);return Y=>!!(typeof Y=="number"&&(q||Number.isInteger(Y))||typeof Y=="string"&&(P||Y.length>0)||Fe&&Y===null)}t.getJsonRpcIdValidator=H})(sc);var ic={};Object.defineProperty(ic,"__esModule",{value:!0});var ar={},Ds={exports:{}},ks,wo;function dh(){if(wo)return ks;wo=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;ks=function(p,b){b=b||{};var E=typeof p;if(E==="string"&&p.length>0)return c(p);if(E==="number"&&isFinite(p))return b.long?h(p):u(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function c(p){if(p=String(p),!(p.length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(b){var E=parseFloat(b[1]),M=(b[2]||"ms").toLowerCase();switch(M){case"years":case"year":case"yrs":case"yr":case"y":return E*s;case"weeks":case"week":case"w":return E*i;case"days":case"day":case"d":return E*n;case"hours":case"hour":case"hrs":case"hr":case"h":return E*r;case"minutes":case"minute":case"mins":case"min":case"m":return E*e;case"seconds":case"second":case"secs":case"sec":case"s":return E*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function u(p){var b=Math.abs(p);return b>=n?Math.round(p/n)+"d":b>=r?Math.round(p/r)+"h":b>=e?Math.round(p/e)+"m":b>=t?Math.round(p/t)+"s":p+"ms"}function h(p){var b=Math.abs(p);return b>=n?d(p,b,n,"day"):b>=r?d(p,b,r,"hour"):b>=e?d(p,b,e,"minute"):b>=t?d(p,b,t,"second"):p+" ms"}function d(p,b,E,M){var k=b>=E*1.5;return Math.round(p/E)+" "+M+(k?"s":"")}return ks}function hh(t){r.debug=r,r.default=r,r.coerce=h,r.disable=s,r.enable=i,r.enabled=c,r.humanize=dh(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let b=0;for(let E=0;E{if(P==="%%")return"%";H++;const Fe=r.formatters[q];if(typeof Fe=="function"){const ze=L[H];P=Fe.call($,ze),L.splice(H,1),H--}return P}),r.formatArgs.call($,L),($.log||r.log).apply($,L)}return N.namespace=p,N.useColors=r.useColors(),N.color=r.selectColor(p),N.extend=n,N.destroy=r.destroy,Object.defineProperty(N,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(M!==r.namespaces&&(M=r.namespaces,k=r.enabled(p)),k),set:L=>{E=L}}),typeof r.init=="function"&&r.init(N),N}function n(p,b){const E=r(this.namespace+(typeof b>"u"?":":b)+p);return E.log=this.log,E}function i(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let b;const E=(typeof p=="string"?p:"").split(/[\s,]+/),M=E.length;for(b=0;b"-"+b)].join(",");return r.enable(""),p}function c(p){if(p[p.length-1]==="*")return!0;let b,E;for(b=0,E=r.skips.length;b{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let d;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(d=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(d[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;d.splice(1,0,p,"color: inherit");let b=0,E=0;d[0].replace(/%[a-zA-Z%]/g,M=>{M!=="%%"&&(b++,M==="%c"&&(E=b))}),d.splice(E,0,p)}e.log=console.debug||console.log||(()=>{});function s(d){try{d?e.storage.setItem("debug",d):e.storage.removeItem("debug")}catch{}}function c(){let d;try{d=e.storage.getItem("debug")}catch{}return!d&&typeof process<"u"&&"env"in process&&(d=r.DEBUG),d}function u(){try{return localStorage}catch{}}t.exports=fh(e);const{formatters:h}=t.exports;h.j=function(d){try{return JSON.stringify(d)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(Ds,Ds.exports);var gh=Ds.exports,ph=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ar,"__esModule",{value:!0});ar.createModuleLogger=ar.createProjectLogger=void 0;const mh=ph(gh),vh=(0,mh.default)("metamask");function wh(t){return vh.extend(t)}ar.createProjectLogger=wh;function yh(t,e){return t.extend(e)}ar.createModuleLogger=yh;var oc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(d){return Array.isArray(d)&&d.length>0}t.isNonEmptyArray=e;function r(d){return d==null}t.isNullOrUndefined=r;function n(d){return!!d&&typeof d=="object"&&!Array.isArray(d)}t.isObject=n;const i=(d,p)=>Object.hasOwnProperty.call(d,p);t.hasProperty=i,function(d){d[d.Null=4]="Null",d[d.Comma=1]="Comma",d[d.Wrapper=1]="Wrapper",d[d.True=4]="True",d[d.False=5]="False",d[d.Quote=1]="Quote",d[d.Colon=1]="Colon",d[d.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(d){if(typeof d!="object"||d===null)return!1;try{let p=d;for(;Object.getPrototypeOf(p)!==null;)p=Object.getPrototypeOf(p);return Object.getPrototypeOf(d)===p}catch{return!1}}t.isPlainObject=s;function c(d){return d.charCodeAt(0)<=127}t.isASCII=c;function u(d){var p;return d.split("").reduce((E,M)=>c(M)?E+1:E+2,0)+((p=d.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&p!==void 0?p:[]).length}t.calculateStringSize=u;function h(d){return d.toString().length}t.calculateNumberSize=h})(oc);var bt={};Object.defineProperty(bt,"__esModule",{value:!0});bt.hexToBigInt=bt.hexToNumber=bt.bigIntToHex=bt.numberToHex=void 0;const er=We,_r=Fr,bh=t=>((0,er.assert)(typeof t=="number","Value must be a number."),(0,er.assert)(t>=0,"Value must be a non-negative number."),(0,er.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,_r.add0x)(t.toString(16)));bt.numberToHex=bh;const _h=t=>((0,er.assert)(typeof t=="bigint","Value must be a bigint."),(0,er.assert)(t>=0,"Value must be a non-negative bigint."),(0,_r.add0x)(t.toString(16)));bt.bigIntToHex=_h;const Eh=t=>{(0,_r.assertIsHexString)(t);const e=parseInt(t,16);return(0,er.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};bt.hexToNumber=Eh;const Sh=t=>((0,_r.assertIsHexString)(t),BigInt((0,_r.add0x)(t)));bt.hexToBigInt=Sh;var ac={};Object.defineProperty(ac,"__esModule",{value:!0});var cc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,c)=>{if(!e(s))throw new Error(`"${c}" must be a non-negative integer. Received: "${s}".`)};function n(s,c){return r(s,"count"),s*c}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(cc);var lc={};Object.defineProperty(lc,"__esModule",{value:!0});var uc={},js={exports:{}};const Mh="2.0.0",dc=256,kh=Number.MAX_SAFE_INTEGER||9007199254740991,Ch=16,Rh=dc-6,Ih=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Bn={MAX_LENGTH:dc,MAX_SAFE_COMPONENT_LENGTH:Ch,MAX_SAFE_BUILD_LENGTH:Rh,MAX_SAFE_INTEGER:kh,RELEASE_TYPES:Ih,SEMVER_SPEC_VERSION:Mh,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Cs={};const Ah=typeof process=="object"&&Cs&&Cs.NODE_DEBUG&&/\bsemver\b/i.test(Cs.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var Fn=Ah;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=Bn,s=Fn;e=t.exports={};const c=e.re=[],u=e.safeRe=[],h=e.src=[],d=e.t={};let p=0;const b="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",i],[b,n]],M=N=>{for(const[L,$]of E)N=N.split(`${L}*`).join(`${L}{0,${$}}`).split(`${L}+`).join(`${L}{1,${$}}`);return N},k=(N,L,$)=>{const T=M(L),C=p++;s(N,C,L),d[N]=C,h[C]=L,c[C]=new RegExp(L,$?"g":void 0),u[C]=new RegExp(T,$?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*"),k("NUMERICIDENTIFIERLOOSE","\\d+"),k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b}*`),k("MAINVERSION",`(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})`),k("MAINVERSIONLOOSE",`(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})`),k("PRERELEASEIDENTIFIER",`(?:${h[d.NUMERICIDENTIFIER]}|${h[d.NONNUMERICIDENTIFIER]})`),k("PRERELEASEIDENTIFIERLOOSE",`(?:${h[d.NUMERICIDENTIFIERLOOSE]}|${h[d.NONNUMERICIDENTIFIER]})`),k("PRERELEASE",`(?:-(${h[d.PRERELEASEIDENTIFIER]}(?:\\.${h[d.PRERELEASEIDENTIFIER]})*))`),k("PRERELEASELOOSE",`(?:-?(${h[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[d.PRERELEASEIDENTIFIERLOOSE]})*))`),k("BUILDIDENTIFIER",`${b}+`),k("BUILD",`(?:\\+(${h[d.BUILDIDENTIFIER]}(?:\\.${h[d.BUILDIDENTIFIER]})*))`),k("FULLPLAIN",`v?${h[d.MAINVERSION]}${h[d.PRERELEASE]}?${h[d.BUILD]}?`),k("FULL",`^${h[d.FULLPLAIN]}$`),k("LOOSEPLAIN",`[v=\\s]*${h[d.MAINVERSIONLOOSE]}${h[d.PRERELEASELOOSE]}?${h[d.BUILD]}?`),k("LOOSE",`^${h[d.LOOSEPLAIN]}$`),k("GTLT","((?:<|>)?=?)"),k("XRANGEIDENTIFIERLOOSE",`${h[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),k("XRANGEIDENTIFIER",`${h[d.NUMERICIDENTIFIER]}|x|X|\\*`),k("XRANGEPLAIN",`[v=\\s]*(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:${h[d.PRERELEASE]})?${h[d.BUILD]}?)?)?`),k("XRANGEPLAINLOOSE",`[v=\\s]*(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:${h[d.PRERELEASELOOSE]})?${h[d.BUILD]}?)?)?`),k("XRANGE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAIN]}$`),k("XRANGELOOSE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAINLOOSE]}$`),k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),k("COERCE",`${h[d.COERCEPLAIN]}(?:$|[^\\d])`),k("COERCEFULL",h[d.COERCEPLAIN]+`(?:${h[d.PRERELEASE]})?(?:${h[d.BUILD]})?(?:$|[^\\d])`),k("COERCERTL",h[d.COERCE],!0),k("COERCERTLFULL",h[d.COERCEFULL],!0),k("LONETILDE","(?:~>?)"),k("TILDETRIM",`(\\s*)${h[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",k("TILDE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAIN]}$`),k("TILDELOOSE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAINLOOSE]}$`),k("LONECARET","(?:\\^)"),k("CARETTRIM",`(\\s*)${h[d.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",k("CARET",`^${h[d.LONECARET]}${h[d.XRANGEPLAIN]}$`),k("CARETLOOSE",`^${h[d.LONECARET]}${h[d.XRANGEPLAINLOOSE]}$`),k("COMPARATORLOOSE",`^${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]})$|^$`),k("COMPARATOR",`^${h[d.GTLT]}\\s*(${h[d.FULLPLAIN]})$|^$`),k("COMPARATORTRIM",`(\\s*)${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]}|${h[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",k("HYPHENRANGE",`^\\s*(${h[d.XRANGEPLAIN]})\\s+-\\s+(${h[d.XRANGEPLAIN]})\\s*$`),k("HYPHENRANGELOOSE",`^\\s*(${h[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[d.XRANGEPLAINLOOSE]})\\s*$`),k("STAR","(<|>)?=?\\s*\\*"),k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(js,js.exports);var Dr=js.exports;const Nh=Object.freeze({loose:!0}),Lh=Object.freeze({}),xh=t=>t?typeof t!="object"?Nh:t:Lh;var li=xh;const yo=/^[0-9]+$/,hc=(t,e)=>{const r=yo.test(t),n=yo.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:thc(e,t);var fc={compareIdentifiers:hc,rcompareIdentifiers:Th};const Qr=Fn,{MAX_LENGTH:bo,MAX_SAFE_INTEGER:Kr}=Bn,{safeRe:_o,t:Eo}=Dr,Ph=li,{compareIdentifiers:Gt}=fc;let $h=class gt{constructor(e,r){if(r=Ph(r),e instanceof gt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>bo)throw new TypeError(`version is longer than ${bo} characters`);Qr("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?_o[Eo.LOOSE]:_o[Eo.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Kr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Kr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Kr||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Gt(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Qe=$h;const So=Qe,Oh=(t,e,r=!1)=>{if(t instanceof So)return t;try{return new So(t,e)}catch(n){if(!r)return null;throw n}};var gr=Oh;const Bh=gr,Fh=(t,e)=>{const r=Bh(t,e);return r?r.version:null};var Dh=Fh;const jh=gr,Hh=(t,e)=>{const r=jh(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var Uh=Hh;const Mo=Qe,Vh=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Mo(t instanceof Mo?t.version:t,r).inc(e,n,i).version}catch{return null}};var Wh=Vh;const ko=gr,zh=(t,e)=>{const r=ko(t,null,!0),n=ko(e,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,c=s?r:n,u=s?n:r,h=!!c.prerelease.length;if(!!u.prerelease.length&&!h)return!u.patch&&!u.minor?"major":c.patch?"patch":c.minor?"minor":"major";const p=h?"pre":"";return r.major!==n.major?p+"major":r.minor!==n.minor?p+"minor":r.patch!==n.patch?p+"patch":"prerelease"};var qh=zh;const Jh=Qe,Gh=(t,e)=>new Jh(t,e).major;var Zh=Gh;const Qh=Qe,Kh=(t,e)=>new Qh(t,e).minor;var Xh=Kh;const Yh=Qe,ef=(t,e)=>new Yh(t,e).patch;var tf=ef;const rf=gr,nf=(t,e)=>{const r=rf(t,e);return r&&r.prerelease.length?r.prerelease:null};var sf=nf;const Co=Qe,of=(t,e,r)=>new Co(t,r).compare(new Co(e,r));var ut=of;const af=ut,cf=(t,e,r)=>af(e,t,r);var lf=cf;const uf=ut,df=(t,e)=>uf(t,e,!0);var hf=df;const Ro=Qe,ff=(t,e,r)=>{const n=new Ro(t,r),i=new Ro(e,r);return n.compare(i)||n.compareBuild(i)};var ui=ff;const gf=ui,pf=(t,e)=>t.sort((r,n)=>gf(r,n,e));var mf=pf;const vf=ui,wf=(t,e)=>t.sort((r,n)=>vf(n,r,e));var yf=wf;const bf=ut,_f=(t,e,r)=>bf(t,e,r)>0;var Dn=_f;const Ef=ut,Sf=(t,e,r)=>Ef(t,e,r)<0;var di=Sf;const Mf=ut,kf=(t,e,r)=>Mf(t,e,r)===0;var gc=kf;const Cf=ut,Rf=(t,e,r)=>Cf(t,e,r)!==0;var pc=Rf;const If=ut,Af=(t,e,r)=>If(t,e,r)>=0;var hi=Af;const Nf=ut,Lf=(t,e,r)=>Nf(t,e,r)<=0;var fi=Lf;const xf=gc,Tf=pc,Pf=Dn,$f=hi,Of=di,Bf=fi,Ff=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return xf(t,r,n);case"!=":return Tf(t,r,n);case">":return Pf(t,r,n);case">=":return $f(t,r,n);case"<":return Of(t,r,n);case"<=":return Bf(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var mc=Ff;const Df=Qe,jf=gr,{safeRe:Xr,t:Yr}=Dr,Hf=(t,e)=>{if(t instanceof Df)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Xr[Yr.COERCEFULL]:Xr[Yr.COERCE]);else{const h=e.includePrerelease?Xr[Yr.COERCERTLFULL]:Xr[Yr.COERCERTL];let d;for(;(d=h.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||d.index+d[0].length!==r.index+r[0].length)&&(r=d),h.lastIndex=d.index+d[1].length+d[2].length;h.lastIndex=-1}if(r===null)return null;const n=r[2],i=r[3]||"0",s=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return jf(`${n}.${i}.${s}${c}${u}`,e)};var Uf=Hf;class Vf{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}}var Wf=Vf,Rs,Io;function dt(){if(Io)return Rs;Io=1;const t=/\s+/g;class e{constructor(l,f){if(f=i(f),l instanceof e)return l.loose===!!f.loose&&l.includePrerelease===!!f.includePrerelease?l:new e(l.raw,f);if(l instanceof s)return this.raw=l.value,this.set=[[l]],this.formatted=void 0,this;if(this.options=f,this.loose=!!f.loose,this.includePrerelease=!!f.includePrerelease,this.raw=l.trim().replace(t," "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(v=>!N(v[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const v of this.set)if(v.length===1&&L(v[0])){this.set=[v];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let l=0;l0&&(this.formatted+="||");const f=this.set[l];for(let g=0;g0&&(this.formatted+=" "),this.formatted+=f[g].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(l){const g=((this.options.includePrerelease&&M)|(this.options.loose&&k))+":"+l,v=n.get(g);if(v)return v;const y=this.options.loose,S=y?h[d.HYPHENRANGELOOSE]:h[d.HYPHENRANGE];l=l.replace(S,J(this.options.includePrerelease)),c("hyphen replace",l),l=l.replace(h[d.COMPARATORTRIM],p),c("comparator trim",l),l=l.replace(h[d.TILDETRIM],b),c("tilde trim",l),l=l.replace(h[d.CARETTRIM],E),c("caret trim",l);let m=l.split(" ").map(R=>T(R,this.options)).join(" ").split(/\s+/).map(R=>U(R,this.options));y&&(m=m.filter(R=>(c("loose invalid filter",R,this.options),!!R.match(h[d.COMPARATORLOOSE])))),c("range list",m);const a=new Map,w=m.map(R=>new s(R,this.options));for(const R of w){if(N(R))return[R];a.set(R.value,R)}a.size>1&&a.has("")&&a.delete("");const x=[...a.values()];return n.set(g,x),x}intersects(l,f){if(!(l instanceof e))throw new TypeError("a Range is required");return this.set.some(g=>$(g,f)&&l.set.some(v=>$(v,f)&&g.every(y=>v.every(S=>y.intersects(S,f)))))}test(l){if(!l)return!1;if(typeof l=="string")try{l=new u(l,this.options)}catch{return!1}for(let f=0;fo.value==="<0.0.0-0",L=o=>o.value==="",$=(o,l)=>{let f=!0;const g=o.slice();let v=g.pop();for(;f&&g.length;)f=g.every(y=>v.intersects(y,l)),v=g.pop();return f},T=(o,l)=>(c("comp",o,l),o=P(o,l),c("caret",o),o=H(o,l),c("tildes",o),o=Fe(o,l),c("xrange",o),o=Y(o,l),c("stars",o),o),C=o=>!o||o.toLowerCase()==="x"||o==="*",H=(o,l)=>o.trim().split(/\s+/).map(f=>I(f,l)).join(" "),I=(o,l)=>{const f=l.loose?h[d.TILDELOOSE]:h[d.TILDE];return o.replace(f,(g,v,y,S,m)=>{c("tilde",o,g,v,y,S,m);let a;return C(v)?a="":C(y)?a=`>=${v}.0.0 <${+v+1}.0.0-0`:C(S)?a=`>=${v}.${y}.0 <${v}.${+y+1}.0-0`:m?(c("replaceTilde pr",m),a=`>=${v}.${y}.${S}-${m} <${v}.${+y+1}.0-0`):a=`>=${v}.${y}.${S} <${v}.${+y+1}.0-0`,c("tilde return",a),a})},P=(o,l)=>o.trim().split(/\s+/).map(f=>q(f,l)).join(" "),q=(o,l)=>{c("caret",o,l);const f=l.loose?h[d.CARETLOOSE]:h[d.CARET],g=l.includePrerelease?"-0":"";return o.replace(f,(v,y,S,m,a)=>{c("caret",o,v,y,S,m,a);let w;return C(y)?w="":C(S)?w=`>=${y}.0.0${g} <${+y+1}.0.0-0`:C(m)?y==="0"?w=`>=${y}.${S}.0${g} <${y}.${+S+1}.0-0`:w=`>=${y}.${S}.0${g} <${+y+1}.0.0-0`:a?(c("replaceCaret pr",a),y==="0"?S==="0"?w=`>=${y}.${S}.${m}-${a} <${y}.${S}.${+m+1}-0`:w=`>=${y}.${S}.${m}-${a} <${y}.${+S+1}.0-0`:w=`>=${y}.${S}.${m}-${a} <${+y+1}.0.0-0`):(c("no pr"),y==="0"?S==="0"?w=`>=${y}.${S}.${m}${g} <${y}.${S}.${+m+1}-0`:w=`>=${y}.${S}.${m}${g} <${y}.${+S+1}.0-0`:w=`>=${y}.${S}.${m} <${+y+1}.0.0-0`),c("caret return",w),w})},Fe=(o,l)=>(c("replaceXRanges",o,l),o.split(/\s+/).map(f=>ze(f,l)).join(" ")),ze=(o,l)=>{o=o.trim();const f=l.loose?h[d.XRANGELOOSE]:h[d.XRANGE];return o.replace(f,(g,v,y,S,m,a)=>{c("xRange",o,g,v,y,S,m,a);const w=C(y),x=w||C(S),R=x||C(m),B=R;return v==="="&&B&&(v=""),a=l.includePrerelease?"-0":"",w?v===">"||v==="<"?g="<0.0.0-0":g="*":v&&B?(x&&(S=0),m=0,v===">"?(v=">=",x?(y=+y+1,S=0,m=0):(S=+S+1,m=0)):v==="<="&&(v="<",x?y=+y+1:S=+S+1),v==="<"&&(a="-0"),g=`${v+y}.${S}.${m}${a}`):x?g=`>=${y}.0.0${a} <${+y+1}.0.0-0`:R&&(g=`>=${y}.${S}.0${a} <${y}.${+S+1}.0-0`),c("xRange return",g),g})},Y=(o,l)=>(c("replaceStars",o,l),o.trim().replace(h[d.STAR],"")),U=(o,l)=>(c("replaceGTE0",o,l),o.trim().replace(h[l.includePrerelease?d.GTE0PRE:d.GTE0],"")),J=o=>(l,f,g,v,y,S,m,a,w,x,R,B)=>(C(g)?f="":C(v)?f=`>=${g}.0.0${o?"-0":""}`:C(y)?f=`>=${g}.${v}.0${o?"-0":""}`:S?f=`>=${f}`:f=`>=${f}${o?"-0":""}`,C(w)?a="":C(x)?a=`<${+w+1}.0.0-0`:C(R)?a=`<${w}.${+x+1}.0-0`:B?a=`<=${w}.${x}.${R}-${B}`:o?a=`<${w}.${x}.${+R+1}-0`:a=`<=${a}`,`${f} ${a}`.trim()),_=(o,l,f)=>{for(let g=0;g0){const v=o[g].semver;if(v.major===l.major&&v.minor===l.minor&&v.patch===l.patch)return!0}return!1}return!0};return Rs}var Is,Ao;function jn(){if(Ao)return Is;Ao=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(p,b){if(b=r(b),p instanceof e){if(p.loose===!!b.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),c("comparator",p,b),this.options=b,this.loose=!!b.loose,this.parse(p),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(p){const b=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],E=p.match(b);if(!E)throw new TypeError(`Invalid comparator: ${p}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new u(E[2],this.options.loose):this.semver=t}toString(){return this.value}test(p){if(c("Comparator.test",p,this.options.loose),this.semver===t||p===t)return!0;if(typeof p=="string")try{p=new u(p,this.options)}catch{return!1}return s(p,this.operator,this.semver,this.options)}intersects(p,b){if(!(p instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h(p.value,b).test(this.value):p.operator===""?p.value===""?!0:new h(this.value,b).test(p.semver):(b=r(b),b.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!b.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||s(this.semver,"<",p.semver,b)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||s(this.semver,">",p.semver,b)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}Is=e;const r=li,{safeRe:n,t:i}=Dr,s=mc,c=Fn,u=Qe,h=dt();return Is}const zf=dt(),qf=(t,e,r)=>{try{e=new zf(e,r)}catch{return!1}return e.test(t)};var Hn=qf;const Jf=dt(),Gf=(t,e)=>new Jf(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Zf=Gf;const Qf=Qe,Kf=dt(),Xf=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Kf(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||i.compare(c)===-1)&&(n=c,i=new Qf(n,r))}),n};var Yf=Xf;const e0=Qe,t0=dt(),r0=(t,e,r)=>{let n=null,i=null,s=null;try{s=new t0(e,r)}catch{return null}return t.forEach(c=>{s.test(c)&&(!n||i.compare(c)===1)&&(n=c,i=new e0(n,r))}),n};var n0=r0;const As=Qe,s0=dt(),No=Dn,i0=(t,e)=>{t=new s0(t,e);let r=new As("0.0.0");if(t.test(r)||(r=new As("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{const u=new As(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!s||No(u,s))&&(s=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),s&&(!r||No(r,s))&&(r=s)}return r&&t.test(r)?r:null};var o0=i0;const a0=dt(),c0=(t,e)=>{try{return new a0(t,e).range||"*"}catch{return null}};var l0=c0;const u0=Qe,vc=jn(),{ANY:d0}=vc,h0=dt(),f0=Hn,Lo=Dn,xo=di,g0=fi,p0=hi,m0=(t,e,r,n)=>{t=new u0(t,n),e=new h0(e,n);let i,s,c,u,h;switch(r){case">":i=Lo,s=g0,c=xo,u=">",h=">=";break;case"<":i=xo,s=p0,c=Lo,u="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f0(t,e,n))return!1;for(let d=0;d{M.semver===d0&&(M=new vc(">=0.0.0")),b=b||M,E=E||M,i(M.semver,b.semver,n)?b=M:c(M.semver,E.semver,n)&&(E=M)}),b.operator===u||b.operator===h||(!E.operator||E.operator===u)&&s(t,E.semver))return!1;if(E.operator===h&&c(t,E.semver))return!1}return!0};var gi=m0;const v0=gi,w0=(t,e,r)=>v0(t,e,">",r);var y0=w0;const b0=gi,_0=(t,e,r)=>b0(t,e,"<",r);var E0=_0;const To=dt(),S0=(t,e,r)=>(t=new To(t,r),e=new To(e,r),t.intersects(e,r));var M0=S0;const k0=Hn,C0=ut;var R0=(t,e,r)=>{const n=[];let i=null,s=null;const c=t.sort((p,b)=>C0(p,b,r));for(const p of c)k0(p,e,r)?(s=p,i||(i=p)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const u=[];for(const[p,b]of n)p===b?u.push(p):!b&&p===c[0]?u.push("*"):b?p===c[0]?u.push(`<=${b}`):u.push(`${p} - ${b}`):u.push(`>=${p}`);const h=u.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return h.length{if(t===e)return!0;t=new Po(t,r),e=new Po(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const c=N0(i,s,r);if(n=n||c!==null,c)continue e}if(n)return!1}return!0},A0=[new pi(">=0.0.0-0")],$o=[new pi(">=0.0.0")],N0=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Ns){if(e.length===1&&e[0].semver===Ns)return!0;r.includePrerelease?t=A0:t=$o}if(e.length===1&&e[0].semver===Ns){if(r.includePrerelease)return!0;e=$o}const n=new Set;let i,s;for(const M of t)M.operator===">"||M.operator===">="?i=Oo(i,M,r):M.operator==="<"||M.operator==="<="?s=Bo(s,M,r):n.add(M.semver);if(n.size>1)return null;let c;if(i&&s){if(c=mi(i.semver,s.semver,r),c>0)return null;if(c===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const M of n){if(i&&!mr(M,String(i),r)||s&&!mr(M,String(s),r))return null;for(const k of e)if(!mr(M,String(k),r))return!1;return!0}let u,h,d,p,b=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;b&&b.prerelease.length===1&&s.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(const M of e){if(p=p||M.operator===">"||M.operator===">=",d=d||M.operator==="<"||M.operator==="<=",i){if(E&&M.semver.prerelease&&M.semver.prerelease.length&&M.semver.major===E.major&&M.semver.minor===E.minor&&M.semver.patch===E.patch&&(E=!1),M.operator===">"||M.operator===">="){if(u=Oo(i,M,r),u===M&&u!==i)return!1}else if(i.operator===">="&&!mr(i.semver,String(M),r))return!1}if(s){if(b&&M.semver.prerelease&&M.semver.prerelease.length&&M.semver.major===b.major&&M.semver.minor===b.minor&&M.semver.patch===b.patch&&(b=!1),M.operator==="<"||M.operator==="<="){if(h=Bo(s,M,r),h===M&&h!==s)return!1}else if(s.operator==="<="&&!mr(s.semver,String(M),r))return!1}if(!M.operator&&(s||i)&&c!==0)return!1}return!(i&&d&&!s&&c!==0||s&&p&&!i&&c!==0||E||b)},Oo=(t,e,r)=>{if(!t)return e;const n=mi(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Bo=(t,e,r)=>{if(!t)return e;const n=mi(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var L0=I0;const Ls=Dr,Fo=Bn,x0=Qe,Do=fc,T0=gr,P0=Dh,$0=Uh,O0=Wh,B0=qh,F0=Zh,D0=Xh,j0=tf,H0=sf,U0=ut,V0=lf,W0=hf,z0=ui,q0=mf,J0=yf,G0=Dn,Z0=di,Q0=gc,K0=pc,X0=hi,Y0=fi,e1=mc,t1=Uf,r1=jn(),n1=dt(),s1=Hn,i1=Zf,o1=Yf,a1=n0,c1=o0,l1=l0,u1=gi,d1=y0,h1=E0,f1=M0,g1=R0,p1=L0;var m1={parse:T0,valid:P0,clean:$0,inc:O0,diff:B0,major:F0,minor:D0,patch:j0,prerelease:H0,compare:U0,rcompare:V0,compareLoose:W0,compareBuild:z0,sort:q0,rsort:J0,gt:G0,lt:Z0,eq:Q0,neq:K0,gte:X0,lte:Y0,cmp:e1,coerce:t1,Comparator:r1,Range:n1,satisfies:s1,toComparators:i1,maxSatisfying:o1,minSatisfying:a1,minVersion:c1,validRange:l1,outside:u1,gtr:d1,ltr:h1,intersects:f1,simplifyRange:g1,subset:p1,SemVer:x0,re:Ls.re,src:Ls.src,tokens:Ls.t,SEMVER_SPEC_VERSION:Fo.SEMVER_SPEC_VERSION,RELEASE_TYPES:Fo.RELEASE_TYPES,compareIdentifiers:Do.compareIdentifiers,rcompareIdentifiers:Do.rcompareIdentifiers};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=m1,r=Vt,n=We;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",b=>(0,e.valid)(b)===null?`Expected SemVer version, got "${b}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",b=>(0,e.validRange)(b)===null?`Expected SemVer range, got "${b}"`:!0);function i(b){return(0,r.is)(b,t.VersionStruct)}t.isValidSemVerVersion=i;function s(b){return(0,r.is)(b,t.VersionRangeStruct)}t.isValidSemVerRange=s;function c(b){(0,n.assertStruct)(b,t.VersionStruct)}t.assertIsSemVerVersion=c;function u(b){(0,n.assertStruct)(b,t.VersionRangeStruct)}t.assertIsSemVerRange=u;function h(b,E){return(0,e.gt)(b,E)}t.gtVersion=h;function d(b,E){return(0,e.gtr)(b,E)}t.gtRange=d;function p(b,E){return(0,e.satisfies)(b,E,{includePrerelease:!0})}t.satisfiesVersionRange=p})(uc);(function(t){var e=O&&O.__createBinding||(Object.create?function(n,i,s,c){c===void 0&&(c=s);var u=Object.getOwnPropertyDescriptor(i,s);(!u||("get"in u?!i.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,c,u)}:function(n,i,s,c){c===void 0&&(c=s),n[c]=i[s]}),r=O&&O.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(We,t),r(Br,t),r(z,t),r($n,t),r(yt,t),r(or,t),r(nc,t),r(Fr,t),r(sc,t),r(ic,t),r(ar,t),r(oc,t),r(bt,t),r(ac,t),r(cc,t),r(lc,t),r(uc,t)})(Fa);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=Fa;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Ba);var wc=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.PollingBlockTracker=void 0;const v1=wc(ei),w1=wc(Uu),y1=Tr,jo=Ba,Ho=(0,jo.createModuleLogger)(jo.projectLogger,"polling-block-tracker"),b1=(0,v1.default)(),_1=1e3;class E1 extends y1.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*_1,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=Uo(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: +${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}const i=Uo(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:b1(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),Ho("Making request",e);const r=await(0,w1.default)(n=>this._provider.sendAsync(e,n))();if(Ho("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block: +${r.error.message}`);return r.result}}Tn.PollingBlockTracker=E1;function Uo(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}var Un={},S1=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Un,"__esModule",{value:!0});Un.SubscribeBlockTracker=void 0;const M1=S1(ei),k1=Tr,C1=(0,M1.default)();class R1 extends k1.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:C1(),method:e,params:r,jsonrpc:"2.0"},(s,c)=>{s?i(s):n(c.result)})})}_handleSubData(e,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}Un.SubscribeBlockTracker=R1;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,i,s,c){c===void 0&&(c=s),Object.defineProperty(n,c,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,c){c===void 0&&(c=s),n[c]=i[s]}),r=O&&O.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tn,t),r(Un,t)})(Oa);var vi={},Vn={},jr={};Object.defineProperty(jr,"__esModule",{value:!0});jr.getUniqueId=void 0;const yc=4294967295;let xs=Math.floor(Math.random()*yc);function I1(){return xs=(xs+1)%yc,xs}jr.getUniqueId=I1;Object.defineProperty(Vn,"__esModule",{value:!0});Vn.createIdRemapMiddleware=void 0;const A1=jr;function N1(){return(t,e,r,n)=>{const i=t.id,s=A1.getUniqueId();t.id=s,e.id=s,r(c=>{t.id=i,e.id=i,c()})}}Vn.createIdRemapMiddleware=N1;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.createAsyncMiddleware=void 0;function L1(t){return async(e,r,n,i)=>{let s;const c=new Promise(p=>{s=p});let u=null,h=!1;const d=async()=>{h=!0,n(p=>{u=p,s()}),await c};try{await t(e,r,d),h?(await c,u(null)):i(null)}catch(p){u?u(p):i(p)}}}Wn.createAsyncMiddleware=L1;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});zn.createScaffoldMiddleware=void 0;function x1(t){return(e,r,n,i)=>{const s=t[e.method];return s===void 0?n():typeof s=="function"?s(e,r,n,i):(r.result=s,i())}}zn.createScaffoldMiddleware=x1;var Hr={},wi={};Object.defineProperty(wi,"__esModule",{value:!0});const T1=na;function Vo(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function P1(t){const e=t.length,r=new Array(e);for(let n=0;n0&&([c]=r),c instanceof Error)throw c;const u=new Error(`Unhandled error.${c?` (${c.message})`:""}`);throw u.context=c,u}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")Vo(s,this,r);else{const c=s.length,u=P1(s);for(let h=0;h"u"&&(n=Ec()),Hs(t,"",0,[],void 0,0,n);var i;try{Bt.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Mc(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;jt.length!==0;){var s=jt.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function tr(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),jt.push([n,r,e,i])):Bt.push([e,r,t]):(n[r]=t,jt.push([n,r,e]))}function Hs(t,e,r,n,i,s,c){s+=1;var u;if(typeof t=="object"&&t!==null){for(u=0;uc.depthLimit){tr(sn,t,e,i);return}if(typeof c.edgesLimit<"u"&&r+1>c.edgesLimit){tr(sn,t,e,i);return}if(n.push(t),Array.isArray(t))for(u=0;ue?1:0}function Sc(t,e,r,n){typeof n>"u"&&(n=Ec());var i=Us(t,"",0,[],void 0,0,n)||t,s;try{Bt.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Mc(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;jt.length!==0;){var c=jt.pop();c.length===4?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function Us(t,e,r,n,i,s,c){s+=1;var u;if(typeof t=="object"&&t!==null){for(u=0;uc.depthLimit){tr(sn,t,e,i);return}if(typeof c.edgesLimit<"u"&&r+1>c.edgesLimit){tr(sn,t,e,i);return}if(n.push(t),Array.isArray(t))for(u=0;u0)for(var n=0;n=1e3&&t<=4999}function H1(t,e){if(e!=="[Circular]")return e}var yi={},At={};Object.defineProperty(At,"__esModule",{value:!0});At.errorValues=At.errorCodes=void 0;At.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};At.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=At,r=It,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:c(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function c(E,M=i){if(Number.isInteger(E)){const k=E.toString();if(b(e.errorValues,k))return e.errorValues[k].message;if(d(E))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return M}t.getMessageFromCode=c;function u(E){if(!Number.isInteger(E))return!1;const M=E.toString();return!!(e.errorValues[M]||d(E))}t.isValidCode=u;function h(E,{fallbackError:M=s,shouldIncludeStack:k=!1}={}){var N,L;if(!M||!Number.isInteger(M.code)||typeof M.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(E instanceof r.EthereumRpcError)return E.serialize();const $={};if(E&&typeof E=="object"&&!Array.isArray(E)&&b(E,"code")&&u(E.code)){const C=E;$.code=C.code,C.message&&typeof C.message=="string"?($.message=C.message,b(C,"data")&&($.data=C.data)):($.message=c($.code),$.data={originalError:p(E)})}else{$.code=M.code;const C=(N=E)===null||N===void 0?void 0:N.message;$.message=C&&typeof C=="string"?C:M.message,$.data={originalError:p(E)}}const T=(L=E)===null||L===void 0?void 0:L.stack;return k&&E&&T&&typeof T=="string"&&($.stack=T),$}t.serializeError=h;function d(E){return E>=-32099&&E<=-32e3}function p(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function b(E,M){return Object.prototype.hasOwnProperty.call(E,M)}})(yi);var qn={};Object.defineProperty(qn,"__esModule",{value:!0});qn.ethErrors=void 0;const bi=It,Cc=yi,Je=At;qn.ethErrors={rpc:{parse:t=>nt(Je.errorCodes.rpc.parse,t),invalidRequest:t=>nt(Je.errorCodes.rpc.invalidRequest,t),invalidParams:t=>nt(Je.errorCodes.rpc.invalidParams,t),methodNotFound:t=>nt(Je.errorCodes.rpc.methodNotFound,t),internal:t=>nt(Je.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return nt(e,t)},invalidInput:t=>nt(Je.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>nt(Je.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>nt(Je.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>nt(Je.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>nt(Je.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>nt(Je.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>vr(Je.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>vr(Je.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>vr(Je.errorCodes.provider.unsupportedMethod,t),disconnected:t=>vr(Je.errorCodes.provider.disconnected,t),chainDisconnected:t=>vr(Je.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new bi.EthereumProviderError(e,r,n)}}};function nt(t,e){const[r,n]=Rc(e);return new bi.EthereumRpcError(t,r||Cc.getMessageFromCode(t),n)}function vr(t,e){const[r,n]=Rc(e);return new bi.EthereumProviderError(t,r||Cc.getMessageFromCode(t),n)}function Rc(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=It;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=yi;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=qn;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=At;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(bc);var U1=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.JsonRpcEngine=void 0;const V1=U1(wi),st=bc;class _t extends V1.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return async(e,r,n,i)=>{try{const[s,c,u]=await _t._runAllMiddleware(e,r,this._middleware);return c?(await _t._runReturnHandlers(u),i(s)):n(async h=>{try{await _t._runReturnHandlers(u)}catch(d){return h(d)}return h()})}catch(s){return i(s)}}}async _handleBatch(e,r){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!="object"){const c=new st.EthereumRpcError(st.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(c,{id:void 0,jsonrpc:"2.0",error:c})}if(typeof e.method!="string"){const c=new st.EthereumRpcError(st.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(c,{id:e.id,jsonrpc:"2.0",error:c})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(c){s=c}return s&&(delete i.result,i.error||(i.error=st.serializeError(s))),r(s,i)}async _processRequest(e,r){const[n,i,s]=await _t._runAllMiddleware(e,r,this._middleware);if(_t._checkForCompletion(e,r,i),await _t._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,r,n){const i=[];let s=null,c=!1;for(const u of n)if([s,c]=await _t._runMiddleware(e,r,u,i),c)break;return[s,c,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(s=>{const c=h=>{const d=h||r.error;d&&(r.error=st.serializeError(d)),s([d,!0])},u=h=>{r.error?c(r.error):(h&&(typeof h!="function"&&c(new st.EthereumRpcError(st.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof h}" for request: +${Ts(e)}`,{request:e})),i.push(h)),s([null,!1]))};try{n(e,r,u,c)}catch(h){c(h)}})}static async _runReturnHandlers(e){for(const r of e)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new st.EthereumRpcError(st.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: +${Ts(e)}`,{request:e});if(!n)throw new st.EthereumRpcError(st.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: +${Ts(e)}`,{request:e})}}Hr.JsonRpcEngine=_t;function Ts(t){return JSON.stringify(t,null,2)}var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.mergeMiddleware=void 0;const W1=Hr;function z1(t){const e=new W1.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}Jn.mergeMiddleware=z1;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,i,s,c){c===void 0&&(c=s),Object.defineProperty(n,c,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,c){c===void 0&&(c=s),n[c]=i[s]}),r=O&&O.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vn,t),r(Wn,t),r(zn,t),r(jr,t),r(Hr,t),r(Jn,t)})(vi);var Ic={},_i={};const Ei=ra(Tc);var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});var Wo=Ei,q1=function(){function t(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return t.prototype.acquire=function(){var e=this,r=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return r||this._dispatch(),n},t.prototype.runExclusive=function(e){return Wo.__awaiter(this,void 0,void 0,function(){var r,n,i;return Wo.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:r=s.sent(),n=r[0],i=r[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},t.prototype._dispatch=function(){var e=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},r([this._value--,this._currentReleaser])}},t}();Gn.default=q1;Object.defineProperty(_i,"__esModule",{value:!0});var zo=Ei,J1=Gn,G1=function(){function t(){this._semaphore=new J1.default(1)}return t.prototype.acquire=function(){return zo.__awaiter(this,void 0,void 0,function(){var e,r;return zo.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),r=e[1],[2,r]}})})},t.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();_i.default=G1;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.withTimeout=void 0;var en=Ei;function Z1(t,e,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return en.__awaiter(n,void 0,void 0,function(){var c,u,h;return en.__generator(this,function(d){switch(d.label){case 0:return c=!1,setTimeout(function(){c=!0,s(r)},e),[4,t.acquire()];case 1:return u=d.sent(),c?(h=Array.isArray(u)?u[1]:u,h()):i(u),[2]}})})})},runExclusive:function(i){return en.__awaiter(this,void 0,void 0,function(){var s,c;return en.__generator(this,function(u){switch(u.label){case 0:s=function(){},u.label=1;case 1:return u.trys.push([1,,7,8]),[4,this.acquire()];case 2:return c=u.sent(),Array.isArray(c)?(s=c[1],[4,i(c[0])]):[3,4];case 3:return[2,u.sent()];case 4:return s=c,[4,i()];case 5:return[2,u.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}Zn.withTimeout=Z1;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=t.Semaphore=t.Mutex=void 0;var e=_i;Object.defineProperty(t,"Mutex",{enumerable:!0,get:function(){return e.default}});var r=Gn;Object.defineProperty(t,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=Zn;Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(Ic);var Q1=X1,K1=Object.prototype.hasOwnProperty;function X1(){for(var t={},e=0;efunction(...i){const s=e.promiseModule;return new s((c,u)=>{e.multiArgs?i.push((...d)=>{e.errorFirst?d[0]?u(d):(d.shift(),c(d)):c(d)}):e.errorFirst?i.push((d,p)=>{d?u(d):c(p)}):i.push(c),Reflect.apply(t,this===r?n:this,i)})},Jo=new WeakMap;var ng=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);const n=(c,u)=>{let h=Jo.get(c);if(h||(h={},Jo.set(c,h)),u in h)return h[u];const d=k=>typeof k=="string"||typeof u=="symbol"?u===k:k.test(u),p=Reflect.getOwnPropertyDescriptor(c,u),b=p===void 0||p.writable||p.configurable,M=(e.include?e.include.some(d):!e.exclude.some(d))&&b;return h[u]=M,M},i=new WeakMap,s=new Proxy(t,{apply(c,u,h){const d=i.get(c);if(d)return Reflect.apply(d,u,h);const p=e.excludeMain?c:qo(c,e,s,c);return i.set(c,p),Reflect.apply(p,u,h)},get(c,u){const h=c[u];if(!n(c,u)||h===Function.prototype[u])return h;const d=i.get(h);if(d)return d;if(typeof h=="function"){const p=qo(h,e,s,c);return i.set(h,p),p}return h}});return s};const sg=Pr.default;let ig=class extends sg{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(r=>this.emit("update",r))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}};var Si=ig;const og=Si;let ag=class extends og{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}};var cg=ag,Vr={minBlockRef:lg,maxBlockRef:ug,sortBlockRefs:Mi,bnToHex:dg,blockRefIsNumber:hg,hexToInt:on,incrementHexInt:fg,intToHex:Ac,unsafeRandomBytes:gg};function lg(...t){return Mi(t)[0]}function ug(...t){const e=Mi(t);return e[e.length-1]}function Mi(t){return t.sort((e,r)=>e==="latest"||r==="earliest"?1:r==="latest"||e==="earliest"?-1:on(e)-on(r))}function dg(t){return"0x"+t.toString(16)}function hg(t){return t&&!["earliest","latest","pending"].includes(t)}function on(t){return t==null?t:Number.parseInt(t,16)}function fg(t){if(t==null)return t;const e=on(t);return Ac(e+1)}function Ac(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function gg(t){let e="0x";for(let r=0;rn.toLowerCase()))}async initialize({currentBlock:e}){let r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),r==="earliest"&&(r="0x0"),this.params.fromBlock=r;const n=yg(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:r}){const n=r;let i;e?i=wg(e):i=r;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),u=(await this._fetchLogs(s)).filter(h=>this.matchLog(h));this.addResults(u)}async _fetchLogs(e){return await mg(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(tn(this.params.fromBlock)>=tn(e.blockNumber)||bg(this.params.toBlock)&&tn(this.params.toBlock)<=tn(e.blockNumber))return!1;const r=e.address&&e.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,s)=>{let c=e.topics[s];if(!c)return!1;c=c.toLowerCase();let u=Array.isArray(i)?i:[i];return u.includes(null)?!0:(u=u.map(p=>p.toLowerCase()),u.includes(c))})}};var Eg=_g,ki=Sg;async function Sg({provider:t,fromBlock:e,toBlock:r}){e||(e=r);const n=Zo(e),s=Zo(r)-n+1,c=Array(s).fill().map((h,d)=>n+d).map(Mg);let u=await Promise.all(c.map(h=>Cg(t,"eth_getBlockByNumber",[h,!1])));return u=u.filter(h=>h!==null),u}function Zo(t){return t==null?t:Number.parseInt(t,16)}function Mg(t){return t==null?t:"0x"+t.toString(16)}function kg(t,e){return new Promise((r,n)=>{t.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?r(s.result):n(new Error("Result was empty"))})})}async function Cg(t,e,r){for(let n=0;n<3;n++)try{return await kg(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}const Rg=Si,Ig=ki,{incrementHexInt:Ag}=Vr;let Ng=class extends Rg{constructor({provider:e,params:r}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:r}){const n=r,i=Ag(e),c=(await Ig({provider:this.provider,fromBlock:i,toBlock:n})).map(u=>u.hash);this.addResults(c)}};var Lg=Ng;const xg=Si,Tg=ki,{incrementHexInt:Pg}=Vr;let $g=class extends xg{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const r=e,n=Pg(e),i=await Tg({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(const c of i)s.push(...c.transactions);this.addResults(s)}};var Og=$g;const Bg=Ic.Mutex,{createAsyncMiddleware:Fg,createScaffoldMiddleware:Dg}=vi,jg=Eg,Hg=Lg,Ug=Og,{intToHex:Nc,hexToInt:Ps}=Vr;var Vg=Wg;function Wg({blockTracker:t,provider:e}){let r=0,n={};const i=new Bg,s=zg({mutex:i}),c=Dg({eth_newFilter:s($s(h)),eth_newBlockFilter:s($s(d)),eth_newPendingTransactionFilter:s($s(p)),eth_uninstallFilter:s(nn(M)),eth_getFilterChanges:s(nn(b)),eth_getFilterLogs:s(nn(E))}),u=async({oldBlock:T,newBlock:C})=>{if(n.length===0)return;const H=await i.acquire();try{await Promise.all(Zt(n).map(async I=>{try{await I.update({oldBlock:T,newBlock:C})}catch(P){console.error(P)}}))}catch(I){console.error(I)}H()};return c.newLogFilter=h,c.newBlockFilter=d,c.newPendingTransactionFilter=p,c.uninstallFilter=M,c.getFilterChanges=b,c.getFilterLogs=E,c.destroy=()=>{L()},c;async function h(T){const C=new jg({provider:e,params:T});return await k(C),C}async function d(){const T=new Hg({provider:e});return await k(T),T}async function p(){const T=new Ug({provider:e});return await k(T),T}async function b(T){const C=Ps(T),H=n[C];if(!H)throw new Error(`No filter for index "${C}"`);return H.getChangesAndClear()}async function E(T){const C=Ps(T),H=n[C];if(!H)throw new Error(`No filter for index "${C}"`);let I=[];return H.type==="log"&&(I=H.getAllResults()),I}async function M(T){const C=Ps(T),I=!!n[C];return I&&await N(C),I}async function k(T){const C=Zt(n).length,H=await t.getLatestBlock();await T.initialize({currentBlock:H}),r++,n[r]=T,T.id=r,T.idHex=Nc(r);const I=Zt(n).length;return $({prevFilterCount:C,newFilterCount:I}),r}async function N(T){const C=Zt(n).length;delete n[T];const H=Zt(n).length;$({prevFilterCount:C,newFilterCount:H})}async function L(){const T=Zt(n).length;n={},$({prevFilterCount:T,newFilterCount:0})}function $({prevFilterCount:T,newFilterCount:C}){if(T===0&&C>0){t.on("sync",u);return}if(T>0&&C===0){t.removeListener("sync",u);return}}}function $s(t){return nn(async(...e)=>{const r=await t(...e);return Nc(r.id)})}function nn(t){return Fg(async(e,r)=>{const n=await t.apply(null,e.params);r.result=n})}function zg({mutex:t}){return e=>async(r,n,i,s)=>{(await t.acquire())(),e(r,n,i,s)}}function Zt(t,e){const r=[];for(let n in t)r.push(t[n]);return r}const qg=Pr.default,{createAsyncMiddleware:Qo,createScaffoldMiddleware:Jg}=vi,Gg=Vg,{unsafeRandomBytes:Zg,incrementHexInt:Qg}=Vr,Kg=ki;var Xg=Yg;function Yg({blockTracker:t,provider:e}){const r={},n=Gg({blockTracker:t,provider:e});let i=!1;const s=new qg,c=Jg({eth_subscribe:Qo(u),eth_unsubscribe:Qo(h)});return c.destroy=p,{events:s,middleware:c};async function u(b,E){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const M=b.params[0],k=Zg(16);let N;switch(M){case"newHeads":N=L({subId:k});break;case"logs":const T=b.params[1],C=await n.newLogFilter(T);N=$({subId:k,filter:C});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${M}"`)}r[k]=N,E.result=k;return;function L({subId:T}){const C={type:M,destroy:async()=>{t.removeListener("sync",C.update)},update:async({oldBlock:H,newBlock:I})=>{const P=I,q=Qg(H);(await Kg({provider:e,fromBlock:q,toBlock:P})).map(ep).filter(Y=>Y!==null).forEach(Y=>{d(T,Y)})}};return t.on("sync",C.update),C}function $({subId:T,filter:C}){return C.on("update",I=>d(T,I)),{type:M,destroy:async()=>await n.uninstallFilter(C.idHex)}}}async function h(b,E){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const M=b.params[0],k=r[M];if(!k){E.result=!1;return}delete r[M],await k.destroy(),E.result=!0}function d(b,E){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:b,result:E}})}function p(){s.removeAllListeners();for(const b in r)r[b].destroy(),delete r[b];i=!0}}function ep(t){return t==null?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}Object.defineProperty(xn,"__esModule",{value:!0});xn.SubscriptionManager=void 0;const tp=Oa,rp=Xg,Ko=()=>{};class np{constructor(e){const r=new tp.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=rp({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){const r={};return await this.subscriptionMiddleware(e,r,Ko,Ko),r}destroy(){this.subscriptionMiddleware.destroy()}}xn.SubscriptionManager=np;var Lc=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rr,"__esModule",{value:!0});rr.CoinbaseWalletProvider=void 0;const sp=Lc(un),ip=Pc,V=Mr,D=A,op=Ir,Xo=it,rn=dr,Ye=cr,Os=Lc(Bu),wr=ur,ap=ir,cp=xn,Yo="DefaultChainId",ea="DefaultJsonRpcUrl";class lp extends ip.EventEmitter{constructor(e){var r,n;super(),this._filterPolyfill=new ap.FilterPolyfill(this),this._subscriptionManager=new cp.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;const i=this.getChainId(),s=(0,D.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const c=this._storage.getItem(Xo.LOCAL_STORAGE_ADDRESSES_KEY);if(c){const u=c.split(" ");u[0]!==""&&(this._addresses=u.map(h=>(0,D.ensureAddressString)(h)),this.emit("accountsChanged",u))}this._subscriptionManager.events.on("notification",u=>{this.emit("message",{type:u.method,data:u.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",u=>{var h;if(!(u.origin!==location.origin||u.source!==window)&&u.data.type==="walletLinkMessage"&&u.data.data.action==="dappChainSwitched"){const d=u.data.data.chainId,p=(h=u.data.data.jsonRpcUrl)!==null&&h!==void 0?h:this.jsonRpcUrl;this.updateProviderInfo(p,Number(d))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,D.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(ea))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(ea,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,r){this.jsonRpcUrl=e;const n=this.getChainId();this._storage.setItem(Yo,r.toString(10)),((0,D.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,s,c){const h=await(await this.initializeRelay()).watchAsset(e,r,n,i,s,c==null?void 0:c.toString()).promise;return(0,Ye.isErrorResponse)(h)?!1:!!h.result}async addEthereumChain(e,r,n,i,s,c){var u,h;if((0,D.ensureIntNumber)(e)===this.getChainId())return!1;const d=await this.initializeRelay(),p=d.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!p&&await d.requestEthereumAccounts().promise;const b=await d.addEthereumChain(e.toString(),r,s,n,i,c).promise;return(0,Ye.isErrorResponse)(b)?!1:(((u=b.result)===null||u===void 0?void 0:u.isApproved)===!0&&this.updateProviderInfo(r[0],e),((h=b.result)===null||h===void 0?void 0:h.isApproved)===!0)}async switchEthereumChain(e){const n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,Ye.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===V.standardErrorCodes.provider.unsupportedChain?V.standardErrors.provider.unsupportedChain():V.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,r){this.initializeRelay().then(n=>n.setAppInfo(e,r))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(wr.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?rn.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,r){try{const n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,V.serializeError)(i,e)})}catch(n){throw(0,V.serializeError)(n,e)}}_send(e,r){if(typeof e=="string"){const i=e,s=Array.isArray(r)?r:r!==void 0?[r]:[],c={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(c).then(u=>u.result)}if(typeof r=="function"){const i=e,s=r;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));const n=e;return this._sendRequest(n)}async sendAsync(e,r){try{return this._sendAsync(e,r).catch(n=>{throw(0,V.serializeError)(n,e)})}catch(n){return Promise.reject((0,V.serializeError)(n,e))}}async _sendAsync(e,r){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(e)){const i=r;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}const n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(r=>{throw(0,V.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,V.serializeError)(r,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw V.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw V.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw V.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){const n=await(await this.initializeRelay()).scanQRCode((0,D.ensureRegExpString)(e)).promise;if((0,Ye.isErrorResponse)(n))throw(0,V.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,V.serializeError)("result was not a string","scanQRCode");return n.result}async genericRequest(e,r){const i=await(await this.initializeRelay()).genericRequest(e,r).promise;if((0,Ye.isErrorResponse)(i))throw(0,V.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,V.serializeError)("result was not a string","generic");return i.result}async connectAndSignIn(e){var r;(r=this.diagnostic)===null||r===void 0||r.log(wr.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?rn.Session.hash(this._relay.session.id):void 0});let n;try{const s=await this.initializeRelay();if(!(s instanceof op.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=await s.connectAndSignIn(e).promise,(0,Ye.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?V.standardErrors.provider.userRejectedRequest("User denied account authorization"):s}if(!n.result)throw new Error("accounts received is empty");const{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(e){const n=await(await this.initializeRelay()).selectProvider(e).promise;if((0,Ye.isErrorResponse)(n))throw(0,V.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,V.serializeError)("result was not a string","selectProvider");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const r={jsonrpc:"2.0",id:e.id},{method:n}=e;if(r.result=this._handleSynchronousMethods(e),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(e,r){if(!Array.isArray(e))throw new Error("addresses is not an array");const n=e.map(i=>(0,D.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(Xo.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(u=>r(Object.assign(Object.assign({},u),{id:e.id}))).catch(u=>n(u));return}const c=this._handleSubscriptionMethods(e);if(c!==void 0){c.then(u=>r({jsonrpc:"2.0",id:e.id,result:u.result})).catch(u=>n(u));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(e){const{method:r}=e,n=e.params||[];switch(r){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:r}=e,n=e.params||[];switch(r){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(s=>{var c;throw(s.code===V.standardErrorCodes.rpc.methodNotFound||s.code===V.standardErrorCodes.rpc.methodNotSupported)&&((c=this.diagnostic)===null||c===void 0||c.log(wr.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?rn.Session.hash(this._relay.session.id):void 0})),s})}_handleAsynchronousFilterMethods(e){const{method:r}=e,n=e.params||[];switch(r){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const r=(0,D.ensureAddressString)(e);return this._addresses.map(i=>(0,D.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){var r;if(!this._isKnownAddress(e))throw(r=this.diagnostic)===null||r===void 0||r.log(wr.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const r=e.from?(0,D.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);const n=e.to?(0,D.ensureAddressString)(e.to):null,i=e.value!=null?(0,D.ensureBN)(e.value):new sp.default(0),s=e.data?(0,D.ensureBuffer)(e.data):Buffer.alloc(0),c=e.nonce!=null?(0,D.ensureIntNumber)(e.nonce):null,u=e.gasPrice!=null?(0,D.ensureBN)(e.gasPrice):null,h=e.maxFeePerGas!=null?(0,D.ensureBN)(e.maxFeePerGas):null,d=e.maxPriorityFeePerGas!=null?(0,D.ensureBN)(e.maxPriorityFeePerGas):null,p=e.gas!=null?(0,D.ensureBN)(e.gas):null,b=e.chainId?(0,D.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:c,gasPriceInWei:u,maxFeePerGas:h,maxPriorityFeePerGas:d,gasLimit:p,chainId:b}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw V.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw V.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{const c=await(await this.initializeRelay()).signEthereumMessage(e,r,n,i).promise;if((0,Ye.isErrorResponse)(c))throw new Error(c.errorMessage);return{jsonrpc:"2.0",id:0,result:c.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?V.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,r,n){const s=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise;if((0,Ye.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,D.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(Yo);if(!e)return(0,D.ensureIntNumber)(this._chainIdFromOpts);const r=parseInt(e,10);return(0,D.ensureIntNumber)(r)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(wr.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?rn.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{if(r=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,Ye.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?V.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const r=(0,D.ensureAddressString)(e[0]),n=(0,D.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){const r=(0,D.ensureBuffer)(e[0]),n=(0,D.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();const r=(0,D.ensureBuffer)(e[0]),n=(0,D.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){const r=(0,D.ensureBuffer)(e[0]),n=(0,D.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signEthereumTransaction(r).promise;if((0,Ye.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?V.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const r=(0,D.ensureBuffer)(e[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise;if((0,Ye.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{const i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise;if((0,Ye.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?V.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const r=(0,D.ensureParsedJSONObject)(e[0]),n=(0,D.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=Os.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const r=(0,D.ensureAddressString)(e[0]),n=(0,D.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=Os.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const r=(0,D.ensureAddressString)(e[0]),n=(0,D.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=Os.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _cbwallet_arbitrary(e){const r=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof r!="object"||r===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(e){var r,n,i,s;const c=e[0];if(((r=c.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!c.chainName||c.chainName.trim()==="")throw V.standardErrors.rpc.invalidParams("chainName is a required field");if(!c.nativeCurrency)throw V.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const u=parseInt(c.chainId,16);return await this.addEthereumChain(u,(n=c.rpcUrls)!==null&&n!==void 0?n:[],(i=c.blockExplorerUrls)!==null&&i!==void 0?i:[],c.chainName,(s=c.iconUrls)!==null&&s!==void 0?s:[],c.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const r=Array.isArray(e)?e[0]:e;if(!r.type)throw V.standardErrors.rpc.invalidParams("Type is required");if((r==null?void 0:r.type)!=="ERC20")throw V.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!(r!=null&&r.options))throw V.standardErrors.rpc.invalidParams("Options are required");if(!(r!=null&&r.options.address))throw V.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:c,decimals:u}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,s,u,c,n)}}_eth_uninstallFilter(e){const r=(0,D.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(e){const r=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const r=(0,D.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){const r=(0,D.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}}rr.CoinbaseWalletProvider=lp;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.RelayEventManager=void 0;const up=A;class dp{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,r=(0,up.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}Qn.RelayEventManager=dp;Object.defineProperty(br,"__esModule",{value:!0});br.CoinbaseWalletSDK=void 0;const hp=cn,fp=ln,ta=A,gp=pn,pp=rr,mp=Ir,vp=xr,wp=Qn,yp=Nr,bp=Ar,xc=lr;class Kn{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||fp.LINK_API_URL;typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const c=new URL(s),u=`${c.protocol}//${c.host}`;if(this._storage=new gp.ScopedLocalStorage(`-walletlink:${u}`),this._storage.setItem("version",Kn.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new wp.RelayEventManager;const h=(0,ta.isMobileWeb)(),d=e.uiConstructor||(b=>h?new vp.MobileRelayUI(b):new yp.WalletLinkRelayUI(b)),p={linkAPIUrl:s,version:xc.LIB_VERSION,darkMode:!!e.darkMode,headlessMode:!!e.headlessMode,uiConstructor:d,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=h?new mp.MobileRelay(p):new bp.WalletLinkRelay(p),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",r=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new pp.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||"DApp",this._appLogoUrl=r||(0,ta.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const r=this===null||this===void 0?void 0:this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,hp.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{const n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}}br.CoinbaseWalletSDK=Kn;Kn.VERSION=xc.LIB_VERSION;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const e=br,r=rr;var n=br;Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=rr;Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),t.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(sa);const _p=$c(sa),$p=Object.freeze(Object.defineProperty({__proto__:null,default:_p},Symbol.toStringTag,{value:"Module"}));export{$p as i}; diff --git a/assets/index-CB5etGIE.js b/assets/index-CB5etGIE.js new file mode 100644 index 0000000..dfc23ad --- /dev/null +++ b/assets/index-CB5etGIE.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BR8S8Tjb.js","assets/index-B5bDTh7Y.js","assets/index-_hnmUMA-.css"])))=>i.map(i=>d[i]); +import{_ as fe}from"./index-B5bDTh7Y.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)},z={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_RPC_NODE_URL:"https://eth-sepolia.g.alchemy.com/v2/pDSMvqEHCLgbBdL7oUaDer8HxBx24hDu",VITE_WALLET_CONNECT_PROJECT_ID:"933e43f98ac5ea20f4a52778ffa16051"},q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[g,v]),Reflect.ownKeys(n).forEach(P=>{if(Object.getOwnPropertyDescriptor(v,P))return;const O=Reflect.get(n,P),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,H]=A.get(O);M.value=c(b,H(),I)}Object.defineProperty(v,P,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const y=new Set,v=(i,a=++f[0])=>{I!==a&&(I=a,y.forEach(o=>o(i,a)))};let P=f[1];const O=(i=++f[1])=>(P!==i&&!y.size&&(P=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],v(h,o)},b=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(y.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},Z=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},ue=i=>(y.add(i),y.size===1&&b.forEach(([o,h],S)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(S));b.set(S,[o,T])}),()=>{y.delete(i),y.size===0&&b.forEach(([o,h],S)=>{h&&(h(),b.set(S,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),V=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&v(["delete",[a],o]),h},set(i,a,o,h){const S=Reflect.has(i,a),T=Reflect.get(i,a,h);if(S&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;Z(a),q(o)&&(o=ge(o)||o);let $=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[a],C])});else{!A.has(o)&&s(o)&&($=W(o));const C=!x.has($)&&A.get($);C&&H(a,C)}return Reflect.set(i,a,$,h),v(["set",[a],o,T]),!0}});m.set(n,V);const pe=[J,O,c,ue];return A.set(V,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&(V[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),V})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function U(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return U(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return U(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Oe.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const D={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ae=p.isMobile(),L=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Re={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await D.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ae?await D.getMobileListings(m):await D.getDesktopListings(m);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ae?await D.getMobileListings(t):await D.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return L[g]={listings:[...L[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return D.getWalletImageUrl(e)},getAssetImageUrl(e){return D.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return U(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var De=Object.defineProperty,ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))Ue.call(t,s)&&le(e,s,t[s]);return e};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:Se()?"dark":"light"}),ce={state:R,subscribe(e){return U(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Pe({},s))}},_=j({open:!1,message:"",variant:"success"}),Ve={state:_,subscribe(e){return U(_,()=>e(_))},openToast(e,t){_.open=!0,_.message=e,_.variant=t},closeToast(){_.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-BR8S8Tjb.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const $e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,$e as i,ce as n,Ve as o,w as p,F as s,Re as t,N as y}; diff --git a/assets/index-Y3Spvhtd.js b/assets/index-Y3Spvhtd.js new file mode 100644 index 0000000..e3f39be --- /dev/null +++ b/assets/index-Y3Spvhtd.js @@ -0,0 +1 @@ +import{c as M,e as nn,g as rn}from"./index-B5bDTh7Y.js";import{j as sn,s as an,r as vt,a as _t,b as on}from"./hooks.module-D8pHM5EM.js";var Et={},te={},me={};Object.defineProperty(me,"__esModule",{value:!0});me.walletLogo=void 0;const cn=(n,e)=>{let t;switch(n){case"standard":return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=e,`data:image/svg+xml,%3Csvg width='${e}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};me.walletLogo=cn;var be={},j={},U={};Object.defineProperty(U,"__esModule",{value:!0});U.errorValues=U.standardErrorCodes=void 0;U.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};U.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var ye={},$e={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.serialize=n.getErrorCode=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=U,t="Unspecified error message.";n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(d,p=t){if(d&&Number.isInteger(d)){const m=d.toString();if(h(e.errorValues,m))return e.errorValues[m].message;if(c(d))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return p}n.getMessageFromCode=r;function s(d){if(!Number.isInteger(d))return!1;const p=d.toString();return!!(e.errorValues[p]||c(d))}n.isValidCode=s;function i(d){var p;if(typeof d=="number")return d;if(a(d))return(p=d.code)!==null&&p!==void 0?p:d.errorCode}n.getErrorCode=i;function a(d){return typeof d=="object"&&d!==null&&(typeof d.code=="number"||typeof d.errorCode=="number")}function o(d,{shouldIncludeStack:p=!1}={}){const m={};if(d&&typeof d=="object"&&!Array.isArray(d)&&h(d,"code")&&s(d.code)){const B=d;m.code=B.code,B.message&&typeof B.message=="string"?(m.message=B.message,h(B,"data")&&(m.data=B.data)):(m.message=r(m.code),m.data={originalError:l(d)})}else m.code=e.standardErrorCodes.rpc.internal,m.message=f(d,"message")?d.message:t,m.data={originalError:l(d)};return p&&(m.stack=f(d,"stack")?d.stack:void 0),m}n.serialize=o;function c(d){return d>=-32099&&d<=-32e3}function l(d){return d&&typeof d=="object"&&!Array.isArray(d)?Object.assign({},d):d}function h(d,p){return Object.prototype.hasOwnProperty.call(d,p)}function f(d,p){return typeof d=="object"&&d!==null&&p in d&&typeof d[p]=="string"}})($e);Object.defineProperty(ye,"__esModule",{value:!0});ye.standardErrors=void 0;const v=U,St=$e;ye.standardErrors={rpc:{parse:n=>C(v.standardErrorCodes.rpc.parse,n),invalidRequest:n=>C(v.standardErrorCodes.rpc.invalidRequest,n),invalidParams:n=>C(v.standardErrorCodes.rpc.invalidParams,n),methodNotFound:n=>C(v.standardErrorCodes.rpc.methodNotFound,n),internal:n=>C(v.standardErrorCodes.rpc.internal,n),server:n=>{if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=n;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return C(e,n)},invalidInput:n=>C(v.standardErrorCodes.rpc.invalidInput,n),resourceNotFound:n=>C(v.standardErrorCodes.rpc.resourceNotFound,n),resourceUnavailable:n=>C(v.standardErrorCodes.rpc.resourceUnavailable,n),transactionRejected:n=>C(v.standardErrorCodes.rpc.transactionRejected,n),methodNotSupported:n=>C(v.standardErrorCodes.rpc.methodNotSupported,n),limitExceeded:n=>C(v.standardErrorCodes.rpc.limitExceeded,n)},provider:{userRejectedRequest:n=>$(v.standardErrorCodes.provider.userRejectedRequest,n),unauthorized:n=>$(v.standardErrorCodes.provider.unauthorized,n),unsupportedMethod:n=>$(v.standardErrorCodes.provider.unsupportedMethod,n),disconnected:n=>$(v.standardErrorCodes.provider.disconnected,n),chainDisconnected:n=>$(v.standardErrorCodes.provider.chainDisconnected,n),unsupportedChain:n=>$(v.standardErrorCodes.provider.unsupportedChain,n),custom:n=>{if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:r}=n;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new It(e,t,r)}}};function C(n,e){const[t,r]=Ct(e);return new kt(n,t||(0,St.getMessageFromCode)(n),r)}function $(n,e){const[t,r]=Ct(e);return new It(n,t||(0,St.getMessageFromCode)(n),r)}function Ct(n){if(n){if(typeof n=="string")return[n];if(typeof n=="object"&&!Array.isArray(n)){const{message:e,data:t}=n;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}class kt extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,r!==void 0&&(this.data=r)}}class It extends kt{constructor(e,t,r){if(!dn(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}function dn(n){return Number.isInteger(n)&&n>=1e3&&n<=4999}(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.standardErrors=n.standardErrorCodes=void 0;var e=U;Object.defineProperty(n,"standardErrorCodes",{enumerable:!0,get:function(){return e.standardErrorCodes}});var t=ye;Object.defineProperty(n,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}})})(j);var we={},Q={};Object.defineProperty(Q,"__esModule",{value:!0});Q.isErrorResponse=void 0;function ln(n){return n.errorMessage!==void 0}Q.isErrorResponse=ln;var K={};Object.defineProperty(K,"__esModule",{value:!0});K.LIB_VERSION=void 0;K.LIB_VERSION="4.0.4";Object.defineProperty(we,"__esModule",{value:!0});we.serializeError=void 0;const un=Q,hn=K,gn=U,pn=$e;function fn(n,e){const t=(0,pn.serialize)(mn(n),{shouldIncludeStack:!0}),r=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");r.searchParams.set("version",hn.LIB_VERSION),r.searchParams.set("code",t.code.toString());const s=bn(t.data,e);return s&&r.searchParams.set("method",s),r.searchParams.set("message",t.message),Object.assign(Object.assign({},t),{docUrl:r.href})}we.serializeError=fn;function mn(n){return typeof n=="string"?{message:n,code:gn.standardErrorCodes.rpc.internal}:(0,un.isErrorResponse)(n)?Object.assign(Object.assign({},n),{message:n.errorMessage,code:n.errorCode,data:{method:n.method}}):n}function bn(n,e){const t=n==null?void 0:n.method;if(t)return t;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}var _={};Object.defineProperty(_,"__esModule",{value:!0});_.RegExpString=_.IntNumber=_.BigIntString=_.AddressString=_.HexString=_.OpaqueType=void 0;function ne(){return n=>n}_.OpaqueType=ne;_.HexString=ne();_.AddressString=ne();_.BigIntString=ne();function yn(n){return Math.floor(n)}_.IntNumber=yn;_.RegExpString=ne();var u={};Object.defineProperty(u,"__esModule",{value:!0});u.areAddressArraysEqual=u.getFavicon=u.range=u.isBigNumber=u.ensureParsedJSONObject=u.ensureBigInt=u.ensureRegExpString=u.ensureIntNumber=u.ensureBuffer=u.ensureAddressString=u.ensureEvenLengthHexString=u.ensureHexString=u.isHexString=u.prepend0x=u.strip0x=u.has0xPrefix=u.hexStringFromIntNumber=u.intNumberFromHexString=u.bigIntStringFromBigInt=u.hexStringFromBuffer=u.hexStringToUint8Array=u.uint8ArrayToHex=u.randomBytesHex=void 0;const q=j,I=_,Mt=/^[0-9]*$/,Lt=/^[a-f0-9]*$/;function wn(n){return At(crypto.getRandomValues(new Uint8Array(n)))}u.randomBytesHex=wn;function At(n){return[...n].map(e=>e.toString(16).padStart(2,"0")).join("")}u.uint8ArrayToHex=At;function vn(n){return new Uint8Array(n.match(/.{1,2}/g).map(e=>parseInt(e,16)))}u.hexStringToUint8Array=vn;function _n(n,e=!1){const t=n.toString("hex");return(0,I.HexString)(e?`0x${t}`:t)}u.hexStringFromBuffer=_n;function En(n){return(0,I.BigIntString)(n.toString(10))}u.bigIntStringFromBigInt=En;function Sn(n){return(0,I.IntNumber)(Number(BigInt(se(n,!0))))}u.intNumberFromHexString=Sn;function Cn(n){return(0,I.HexString)(`0x${BigInt(n).toString(16)}`)}u.hexStringFromIntNumber=Cn;function Fe(n){return n.startsWith("0x")||n.startsWith("0X")}u.has0xPrefix=Fe;function ve(n){return Fe(n)?n.slice(2):n}u.strip0x=ve;function Rt(n){return Fe(n)?`0x${n.slice(2)}`:`0x${n}`}u.prepend0x=Rt;function re(n){if(typeof n!="string")return!1;const e=ve(n).toLowerCase();return Lt.test(e)}u.isHexString=re;function xt(n,e=!1){if(typeof n=="string"){const t=ve(n).toLowerCase();if(Lt.test(t))return(0,I.HexString)(e?`0x${t}`:t)}throw q.standardErrors.rpc.invalidParams(`"${String(n)}" is not a hexadecimal string`)}u.ensureHexString=xt;function se(n,e=!1){let t=xt(n,!1);return t.length%2===1&&(t=(0,I.HexString)(`0${t}`)),e?(0,I.HexString)(`0x${t}`):t}u.ensureEvenLengthHexString=se;function kn(n){if(typeof n=="string"){const e=ve(n).toLowerCase();if(re(e)&&e.length===40)return(0,I.AddressString)(Rt(e))}throw q.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(n)}`)}u.ensureAddressString=kn;function In(n){if(Buffer.isBuffer(n))return n;if(typeof n=="string"){if(re(n)){const e=se(n,!1);return Buffer.from(e,"hex")}return Buffer.from(n,"utf8")}throw q.standardErrors.rpc.invalidParams(`Not binary data: ${String(n)}`)}u.ensureBuffer=In;function Pt(n){if(typeof n=="number"&&Number.isInteger(n))return(0,I.IntNumber)(n);if(typeof n=="string"){if(Mt.test(n))return(0,I.IntNumber)(Number(n));if(re(n))return(0,I.IntNumber)(Number(BigInt(se(n,!0))))}throw q.standardErrors.rpc.invalidParams(`Not an integer: ${String(n)}`)}u.ensureIntNumber=Pt;function Mn(n){if(n instanceof RegExp)return(0,I.RegExpString)(n.toString());throw q.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(n)}`)}u.ensureRegExpString=Mn;function Ln(n){if(n!==null&&(typeof n=="bigint"||Nt(n)))return BigInt(n.toString(10));if(typeof n=="number")return BigInt(Pt(n));if(typeof n=="string"){if(Mt.test(n))return BigInt(n);if(re(n))return BigInt(se(n,!0))}throw q.standardErrors.rpc.invalidParams(`Not an integer: ${String(n)}`)}u.ensureBigInt=Ln;function An(n){if(typeof n=="string")return JSON.parse(n);if(typeof n=="object")return n;throw q.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(n)}`)}u.ensureParsedJSONObject=An;function Nt(n){if(n==null||typeof n.constructor!="function")return!1;const{constructor:e}=n;return typeof e.config=="function"&&typeof e.EUCLID=="number"}u.isBigNumber=Nt;function Rn(n,e){return Array.from({length:e-n},(t,r)=>n+r)}u.range=Rn;function xn(){const n=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:t}=document.location,r=n?n.getAttribute("href"):null;return!r||r.startsWith("javascript:")||r.startsWith("vbscript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${t}${r}`}u.getFavicon=xn;function Pn(n,e){return n.length===e.length&&n.every((t,r)=>t===e[r])}u.areAddressArraysEqual=Pn;var P={},_e={},Ee={},y={};Object.defineProperty(y,"__esModule",{value:!0});y.decryptContent=y.encryptContent=y.importKeyFromHexString=y.exportKeyToHexString=y.decrypt=y.encrypt=y.deriveSharedSecret=y.generateKeyPair=void 0;const Tt=u;async function Nn(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}y.generateKeyPair=Nn;async function Tn(n,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},n,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}y.deriveSharedSecret=Tn;async function jt(n,e){const t=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},n,new TextEncoder().encode(e));return{iv:t,cipherText:r}}y.encrypt=jt;async function Ot(n,{iv:e,cipherText:t}){const r=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},n,t);return new TextDecoder().decode(r)}y.decrypt=Ot;function Dt(n){switch(n){case"public":return"spki";case"private":return"pkcs8"}}async function jn(n,e){const t=Dt(n),r=await crypto.subtle.exportKey(t,e);return(0,Tt.uint8ArrayToHex)(new Uint8Array(r))}y.exportKeyToHexString=jn;async function On(n,e){const t=Dt(n),r=(0,Tt.hexStringToUint8Array)(e).buffer;return await crypto.subtle.importKey(t,r,{name:"ECDH",namedCurve:"P-256"},!0,n==="private"?["deriveKey"]:[])}y.importKeyFromHexString=On;async function Dn(n,e){const t=JSON.stringify(n,(r,s)=>{if(!(s instanceof Error))return s;const i=s;return Object.assign(Object.assign({},i.code?{code:i.code}:{}),{message:i.message})});return jt(e,t)}y.encryptContent=Dn;async function Wn(n,e){return JSON.parse(await Ot(e,n))}y.decryptContent=Wn;var O={};Object.defineProperty(O,"__esModule",{value:!0});O.ScopedLocalStorage=void 0;class fe{constructor(e,t){this.scope=e,this.module=t}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let r=0;rlocalStorage.removeItem(r))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new fe("CBWSDK").clear(),new fe("walletlink").clear()}}O.ScopedLocalStorage=fe;Object.defineProperty(Ee,"__esModule",{value:!0});Ee.SCWKeyManager=void 0;const oe=y,Un=O,De={storageKey:"ownPrivateKey",keyType:"private"},We={storageKey:"ownPublicKey",keyType:"public"},Ue={storageKey:"peerPublicKey",keyType:"public"};class Bn{constructor(){this.storage=new Un.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(Ue,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(We.storageKey),this.storage.removeItem(De.storageKey),this.storage.removeItem(Ue.storageKey)}async generateKeyPair(){const e=await(0,oe.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(De,e.privateKey),await this.storeKey(We,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(De)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(We)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(Ue)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,oe.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,oe.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const r=await(0,oe.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,r)}}Ee.SCWKeyManager=Bn;var Se={};Object.defineProperty(Se,"__esModule",{value:!0});Se.SCWStateManager=void 0;const Hn=O,Qe="accounts",Xe="activeChain",et="availableChains",tt="walletCapabilities";class Kn{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,r;this.storage=new Hn.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(et),this._walletCapabilities=this.loadItemFromStorage(tt);const s=this.loadItemFromStorage(Qe),i=this.loadItemFromStorage(Xe);s&&this.updateListener.onAccountsUpdate({accounts:s,source:"storage"}),i&&this.updateListener.onChainUpdate({chain:i,source:"storage"}),this._accounts=s||[],this._activeChain=i||{id:(r=(t=e.appChainIds)===null||t===void 0?void 0:t[0])!==null&&r!==void 0?r:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(Qe,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;const r=(t=this.availableChains)===null||t===void 0?void 0:t.find(s=>s.id===e);return r?(r===this._activeChain||(this._activeChain=r,this.storeItemToStorage(Xe,r),this.updateListener.onChainUpdate({chain:r,source:"wallet"})),!0):!1}updateAvailableChains(e){if(!e||Object.keys(e).length===0)return;const t=Object.entries(e).map(([r,s])=>({id:Number(r),rpcUrl:s}));this.availableChains=t,this.storeItemToStorage(et,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(tt,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){const t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}Se.SCWStateManager=Kn;Object.defineProperty(_e,"__esModule",{value:!0});_e.SCWSigner=void 0;const qn=Ee,$n=Se,ce=j,nt=u,de=y;class Fn{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new qn.SCWKeyManager,this.stateManager=new $n.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in t.content)throw t.content.failure;const r=await(0,de.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(r);const s=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},s);const i=s.result;if("error"in i)throw i.error;return this.stateManager.accounts}async request(e){const t=this.tryLocalHandling(e);if(t!==void 0){if(t instanceof Error)throw t;return t}await this.communicator.waitForPopupLoaded();const r=await this.sendEncryptedRequest(e),s=await this.decryptResponseMessage(r);this.updateInternalState(e,s);const i=s.result;if("error"in i)throw i.error;return i.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{const r=e.params;if(!r||!(!((t=r[0])===null||t===void 0)&&t.chainId))throw ce.standardErrors.rpc.invalidParams();const s=(0,nt.ensureIntNumber)(r[0].chainId);return this.stateManager.switchChain(s)?null:void 0}case"wallet_getCapabilities":{const r=this.stateManager.walletCapabilities;if(!r)throw ce.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return r}default:return}}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw ce.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const r=await(0,de.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),s=await this.createRequestMessage({encrypted:r});return this.communicator.postRequestAndWaitForResponse(s)}async createRequestMessage(e){const t=await(0,de.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){const t=e.content;if("failure"in t)throw t.failure;const r=await this.keyManager.getSharedSecret();if(!r)throw ce.standardErrors.provider.unauthorized("Invalid session");return(0,de.decryptContent)(t.encrypted,r)}updateInternalState(e,t){var r,s;const i=(r=t.data)===null||r===void 0?void 0:r.chains;i&&this.stateManager.updateAvailableChains(i);const a=(s=t.data)===null||s===void 0?void 0:s.capabilities;a&&this.stateManager.updateWalletCapabilities(a);const o=t.result;if(!("error"in o))switch(e.method){case"eth_requestAccounts":{const c=o.value;this.stateManager.updateAccounts(c);break}case"wallet_switchEthereumChain":{if(o.value!==null)return;const c=e.params,l=(0,nt.ensureIntNumber)(c[0].chainId);this.stateManager.switchChain(l);break}}}}_e.SCWSigner=Fn;var Ce={};const Vn=sn;function Wt(n){return Buffer.allocUnsafe(n).fill(0)}function zn(n){return n.toString(2).length}function Ut(n,e){let t=n.toString(16);t.length%2!==0&&(t="0"+t);const r=t.match(/.{1,2}/g).map(s=>parseInt(s,16));for(;r.length"u")throw new Error("Not an array?");if(t=Ft(n),t!=="dynamic"&&t!==0&&e.length>t)throw new Error("Elements exceed array size: "+t);s=[],n=n.slice(0,n.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(i in e)s.push(R(n,e[i]));if(t==="dynamic"){var a=R("uint256",e.length);s.unshift(a)}return Buffer.concat(s)}else{if(n==="bytes")return e=new Buffer(e),s=Buffer.concat([R("uint256",e.length),e]),e.length%32!==0&&(s=Buffer.concat([s,E.zeros(32-e.length%32)])),s;if(n.startsWith("bytes")){if(t=G(n),t<1||t>32)throw new Error("Invalid bytes width: "+t);return E.setLengthRight(e,32)}else if(n.startsWith("uint")){if(t=G(n),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);r=H(e);const o=E.bitLengthFromBigInt(r);if(o>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+o);if(r<0)throw new Error("Supplied uint is negative");return E.bufferBEFromBigInt(r,32)}else if(n.startsWith("int")){if(t=G(n),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);r=H(e);const o=E.bitLengthFromBigInt(r);if(o>t)throw new Error("Supplied int exceeds width: "+t+" vs "+o);const c=E.twosFromBigInt(r,256);return E.bufferBEFromBigInt(c,32)}else if(n.startsWith("ufixed")){if(t=rt(n),r=H(e),r<0)throw new Error("Supplied ufixed is negative");return R("uint256",r*BigInt(2)**BigInt(t[1]))}else if(n.startsWith("fixed"))return t=rt(n),R("int256",H(e)*BigInt(2)**BigInt(t[1]))}throw new Error("Unsupported or invalid type: "+n)}function Xn(n){return n==="string"||n==="bytes"||Ft(n)==="dynamic"}function er(n){return n.lastIndexOf("]")===n.length-1}function tr(n,e){var t=[],r=[],s=32*n.length;for(var i in n){var a=$t(n[i]),o=e[i],c=R(a,o);Xn(a)?(t.push(R("uint256",s)),r.push(c),s+=c.length):t.push(c)}return Buffer.concat(t.concat(r))}function Vt(n,e){if(n.length!==e.length)throw new Error("Number of types are not matching the values");for(var t,r,s=[],i=0;i32)throw new Error("Invalid bytes width: "+t);s.push(E.setLengthRight(o,t))}else if(a.startsWith("uint")){if(t=G(a),t%8||t<8||t>256)throw new Error("Invalid uint width: "+t);r=H(o);const c=E.bitLengthFromBigInt(r);if(c>t)throw new Error("Supplied uint exceeds width: "+t+" vs "+c);s.push(E.bufferBEFromBigInt(r,t/8))}else if(a.startsWith("int")){if(t=G(a),t%8||t<8||t>256)throw new Error("Invalid int width: "+t);r=H(o);const c=E.bitLengthFromBigInt(r);if(c>t)throw new Error("Supplied int exceeds width: "+t+" vs "+c);const l=E.twosFromBigInt(r,t);s.push(E.bufferBEFromBigInt(l,t/8))}else throw new Error("Unsupported or invalid type: "+a)}return Buffer.concat(s)}function nr(n,e){return E.keccak(Vt(n,e))}var rr={rawEncode:tr,solidityPack:Vt,soliditySHA3:nr};const A=qt,ee=rr,zt={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},Be={encodeData(n,e,t,r=!0){const s=["bytes32"],i=[this.hashType(n,t)];if(r){const a=(o,c,l)=>{if(t[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":A.keccak(this.encodeData(c,l,t,r))];if(l===void 0)throw new Error(`missing value for field ${o} of type ${c}`);if(c==="bytes")return["bytes32",A.keccak(l)];if(c==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",A.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const h=c.slice(0,c.lastIndexOf("[")),f=l.map(d=>a(o,h,d));return["bytes32",A.keccak(ee.rawEncode(f.map(([d])=>d),f.map(([,d])=>d)))]}return[c,l]};for(const o of t[n]){const[c,l]=a(o.name,o.type,e[o.name]);s.push(c),i.push(l)}}else for(const a of t[n]){let o=e[a.name];if(o!==void 0)if(a.type==="bytes")s.push("bytes32"),o=A.keccak(o),i.push(o);else if(a.type==="string")s.push("bytes32"),typeof o=="string"&&(o=Buffer.from(o,"utf8")),o=A.keccak(o),i.push(o);else if(t[a.type]!==void 0)s.push("bytes32"),o=A.keccak(this.encodeData(a.type,o,t,r)),i.push(o);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(a.type),i.push(o)}}return ee.rawEncode(s,i)},encodeType(n,e){let t="",r=this.findTypeDependencies(n,e).filter(s=>s!==n);r=[n].concat(r.sort());for(const s of r){if(!e[s])throw new Error("No type definition specified: "+s);t+=s+"("+e[s].map(({name:a,type:o})=>o+" "+a).join(",")+")"}return t},findTypeDependencies(n,e,t=[]){if(n=n.match(/^\w*/)[0],t.includes(n)||e[n]===void 0)return t;t.push(n);for(const r of e[n])for(const s of this.findTypeDependencies(r.type,e,t))!t.includes(s)&&t.push(s);return t},hashStruct(n,e,t,r=!0){return A.keccak(this.encodeData(n,e,t,r))},hashType(n,e){return A.keccak(this.encodeType(n,e))},sanitizeData(n){const e={};for(const t in zt.properties)n[t]&&(e[t]=n[t]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(n,e=!0){const t=this.sanitizeData(n),r=[Buffer.from("1901","hex")];return r.push(this.hashStruct("EIP712Domain",t.domain,t.types,e)),t.primaryType!=="EIP712Domain"&&r.push(this.hashStruct(t.primaryType,t.message,t.types,e)),A.keccak(Buffer.concat(r))}};var sr={TYPED_MESSAGE_SCHEMA:zt,TypedDataUtils:Be,hashForSignTypedDataLegacy:function(n){return ir(n.data)},hashForSignTypedData_v3:function(n){return Be.hash(n.data,!1)},hashForSignTypedData_v4:function(n){return Be.hash(n.data)}};function ir(n){const e=new Error("Expect argument to be non-empty array");if(typeof n!="object"||!n.length)throw e;const t=n.map(function(i){return i.type==="bytes"?A.toBuffer(i.value):i.value}),r=n.map(function(i){return i.type}),s=n.map(function(i){if(!i.name)throw e;return i.type+" "+i.name});return ee.soliditySHA3(["bytes32","bytes32"],[ee.soliditySHA3(new Array(n.length).fill("string"),s),ee.soliditySHA3(r,t)])}var N={};Object.defineProperty(N,"__esModule",{value:!0});N.APP_VERSION_KEY=N.LOCAL_STORAGE_ADDRESSES_KEY=N.WALLET_USER_NAME_KEY=void 0;N.WALLET_USER_NAME_KEY="walletUsername";N.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";N.APP_VERSION_KEY="AppVersion";var ie={};Object.defineProperty(ie,"__esModule",{value:!0});ie.RelayEventManager=void 0;const ar=u;class or{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,ar.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}ie.RelayEventManager=or;var Ie={},Me={},Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.WalletLinkCipher=void 0;const le=u;class cr{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,le.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},s,i.encode(e)),o=16,c=a.slice(a.byteLength-o),l=a.slice(0,a.byteLength-o),h=new Uint8Array(c),f=new Uint8Array(l),d=new Uint8Array([...r,...h,...f]);return(0,le.uint8ArrayToHex)(d)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((r,s)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,le.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=(0,le.hexStringToUint8Array)(e),o=a.slice(0,12),c=a.slice(12,28),l=a.slice(28),h=new Uint8Array([...l,...c]),f={name:"AES-GCM",iv:new Uint8Array(o)};try{const d=await window.crypto.subtle.decrypt(f,i,h),p=new TextDecoder;r(p.decode(d))}catch(d){s(d)}})()})}}Le.WalletLinkCipher=cr;var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.WalletLinkHTTP=void 0;class dr{constructor(e,t,r){this.linkAPIUrl=e,this.sessionId=t;const s=`${t}:${r}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:r,error:s}=await t.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const i=(e=r==null?void 0:r.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${t.status}`)}}Ae.WalletLinkHTTP=dr;var Y={};Object.defineProperty(Y,"__esModule",{value:!0});Y.WalletLinkWebSocket=Y.ConnectionState=void 0;var Z;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED"})(Z||(Y.ConnectionState=Z={}));class lr{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var r;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){t(i);return}(r=this.connectionStateListener)===null||r===void 0||r.call(this,Z.CONNECTING),s.onclose=i=>{var a;this.clearWebSocket(),t(new Error(`websocket error ${i.code}: ${i.reason}`)),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Z.DISCONNECTED)},s.onopen=i=>{var a;e(),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Z.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},s.onmessage=i=>{var a,o;if(i.data==="h")(a=this.incomingDataListener)===null||a===void 0||a.call(this,{type:"Heartbeat"});else try{const c=JSON.parse(i.data);(o=this.incomingDataListener)===null||o===void 0||o.call(this,c)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,Z.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}Y.WalletLinkWebSocket=lr;Object.defineProperty(Me,"__esModule",{value:!0});Me.WalletLinkConnection=void 0;const st=N,ur=Le,hr=Ae,ue=Y,F=_,it=1e4,gr=6e4;class pr{constructor({session:e,linkAPIUrl:t,listener:r,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,F.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>a.JsonRpcUrl&&this.handleChainUpdated(c,a.JsonRpcUrl)]]).forEach((c,l)=>{const h=a[l];h!==void 0&&c(h)})},this.handleDestroyed=a=>{var o;a==="1"&&((o=this.listener)===null||o===void 0||o.resetAndReload())},this.handleAccountUpdated=async a=>{var o;{const c=await this.cipher.decrypt(a);(o=this.listener)===null||o===void 0||o.accountUpdated(c)}},this.handleMetadataUpdated=async(a,o)=>{var c;{const l=await this.cipher.decrypt(o);(c=this.listener)===null||c===void 0||c.metadataUpdated(a,l)}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(st.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(st.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,o)=>{var c;{const l=await this.cipher.decrypt(a),h=await this.cipher.decrypt(o);(c=this.listener)===null||c===void 0||c.chainUpdated(l,h)}},this.session=e,this.cipher=new ur.WalletLinkCipher(e.secret),this.listener=r;const i=new ue.WalletLinkWebSocket(`${t}/rpc`,s);i.setConnectionStateListener(async a=>{let o=!1;switch(a){case ue.ConnectionState.DISCONNECTED:if(!this.destroyed){const c=async()=>{await new Promise(l=>setTimeout(l,5e3)),this.destroyed||i.connect().catch(()=>{c()})};c()}break;case ue.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),o=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},it),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case ue.ConnectionState.CONNECTING:break}this.connected!==o&&(this.connected=o)}),i.setIncomingDataListener(a=>{var o;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const c=a.type==="IsLinkedOK"?a.linked:void 0;this.linked=c||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((o=this.requestResolutions.get(a.id))===null||o===void 0||o(a))}),this.ws=i,this.http=new hr.WalletLinkHTTP(t,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&((t=this.onceConnected)===null||t===void 0||t.call(this))}setOnceConnected(e){return new Promise(t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var t,r;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(r=this.listener)===null||r===void 0||r.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if(!(e.type!=="Event"||e.event!=="Web3Response")){const r=await this.cipher.decrypt(e.data),s=JSON.parse(r);if(s.type!=="WEB3_RESPONSE")return;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(s)}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async setSessionMetadata(e,t){const r={type:"SetSessionConfig",id:(0,F.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected(async()=>{const s=await this.makeRequest(r);if(s.type==="Fail")throw new Error(s.error||"failed to set session metadata")})}async publishEvent(e,t,r=!1){const s=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,F.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:s,callWebhook:r};return this.setOnceLinked(async()=>{const a=await this.makeRequest(i);if(a.type==="Fail")throw new Error(a.error||"failed to publish event");return a.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>it*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t=gr){const r=e.id;this.sendData(e);let s;return Promise.race([new Promise((i,a)=>{s=window.setTimeout(()=>{a(new Error(`request ${r} timed out`))},t)}),new Promise(i=>{this.requestResolutions.set(r,a=>{clearTimeout(s),i(a),this.requestResolutions.delete(r)})})])}async authenticate(){const e={type:"HostSession",id:(0,F.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if(t.type==="Fail")throw new Error(t.error||"failed to authenticate")}sendIsLinked(){const e={type:"IsLinked",id:(0,F.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,F.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}Me.WalletLinkConnection=pr;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.WalletLinkSession=void 0;const fr=an,at=u,ot="session:id",ct="session:secret",dt="session:linked";class Ve{constructor(e,t,r,s){this._storage=e,this._id=t||(0,at.randomBytesHex)(16),this._secret=r||(0,at.randomBytesHex)(32),this._key=new fr.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(e){const t=e.getItem(ot),r=e.getItem(dt),s=e.getItem(ct);return t&&s?new Ve(e,t,s,r==="1"):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(ot,this._id),this._storage.setItem(ct,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(dt,this._linked?"1":"0")}}Re.WalletLinkSession=Ve;var S={};Object.defineProperty(S,"__esModule",{value:!0});S.isDarkMode=S.isMobileWeb=S.getLocation=S.createQrUrl=void 0;function mr(n,e,t,r,s,i){const a=r?"parent-id":"id",o=new URLSearchParams({[a]:n,secret:e,server:t,v:s,chainId:i.toString()}).toString();return`${t}/#/link?${o}`}S.createQrUrl=mr;function br(){try{return window.frameElement!==null}catch{return!1}}function yr(){try{return br()&&window.top?window.top.location:window.location}catch{return window.location}}S.getLocation=yr;function wr(){var n;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((n=window==null?void 0:window.navigator)===null||n===void 0?void 0:n.userAgent)}S.isMobileWeb=wr;function vr(){var n,e;return(e=(n=window==null?void 0:window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}S.isDarkMode=vr;var xe={},ae={},ze={};Object.defineProperty(ze,"__esModule",{value:!0});ze.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var _r=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ae,"__esModule",{value:!0});ae.injectCssReset=void 0;const Er=_r(ze);function Sr(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(Er.default)),document.documentElement.appendChild(n)}ae.injectCssReset=Sr;var Ze={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(n){var e=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.SnackbarInstance=n.SnackbarContainer=n.Snackbar=void 0;const t=e(vt),r=_t,s=on,i=S,a=e(Ge),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class l{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,i.isDarkMode)()}attach(p){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",p.appendChild(this.root),this.render()}presentItem(p){const m=this.nextItemKey++;return this.items.set(m,p),this.render(),()=>{this.items.delete(m),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,r.render)((0,r.h)("div",null,(0,r.h)(n.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([p,m])=>(0,r.h)(n.SnackbarInstance,Object.assign({},m,{key:p}))))),this.root)}}n.Snackbar=l;const h=d=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,r.h)("style",null,a.default),(0,r.h)("div",{class:"-cbwsdk-snackbar"},d.children));n.SnackbarContainer=h;const f=({autoExpand:d,message:p,menuItems:m})=>{const[B,Xt]=(0,s.useState)(!0),[Oe,Je]=(0,s.useState)(d??!1);(0,s.useEffect)(()=>{const L=[window.setTimeout(()=>{Xt(!1)},1),window.setTimeout(()=>{Je(!0)},1e4)];return()=>{L.forEach(window.clearTimeout)}});const en=()=>{Je(!Oe)};return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",B&&"-cbwsdk-snackbar-instance-hidden",Oe&&"-cbwsdk-snackbar-instance-expanded")},(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:en},(0,r.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},p),(0,r.h)("div",{class:"-gear-container"},!Oe&&(0,r.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,r.h)("img",{src:c,class:"-gear-icon",title:"Expand"}))),m&&m.length>0&&(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},m.map((L,tn)=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",L.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:L.onClick,key:tn},(0,r.h)("svg",{width:L.svgWidth,height:L.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{"fill-rule":L.defaultFillRule,"clip-rule":L.defaultClipRule,d:L.path,fill:"#AAAAAA"})),(0,r.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",L.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},L.info)))))};n.SnackbarInstance=f})(Ze);Object.defineProperty(xe,"__esModule",{value:!0});xe.WalletLinkRelayUI=void 0;const Cr=ae,kr=Ze;class Ir{constructor(){this.attached=!1,this.snackbar=new kr.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,Cr.injectCssReset)()}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}xe.WalletLinkRelayUI=Ir;var Pe={},Ne={},Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var Zt=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.RedirectDialog=void 0;const Mr=Zt(vt),x=_t,Lr=ae,Ar=Ze,Rr=S,xr=Zt(Ye);class Pr{constructor(){this.root=null,this.darkMode=(0,Rr.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,Lr.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,x.render)(null,this.root),e&&(0,x.render)((0,x.h)(Nr,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}Ne.RedirectDialog=Pr;const Nr=({title:n,buttonText:e,darkMode:t,onButtonClick:r,onDismiss:s})=>{const i=t?"dark":"light";return(0,x.h)(Ar.SnackbarContainer,{darkMode:t},(0,x.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,x.h)("style",null,xr.default),(0,x.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:s}),(0,x.h)("div",{class:(0,Mr.default)("-cbwsdk-redirect-dialog-box",i)},(0,x.h)("p",null,n),(0,x.h)("button",{onClick:r},e))))};var T={};Object.defineProperty(T,"__esModule",{value:!0});T.CBW_MOBILE_DEEPLINK_URL=T.WALLETLINK_URL=T.CB_KEYS_URL=void 0;T.CB_KEYS_URL="https://keys.coinbase.com/connect";T.WALLETLINK_URL="https://www.walletlink.org";T.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.WLMobileRelayUI=void 0;const Tr=Ne,jr=S,Or=T;class Dr{constructor(){this.attached=!1,this.redirectDialog=new Tr.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL(Or.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,jr.getLocation)().href),e&&t.searchParams.append("wl_url",e);const r=document.createElement("a");r.target="cbw-opener",r.href=t.href,r.rel="noreferrer noopener",r.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}Pe.WLMobileRelayUI=Dr;Object.defineProperty(Ie,"__esModule",{value:!0});Ie.WalletLinkRelay=void 0;const Wr=Me,Ur=N,Br=ie,He=Re,V=Q,Hr=S,Kr=xe,lt=Pe,qr=j,b=u,$r=O;class W{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,Hr.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=i=>{this.isLinked=i;const a=this.storage.getItem(Ur.LOCAL_STORAGE_ADDRESSES_KEY);if(i&&(this._session.linked=i),this.isUnlinkedErrorState=!1,a){const o=a.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";o[0]!==""&&!i&&this._session.linked&&!c&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(i,a)=>{this.storage.setItem(i,a)},this.chainUpdated=(i,a)=>{this.chainCallbackParams.chainId===i&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:i,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(i,a))},this.accountUpdated=i=>{this.accountsCallback&&this.accountsCallback([i]),W.accountRequestCallbackIds.size>0&&(Array.from(W.accountRequestCallbackIds.values()).forEach(a=>{const o={type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:[i]}};this.invokeCallback(Object.assign(Object.assign({},o),{id:a}))}),W.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;const{session:t,ui:r,connection:s}=this.subscribe();this._session=t,this.connection=s,this.relayEventManager=new Br.RelayEventManager,this.ui=r}subscribe(){const e=He.WalletLinkSession.load(this.storage)||new He.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,r=new Wr.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),s=this.isMobileWeb?new lt.WLMobileRelayUI:new Kr.WalletLinkRelayUI;return r.connect(),{session:e,ui:s,connection:r}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{this.connection.destroy();const e=He.WalletLinkSession.load(this.storage);(e==null?void 0:e.id)===this._session.id&&$r.ScopedLocalStorage.clearAll(),document.location.reload()}).catch(e=>{})}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,r,s){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,b.hexStringFromBuffer)(e,!0),address:t,addPrefix:r,typedDataJson:s||null}})}ethereumAddressFromSignedMessage(e,t,r){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,b.hexStringFromBuffer)(e,!0),signature:(0,b.hexStringFromBuffer)(t,!0),addPrefix:r}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,b.bigIntStringFromBigInt)(e.weiValue),data:(0,b.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,b.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,b.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,b.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,b.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,b.bigIntStringFromBigInt)(e.weiValue),data:(0,b.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,b.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,b.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,b.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,b.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,b.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const r=(0,b.randomBytesHex)(8),s=i=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,i),t==null||t()};return new Promise((i,a)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:s,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(r,o=>{if(t==null||t(),(0,V.isErrorResponse)(o))return a(new Error(o.errorMessage));i(o)}),this.publishWeb3RequestEvent(r,e)})}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){const r={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",r,!0).then(s=>{}).catch(s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r.id,response:{method:t.method,errorMessage:s.message}})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof lt.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,r){return this.connection.publishEvent(e,t,r)}handleWeb3ResponseMessage(e){const{response:t}=e;if(t.method==="requestEthereumAccounts"){W.accountRequestCallbackIds.forEach(r=>this.invokeCallback(Object.assign(Object.assign({},e),{id:r}))),W.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,t,r){var s;const i=(s=r==null?void 0:r.message)!==null&&s!==void 0?s:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:i}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},t=(0,b.randomBytesHex)(8);return new Promise((r,s)=>{this.relayEventManager.callbacks.set(t,i=>{if((0,V.isErrorResponse)(i))return s(new Error(i.errorMessage));r(i)}),W.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)})}watchAsset(e,t,r,s,i,a){const o={method:"watchAsset",params:{type:e,options:{address:t,symbol:r,decimals:s,image:i},chainId:a}};let c=null;const l=(0,b.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,d)=>{this.relayEventManager.callbacks.set(l,p=>{if(c==null||c(),(0,V.isErrorResponse)(p))return d(new Error(p.errorMessage));f(p)}),this.publishWeb3RequestEvent(l,o)})}addEthereumChain(e,t,r,s,i,a){const o={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:s,chainName:i,iconUrls:r,nativeCurrency:a}};let c=null;const l=(0,b.randomBytesHex)(8),h=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,o.method,f),c==null||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:h,onResetConnection:this.resetAndReload}),new Promise((f,d)=>{this.relayEventManager.callbacks.set(l,p=>{if(c==null||c(),(0,V.isErrorResponse)(p))return d(new Error(p.errorMessage));f(p)}),this.publishWeb3RequestEvent(l,o)})}switchEthereumChain(e,t){const r={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},s=(0,b.randomBytesHex)(8);return new Promise((i,a)=>{this.relayEventManager.callbacks.set(s,o=>{if((0,V.isErrorResponse)(o)&&o.errorCode)return a(qr.standardErrors.provider.custom({code:o.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,V.isErrorResponse)(o))return a(new Error(o.errorMessage));i(o)}),this.publishWeb3RequestEvent(s,r)})}}Ie.WalletLinkRelay=W;W.accountRequestCallbackIds=new Set;var Fr=M&&M.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.WalletLinkSigner=void 0;const Ke=Fr(sr),ut=N,Vr=ie,D=Q,zr=Ie,ht=T,w=j,g=u,Zr=O,qe="DefaultChainId",gt="DefaultJsonRpcUrl";class Gr{constructor(e){var t,r;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;const{appName:s,appLogoUrl:i}=e.metadata;this._appName=s,this._appLogoUrl=i,this._storage=new Zr.ScopedLocalStorage("walletlink",ht.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new Vr.RelayEventManager,this._jsonRpcUrlFromOpts="";const a=this._storage.getItem(ut.LOCAL_STORAGE_ADDRESSES_KEY);if(a){const c=a.split(" ");c[0]!==""&&(this._addresses=c.map(l=>(0,g.ensureAddressString)(l)),(t=this.updateListener)===null||t===void 0||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(qe)&&((r=this.updateListener)===null||r===void 0||r.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:r}=e.getWalletLinkSession();return{id:t,secret:r}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(gt))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(gt,e)}updateProviderInfo(e,t){var r;this.jsonRpcUrl=e;const s=this.getChainId();this._storage.setItem(qe,t.toString(10)),((0,g.ensureIntNumber)(t)!==s||!this.hasMadeFirstChainChangedEmission)&&((r=this.updateListener)===null||r===void 0||r.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,r,s,i,a){const c=await this.initializeRelay().watchAsset(e,t,r,s,i,a==null?void 0:a.toString());return(0,D.isErrorResponse)(c)?!1:!!c.result}async addEthereumChain(e,t,r,s,i,a){var o,c;if((0,g.ensureIntNumber)(e)===this.getChainId())return!1;const l=this.initializeRelay();this._isAuthorized()||await l.requestEthereumAccounts();const h=await l.addEthereumChain(e.toString(),t,i,r,s,a);return(0,D.isErrorResponse)(h)?!1:(((o=h.result)===null||o===void 0?void 0:o.isApproved)===!0&&this.updateProviderInfo(t[0],e),((c=h.result)===null||c===void 0?void 0:c.isApproved)===!0)}async switchEthereumChain(e){const r=await this.initializeRelay().switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,D.isErrorResponse)(r)){if(!r.errorCode)return;throw r.errorCode===w.standardErrorCodes.provider.unsupportedChain?w.standardErrors.provider.unsupportedChain():w.standardErrors.provider.custom({message:r.errorMessage,code:r.errorCode})}const s=r.result;s.isApproved&&s.rpcUrl.length>0&&this.updateProviderInfo(s.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch(t=>{throw t})}catch(t){return Promise.reject(t)}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw w.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:r}=e;if(typeof t!="string"||t.length===0)throw w.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(r!==void 0&&!Array.isArray(r)&&(typeof r!="object"||r===null))throw w.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const s=r===void 0?[]:r,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:s,jsonrpc:"2.0",id:i})).result}_setAddresses(e,t){var r;if(!Array.isArray(e))throw new Error("addresses is not an array");const s=e.map(i=>(0,g.ensureAddressString)(i));JSON.stringify(s)!==JSON.stringify(this._addresses)&&(this._addresses=s,(r=this.updateListener)===null||r===void 0||r.onAccountsUpdate({accounts:s,source:"wallet"}),this._storage.setItem(ut.LOCAL_STORAGE_ADDRESSES_KEY,s.join(" ")))}_sendRequestAsync(e){return new Promise((t,r)=>{try{const s=this._handleSynchronousMethods(e);if(s!==void 0)return t({jsonrpc:"2.0",id:e.id,result:s})}catch(s){return r(s)}this._handleAsynchronousMethods(e).then(s=>s&&t(Object.assign(Object.assign({},s),{id:e.id}))).catch(s=>r(s))})}_handleSynchronousMethods(e){const{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,r=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(r);case"eth_ecRecover":return this._eth_ecRecover(r);case"personal_sign":return this._personal_sign(r);case"personal_ecRecover":return this._personal_ecRecover(r);case"eth_signTransaction":return this._eth_signTransaction(r);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(r);case"eth_sendTransaction":return this._eth_sendTransaction(r);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(r);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(r);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(r);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(r);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(r);case"wallet_watchAsset":return this._wallet_watchAsset(r);default:return this._throwUnsupportedMethodError()}}_isKnownAddress(e){try{const t=(0,g.ensureAddressString)(e);return this._addresses.map(s=>(0,g.ensureAddressString)(s)).includes(t)}catch{}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,g.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const r=e.to?(0,g.ensureAddressString)(e.to):null,s=e.value!=null?(0,g.ensureBigInt)(e.value):BigInt(0),i=e.data?(0,g.ensureBuffer)(e.data):Buffer.alloc(0),a=e.nonce!=null?(0,g.ensureIntNumber)(e.nonce):null,o=e.gasPrice!=null?(0,g.ensureBigInt)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,g.ensureBigInt)(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?(0,g.ensureBigInt)(e.maxPriorityFeePerGas):null,h=e.gas!=null?(0,g.ensureBigInt)(e.gas):null,f=e.chainId?(0,g.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:t,toAddress:r,weiValue:s,data:i,nonce:a,gasPriceInWei:o,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:h,chainId:f}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw w.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw w.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,r,s){this._ensureKnownAddress(t);try{const a=await this.initializeRelay().signEthereumMessage(e,t,r,s);if((0,D.isErrorResponse)(a))throw new Error(a.errorMessage);return{jsonrpc:"2.0",id:0,result:a.result}}catch(i){throw typeof i.message=="string"&&i.message.match(/(denied|rejected)/i)?w.standardErrors.provider.userRejectedRequest("User denied message signature"):i}}async _ethereumAddressFromSignedMessage(e,t,r){const i=await this.initializeRelay().ethereumAddressFromSignedMessage(e,t,r);if((0,D.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,g.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(qe);if(!e)return(0,g.ensureIntNumber)(1);const t=parseInt(e,10);return(0,g.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{if(e=await this.initializeRelay().requestEthereumAccounts(),(0,D.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(t){throw typeof t.message=="string"&&t.message.match(/(denied|rejected)/i)?w.standardErrors.provider.userRejectedRequest("User denied account authorization"):t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,g.ensureAddressString)(e[0]),r=(0,g.ensureBuffer)(e[1]);return this._signEthereumMessage(r,t,!1)}_eth_ecRecover(e){const t=(0,g.ensureBuffer)(e[0]),r=(0,g.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,g.ensureBuffer)(e[0]),r=(0,g.ensureAddressString)(e[1]);return this._signEthereumMessage(t,r,!0)}_personal_ecRecover(e){const t=(0,g.ensureBuffer)(e[0]),r=(0,g.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,r,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const s=await this.initializeRelay().signEthereumTransaction(t);if((0,D.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(r){throw typeof r.message=="string"&&r.message.match(/(denied|rejected)/i)?w.standardErrors.provider.userRejectedRequest("User denied transaction signature"):r}}async _eth_sendRawTransaction(e){const t=(0,g.ensureBuffer)(e[0]),s=await this.initializeRelay().submitEthereumTransaction(t,this.getChainId());if((0,D.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const s=await this.initializeRelay().signAndSubmitEthereumTransaction(t);if((0,D.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(r){throw typeof r.message=="string"&&r.message.match(/(denied|rejected)/i)?w.standardErrors.provider.userRejectedRequest("User denied transaction signature"):r}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,g.ensureParsedJSONObject)(e[0]),r=(0,g.ensureAddressString)(e[1]);this._ensureKnownAddress(r);const s=Ke.default.hashForSignTypedDataLegacy({data:t}),i=JSON.stringify(t,null,2);return this._signEthereumMessage(s,r,!1,i)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,g.ensureAddressString)(e[0]),r=(0,g.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const s=Ke.default.hashForSignTypedData_v3({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(s,t,!1,i)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,g.ensureAddressString)(e[0]),r=(0,g.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const s=Ke.default.hashForSignTypedData_v4({data:r}),i=JSON.stringify(r,null,2);return this._signEthereumMessage(s,t,!1,i)}async _wallet_addEthereumChain(e){var t,r,s,i;const a=e[0];if(((t=a.rpcUrls)===null||t===void 0?void 0:t.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!a.chainName||a.chainName.trim()==="")throw w.standardErrors.rpc.invalidParams("chainName is a required field");if(!a.nativeCurrency)throw w.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(a.chainId,16);return await this.addEthereumChain(o,(r=a.rpcUrls)!==null&&r!==void 0?r:[],(s=a.blockExplorerUrls)!==null&&s!==void 0?s:[],a.chainName,(i=a.iconUrls)!==null&&i!==void 0?i:[],a.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw w.standardErrors.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw w.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw w.standardErrors.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw w.standardErrors.rpc.invalidParams("Address is required");const r=this.getChainId(),{address:s,symbol:i,image:a,decimals:o}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,s,i,o,a,r)}}initializeRelay(){if(!this._relay){const e=new zr.WalletLinkRelay({linkAPIUrl:ht.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback((t,r)=>this._setAddresses(t,r)),e.setChainCallback((t,r)=>{this.updateProviderInfo(r,parseInt(t,10))}),this._relay=e}return this._relay}}Ce.WalletLinkSigner=Gr;var k={};Object.defineProperty(k,"__esModule",{value:!0});k.checkErrorForInvalidRequestArgs=k.getCoinbaseInjectedProvider=k.getCoinbaseInjectedSigner=k.fetchRPCRequest=void 0;const Yr=K,pe=j;async function Jr(n,e){if(!e.rpcUrl)throw pe.standardErrors.rpc.internal("No RPC URL set for chain");const t=Object.assign(Object.assign({},n),{jsonrpc:"2.0",id:crypto.randomUUID()});return(await(await window.fetch(e.rpcUrl,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":Yr.LIB_VERSION}})).json()).result}k.fetchRPCRequest=Jr;function Gt(){return globalThis.coinbaseWalletSigner}k.getCoinbaseInjectedSigner=Gt;function Qr(){return globalThis.coinbaseWalletExtension}function Xr(){var n,e;try{const t=globalThis;return(n=t.ethereum)!==null&&n!==void 0?n:(e=t.top)===null||e===void 0?void 0:e.ethereum}catch{return}}function es({metadata:n,preference:e}){var t;if(e.options!=="smartWalletOnly"){if(Gt())return;const i=Qr();if(i){const{appName:a,appLogoUrl:o,appChainIds:c}=n;return(t=i.setAppInfo)===null||t===void 0||t.call(i,a,o,c),i}}const r=Xr();if(r!=null&&r.isCoinbaseBrowser)return r}k.getCoinbaseInjectedProvider=es;function ts(n){if(!n||typeof n!="object"||Array.isArray(n))return pe.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:n});const{method:e,params:t}=n;if(typeof e!="string"||e.length===0)return pe.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:n});if(t!==void 0&&!Array.isArray(t)&&(typeof t!="object"||t===null))return pe.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:n})}k.checkErrorForInvalidRequestArgs=ts;Object.defineProperty(P,"__esModule",{value:!0});P.createSigner=P.fetchSignerType=P.storeSignerType=P.loadSignerType=void 0;const ns=_e,Yt=Ce,rs=j,ss=k,is=O,Jt="SignerType",Qt=new is.ScopedLocalStorage("CBWSDK","SignerConfigurator");function as(){return Qt.getItem(Jt)}P.loadSignerType=as;function os(n){Qt.setItem(Jt,n)}P.storeSignerType=os;async function cs(n){const{communicator:e,metadata:t}=n;ls(e,t).catch(()=>{});const r={id:crypto.randomUUID(),event:"selectSignerType",data:n.preference},{data:s}=await e.postRequestAndWaitForResponse(r);return s}P.fetchSignerType=cs;function ds(n){const{signerType:e,metadata:t,communicator:r,updateListener:s}=n;switch(e){case"scw":return new ns.SCWSigner({metadata:t,updateListener:s,communicator:r});case"walletlink":return new Yt.WalletLinkSigner({metadata:t,updateListener:s});case"extension":{const i=(0,ss.getCoinbaseInjectedSigner)();if(!i)throw rs.standardErrors.rpc.internal("injected signer not found");return i}}}P.createSigner=ds;async function ls(n,e){await n.onMessage(({event:r})=>r==="WalletLinkSessionRequest");const t=new Yt.WalletLinkSigner({metadata:e});n.postMessage({event:"WalletLinkUpdate",data:{session:t.getSession()}}),await t.handshake(),n.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}var Te={},J={};Object.defineProperty(J,"__esModule",{value:!0});J.closePopup=J.openPopup=void 0;const us=j,pt=420,ft=540;function hs(n){const e=(window.innerWidth-pt)/2+window.screenX,t=(window.innerHeight-ft)/2+window.screenY,r=window.open(n,"Smart Wallet",`width=${pt}, height=${ft}, left=${e}, top=${t}`);if(r==null||r.focus(),!r)throw us.standardErrors.rpc.internal("Pop up window failed to open");return r}J.openPopup=hs;function gs(n){n&&!n.closed&&n.close()}J.closePopup=gs;Object.defineProperty(Te,"__esModule",{value:!0});Te.Communicator=void 0;const ps=K,mt=J,fs=T,bt=j;class ms{constructor(e=fs.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async t=>{(await this.waitForPopupLoaded()).postMessage(t,this.url.origin)},this.postRequestAndWaitForResponse=async t=>{const r=this.onMessage(({requestId:s})=>s===t.id);return this.postMessage(t),await r},this.onMessage=async t=>new Promise((r,s)=>{const i=a=>{if(a.origin!==this.url.origin)return;const o=a.data;t(o)&&(r(o),window.removeEventListener("message",i),this.listeners.delete(i))};window.addEventListener("message",i),this.listeners.set(i,{reject:s})}),this.disconnect=()=>{(0,mt.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:t},r)=>{t(bt.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",r)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=(0,mt.openPopup)(this.url),this.onMessage(({event:t})=>t==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:t})=>t==="PopupLoaded").then(t=>{this.postMessage({requestId:t.id,data:{version:ps.LIB_VERSION}})}).then(()=>{if(!this.popup)throw bt.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}}Te.Communicator=ms;var je={};Object.defineProperty(je,"__esModule",{value:!0});je.determineMethodCategory=void 0;const yt={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};function bs(n){for(const e in yt){const t=e;if(yt[t].includes(n))return t}}je.determineMethodCategory=bs;var ys=M&&M.__rest||function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(n);s{try{if(this.connected)return this.emit("connect",{chainId:(0,X.hexStringFromIntNumber)((0,he.IntNumber)(this.chain.id))}),this.accounts;const h=await this.requestSignerSelection(),f=this.initSigner(h),d=await f.handshake();return this.signer=f,(0,ge.storeSignerType)(h),this.emit("connect",{chainId:(0,X.hexStringFromIntNumber)((0,he.IntNumber)(this.chain.id))}),d}catch(h){throw this.handleUnauthorizedError(h),h}},sign:async l=>{if(!this.connected||!this.signer)throw z.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(l)}catch(h){throw this.handleUnauthorizedError(h),h}},fetch:l=>(0,wt.fetchRPCRequest)(l,this.chain),state:l=>{const h=()=>{if(this.connected)return this.accounts;throw z.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(l.method){case"eth_chainId":return(0,X.hexStringFromIntNumber)((0,he.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return h();case"eth_coinbase":return h()[0];default:return this.handlers.unsupported(l)}},deprecated:({method:l})=>{throw z.standardErrors.rpc.methodNotSupported(`Method ${l} is deprecated.`)},unsupported:({method:l})=>{throw z.standardErrors.rpc.methodNotSupported(`Method ${l} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:l,source:h})=>{(0,X.areAddressArraysEqual)(this.accounts,l)||(this.accounts=l,h!=="storage"&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:l,source:h})=>{l.id===this.chain.id&&l.rpcUrl===this.chain.rpcUrl||(this.chain=l,h!=="storage"&&this.emit("chainChanged",(0,X.hexStringFromIntNumber)((0,he.IntNumber)(l.id))))}},this.metadata=s,this.preference=o,this.communicator=new Es.Communicator(a),this.chain={id:(r=(t=s.appChainIds)===null||t===void 0?void 0:t[0])!==null&&r!==void 0?r:1};const c=(0,ge.loadSignerType)();this.signer=c?this.initSigner(c):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const r=(0,wt.checkErrorForInvalidRequestArgs)(e);if(r)throw r;const s=(t=(0,Ss.determineMethodCategory)(e.method))!==null&&t!==void 0?t:"fetch";return this.handlers[s](e)}catch(r){return Promise.reject((0,_s.serializeError)(r,e.method))}}handleUnauthorizedError(e){e.code===z.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},Cs.ScopedLocalStorage.clearAll(),this.emit("disconnect",z.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,ge.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,ge.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}be.CoinbaseWalletProvider=ks;Object.defineProperty(te,"__esModule",{value:!0});te.CoinbaseWalletSDK=void 0;const Is=me,Ms=be,Ls=O,As=K,Rs=u,xs=k;class Ps{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,Rs.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;const r={metadata:this.metadata,preference:e};return(t=(0,xs.getCoinbaseInjectedProvider)(r))!==null&&t!==void 0?t:new Ms.CoinbaseWalletProvider(r)}getCoinbaseWalletLogo(e,t=240){return(0,Is.walletLogo)(e,t)}storeLatestVersion(){new Ls.ScopedLocalStorage("CBWSDK").setItem("VERSION",As.LIB_VERSION)}}te.CoinbaseWalletSDK=Ps;(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CoinbaseWalletSDK=void 0;const e=te;n.default=e.CoinbaseWalletSDK;var t=te;Object.defineProperty(n,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return t.CoinbaseWalletSDK}})})(Et);const Ns=rn(Et),Os=Object.freeze(Object.defineProperty({__proto__:null,default:Ns},Symbol.toStringTag,{value:"Module"}));export{Os as i}; diff --git a/assets/index-_hnmUMA-.css b/assets/index-_hnmUMA-.css new file mode 100644 index 0000000..2e4bc8d --- /dev/null +++ b/assets/index-_hnmUMA-.css @@ -0,0 +1 @@ +:root{color:#ffffffde;color-scheme:light dark;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;font-synthesis:none;font-weight:400;line-height:1.5;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}.form{text-align:left}@font-face{font-family:OCR;font-weight:700;src:url(/assets/OCR-AStd-Regular-DrmV1nNf.ttf)}@font-face{font-family:Roboto;font-weight:400;src:url(/assets/Roboto-Regular-BHeBnKzs.ttf)}@font-face{font-family:Roboto;font-weight:400;font-style:italic;src:url(/assets/Roboto-Italic-Dxo79a56.ttf)}@font-face{font-family:Roboto;font-weight:700;src:url(/assets/Roboto-Bold-BKtbn9Wi.ttf)}@font-face{font-family:Roboto;font-weight:700;font-style:italic;src:url(/assets/Roboto-BoldItalic-DLtOeeWN.ttf)} diff --git a/assets/index.es-D_NNZUrP.js b/assets/index.es-D_NNZUrP.js new file mode 100644 index 0000000..b336904 --- /dev/null +++ b/assets/index.es-D_NNZUrP.js @@ -0,0 +1,57 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CB5etGIE.js","assets/index-B5bDTh7Y.js","assets/index-_hnmUMA-.css"])))=>i.map(i=>d[i]); +import{a as Eg,d as W3,g as iu,c as Bi,_ as J3}from"./index-B5bDTh7Y.js";import{r as X3,e as Si,G as Bl}from"./___vite-browser-external_commonjs-proxy-DtqXsXYi.js";var ye={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var cl=function(r,e){return cl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)i.hasOwnProperty(s)&&(t[s]=i[s])},cl(r,e)};function Z3(r,e){cl(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var ul=function(){return ul=Object.assign||function(e){for(var t,i=1,s=arguments.length;i=0;f--)(u=r[f])&&(a=(s<3?u(a):s>3?u(e,t,a):u(e,t))||a);return s>3&&a&&Object.defineProperty(e,t,a),a}function r6(r,e){return function(t,i){e(t,i,r)}}function i6(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function n6(r,e,t,i){function s(a){return a instanceof t?a:new t(function(u){u(a)})}return new(t||(t=Promise))(function(a,u){function f(b){try{d(i.next(b))}catch(E){u(E)}}function p(b){try{d(i.throw(b))}catch(E){u(E)}}function d(b){b.done?a(b.value):s(b.value).then(f,p)}d((i=i.apply(r,e||[])).next())})}function s6(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(d){return function(b){return p([d,b])}}function p(d){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,s&&(a=d[0]&2?s.return:d[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,d[1])).done)return a;switch(s=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,s=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ag(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i=t.call(r),s,a=[],u;try{for(;(e===void 0||e-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(f){u={error:f}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(u)throw u.error}}return a}function c6(){for(var r=[],e=0;e1||f(x,D)})})}function f(x,D){try{p(i[x](D))}catch(C){E(a[0][3],C)}}function p(x){x.value instanceof ta?Promise.resolve(x.value.v).then(d,b):E(a[0][2],x)}function d(x){f("next",x)}function b(x){f("throw",x)}function E(x,D){x(D),a.shift(),a.length&&f(a[0][0],a[0][1])}}function l6(r){var e,t;return e={},i("next"),i("throw",function(s){throw s}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(s,a){e[s]=r[s]?function(u){return(t=!t)?{value:ta(r[s](u)),done:s==="return"}:a?a(u):u}:a}}function f6(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof hl=="function"?hl(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(a){t[a]=r[a]&&function(u){return new Promise(function(f,p){u=r[a](u),s(f,p,u.done,u.value)})}}function s(a,u,f,p){Promise.resolve(p).then(function(d){a({value:d,done:f})},u)}}function d6(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function p6(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function g6(r){return r&&r.__esModule?r:{default:r}}function m6(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function v6(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}const y6=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return ul},__asyncDelegator:l6,__asyncGenerator:h6,__asyncValues:f6,__await:ta,__awaiter:n6,__classPrivateFieldGet:m6,__classPrivateFieldSet:v6,__createBinding:o6,__decorate:t6,__exportStar:a6,__extends:Z3,__generator:s6,__importDefault:g6,__importStar:p6,__makeTemplateObject:d6,__metadata:i6,__param:r6,__read:Ag,__rest:e6,__spread:c6,__spreadArrays:u6,__values:hl},Symbol.toStringTag,{value:"Module"})),ua=Eg(y6);var xh={},qo={},u0;function w6(){if(u0)return qo;u0=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.delay=void 0;function r(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}return qo.delay=r,qo}var ms={},Mh={},vs={},h0;function b6(){return h0||(h0=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.ONE_THOUSAND=vs.ONE_HUNDRED=void 0,vs.ONE_HUNDRED=100,vs.ONE_THOUSAND=1e3),vs}var Ch={},l0;function _6(){return l0||(l0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=r.ONE_MINUTE*5,r.TEN_MINUTES=r.ONE_MINUTE*10,r.THIRTY_MINUTES=r.ONE_MINUTE*30,r.SIXTY_MINUTES=r.ONE_MINUTE*60,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=r.ONE_HOUR*3,r.SIX_HOURS=r.ONE_HOUR*6,r.TWELVE_HOURS=r.ONE_HOUR*12,r.TWENTY_FOUR_HOURS=r.ONE_HOUR*24,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=r.ONE_DAY*3,r.FIVE_DAYS=r.ONE_DAY*5,r.SEVEN_DAYS=r.ONE_DAY*7,r.THIRTY_DAYS=r.ONE_DAY*30,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=r.ONE_WEEK*2,r.THREE_WEEKS=r.ONE_WEEK*3,r.FOUR_WEEKS=r.ONE_WEEK*4,r.ONE_YEAR=r.ONE_DAY*365}(Ch)),Ch}var f0;function Sg(){return f0||(f0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=ua;e.__exportStar(b6(),r),e.__exportStar(_6(),r)}(Mh)),Mh}var d0;function E6(){if(d0)return ms;d0=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.fromMiliseconds=ms.toMiliseconds=void 0;const r=Sg();function e(i){return i*r.ONE_THOUSAND}ms.toMiliseconds=e;function t(i){return Math.floor(i/r.ONE_THOUSAND)}return ms.fromMiliseconds=t,ms}var p0;function A6(){return p0||(p0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=ua;e.__exportStar(w6(),r),e.__exportStar(E6(),r)}(xh)),xh}var Ys={},g0;function S6(){if(g0)return Ys;g0=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const i=this.get(t);if(typeof i.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const s=Date.now()-i.started;this.timestamps.set(t,{started:i.started,elapsed:s})}get(t){const i=this.timestamps.get(t);if(typeof i>"u")throw new Error(`No timestamp found for label: ${t}`);return i}elapsed(t){const i=this.get(t);return i.elapsed||Date.now()-i.started}}return Ys.Watch=r,Ys.default=r,Ys}var Ph={},jo={},m0;function I6(){if(m0)return jo;m0=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.IWatch=void 0;class r{}return jo.IWatch=r,jo}var v0;function D6(){return v0||(v0=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),ua.__exportStar(I6(),r)}(Ph)),Ph}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=ua;e.__exportStar(A6(),r),e.__exportStar(S6(),r),e.__exportStar(D6(),r),e.__exportStar(Sg(),r)})(ye);var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.getLocalStorage=Ft.getLocalStorageOrThrow=Ft.getCrypto=Ft.getCryptoOrThrow=Ig=Ft.getLocation=Ft.getLocationOrThrow=ql=Ft.getNavigator=Ft.getNavigatorOrThrow=Ll=Ft.getDocument=Ft.getDocumentOrThrow=Ft.getFromWindowOrThrow=Ft.getFromWindow=void 0;function Is(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}Ft.getFromWindow=Is;function uo(r){const e=Is(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}Ft.getFromWindowOrThrow=uo;function x6(){return uo("document")}Ft.getDocumentOrThrow=x6;function M6(){return Is("document")}var Ll=Ft.getDocument=M6;function C6(){return uo("navigator")}Ft.getNavigatorOrThrow=C6;function P6(){return Is("navigator")}var ql=Ft.getNavigator=P6;function O6(){return uo("location")}Ft.getLocationOrThrow=O6;function N6(){return Is("location")}var Ig=Ft.getLocation=N6;function R6(){return uo("crypto")}Ft.getCryptoOrThrow=R6;function T6(){return Is("crypto")}Ft.getCrypto=T6;function U6(){return uo("localStorage")}Ft.getLocalStorageOrThrow=U6;function B6(){return Is("localStorage")}Ft.getLocalStorage=B6;var jl={};Object.defineProperty(jl,"__esModule",{value:!0});var Dg=jl.getWindowMetadata=void 0;const y0=Ft;function L6(){let r,e;try{r=y0.getDocumentOrThrow(),e=y0.getLocationOrThrow()}catch{return null}function t(){const E=r.getElementsByTagName("link"),x=[];for(let D=0;D-1){const G=C.getAttribute("href");if(G)if(G.toLowerCase().indexOf("https:")===-1&&G.toLowerCase().indexOf("http:")===-1&&G.indexOf("//")!==0){let ee=e.protocol+"//"+e.host;if(G.indexOf("/")===0)ee+=G;else{const K=e.pathname.split("/");K.pop();const V=K.join("/");ee+=V+"/"+G}x.push(ee)}else if(G.indexOf("//")===0){const ee=e.protocol+G;x.push(ee)}else x.push(G)}}return x}function i(...E){const x=r.getElementsByTagName("meta");for(let D=0;DC.getAttribute(G)).filter(G=>G?E.includes(G):!1);if(Q.length&&Q){const G=C.getAttribute("content");if(G)return G}}return""}function s(){let E=i("name","og:site_name","og:title","twitter:title");return E||(E=r.title),E}function a(){return i("description","og:description","twitter:description","keywords")}const u=s(),f=a(),p=e.origin,d=t();return{description:f,url:p,icons:d,name:u}}Dg=jl.getWindowMetadata=L6;var ra={},q6=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),xg="%[a-f0-9]{2}",w0=new RegExp("("+xg+")|([^%]+?)","gi"),b0=new RegExp("("+xg+")+","gi");function ll(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;var t=r.slice(0,e),i=r.slice(e);return Array.prototype.concat.call([],ll(t),ll(i))}function j6(r){try{return decodeURIComponent(r)}catch{for(var e=r.match(w0)||[],t=1;t{if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[r];const t=r.indexOf(e);return t===-1?[r]:[r.slice(0,t),r.slice(t+e.length)]},k6=function(r,e){for(var t={},i=Object.keys(r),s=Array.isArray(e),a=0;aK==null,u=Symbol("encodeFragmentIdentifier");function f(K){switch(K.arrayFormat){case"index":return V=>(q,$)=>{const z=q.length;return $===void 0||K.skipNull&&$===null||K.skipEmptyString&&$===""?q:$===null?[...q,[b(V,K),"[",z,"]"].join("")]:[...q,[b(V,K),"[",b(z,K),"]=",b($,K)].join("")]};case"bracket":return V=>(q,$)=>$===void 0||K.skipNull&&$===null||K.skipEmptyString&&$===""?q:$===null?[...q,[b(V,K),"[]"].join("")]:[...q,[b(V,K),"[]=",b($,K)].join("")];case"colon-list-separator":return V=>(q,$)=>$===void 0||K.skipNull&&$===null||K.skipEmptyString&&$===""?q:$===null?[...q,[b(V,K),":list="].join("")]:[...q,[b(V,K),":list=",b($,K)].join("")];case"comma":case"separator":case"bracket-separator":{const V=K.arrayFormat==="bracket-separator"?"[]=":"=";return q=>($,z)=>z===void 0||K.skipNull&&z===null||K.skipEmptyString&&z===""?$:(z=z===null?"":z,$.length===0?[[b(q,K),V,b(z,K)].join("")]:[[$,b(z,K)].join(K.arrayFormatSeparator)])}default:return V=>(q,$)=>$===void 0||K.skipNull&&$===null||K.skipEmptyString&&$===""?q:$===null?[...q,b(V,K)]:[...q,[b(V,K),"=",b($,K)].join("")]}}function p(K){let V;switch(K.arrayFormat){case"index":return(q,$,z)=>{if(V=/\[(\d*)\]$/.exec(q),q=q.replace(/\[\d*\]$/,""),!V){z[q]=$;return}z[q]===void 0&&(z[q]={}),z[q][V[1]]=$};case"bracket":return(q,$,z)=>{if(V=/(\[\])$/.exec(q),q=q.replace(/\[\]$/,""),!V){z[q]=$;return}if(z[q]===void 0){z[q]=[$];return}z[q]=[].concat(z[q],$)};case"colon-list-separator":return(q,$,z)=>{if(V=/(:list)$/.exec(q),q=q.replace(/:list$/,""),!V){z[q]=$;return}if(z[q]===void 0){z[q]=[$];return}z[q]=[].concat(z[q],$)};case"comma":case"separator":return(q,$,z)=>{const y=typeof $=="string"&&$.includes(K.arrayFormatSeparator),T=typeof $=="string"&&!y&&E($,K).includes(K.arrayFormatSeparator);$=T?E($,K):$;const ne=y||T?$.split(K.arrayFormatSeparator).map(fe=>E(fe,K)):$===null?$:E($,K);z[q]=ne};case"bracket-separator":return(q,$,z)=>{const y=/(\[\])$/.test(q);if(q=q.replace(/\[\]$/,""),!y){z[q]=$&&E($,K);return}const T=$===null?[]:$.split(K.arrayFormatSeparator).map(ne=>E(ne,K));if(z[q]===void 0){z[q]=T;return}z[q]=[].concat(z[q],T)};default:return(q,$,z)=>{if(z[q]===void 0){z[q]=$;return}z[q]=[].concat(z[q],$)}}}function d(K){if(typeof K!="string"||K.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function b(K,V){return V.encode?V.strict?e(K):encodeURIComponent(K):K}function E(K,V){return V.decode?t(K):K}function x(K){return Array.isArray(K)?K.sort():typeof K=="object"?x(Object.keys(K)).sort((V,q)=>Number(V)-Number(q)).map(V=>K[V]):K}function D(K){const V=K.indexOf("#");return V!==-1&&(K=K.slice(0,V)),K}function C(K){let V="";const q=K.indexOf("#");return q!==-1&&(V=K.slice(q)),V}function Q(K){K=D(K);const V=K.indexOf("?");return V===-1?"":K.slice(V+1)}function G(K,V){return V.parseNumbers&&!Number.isNaN(Number(K))&&typeof K=="string"&&K.trim()!==""?K=Number(K):V.parseBooleans&&K!==null&&(K.toLowerCase()==="true"||K.toLowerCase()==="false")&&(K=K.toLowerCase()==="true"),K}function ee(K,V){V=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},V),d(V.arrayFormatSeparator);const q=p(V),$=Object.create(null);if(typeof K!="string"||(K=K.trim().replace(/^[?#&]/,""),!K))return $;for(const z of K.split("&")){if(z==="")continue;let[y,T]=i(V.decode?z.replace(/\+/g," "):z,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(V.arrayFormat)?T:E(T,V),q(E(y,V),T,$)}for(const z of Object.keys($)){const y=$[z];if(typeof y=="object"&&y!==null)for(const T of Object.keys(y))y[T]=G(y[T],V);else $[z]=G(y,V)}return V.sort===!1?$:(V.sort===!0?Object.keys($).sort():Object.keys($).sort(V.sort)).reduce((z,y)=>{const T=$[y];return T&&typeof T=="object"&&!Array.isArray(T)?z[y]=x(T):z[y]=T,z},Object.create(null))}r.extract=Q,r.parse=ee,r.stringify=(K,V)=>{if(!K)return"";V=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},V),d(V.arrayFormatSeparator);const q=T=>V.skipNull&&a(K[T])||V.skipEmptyString&&K[T]==="",$=f(V),z={};for(const T of Object.keys(K))q(T)||(z[T]=K[T]);const y=Object.keys(z);return V.sort!==!1&&y.sort(V.sort),y.map(T=>{const ne=K[T];return ne===void 0?"":ne===null?b(T,V):Array.isArray(ne)?ne.length===0&&V.arrayFormat==="bracket-separator"?b(T,V)+"[]":ne.reduce($(T),[]).join("&"):b(T,V)+"="+b(ne,V)}).filter(T=>T.length>0).join("&")},r.parseUrl=(K,V)=>{V=Object.assign({decode:!0},V);const[q,$]=i(K,"#");return Object.assign({url:q.split("?")[0]||"",query:ee(Q(K),V)},V&&V.parseFragmentIdentifier&&$?{fragmentIdentifier:E($,V)}:{})},r.stringifyUrl=(K,V)=>{V=Object.assign({encode:!0,strict:!0,[u]:!0},V);const q=D(K.url).split("?")[0]||"",$=r.extract(K.url),z=r.parse($,{sort:!1}),y=Object.assign(z,K.query);let T=r.stringify(y,V);T&&(T=`?${T}`);let ne=C(K.url);return K.fragmentIdentifier&&(ne=`#${V[u]?b(K.fragmentIdentifier,V):K.fragmentIdentifier}`),`${q}${T}${ne}`},r.pick=(K,V,q)=>{q=Object.assign({parseFragmentIdentifier:!0,[u]:!1},q);const{url:$,query:z,fragmentIdentifier:y}=r.parseUrl(K,q);return r.stringifyUrl({url:$,query:s(z,V),fragmentIdentifier:y},q)},r.exclude=(K,V,q)=>{const $=Array.isArray(V)?z=>!V.includes(z):(z,y)=>!V(z,y);return r.pick(K,$,q)}})(ra);var Fl={},nu={},ot={},Mg={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});function e(f,p){var d=f>>>16&65535,b=f&65535,E=p>>>16&65535,x=p&65535;return b*x+(d*x+b*E<<16>>>0)|0}r.mul=Math.imul||e;function t(f,p){return f+p|0}r.add=t;function i(f,p){return f-p|0}r.sub=i;function s(f,p){return f<>>32-p}r.rotl=s;function a(f,p){return f<<32-p|f>>>p}r.rotr=a;function u(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f}r.isInteger=Number.isInteger||u,r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(f){return r.isInteger(f)&&f>=-r.MAX_SAFE_INTEGER&&f<=r.MAX_SAFE_INTEGER}})(Mg);Object.defineProperty(ot,"__esModule",{value:!0});var Cg=Mg;function H6(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])<<16>>16}ot.readInt16BE=H6;function K6(r,e){return e===void 0&&(e=0),(r[e+0]<<8|r[e+1])>>>0}ot.readUint16BE=K6;function V6(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])<<16>>16}ot.readInt16LE=V6;function G6(r,e){return e===void 0&&(e=0),(r[e+1]<<8|r[e])>>>0}ot.readUint16LE=G6;function Pg(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>8,e[t+1]=r>>>0,e}ot.writeUint16BE=Pg;ot.writeInt16BE=Pg;function Og(r,e,t){return e===void 0&&(e=new Uint8Array(2)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e}ot.writeUint16LE=Og;ot.writeInt16LE=Og;function fl(r,e){return e===void 0&&(e=0),r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}ot.readInt32BE=fl;function dl(r,e){return e===void 0&&(e=0),(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}ot.readUint32BE=dl;function pl(r,e){return e===void 0&&(e=0),r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e]}ot.readInt32LE=pl;function gl(r,e){return e===void 0&&(e=0),(r[e+3]<<24|r[e+2]<<16|r[e+1]<<8|r[e])>>>0}ot.readUint32LE=gl;function kc(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>24,e[t+1]=r>>>16,e[t+2]=r>>>8,e[t+3]=r>>>0,e}ot.writeUint32BE=kc;ot.writeInt32BE=kc;function Hc(r,e,t){return e===void 0&&(e=new Uint8Array(4)),t===void 0&&(t=0),e[t+0]=r>>>0,e[t+1]=r>>>8,e[t+2]=r>>>16,e[t+3]=r>>>24,e}ot.writeUint32LE=Hc;ot.writeInt32LE=Hc;function Y6(r,e){e===void 0&&(e=0);var t=fl(r,e),i=fl(r,e+4);return t*4294967296+i-(i>>31)*4294967296}ot.readInt64BE=Y6;function Q6(r,e){e===void 0&&(e=0);var t=dl(r,e),i=dl(r,e+4);return t*4294967296+i}ot.readUint64BE=Q6;function W6(r,e){e===void 0&&(e=0);var t=pl(r,e),i=pl(r,e+4);return i*4294967296+t-(t>>31)*4294967296}ot.readInt64LE=W6;function J6(r,e){e===void 0&&(e=0);var t=gl(r,e),i=gl(r,e+4);return i*4294967296+t}ot.readUint64LE=J6;function Ng(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),kc(r/4294967296>>>0,e,t),kc(r>>>0,e,t+4),e}ot.writeUint64BE=Ng;ot.writeInt64BE=Ng;function Rg(r,e,t){return e===void 0&&(e=new Uint8Array(8)),t===void 0&&(t=0),Hc(r>>>0,e,t),Hc(r/4294967296>>>0,e,t+4),e}ot.writeUint64LE=Rg;ot.writeInt64LE=Rg;function X6(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,s=1,a=r/8+t-1;a>=t;a--)i+=e[a]*s,s*=256;return i}ot.readUintBE=X6;function Z6(r,e,t){if(t===void 0&&(t=0),r%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(r/8>e.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,s=1,a=t;a=i;a--)t[a]=e/s&255,s*=256;return t}ot.writeUintBE=e_;function t_(r,e,t,i){if(t===void 0&&(t=new Uint8Array(r/8)),i===void 0&&(i=0),r%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Cg.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,a=i;a>>16|w<<16,le=le+w|0,y^=le,y=y>>>20|y<<12,q=q+T|0,S^=q,S=S>>>16|S<<16,me=me+S|0,T^=me,T=T>>>20|T<<12,$=$+ne|0,M^=$,M=M>>>16|M<<16,l=l+M|0,ne^=l,ne=ne>>>20|ne<<12,z=z+fe|0,O^=z,O=O>>>16|O<<16,h=h+O|0,fe^=h,fe=fe>>>20|fe<<12,$=$+ne|0,M^=$,M=M>>>24|M<<8,l=l+M|0,ne^=l,ne=ne>>>25|ne<<7,z=z+fe|0,O^=z,O=O>>>24|O<<8,h=h+O|0,fe^=h,fe=fe>>>25|fe<<7,q=q+T|0,S^=q,S=S>>>24|S<<8,me=me+S|0,T^=me,T=T>>>25|T<<7,V=V+y|0,w^=V,w=w>>>24|w<<8,le=le+w|0,y^=le,y=y>>>25|y<<7,V=V+T|0,O^=V,O=O>>>16|O<<16,l=l+O|0,T^=l,T=T>>>20|T<<12,q=q+ne|0,w^=q,w=w>>>16|w<<16,h=h+w|0,ne^=h,ne=ne>>>20|ne<<12,$=$+fe|0,S^=$,S=S>>>16|S<<16,le=le+S|0,fe^=le,fe=fe>>>20|fe<<12,z=z+y|0,M^=z,M=M>>>16|M<<16,me=me+M|0,y^=me,y=y>>>20|y<<12,$=$+fe|0,S^=$,S=S>>>24|S<<8,le=le+S|0,fe^=le,fe=fe>>>25|fe<<7,z=z+y|0,M^=z,M=M>>>24|M<<8,me=me+M|0,y^=me,y=y>>>25|y<<7,q=q+ne|0,w^=q,w=w>>>24|w<<8,h=h+w|0,ne^=h,ne=ne>>>25|ne<<7,V=V+T|0,O^=V,O=O>>>24|O<<8,l=l+O|0,T^=l,T=T>>>25|T<<7;br.writeUint32LE(V+i|0,r,0),br.writeUint32LE(q+s|0,r,4),br.writeUint32LE($+a|0,r,8),br.writeUint32LE(z+u|0,r,12),br.writeUint32LE(y+f|0,r,16),br.writeUint32LE(T+p|0,r,20),br.writeUint32LE(ne+d|0,r,24),br.writeUint32LE(fe+b|0,r,28),br.writeUint32LE(le+E|0,r,32),br.writeUint32LE(me+x|0,r,36),br.writeUint32LE(l+D|0,r,40),br.writeUint32LE(h+C|0,r,44),br.writeUint32LE(w+Q|0,r,48),br.writeUint32LE(S+G|0,r,52),br.writeUint32LE(M+ee|0,r,56),br.writeUint32LE(O+K|0,r,60)}function Tg(r,e,t,i,s){if(s===void 0&&(s=0),r.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length>>=8,e++;if(i>0)throw new Error("ChaCha: counter overflow")}var Ug={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});function g_(r,e,t){return~(r-1)&e|r-1&t}Qn.select=g_;function m_(r,e){return(r|0)-(e|0)-1>>>31&1}Qn.lessOrEqual=m_;function Bg(r,e){if(r.length!==e.length)return 0;for(var t=0,i=0;i>>8}Qn.compare=Bg;function v_(r,e){return r.length===0||e.length===0?!1:Bg(r,e)!==0}Qn.equal=v_;(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Qn,t=ii;r.DIGEST_LENGTH=16;var i=function(){function u(f){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var p=f[0]|f[1]<<8;this._r[0]=p&8191;var d=f[2]|f[3]<<8;this._r[1]=(p>>>13|d<<3)&8191;var b=f[4]|f[5]<<8;this._r[2]=(d>>>10|b<<6)&7939;var E=f[6]|f[7]<<8;this._r[3]=(b>>>7|E<<9)&8191;var x=f[8]|f[9]<<8;this._r[4]=(E>>>4|x<<12)&255,this._r[5]=x>>>1&8190;var D=f[10]|f[11]<<8;this._r[6]=(x>>>14|D<<2)&8191;var C=f[12]|f[13]<<8;this._r[7]=(D>>>11|C<<5)&8065;var Q=f[14]|f[15]<<8;this._r[8]=(C>>>8|Q<<8)&8191,this._r[9]=Q>>>5&127,this._pad[0]=f[16]|f[17]<<8,this._pad[1]=f[18]|f[19]<<8,this._pad[2]=f[20]|f[21]<<8,this._pad[3]=f[22]|f[23]<<8,this._pad[4]=f[24]|f[25]<<8,this._pad[5]=f[26]|f[27]<<8,this._pad[6]=f[28]|f[29]<<8,this._pad[7]=f[30]|f[31]<<8}return u.prototype._blocks=function(f,p,d){for(var b=this._fin?0:2048,E=this._h[0],x=this._h[1],D=this._h[2],C=this._h[3],Q=this._h[4],G=this._h[5],ee=this._h[6],K=this._h[7],V=this._h[8],q=this._h[9],$=this._r[0],z=this._r[1],y=this._r[2],T=this._r[3],ne=this._r[4],fe=this._r[5],le=this._r[6],me=this._r[7],l=this._r[8],h=this._r[9];d>=16;){var w=f[p+0]|f[p+1]<<8;E+=w&8191;var S=f[p+2]|f[p+3]<<8;x+=(w>>>13|S<<3)&8191;var M=f[p+4]|f[p+5]<<8;D+=(S>>>10|M<<6)&8191;var O=f[p+6]|f[p+7]<<8;C+=(M>>>7|O<<9)&8191;var U=f[p+8]|f[p+9]<<8;Q+=(O>>>4|U<<12)&8191,G+=U>>>1&8191;var I=f[p+10]|f[p+11]<<8;ee+=(U>>>14|I<<2)&8191;var g=f[p+12]|f[p+13]<<8;K+=(I>>>11|g<<5)&8191;var N=f[p+14]|f[p+15]<<8;V+=(g>>>8|N<<8)&8191,q+=N>>>5|b;var ie=0,de=ie;de+=E*$,de+=x*(5*h),de+=D*(5*l),de+=C*(5*me),de+=Q*(5*le),ie=de>>>13,de&=8191,de+=G*(5*fe),de+=ee*(5*ne),de+=K*(5*T),de+=V*(5*y),de+=q*(5*z),ie+=de>>>13,de&=8191;var _=ie;_+=E*z,_+=x*$,_+=D*(5*h),_+=C*(5*l),_+=Q*(5*me),ie=_>>>13,_&=8191,_+=G*(5*le),_+=ee*(5*fe),_+=K*(5*ne),_+=V*(5*T),_+=q*(5*y),ie+=_>>>13,_&=8191;var Z=ie;Z+=E*y,Z+=x*z,Z+=D*$,Z+=C*(5*h),Z+=Q*(5*l),ie=Z>>>13,Z&=8191,Z+=G*(5*me),Z+=ee*(5*le),Z+=K*(5*fe),Z+=V*(5*ne),Z+=q*(5*T),ie+=Z>>>13,Z&=8191;var L=ie;L+=E*T,L+=x*y,L+=D*z,L+=C*$,L+=Q*(5*h),ie=L>>>13,L&=8191,L+=G*(5*l),L+=ee*(5*me),L+=K*(5*le),L+=V*(5*fe),L+=q*(5*ne),ie+=L>>>13,L&=8191;var j=ie;j+=E*ne,j+=x*T,j+=D*y,j+=C*z,j+=Q*$,ie=j>>>13,j&=8191,j+=G*(5*h),j+=ee*(5*l),j+=K*(5*me),j+=V*(5*le),j+=q*(5*fe),ie+=j>>>13,j&=8191;var k=ie;k+=E*fe,k+=x*ne,k+=D*T,k+=C*y,k+=Q*z,ie=k>>>13,k&=8191,k+=G*$,k+=ee*(5*h),k+=K*(5*l),k+=V*(5*me),k+=q*(5*le),ie+=k>>>13,k&=8191;var m=ie;m+=E*le,m+=x*fe,m+=D*ne,m+=C*T,m+=Q*y,ie=m>>>13,m&=8191,m+=G*z,m+=ee*$,m+=K*(5*h),m+=V*(5*l),m+=q*(5*me),ie+=m>>>13,m&=8191;var B=ie;B+=E*me,B+=x*le,B+=D*fe,B+=C*ne,B+=Q*T,ie=B>>>13,B&=8191,B+=G*y,B+=ee*z,B+=K*$,B+=V*(5*h),B+=q*(5*l),ie+=B>>>13,B&=8191;var te=ie;te+=E*l,te+=x*me,te+=D*le,te+=C*fe,te+=Q*ne,ie=te>>>13,te&=8191,te+=G*T,te+=ee*y,te+=K*z,te+=V*$,te+=q*(5*h),ie+=te>>>13,te&=8191;var ue=ie;ue+=E*h,ue+=x*l,ue+=D*me,ue+=C*le,ue+=Q*fe,ie=ue>>>13,ue&=8191,ue+=G*ne,ue+=ee*T,ue+=K*y,ue+=V*z,ue+=q*$,ie+=ue>>>13,ue&=8191,ie=(ie<<2)+ie|0,ie=ie+de|0,de=ie&8191,ie=ie>>>13,_+=ie,E=de,x=_,D=Z,C=L,Q=j,G=k,ee=m,K=B,V=te,q=ue,p+=16,d-=16}this._h[0]=E,this._h[1]=x,this._h[2]=D,this._h[3]=C,this._h[4]=Q,this._h[5]=G,this._h[6]=ee,this._h[7]=K,this._h[8]=V,this._h[9]=q},u.prototype.finish=function(f,p){p===void 0&&(p=0);var d=new Uint16Array(10),b,E,x,D;if(this._leftover){for(D=this._leftover,this._buffer[D++]=1;D<16;D++)this._buffer[D]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(b=this._h[1]>>>13,this._h[1]&=8191,D=2;D<10;D++)this._h[D]+=b,b=this._h[D]>>>13,this._h[D]&=8191;for(this._h[0]+=b*5,b=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=b,b=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=b,d[0]=this._h[0]+5,b=d[0]>>>13,d[0]&=8191,D=1;D<10;D++)d[D]=this._h[D]+b,b=d[D]>>>13,d[D]&=8191;for(d[9]-=8192,E=(b^1)-1,D=0;D<10;D++)d[D]&=E;for(E=~E,D=0;D<10;D++)this._h[D]=this._h[D]&E|d[D];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,x=this._h[0]+this._pad[0],this._h[0]=x&65535,D=1;D<8;D++)x=(this._h[D]+this._pad[D]|0)+(x>>>16)|0,this._h[D]=x&65535;return f[p+0]=this._h[0]>>>0,f[p+1]=this._h[0]>>>8,f[p+2]=this._h[1]>>>0,f[p+3]=this._h[1]>>>8,f[p+4]=this._h[2]>>>0,f[p+5]=this._h[2]>>>8,f[p+6]=this._h[3]>>>0,f[p+7]=this._h[3]>>>8,f[p+8]=this._h[4]>>>0,f[p+9]=this._h[4]>>>8,f[p+10]=this._h[5]>>>0,f[p+11]=this._h[5]>>>8,f[p+12]=this._h[6]>>>0,f[p+13]=this._h[6]>>>8,f[p+14]=this._h[7]>>>0,f[p+15]=this._h[7]>>>8,this._finished=!0,this},u.prototype.update=function(f){var p=0,d=f.length,b;if(this._leftover){b=16-this._leftover,b>d&&(b=d);for(var E=0;E=16&&(b=d-d%16,this._blocks(f,p,b),p+=b,d-=b),d){for(var E=0;E16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var D=new Uint8Array(16);D.set(d,D.length-d.length);var C=new Uint8Array(32);e.stream(this._key,D,C,4);var Q=b.length+this.tagLength,G;if(x){if(x.length!==Q)throw new Error("ChaCha20Poly1305: incorrect destination length");G=x}else G=new Uint8Array(Q);return e.streamXOR(this._key,D,b,G,4),this._authenticate(G.subarray(G.length-this.tagLength,G.length),C,G.subarray(0,G.length-this.tagLength),E),i.wipe(D),G},p.prototype.open=function(d,b,E,x){if(d.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(b.length0&&D.update(u.subarray(x.length%16))),D.update(E),E.length%16>0&&D.update(u.subarray(E.length%16));var C=new Uint8Array(8);x&&s.writeUint64LE(x.length,C),D.update(C),s.writeUint64LE(E.length,C),D.update(C);for(var Q=D.digest(),G=0;Gthis.blockSize?this._inner.update(t).finish(i).clean():i.set(t);for(var s=0;s1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},r.prototype.expand=function(e){for(var t=new Uint8Array(e),i=0;i256)throw new Error("randomString charset is too long");let x="";const D=b.length,C=256-256%D;for(;d>0;){const Q=s(Math.ceil(d*256/C),E);for(let G=0;G0;G++){const ee=Q[G];ee0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=p[b++],d--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(b=a(this._temp,this._state,p,b,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=p[b++],d--;return this},f.prototype.finish=function(p){if(!this._finished){var d=this._bytesHashed,b=this._bufferLength,E=d/536870912|0,x=d<<3,D=d%64<56?64:128;this._buffer[b]=128;for(var C=b+1;C0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(p){return this._state.set(p.state),this._bufferLength=p.bufferLength,p.buffer&&this._buffer.set(p.buffer),this._bytesHashed=p.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(p){t.wipe(p.state),p.buffer&&t.wipe(p.buffer),p.bufferLength=0,p.bytesHashed=0},f}();r.SHA256=i;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(f,p,d,b,E){for(;E>=64;){for(var x=p[0],D=p[1],C=p[2],Q=p[3],G=p[4],ee=p[5],K=p[6],V=p[7],q=0;q<16;q++){var $=b+q*4;f[q]=e.readUint32BE(d,$)}for(var q=16;q<64;q++){var z=f[q-2],y=(z>>>17|z<<15)^(z>>>19|z<<13)^z>>>10;z=f[q-15];var T=(z>>>7|z<<25)^(z>>>18|z<<14)^z>>>3;f[q]=(y+f[q-7]|0)+(T+f[q-16]|0)}for(var q=0;q<64;q++){var y=(((G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&ee^~G&K)|0)+(V+(s[q]+f[q]|0)|0)|0,T=((x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10))+(x&D^x&C^D&C)|0;V=K,K=ee,ee=G,G=Q+y|0,Q=C,C=D,D=x,x=y+T|0}p[0]+=x,p[1]+=D,p[2]+=C,p[3]+=Q,p[4]+=G,p[5]+=ee,p[6]+=K,p[7]+=V,b+=64,E-=64}return b}function u(f){var p=new i;p.update(f);var d=p.digest();return p.clean(),d}r.hash=u})(cu);var zl={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sharedKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.scalarMultBase=r.scalarMult=r.SHARED_KEY_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=void 0;const e=ho,t=ii;r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=32,r.SHARED_KEY_LENGTH=32;function i(q){const $=new Float64Array(16);if(q)for(let z=0;z>16&1),z[fe-1]&=65535;z[15]=y[15]-32767-(z[14]>>16&1);const ne=z[15]>>16&1;z[14]&=65535,f(y,z,1-ne)}for(let T=0;T<16;T++)q[2*T]=y[T]&255,q[2*T+1]=y[T]>>8}function d(q,$){for(let z=0;z<16;z++)q[z]=$[2*z]+($[2*z+1]<<8);q[15]&=32767}function b(q,$,z){for(let y=0;y<16;y++)q[y]=$[y]+z[y]}function E(q,$,z){for(let y=0;y<16;y++)q[y]=$[y]-z[y]}function x(q,$,z){let y,T,ne=0,fe=0,le=0,me=0,l=0,h=0,w=0,S=0,M=0,O=0,U=0,I=0,g=0,N=0,ie=0,de=0,_=0,Z=0,L=0,j=0,k=0,m=0,B=0,te=0,ue=0,ae=0,Me=0,Pe=0,Ie=0,Et=0,$e=0,xe=z[0],Le=z[1],_e=z[2],Ee=z[3],Ve=z[4],we=z[5],Ae=z[6],Be=z[7],be=z[8],Ce=z[9],qe=z[10],Oe=z[11],Ne=z[12],st=z[13],Te=z[14],Re=z[15];y=$[0],ne+=y*xe,fe+=y*Le,le+=y*_e,me+=y*Ee,l+=y*Ve,h+=y*we,w+=y*Ae,S+=y*Be,M+=y*be,O+=y*Ce,U+=y*qe,I+=y*Oe,g+=y*Ne,N+=y*st,ie+=y*Te,de+=y*Re,y=$[1],fe+=y*xe,le+=y*Le,me+=y*_e,l+=y*Ee,h+=y*Ve,w+=y*we,S+=y*Ae,M+=y*Be,O+=y*be,U+=y*Ce,I+=y*qe,g+=y*Oe,N+=y*Ne,ie+=y*st,de+=y*Te,_+=y*Re,y=$[2],le+=y*xe,me+=y*Le,l+=y*_e,h+=y*Ee,w+=y*Ve,S+=y*we,M+=y*Ae,O+=y*Be,U+=y*be,I+=y*Ce,g+=y*qe,N+=y*Oe,ie+=y*Ne,de+=y*st,_+=y*Te,Z+=y*Re,y=$[3],me+=y*xe,l+=y*Le,h+=y*_e,w+=y*Ee,S+=y*Ve,M+=y*we,O+=y*Ae,U+=y*Be,I+=y*be,g+=y*Ce,N+=y*qe,ie+=y*Oe,de+=y*Ne,_+=y*st,Z+=y*Te,L+=y*Re,y=$[4],l+=y*xe,h+=y*Le,w+=y*_e,S+=y*Ee,M+=y*Ve,O+=y*we,U+=y*Ae,I+=y*Be,g+=y*be,N+=y*Ce,ie+=y*qe,de+=y*Oe,_+=y*Ne,Z+=y*st,L+=y*Te,j+=y*Re,y=$[5],h+=y*xe,w+=y*Le,S+=y*_e,M+=y*Ee,O+=y*Ve,U+=y*we,I+=y*Ae,g+=y*Be,N+=y*be,ie+=y*Ce,de+=y*qe,_+=y*Oe,Z+=y*Ne,L+=y*st,j+=y*Te,k+=y*Re,y=$[6],w+=y*xe,S+=y*Le,M+=y*_e,O+=y*Ee,U+=y*Ve,I+=y*we,g+=y*Ae,N+=y*Be,ie+=y*be,de+=y*Ce,_+=y*qe,Z+=y*Oe,L+=y*Ne,j+=y*st,k+=y*Te,m+=y*Re,y=$[7],S+=y*xe,M+=y*Le,O+=y*_e,U+=y*Ee,I+=y*Ve,g+=y*we,N+=y*Ae,ie+=y*Be,de+=y*be,_+=y*Ce,Z+=y*qe,L+=y*Oe,j+=y*Ne,k+=y*st,m+=y*Te,B+=y*Re,y=$[8],M+=y*xe,O+=y*Le,U+=y*_e,I+=y*Ee,g+=y*Ve,N+=y*we,ie+=y*Ae,de+=y*Be,_+=y*be,Z+=y*Ce,L+=y*qe,j+=y*Oe,k+=y*Ne,m+=y*st,B+=y*Te,te+=y*Re,y=$[9],O+=y*xe,U+=y*Le,I+=y*_e,g+=y*Ee,N+=y*Ve,ie+=y*we,de+=y*Ae,_+=y*Be,Z+=y*be,L+=y*Ce,j+=y*qe,k+=y*Oe,m+=y*Ne,B+=y*st,te+=y*Te,ue+=y*Re,y=$[10],U+=y*xe,I+=y*Le,g+=y*_e,N+=y*Ee,ie+=y*Ve,de+=y*we,_+=y*Ae,Z+=y*Be,L+=y*be,j+=y*Ce,k+=y*qe,m+=y*Oe,B+=y*Ne,te+=y*st,ue+=y*Te,ae+=y*Re,y=$[11],I+=y*xe,g+=y*Le,N+=y*_e,ie+=y*Ee,de+=y*Ve,_+=y*we,Z+=y*Ae,L+=y*Be,j+=y*be,k+=y*Ce,m+=y*qe,B+=y*Oe,te+=y*Ne,ue+=y*st,ae+=y*Te,Me+=y*Re,y=$[12],g+=y*xe,N+=y*Le,ie+=y*_e,de+=y*Ee,_+=y*Ve,Z+=y*we,L+=y*Ae,j+=y*Be,k+=y*be,m+=y*Ce,B+=y*qe,te+=y*Oe,ue+=y*Ne,ae+=y*st,Me+=y*Te,Pe+=y*Re,y=$[13],N+=y*xe,ie+=y*Le,de+=y*_e,_+=y*Ee,Z+=y*Ve,L+=y*we,j+=y*Ae,k+=y*Be,m+=y*be,B+=y*Ce,te+=y*qe,ue+=y*Oe,ae+=y*Ne,Me+=y*st,Pe+=y*Te,Ie+=y*Re,y=$[14],ie+=y*xe,de+=y*Le,_+=y*_e,Z+=y*Ee,L+=y*Ve,j+=y*we,k+=y*Ae,m+=y*Be,B+=y*be,te+=y*Ce,ue+=y*qe,ae+=y*Oe,Me+=y*Ne,Pe+=y*st,Ie+=y*Te,Et+=y*Re,y=$[15],de+=y*xe,_+=y*Le,Z+=y*_e,L+=y*Ee,j+=y*Ve,k+=y*we,m+=y*Ae,B+=y*Be,te+=y*be,ue+=y*Ce,ae+=y*qe,Me+=y*Oe,Pe+=y*Ne,Ie+=y*st,Et+=y*Te,$e+=y*Re,ne+=38*_,fe+=38*Z,le+=38*L,me+=38*j,l+=38*k,h+=38*m,w+=38*B,S+=38*te,M+=38*ue,O+=38*ae,U+=38*Me,I+=38*Pe,g+=38*Ie,N+=38*Et,ie+=38*$e,T=1,y=ne+T+65535,T=Math.floor(y/65536),ne=y-T*65536,y=fe+T+65535,T=Math.floor(y/65536),fe=y-T*65536,y=le+T+65535,T=Math.floor(y/65536),le=y-T*65536,y=me+T+65535,T=Math.floor(y/65536),me=y-T*65536,y=l+T+65535,T=Math.floor(y/65536),l=y-T*65536,y=h+T+65535,T=Math.floor(y/65536),h=y-T*65536,y=w+T+65535,T=Math.floor(y/65536),w=y-T*65536,y=S+T+65535,T=Math.floor(y/65536),S=y-T*65536,y=M+T+65535,T=Math.floor(y/65536),M=y-T*65536,y=O+T+65535,T=Math.floor(y/65536),O=y-T*65536,y=U+T+65535,T=Math.floor(y/65536),U=y-T*65536,y=I+T+65535,T=Math.floor(y/65536),I=y-T*65536,y=g+T+65535,T=Math.floor(y/65536),g=y-T*65536,y=N+T+65535,T=Math.floor(y/65536),N=y-T*65536,y=ie+T+65535,T=Math.floor(y/65536),ie=y-T*65536,y=de+T+65535,T=Math.floor(y/65536),de=y-T*65536,ne+=T-1+37*(T-1),T=1,y=ne+T+65535,T=Math.floor(y/65536),ne=y-T*65536,y=fe+T+65535,T=Math.floor(y/65536),fe=y-T*65536,y=le+T+65535,T=Math.floor(y/65536),le=y-T*65536,y=me+T+65535,T=Math.floor(y/65536),me=y-T*65536,y=l+T+65535,T=Math.floor(y/65536),l=y-T*65536,y=h+T+65535,T=Math.floor(y/65536),h=y-T*65536,y=w+T+65535,T=Math.floor(y/65536),w=y-T*65536,y=S+T+65535,T=Math.floor(y/65536),S=y-T*65536,y=M+T+65535,T=Math.floor(y/65536),M=y-T*65536,y=O+T+65535,T=Math.floor(y/65536),O=y-T*65536,y=U+T+65535,T=Math.floor(y/65536),U=y-T*65536,y=I+T+65535,T=Math.floor(y/65536),I=y-T*65536,y=g+T+65535,T=Math.floor(y/65536),g=y-T*65536,y=N+T+65535,T=Math.floor(y/65536),N=y-T*65536,y=ie+T+65535,T=Math.floor(y/65536),ie=y-T*65536,y=de+T+65535,T=Math.floor(y/65536),de=y-T*65536,ne+=T-1+37*(T-1),q[0]=ne,q[1]=fe,q[2]=le,q[3]=me,q[4]=l,q[5]=h,q[6]=w,q[7]=S,q[8]=M,q[9]=O,q[10]=U,q[11]=I,q[12]=g,q[13]=N,q[14]=ie,q[15]=de}function D(q,$){x(q,$,$)}function C(q,$){const z=i();for(let y=0;y<16;y++)z[y]=$[y];for(let y=253;y>=0;y--)D(z,z),y!==2&&y!==4&&x(z,z,$);for(let y=0;y<16;y++)q[y]=z[y]}function Q(q,$){const z=new Uint8Array(32),y=new Float64Array(80),T=i(),ne=i(),fe=i(),le=i(),me=i(),l=i();for(let M=0;M<31;M++)z[M]=q[M];z[31]=q[31]&127|64,z[0]&=248,d(y,$);for(let M=0;M<16;M++)ne[M]=y[M];T[0]=le[0]=1;for(let M=254;M>=0;--M){const O=z[M>>>3]>>>(M&7)&1;f(T,ne,O),f(fe,le,O),b(me,T,fe),E(T,T,fe),b(fe,ne,le),E(ne,ne,le),D(le,me),D(l,T),x(T,fe,T),x(fe,ne,me),b(me,T,fe),E(T,T,fe),D(ne,T),E(fe,le,l),x(T,fe,a),b(T,T,le),x(fe,fe,T),x(T,le,l),x(le,ne,y),D(ne,me),f(T,ne,O),f(fe,le,O)}for(let M=0;M<16;M++)y[M+16]=T[M],y[M+32]=fe[M],y[M+48]=ne[M],y[M+64]=le[M];const h=y.subarray(32),w=y.subarray(16);C(h,h),x(w,w,h);const S=new Uint8Array(32);return p(S,w),S}r.scalarMult=Q;function G(q){return Q(q,s)}r.scalarMultBase=G;function ee(q){if(q.length!==r.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${r.SECRET_KEY_LENGTH} bytes`);const $=new Uint8Array(q);return{publicKey:G($),secretKey:$}}r.generateKeyPairFromSeed=ee;function K(q){const $=(0,e.randomBytes)(32,q),z=ee($);return(0,t.wipe)($),z}r.generateKeyPair=K;function V(q,$,z=!1){if(q.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if($.length!==r.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const y=Q(q,$);if(z){let T=0;for(let ne=0;nes+a.length,0));const t=jg(e);let i=0;for(const s of r)t.set(s,i),i+=s.length;return t}function O_(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),i=0;i>>0,q=new Uint8Array(V);ee!==K;){for(var $=C[ee],z=0,y=V-1;($!==0||z>>0,q[y]=$%f>>>0,$=$/f>>>0;if($!==0)throw new Error("Non-zero carry");G=z,ee++}for(var T=V-G;T!==V&&q[T]===0;)T++;for(var ne=p.repeat(Q);T>>0,V=new Uint8Array(K);C[Q];){var q=t[C.charCodeAt(Q)];if(q===255)return;for(var $=0,z=K-1;(q!==0||$>>0,V[z]=q%256>>>0,q=q/256>>>0;if(q!==0)throw new Error("Non-zero carry");ee=$,Q++}if(C[Q]!==" "){for(var y=K-ee;y!==K&&V[y]===0;)y++;for(var T=new Uint8Array(G+(K-y)),ne=G;y!==K;)T[ne++]=V[y++];return T}}}function D(C){var Q=x(C);if(Q)return Q;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:x,decode:D}}var N_=O_,R_=N_;const T_=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},U_=r=>new TextEncoder().encode(r),B_=r=>new TextDecoder().decode(r);class L_{constructor(e,t,i){this.name=e,this.prefix=t,this.baseEncode=i}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class q_{constructor(e,t,i){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Fg(this,e)}}class j_{constructor(e){this.decoders=e}or(e){return Fg(this,e)}decode(e){const t=e[0],i=this.decoders[t];if(i)return i.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Fg=(r,e)=>new j_({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class F_{constructor(e,t,i,s){this.name=e,this.prefix=t,this.baseEncode=i,this.baseDecode=s,this.encoder=new L_(e,t,i),this.decoder=new q_(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const uu=({name:r,prefix:e,encode:t,decode:i})=>new F_(r,e,t,i),la=({prefix:r,name:e,alphabet:t})=>{const{encode:i,decode:s}=R_(t,e);return uu({prefix:r,name:e,encode:i,decode:a=>T_(s(a))})},$_=(r,e,t,i)=>{const s={};for(let b=0;b=8&&(f-=8,u[d++]=255&p>>f)}if(f>=t||255&p<<8-f)throw new SyntaxError("Unexpected end of data");return u},z_=(r,e,t)=>{const i=e[e.length-1]==="=",s=(1<t;)u-=t,a+=e[s&f>>u];if(u&&(a+=e[s&f<uu({prefix:e,name:r,encode(s){return z_(s,i,t)},decode(s){return $_(s,i,t,r)}}),k_=uu({prefix:"\0",name:"identity",encode:r=>B_(r),decode:r=>U_(r)}),H_=Object.freeze(Object.defineProperty({__proto__:null,identity:k_},Symbol.toStringTag,{value:"Module"})),K_=mr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),V_=Object.freeze(Object.defineProperty({__proto__:null,base2:K_},Symbol.toStringTag,{value:"Module"})),G_=mr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Y_=Object.freeze(Object.defineProperty({__proto__:null,base8:G_},Symbol.toStringTag,{value:"Module"})),Q_=la({prefix:"9",name:"base10",alphabet:"0123456789"}),W_=Object.freeze(Object.defineProperty({__proto__:null,base10:Q_},Symbol.toStringTag,{value:"Module"})),J_=mr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),X_=mr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Z_=Object.freeze(Object.defineProperty({__proto__:null,base16:J_,base16upper:X_},Symbol.toStringTag,{value:"Module"})),eE=mr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),tE=mr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),rE=mr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),iE=mr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),nE=mr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sE=mr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),oE=mr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),aE=mr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),cE=mr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),uE=Object.freeze(Object.defineProperty({__proto__:null,base32:eE,base32hex:nE,base32hexpad:oE,base32hexpadupper:aE,base32hexupper:sE,base32pad:rE,base32padupper:iE,base32upper:tE,base32z:cE},Symbol.toStringTag,{value:"Module"})),hE=la({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),lE=la({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),fE=Object.freeze(Object.defineProperty({__proto__:null,base36:hE,base36upper:lE},Symbol.toStringTag,{value:"Module"})),dE=la({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),pE=la({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),gE=Object.freeze(Object.defineProperty({__proto__:null,base58btc:dE,base58flickr:pE},Symbol.toStringTag,{value:"Module"})),mE=mr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vE=mr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),yE=mr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),wE=mr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),bE=Object.freeze(Object.defineProperty({__proto__:null,base64:mE,base64pad:vE,base64url:yE,base64urlpad:wE},Symbol.toStringTag,{value:"Module"})),$g=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),_E=$g.reduce((r,e,t)=>(r[t]=e,r),[]),EE=$g.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function AE(r){return r.reduce((e,t)=>(e+=_E[t],e),"")}function SE(r){const e=[];for(const t of r){const i=EE[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(i)}return new Uint8Array(e)}const IE=uu({prefix:"🚀",name:"base256emoji",encode:AE,decode:SE}),DE=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:IE},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const S0={...H_,...V_,...Y_,...W_,...Z_,...uE,...fE,...gE,...bE,...DE};function zg(r,e,t,i){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:i}}}const I0=zg("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),Oh=zg("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=jg(r.length);for(let t=0;t{if(e.length&&!e.includes(i))return;const s=r[i];t.push(...s.accounts)}),t}function Hg(r,e){return r.includes(":")?[r]:e.chains||[]}var CE=Object.defineProperty,x0=Object.getOwnPropertySymbols,PE=Object.prototype.hasOwnProperty,OE=Object.prototype.propertyIsEnumerable,M0=(r,e,t)=>e in r?CE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,C0=(r,e)=>{for(var t in e||(e={}))PE.call(e,t)&&M0(r,t,e[t]);if(x0)for(var t of x0(e))OE.call(e,t)&&M0(r,t,e[t]);return r};const NE="ReactNative",ei={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},RE="js";function ia(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function lo(){return!Ll()&&!!ql()&&navigator.product===NE}function fo(){return!ia()&&!!ql()&&!!Ll()}function fa(){return lo()?ei.reactNative:ia()?ei.node:fo()?ei.browser:ei.unknown}function TE(){var r;try{return lo()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(r=global.Application)==null?void 0:r.applicationId:void 0}catch{return}}function UE(r,e){let t=ra.parse(r);return t=C0(C0({},t),e),r=ra.stringify(t),r}function BE(){return Dg()||{name:"",description:"",url:"",icons:[""]}}function LE(){if(fa()===ei.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:t,Version:i}=global.Platform;return[t,i].join("-")}const r=W3();if(r===null)return"unknown";const e=r.os?r.os.replace(" ","").toLowerCase():"unknown";return r.type==="browser"?[e,r.name,r.version].join("-"):[e,r.version].join("-")}function qE(){var r;const e=fa();return e===ei.browser?[e,((r=Ig())==null?void 0:r.host)||"unknown"].join(":"):e}function jE(r,e,t){const i=LE(),s=qE();return[[r,e].join("-"),[RE,t].join("-"),i,s].join("/")}function FE({protocol:r,version:e,relayUrl:t,sdkVersion:i,auth:s,projectId:a,useOnCloseEvent:u,bundleId:f}){const p=t.split("?"),d=jE(r,e,i),b={auth:s,ua:d,projectId:a,useOnCloseEvent:u||void 0,origin:f||void 0},E=UE(p[1]||"",b);return p[0]+"?"+E}function bs(r,e){return r.filter(t=>e.includes(t)).length===r.length}function Kg(r){return Object.fromEntries(r.entries())}function Vg(r){return new Map(Object.entries(r))}function ws(r=ye.FIVE_MINUTES,e){const t=ye.toMiliseconds(r||ye.FIVE_MINUTES);let i,s,a;return{resolve:u=>{a&&i&&(clearTimeout(a),i(u))},reject:u=>{a&&s&&(clearTimeout(a),s(u))},done:()=>new Promise((u,f)=>{a=setTimeout(()=>{f(new Error(e))},t),i=u,s=f})}}function io(r,e,t){return new Promise(async(i,s)=>{const a=setTimeout(()=>s(new Error(t)),e);try{const u=await r;i(u)}catch(u){s(u)}clearTimeout(a)})}function Gg(r,e){if(typeof e=="string"&&e.startsWith(`${r}:`))return e;if(r.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(r.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${r}`)}function $E(r){return Gg("topic",r)}function zE(r){return Gg("id",r)}function Yg(r){const[e,t]=r.split(":"),i={id:void 0,topic:void 0};if(e==="topic"&&typeof t=="string")i.topic=t;else if(e==="id"&&Number.isInteger(Number(t)))i.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${t}`);return i}function pr(r,e){return ye.fromMiliseconds(Date.now()+ye.toMiliseconds(r))}function kn(r){return Date.now()>=ye.toMiliseconds(r)}function dt(r,e){return`${r}${e?`:${e}`:""}`}function Tc(r=[],e=[]){return[...new Set([...r,...e])]}async function kE({id:r,topic:e,wcDeepLink:t}){try{if(!t)return;const i=typeof t=="string"?JSON.parse(t):t;let s=i==null?void 0:i.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));const a=`${s}/wc?requestId=${r}&sessionTopic=${e}`,u=fa();u===ei.browser?a.startsWith("https://")||a.startsWith("http://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):u===ei.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(i){console.error(i)}}async function HE(r,e){try{return await r.getItem(e)||(fo()?localStorage.getItem(e):void 0)}catch(t){console.error(t)}}var Qg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function KE(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),t}var Wg={exports:{}};/** +* [js-sha3]{@link https://github.com/emn178/js-sha3} +* +* @version 0.8.0 +* @author Chen, Yi-Cyuan [emn178@gmail.com] +* @copyright Chen, Yi-Cyuan 2015-2018 +* @license MIT +*/(function(r){(function(){var e="input is invalid type",t="finalize already called",i=typeof window=="object",s=i?window:{};s.JS_SHA3_NO_WINDOW&&(i=!1);var a=!i&&typeof self=="object",u=!s.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;u?s=Qg:a&&(s=self);var f=!s.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,p=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),b=[31,7936,2031616,520093696],E=[4,1024,262144,67108864],x=[1,256,65536,16777216],D=[6,1536,393216,100663296],C=[0,8,16,24],Q=[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],G=[224,256,384,512],ee=[128,256],K=["hex","buffer","arrayBuffer","array","digest"],V={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(_){return Object.prototype.toString.call(_)==="[object Array]"}),p&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(_){return typeof _=="object"&&_.buffer&&_.buffer.constructor===ArrayBuffer});for(var q=function(_,Z,L){return function(j){return new N(_,Z,_).update(j)[L]()}},$=function(_,Z,L){return function(j,k){return new N(_,Z,k).update(j)[L]()}},z=function(_,Z,L){return function(j,k,m,B){return h["cshake"+_].update(j,k,m,B)[L]()}},y=function(_,Z,L){return function(j,k,m,B){return h["kmac"+_].update(j,k,m,B)[L]()}},T=function(_,Z,L,j){for(var k=0;k>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}N.prototype.update=function(_){if(this.finalized)throw new Error(t);var Z,L=typeof _;if(L!=="string"){if(L==="object"){if(_===null)throw new Error(e);if(p&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!p||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);Z=!0}for(var j=this.blocks,k=this.byteCount,m=_.length,B=this.blockCount,te=0,ue=this.s,ae,Me;te>2]|=_[te]<>2]|=Me<>2]|=(192|Me>>6)<>2]|=(128|Me&63)<=57344?(j[ae>>2]|=(224|Me>>12)<>2]|=(128|Me>>6&63)<>2]|=(128|Me&63)<>2]|=(240|Me>>18)<>2]|=(128|Me>>12&63)<>2]|=(128|Me>>6&63)<>2]|=(128|Me&63)<=k){for(this.start=ae-k,this.block=j[B],ae=0;ae>8,L=_&255;L>0;)k.unshift(L),_=_>>8,L=_&255,++j;return Z?k.push(j):k.unshift(j),this.update(k),k.length},N.prototype.encodeString=function(_){var Z,L=typeof _;if(L!=="string"){if(L==="object"){if(_===null)throw new Error(e);if(p&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!p||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);Z=!0}var j=0,k=_.length;if(Z)j=k;else for(var m=0;m<_.length;++m){var B=_.charCodeAt(m);B<128?j+=1:B<2048?j+=2:B<55296||B>=57344?j+=3:(B=65536+((B&1023)<<10|_.charCodeAt(++m)&1023),j+=4)}return j+=this.encode(j*8),this.update(_),j},N.prototype.bytepad=function(_,Z){for(var L=this.encode(Z),j=0;j<_.length;++j)L+=this.encodeString(_[j]);var k=Z-L%Z,m=[];return m.length=k,this.update(m),this},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var _=this.blocks,Z=this.lastByteIndex,L=this.blockCount,j=this.s;if(_[Z>>2]|=this.padding[Z&3],this.lastByteIndex===this.byteCount)for(_[0]=_[L],Z=1;Z>4&15]+d[te&15]+d[te>>12&15]+d[te>>8&15]+d[te>>20&15]+d[te>>16&15]+d[te>>28&15]+d[te>>24&15];m%_===0&&(de(Z),k=0)}return j&&(te=Z[k],B+=d[te>>4&15]+d[te&15],j>1&&(B+=d[te>>12&15]+d[te>>8&15]),j>2&&(B+=d[te>>20&15]+d[te>>16&15])),B},N.prototype.arrayBuffer=function(){this.finalize();var _=this.blockCount,Z=this.s,L=this.outputBlocks,j=this.extraBytes,k=0,m=0,B=this.outputBits>>3,te;j?te=new ArrayBuffer(L+1<<2):te=new ArrayBuffer(B);for(var ue=new Uint32Array(te);m>8&255,B[te+2]=ue>>16&255,B[te+3]=ue>>24&255;m%_===0&&de(Z)}return j&&(te=m<<2,ue=Z[k],B[te]=ue&255,j>1&&(B[te+1]=ue>>8&255),j>2&&(B[te+2]=ue>>16&255)),B};function ie(_,Z,L){N.call(this,_,Z,L)}ie.prototype=new N,ie.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var de=function(_){var Z,L,j,k,m,B,te,ue,ae,Me,Pe,Ie,Et,$e,xe,Le,_e,Ee,Ve,we,Ae,Be,be,Ce,qe,Oe,Ne,st,Te,Re,Ht,ct,pt,Kt,yt,_t,Er,Ge,ze,It,Ye,Ke,At,Je,Xe,Dt,Ze,Qe,Mt,We,je,Rt,et,Ct,Ii,Pt,lt,ni,si,oi,ai,ci,or;for(j=0;j<48;j+=2)k=_[0]^_[10]^_[20]^_[30]^_[40],m=_[1]^_[11]^_[21]^_[31]^_[41],B=_[2]^_[12]^_[22]^_[32]^_[42],te=_[3]^_[13]^_[23]^_[33]^_[43],ue=_[4]^_[14]^_[24]^_[34]^_[44],ae=_[5]^_[15]^_[25]^_[35]^_[45],Me=_[6]^_[16]^_[26]^_[36]^_[46],Pe=_[7]^_[17]^_[27]^_[37]^_[47],Ie=_[8]^_[18]^_[28]^_[38]^_[48],Et=_[9]^_[19]^_[29]^_[39]^_[49],Z=Ie^(B<<1|te>>>31),L=Et^(te<<1|B>>>31),_[0]^=Z,_[1]^=L,_[10]^=Z,_[11]^=L,_[20]^=Z,_[21]^=L,_[30]^=Z,_[31]^=L,_[40]^=Z,_[41]^=L,Z=k^(ue<<1|ae>>>31),L=m^(ae<<1|ue>>>31),_[2]^=Z,_[3]^=L,_[12]^=Z,_[13]^=L,_[22]^=Z,_[23]^=L,_[32]^=Z,_[33]^=L,_[42]^=Z,_[43]^=L,Z=B^(Me<<1|Pe>>>31),L=te^(Pe<<1|Me>>>31),_[4]^=Z,_[5]^=L,_[14]^=Z,_[15]^=L,_[24]^=Z,_[25]^=L,_[34]^=Z,_[35]^=L,_[44]^=Z,_[45]^=L,Z=ue^(Ie<<1|Et>>>31),L=ae^(Et<<1|Ie>>>31),_[6]^=Z,_[7]^=L,_[16]^=Z,_[17]^=L,_[26]^=Z,_[27]^=L,_[36]^=Z,_[37]^=L,_[46]^=Z,_[47]^=L,Z=Me^(k<<1|m>>>31),L=Pe^(m<<1|k>>>31),_[8]^=Z,_[9]^=L,_[18]^=Z,_[19]^=L,_[28]^=Z,_[29]^=L,_[38]^=Z,_[39]^=L,_[48]^=Z,_[49]^=L,$e=_[0],xe=_[1],Dt=_[11]<<4|_[10]>>>28,Ze=_[10]<<4|_[11]>>>28,st=_[20]<<3|_[21]>>>29,Te=_[21]<<3|_[20]>>>29,oi=_[31]<<9|_[30]>>>23,ai=_[30]<<9|_[31]>>>23,Ke=_[40]<<18|_[41]>>>14,At=_[41]<<18|_[40]>>>14,Kt=_[2]<<1|_[3]>>>31,yt=_[3]<<1|_[2]>>>31,Le=_[13]<<12|_[12]>>>20,_e=_[12]<<12|_[13]>>>20,Qe=_[22]<<10|_[23]>>>22,Mt=_[23]<<10|_[22]>>>22,Re=_[33]<<13|_[32]>>>19,Ht=_[32]<<13|_[33]>>>19,ci=_[42]<<2|_[43]>>>30,or=_[43]<<2|_[42]>>>30,Ct=_[5]<<30|_[4]>>>2,Ii=_[4]<<30|_[5]>>>2,_t=_[14]<<6|_[15]>>>26,Er=_[15]<<6|_[14]>>>26,Ee=_[25]<<11|_[24]>>>21,Ve=_[24]<<11|_[25]>>>21,We=_[34]<<15|_[35]>>>17,je=_[35]<<15|_[34]>>>17,ct=_[45]<<29|_[44]>>>3,pt=_[44]<<29|_[45]>>>3,Ce=_[6]<<28|_[7]>>>4,qe=_[7]<<28|_[6]>>>4,Pt=_[17]<<23|_[16]>>>9,lt=_[16]<<23|_[17]>>>9,Ge=_[26]<<25|_[27]>>>7,ze=_[27]<<25|_[26]>>>7,we=_[36]<<21|_[37]>>>11,Ae=_[37]<<21|_[36]>>>11,Rt=_[47]<<24|_[46]>>>8,et=_[46]<<24|_[47]>>>8,Je=_[8]<<27|_[9]>>>5,Xe=_[9]<<27|_[8]>>>5,Oe=_[18]<<20|_[19]>>>12,Ne=_[19]<<20|_[18]>>>12,ni=_[29]<<7|_[28]>>>25,si=_[28]<<7|_[29]>>>25,It=_[38]<<8|_[39]>>>24,Ye=_[39]<<8|_[38]>>>24,Be=_[48]<<14|_[49]>>>18,be=_[49]<<14|_[48]>>>18,_[0]=$e^~Le&Ee,_[1]=xe^~_e&Ve,_[10]=Ce^~Oe&st,_[11]=qe^~Ne&Te,_[20]=Kt^~_t&Ge,_[21]=yt^~Er&ze,_[30]=Je^~Dt&Qe,_[31]=Xe^~Ze&Mt,_[40]=Ct^~Pt&ni,_[41]=Ii^~lt&si,_[2]=Le^~Ee&we,_[3]=_e^~Ve&Ae,_[12]=Oe^~st&Re,_[13]=Ne^~Te&Ht,_[22]=_t^~Ge&It,_[23]=Er^~ze&Ye,_[32]=Dt^~Qe&We,_[33]=Ze^~Mt&je,_[42]=Pt^~ni&oi,_[43]=lt^~si&ai,_[4]=Ee^~we&Be,_[5]=Ve^~Ae&be,_[14]=st^~Re&ct,_[15]=Te^~Ht&pt,_[24]=Ge^~It&Ke,_[25]=ze^~Ye&At,_[34]=Qe^~We&Rt,_[35]=Mt^~je&et,_[44]=ni^~oi&ci,_[45]=si^~ai&or,_[6]=we^~Be&$e,_[7]=Ae^~be&xe,_[16]=Re^~ct&Ce,_[17]=Ht^~pt&qe,_[26]=It^~Ke&Kt,_[27]=Ye^~At&yt,_[36]=We^~Rt&Je,_[37]=je^~et&Xe,_[46]=oi^~ci&Ct,_[47]=ai^~or&Ii,_[8]=Be^~$e&Le,_[9]=be^~xe&_e,_[18]=ct^~Ce&Oe,_[19]=pt^~qe&Ne,_[28]=Ke^~Kt&_t,_[29]=At^~yt&Er,_[38]=Rt^~Je&Dt,_[39]=et^~Xe&Ze,_[48]=ci^~Ct&Pt,_[49]=or^~Ii<,_[0]^=Q[j],_[1]^=Q[j+1]};if(f)r.exports=h;else for(S=0;S{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{r.push(e)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const R0=YE();var yl;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(yl||(yl={}));var Ti;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Ti||(Ti={}));const T0="0123456789abcdef";let gr=class sr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const i=e.toLowerCase();Uc[i]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(N0>Uc[i])&&console.log.apply(console,t)}debug(...e){this._log(sr.levels.DEBUG,e)}info(...e){this._log(sr.levels.INFO,e)}warn(...e){this._log(sr.levels.WARNING,e)}makeError(e,t,i){if(O0)return this.makeError("censored error",t,{});t||(t=sr.errors.UNKNOWN_ERROR),i||(i={});const s=[];Object.keys(i).forEach(p=>{const d=i[p];try{if(d instanceof Uint8Array){let b="";for(let E=0;E>4],b+=T0[d[E]&15];s.push(p+"=Uint8Array(0x"+b+")")}else s.push(p+"="+JSON.stringify(d))}catch{s.push(p+"="+JSON.stringify(i[p].toString()))}}),s.push(`code=${t}`),s.push(`version=${this.version}`);const a=e;let u="";switch(t){case Ti.NUMERIC_FAULT:{u="NUMERIC_FAULT";const p=e;switch(p){case"overflow":case"underflow":case"division-by-zero":u+="-"+p;break;case"negative-power":case"negative-width":u+="-unsupported";break;case"unbound-bitwise-result":u+="-unbound-result";break}break}case Ti.CALL_EXCEPTION:case Ti.INSUFFICIENT_FUNDS:case Ti.MISSING_NEW:case Ti.NONCE_EXPIRED:case Ti.REPLACEMENT_UNDERPRICED:case Ti.TRANSACTION_REPLACED:case Ti.UNPREDICTABLE_GAS_LIMIT:u=t;break}u&&(e+=" [ See: https://links.ethers.org/v5-errors-"+u+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const f=new Error(e);return f.reason=a,f.code=t,Object.keys(i).forEach(function(p){f[p]=i[p]}),f}throwError(e,t,i){throw this.makeError(e,t,i)}throwArgumentError(e,t,i){return this.throwError(e,sr.errors.INVALID_ARGUMENT,{argument:t,value:i})}assert(e,t,i,s){e||this.throwError(t,i,s)}assertArgument(e,t,i,s){e||this.throwArgumentError(t,i,s)}checkNormalize(e){R0&&this.throwError("platform missing String.prototype.normalize",sr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:R0})}checkSafeUint53(e,t){typeof e=="number"&&(t==null&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,i){i?i=": "+i:i="",et&&this.throwError("too many arguments"+i,sr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",sr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Nh||(Nh=new sr(GE)),Nh}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),P0){if(!e)return;this.globalLogger().throwError("error censorship permanent",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}O0=!!e,P0=!!t}static setLogLevel(e){const t=Uc[e.toLowerCase()];if(t==null){sr.globalLogger().warn("invalid log level - "+e);return}N0=t}static from(e){return new sr(e)}};gr.errors=Ti,gr.levels=yl;const QE="bytes/5.7.0",Xt=new gr(QE);function Jg(r){return!!r.toHexString}function no(r){return r.slice||(r.slice=function(){const e=Array.prototype.slice.call(arguments);return no(new Uint8Array(Array.prototype.slice.apply(r,e)))}),r}function WE(r){return ti(r)&&!(r.length%2)||po(r)}function U0(r){return typeof r=="number"&&r==r&&r%1===0}function po(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!U0(r.length)||r.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Yt(r,e){if(e||(e={}),typeof r=="number"){Xt.checkSafeUint53(r,"invalid arrayify value");const t=[];for(;r;)t.unshift(r&255),r=parseInt(String(r/256));return t.length===0&&t.push(0),no(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Jg(r)&&(r=r.toHexString()),ti(r)){let t=r.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":Xt.throwArgumentError("hex data is odd-length","value",r));const i=[];for(let s=0;sYt(s)),t=e.reduce((s,a)=>s+a.length,0),i=new Uint8Array(t);return e.reduce((s,a)=>(i.set(a,s),s+a.length),0),no(i)}function XE(r,e){r=Yt(r),r.length>e&&Xt.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(r,e-r.length),no(t)}function ti(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||e&&r.length!==2+2*e)}const Rh="0123456789abcdef";function $r(r,e){if(e||(e={}),typeof r=="number"){Xt.checkSafeUint53(r,"invalid hexlify value");let t="";for(;r;)t=Rh[r&15]+t,r=Math.floor(r/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(e.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),Jg(r))return r.toHexString();if(ti(r))return r.length%2&&(e.hexPad==="left"?r="0x0"+r.substring(2):e.hexPad==="right"?r+="0":Xt.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(po(r)){let t="0x";for(let i=0;i>4]+Rh[s&15]}return t}return Xt.throwArgumentError("invalid hexlify value","value",r)}function ZE(r){if(typeof r!="string")r=$r(r);else if(!ti(r)||r.length%2)return null;return(r.length-2)/2}function B0(r,e,t){return typeof r!="string"?r=$r(r):(!ti(r)||r.length%2)&&Xt.throwArgumentError("invalid hexData","value",r),e=2+2*e,t!=null?"0x"+r.substring(e,2+2*t):"0x"+r.substring(e)}function en(r,e){for(typeof r!="string"?r=$r(r):ti(r)||Xt.throwArgumentError("invalid hex string","value",r),r.length>2*e+2&&Xt.throwArgumentError("value out of range","value",arguments[1]);r.length<2*e+2;)r="0x0"+r.substring(2);return r}function Xg(r){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(WE(r)){let t=Yt(r);t.length===64?(e.v=27+(t[32]>>7),t[32]&=127,e.r=$r(t.slice(0,32)),e.s=$r(t.slice(32,64))):t.length===65?(e.r=$r(t.slice(0,32)),e.s=$r(t.slice(32,64)),e.v=t[64]):Xt.throwArgumentError("invalid signature string","signature",r),e.v<27&&(e.v===0||e.v===1?e.v+=27:Xt.throwArgumentError("signature invalid v byte","signature",r)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=$r(t.slice(32,64))}else{if(e.r=r.r,e.s=r.s,e.v=r.v,e.recoveryParam=r.recoveryParam,e._vs=r._vs,e._vs!=null){const s=XE(Yt(e._vs),32);e._vs=$r(s);const a=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&Xt.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),s[0]&=127;const u=$r(s);e.s==null?e.s=u:e.s!==u&&Xt.throwArgumentError("signature v mismatch _vs","signature",r)}if(e.recoveryParam==null)e.v==null?Xt.throwArgumentError("signature missing v and recoveryParam","signature",r):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&Xt.throwArgumentError("signature recoveryParam mismatch v","signature",r)}e.r==null||!ti(e.r)?Xt.throwArgumentError("signature missing or invalid r","signature",r):e.r=en(e.r,32),e.s==null||!ti(e.s)?Xt.throwArgumentError("signature missing or invalid s","signature",r):e.s=en(e.s,32);const t=Yt(e.s);t[0]>=128&&Xt.throwArgumentError("signature s out of range","signature",r),e.recoveryParam&&(t[0]|=128);const i=$r(t);e._vs&&(ti(e._vs)||Xt.throwArgumentError("signature invalid _vs","signature",r),e._vs=en(e._vs,32)),e._vs==null?e._vs=i:e._vs!==i&&Xt.throwArgumentError("signature _vs mismatch v and s","signature",r)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function kl(r){return"0x"+VE.keccak_256(Yt(r))}var Zg={exports:{}},e5={},t5=Object.freeze({__proto__:null,default:e5}),r5=KE(t5);(function(r){(function(e,t){function i(l,h){if(!l)throw new Error(h||"Assertion failed")}function s(l,h){l.super_=h;var w=function(){};w.prototype=h.prototype,l.prototype=new w,l.prototype.constructor=l}function a(l,h,w){if(a.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((h==="le"||h==="be")&&(w=h,h=10),this._init(l||0,h||10,w||"be"))}typeof e=="object"?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=r5.Buffer}catch{}a.isBN=function(l){return l instanceof a?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===a.wordSize&&Array.isArray(l.words)},a.max=function(l,h){return l.cmp(h)>0?l:h},a.min=function(l,h){return l.cmp(h)<0?l:h},a.prototype._init=function(l,h,w){if(typeof l=="number")return this._initNumber(l,h,w);if(typeof l=="object")return this._initArray(l,h,w);h==="hex"&&(h=16),i(h===(h|0)&&h>=2&&h<=36),l=l.toString().replace(/\s+/g,"");var S=0;l[0]==="-"&&(S++,this.negative=1),S=0;S-=3)O=l[S]|l[S-1]<<8|l[S-2]<<16,this.words[M]|=O<>>26-U&67108863,U+=24,U>=26&&(U-=26,M++);else if(w==="le")for(S=0,M=0;S>>26-U&67108863,U+=24,U>=26&&(U-=26,M++);return this._strip()};function f(l,h){var w=l.charCodeAt(h);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;i(!1,"Invalid character in "+l)}function p(l,h,w){var S=f(l,w);return w-1>=h&&(S|=f(l,w-1)<<4),S}a.prototype._parseHex=function(l,h,w){this.length=Math.ceil((l.length-h)/6),this.words=new Array(this.length);for(var S=0;S=h;S-=2)U=p(l,h,S)<=18?(M-=18,O+=1,this.words[O]|=U>>>26):M+=8;else{var I=l.length-h;for(S=I%2===0?h+1:h;S=18?(M-=18,O+=1,this.words[O]|=U>>>26):M+=8}this._strip()};function d(l,h,w,S){for(var M=0,O=0,U=Math.min(l.length,w),I=h;I=49?O=g-49+10:g>=17?O=g-17+10:O=g,i(g>=0&&O1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=E}catch{a.prototype.inspect=E}else a.prototype.inspect=E;function E(){return(this.red?""}var x=["","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"],D=[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],C=[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];a.prototype.toString=function(l,h){l=l||10,h=h|0||1;var w;if(l===16||l==="hex"){w="";for(var S=0,M=0,O=0;O>>24-S&16777215,S+=2,S>=26&&(S-=26,O--),M!==0||O!==this.length-1?w=x[6-I.length]+I+w:w=I+w}for(M!==0&&(w=M.toString(16)+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(l===(l|0)&&l>=2&&l<=36){var g=D[l],N=C[l];w="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var de=ie.modrn(N).toString(l);ie=ie.idivn(N),ie.isZero()?w=de+w:w=x[g-de.length]+de+w}for(this.isZero()&&(w="0"+w);w.length%h!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},a.prototype.toJSON=function(){return this.toString(16,2)},u&&(a.prototype.toBuffer=function(l,h){return this.toArrayLike(u,l,h)}),a.prototype.toArray=function(l,h){return this.toArrayLike(Array,l,h)};var Q=function(l,h){return l.allocUnsafe?l.allocUnsafe(h):new l(h)};a.prototype.toArrayLike=function(l,h,w){this._strip();var S=this.byteLength(),M=w||Math.max(1,S);i(S<=M,"byte array longer than desired length"),i(M>0,"Requested array length <= 0");var O=Q(l,M),U=h==="le"?"LE":"BE";return this["_toArrayLike"+U](O,S),O},a.prototype._toArrayLikeLE=function(l,h){for(var w=0,S=0,M=0,O=0;M>8&255),w>16&255),O===6?(w>24&255),S=0,O=0):(S=U>>>24,O+=2)}if(w=0&&(l[w--]=U>>8&255),w>=0&&(l[w--]=U>>16&255),O===6?(w>=0&&(l[w--]=U>>24&255),S=0,O=0):(S=U>>>24,O+=2)}if(w>=0)for(l[w--]=S;w>=0;)l[w--]=0},Math.clz32?a.prototype._countBits=function(l){return 32-Math.clz32(l)}:a.prototype._countBits=function(l){var h=l,w=0;return h>=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},a.prototype._zeroBits=function(l){if(l===0)return 26;var h=l,w=0;return h&8191||(w+=13,h>>>=13),h&127||(w+=7,h>>>=7),h&15||(w+=4,h>>>=4),h&3||(w+=2,h>>>=2),h&1||w++,w},a.prototype.bitLength=function(){var l=this.words[this.length-1],h=this._countBits(l);return(this.length-1)*26+h};function G(l){for(var h=new Array(l.bitLength()),w=0;w>>M&1}return h}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,h=0;hl.length?this.clone().ior(l):l.clone().ior(this)},a.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},a.prototype.iuand=function(l){var h;this.length>l.length?h=l:h=this;for(var w=0;wl.length?this.clone().iand(l):l.clone().iand(this)},a.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},a.prototype.iuxor=function(l){var h,w;this.length>l.length?(h=this,w=l):(h=l,w=this);for(var S=0;Sl.length?this.clone().ixor(l):l.clone().ixor(this)},a.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},a.prototype.inotn=function(l){i(typeof l=="number"&&l>=0);var h=Math.ceil(l/26)|0,w=l%26;this._expand(h),w>0&&h--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-w),this._strip()},a.prototype.notn=function(l){return this.clone().inotn(l)},a.prototype.setn=function(l,h){i(typeof l=="number"&&l>=0);var w=l/26|0,S=l%26;return this._expand(w+1),h?this.words[w]=this.words[w]|1<l.length?(w=this,S=l):(w=l,S=this);for(var M=0,O=0;O>>26;for(;M!==0&&O>>26;if(this.length=w.length,M!==0)this.words[this.length]=M,this.length++;else if(w!==this)for(;Ol.length?this.clone().iadd(l):l.clone().iadd(this)},a.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var h=this.iadd(l);return l.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var w=this.cmp(l);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,M;w>0?(S=this,M=l):(S=l,M=this);for(var O=0,U=0;U>26,this.words[U]=h&67108863;for(;O!==0&&U>26,this.words[U]=h&67108863;if(O===0&&U>>26,de=g&67108863,_=Math.min(N,h.length-1),Z=Math.max(0,N-l.length+1);Z<=_;Z++){var L=N-Z|0;M=l.words[L]|0,O=h.words[Z]|0,U=M*O+de,ie+=U/67108864|0,de=U&67108863}w.words[N]=de|0,g=ie|0}return g!==0?w.words[N]=g|0:w.length--,w._strip()}var K=function(l,h,w){var S=l.words,M=h.words,O=w.words,U=0,I,g,N,ie=S[0]|0,de=ie&8191,_=ie>>>13,Z=S[1]|0,L=Z&8191,j=Z>>>13,k=S[2]|0,m=k&8191,B=k>>>13,te=S[3]|0,ue=te&8191,ae=te>>>13,Me=S[4]|0,Pe=Me&8191,Ie=Me>>>13,Et=S[5]|0,$e=Et&8191,xe=Et>>>13,Le=S[6]|0,_e=Le&8191,Ee=Le>>>13,Ve=S[7]|0,we=Ve&8191,Ae=Ve>>>13,Be=S[8]|0,be=Be&8191,Ce=Be>>>13,qe=S[9]|0,Oe=qe&8191,Ne=qe>>>13,st=M[0]|0,Te=st&8191,Re=st>>>13,Ht=M[1]|0,ct=Ht&8191,pt=Ht>>>13,Kt=M[2]|0,yt=Kt&8191,_t=Kt>>>13,Er=M[3]|0,Ge=Er&8191,ze=Er>>>13,It=M[4]|0,Ye=It&8191,Ke=It>>>13,At=M[5]|0,Je=At&8191,Xe=At>>>13,Dt=M[6]|0,Ze=Dt&8191,Qe=Dt>>>13,Mt=M[7]|0,We=Mt&8191,je=Mt>>>13,Rt=M[8]|0,et=Rt&8191,Ct=Rt>>>13,Ii=M[9]|0,Pt=Ii&8191,lt=Ii>>>13;w.negative=l.negative^h.negative,w.length=19,I=Math.imul(de,Te),g=Math.imul(de,Re),g=g+Math.imul(_,Te)|0,N=Math.imul(_,Re);var ni=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(ni>>>26)|0,ni&=67108863,I=Math.imul(L,Te),g=Math.imul(L,Re),g=g+Math.imul(j,Te)|0,N=Math.imul(j,Re),I=I+Math.imul(de,ct)|0,g=g+Math.imul(de,pt)|0,g=g+Math.imul(_,ct)|0,N=N+Math.imul(_,pt)|0;var si=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(si>>>26)|0,si&=67108863,I=Math.imul(m,Te),g=Math.imul(m,Re),g=g+Math.imul(B,Te)|0,N=Math.imul(B,Re),I=I+Math.imul(L,ct)|0,g=g+Math.imul(L,pt)|0,g=g+Math.imul(j,ct)|0,N=N+Math.imul(j,pt)|0,I=I+Math.imul(de,yt)|0,g=g+Math.imul(de,_t)|0,g=g+Math.imul(_,yt)|0,N=N+Math.imul(_,_t)|0;var oi=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(oi>>>26)|0,oi&=67108863,I=Math.imul(ue,Te),g=Math.imul(ue,Re),g=g+Math.imul(ae,Te)|0,N=Math.imul(ae,Re),I=I+Math.imul(m,ct)|0,g=g+Math.imul(m,pt)|0,g=g+Math.imul(B,ct)|0,N=N+Math.imul(B,pt)|0,I=I+Math.imul(L,yt)|0,g=g+Math.imul(L,_t)|0,g=g+Math.imul(j,yt)|0,N=N+Math.imul(j,_t)|0,I=I+Math.imul(de,Ge)|0,g=g+Math.imul(de,ze)|0,g=g+Math.imul(_,Ge)|0,N=N+Math.imul(_,ze)|0;var ai=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(ai>>>26)|0,ai&=67108863,I=Math.imul(Pe,Te),g=Math.imul(Pe,Re),g=g+Math.imul(Ie,Te)|0,N=Math.imul(Ie,Re),I=I+Math.imul(ue,ct)|0,g=g+Math.imul(ue,pt)|0,g=g+Math.imul(ae,ct)|0,N=N+Math.imul(ae,pt)|0,I=I+Math.imul(m,yt)|0,g=g+Math.imul(m,_t)|0,g=g+Math.imul(B,yt)|0,N=N+Math.imul(B,_t)|0,I=I+Math.imul(L,Ge)|0,g=g+Math.imul(L,ze)|0,g=g+Math.imul(j,Ge)|0,N=N+Math.imul(j,ze)|0,I=I+Math.imul(de,Ye)|0,g=g+Math.imul(de,Ke)|0,g=g+Math.imul(_,Ye)|0,N=N+Math.imul(_,Ke)|0;var ci=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(ci>>>26)|0,ci&=67108863,I=Math.imul($e,Te),g=Math.imul($e,Re),g=g+Math.imul(xe,Te)|0,N=Math.imul(xe,Re),I=I+Math.imul(Pe,ct)|0,g=g+Math.imul(Pe,pt)|0,g=g+Math.imul(Ie,ct)|0,N=N+Math.imul(Ie,pt)|0,I=I+Math.imul(ue,yt)|0,g=g+Math.imul(ue,_t)|0,g=g+Math.imul(ae,yt)|0,N=N+Math.imul(ae,_t)|0,I=I+Math.imul(m,Ge)|0,g=g+Math.imul(m,ze)|0,g=g+Math.imul(B,Ge)|0,N=N+Math.imul(B,ze)|0,I=I+Math.imul(L,Ye)|0,g=g+Math.imul(L,Ke)|0,g=g+Math.imul(j,Ye)|0,N=N+Math.imul(j,Ke)|0,I=I+Math.imul(de,Je)|0,g=g+Math.imul(de,Xe)|0,g=g+Math.imul(_,Je)|0,N=N+Math.imul(_,Xe)|0;var or=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(or>>>26)|0,or&=67108863,I=Math.imul(_e,Te),g=Math.imul(_e,Re),g=g+Math.imul(Ee,Te)|0,N=Math.imul(Ee,Re),I=I+Math.imul($e,ct)|0,g=g+Math.imul($e,pt)|0,g=g+Math.imul(xe,ct)|0,N=N+Math.imul(xe,pt)|0,I=I+Math.imul(Pe,yt)|0,g=g+Math.imul(Pe,_t)|0,g=g+Math.imul(Ie,yt)|0,N=N+Math.imul(Ie,_t)|0,I=I+Math.imul(ue,Ge)|0,g=g+Math.imul(ue,ze)|0,g=g+Math.imul(ae,Ge)|0,N=N+Math.imul(ae,ze)|0,I=I+Math.imul(m,Ye)|0,g=g+Math.imul(m,Ke)|0,g=g+Math.imul(B,Ye)|0,N=N+Math.imul(B,Ke)|0,I=I+Math.imul(L,Je)|0,g=g+Math.imul(L,Xe)|0,g=g+Math.imul(j,Je)|0,N=N+Math.imul(j,Xe)|0,I=I+Math.imul(de,Ze)|0,g=g+Math.imul(de,Qe)|0,g=g+Math.imul(_,Ze)|0,N=N+Math.imul(_,Qe)|0;var qi=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(qi>>>26)|0,qi&=67108863,I=Math.imul(we,Te),g=Math.imul(we,Re),g=g+Math.imul(Ae,Te)|0,N=Math.imul(Ae,Re),I=I+Math.imul(_e,ct)|0,g=g+Math.imul(_e,pt)|0,g=g+Math.imul(Ee,ct)|0,N=N+Math.imul(Ee,pt)|0,I=I+Math.imul($e,yt)|0,g=g+Math.imul($e,_t)|0,g=g+Math.imul(xe,yt)|0,N=N+Math.imul(xe,_t)|0,I=I+Math.imul(Pe,Ge)|0,g=g+Math.imul(Pe,ze)|0,g=g+Math.imul(Ie,Ge)|0,N=N+Math.imul(Ie,ze)|0,I=I+Math.imul(ue,Ye)|0,g=g+Math.imul(ue,Ke)|0,g=g+Math.imul(ae,Ye)|0,N=N+Math.imul(ae,Ke)|0,I=I+Math.imul(m,Je)|0,g=g+Math.imul(m,Xe)|0,g=g+Math.imul(B,Je)|0,N=N+Math.imul(B,Xe)|0,I=I+Math.imul(L,Ze)|0,g=g+Math.imul(L,Qe)|0,g=g+Math.imul(j,Ze)|0,N=N+Math.imul(j,Qe)|0,I=I+Math.imul(de,We)|0,g=g+Math.imul(de,je)|0,g=g+Math.imul(_,We)|0,N=N+Math.imul(_,je)|0;var Wn=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,I=Math.imul(be,Te),g=Math.imul(be,Re),g=g+Math.imul(Ce,Te)|0,N=Math.imul(Ce,Re),I=I+Math.imul(we,ct)|0,g=g+Math.imul(we,pt)|0,g=g+Math.imul(Ae,ct)|0,N=N+Math.imul(Ae,pt)|0,I=I+Math.imul(_e,yt)|0,g=g+Math.imul(_e,_t)|0,g=g+Math.imul(Ee,yt)|0,N=N+Math.imul(Ee,_t)|0,I=I+Math.imul($e,Ge)|0,g=g+Math.imul($e,ze)|0,g=g+Math.imul(xe,Ge)|0,N=N+Math.imul(xe,ze)|0,I=I+Math.imul(Pe,Ye)|0,g=g+Math.imul(Pe,Ke)|0,g=g+Math.imul(Ie,Ye)|0,N=N+Math.imul(Ie,Ke)|0,I=I+Math.imul(ue,Je)|0,g=g+Math.imul(ue,Xe)|0,g=g+Math.imul(ae,Je)|0,N=N+Math.imul(ae,Xe)|0,I=I+Math.imul(m,Ze)|0,g=g+Math.imul(m,Qe)|0,g=g+Math.imul(B,Ze)|0,N=N+Math.imul(B,Qe)|0,I=I+Math.imul(L,We)|0,g=g+Math.imul(L,je)|0,g=g+Math.imul(j,We)|0,N=N+Math.imul(j,je)|0,I=I+Math.imul(de,et)|0,g=g+Math.imul(de,Ct)|0,g=g+Math.imul(_,et)|0,N=N+Math.imul(_,Ct)|0;var ji=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(ji>>>26)|0,ji&=67108863,I=Math.imul(Oe,Te),g=Math.imul(Oe,Re),g=g+Math.imul(Ne,Te)|0,N=Math.imul(Ne,Re),I=I+Math.imul(be,ct)|0,g=g+Math.imul(be,pt)|0,g=g+Math.imul(Ce,ct)|0,N=N+Math.imul(Ce,pt)|0,I=I+Math.imul(we,yt)|0,g=g+Math.imul(we,_t)|0,g=g+Math.imul(Ae,yt)|0,N=N+Math.imul(Ae,_t)|0,I=I+Math.imul(_e,Ge)|0,g=g+Math.imul(_e,ze)|0,g=g+Math.imul(Ee,Ge)|0,N=N+Math.imul(Ee,ze)|0,I=I+Math.imul($e,Ye)|0,g=g+Math.imul($e,Ke)|0,g=g+Math.imul(xe,Ye)|0,N=N+Math.imul(xe,Ke)|0,I=I+Math.imul(Pe,Je)|0,g=g+Math.imul(Pe,Xe)|0,g=g+Math.imul(Ie,Je)|0,N=N+Math.imul(Ie,Xe)|0,I=I+Math.imul(ue,Ze)|0,g=g+Math.imul(ue,Qe)|0,g=g+Math.imul(ae,Ze)|0,N=N+Math.imul(ae,Qe)|0,I=I+Math.imul(m,We)|0,g=g+Math.imul(m,je)|0,g=g+Math.imul(B,We)|0,N=N+Math.imul(B,je)|0,I=I+Math.imul(L,et)|0,g=g+Math.imul(L,Ct)|0,g=g+Math.imul(j,et)|0,N=N+Math.imul(j,Ct)|0,I=I+Math.imul(de,Pt)|0,g=g+Math.imul(de,lt)|0,g=g+Math.imul(_,Pt)|0,N=N+Math.imul(_,lt)|0;var Jn=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,I=Math.imul(Oe,ct),g=Math.imul(Oe,pt),g=g+Math.imul(Ne,ct)|0,N=Math.imul(Ne,pt),I=I+Math.imul(be,yt)|0,g=g+Math.imul(be,_t)|0,g=g+Math.imul(Ce,yt)|0,N=N+Math.imul(Ce,_t)|0,I=I+Math.imul(we,Ge)|0,g=g+Math.imul(we,ze)|0,g=g+Math.imul(Ae,Ge)|0,N=N+Math.imul(Ae,ze)|0,I=I+Math.imul(_e,Ye)|0,g=g+Math.imul(_e,Ke)|0,g=g+Math.imul(Ee,Ye)|0,N=N+Math.imul(Ee,Ke)|0,I=I+Math.imul($e,Je)|0,g=g+Math.imul($e,Xe)|0,g=g+Math.imul(xe,Je)|0,N=N+Math.imul(xe,Xe)|0,I=I+Math.imul(Pe,Ze)|0,g=g+Math.imul(Pe,Qe)|0,g=g+Math.imul(Ie,Ze)|0,N=N+Math.imul(Ie,Qe)|0,I=I+Math.imul(ue,We)|0,g=g+Math.imul(ue,je)|0,g=g+Math.imul(ae,We)|0,N=N+Math.imul(ae,je)|0,I=I+Math.imul(m,et)|0,g=g+Math.imul(m,Ct)|0,g=g+Math.imul(B,et)|0,N=N+Math.imul(B,Ct)|0,I=I+Math.imul(L,Pt)|0,g=g+Math.imul(L,lt)|0,g=g+Math.imul(j,Pt)|0,N=N+Math.imul(j,lt)|0;var Xn=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,I=Math.imul(Oe,yt),g=Math.imul(Oe,_t),g=g+Math.imul(Ne,yt)|0,N=Math.imul(Ne,_t),I=I+Math.imul(be,Ge)|0,g=g+Math.imul(be,ze)|0,g=g+Math.imul(Ce,Ge)|0,N=N+Math.imul(Ce,ze)|0,I=I+Math.imul(we,Ye)|0,g=g+Math.imul(we,Ke)|0,g=g+Math.imul(Ae,Ye)|0,N=N+Math.imul(Ae,Ke)|0,I=I+Math.imul(_e,Je)|0,g=g+Math.imul(_e,Xe)|0,g=g+Math.imul(Ee,Je)|0,N=N+Math.imul(Ee,Xe)|0,I=I+Math.imul($e,Ze)|0,g=g+Math.imul($e,Qe)|0,g=g+Math.imul(xe,Ze)|0,N=N+Math.imul(xe,Qe)|0,I=I+Math.imul(Pe,We)|0,g=g+Math.imul(Pe,je)|0,g=g+Math.imul(Ie,We)|0,N=N+Math.imul(Ie,je)|0,I=I+Math.imul(ue,et)|0,g=g+Math.imul(ue,Ct)|0,g=g+Math.imul(ae,et)|0,N=N+Math.imul(ae,Ct)|0,I=I+Math.imul(m,Pt)|0,g=g+Math.imul(m,lt)|0,g=g+Math.imul(B,Pt)|0,N=N+Math.imul(B,lt)|0;var Fi=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,I=Math.imul(Oe,Ge),g=Math.imul(Oe,ze),g=g+Math.imul(Ne,Ge)|0,N=Math.imul(Ne,ze),I=I+Math.imul(be,Ye)|0,g=g+Math.imul(be,Ke)|0,g=g+Math.imul(Ce,Ye)|0,N=N+Math.imul(Ce,Ke)|0,I=I+Math.imul(we,Je)|0,g=g+Math.imul(we,Xe)|0,g=g+Math.imul(Ae,Je)|0,N=N+Math.imul(Ae,Xe)|0,I=I+Math.imul(_e,Ze)|0,g=g+Math.imul(_e,Qe)|0,g=g+Math.imul(Ee,Ze)|0,N=N+Math.imul(Ee,Qe)|0,I=I+Math.imul($e,We)|0,g=g+Math.imul($e,je)|0,g=g+Math.imul(xe,We)|0,N=N+Math.imul(xe,je)|0,I=I+Math.imul(Pe,et)|0,g=g+Math.imul(Pe,Ct)|0,g=g+Math.imul(Ie,et)|0,N=N+Math.imul(Ie,Ct)|0,I=I+Math.imul(ue,Pt)|0,g=g+Math.imul(ue,lt)|0,g=g+Math.imul(ae,Pt)|0,N=N+Math.imul(ae,lt)|0;var Pn=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,I=Math.imul(Oe,Ye),g=Math.imul(Oe,Ke),g=g+Math.imul(Ne,Ye)|0,N=Math.imul(Ne,Ke),I=I+Math.imul(be,Je)|0,g=g+Math.imul(be,Xe)|0,g=g+Math.imul(Ce,Je)|0,N=N+Math.imul(Ce,Xe)|0,I=I+Math.imul(we,Ze)|0,g=g+Math.imul(we,Qe)|0,g=g+Math.imul(Ae,Ze)|0,N=N+Math.imul(Ae,Qe)|0,I=I+Math.imul(_e,We)|0,g=g+Math.imul(_e,je)|0,g=g+Math.imul(Ee,We)|0,N=N+Math.imul(Ee,je)|0,I=I+Math.imul($e,et)|0,g=g+Math.imul($e,Ct)|0,g=g+Math.imul(xe,et)|0,N=N+Math.imul(xe,Ct)|0,I=I+Math.imul(Pe,Pt)|0,g=g+Math.imul(Pe,lt)|0,g=g+Math.imul(Ie,Pt)|0,N=N+Math.imul(Ie,lt)|0;var On=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(On>>>26)|0,On&=67108863,I=Math.imul(Oe,Je),g=Math.imul(Oe,Xe),g=g+Math.imul(Ne,Je)|0,N=Math.imul(Ne,Xe),I=I+Math.imul(be,Ze)|0,g=g+Math.imul(be,Qe)|0,g=g+Math.imul(Ce,Ze)|0,N=N+Math.imul(Ce,Qe)|0,I=I+Math.imul(we,We)|0,g=g+Math.imul(we,je)|0,g=g+Math.imul(Ae,We)|0,N=N+Math.imul(Ae,je)|0,I=I+Math.imul(_e,et)|0,g=g+Math.imul(_e,Ct)|0,g=g+Math.imul(Ee,et)|0,N=N+Math.imul(Ee,Ct)|0,I=I+Math.imul($e,Pt)|0,g=g+Math.imul($e,lt)|0,g=g+Math.imul(xe,Pt)|0,N=N+Math.imul(xe,lt)|0;var Ar=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,I=Math.imul(Oe,Ze),g=Math.imul(Oe,Qe),g=g+Math.imul(Ne,Ze)|0,N=Math.imul(Ne,Qe),I=I+Math.imul(be,We)|0,g=g+Math.imul(be,je)|0,g=g+Math.imul(Ce,We)|0,N=N+Math.imul(Ce,je)|0,I=I+Math.imul(we,et)|0,g=g+Math.imul(we,Ct)|0,g=g+Math.imul(Ae,et)|0,N=N+Math.imul(Ae,Ct)|0,I=I+Math.imul(_e,Pt)|0,g=g+Math.imul(_e,lt)|0,g=g+Math.imul(Ee,Pt)|0,N=N+Math.imul(Ee,lt)|0;var Zn=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,I=Math.imul(Oe,We),g=Math.imul(Oe,je),g=g+Math.imul(Ne,We)|0,N=Math.imul(Ne,je),I=I+Math.imul(be,et)|0,g=g+Math.imul(be,Ct)|0,g=g+Math.imul(Ce,et)|0,N=N+Math.imul(Ce,Ct)|0,I=I+Math.imul(we,Pt)|0,g=g+Math.imul(we,lt)|0,g=g+Math.imul(Ae,Pt)|0,N=N+Math.imul(Ae,lt)|0;var es=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(es>>>26)|0,es&=67108863,I=Math.imul(Oe,et),g=Math.imul(Oe,Ct),g=g+Math.imul(Ne,et)|0,N=Math.imul(Ne,Ct),I=I+Math.imul(be,Pt)|0,g=g+Math.imul(be,lt)|0,g=g+Math.imul(Ce,Pt)|0,N=N+Math.imul(Ce,lt)|0;var ts=(U+I|0)+((g&8191)<<13)|0;U=(N+(g>>>13)|0)+(ts>>>26)|0,ts&=67108863,I=Math.imul(Oe,Pt),g=Math.imul(Oe,lt),g=g+Math.imul(Ne,Pt)|0,N=Math.imul(Ne,lt);var rs=(U+I|0)+((g&8191)<<13)|0;return U=(N+(g>>>13)|0)+(rs>>>26)|0,rs&=67108863,O[0]=ni,O[1]=si,O[2]=oi,O[3]=ai,O[4]=ci,O[5]=or,O[6]=qi,O[7]=Wn,O[8]=ji,O[9]=Jn,O[10]=Xn,O[11]=Fi,O[12]=Pn,O[13]=On,O[14]=Ar,O[15]=Zn,O[16]=es,O[17]=ts,O[18]=rs,U!==0&&(O[19]=U,w.length++),w};Math.imul||(K=ee);function V(l,h,w){w.negative=h.negative^l.negative,w.length=l.length+h.length;for(var S=0,M=0,O=0;O>>26)|0,M+=U>>>26,U&=67108863}w.words[O]=I,S=U,U=M}return S!==0?w.words[O]=S:w.length--,w._strip()}function q(l,h,w){return V(l,h,w)}a.prototype.mulTo=function(l,h){var w,S=this.length+l.length;return this.length===10&&l.length===10?w=K(this,l,h):S<63?w=ee(this,l,h):S<1024?w=V(this,l,h):w=q(this,l,h),w},a.prototype.mul=function(l){var h=new a(null);return h.words=new Array(this.length+l.length),this.mulTo(l,h)},a.prototype.mulf=function(l){var h=new a(null);return h.words=new Array(this.length+l.length),q(this,l,h)},a.prototype.imul=function(l){return this.clone().mulTo(l,this)},a.prototype.imuln=function(l){var h=l<0;h&&(l=-l),i(typeof l=="number"),i(l<67108864);for(var w=0,S=0;S>=26,w+=M/67108864|0,w+=O>>>26,this.words[S]=O&67108863}return w!==0&&(this.words[S]=w,this.length++),h?this.ineg():this},a.prototype.muln=function(l){return this.clone().imuln(l)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(l){var h=G(l);if(h.length===0)return new a(1);for(var w=this,S=0;S=0);var h=l%26,w=(l-h)/26,S=67108863>>>26-h<<26-h,M;if(h!==0){var O=0;for(M=0;M>>26-h}O&&(this.words[M]=O,this.length++)}if(w!==0){for(M=this.length-1;M>=0;M--)this.words[M+w]=this.words[M];for(M=0;M=0);var S;h?S=(h-h%26)/26:S=0;var M=l%26,O=Math.min((l-M)/26,this.length),U=67108863^67108863>>>M<O)for(this.length-=O,g=0;g=0&&(N!==0||g>=S);g--){var ie=this.words[g]|0;this.words[g]=N<<26-M|ie>>>M,N=ie&U}return I&&N!==0&&(I.words[I.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(l,h,w){return i(this.negative===0),this.iushrn(l,h,w)},a.prototype.shln=function(l){return this.clone().ishln(l)},a.prototype.ushln=function(l){return this.clone().iushln(l)},a.prototype.shrn=function(l){return this.clone().ishrn(l)},a.prototype.ushrn=function(l){return this.clone().iushrn(l)},a.prototype.testn=function(l){i(typeof l=="number"&&l>=0);var h=l%26,w=(l-h)/26,S=1<=0);var h=l%26,w=(l-h)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(h!==0&&w++,this.length=Math.min(w,this.length),h!==0){var S=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},a.prototype.isubn=function(l){if(i(typeof l=="number"),i(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(I/67108864|0),this.words[M+w]=O&67108863}for(;M>26,this.words[M+w]=O&67108863;if(U===0)return this._strip();for(i(U===-1),U=0,M=0;M>26,this.words[M]=O&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(l,h){var w=this.length-l.length,S=this.clone(),M=l,O=M.words[M.length-1]|0,U=this._countBits(O);w=26-U,w!==0&&(M=M.ushln(w),S.iushln(w),O=M.words[M.length-1]|0);var I=S.length-M.length,g;if(h!=="mod"){g=new a(null),g.length=I+1,g.words=new Array(g.length);for(var N=0;N=0;de--){var _=(S.words[M.length+de]|0)*67108864+(S.words[M.length+de-1]|0);for(_=Math.min(_/O|0,67108863),S._ishlnsubmul(M,_,de);S.negative!==0;)_--,S.negative=0,S._ishlnsubmul(M,1,de),S.isZero()||(S.negative^=1);g&&(g.words[de]=_)}return g&&g._strip(),S._strip(),h!=="div"&&w!==0&&S.iushrn(w),{div:g||null,mod:S}},a.prototype.divmod=function(l,h,w){if(i(!l.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var S,M,O;return this.negative!==0&&l.negative===0?(O=this.neg().divmod(l,h),h!=="mod"&&(S=O.div.neg()),h!=="div"&&(M=O.mod.neg(),w&&M.negative!==0&&M.iadd(l)),{div:S,mod:M}):this.negative===0&&l.negative!==0?(O=this.divmod(l.neg(),h),h!=="mod"&&(S=O.div.neg()),{div:S,mod:O.mod}):this.negative&l.negative?(O=this.neg().divmod(l.neg(),h),h!=="div"&&(M=O.mod.neg(),w&&M.negative!==0&&M.isub(l)),{div:O.div,mod:M}):l.length>this.length||this.cmp(l)<0?{div:new a(0),mod:this}:l.length===1?h==="div"?{div:this.divn(l.words[0]),mod:null}:h==="mod"?{div:null,mod:new a(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new a(this.modrn(l.words[0]))}:this._wordDiv(l,h)},a.prototype.div=function(l){return this.divmod(l,"div",!1).div},a.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},a.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},a.prototype.divRound=function(l){var h=this.divmod(l);if(h.mod.isZero())return h.div;var w=h.div.negative!==0?h.mod.isub(l):h.mod,S=l.ushrn(1),M=l.andln(1),O=w.cmp(S);return O<0||M===1&&O===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},a.prototype.modrn=function(l){var h=l<0;h&&(l=-l),i(l<=67108863);for(var w=(1<<26)%l,S=0,M=this.length-1;M>=0;M--)S=(w*S+(this.words[M]|0))%l;return h?-S:S},a.prototype.modn=function(l){return this.modrn(l)},a.prototype.idivn=function(l){var h=l<0;h&&(l=-l),i(l<=67108863);for(var w=0,S=this.length-1;S>=0;S--){var M=(this.words[S]|0)+w*67108864;this.words[S]=M/l|0,w=M%l}return this._strip(),h?this.ineg():this},a.prototype.divn=function(l){return this.clone().idivn(l)},a.prototype.egcd=function(l){i(l.negative===0),i(!l.isZero());var h=this,w=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var S=new a(1),M=new a(0),O=new a(0),U=new a(1),I=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++I;for(var g=w.clone(),N=h.clone();!h.isZero();){for(var ie=0,de=1;!(h.words[0]&de)&&ie<26;++ie,de<<=1);if(ie>0)for(h.iushrn(ie);ie-- >0;)(S.isOdd()||M.isOdd())&&(S.iadd(g),M.isub(N)),S.iushrn(1),M.iushrn(1);for(var _=0,Z=1;!(w.words[0]&Z)&&_<26;++_,Z<<=1);if(_>0)for(w.iushrn(_);_-- >0;)(O.isOdd()||U.isOdd())&&(O.iadd(g),U.isub(N)),O.iushrn(1),U.iushrn(1);h.cmp(w)>=0?(h.isub(w),S.isub(O),M.isub(U)):(w.isub(h),O.isub(S),U.isub(M))}return{a:O,b:U,gcd:w.iushln(I)}},a.prototype._invmp=function(l){i(l.negative===0),i(!l.isZero());var h=this,w=l.clone();h.negative!==0?h=h.umod(l):h=h.clone();for(var S=new a(1),M=new a(0),O=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var U=0,I=1;!(h.words[0]&I)&&U<26;++U,I<<=1);if(U>0)for(h.iushrn(U);U-- >0;)S.isOdd()&&S.iadd(O),S.iushrn(1);for(var g=0,N=1;!(w.words[0]&N)&&g<26;++g,N<<=1);if(g>0)for(w.iushrn(g);g-- >0;)M.isOdd()&&M.iadd(O),M.iushrn(1);h.cmp(w)>=0?(h.isub(w),S.isub(M)):(w.isub(h),M.isub(S))}var ie;return h.cmpn(1)===0?ie=S:ie=M,ie.cmpn(0)<0&&ie.iadd(l),ie},a.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var h=this.clone(),w=l.clone();h.negative=0,w.negative=0;for(var S=0;h.isEven()&&w.isEven();S++)h.iushrn(1),w.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var M=h.cmp(w);if(M<0){var O=h;h=w,w=O}else if(M===0||w.cmpn(1)===0)break;h.isub(w)}while(!0);return w.iushln(S)},a.prototype.invm=function(l){return this.egcd(l).a.umod(l)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(l){return this.words[0]&l},a.prototype.bincn=function(l){i(typeof l=="number");var h=l%26,w=(l-h)/26,S=1<>>26,U&=67108863,this.words[O]=U}return M!==0&&(this.words[O]=M,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(l){var h=l<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var w;if(this.length>1)w=1;else{h&&(l=-l),i(l<=67108863,"Number is too big");var S=this.words[0]|0;w=S===l?0:Sl.length)return 1;if(this.length=0;w--){var S=this.words[w]|0,M=l.words[w]|0;if(S!==M){SM&&(h=1);break}}return h},a.prototype.gtn=function(l){return this.cmpn(l)===1},a.prototype.gt=function(l){return this.cmp(l)===1},a.prototype.gten=function(l){return this.cmpn(l)>=0},a.prototype.gte=function(l){return this.cmp(l)>=0},a.prototype.ltn=function(l){return this.cmpn(l)===-1},a.prototype.lt=function(l){return this.cmp(l)===-1},a.prototype.lten=function(l){return this.cmpn(l)<=0},a.prototype.lte=function(l){return this.cmp(l)<=0},a.prototype.eqn=function(l){return this.cmpn(l)===0},a.prototype.eq=function(l){return this.cmp(l)===0},a.red=function(l){return new le(l)},a.prototype.toRed=function(l){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(l){return this.red=l,this},a.prototype.forceRed=function(l){return i(!this.red,"Already a number in reduction context"),this._forceRed(l)},a.prototype.redAdd=function(l){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},a.prototype.redIAdd=function(l){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},a.prototype.redSub=function(l){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},a.prototype.redISub=function(l){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},a.prototype.redShl=function(l){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},a.prototype.redMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},a.prototype.redIMul=function(l){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(l){return i(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var $={k256:null,p224:null,p192:null,p25519:null};function z(l,h){this.name=l,this.p=new a(h,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var l=new a(null);return l.words=new Array(Math.ceil(this.n/13)),l},z.prototype.ireduce=function(l){var h=l,w;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),w=h.bitLength();while(w>this.n);var S=w0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},z.prototype.split=function(l,h){l.iushrn(this.n,0,h)},z.prototype.imulK=function(l){return l.imul(this.k)};function y(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(y,z),y.prototype.split=function(l,h){for(var w=4194303,S=Math.min(l.length,9),M=0;M>>22,O=U}O>>>=22,l.words[M-10]=O,O===0&&l.length>10?l.length-=10:l.length-=9},y.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var h=0,w=0;w>>=26,l.words[w]=M,h=S}return h!==0&&(l.words[l.length++]=h),l},a._prime=function(l){if($[l])return $[l];var h;if(l==="k256")h=new y;else if(l==="p224")h=new T;else if(l==="p192")h=new ne;else if(l==="p25519")h=new fe;else throw new Error("Unknown prime "+l);return $[l]=h,h};function le(l){if(typeof l=="string"){var h=a._prime(l);this.m=h.p,this.prime=h}else i(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}le.prototype._verify1=function(l){i(l.negative===0,"red works only with positives"),i(l.red,"red works only with red numbers")},le.prototype._verify2=function(l,h){i((l.negative|h.negative)===0,"red works only with positives"),i(l.red&&l.red===h.red,"red works only with red numbers")},le.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(b(l,l.umod(this.m)._forceRed(this)),l)},le.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},le.prototype.add=function(l,h){this._verify2(l,h);var w=l.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},le.prototype.iadd=function(l,h){this._verify2(l,h);var w=l.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},le.prototype.sub=function(l,h){this._verify2(l,h);var w=l.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},le.prototype.isub=function(l,h){this._verify2(l,h);var w=l.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},le.prototype.shl=function(l,h){return this._verify1(l),this.imod(l.ushln(h))},le.prototype.imul=function(l,h){return this._verify2(l,h),this.imod(l.imul(h))},le.prototype.mul=function(l,h){return this._verify2(l,h),this.imod(l.mul(h))},le.prototype.isqr=function(l){return this.imul(l,l.clone())},le.prototype.sqr=function(l){return this.mul(l,l)},le.prototype.sqrt=function(l){if(l.isZero())return l.clone();var h=this.m.andln(3);if(i(h%2===1),h===3){var w=this.m.add(new a(1)).iushrn(2);return this.pow(l,w)}for(var S=this.m.subn(1),M=0;!S.isZero()&&S.andln(1)===0;)M++,S.iushrn(1);i(!S.isZero());var O=new a(1).toRed(this),U=O.redNeg(),I=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new a(2*g*g).toRed(this);this.pow(g,I).cmp(U)!==0;)g.redIAdd(U);for(var N=this.pow(g,S),ie=this.pow(l,S.addn(1).iushrn(1)),de=this.pow(l,S),_=M;de.cmp(O)!==0;){for(var Z=de,L=0;Z.cmp(O)!==0;L++)Z=Z.redSqr();i(L<_);var j=this.pow(N,new a(1).iushln(_-L-1));ie=ie.redMul(j),N=j.redSqr(),de=de.redMul(N),_=L}return ie},le.prototype.invm=function(l){var h=l._invmp(this.m);return h.negative!==0?(h.negative=0,this.imod(h).redNeg()):this.imod(h)},le.prototype.pow=function(l,h){if(h.isZero())return new a(1).toRed(this);if(h.cmpn(1)===0)return l.clone();var w=4,S=new Array(1<=0;M--){for(var N=h.words[M],ie=g-1;ie>=0;ie--){var de=N>>ie&1;if(O!==S[0]&&(O=this.sqr(O)),de===0&&U===0){I=0;continue}U<<=1,U|=de,I++,!(I!==w&&(M!==0||ie!==0))&&(O=this.mul(O,S[U]),I=0,U=0)}g=26}return O},le.prototype.convertTo=function(l){var h=l.umod(this.m);return h===l?h.clone():h},le.prototype.convertFrom=function(l){var h=l.clone();return h.red=null,h},a.mont=function(l){return new me(l)};function me(l){le.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}s(me,le),me.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},me.prototype.convertFrom=function(l){var h=this.imod(l.mul(this.rinv));return h.red=null,h},me.prototype.imul=function(l,h){if(l.isZero()||h.isZero())return l.words[0]=0,l.length=1,l;var w=l.imul(h),S=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=w.isub(S).iushrn(this.shift),O=M;return M.cmp(this.m)>=0?O=M.isub(this.m):M.cmpn(0)<0&&(O=M.iadd(this.m)),O._forceRed(this)},me.prototype.mul=function(l,h){if(l.isZero()||h.isZero())return new a(0)._forceRed(this);var w=l.mul(h),S=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=w.isub(S).iushrn(this.shift),O=M;return M.cmp(this.m)>=0?O=M.isub(this.m):M.cmpn(0)<0&&(O=M.iadd(this.m)),O._forceRed(this)},me.prototype.invm=function(l){var h=this.imod(l._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(r,Qg)})(Zg);var nt=Zg.exports;const e1="bignumber/5.7.0";var Kc=nt.BN;const An=new gr(e1),Th={},L0=9007199254740991;function i5(r){return r!=null&&(Nr.isBigNumber(r)||typeof r=="number"&&r%1===0||typeof r=="string"&&!!r.match(/^-?[0-9]+$/)||ti(r)||typeof r=="bigint"||po(r))}let q0=!1,Nr=class Ri{constructor(e,t){e!==Th&&An.throwError("cannot call constructor directly; use BigNumber.from",gr.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return qr(mt(this).fromTwos(e))}toTwos(e){return qr(mt(this).toTwos(e))}abs(){return this._hex[0]==="-"?Ri.from(this._hex.substring(1)):this}add(e){return qr(mt(this).add(mt(e)))}sub(e){return qr(mt(this).sub(mt(e)))}div(e){return Ri.from(e).isZero()&&vi("division-by-zero","div"),qr(mt(this).div(mt(e)))}mul(e){return qr(mt(this).mul(mt(e)))}mod(e){const t=mt(e);return t.isNeg()&&vi("division-by-zero","mod"),qr(mt(this).umod(t))}pow(e){const t=mt(e);return t.isNeg()&&vi("negative-power","pow"),qr(mt(this).pow(t))}and(e){const t=mt(e);return(this.isNegative()||t.isNeg())&&vi("unbound-bitwise-result","and"),qr(mt(this).and(t))}or(e){const t=mt(e);return(this.isNegative()||t.isNeg())&&vi("unbound-bitwise-result","or"),qr(mt(this).or(t))}xor(e){const t=mt(e);return(this.isNegative()||t.isNeg())&&vi("unbound-bitwise-result","xor"),qr(mt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&vi("negative-width","mask"),qr(mt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&vi("negative-width","shl"),qr(mt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&vi("negative-width","shr"),qr(mt(this).shrn(e))}eq(e){return mt(this).eq(mt(e))}lt(e){return mt(this).lt(mt(e))}lte(e){return mt(this).lte(mt(e))}gt(e){return mt(this).gt(mt(e))}gte(e){return mt(this).gte(mt(e))}isNegative(){return this._hex[0]==="-"}isZero(){return mt(this).isZero()}toNumber(){try{return mt(this).toNumber()}catch{vi("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return An.throwError("this platform does not support BigInt",gr.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?q0||(q0=!0,An.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?An.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",gr.errors.UNEXPECTED_ARGUMENT,{}):An.throwError("BigNumber.toString does not accept parameters",gr.errors.UNEXPECTED_ARGUMENT,{})),mt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Ri)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Ri(Th,na(e)):e.match(/^-?[0-9]+$/)?new Ri(Th,na(new Kc(e))):An.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&vi("underflow","BigNumber.from",e),(e>=L0||e<=-L0)&&vi("overflow","BigNumber.from",e),Ri.from(String(e));const t=e;if(typeof t=="bigint")return Ri.from(t.toString());if(po(t))return Ri.from($r(t));if(t)if(t.toHexString){const i=t.toHexString();if(typeof i=="string")return Ri.from(i)}else{let i=t._hex;if(i==null&&t.type==="BigNumber"&&(i=t.hex),typeof i=="string"&&(ti(i)||i[0]==="-"&&ti(i.substring(1))))return Ri.from(i)}return An.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function na(r){if(typeof r!="string")return na(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&An.throwArgumentError("invalid hex","value",r),r=na(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function qr(r){return Nr.from(na(r))}function mt(r){const e=Nr.from(r).toHexString();return e[0]==="-"?new Kc("-"+e.substring(3),16):new Kc(e.substring(2),16)}function vi(r,e,t){const i={fault:r,operation:e};return t!=null&&(i.value=t),An.throwError(r,gr.errors.NUMERIC_FAULT,i)}function n5(r){return new Kc(r,36).toString(16)}const Cr=new gr(e1),Xo={},t1=Nr.from(0),r1=Nr.from(-1);function i1(r,e,t,i){const s={fault:e,operation:t};return i!==void 0&&(s.value=i),Cr.throwError(r,gr.errors.NUMERIC_FAULT,s)}let Zo="0";for(;Zo.length<256;)Zo+=Zo;function Hl(r){if(typeof r!="number")try{r=Nr.from(r).toNumber()}catch{}return typeof r=="number"&&r>=0&&r<=256&&!(r%1)?"1"+Zo.substring(0,r):Cr.throwArgumentError("invalid decimal size","decimals",r)}function Uh(r,e){e==null&&(e=0);const t=Hl(e);r=Nr.from(r);const i=r.lt(t1);i&&(r=r.mul(r1));let s=r.mod(t).toString();for(;s.length2&&Cr.throwArgumentError("too many decimal points","value",r);let a=s[0],u=s[1];for(a||(a="0"),u||(u="0");u[u.length-1]==="0";)u=u.substring(0,u.length-1);for(u.length>t.length-1&&i1("fractional component exceeds decimals","underflow","parseFixed"),u===""&&(u="0");u.lengthe[u]==null?p:(typeof e[u]!==f&&Cr.throwArgumentError("invalid fixed format ("+u+" not "+f+")","format."+u,e[u]),e[u]);t=a("signed","boolean",t),i=a("width","number",i),s=a("decimals","number",s)}return i%8&&Cr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",i),s>80&&Cr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new wl(Xo,t,i,s)}},n1=class Mr{constructor(e,t,i,s){e!==Xo&&Cr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",gr.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=t,this._value=i,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Cr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=bn(this._value,this.format.decimals),i=bn(e._value,e.format.decimals);return Mr.fromValue(t.add(i),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=bn(this._value,this.format.decimals),i=bn(e._value,e.format.decimals);return Mr.fromValue(t.sub(i),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=bn(this._value,this.format.decimals),i=bn(e._value,e.format.decimals);return Mr.fromValue(t.mul(i).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=bn(this._value,this.format.decimals),i=bn(e._value,e.format.decimals);return Mr.fromValue(t.mul(this.format._multiplier).div(i),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=Mr.from(e[0],this.format);const i=!e[1].match(/^(0*)$/);return this.isNegative()&&i&&(t=t.subUnsafe(j0.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let t=Mr.from(e[0],this.format);const i=!e[1].match(/^(0*)$/);return!this.isNegative()&&i&&(t=t.addUnsafe(j0.toFormat(t.format))),t}round(e){e==null&&(e=0);const t=this.toString().split(".");if(t.length===1&&t.push("0"),(e<0||e>80||e%1)&&Cr.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const i=Mr.from("1"+Zo.substring(0,e),this.format),s=s5.toFormat(this.format);return this.mulUnsafe(i).addUnsafe(s).floor().divUnsafe(i)}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&&Cr.throwArgumentError("invalid byte width","width",e);const t=Nr.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return en(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Mr.fromString(this._value,e)}static fromValue(e,t,i){return i==null&&t!=null&&!i5(t)&&(i=t,t=null),t==null&&(t=0),i==null&&(i="fixed"),Mr.fromString(Uh(e,t),Bh.from(i))}static fromString(e,t){t==null&&(t="fixed");const i=Bh.from(t),s=bn(e,i.decimals);!i.signed&&s.lt(t1)&&i1("unsigned value cannot be negative","overflow","value",e);let a=null;i.signed?a=s.toTwos(i.width).toHexString():(a=s.toHexString(),a=en(a,i.width/8));const u=Uh(s,i.decimals);return new Mr(Xo,a,u,i)}static fromBytes(e,t){t==null&&(t="fixed");const i=Bh.from(t);if(Yt(e).length>i.width/8)throw new Error("overflow");let s=Nr.from(e);i.signed&&(s=s.fromTwos(i.width));const a=s.toTwos((i.signed?0:1)+i.width).toHexString(),u=Uh(s,i.decimals);return new Mr(Xo,a,u,i)}static from(e,t){if(typeof e=="string")return Mr.fromString(e,t);if(po(e))return Mr.fromBytes(e,t);try{return Mr.fromValue(e,0,t)}catch(i){if(i.code!==gr.errors.INVALID_ARGUMENT)throw i}return Cr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}};const j0=n1.from(1),s5=n1.from("0.5"),o5="strings/5.7.0",a5=new gr(o5);var Vc;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(Vc||(Vc={}));var F0;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(F0||(F0={}));function Lh(r,e=Vc.current){e!=Vc.current&&(a5.checkNormalize(),r=r.normalize(e));let t=[];for(let i=0;i>6|192),t.push(s&63|128);else if((s&64512)==55296){i++;const a=r.charCodeAt(i);if(i>=r.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");const u=65536+((s&1023)<<10)+(a&1023);t.push(u>>18|240),t.push(u>>12&63|128),t.push(u>>6&63|128),t.push(u&63|128)}else t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128)}return Yt(t)}function c5(r){if(r.length%4!==0)throw new Error("bad data");let e=[];for(let t=0;t{let a=s.split(":");t+=parseInt(a[0],16),i[t]=e(a[1])}),i}function $0(r){let e=0;return r.split(",").map(t=>{let i=t.split("-");i.length===1?i[1]="0":i[1]===""&&(i[1]="1");let s=e+parseInt(i[0],16);return e=parseInt(i[1],16),{l:s,h:e}})}$0("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(r=>parseInt(r,16)),qh("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"),qh("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"),qh("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",c5),$0("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 u5(r){r=atob(r);const e=[];for(let t=0;t0&&Array.isArray(f)?s(f,u-1):t.push(f)})};return s(r,e),t}function h5(r){const e={};for(let t=0;t>--p&1}const E=31,x=Math.pow(2,E),D=x>>>1,C=D>>1,Q=x-1;let G=0;for(let $=0;$1;){let fe=z+y>>>1;$>>1|b(),T=T<<1^D,ne=(ne^D)<<1|D|1;K=T,V=1+ne-T}let q=i-4;return ee.map($=>{switch($-q){case 3:return q+65792+(r[f++]<<16|r[f++]<<8|r[f++]);case 2:return q+256+(r[f++]<<8|r[f++]);case 1:return q+r[f++];default:return $-1}})}function f5(r){let e=0;return()=>r[e++]}function d5(r){return f5(l5(r))}function p5(r){return r&1?~r>>1:r>>1}function g5(r,e){let t=Array(r);for(let i=0;ie[u]):t}function v5(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(w5(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(b5(t,r))}return h5(s1(e))}function y5(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(t)}return e}function o1(r,e,t){let i=Array(r).fill(void 0).map(()=>[]);for(let s=0;si[u].push(a));return i}function w5(r,e){let t=1+e(),i=e(),s=y5(e),a=o1(s.length,1+r,e);return s1(a.map((u,f)=>{const p=u[0],d=u.slice(1);return Array(s[f]).fill(void 0).map((b,E)=>{let x=E*i;return[p+E*t,d.map(D=>D+x)]})}))}function b5(r,e){let t=1+e();return o1(t,1+r,e).map(i=>[i[0],i.slice(1)])}function _5(r){let e=Gc(r).sort((i,s)=>i-s);return t();function t(){let i=[];for(;;){let d=Gc(r,e);if(d.length==0)break;i.push({set:new Set(d),node:t()})}i.sort((d,b)=>b.set.size-d.set.size);let s=r(),a=s%3;s=s/3|0;let u=!!(s&1);s>>=1;let f=s==1,p=s==2;return{branches:i,valid:a,fe0f:u,save:f,check:p}}}function E5(){return d5(u5("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=="))}const Ac=E5();new Set(Gc(Ac)),new Set(Gc(Ac)),v5(Ac),_5(Ac);const A5=new Uint8Array(32);A5.fill(0);const S5=`Ethereum Signed Message: +`;function a1(r){return typeof r=="string"&&(r=Lh(r)),kl(JE([Lh(S5),Lh(String(r.length)),r]))}const I5="address/5.7.0",Go=new gr(I5);function k0(r){ti(r,20)||Go.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const e=r.substring(2).split(""),t=new Uint8Array(40);for(let s=0;s<40;s++)t[s]=e[s].charCodeAt(0);const i=Yt(kl(t));for(let s=0;s<40;s+=2)i[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(i[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const D5=9007199254740991;function x5(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const Kl={};for(let r=0;r<10;r++)Kl[String(r)]=String(r);for(let r=0;r<26;r++)Kl[String.fromCharCode(65+r)]=String(10+r);const H0=Math.floor(x5(D5));function M5(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(i=>Kl[i]).join("");for(;e.length>=H0;){let i=e.substring(0,H0);e=parseInt(i,10)%97+e.substring(i.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}function C5(r){let e=null;if(typeof r!="string"&&Go.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),e=k0(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==r&&Go.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==M5(r)&&Go.throwArgumentError("bad icap checksum","address",r),e=n5(r.substring(4));e.length<40;)e="0"+e;e=k0("0x"+e)}else Go.throwArgumentError("invalid address","address",r);return e}function Fo(r,e,t){Object.defineProperty(r,e,{enumerable:!0,value:t,writable:!1})}const P5=new Uint8Array(32);P5.fill(0),Nr.from(-1);const O5=Nr.from(0),N5=Nr.from(1);Nr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),en(N5.toHexString(),32),en(O5.toHexString(),32);var Yi={},vt={},da=c1;function c1(r,e){if(!r)throw new Error(e||"Assertion failed")}c1.equal=function(r,e,t){if(r!=e)throw new Error(t||"Assertion failed: "+r+" != "+e)};var bl={exports:{}};typeof Object.create=="function"?bl.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:bl.exports=function(r,e){if(e){r.super_=e;var t=function(){};t.prototype=e.prototype,r.prototype=new t,r.prototype.constructor=r}};var R5=da,T5=bl.exports;vt.inherits=T5;function U5(r,e){return(r.charCodeAt(e)&64512)!==55296||e<0||e+1>=r.length?!1:(r.charCodeAt(e+1)&64512)===56320}function B5(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var t=[];if(typeof r=="string")if(e){if(e==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),s=0;s>6|192,t[i++]=a&63|128):U5(r,s)?(a=65536+((a&1023)<<10)+(r.charCodeAt(++s)&1023),t[i++]=a>>18|240,t[i++]=a>>12&63|128,t[i++]=a>>6&63|128,t[i++]=a&63|128):(t[i++]=a>>12|224,t[i++]=a>>6&63|128,t[i++]=a&63|128)}else for(s=0;s>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return e>>>0}vt.htonl=u1;function q5(r,e){for(var t="",i=0;i>>0}return a}vt.join32=j5;function F5(r,e){for(var t=new Array(r.length*4),i=0,s=0;i>>24,t[s+1]=a>>>16&255,t[s+2]=a>>>8&255,t[s+3]=a&255):(t[s+3]=a>>>24,t[s+2]=a>>>16&255,t[s+1]=a>>>8&255,t[s]=a&255)}return t}vt.split32=F5;function $5(r,e){return r>>>e|r<<32-e}vt.rotr32=$5;function z5(r,e){return r<>>32-e}vt.rotl32=z5;function k5(r,e){return r+e>>>0}vt.sum32=k5;function H5(r,e,t){return r+e+t>>>0}vt.sum32_3=H5;function K5(r,e,t,i){return r+e+t+i>>>0}vt.sum32_4=K5;function V5(r,e,t,i,s){return r+e+t+i+s>>>0}vt.sum32_5=V5;function G5(r,e,t,i){var s=r[e],a=r[e+1],u=i+a>>>0,f=(u>>0,r[e+1]=u}vt.sum64=G5;function Y5(r,e,t,i){var s=e+i>>>0,a=(s>>0}vt.sum64_hi=Y5;function Q5(r,e,t,i){var s=e+i;return s>>>0}vt.sum64_lo=Q5;function W5(r,e,t,i,s,a,u,f){var p=0,d=e;d=d+i>>>0,p+=d>>0,p+=d>>0,p+=d>>0}vt.sum64_4_hi=W5;function J5(r,e,t,i,s,a,u,f){var p=e+i+a+f;return p>>>0}vt.sum64_4_lo=J5;function X5(r,e,t,i,s,a,u,f,p,d){var b=0,E=e;E=E+i>>>0,b+=E>>0,b+=E>>0,b+=E>>0,b+=E>>0}vt.sum64_5_hi=X5;function Z5(r,e,t,i,s,a,u,f,p,d){var b=e+i+a+f+d;return b>>>0}vt.sum64_5_lo=Z5;function eA(r,e,t){var i=e<<32-t|r>>>t;return i>>>0}vt.rotr64_hi=eA;function tA(r,e,t){var i=r<<32-t|e>>>t;return i>>>0}vt.rotr64_lo=tA;function rA(r,e,t){return r>>>t}vt.shr64_hi=rA;function iA(r,e,t){var i=r<<32-t|e>>>t;return i>>>0}vt.shr64_lo=iA;var go={},K0=vt,nA=da;function Sc(){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}go.BlockHash=Sc,Sc.prototype.update=function(r,e){if(r=K0.toArray(r,e),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){r=this.pending;var t=r.length%this._delta8;this.pending=r.slice(r.length-t,r.length),this.pending.length===0&&(this.pending=null),r=K0.join32(r,0,r.length-t,this.endian);for(var i=0;i>>24&255,i[s++]=r>>>16&255,i[s++]=r>>>8&255,i[s++]=r&255}else for(i[s++]=r&255,i[s++]=r>>>8&255,i[s++]=r>>>16&255,i[s++]=r>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,a=8;a>>3}an.g0_256=uA;function hA(r){return tn(r,17)^tn(r,19)^r>>>10}an.g1_256=hA;var ao=vt,lA=go,fA=an,jh=ao.rotl32,$o=ao.sum32,dA=ao.sum32_5,pA=fA.ft_1,g1=lA.BlockHash,gA=[1518500249,1859775393,2400959708,3395469782];function Xi(){if(!(this instanceof Xi))return new Xi;g1.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ao.inherits(Xi,g1);var mA=Xi;Xi.blockSize=512,Xi.outSize=160,Xi.hmacStrength=80,Xi.padLength=64,Xi.prototype._update=function(r,e){for(var t=this.W,i=0;i<16;i++)t[i]=r[e+i];for(;ithis.blockSize&&(r=new this.Hash().update(r).digest()),i8(r.length<=this.blockSize);for(var e=r.length;e>8,x=b&255;E?p.push(E,x):p.push(x)}return p}t.toArray=i;function s(u){return u.length===1?"0"+u:u}t.zero2=s;function a(u){for(var f="",p=0;p(x>>1)-1?Q=(x>>1)-G:Q=G,D.isubn(Q)):Q=0,E[C]=Q,D.iushrn(1)}return E}t.getNAF=i;function s(p,d){var b=[[],[]];p=p.clone(),d=d.clone();for(var E=0,x=0,D;p.cmpn(-E)>0||d.cmpn(-x)>0;){var C=p.andln(3)+E&3,Q=d.andln(3)+x&3;C===3&&(C=-1),Q===3&&(Q=-1);var G;C&1?(D=p.andln(7)+E&7,(D===3||D===5)&&Q===2?G=-C:G=C):G=0,b[0].push(G);var ee;Q&1?(D=d.andln(7)+x&7,(D===3||D===5)&&C===2?ee=-Q:ee=Q):ee=0,b[1].push(ee),2*E===G+1&&(E=1-E),2*x===ee+1&&(x=1-x),p.iushrn(1),d.iushrn(1)}return b}t.getJSF=s;function a(p,d,b){var E="_"+d;p.prototype[d]=function(){return this[E]!==void 0?this[E]:this[E]=b.call(this)}}t.cachedProperty=a;function u(p){return typeof p=="string"?t.toArray(p,"hex"):p}t.parseBytes=u;function f(p){return new nt(p,"hex","le")}t.intFromLE=f}),Dc=ri.getNAF,o8=ri.getJSF,Yc=ri.assert;function Vn(r,e){this.type=r,this.p=new nt(e.p,16),this.red=e.prime?nt.red(e.prime):nt.mont(this.p),this.zero=new nt(0).toRed(this.red),this.one=new nt(1).toRed(this.red),this.two=new nt(2).toRed(this.red),this.n=e.n&&new nt(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ds=Vn;Vn.prototype.point=function(){throw new Error("Not implemented")},Vn.prototype.validate=function(){throw new Error("Not implemented")},Vn.prototype._fixedNafMul=function(r,e){Yc(r.precomputed);var t=r._getDoubles(),i=Dc(e,1,this._bitLength),s=(1<=u;p--)f=(f<<1)+i[p];a.push(f)}for(var d=this.jpoint(null,null,null),b=this.jpoint(null,null,null),E=s;E>0;E--){for(u=0;u=0;f--){for(var p=0;f>=0&&a[f]===0;f--)p++;if(f>=0&&p++,u=u.dblp(p),f<0)break;var d=a[f];Yc(d!==0),r.type==="affine"?d>0?u=u.mixedAdd(s[d-1>>1]):u=u.mixedAdd(s[-d-1>>1].neg()):d>0?u=u.add(s[d-1>>1]):u=u.add(s[-d-1>>1].neg())}return r.type==="affine"?u.toP():u},Vn.prototype._wnafMulAdd=function(r,e,t,i,s){var a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,p=0,d,b,E;for(d=0;d=1;d-=2){var D=d-1,C=d;if(a[D]!==1||a[C]!==1){f[D]=Dc(t[D],a[D],this._bitLength),f[C]=Dc(t[C],a[C],this._bitLength),p=Math.max(f[D].length,p),p=Math.max(f[C].length,p);continue}var Q=[e[D],null,null,e[C]];e[D].y.cmp(e[C].y)===0?(Q[1]=e[D].add(e[C]),Q[2]=e[D].toJ().mixedAdd(e[C].neg())):e[D].y.cmp(e[C].y.redNeg())===0?(Q[1]=e[D].toJ().mixedAdd(e[C]),Q[2]=e[D].add(e[C].neg())):(Q[1]=e[D].toJ().mixedAdd(e[C]),Q[2]=e[D].toJ().mixedAdd(e[C].neg()));var G=[-3,-1,-5,-7,0,7,5,1,3],ee=o8(t[D],t[C]);for(p=Math.max(ee[0].length,p),f[D]=new Array(p),f[C]=new Array(p),b=0;b=0;d--){for(var z=0;d>=0;){var y=!0;for(b=0;b=0&&z++,q=q.dblp(z),d<0)break;for(b=0;b0?E=u[b][T-1>>1]:T<0&&(E=u[b][-T-1>>1].neg()),E.type==="affine"?q=q.mixedAdd(E):q=q.add(E))}}for(d=0;d=Math.ceil((r.bitLength()+1)/e.step):!1},yi.prototype._getDoubles=function(r,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],i=this,s=0;s=0&&(x=p,D=d),b.negative&&(b=b.neg(),E=E.neg()),x.negative&&(x=x.neg(),D=D.neg()),[{a:b,b:E},{a:x,b:D}]},Ai.prototype._endoSplit=function(r){var e=this.endo.basis,t=e[0],i=e[1],s=i.b.mul(r).divRound(this.n),a=t.b.neg().mul(r).divRound(this.n),u=s.mul(t.a),f=a.mul(i.a),p=s.mul(t.b),d=a.mul(i.b),b=r.sub(u).sub(f),E=p.add(d).neg();return{k1:b,k2:E}},Ai.prototype.pointFromX=function(r,e){r=new nt(r,16),r.red||(r=r.toRed(this.red));var t=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b),i=t.redSqrt();if(i.redSqr().redSub(t).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(e&&!s||!e&&s)&&(i=i.redNeg()),this.point(r,i)},Ai.prototype.validate=function(r){if(r.inf)return!0;var e=r.x,t=r.y,i=this.a.redMul(e),s=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return t.redSqr().redISub(s).cmpn(0)===0},Ai.prototype._endoWnafMulAdd=function(r,e,t){for(var i=this._endoWnafT1,s=this._endoWnafT2,a=0;a":""},ur.prototype.isInfinity=function(){return this.inf},ur.prototype.add=function(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(this.x.cmp(r.x)===0)return this.curve.point(null,null);var e=this.y.redSub(r.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(r.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(r.x),i=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,i)},ur.prototype.dbl=function(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(r.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),i=r.redInvm(),s=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(i),a=s.redSqr().redISub(this.x.redAdd(this.x)),u=s.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,u)},ur.prototype.getX=function(){return this.x.fromRed()},ur.prototype.getY=function(){return this.y.fromRed()},ur.prototype.mul=function(r){return r=new nt(r,16),this.isInfinity()?this:this._hasDoubles(r)?this.curve._fixedNafMul(this,r):this.curve.endo?this.curve._endoWnafMulAdd([this],[r]):this.curve._wnafMul(this,r)},ur.prototype.mulAdd=function(r,e,t){var i=[this,e],s=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},ur.prototype.jmulAdd=function(r,e,t){var i=[this,e],s=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)},ur.prototype.eq=function(r){return this===r||this.inf===r.inf&&(this.inf||this.x.cmp(r.x)===0&&this.y.cmp(r.y)===0)},ur.prototype.neg=function(r){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var t=this.precomputed,i=function(s){return s.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e},ur.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var r=this.curve.jpoint(this.x,this.y,this.curve.one);return r};function fr(r,e,t,i){Ds.BasePoint.call(this,r,"jacobian"),e===null&&t===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new nt(0)):(this.x=new nt(e,16),this.y=new nt(t,16),this.z=new nt(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Gl(fr,Ds.BasePoint),Ai.prototype.jpoint=function(r,e,t){return new fr(this,r,e,t)},fr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm(),e=r.redSqr(),t=this.x.redMul(e),i=this.y.redMul(e).redMul(r);return this.curve.point(t,i)},fr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},fr.prototype.add=function(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var e=r.z.redSqr(),t=this.z.redSqr(),i=this.x.redMul(e),s=r.x.redMul(t),a=this.y.redMul(e.redMul(r.z)),u=r.y.redMul(t.redMul(this.z)),f=i.redSub(s),p=a.redSub(u);if(f.cmpn(0)===0)return p.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var d=f.redSqr(),b=d.redMul(f),E=i.redMul(d),x=p.redSqr().redIAdd(b).redISub(E).redISub(E),D=p.redMul(E.redISub(x)).redISub(a.redMul(b)),C=this.z.redMul(r.z).redMul(f);return this.curve.jpoint(x,D,C)},fr.prototype.mixedAdd=function(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var e=this.z.redSqr(),t=this.x,i=r.x.redMul(e),s=this.y,a=r.y.redMul(e).redMul(this.z),u=t.redSub(i),f=s.redSub(a);if(u.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var p=u.redSqr(),d=p.redMul(u),b=t.redMul(p),E=f.redSqr().redIAdd(d).redISub(b).redISub(b),x=f.redMul(b.redISub(E)).redISub(s.redMul(d)),D=this.z.redMul(u);return this.curve.jpoint(E,x,D)},fr.prototype.dblp=function(r){if(r===0)return this;if(this.isInfinity())return this;if(!r)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var t=this;for(e=0;e=0)return!1;if(t.redIAdd(s),this.x.cmp(t)===0)return!0}},fr.prototype.inspect=function(){return this.isInfinity()?"":""},fr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Bc=vo(function(r,e){var t=e;t.base=Ds,t.short=c8,t.mont=null,t.edwards=null}),Lc=vo(function(r,e){var t=e,i=ri.assert;function s(f){f.type==="short"?this.curve=new Bc.short(f):f.type==="edwards"?this.curve=new Bc.edwards(f):this.curve=new Bc.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=s;function a(f,p){Object.defineProperty(t,f,{configurable:!0,enumerable:!0,get:function(){var d=new s(p);return Object.defineProperty(t,f,{configurable:!0,enumerable:!0,value:d}),d}})}a("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:Yi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:Yi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:Yi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:Yi.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"]}),a("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:Yi.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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Yi.sha256,gRed:!1,g:["9"]}),a("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:Yi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=null.crash()}catch{u=void 0}a("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:Yi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})});function Gn(r){if(!(this instanceof Gn))return new Gn(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Li.toArray(r.entropy,r.entropyEnc||"hex"),t=Li.toArray(r.nonce,r.nonceEnc||"hex"),i=Li.toArray(r.pers,r.persEnc||"hex");Vl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,i)}var Q0=Gn;Gn.prototype._init=function(r,e,t){var i=r.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(r.concat(t||[])),this._reseed=1},Gn.prototype.generate=function(r,e,t,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(i=t,t=e,e=null),t&&(t=Li.toArray(t,i||"hex"),this._update(t));for(var s=[];s.length"};var u8=ri.assert;function hu(r,e){if(r instanceof hu)return r;this._importDER(r,e)||(u8(r.r&&r.s,"Signature without r or s"),this.r=new nt(r.r,16),this.s=new nt(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var xc=hu;function h8(){this.place=0}function Hh(r,e){var t=r[e.place++];if(!(t&128))return t;var i=t&15;if(i===0||i>4)return!1;for(var s=0,a=0,u=e.place;a>>=0;return s<=127?!1:(e.place=u,s)}function W0(r){for(var e=0,t=r.length-1;!r[e]&&!(r[e+1]&128)&&e>>3);for(r.push(t|128);--t;)r.push(e>>>(t<<3)&255);r.push(e)}hu.prototype.toDER=function(r){var e=this.r.toArray(),t=this.s.toArray();for(e[0]&128&&(e=[0].concat(e)),t[0]&128&&(t=[0].concat(t)),e=W0(e),t=W0(t);!t[0]&&!(t[1]&128);)t=t.slice(1);var i=[2];Kh(i,e.length),i=i.concat(e),i.push(2),Kh(i,t.length);var s=i.concat(t),a=[48];return Kh(a,s.length),a=a.concat(s),ri.encode(a,r)};var l8=function(){throw new Error("unsupported")},x1=ri.assert;function _i(r){if(!(this instanceof _i))return new _i(r);typeof r=="string"&&(x1(Object.prototype.hasOwnProperty.call(Lc,r),"Unknown curve "+r),r=Lc[r]),r instanceof Lc.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var f8=_i;_i.prototype.keyPair=function(r){return new kh(this,r)},_i.prototype.keyFromPrivate=function(r,e){return kh.fromPrivate(this,r,e)},_i.prototype.keyFromPublic=function(r,e){return kh.fromPublic(this,r,e)},_i.prototype.genKeyPair=function(r){r||(r={});for(var e=new Q0({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||l8(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),i=this.n.sub(new nt(2));;){var s=new nt(e.generate(t));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},_i.prototype._truncateToN=function(r,e){var t=r.byteLength()*8-this.n.bitLength();return t>0&&(r=r.ushrn(t)),!e&&r.cmp(this.n)>=0?r.sub(this.n):r},_i.prototype.sign=function(r,e,t,i){typeof t=="object"&&(i=t,t=null),i||(i={}),e=this.keyFromPrivate(e,t),r=this._truncateToN(new nt(r,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=r.toArray("be",s),f=new Q0({hash:this.hash,entropy:a,nonce:u,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new nt(1)),d=0;;d++){var b=i.k?i.k(d):new nt(f.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var E=this.g.mul(b);if(!E.isInfinity()){var x=E.getX(),D=x.umod(this.n);if(D.cmpn(0)!==0){var C=b.invm(this.n).mul(D.mul(e.getPrivate()).iadd(r));if(C=C.umod(this.n),C.cmpn(0)!==0){var Q=(E.getY().isOdd()?1:0)|(x.cmp(D)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),Q^=1),new xc({r:D,s:C,recoveryParam:Q})}}}}}},_i.prototype.verify=function(r,e,t,i){r=this._truncateToN(new nt(r,16)),t=this.keyFromPublic(t,i),e=new xc(e,"hex");var s=e.r,a=e.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var u=a.invm(this.n),f=u.mul(r).umod(this.n),p=u.mul(s).umod(this.n),d;return this.curve._maxwellTrick?(d=this.g.jmulAdd(f,t.getPublic(),p),d.isInfinity()?!1:d.eqXToP(s)):(d=this.g.mulAdd(f,t.getPublic(),p),d.isInfinity()?!1:d.getX().umod(this.n).cmp(s)===0)},_i.prototype.recoverPubKey=function(r,e,t,i){x1((3&t)===t,"The recovery param is more than two bits"),e=new xc(e,i);var s=this.n,a=new nt(r),u=e.r,f=e.s,p=t&1,d=t>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");d?u=this.curve.pointFromX(u.add(this.curve.n),p):u=this.curve.pointFromX(u,p);var b=e.r.invm(s),E=s.sub(a).mul(b).umod(s),x=f.mul(b).umod(s);return this.g.mulAdd(E,u,x)},_i.prototype.getKeyRecoveryParam=function(r,e,t,i){if(e=new xc(e,i),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var a;try{a=this.recoverPubKey(r,e,s)}catch{continue}if(a.eq(t))return s}throw new Error("Unable to find valid recovery factor")};var d8=vo(function(r,e){var t=e;t.version="6.5.4",t.utils=ri,t.rand=function(){throw new Error("unsupported")},t.curve=Bc,t.curves=Lc,t.ec=f8,t.eddsa=null}),p8=d8.ec;const g8="signing-key/5.7.0",Al=new gr(g8);let Vh=null;function Hn(){return Vh||(Vh=new p8("secp256k1")),Vh}class m8{constructor(e){Fo(this,"curve","secp256k1"),Fo(this,"privateKey",$r(e)),ZE(this.privateKey)!==32&&Al.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Hn().keyFromPrivate(Yt(this.privateKey));Fo(this,"publicKey","0x"+t.getPublic(!1,"hex")),Fo(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Fo(this,"_isSigningKey",!0)}_addPoint(e){const t=Hn().keyFromPublic(Yt(this.publicKey)),i=Hn().keyFromPublic(Yt(e));return"0x"+t.pub.add(i.pub).encodeCompressed("hex")}signDigest(e){const t=Hn().keyFromPrivate(Yt(this.privateKey)),i=Yt(e);i.length!==32&&Al.throwArgumentError("bad digest length","digest",e);const s=t.sign(i,{canonical:!0});return Xg({recoveryParam:s.recoveryParam,r:en("0x"+s.r.toString(16),32),s:en("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const t=Hn().keyFromPrivate(Yt(this.privateKey)),i=Hn().keyFromPublic(Yt(M1(e)));return en("0x"+t.derive(i.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function v8(r,e){const t=Xg(e),i={r:Yt(t.r),s:Yt(t.s)};return"0x"+Hn().recoverPubKey(Yt(r),i,t.recoveryParam).encode("hex",!1)}function M1(r,e){const t=Yt(r);return t.length===32?new m8(t).publicKey:t.length===33?"0x"+Hn().keyFromPublic(t).getPublic(!1,"hex"):t.length===65?$r(t):Al.throwArgumentError("invalid public or private key","key","[REDACTED]")}var J0;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(J0||(J0={}));function y8(r){const e=M1(r);return C5(B0(kl(B0(e,1)),12))}function w8(r,e){return y8(v8(Yt(r),e))}const b8="https://rpc.walletconnect.com/v1";async function _8(r,e,t,i,s,a){switch(t.t){case"eip191":return E8(r,e,t.s);case"eip1271":return await A8(r,e,t.s,i,s,a);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}function E8(r,e,t){return w8(a1(e),t).toLowerCase()===r.toLowerCase()}async function A8(r,e,t,i,s,a){try{const u="0x1626ba7e",f="0000000000000000000000000000000000000000000000000000000000000040",p="0000000000000000000000000000000000000000000000000000000000000041",d=t.substring(2),b=a1(e).substring(2),E=u+b+f+p+d,x=await fetch(`${a||b8}/?chainId=${i}&projectId=${s}`,{method:"POST",body:JSON.stringify({id:S8(),jsonrpc:"2.0",method:"eth_call",params:[{to:r,data:E},"latest"]})}),{result:D}=await x.json();return D?D.slice(0,u.length).toLowerCase()===u.toLowerCase():!1}catch(u){return console.error("isValidEip1271Signature: ",u),!1}}function S8(){return Date.now()+Math.floor(Math.random()*1e3)}var I8=Object.defineProperty,D8=Object.defineProperties,x8=Object.getOwnPropertyDescriptors,X0=Object.getOwnPropertySymbols,M8=Object.prototype.hasOwnProperty,C8=Object.prototype.propertyIsEnumerable,Z0=(r,e,t)=>e in r?I8(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,P8=(r,e)=>{for(var t in e||(e={}))M8.call(e,t)&&Z0(r,t,e[t]);if(X0)for(var t of X0(e))C8.call(e,t)&&Z0(r,t,e[t]);return r},O8=(r,e)=>D8(r,x8(e));const N8="did:pkh:",Yl=r=>r==null?void 0:r.split(":"),C1=r=>{const e=r&&Yl(r);if(e)return r.includes(N8)?e[3]:e[1]},ep=r=>{const e=r&&Yl(r);if(e)return e[2]+":"+e[3]},Qc=r=>{const e=r&&Yl(r);if(e)return e.pop()};async function tp(r){const{cacao:e,projectId:t}=r,{s:i,p:s}=e,a=P1(s,s.iss),u=Qc(s.iss);return await _8(u,a,i,C1(s.iss),t)}const P1=(r,e)=>{const t=`${r.domain} wants you to sign in with your Ethereum account:`,i=Qc(e);if(!r.aud&&!r.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let s=r.statement||void 0;const a=`URI: ${r.aud||r.uri}`,u=`Version: ${r.version}`,f=`Chain ID: ${C1(e)}`,p=`Nonce: ${r.nonce}`,d=`Issued At: ${r.iat}`,b=r.exp?`Expiration Time: ${r.exp}`:void 0,E=r.nbf?`Not Before: ${r.nbf}`:void 0,x=r.requestId?`Request ID: ${r.requestId}`:void 0,D=r.resources?`Resources:${r.resources.map(Q=>` +- ${Q}`).join("")}`:void 0,C=qc(r.resources);if(C){const Q=sa(C);s=$8(s,Q)}return[t,i,"",s,"",a,u,f,p,d,b,E,x,D].filter(Q=>Q!=null).join(` +`)};function R8(r){return Buffer.from(JSON.stringify(r)).toString("base64")}function T8(r){return JSON.parse(Buffer.from(r,"base64").toString("utf-8"))}function Ss(r){if(!r)throw new Error("No recap provided, value is undefined");if(!r.att)throw new Error("No `att` property found");const e=Object.keys(r.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(t=>{const i=r.att[t];if(Array.isArray(i))throw new Error(`Resource must be an object: ${t}`);if(typeof i!="object")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(i).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(i).forEach(s=>{const a=i[s];if(!Array.isArray(a))throw new Error(`Ability limits ${s} must be an array of objects, found: ${a}`);if(!a.length)throw new Error(`Value of ${s} is empty array, must be an array with objects`);a.forEach(u=>{if(typeof u!="object")throw new Error(`Ability limits (${s}) must be an array of objects, found: ${u}`)})})})}function U8(r,e,t,i={}){return t==null||t.sort((s,a)=>s.localeCompare(a)),{att:{[r]:B8(e,t,i)}}}function B8(r,e,t={}){e=e==null?void 0:e.sort((s,a)=>s.localeCompare(a));const i=e.map(s=>({[`${r}/${s}`]:[t]}));return Object.assign({},...i)}function O1(r){return Ss(r),`urn:recap:${R8(r).replace(/=/g,"")}`}function sa(r){const e=T8(r.replace("urn:recap:",""));return Ss(e),e}function L8(r,e,t){const i=U8(r,e,t);return O1(i)}function q8(r){return r&&r.includes("urn:recap:")}function j8(r,e){const t=sa(r),i=sa(e),s=F8(t,i);return O1(s)}function F8(r,e){Ss(r),Ss(e);const t=Object.keys(r.att).concat(Object.keys(e.att)).sort((s,a)=>s.localeCompare(a)),i={att:{}};return t.forEach(s=>{var a,u;Object.keys(((a=r.att)==null?void 0:a[s])||{}).concat(Object.keys(((u=e.att)==null?void 0:u[s])||{})).sort((f,p)=>f.localeCompare(p)).forEach(f=>{var p,d;i.att[s]=O8(P8({},i.att[s]),{[f]:((p=r.att[s])==null?void 0:p[f])||((d=e.att[s])==null?void 0:d[f])})})}),i}function $8(r="",e){Ss(e);const t="I further authorize the stated URI to perform the following actions on my behalf: ";if(r.includes(t))return r;const i=[];let s=0;Object.keys(e.att).forEach(f=>{const p=Object.keys(e.att[f]).map(E=>({ability:E.split("/")[0],action:E.split("/")[1]}));p.sort((E,x)=>E.action.localeCompare(x.action));const d={};p.forEach(E=>{d[E.ability]||(d[E.ability]=[]),d[E.ability].push(E.action)});const b=Object.keys(d).map(E=>(s++,`(${s}) '${E}': '${d[E].join("', '")}' for '${f}'.`));i.push(b.join(", ").replace(".,","."))});const a=i.join(" "),u=`${t}${a}`;return`${r?r+" ":""}${u}`}function rp(r){var e;const t=sa(r);Ss(t);const i=(e=t.att)==null?void 0:e.eip155;return i?Object.keys(i).map(s=>s.split("/")[1]):[]}function ip(r){const e=sa(r);Ss(e);const t=[];return Object.values(e.att).forEach(i=>{Object.values(i).forEach(s=>{var a;(a=s==null?void 0:s[0])!=null&&a.chains&&t.push(s[0].chains)})}),[...new Set(t.flat())]}function qc(r){if(!r)return;const e=r==null?void 0:r[r.length-1];return q8(e)?e:void 0}const N1="base10",Pr="base16",Sl="base64pad",Ql="utf8",R1=0,Dn=1,z8=0,np=1,Il=12,Wl=32;function k8(){const r=zl.generateKeyPair();return{privateKey:Or(r.secretKey,Pr),publicKey:Or(r.publicKey,Pr)}}function Dl(){const r=ho.randomBytes(Wl);return Or(r,Pr)}function H8(r,e){const t=zl.sharedKey(Hr(r,Pr),Hr(e,Pr),!0),i=new A_(cu.SHA256,t).expand(Wl);return Or(i,Pr)}function jc(r){const e=cu.hash(Hr(r,Pr));return Or(e,Pr)}function _s(r){const e=cu.hash(Hr(r,Ql));return Or(e,Pr)}function K8(r){return Hr(`${r}`,N1)}function pa(r){return Number(Or(r,N1))}function V8(r){const e=K8(typeof r.type<"u"?r.type:R1);if(pa(e)===Dn&&typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof r.senderPublicKey<"u"?Hr(r.senderPublicKey,Pr):void 0,i=typeof r.iv<"u"?Hr(r.iv,Pr):ho.randomBytes(Il),s=new Fl.ChaCha20Poly1305(Hr(r.symKey,Pr)).seal(i,Hr(r.message,Ql));return Y8({type:e,sealed:s,iv:i,senderPublicKey:t})}function G8(r){const e=new Fl.ChaCha20Poly1305(Hr(r.symKey,Pr)),{sealed:t,iv:i}=Wc(r.encoded),s=e.open(i,t);if(s===null)throw new Error("Failed to decrypt");return Or(s,Ql)}function Y8(r){if(pa(r.type)===Dn){if(typeof r.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Or(vl([r.type,r.senderPublicKey,r.iv,r.sealed]),Sl)}return Or(vl([r.type,r.iv,r.sealed]),Sl)}function Wc(r){const e=Hr(r,Sl),t=e.slice(z8,np),i=np;if(pa(t)===Dn){const f=i+Wl,p=f+Il,d=e.slice(i,f),b=e.slice(f,p),E=e.slice(p);return{type:t,sealed:E,iv:b,senderPublicKey:d}}const s=i+Il,a=e.slice(i,s),u=e.slice(s);return{type:t,sealed:u,iv:a}}function Q8(r,e){const t=Wc(r);return T1({type:pa(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?Or(t.senderPublicKey,Pr):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function T1(r){const e=(r==null?void 0:r.type)||R1;if(e===Dn){if(typeof(r==null?void 0:r.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(r==null?void 0:r.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:r==null?void 0:r.senderPublicKey,receiverPublicKey:r==null?void 0:r.receiverPublicKey}}function sp(r){return r.type===Dn&&typeof r.senderPublicKey=="string"&&typeof r.receiverPublicKey=="string"}const W8="irn";function xl(r){return(r==null?void 0:r.relay)||{protocol:W8}}function Yo(r){const e=xE[r];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${r}`);return e}var J8=Object.defineProperty,X8=Object.defineProperties,Z8=Object.getOwnPropertyDescriptors,op=Object.getOwnPropertySymbols,eS=Object.prototype.hasOwnProperty,tS=Object.prototype.propertyIsEnumerable,ap=(r,e,t)=>e in r?J8(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,cp=(r,e)=>{for(var t in e||(e={}))eS.call(e,t)&&ap(r,t,e[t]);if(op)for(var t of op(e))tS.call(e,t)&&ap(r,t,e[t]);return r},rS=(r,e)=>X8(r,Z8(e));function iS(r,e="-"){const t={},i="relay"+e;return Object.keys(r).forEach(s=>{if(s.startsWith(i)){const a=s.replace(i,""),u=r[s];t[a]=u}}),t}function up(r){r=r.includes("wc://")?r.replace("wc://",""):r,r=r.includes("wc:")?r.replace("wc:",""):r;const e=r.indexOf(":"),t=r.indexOf("?")!==-1?r.indexOf("?"):void 0,i=r.substring(0,e),s=r.substring(e+1,t).split("@"),a=typeof t<"u"?r.substring(t):"",u=ra.parse(a),f=typeof u.methods=="string"?u.methods.split(","):void 0;return{protocol:i,topic:nS(s[0]),version:parseInt(s[1],10),symKey:u.symKey,relay:iS(u),methods:f,expiryTimestamp:u.expiryTimestamp?parseInt(u.expiryTimestamp,10):void 0}}function nS(r){return r.startsWith("//")?r.substring(2):r}function sS(r,e="-"){const t="relay",i={};return Object.keys(r).forEach(s=>{const a=t+e+s;r[s]&&(i[a]=r[s])}),i}function oS(r){return`${r.protocol}:${r.topic}@${r.version}?`+ra.stringify(cp(rS(cp({symKey:r.symKey},sS(r.relay)),{expiryTimestamp:r.expiryTimestamp}),r.methods?{methods:r.methods.join(",")}:{}))}function yo(r){const e=[];return r.forEach(t=>{const[i,s]=t.split(":");e.push(`${i}:${s}`)}),e}function aS(r){const e=[];return Object.values(r).forEach(t=>{e.push(...yo(t.accounts))}),e}function cS(r,e){const t=[];return Object.values(r).forEach(i=>{yo(i.accounts).includes(e)&&t.push(...i.methods)}),t}function uS(r,e){const t=[];return Object.values(r).forEach(i=>{yo(i.accounts).includes(e)&&t.push(...i.events)}),t}function Jl(r){return r.includes(":")}function Qo(r){return Jl(r)?r.split(":")[0]:r}function hS(r){const e={};return r==null||r.forEach(t=>{const[i,s]=t.split(":");e[i]||(e[i]={accounts:[],chains:[],events:[]}),e[i].accounts.push(t),e[i].chains.push(`${i}:${s}`)}),e}function hp(r,e){e=e.map(i=>i.replace("did:pkh:",""));const t=hS(e);for(const[i,s]of Object.entries(t))s.methods?s.methods=Tc(s.methods,r):s.methods=r,s.events=["chainChanged","accountsChanged"];return t}const lS={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}},fS={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 ge(r,e){const{message:t,code:i}=fS[r];return{message:e?`${t} ${e}`:t,code:i}}function Nt(r,e){const{message:t,code:i}=lS[r];return{message:e?`${t} ${e}`:t,code:i}}function on(r,e){return!!Array.isArray(r)}function oa(r){return Object.getPrototypeOf(r)===Object.prototype&&Object.keys(r).length}function zr(r){return typeof r>"u"}function Zt(r,e){return e&&zr(r)?!0:typeof r=="string"&&!!r.trim().length}function Xl(r,e){return typeof r=="number"&&!isNaN(r)}function dS(r,e){const{requiredNamespaces:t}=e,i=Object.keys(r.namespaces),s=Object.keys(t);let a=!0;return bs(s,i)?(i.forEach(u=>{const{accounts:f,methods:p,events:d}=r.namespaces[u],b=yo(f),E=t[u];(!bs(Hg(u,E),b)||!bs(E.methods,p)||!bs(E.events,d))&&(a=!1)}),a):!1}function Jc(r){return Zt(r,!1)&&r.includes(":")?r.split(":").length===2:!1}function pS(r){if(Zt(r,!1)&&r.includes(":")){const e=r.split(":");if(e.length===3){const t=e[0]+":"+e[1];return!!e[2]&&Jc(t)}}return!1}function gS(r){if(Zt(r,!1))try{return typeof new URL(r)<"u"}catch{return!1}return!1}function mS(r){var e;return(e=r==null?void 0:r.proposer)==null?void 0:e.publicKey}function vS(r){return r==null?void 0:r.topic}function yS(r,e){let t=null;return Zt(r==null?void 0:r.publicKey,!1)||(t=ge("MISSING_OR_INVALID",`${e} controller public key should be a string`)),t}function lp(r){let e=!0;return on(r)?r.length&&(e=r.every(t=>Zt(t,!1))):e=!1,e}function wS(r,e,t){let i=null;return on(e)&&e.length?e.forEach(s=>{i||Jc(s)||(i=Nt("UNSUPPORTED_CHAINS",`${t}, chain ${s} should be a string and conform to "namespace:chainId" format`))}):Jc(r)||(i=Nt("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),i}function bS(r,e,t){let i=null;return Object.entries(r).forEach(([s,a])=>{if(i)return;const u=wS(s,Hg(s,a),`${e} ${t}`);u&&(i=u)}),i}function _S(r,e){let t=null;return on(r)?r.forEach(i=>{t||pS(i)||(t=Nt("UNSUPPORTED_ACCOUNTS",`${e}, account ${i} should be a string and conform to "namespace:chainId:address" format`))}):t=Nt("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function ES(r,e){let t=null;return Object.values(r).forEach(i=>{if(t)return;const s=_S(i==null?void 0:i.accounts,`${e} namespace`);s&&(t=s)}),t}function AS(r,e){let t=null;return lp(r==null?void 0:r.methods)?lp(r==null?void 0:r.events)||(t=Nt("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):t=Nt("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),t}function U1(r,e){let t=null;return Object.values(r).forEach(i=>{if(t)return;const s=AS(i,`${e}, namespace`);s&&(t=s)}),t}function SS(r,e,t){let i=null;if(r&&oa(r)){const s=U1(r,e);s&&(i=s);const a=bS(r,e,t);a&&(i=a)}else i=ge("MISSING_OR_INVALID",`${e}, ${t} should be an object with data`);return i}function Gh(r,e){let t=null;if(r&&oa(r)){const i=U1(r,e);i&&(t=i);const s=ES(r,e);s&&(t=s)}else t=ge("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return t}function B1(r){return Zt(r.protocol,!0)}function IS(r,e){let t=!1;return r?r&&on(r)&&r.length&&r.forEach(i=>{t=B1(i)}):t=!0,t}function DS(r){return typeof r=="number"}function Fr(r){return typeof r<"u"&&typeof r!==null}function xS(r){return!(!r||typeof r!="object"||!r.code||!Xl(r.code)||!r.message||!Zt(r.message,!1))}function MS(r){return!(zr(r)||!Zt(r.method,!1))}function CS(r){return!(zr(r)||zr(r.result)&&zr(r.error)||!Xl(r.id)||!Zt(r.jsonrpc,!1))}function PS(r){return!(zr(r)||!Zt(r.name,!1))}function fp(r,e){return!(!Jc(e)||!aS(r).includes(e))}function OS(r,e,t){return Zt(t,!1)?cS(r,e).includes(t):!1}function NS(r,e,t){return Zt(t,!1)?uS(r,e).includes(t):!1}function dp(r,e,t){let i=null;const s=RS(r),a=TS(e),u=Object.keys(s),f=Object.keys(a),p=pp(Object.keys(r)),d=pp(Object.keys(e)),b=p.filter(E=>!d.includes(E));return b.length&&(i=ge("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. + Required: ${b.toString()} + Received: ${Object.keys(e).toString()}`)),bs(u,f)||(i=ge("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. + Required: ${u.toString()} + Approved: ${f.toString()}`)),Object.keys(e).forEach(E=>{if(!E.includes(":")||i)return;const x=yo(e[E].accounts);x.includes(E)||(i=ge("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${E} + Required: ${E} + Approved: ${x.toString()}`))}),u.forEach(E=>{i||(bs(s[E].methods,a[E].methods)?bs(s[E].events,a[E].events)||(i=ge("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${E}`)):i=ge("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${E}`))}),i}function RS(r){const e={};return Object.keys(r).forEach(t=>{var i;t.includes(":")?e[t]=r[t]:(i=r[t].chains)==null||i.forEach(s=>{e[s]={methods:r[t].methods,events:r[t].events}})}),e}function pp(r){return[...new Set(r.map(e=>e.includes(":")?e.split(":")[0]:e))]}function TS(r){const e={};return Object.keys(r).forEach(t=>{if(t.includes(":"))e[t]=r[t];else{const i=yo(r[t].accounts);i==null||i.forEach(s=>{e[s]={accounts:r[t].accounts.filter(a=>a.includes(`${s}:`)),methods:r[t].methods,events:r[t].events}})}}),e}function US(r,e){return Xl(r)&&r<=e.max&&r>=e.min}function gp(){const r=fa();return new Promise(e=>{switch(r){case ei.browser:e(BS());break;case ei.reactNative:e(LS());break;case ei.node:e(qS());break;default:e(!0)}})}function BS(){return fo()&&(navigator==null?void 0:navigator.onLine)}async function LS(){if(lo()&&typeof global<"u"&&global!=null&&global.NetInfo){const r=await(global==null?void 0:global.NetInfo.fetch());return r==null?void 0:r.isConnected}return!0}function qS(){return!0}function jS(r){switch(fa()){case ei.browser:FS(r);break;case ei.reactNative:$S(r);break}}function FS(r){!lo()&&fo()&&(window.addEventListener("online",()=>r(!0)),window.addEventListener("offline",()=>r(!1)))}function $S(r){lo()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>r(e==null?void 0:e.isConnected)))}const Yh={};class ko{static get(e){return Yh[e]}static set(e,t){Yh[e]=t}static delete(e){delete Yh[e]}}const zS=/"(?:_|\\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*:/,kS=/"(?: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*:/,HS=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function KS(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){VS(r);return}return e}function VS(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function Mc(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!HS.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(zS.test(r)||kS.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,KS)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function GS(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function hr(r,...e){try{return GS(r(...e))}catch(t){return Promise.reject(t)}}function YS(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function QS(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function Fc(r){if(YS(r))return String(r);if(QS(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return Fc(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function L1(){if(typeof Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ml="base64:";function WS(r){if(typeof r=="string")return r;L1();const e=Buffer.from(r).toString("base64");return Ml+e}function JS(r){return typeof r!="string"||!r.startsWith(Ml)?r:(L1(),Buffer.from(r.slice(Ml.length),"base64"))}function jr(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function XS(...r){return jr(r.join(":"))}function Cc(r){return r=jr(r),r?r+":":""}const ZS="memory",eI=()=>{const r=new Map;return{name:ZS,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function tI(r={}){const e={mounts:{"":r.driver||eI()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=d=>{for(const b of e.mountpoints)if(d.startsWith(b))return{base:b,relativeKey:d.slice(b.length),driver:e.mounts[b]};return{base:"",relativeKey:d,driver:e.mounts[""]}},i=(d,b)=>e.mountpoints.filter(E=>E.startsWith(d)||b&&d.startsWith(E)).map(E=>({relativeBase:d.length>E.length?d.slice(E.length):void 0,mountpoint:E,driver:e.mounts[E]})),s=(d,b)=>{if(e.watching){b=jr(b);for(const E of e.watchListeners)E(d,b)}},a=async()=>{if(!e.watching){e.watching=!0;for(const d in e.mounts)e.unwatch[d]=await mp(e.mounts[d],s,d)}},u=async()=>{if(e.watching){for(const d in e.unwatch)await e.unwatch[d]();e.unwatch={},e.watching=!1}},f=(d,b,E)=>{const x=new Map,D=C=>{let Q=x.get(C.base);return Q||(Q={driver:C.driver,base:C.base,items:[]},x.set(C.base,Q)),Q};for(const C of d){const Q=typeof C=="string",G=jr(Q?C:C.key),ee=Q?void 0:C.value,K=Q||!C.options?b:{...b,...C.options},V=t(G);D(V).items.push({key:G,value:ee,relativeKey:V.relativeKey,options:K})}return Promise.all([...x.values()].map(C=>E(C))).then(C=>C.flat())},p={hasItem(d,b={}){d=jr(d);const{relativeKey:E,driver:x}=t(d);return hr(x.hasItem,E,b)},getItem(d,b={}){d=jr(d);const{relativeKey:E,driver:x}=t(d);return hr(x.getItem,E,b).then(D=>Mc(D))},getItems(d,b){return f(d,b,E=>E.driver.getItems?hr(E.driver.getItems,E.items.map(x=>({key:x.relativeKey,options:x.options})),b).then(x=>x.map(D=>({key:XS(E.base,D.key),value:Mc(D.value)}))):Promise.all(E.items.map(x=>hr(E.driver.getItem,x.relativeKey,x.options).then(D=>({key:x.key,value:Mc(D)})))))},getItemRaw(d,b={}){d=jr(d);const{relativeKey:E,driver:x}=t(d);return x.getItemRaw?hr(x.getItemRaw,E,b):hr(x.getItem,E,b).then(D=>JS(D))},async setItem(d,b,E={}){if(b===void 0)return p.removeItem(d);d=jr(d);const{relativeKey:x,driver:D}=t(d);D.setItem&&(await hr(D.setItem,x,Fc(b),E),D.watch||s("update",d))},async setItems(d,b){await f(d,b,async E=>{if(E.driver.setItems)return hr(E.driver.setItems,E.items.map(x=>({key:x.relativeKey,value:Fc(x.value),options:x.options})),b);E.driver.setItem&&await Promise.all(E.items.map(x=>hr(E.driver.setItem,x.relativeKey,Fc(x.value),x.options)))})},async setItemRaw(d,b,E={}){if(b===void 0)return p.removeItem(d,E);d=jr(d);const{relativeKey:x,driver:D}=t(d);if(D.setItemRaw)await hr(D.setItemRaw,x,b,E);else if(D.setItem)await hr(D.setItem,x,WS(b),E);else return;D.watch||s("update",d)},async removeItem(d,b={}){typeof b=="boolean"&&(b={removeMeta:b}),d=jr(d);const{relativeKey:E,driver:x}=t(d);x.removeItem&&(await hr(x.removeItem,E,b),(b.removeMeta||b.removeMata)&&await hr(x.removeItem,E+"$",b),x.watch||s("remove",d))},async getMeta(d,b={}){typeof b=="boolean"&&(b={nativeOnly:b}),d=jr(d);const{relativeKey:E,driver:x}=t(d),D=Object.create(null);if(x.getMeta&&Object.assign(D,await hr(x.getMeta,E,b)),!b.nativeOnly){const C=await hr(x.getItem,E+"$",b).then(Q=>Mc(Q));C&&typeof C=="object"&&(typeof C.atime=="string"&&(C.atime=new Date(C.atime)),typeof C.mtime=="string"&&(C.mtime=new Date(C.mtime)),Object.assign(D,C))}return D},setMeta(d,b,E={}){return this.setItem(d+"$",b,E)},removeMeta(d,b={}){return this.removeItem(d+"$",b)},async getKeys(d,b={}){d=Cc(d);const E=i(d,!0);let x=[];const D=[];for(const C of E){const G=(await hr(C.driver.getKeys,C.relativeBase,b)).map(ee=>C.mountpoint+jr(ee)).filter(ee=>!x.some(K=>ee.startsWith(K)));D.push(...G),x=[C.mountpoint,...x.filter(ee=>!ee.startsWith(C.mountpoint))]}return d?D.filter(C=>C.startsWith(d)&&!C.endsWith("$")):D.filter(C=>!C.endsWith("$"))},async clear(d,b={}){d=Cc(d),await Promise.all(i(d,!1).map(async E=>{if(E.driver.clear)return hr(E.driver.clear,E.relativeBase,b);if(E.driver.removeItem){const x=await E.driver.getKeys(E.relativeBase||"",b);return Promise.all(x.map(D=>E.driver.removeItem(D,b)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(d=>vp(d)))},async watch(d){return await a(),e.watchListeners.push(d),async()=>{e.watchListeners=e.watchListeners.filter(b=>b!==d),e.watchListeners.length===0&&await u()}},async unwatch(){e.watchListeners=[],await u()},mount(d,b){if(d=Cc(d),d&&e.mounts[d])throw new Error(`already mounted at ${d}`);return d&&(e.mountpoints.push(d),e.mountpoints.sort((E,x)=>x.length-E.length)),e.mounts[d]=b,e.watching&&Promise.resolve(mp(b,s,d)).then(E=>{e.unwatch[d]=E}).catch(console.error),p},async unmount(d,b=!0){d=Cc(d),!(!d||!e.mounts[d])&&(e.watching&&d in e.unwatch&&(e.unwatch[d](),delete e.unwatch[d]),b&&await vp(e.mounts[d]),e.mountpoints=e.mountpoints.filter(E=>E!==d),delete e.mounts[d])},getMount(d=""){d=jr(d)+":";const b=t(d);return{driver:b.driver,base:b.base}},getMounts(d="",b={}){return d=jr(d),i(d,b.parents).map(x=>({driver:x.driver,base:x.mountpoint}))}};return p}function mp(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function vp(r){typeof r.dispose=="function"&&await hr(r.dispose)}function xs(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function q1(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=xs(t);return(s,a)=>i.then(u=>a(u.transaction(e,s).objectStore(e)))}let Qh;function ga(){return Qh||(Qh=q1("keyval-store","keyval")),Qh}function yp(r,e=ga()){return e("readonly",t=>xs(t.get(r)))}function rI(r,e,t=ga()){return t("readwrite",i=>(i.put(e,r),xs(i.transaction)))}function iI(r,e=ga()){return e("readwrite",t=>(t.delete(r),xs(t.transaction)))}function nI(r=ga()){return r("readwrite",e=>(e.clear(),xs(e.transaction)))}function sI(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},xs(r.transaction)}function oI(r=ga()){return r("readonly",e=>{if(e.getAllKeys)return xs(e.getAllKeys());const t=[];return sI(e,i=>t.push(i.key)).then(()=>t)})}const aI=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),cI=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function ma(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return cI(r)}catch{return r}}function xn(r){return typeof r=="string"?r:aI(r)||""}const uI="idb-keyval";var hI=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=q1(r.dbName,r.storeName)),{name:uI,options:r,async hasItem(s){return!(typeof await yp(t(s),i)>"u")},async getItem(s){return await yp(t(s),i)??null},setItem(s,a){return rI(t(s),a,i)},removeItem(s){return iI(t(s),i)},getKeys(){return oI(i)},clear(){return nI(i)}}};const lI="WALLET_CONNECT_V2_INDEXED_DB",fI="keyvaluestorage";let dI=class{constructor(){this.indexedDb=tI({driver:hI({dbName:lI,storeName:fI})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,xn(t))}async removeItem(e){await this.indexedDb.removeItem(e)}};var Wh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$c={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Wh<"u"&&Wh.localStorage?$c.exports=Wh.localStorage:typeof window<"u"&&window.localStorage?$c.exports=window.localStorage:$c.exports=new e})();function pI(r){var e;return[r[0],ma((e=r[1])!=null?e:"")]}let gI=class{constructor(){this.localStorage=$c.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(pI)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return ma(t)}async setItem(e,t){this.localStorage.setItem(e,xn(t))}async removeItem(e){this.localStorage.removeItem(e)}};const mI="wc_storage_version",wp=1,vI=async(r,e,t)=>{const i=mI,s=await e.getItem(i);if(s&&s>=wp){t(e);return}const a=await r.getKeys();if(!a.length){t(e);return}const u=[];for(;a.length;){const f=a.shift();if(!f)continue;const p=f.toLowerCase();if(p.includes("wc@")||p.includes("walletconnect")||p.includes("wc_")||p.includes("wallet_connect")){const d=await r.getItem(f);await e.setItem(f,d),u.push(f)}}await e.setItem(i,wp),t(e),yI(r,u)},yI=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let wI=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new gI;this.storage=e;try{const t=new dI;vI(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};class Ms{}let bI=class extends Ms{constructor(e){super()}};const bp=ye.FIVE_SECONDS,va={pulse:"heartbeat_pulse"};let _I=class j1 extends bI{constructor(e){super(e),this.events=new Si.EventEmitter,this.interval=bp,this.interval=(e==null?void 0:e.interval)||bp}static async init(e){const t=new j1(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),ye.toMiliseconds(this.interval))}pulse(){this.events.emit(va.pulse)}};function EI(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}var AI=SI;function SI(r,e,t){var i=t&&t.stringify||EI,s=1;if(typeof r=="object"&&r!==null){var a=e.length+s;if(a===1)return r;var u=new Array(a);u[0]=i(r);for(var f=1;f-1?E:0,r.charCodeAt(D+1)){case 100:case 102:if(b>=p||e[b]==null)break;E=p||e[b]==null)break;E=p||e[b]===void 0)break;E",E=D+2,D++;break}d+=i(e[b]),E=D+2,D++;break;case 115:if(b>=p)break;E-1&&(a=!1);const u=["error","fatal","warn","info","debug","trace"];typeof t=="function"&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),r.enabled===!1&&(r.level="silent");const f=r.level||"info",p=Object.create(t);p.log||(p.log=ca),Object.defineProperty(p,"levelVal",{get:b}),Object.defineProperty(p,"level",{get:E,set:x});const d={transmit:e,serialize:s,asObject:r.browser.asObject,levels:u,timestamp:OI(r)};p.levels=sn.levels,p.level=f,p.setMaxListeners=p.getMaxListeners=p.emit=p.addListener=p.on=p.prependListener=p.once=p.prependOnceListener=p.removeListener=p.removeAllListeners=p.listeners=p.listenerCount=p.eventNames=p.write=p.flush=ca,p.serializers=i,p._serialize=s,p._stdErrSerialize=a,p.child=D,e&&(p._logEvent=Cl());function b(){return this.level==="silent"?1/0:this.levels.values[this.level]}function E(){return this._level}function x(C){if(C!=="silent"&&!this.levels.values[C])throw Error("unknown level "+C);this._level=C,Qs(d,p,"error","log"),Qs(d,p,"fatal","error"),Qs(d,p,"warn","error"),Qs(d,p,"info","log"),Qs(d,p,"debug","log"),Qs(d,p,"trace","log")}function D(C,Q){if(!C)throw new Error("missing bindings for child Pino");Q=Q||{},s&&C.serializers&&(Q.serializers=C.serializers);const G=Q.serializers;if(s&&G){var ee=Object.assign({},i,G),K=r.browser.serialize===!0?Object.keys(ee):s;delete C.serializers,lu([C],K,ee,this._stdErrSerialize)}function V(q){this._childLevel=(q._childLevel|0)+1,this.error=Ws(q,C,"error"),this.fatal=Ws(q,C,"fatal"),this.warn=Ws(q,C,"warn"),this.info=Ws(q,C,"info"),this.debug=Ws(q,C,"debug"),this.trace=Ws(q,C,"trace"),ee&&(this.serializers=ee,this._serialize=K),e&&(this._logEvent=Cl([].concat(q._logEvent.bindings,C)))}return V.prototype=this,new V(this)}return p}sn.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"}};sn.stdSerializers=II;sn.stdTimeFunctions=Object.assign({},{nullTime:F1,epochTime:$1,unixTime:NI,isoTime:RI});function Qs(r,e,t,i){const s=Object.getPrototypeOf(e);e[t]=e.levelVal>e.levels.values[t]?ca:s[t]?s[t]:aa[t]||aa[i]||ca,xI(r,e,t)}function xI(r,e,t){!r.transmit&&e[t]===ca||(e[t]=function(i){return function(){const a=r.timestamp(),u=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===aa?aa:this;for(var p=0;p-1&&a in t&&(r[s][a]=t[a](r[s][a]))}function Ws(r,e,t){return function(){const i=new Array(1+arguments.length);i[0]=e;for(var s=1;sthis.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let t=this.head;for(;t!==null;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const t=e.value;return e=e.next,{done:!1,value:t}}}}},z1=class{constructor(e,t=Zl){this.level=e??"error",this.levelValue=Zs.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new Ep(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===Zs.levels.values.error?console.error(e):t===Zs.levels.values.warn?console.warn(e):t===Zs.levels.values.debug?console.debug(e):t===Zs.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(xn({timestamp:new Date().toISOString(),log:e}));const t=typeof e=="string"?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new Ep(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const t=this.getLogArray();return t.push(xn({extraMetadata:e})),new Blob(t,{type:"application/json"})}},LI=class{constructor(e,t=Zl){this.baseChunkLogger=new z1(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const t=URL.createObjectURL(this.logsToBlob(e)),i=document.createElement("a");i.href=t,i.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}},qI=class{constructor(e,t=Zl){this.baseChunkLogger=new z1(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var jI=Object.defineProperty,FI=Object.defineProperties,$I=Object.getOwnPropertyDescriptors,Ap=Object.getOwnPropertySymbols,zI=Object.prototype.hasOwnProperty,kI=Object.prototype.propertyIsEnumerable,Sp=(r,e,t)=>e in r?jI(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xc=(r,e)=>{for(var t in e||(e={}))zI.call(e,t)&&Sp(r,t,e[t]);if(Ap)for(var t of Ap(e))kI.call(e,t)&&Sp(r,t,e[t]);return r},Zc=(r,e)=>FI(r,$I(e));function fu(r){return Zc(Xc({},r),{level:(r==null?void 0:r.level)||UI.level})}function HI(r,e=wa){return r[e]||""}function KI(r,e,t=wa){return r[t]=e,r}function Vr(r,e=wa){let t="";return typeof r.bindings>"u"?t=HI(r,e):t=r.bindings().context||"",t}function VI(r,e,t=wa){const i=Vr(r,t);return i.trim()?`${i}/${e}`:e}function Gr(r,e,t=wa){const i=VI(r,e,t),s=r.child({context:i});return KI(s,i,t)}function GI(r){var e,t;const i=new LI((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:ya(Zc(Xc({},r.opts),{level:"trace",browser:Zc(Xc({},(t=r.opts)==null?void 0:t.browser),{write:s=>i.write(s)})})),chunkLoggerController:i}}function YI(r){var e;const t=new qI((e=r.opts)==null?void 0:e.level,r.maxSizeInBytes);return{logger:ya(Zc(Xc({},r.opts),{level:"trace"}),t),chunkLoggerController:t}}function QI(r){return typeof r.loggerOverride<"u"&&typeof r.loggerOverride!="string"?{logger:r.loggerOverride,chunkLoggerController:null}:typeof window<"u"?GI(r):YI(r)}let WI=class extends Ms{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},JI=class extends Ms{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}},XI=class{constructor(e,t){this.logger=e,this.core=t}},ZI=class extends Ms{constructor(e,t){super(),this.relayer=e,this.logger=t}},e4=class extends Ms{constructor(e){super()}},t4=class{constructor(e,t,i,s){this.core=e,this.logger=t,this.name=i}},r4=class extends Ms{constructor(e,t){super(),this.relayer=e,this.logger=t}},i4=class extends Ms{constructor(e,t){super(),this.core=e,this.logger=t}},n4=class{constructor(e,t){this.projectId=e,this.logger=t}},s4=class{constructor(e,t){this.projectId=e,this.logger=t}},o4=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},a4=class{constructor(e){this.client=e}};var ef={},k1={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ot,t=ii;r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128;var i=function(){function f(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return f.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){t.wipe(this._buffer),t.wipe(this._tempHi),t.wipe(this._tempLo),this.reset()},f.prototype.update=function(p,d){if(d===void 0&&(d=p.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var b=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=p[b++],d--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(b=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,p,b,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=p[b++],d--;return this},f.prototype.finish=function(p){if(!this._finished){var d=this._bytesHashed,b=this._bufferLength,E=d/536870912|0,x=d<<3,D=d%128<112?128:256;this._buffer[b]=128;for(var C=b+1;C0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(p){return this._stateHi.set(p.stateHi),this._stateLo.set(p.stateLo),this._bufferLength=p.bufferLength,p.buffer&&this._buffer.set(p.buffer),this._bytesHashed=p.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(p){t.wipe(p.stateHi),t.wipe(p.stateLo),p.buffer&&t.wipe(p.buffer),p.bufferLength=0,p.bytesHashed=0},f}();r.SHA512=i;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(f,p,d,b,E,x,D){for(var C=d[0],Q=d[1],G=d[2],ee=d[3],K=d[4],V=d[5],q=d[6],$=d[7],z=b[0],y=b[1],T=b[2],ne=b[3],fe=b[4],le=b[5],me=b[6],l=b[7],h,w,S,M,O,U,I,g;D>=128;){for(var N=0;N<16;N++){var ie=8*N+x;f[N]=e.readUint32BE(E,ie),p[N]=e.readUint32BE(E,ie+4)}for(var N=0;N<80;N++){var de=C,_=Q,Z=G,L=ee,j=K,k=V,m=q,B=$,te=z,ue=y,ae=T,Me=ne,Pe=fe,Ie=le,Et=me,$e=l;if(h=$,w=l,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=(K>>>14|fe<<18)^(K>>>18|fe<<14)^(fe>>>9|K<<23),w=(fe>>>14|K<<18)^(fe>>>18|K<<14)^(K>>>9|fe<<23),O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,h=K&V^~K&q,w=fe&le^~fe&me,O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,h=s[N*2],w=s[N*2+1],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,h=f[N%16],w=p[N%16],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,S=I&65535|g<<16,M=O&65535|U<<16,h=S,w=M,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=(C>>>28|z<<4)^(z>>>2|C<<30)^(z>>>7|C<<25),w=(z>>>28|C<<4)^(C>>>2|z<<30)^(C>>>7|z<<25),O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,h=C&Q^C&G^Q&G,w=z&y^z&T^y&T,O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,B=I&65535|g<<16,$e=O&65535|U<<16,h=L,w=Me,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=S,w=M,O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,L=I&65535|g<<16,Me=O&65535|U<<16,Q=de,G=_,ee=Z,K=L,V=j,q=k,$=m,C=B,y=te,T=ue,ne=ae,fe=Me,le=Pe,me=Ie,l=Et,z=$e,N%16===15)for(var ie=0;ie<16;ie++)h=f[ie],w=p[ie],O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=f[(ie+9)%16],w=p[(ie+9)%16],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,S=f[(ie+1)%16],M=p[(ie+1)%16],h=(S>>>1|M<<31)^(S>>>8|M<<24)^S>>>7,w=(M>>>1|S<<31)^(M>>>8|S<<24)^(M>>>7|S<<25),O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,S=f[(ie+14)%16],M=p[(ie+14)%16],h=(S>>>19|M<<13)^(M>>>29|S<<3)^S>>>6,w=(M>>>19|S<<13)^(S>>>29|M<<3)^(M>>>6|S<<26),O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,f[ie]=I&65535|g<<16,p[ie]=O&65535|U<<16}h=C,w=z,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[0],w=b[0],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[0]=C=I&65535|g<<16,b[0]=z=O&65535|U<<16,h=Q,w=y,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[1],w=b[1],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[1]=Q=I&65535|g<<16,b[1]=y=O&65535|U<<16,h=G,w=T,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[2],w=b[2],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[2]=G=I&65535|g<<16,b[2]=T=O&65535|U<<16,h=ee,w=ne,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[3],w=b[3],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[3]=ee=I&65535|g<<16,b[3]=ne=O&65535|U<<16,h=K,w=fe,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[4],w=b[4],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[4]=K=I&65535|g<<16,b[4]=fe=O&65535|U<<16,h=V,w=le,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[5],w=b[5],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[5]=V=I&65535|g<<16,b[5]=le=O&65535|U<<16,h=q,w=me,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[6],w=b[6],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[6]=q=I&65535|g<<16,b[6]=me=O&65535|U<<16,h=$,w=l,O=w&65535,U=w>>>16,I=h&65535,g=h>>>16,h=d[7],w=b[7],O+=w&65535,U+=w>>>16,I+=h&65535,g+=h>>>16,U+=O>>>16,I+=U>>>16,g+=I>>>16,d[7]=$=I&65535|g<<16,b[7]=l=O&65535|U<<16,x+=128,D-=128}return x}function u(f){var p=new i;p.update(f);var d=p.digest();return p.clean(),d}r.hash=u})(k1);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSecretKeyToX25519=r.convertPublicKeyToX25519=r.verify=r.sign=r.extractPublicKeyFromSecretKey=r.generateKeyPair=r.generateKeyPairFromSeed=r.SEED_LENGTH=r.SECRET_KEY_LENGTH=r.PUBLIC_KEY_LENGTH=r.SIGNATURE_LENGTH=void 0;const e=ho,t=k1,i=ii;r.SIGNATURE_LENGTH=64,r.PUBLIC_KEY_LENGTH=32,r.SECRET_KEY_LENGTH=64,r.SEED_LENGTH=32;function s(L){const j=new Float64Array(16);if(L)for(let k=0;k>16&1),k[ue-1]&=65535;k[15]=m[15]-32767-(k[14]>>16&1);const te=k[15]>>16&1;k[14]&=65535,Q(m,k,1-te)}for(let B=0;B<16;B++)L[2*B]=m[B]&255,L[2*B+1]=m[B]>>8}function ee(L,j){let k=0;for(let m=0;m<32;m++)k|=L[m]^j[m];return(1&k-1>>>8)-1}function K(L,j){const k=new Uint8Array(32),m=new Uint8Array(32);return G(k,L),G(m,j),ee(k,m)}function V(L){const j=new Uint8Array(32);return G(j,L),j[0]&1}function q(L,j){for(let k=0;k<16;k++)L[k]=j[2*k]+(j[2*k+1]<<8);L[15]&=32767}function $(L,j,k){for(let m=0;m<16;m++)L[m]=j[m]+k[m]}function z(L,j,k){for(let m=0;m<16;m++)L[m]=j[m]-k[m]}function y(L,j,k){let m,B,te=0,ue=0,ae=0,Me=0,Pe=0,Ie=0,Et=0,$e=0,xe=0,Le=0,_e=0,Ee=0,Ve=0,we=0,Ae=0,Be=0,be=0,Ce=0,qe=0,Oe=0,Ne=0,st=0,Te=0,Re=0,Ht=0,ct=0,pt=0,Kt=0,yt=0,_t=0,Er=0,Ge=k[0],ze=k[1],It=k[2],Ye=k[3],Ke=k[4],At=k[5],Je=k[6],Xe=k[7],Dt=k[8],Ze=k[9],Qe=k[10],Mt=k[11],We=k[12],je=k[13],Rt=k[14],et=k[15];m=j[0],te+=m*Ge,ue+=m*ze,ae+=m*It,Me+=m*Ye,Pe+=m*Ke,Ie+=m*At,Et+=m*Je,$e+=m*Xe,xe+=m*Dt,Le+=m*Ze,_e+=m*Qe,Ee+=m*Mt,Ve+=m*We,we+=m*je,Ae+=m*Rt,Be+=m*et,m=j[1],ue+=m*Ge,ae+=m*ze,Me+=m*It,Pe+=m*Ye,Ie+=m*Ke,Et+=m*At,$e+=m*Je,xe+=m*Xe,Le+=m*Dt,_e+=m*Ze,Ee+=m*Qe,Ve+=m*Mt,we+=m*We,Ae+=m*je,Be+=m*Rt,be+=m*et,m=j[2],ae+=m*Ge,Me+=m*ze,Pe+=m*It,Ie+=m*Ye,Et+=m*Ke,$e+=m*At,xe+=m*Je,Le+=m*Xe,_e+=m*Dt,Ee+=m*Ze,Ve+=m*Qe,we+=m*Mt,Ae+=m*We,Be+=m*je,be+=m*Rt,Ce+=m*et,m=j[3],Me+=m*Ge,Pe+=m*ze,Ie+=m*It,Et+=m*Ye,$e+=m*Ke,xe+=m*At,Le+=m*Je,_e+=m*Xe,Ee+=m*Dt,Ve+=m*Ze,we+=m*Qe,Ae+=m*Mt,Be+=m*We,be+=m*je,Ce+=m*Rt,qe+=m*et,m=j[4],Pe+=m*Ge,Ie+=m*ze,Et+=m*It,$e+=m*Ye,xe+=m*Ke,Le+=m*At,_e+=m*Je,Ee+=m*Xe,Ve+=m*Dt,we+=m*Ze,Ae+=m*Qe,Be+=m*Mt,be+=m*We,Ce+=m*je,qe+=m*Rt,Oe+=m*et,m=j[5],Ie+=m*Ge,Et+=m*ze,$e+=m*It,xe+=m*Ye,Le+=m*Ke,_e+=m*At,Ee+=m*Je,Ve+=m*Xe,we+=m*Dt,Ae+=m*Ze,Be+=m*Qe,be+=m*Mt,Ce+=m*We,qe+=m*je,Oe+=m*Rt,Ne+=m*et,m=j[6],Et+=m*Ge,$e+=m*ze,xe+=m*It,Le+=m*Ye,_e+=m*Ke,Ee+=m*At,Ve+=m*Je,we+=m*Xe,Ae+=m*Dt,Be+=m*Ze,be+=m*Qe,Ce+=m*Mt,qe+=m*We,Oe+=m*je,Ne+=m*Rt,st+=m*et,m=j[7],$e+=m*Ge,xe+=m*ze,Le+=m*It,_e+=m*Ye,Ee+=m*Ke,Ve+=m*At,we+=m*Je,Ae+=m*Xe,Be+=m*Dt,be+=m*Ze,Ce+=m*Qe,qe+=m*Mt,Oe+=m*We,Ne+=m*je,st+=m*Rt,Te+=m*et,m=j[8],xe+=m*Ge,Le+=m*ze,_e+=m*It,Ee+=m*Ye,Ve+=m*Ke,we+=m*At,Ae+=m*Je,Be+=m*Xe,be+=m*Dt,Ce+=m*Ze,qe+=m*Qe,Oe+=m*Mt,Ne+=m*We,st+=m*je,Te+=m*Rt,Re+=m*et,m=j[9],Le+=m*Ge,_e+=m*ze,Ee+=m*It,Ve+=m*Ye,we+=m*Ke,Ae+=m*At,Be+=m*Je,be+=m*Xe,Ce+=m*Dt,qe+=m*Ze,Oe+=m*Qe,Ne+=m*Mt,st+=m*We,Te+=m*je,Re+=m*Rt,Ht+=m*et,m=j[10],_e+=m*Ge,Ee+=m*ze,Ve+=m*It,we+=m*Ye,Ae+=m*Ke,Be+=m*At,be+=m*Je,Ce+=m*Xe,qe+=m*Dt,Oe+=m*Ze,Ne+=m*Qe,st+=m*Mt,Te+=m*We,Re+=m*je,Ht+=m*Rt,ct+=m*et,m=j[11],Ee+=m*Ge,Ve+=m*ze,we+=m*It,Ae+=m*Ye,Be+=m*Ke,be+=m*At,Ce+=m*Je,qe+=m*Xe,Oe+=m*Dt,Ne+=m*Ze,st+=m*Qe,Te+=m*Mt,Re+=m*We,Ht+=m*je,ct+=m*Rt,pt+=m*et,m=j[12],Ve+=m*Ge,we+=m*ze,Ae+=m*It,Be+=m*Ye,be+=m*Ke,Ce+=m*At,qe+=m*Je,Oe+=m*Xe,Ne+=m*Dt,st+=m*Ze,Te+=m*Qe,Re+=m*Mt,Ht+=m*We,ct+=m*je,pt+=m*Rt,Kt+=m*et,m=j[13],we+=m*Ge,Ae+=m*ze,Be+=m*It,be+=m*Ye,Ce+=m*Ke,qe+=m*At,Oe+=m*Je,Ne+=m*Xe,st+=m*Dt,Te+=m*Ze,Re+=m*Qe,Ht+=m*Mt,ct+=m*We,pt+=m*je,Kt+=m*Rt,yt+=m*et,m=j[14],Ae+=m*Ge,Be+=m*ze,be+=m*It,Ce+=m*Ye,qe+=m*Ke,Oe+=m*At,Ne+=m*Je,st+=m*Xe,Te+=m*Dt,Re+=m*Ze,Ht+=m*Qe,ct+=m*Mt,pt+=m*We,Kt+=m*je,yt+=m*Rt,_t+=m*et,m=j[15],Be+=m*Ge,be+=m*ze,Ce+=m*It,qe+=m*Ye,Oe+=m*Ke,Ne+=m*At,st+=m*Je,Te+=m*Xe,Re+=m*Dt,Ht+=m*Ze,ct+=m*Qe,pt+=m*Mt,Kt+=m*We,yt+=m*je,_t+=m*Rt,Er+=m*et,te+=38*be,ue+=38*Ce,ae+=38*qe,Me+=38*Oe,Pe+=38*Ne,Ie+=38*st,Et+=38*Te,$e+=38*Re,xe+=38*Ht,Le+=38*ct,_e+=38*pt,Ee+=38*Kt,Ve+=38*yt,we+=38*_t,Ae+=38*Er,B=1,m=te+B+65535,B=Math.floor(m/65536),te=m-B*65536,m=ue+B+65535,B=Math.floor(m/65536),ue=m-B*65536,m=ae+B+65535,B=Math.floor(m/65536),ae=m-B*65536,m=Me+B+65535,B=Math.floor(m/65536),Me=m-B*65536,m=Pe+B+65535,B=Math.floor(m/65536),Pe=m-B*65536,m=Ie+B+65535,B=Math.floor(m/65536),Ie=m-B*65536,m=Et+B+65535,B=Math.floor(m/65536),Et=m-B*65536,m=$e+B+65535,B=Math.floor(m/65536),$e=m-B*65536,m=xe+B+65535,B=Math.floor(m/65536),xe=m-B*65536,m=Le+B+65535,B=Math.floor(m/65536),Le=m-B*65536,m=_e+B+65535,B=Math.floor(m/65536),_e=m-B*65536,m=Ee+B+65535,B=Math.floor(m/65536),Ee=m-B*65536,m=Ve+B+65535,B=Math.floor(m/65536),Ve=m-B*65536,m=we+B+65535,B=Math.floor(m/65536),we=m-B*65536,m=Ae+B+65535,B=Math.floor(m/65536),Ae=m-B*65536,m=Be+B+65535,B=Math.floor(m/65536),Be=m-B*65536,te+=B-1+37*(B-1),B=1,m=te+B+65535,B=Math.floor(m/65536),te=m-B*65536,m=ue+B+65535,B=Math.floor(m/65536),ue=m-B*65536,m=ae+B+65535,B=Math.floor(m/65536),ae=m-B*65536,m=Me+B+65535,B=Math.floor(m/65536),Me=m-B*65536,m=Pe+B+65535,B=Math.floor(m/65536),Pe=m-B*65536,m=Ie+B+65535,B=Math.floor(m/65536),Ie=m-B*65536,m=Et+B+65535,B=Math.floor(m/65536),Et=m-B*65536,m=$e+B+65535,B=Math.floor(m/65536),$e=m-B*65536,m=xe+B+65535,B=Math.floor(m/65536),xe=m-B*65536,m=Le+B+65535,B=Math.floor(m/65536),Le=m-B*65536,m=_e+B+65535,B=Math.floor(m/65536),_e=m-B*65536,m=Ee+B+65535,B=Math.floor(m/65536),Ee=m-B*65536,m=Ve+B+65535,B=Math.floor(m/65536),Ve=m-B*65536,m=we+B+65535,B=Math.floor(m/65536),we=m-B*65536,m=Ae+B+65535,B=Math.floor(m/65536),Ae=m-B*65536,m=Be+B+65535,B=Math.floor(m/65536),Be=m-B*65536,te+=B-1+37*(B-1),L[0]=te,L[1]=ue,L[2]=ae,L[3]=Me,L[4]=Pe,L[5]=Ie,L[6]=Et,L[7]=$e,L[8]=xe,L[9]=Le,L[10]=_e,L[11]=Ee,L[12]=Ve,L[13]=we,L[14]=Ae,L[15]=Be}function T(L,j){y(L,j,j)}function ne(L,j){const k=s();let m;for(m=0;m<16;m++)k[m]=j[m];for(m=253;m>=0;m--)T(k,k),m!==2&&m!==4&&y(k,k,j);for(m=0;m<16;m++)L[m]=k[m]}function fe(L,j){const k=s();let m;for(m=0;m<16;m++)k[m]=j[m];for(m=250;m>=0;m--)T(k,k),m!==1&&y(k,k,j);for(m=0;m<16;m++)L[m]=k[m]}function le(L,j){const k=s(),m=s(),B=s(),te=s(),ue=s(),ae=s(),Me=s(),Pe=s(),Ie=s();z(k,L[1],L[0]),z(Ie,j[1],j[0]),y(k,k,Ie),$(m,L[0],L[1]),$(Ie,j[0],j[1]),y(m,m,Ie),y(B,L[3],j[3]),y(B,B,d),y(te,L[2],j[2]),$(te,te,te),z(ue,m,k),z(ae,te,B),$(Me,te,B),$(Pe,m,k),y(L[0],ue,ae),y(L[1],Pe,Me),y(L[2],Me,ae),y(L[3],ue,Pe)}function me(L,j,k){for(let m=0;m<4;m++)Q(L[m],j[m],k)}function l(L,j){const k=s(),m=s(),B=s();ne(B,j[2]),y(k,j[0],B),y(m,j[1],B),G(L,m),L[31]^=V(k)<<7}function h(L,j,k){D(L[0],u),D(L[1],f),D(L[2],f),D(L[3],u);for(let m=255;m>=0;--m){const B=k[m/8|0]>>(m&7)&1;me(L,j,B),le(j,L),le(L,L),me(L,j,B)}}function w(L,j){const k=[s(),s(),s(),s()];D(k[0],b),D(k[1],E),D(k[2],f),y(k[3],b,E),h(L,k,j)}function S(L){if(L.length!==r.SEED_LENGTH)throw new Error(`ed25519: seed must be ${r.SEED_LENGTH} bytes`);const j=(0,t.hash)(L);j[0]&=248,j[31]&=127,j[31]|=64;const k=new Uint8Array(32),m=[s(),s(),s(),s()];w(m,j),l(k,m);const B=new Uint8Array(64);return B.set(L),B.set(k,32),{publicKey:k,secretKey:B}}r.generateKeyPairFromSeed=S;function M(L){const j=(0,e.randomBytes)(32,L),k=S(j);return(0,i.wipe)(j),k}r.generateKeyPair=M;function O(L){if(L.length!==r.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${r.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(L.subarray(32))}r.extractPublicKeyFromSecretKey=O;const U=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 I(L,j){let k,m,B,te;for(m=63;m>=32;--m){for(k=0,B=m-32,te=m-12;B>4)*U[B],k=j[B]>>8,j[B]&=255;for(B=0;B<32;B++)j[B]-=k*U[B];for(m=0;m<32;m++)j[m+1]+=j[m]>>8,L[m]=j[m]&255}function g(L){const j=new Float64Array(64);for(let k=0;k<64;k++)j[k]=L[k];for(let k=0;k<64;k++)L[k]=0;I(L,j)}function N(L,j){const k=new Float64Array(64),m=[s(),s(),s(),s()],B=(0,t.hash)(L.subarray(0,32));B[0]&=248,B[31]&=127,B[31]|=64;const te=new Uint8Array(64);te.set(B.subarray(32),32);const ue=new t.SHA512;ue.update(te.subarray(32)),ue.update(j);const ae=ue.digest();ue.clean(),g(ae),w(m,ae),l(te,m),ue.reset(),ue.update(te.subarray(0,32)),ue.update(L.subarray(32)),ue.update(j);const Me=ue.digest();g(Me);for(let Pe=0;Pe<32;Pe++)k[Pe]=ae[Pe];for(let Pe=0;Pe<32;Pe++)for(let Ie=0;Ie<32;Ie++)k[Pe+Ie]+=Me[Pe]*B[Ie];return I(te.subarray(32),k),te}r.sign=N;function ie(L,j){const k=s(),m=s(),B=s(),te=s(),ue=s(),ae=s(),Me=s();return D(L[2],f),q(L[1],j),T(B,L[1]),y(te,B,p),z(B,B,L[2]),$(te,L[2],te),T(ue,te),T(ae,ue),y(Me,ae,ue),y(k,Me,B),y(k,k,te),fe(k,k),y(k,k,B),y(k,k,te),y(k,k,te),y(L[0],k,te),T(m,L[0]),y(m,m,te),K(m,B)&&y(L[0],L[0],x),T(m,L[0]),y(m,m,te),K(m,B)?-1:(V(L[0])===j[31]>>7&&z(L[0],u,L[0]),y(L[3],L[0],L[1]),0)}function de(L,j,k){const m=new Uint8Array(32),B=[s(),s(),s(),s()],te=[s(),s(),s(),s()];if(k.length!==r.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${r.SIGNATURE_LENGTH} bytes`);if(ie(te,L))return!1;const ue=new t.SHA512;ue.update(k.subarray(0,32)),ue.update(L),ue.update(j);const ae=ue.digest();return g(ae),h(B,te,ae),w(te,k.subarray(32)),le(B,te),l(m,B),!ee(k,m)}r.verify=de;function _(L){let j=[s(),s(),s(),s()];if(ie(j,L))throw new Error("Ed25519: invalid public key");let k=s(),m=s(),B=j[1];$(k,f,B),z(m,f,B),ne(m,m),y(k,k,m);let te=new Uint8Array(32);return G(te,k),te}r.convertPublicKeyToX25519=_;function Z(L){const j=(0,t.hash)(L.subarray(0,32));j[0]&=248,j[31]&=127,j[31]|=64;const k=new Uint8Array(j.subarray(0,32));return(0,i.wipe)(j),k}r.convertSecretKeyToX25519=Z})(ef);const c4="EdDSA",u4="JWT",H1=".",K1="base64url",h4="utf8",l4="utf8",f4=":",d4="did",p4="key",Ip="base58btc",g4="z",m4="K36",v4=32;function eu(r){return Or(Hr(xn(r),h4),K1)}function V1(r){const e=Hr(m4,Ip),t=g4+Or(vl([e,r]),Ip);return[d4,p4,t].join(f4)}function y4(r){return Or(r,K1)}function w4(r){return Hr([eu(r.header),eu(r.payload)].join(H1),l4)}function b4(r){return[eu(r.header),eu(r.payload),y4(r.signature)].join(H1)}function Dp(r=ho.randomBytes(v4)){return ef.generateKeyPairFromSeed(r)}async function _4(r,e,t,i,s=ye.fromMiliseconds(Date.now())){const a={alg:c4,typ:u4},u=V1(i.publicKey),f=s+t,p={iss:u,sub:r,aud:e,iat:s,exp:f},d=w4({header:a,payload:p}),b=ef.sign(i.secretKey,d);return b4({header:a,payload:p,signature:b})}const E4="PARSE_ERROR",A4="INVALID_REQUEST",S4="METHOD_NOT_FOUND",I4="INVALID_PARAMS",G1="INTERNAL_ERROR",tf="SERVER_ERROR",D4=[-32700,-32600,-32601,-32602,-32603],ea={[E4]:{code:-32700,message:"Parse error"},[A4]:{code:-32600,message:"Invalid Request"},[S4]:{code:-32601,message:"Method not found"},[I4]:{code:-32602,message:"Invalid params"},[G1]:{code:-32603,message:"Internal error"},[tf]:{code:-32e3,message:"Server error"}},Y1=tf;function x4(r){return D4.includes(r)}function xp(r){return Object.keys(ea).includes(r)?ea[r]:ea[Y1]}function M4(r){const e=Object.values(ea).find(t=>t.code===r);return e||ea[Y1]}function Q1(r,e,t){return r.message.includes("getaddrinfo ENOTFOUND")||r.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${t} RPC url at ${e}`):r}var W1={},_n={},Mp;function C4(){if(Mp)return _n;Mp=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.isBrowserCryptoAvailable=_n.getSubtleCrypto=_n.getBrowerCrypto=void 0;function r(){return(Bi===null||Bi===void 0?void 0:Bi.crypto)||(Bi===null||Bi===void 0?void 0:Bi.msCrypto)||{}}_n.getBrowerCrypto=r;function e(){const i=r();return i.subtle||i.webkitSubtle}_n.getSubtleCrypto=e;function t(){return!!r()&&!!e()}return _n.isBrowserCryptoAvailable=t,_n}var En={},Cp;function P4(){if(Cp)return En;Cp=1,Object.defineProperty(En,"__esModule",{value:!0}),En.isBrowser=En.isNode=En.isReactNative=void 0;function r(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}En.isReactNative=r;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}En.isNode=e;function t(){return!r()&&!e()}return En.isBrowser=t,En}(function(r){Object.defineProperty(r,"__esModule",{value:!0});const e=ua;e.__exportStar(C4(),r),e.__exportStar(P4(),r)})(W1);function Kn(r=3){const e=Date.now()*Math.pow(10,r),t=Math.floor(Math.random()*Math.pow(10,r));return e+t}function Es(r=6){return BigInt(Kn(r))}function oo(r,e,t){return{id:t||Kn(),jsonrpc:"2.0",method:r,params:e}}function du(r,e){return{id:r,jsonrpc:"2.0",result:e}}function pu(r,e,t){return{id:r,jsonrpc:"2.0",error:O4(e)}}function O4(r,e){return typeof r>"u"?xp(G1):(typeof r=="string"&&(r=Object.assign(Object.assign({},xp(tf)),{message:r})),x4(r.code)&&(r=M4(r.code)),r)}class N4{}class R4 extends N4{constructor(){super()}}class T4 extends R4{constructor(e){super()}}const U4="^https?:",B4="^wss?:";function L4(r){const e=r.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function J1(r,e){const t=L4(r);return typeof t>"u"?!1:new RegExp(e).test(t)}function Pp(r){return J1(r,U4)}function Op(r){return J1(r,B4)}function q4(r){return new RegExp("wss?://localhost(:d{2,5})?").test(r)}function X1(r){return typeof r=="object"&&"id"in r&&"jsonrpc"in r&&r.jsonrpc==="2.0"}function rf(r){return X1(r)&&"method"in r}function gu(r){return X1(r)&&(Wi(r)||Ei(r))}function Wi(r){return"result"in r}function Ei(r){return"error"in r}let cn=class extends T4{constructor(e){super(e),this.events=new Si.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(oo(e.method,e.params||[],e.id||Es().toString()),t)}async requestStrict(e,t){return new Promise(async(i,s)=>{if(!this.connection.connected)try{await this.open()}catch(a){s(a)}this.events.on(`${e.id}`,a=>{Ei(a)?s(a.error):i(a.result)});try{await this.connection.send(e,t)}catch(a){s(a)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),gu(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 j4=()=>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"),F4=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",Np=r=>r.split("?")[0],Rp=10,$4=j4();let z4=class{constructor(e){if(this.url=e,this.events=new Si.EventEmitter,this.registering=!1,!Op(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(new Error("Connection already closed"));return}this.socket.onclose=i=>{this.onClose(i),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(xn(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!Op(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((i,s)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),s(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return s(new Error("WebSocket connection is missing or invalid"));i(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,i)=>{const s=new URLSearchParams(e).get("origin"),a=W1.isReactNative()?{headers:{origin:s}}:{rejectUnauthorized:!q4(e)},u=new $4(e,[],a);F4()?u.onerror=f=>{const p=f;i(this.emitError(p.error))}:u.on("error",f=>{i(this.emitError(f))}),u.onopen=()=>{this.onOpen(u),t(u)}})}onOpen(e){e.onmessage=t=>this.onPayload(t),e.onclose=t=>this.onClose(t),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?ma(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const i=this.parseError(t),s=i.message||i.toString(),a=pu(e,s);this.events.emit("payload",a)}parseError(e,t=this.url){return Q1(e,Np(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>Rp&&this.events.setMaxListeners(Rp)}emitError(e){const t=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${Np(this.url)}`));return this.events.emit("register_error",t),t}};var tu={exports:{}};tu.exports;(function(r,e){var t=200,i="__lodash_hash_undefined__",s=1,a=2,u=9007199254740991,f="[object Arguments]",p="[object Array]",d="[object AsyncFunction]",b="[object Boolean]",E="[object Date]",x="[object Error]",D="[object Function]",C="[object GeneratorFunction]",Q="[object Map]",G="[object Number]",ee="[object Null]",K="[object Object]",V="[object Promise]",q="[object Proxy]",$="[object RegExp]",z="[object Set]",y="[object String]",T="[object Symbol]",ne="[object Undefined]",fe="[object WeakMap]",le="[object ArrayBuffer]",me="[object DataView]",l="[object Float32Array]",h="[object Float64Array]",w="[object Int8Array]",S="[object Int16Array]",M="[object Int32Array]",O="[object Uint8Array]",U="[object Uint8ClampedArray]",I="[object Uint16Array]",g="[object Uint32Array]",N=/[\\^$.*+?()[\]{}|]/g,ie=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,_={};_[l]=_[h]=_[w]=_[S]=_[M]=_[O]=_[U]=_[I]=_[g]=!0,_[f]=_[p]=_[le]=_[b]=_[me]=_[E]=_[x]=_[D]=_[Q]=_[G]=_[K]=_[$]=_[z]=_[y]=_[fe]=!1;var Z=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,L=typeof self=="object"&&self&&self.Object===Object&&self,j=Z||L||Function("return this")(),k=e&&!e.nodeType&&e,m=k&&!0&&r&&!r.nodeType&&r,B=m&&m.exports===k,te=B&&Z.process,ue=function(){try{return te&&te.binding&&te.binding("util")}catch{}}(),ae=ue&&ue.isTypedArray;function Me(F,W){for(var he=-1,Se=F==null?0:F.length,Bt=0,rt=[];++he-1}function ci(F,W){var he=this.__data__,Se=is(he,F);return Se<0?(++this.size,he.push([F,W])):he[Se][1]=W,this}lt.prototype.clear=ni,lt.prototype.delete=si,lt.prototype.get=oi,lt.prototype.has=ai,lt.prototype.set=ci;function or(F){var W=-1,he=F==null?0:F.length;for(this.clear();++Wer))return!1;var Lt=rt.get(F);if(Lt&&rt.get(W))return Lt==W;var Qt=-1,Rr=!0,tr=he&a?new Fi:void 0;for(rt.set(F,W),rt.set(W,F);++Qt-1&&F%1==0&&F-1&&F%1==0&&F<=u}function Ba(F){var W=typeof F;return F!=null&&(W=="object"||W=="function")}function os(F){return F!=null&&typeof F=="object"}var La=ae?$e(ae):Sa;function Au(F){return _u(F)?Ea(F):Ia(F)}function Ut(){return[]}function Tt(){return!1}r.exports=Eu})(tu,tu.exports);var k4=tu.exports;const H4=iu(k4);function K4(r,e){return e=e||{},new Promise(function(t,i){var s=new XMLHttpRequest,a=[],u=[],f={},p=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:p,headers:{keys:function(){return a},entries:function(){return u},get:function(b){return f[b.toLowerCase()]},has:function(b){return b.toLowerCase()in f}}}};for(var d in s.open(e.method||"get",r,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(b,E,x){a.push(E=E.toLowerCase()),u.push([E,x]),f[E]=f[E]?f[E]+","+x:x}),t(p())},s.onerror=i,s.withCredentials=e.credentials=="include",e.headers)s.setRequestHeader(d,e.headers[d]);s.send(e.body||null)})}const V4=Object.freeze(Object.defineProperty({__proto__:null,default:K4},Symbol.toStringTag,{value:"Module"})),Tp=Eg(V4);var G4=self.fetch||(self.fetch=Tp.default||Tp);const Y4=iu(G4);var Q4={};function W4(r,e){if(r.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),i=0;i>>0,q=new Uint8Array(V);ee!==K;){for(var $=C[ee],z=0,y=V-1;($!==0||z>>0,q[y]=$%f>>>0,$=$/f>>>0;if($!==0)throw new Error("Non-zero carry");G=z,ee++}for(var T=V-G;T!==V&&q[T]===0;)T++;for(var ne=p.repeat(Q);T>>0,V=new Uint8Array(K);C[Q];){var q=t[C.charCodeAt(Q)];if(q===255)return;for(var $=0,z=K-1;(q!==0||$>>0,V[z]=q%256>>>0,q=q/256>>>0;if(q!==0)throw new Error("Non-zero carry");ee=$,Q++}if(C[Q]!==" "){for(var y=K-ee;y!==K&&V[y]===0;)y++;for(var T=new Uint8Array(G+(K-y)),ne=G;y!==K;)T[ne++]=V[y++];return T}}}function D(C){var Q=x(C);if(Q)return Q;throw new Error(`Non-${e} character`)}return{encode:E,decodeUnsafe:x,decode:D}}var J4=W4,X4=J4;const Z1=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")},Z4=r=>new TextEncoder().encode(r),eD=r=>new TextDecoder().decode(r);class tD{constructor(e,t,i){this.name=e,this.prefix=t,this.baseEncode=i}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class rD{constructor(e,t,i){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return em(this,e)}}let iD=class{constructor(e){this.decoders=e}or(e){return em(this,e)}decode(e){const t=e[0],i=this.decoders[t];if(i)return i.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const em=(r,e)=>new iD({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});let nD=class{constructor(e,t,i,s){this.name=e,this.prefix=t,this.baseEncode=i,this.baseDecode=s,this.encoder=new tD(e,t,i),this.decoder=new rD(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const mu=({name:r,prefix:e,encode:t,decode:i})=>new nD(r,e,t,i),ba=({prefix:r,name:e,alphabet:t})=>{const{encode:i,decode:s}=X4(t,e);return mu({prefix:r,name:e,encode:i,decode:a=>Z1(s(a))})},sD=(r,e,t,i)=>{const s={};for(let b=0;b=8&&(f-=8,u[d++]=255&p>>f)}if(f>=t||255&p<<8-f)throw new SyntaxError("Unexpected end of data");return u},oD=(r,e,t)=>{const i=e[e.length-1]==="=",s=(1<t;)u-=t,a+=e[s&f>>u];if(u&&(a+=e[s&f<mu({prefix:e,name:r,encode(s){return oD(s,i,t)},decode(s){return sD(s,i,t,r)}}),aD=mu({prefix:"\0",name:"identity",encode:r=>eD(r),decode:r=>Z4(r)});var cD=Object.freeze({__proto__:null,identity:aD});const uD=vr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var hD=Object.freeze({__proto__:null,base2:uD});const lD=vr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var fD=Object.freeze({__proto__:null,base8:lD});const dD=ba({prefix:"9",name:"base10",alphabet:"0123456789"});var pD=Object.freeze({__proto__:null,base10:dD});const gD=vr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),mD=vr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var vD=Object.freeze({__proto__:null,base16:gD,base16upper:mD});const yD=vr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),wD=vr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),bD=vr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),_D=vr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ED=vr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),AD=vr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),SD=vr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ID=vr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),DD=vr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var xD=Object.freeze({__proto__:null,base32:yD,base32upper:wD,base32pad:bD,base32padupper:_D,base32hex:ED,base32hexupper:AD,base32hexpad:SD,base32hexpadupper:ID,base32z:DD});const MD=ba({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),CD=ba({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var PD=Object.freeze({__proto__:null,base36:MD,base36upper:CD});const OD=ba({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ND=ba({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var RD=Object.freeze({__proto__:null,base58btc:OD,base58flickr:ND});const TD=vr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),UD=vr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),BD=vr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),LD=vr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var qD=Object.freeze({__proto__:null,base64:TD,base64pad:UD,base64url:BD,base64urlpad:LD});const tm=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),jD=tm.reduce((r,e,t)=>(r[t]=e,r),[]),FD=tm.reduce((r,e,t)=>(r[e.codePointAt(0)]=t,r),[]);function $D(r){return r.reduce((e,t)=>(e+=jD[t],e),"")}function zD(r){const e=[];for(const t of r){const i=FD[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);e.push(i)}return new Uint8Array(e)}const kD=mu({prefix:"🚀",name:"base256emoji",encode:$D,decode:zD});var HD=Object.freeze({__proto__:null,base256emoji:kD}),KD=rm,Up=128,VD=127,GD=~VD,YD=Math.pow(2,31);function rm(r,e,t){e=e||[],t=t||0;for(var i=t;r>=YD;)e[t++]=r&255|Up,r/=128;for(;r&GD;)e[t++]=r&255|Up,r>>>=7;return e[t]=r|0,rm.bytes=t-i+1,e}var QD=Pl,WD=128,Bp=127;function Pl(r,i){var t=0,i=i||0,s=0,a=i,u,f=r.length;do{if(a>=f)throw Pl.bytes=0,new RangeError("Could not decode varint");u=r[a++],t+=s<28?(u&Bp)<=WD);return Pl.bytes=a-i,t}var JD=Math.pow(2,7),XD=Math.pow(2,14),ZD=Math.pow(2,21),ex=Math.pow(2,28),tx=Math.pow(2,35),rx=Math.pow(2,42),ix=Math.pow(2,49),nx=Math.pow(2,56),sx=Math.pow(2,63),ox=function(r){return r(im.encode(r,e,t),e),qp=r=>im.encodingLength(r),Ol=(r,e)=>{const t=e.byteLength,i=qp(r),s=i+qp(t),a=new Uint8Array(s+t);return Lp(r,a,0),Lp(t,a,i),a.set(e,s),new cx(r,t,e,a)};class cx{constructor(e,t,i,s){this.code=e,this.size=t,this.digest=i,this.bytes=s}}const nm=({name:r,code:e,encode:t})=>new ux(r,e,t);class ux{constructor(e,t,i){this.name=e,this.code=t,this.encode=i}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Ol(this.code,t):t.then(i=>Ol(this.code,i))}else throw Error("Unknown type, must be binary type")}}const sm=r=>async e=>new Uint8Array(await crypto.subtle.digest(r,e)),hx=nm({name:"sha2-256",code:18,encode:sm("SHA-256")}),lx=nm({name:"sha2-512",code:19,encode:sm("SHA-512")});var fx=Object.freeze({__proto__:null,sha256:hx,sha512:lx});const om=0,dx="identity",am=Z1,px=r=>Ol(om,am(r)),gx={code:om,name:dx,encode:am,digest:px};var mx=Object.freeze({__proto__:null,identity:gx});new TextEncoder,new TextDecoder;const jp={...cD,...hD,...fD,...pD,...vD,...xD,...PD,...RD,...qD,...HD};({...fx,...mx});function vx(r=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r)}function cm(r,e,t,i){return{name:r,prefix:e,encoder:{name:r,prefix:e,encode:t},decoder:{decode:i}}}const Fp=cm("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),Xh=cm("ascii","a",r=>{let e="a";for(let t=0;t{r=r.substring(1);const e=vx(r.length);for(let t=0;t{if(!this.initialized){const i=await this.getKeyChain();typeof i<"u"&&(this.keychain=i),this.initialized=!0}},this.has=i=>(this.isInitialized(),this.keychain.has(i)),this.set=async(i,s)=>{this.isInitialized(),this.keychain.set(i,s),await this.persist()},this.get=i=>{this.isInitialized();const s=this.keychain.get(i);if(typeof s>"u"){const{message:a}=ge("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(a)}return s},this.del=async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()},this.core=e,this.logger=Gr(t,this.name)}get context(){return Vr(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Kg(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Vg(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Zx{constructor(e,t,i){this.core=e,this.logger=t,this.name=Ax,this.randomSessionIdentifier=Dl(),this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=s=>(this.isInitialized(),this.keychain.has(s)),this.getClientId=async()=>{this.isInitialized();const s=await this.getClientSeed(),a=Dp(s);return V1(a.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const s=k8();return this.setPrivateKey(s.publicKey,s.privateKey)},this.signJWT=async s=>{this.isInitialized();const a=await this.getClientSeed(),u=Dp(a),f=this.randomSessionIdentifier;return await _4(f,s,Sx,u)},this.generateSharedKey=(s,a,u)=>{this.isInitialized();const f=this.getPrivateKey(s),p=H8(f,a);return this.setSymKey(p,u)},this.setSymKey=async(s,a)=>{this.isInitialized();const u=a||jc(s);return await this.keychain.set(u,s),u},this.deleteKeyPair=async s=>{this.isInitialized(),await this.keychain.del(s)},this.deleteSymKey=async s=>{this.isInitialized(),await this.keychain.del(s)},this.encode=async(s,a,u)=>{this.isInitialized();const f=T1(u),p=xn(a);if(sp(f)){const x=f.senderPublicKey,D=f.receiverPublicKey;s=await this.generateSharedKey(x,D)}const d=this.getSymKey(s),{type:b,senderPublicKey:E}=f;return V8({type:b,symKey:d,message:p,senderPublicKey:E})},this.decode=async(s,a,u)=>{this.isInitialized();const f=Q8(a,u);if(sp(f)){const p=f.receiverPublicKey,d=f.senderPublicKey;s=await this.generateSharedKey(p,d)}try{const p=this.getSymKey(s),d=G8({symKey:p,encoded:a});return ma(d)}catch(p){this.logger.error(`Failed to decode message from topic: '${s}', clientId: '${await this.getClientId()}'`),this.logger.error(p)}},this.getPayloadType=s=>{const a=Wc(s);return pa(a.type)},this.getPayloadSenderPublicKey=s=>{const a=Wc(s);return a.senderPublicKey?Or(a.senderPublicKey,Pr):void 0},this.core=e,this.logger=Gr(t,this.name),this.keychain=i||new Xx(this.core,this.logger)}get context(){return Vr(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get($p)}catch{e=Dl(),await this.keychain.set($p,e)}return wx(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}}class e7 extends XI{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name=xx,this.version=Mx,this.initialized=!1,this.storagePrefix=Yn,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const i=await this.getRelayerMessages();typeof i<"u"&&(this.messages=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}},this.set=async(i,s)=>{this.isInitialized();const a=_s(s);let u=this.messages.get(i);return typeof u>"u"&&(u={}),typeof u[a]<"u"||(u[a]=s,this.messages.set(i,u),await this.persist()),a},this.get=i=>{this.isInitialized();let s=this.messages.get(i);return typeof s>"u"&&(s={}),s},this.has=(i,s)=>{this.isInitialized();const a=this.get(i),u=_s(s);return typeof a[u]<"u"},this.del=async i=>{this.isInitialized(),this.messages.delete(i),await this.persist()},this.logger=Gr(e,this.name),this.core=t}get context(){return Vr(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Kg(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Vg(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}}class t7 extends ZI{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new Si.EventEmitter,this.name=Px,this.queue=new Map,this.publishTimeout=ye.toMiliseconds(ye.ONE_MINUTE),this.failedPublishTimeout=ye.toMiliseconds(ye.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(i,s,a)=>{var u;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:i,message:s,opts:a}});const f=(a==null?void 0:a.ttl)||Cx,p=xl(a),d=(a==null?void 0:a.prompt)||!1,b=(a==null?void 0:a.tag)||0,E=(a==null?void 0:a.id)||Es().toString(),x={topic:i,message:s,opts:{ttl:f,relay:p,prompt:d,tag:b,id:E}},D=`Failed to publish payload, please try again. id:${E} tag:${b}`,C=Date.now();let Q,G=1;try{for(;Q===void 0;){if(Date.now()-C>this.publishTimeout)throw new Error(D);this.logger.trace({id:E,attempts:G},`publisher.publish - attempt ${G}`),Q=await await io(this.rpcPublish(i,s,f,p,d,b,E).catch(ee=>this.logger.warn(ee)),this.publishTimeout,D),G++,Q||await new Promise(ee=>setTimeout(ee,this.failedPublishTimeout))}this.relayer.events.emit(kr.publish,x),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:E,topic:i,message:s,opts:a}})}catch(ee){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(ee),(u=a==null?void 0:a.internal)!=null&&u.throwOnFailedPublish)throw ee;this.queue.set(E,x)}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.relayer=e,this.logger=Gr(t,this.name),this.registerEventListeners()}get context(){return Vr(this.logger)}rpcPublish(e,t,i,s,a,u,f){var p,d,b,E;const x={method:Yo(s.protocol).publish,params:{topic:e,message:t,ttl:i,prompt:a,tag:u},id:f};return zr((p=x.params)==null?void 0:p.prompt)&&((d=x.params)==null||delete d.prompt),zr((b=x.params)==null?void 0:b.tag)&&((E=x.params)==null||delete E.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:x}),this.relayer.request(x)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:t,message:i,opts:s}=e;await this.publish(t,i,s)})}registerEventListeners(){this.relayer.core.heartbeat.on(va.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(kr.connection_stalled);return}this.checkQueue()}),this.relayer.on(kr.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class r7{constructor(){this.map=new Map,this.set=(e,t)=>{const i=this.get(e);this.exists(e,t)||this.map.set(e,[...i,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const i=this.get(e);if(!this.exists(e,t))return;const s=i.filter(a=>a!==t);if(!s.length){this.map.delete(e);return}this.map.set(e,s)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var i7=Object.defineProperty,n7=Object.defineProperties,s7=Object.getOwnPropertyDescriptors,zp=Object.getOwnPropertySymbols,o7=Object.prototype.hasOwnProperty,a7=Object.prototype.propertyIsEnumerable,kp=(r,e,t)=>e in r?i7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ko=(r,e)=>{for(var t in e||(e={}))o7.call(e,t)&&kp(r,t,e[t]);if(zp)for(var t of zp(e))a7.call(e,t)&&kp(r,t,e[t]);return r},el=(r,e)=>n7(r,s7(e));class c7 extends r4{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new r7,this.events=new Si.EventEmitter,this.name=jx,this.version=Fx,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Yn,this.subscribeTimeout=ye.toMiliseconds(ye.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:s}});try{const a=xl(s),u={topic:i,relay:a};this.pending.set(i,u);const f=await this.rpcSubscribe(i,a);return typeof f=="string"&&(this.onSubscribe(f,u),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:s}})),f}catch(a){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(a),a}},this.unsubscribe=async(i,s)=>{await this.restartToComplete(),this.isInitialized(),typeof(s==null?void 0:s.id)<"u"?await this.unsubscribeById(i,s.id,s):await this.unsubscribeByTopic(i,s)},this.isSubscribed=async i=>{if(this.topics.includes(i))return!0;const s=`${this.pendingSubscriptionWatchLabel}_${i}`;return await new Promise((a,u)=>{const f=new ye.Watch;f.start(s);const p=setInterval(()=>{!this.pending.has(i)&&this.topics.includes(i)&&(clearInterval(p),f.stop(s),a(!0)),f.elapsed(s)>=$x&&(clearInterval(p),f.stop(s),u(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=Gr(t,this.name),this.clientId=""}get context(){return Vr(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let i=!1;try{i=this.getSubscription(e).topic===t}catch{}return i}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const i=this.topicMap.get(e);await Promise.all(i.map(async s=>await this.unsubscribeById(e,s,t)))}async unsubscribeById(e,t,i){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:i}});try{const s=xl(i);await this.rpcUnsubscribe(e,t,s);const a=Nt("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,a),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:i}})}catch(s){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(s),s}}async rpcSubscribe(e,t){const i={method:Yo(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});try{return await await io(this.relayer.request(i).catch(s=>this.logger.warn(s)),this.subscribeTimeout)?_s(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(kr.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,i={method:Yo(t.protocol).batchSubscribe,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});try{return await await io(this.relayer.request(i).catch(s=>this.logger.warn(s)),this.subscribeTimeout)}catch{this.relayer.events.emit(kr.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const t=e[0].relay,i={method:Yo(t.protocol).batchFetchMessages,params:{topics:e.map(a=>a.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});let s;try{s=await await io(this.relayer.request(i).catch(a=>this.logger.warn(a)),this.subscribeTimeout)}catch{this.relayer.events.emit(kr.connection_stalled)}return s}rpcUnsubscribe(e,t,i){const s={method:Yo(i.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s}),this.relayer.request(s)}onSubscribe(e,t){this.setSubscription(e,el(Ko({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(t=>{this.setSubscription(t.id,Ko({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(e,t,i){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,i),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,Ko({},t)),this.topicMap.set(t.topic,e),this.events.emit(Ji.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:i}=ge("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(i)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const i=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(i.topic,e),this.events.emit(Ji.deleted,el(Ko({},i),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ji.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!e.length)return;if(this.subscriptions.size){const{message:t}=ge("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);on(t)&&this.onBatchSubscribe(t.map((i,s)=>el(Ko({},e[s]),{id:i})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const t=await this.rpcBatchFetchMessages(e);t&&t.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(t.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(va.pulse,async()=>{await this.checkPending()}),this.events.on(Ji.created,async e=>{const t=Ji.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(Ji.deleted,async e=>{const t=Ji.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),e())},this.pollingInterval)})}}var u7=Object.defineProperty,Hp=Object.getOwnPropertySymbols,h7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,Kp=(r,e,t)=>e in r?u7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,f7=(r,e)=>{for(var t in e||(e={}))h7.call(e,t)&&Kp(r,t,e[t]);if(Hp)for(var t of Hp(e))l7.call(e,t)&&Kp(r,t,e[t]);return r};class d7 extends e4{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Si.EventEmitter,this.name=Nx,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=ye.toMiliseconds(ye.THIRTY_SECONDS+ye.ONE_SECOND),this.request=async t=>{var i,s;this.logger.debug("Publishing Request Payload");const a=t.id||Es().toString();await this.toEstablishConnection();try{const u=this.provider.request(t);this.requestsInFlight.set(a,{promise:u,request:t}),this.logger.trace({id:a,method:t.method,topic:(i=t.params)==null?void 0:i.topic},"relayer.request - attempt to publish...");const f=await new Promise(async(p,d)=>{const b=()=>{d(new Error(`relayer.request - publish interrupted, id: ${a}`))};this.provider.on(wi.disconnect,b);const E=await u;this.provider.off(wi.disconnect,b),p(E)});return this.logger.trace({id:a,method:t.method,topic:(s=t.params)==null?void 0:s.topic},"relayer.request - published"),f}catch(u){throw this.logger.debug(`Failed to Publish Request: ${a}`),u}finally{this.requestsInFlight.delete(a)}},this.resetPingTimeout=()=>{if(ia())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,i,s;(s=(i=(t=this.provider)==null?void 0:t.connection)==null?void 0:i.socket)==null||s.terminate()},this.heartBeatTimeout)}catch(t){this.logger.warn(t)}},this.onPayloadHandler=t=>{this.onProviderPayload(t),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace("relayer connected"),this.startPingTimeout(),this.events.emit(kr.connect)},this.onDisconnectHandler=()=>{this.logger.trace("relayer disconnected"),this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(kr.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(wi.payload,this.onPayloadHandler),this.provider.on(wi.connect,this.onConnectHandler),this.provider.on(wi.disconnect,this.onDisconnectHandler),this.provider.on(wi.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?Gr(e.logger,this.name):ya(fu({level:e.logger||Ox})),this.messages=new e7(this.logger,e.core),this.subscriber=new c7(this,this.logger),this.publisher=new t7(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||lm,this.projectId=e.projectId,this.bundleId=TE(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),await this.transportOpen(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&this.subscriber.pending.size===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},Bx)}get context(){return Vr(this.logger)}get connected(){var e,t,i;return((i=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===1}get connecting(){var e,t,i;return((i=(t=(e=this.provider)==null?void 0:e.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===0}async publish(e,t,i){this.isInitialized(),await this.publisher.publish(e,t,i),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var i;this.isInitialized();let s=((i=this.subscriber.topicMap.get(e))==null?void 0:i[0])||"",a;const u=f=>{f.topic===e&&(this.subscriber.off(Ji.created,u),a())};return await Promise.all([new Promise(f=>{a=f,this.subscriber.on(Ji.created,u)}),new Promise(async f=>{s=await this.subscriber.subscribe(e,t)||s,f()})]),s}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await io(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(t,i)=>{const s=()=>{this.provider.off(wi.disconnect,s),i(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(wi.disconnect,s),await io(this.provider.connect(),ye.toMiliseconds(ye.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(a=>{i(a)}),this.subscriber.start().catch(a=>{this.logger.error(a),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,t()})}catch(t){this.logger.error(t);const i=t;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(i.message))throw t}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await gp())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const t=e.sort((i,s)=>i.publishedAt-s.publishedAt);this.logger.trace(`Batch of ${t.length} message events sorted`);for(const i of t)try{await this.onMessageEvent(i)}catch(s){this.logger.warn(s)}this.logger.trace(`Batch of ${t.length} message events processed`)}startPingTimeout(){var e,t,i,s,a;if(ia())try{(t=(e=this.provider)==null?void 0:e.connection)!=null&&t.socket&&((a=(s=(i=this.provider)==null?void 0:i.connection)==null?void 0:s.socket)==null||a.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(u){this.logger.warn(u)}}isConnectionStalled(e){return this.staleConnectionErrors.some(t=>e.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new cn(new z4(FE({sdkVersion:Ux,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:i}=e;await this.messages.set(t,i)}async shouldIgnoreMessageEvent(e){const{topic:t,message:i}=e;if(!i||i.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const s=this.messages.has(t,i);return s&&this.logger.debug(`Ignoring duplicate message: ${i}`),s}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),rf(e)){if(!e.method.endsWith(Rx))return;const t=e.params,{topic:i,message:s,publishedAt:a}=t.data,u={topic:i,message:s,publishedAt:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(f7({type:"event",event:t.id},u)),this.events.emit(t.id,u),await this.acknowledgePayload(e),await this.onMessageEvent(u)}else gu(e)&&this.events.emit(kr.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(kr.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=du(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(wi.payload,this.onPayloadHandler),this.provider.off(wi.connect,this.onConnectHandler),this.provider.off(wi.disconnect,this.onDisconnectHandler),this.provider.off(wi.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await gp();jS(async t=>{e!==t&&(e=t,t?await this.restartTransport().catch(i=>this.logger.error(i)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(kr.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},ye.toMiliseconds(Tx))}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var p7=Object.defineProperty,Vp=Object.getOwnPropertySymbols,g7=Object.prototype.hasOwnProperty,m7=Object.prototype.propertyIsEnumerable,Gp=(r,e,t)=>e in r?p7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yp=(r,e)=>{for(var t in e||(e={}))g7.call(e,t)&&Gp(r,t,e[t]);if(Vp)for(var t of Vp(e))m7.call(e,t)&&Gp(r,t,e[t]);return r};let Cs=class extends t4{constructor(e,t,i,s=Yn,a=void 0){super(e,t,i,s),this.core=e,this.logger=t,this.name=i,this.map=new Map,this.version=Lx,this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(u=>{this.getKey&&u!==null&&!zr(u)?this.map.set(this.getKey(u),u):mS(u)?this.map.set(u.id,u):vS(u)&&this.map.set(u.topic,u)}),this.cached=[],this.initialized=!0)},this.set=async(u,f)=>{this.isInitialized(),this.map.has(u)?await this.update(u,f):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:u,value:f}),this.map.set(u,f),await this.persist())},this.get=u=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:u}),this.getData(u)),this.getAll=u=>(this.isInitialized(),u?this.values.filter(f=>Object.keys(u).every(p=>H4(f[p],u[p]))):this.values),this.update=async(u,f)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:u,update:f});const p=Yp(Yp({},this.getData(u)),f);this.map.set(u,p),await this.persist()},this.delete=async(u,f)=>{this.isInitialized(),this.map.has(u)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:u,reason:f}),this.map.delete(u),this.addToRecentlyDeleted(u),await this.persist())},this.logger=Gr(t,this.name),this.storagePrefix=s,this.getKey=a}get context(){return Vr(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){const{message:s}=ge("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}const{message:i}=ge("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:t}=ge("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}};class v7{constructor(e,t){this.core=e,this.logger=t,this.name=zx,this.version=kx,this.events=new Bl,this.initialized=!1,this.storagePrefix=Yn,this.ignoredPayloadTypes=[Dn],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]},this.create=async i=>{this.isInitialized();const s=Dl(),a=await this.core.crypto.setSymKey(s),u=pr(ye.FIVE_MINUTES),f={protocol:hm},p={topic:a,expiry:u,relay:f,active:!1},d=oS({protocol:this.core.protocol,version:this.core.version,topic:a,symKey:s,relay:f,expiryTimestamp:u,methods:i==null?void 0:i.methods});return this.core.expirer.set(a,u),await this.pairings.set(a,p),await this.core.relayer.subscribe(a),{topic:a,uri:d}},this.pair=async i=>{this.isInitialized(),this.isValidPair(i);const{topic:s,symKey:a,relay:u,expiryTimestamp:f,methods:p}=up(i.uri);let d;if(this.pairings.keys.includes(s)&&(d=this.pairings.get(s),d.active))throw new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);const b=f||pr(ye.FIVE_MINUTES),E={topic:s,relay:u,expiry:b,active:!1,methods:p};return this.core.expirer.set(s,b),await this.pairings.set(s,E),i.activatePairing&&await this.activate({topic:s}),this.events.emit(ro.create,E),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(a,s),await this.core.relayer.subscribe(s,{relay:u}),E},this.activate=async({topic:i})=>{this.isInitialized();const s=pr(ye.THIRTY_DAYS);this.core.expirer.set(i,s),await this.pairings.update(i,{active:!0,expiry:s})},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:s}=i;if(this.pairings.keys.includes(s)){const a=await this.sendRequest(s,"wc_pairingPing",{}),{done:u,resolve:f,reject:p}=ws();this.events.once(dt("pairing_ping",a),({error:d})=>{d?p(d):f()}),await u()}},this.updateExpiry=async({topic:i,expiry:s})=>{this.isInitialized(),await this.pairings.update(i,{expiry:s})},this.updateMetadata=async({topic:i,metadata:s})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:s})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:s}=i;this.pairings.keys.includes(s)&&(await this.sendRequest(s,"wc_pairingDelete",Nt("USER_DISCONNECTED")),await this.deletePairing(s))},this.sendRequest=async(i,s,a)=>{const u=oo(s,a),f=await this.core.crypto.encode(i,u),p=Ho[s].req;return this.core.history.set(i,u),this.core.relayer.publish(i,f,p),u.id},this.sendResult=async(i,s,a)=>{const u=du(i,a),f=await this.core.crypto.encode(s,u),p=await this.core.history.get(s,i),d=Ho[p.request.method].res;await this.core.relayer.publish(s,f,d),await this.core.history.resolve(u)},this.sendError=async(i,s,a)=>{const u=pu(i,a),f=await this.core.crypto.encode(s,u),p=await this.core.history.get(s,i),d=Ho[p.request.method]?Ho[p.request.method].res:Ho.unregistered_method.res;await this.core.relayer.publish(s,f,d),await this.core.history.resolve(u)},this.deletePairing=async(i,s)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,Nt("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(i),s?Promise.resolve():this.core.expirer.del(i)])},this.cleanup=async()=>{const i=this.pairings.getAll().filter(s=>kn(s.expiry));await Promise.all(i.map(s=>this.deletePairing(s.topic)))},this.onRelayEventRequest=i=>{const{topic:s,payload:a}=i;switch(a.method){case"wc_pairingPing":return this.onPairingPingRequest(s,a);case"wc_pairingDelete":return this.onPairingDeleteRequest(s,a);default:return this.onUnknownRpcMethodRequest(s,a)}},this.onRelayEventResponse=async i=>{const{topic:s,payload:a}=i,u=(await this.core.history.get(s,a.id)).request.method;switch(u){case"wc_pairingPing":return this.onPairingPingResponse(s,a);default:return this.onUnknownRpcMethodResponse(u)}},this.onPairingPingRequest=async(i,s)=>{const{id:a}=s;try{this.isValidPing({topic:i}),await this.sendResult(a,i,!0),this.events.emit(ro.ping,{id:a,topic:i})}catch(u){await this.sendError(a,i,u),this.logger.error(u)}},this.onPairingPingResponse=(i,s)=>{const{id:a}=s;setTimeout(()=>{Wi(s)?this.events.emit(dt("pairing_ping",a),{}):Ei(s)&&this.events.emit(dt("pairing_ping",a),{error:s.error})},500)},this.onPairingDeleteRequest=async(i,s)=>{const{id:a}=s;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(ro.delete,{id:a,topic:i})}catch(u){await this.sendError(a,i,u),this.logger.error(u)}},this.onUnknownRpcMethodRequest=async(i,s)=>{const{id:a,method:u}=s;try{if(this.registeredMethods.includes(u))return;const f=Nt("WC_METHOD_UNSUPPORTED",u);await this.sendError(a,i,f),this.logger.error(f)}catch(f){await this.sendError(a,i,f),this.logger.error(f)}},this.onUnknownRpcMethodResponse=i=>{this.registeredMethods.includes(i)||this.logger.error(Nt("WC_METHOD_UNSUPPORTED",i))},this.isValidPair=i=>{var s;if(!Fr(i)){const{message:u}=ge("MISSING_OR_INVALID",`pair() params: ${i}`);throw new Error(u)}if(!gS(i.uri)){const{message:u}=ge("MISSING_OR_INVALID",`pair() uri: ${i.uri}`);throw new Error(u)}const a=up(i.uri);if(!((s=a==null?void 0:a.relay)!=null&&s.protocol)){const{message:u}=ge("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(u)}if(!(a!=null&&a.symKey)){const{message:u}=ge("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(u)}if(a!=null&&a.expiryTimestamp&&ye.toMiliseconds(a==null?void 0:a.expiryTimestamp){if(!Fr(i)){const{message:a}=ge("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(a)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidDisconnect=async i=>{if(!Fr(i)){const{message:a}=ge("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(a)}const{topic:s}=i;await this.isValidPairingTopic(s)},this.isValidPairingTopic=async i=>{if(!Zt(i,!1)){const{message:s}=ge("MISSING_OR_INVALID",`pairing topic should be a string: ${i}`);throw new Error(s)}if(!this.pairings.keys.includes(i)){const{message:s}=ge("NO_MATCHING_KEY",`pairing topic doesn't exist: ${i}`);throw new Error(s)}if(kn(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:s}=ge("EXPIRED",`pairing topic: ${i}`);throw new Error(s)}},this.core=e,this.logger=Gr(t,this.name),this.pairings=new Cs(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Vr(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(kr.message,async e=>{const{topic:t,message:i}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))return;const s=await this.core.crypto.decode(t,i);try{rf(s)?(this.core.history.set(t,s),this.onRelayEventRequest({topic:t,payload:s})):gu(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:t,payload:s}),this.core.history.delete(t,s.id))}catch(a){this.logger.error(a)}})}registerExpirerEvents(){this.core.expirer.on(bi.expired,async e=>{const{topic:t}=Yg(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(ro.expire,{topic:t}))})}}let y7=class extends JI{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new Si.EventEmitter,this.name=Hx,this.version=Kx,this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(i,s,a)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:i,request:s,chainId:a}),this.records.has(s.id))return;const u={id:s.id,topic:i,request:{method:s.method,params:s.params||null},chainId:a,expiry:pr(ye.THIRTY_DAYS)};this.records.set(u.id,u),this.persist(),this.events.emit(Ni.created,u)},this.resolve=async i=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:i}),!this.records.has(i.id))return;const s=await this.getRecord(i.id);typeof s.response>"u"&&(s.response=Ei(i)?{error:i.error}:{result:i.result},this.records.set(s.id,s),this.persist(),this.events.emit(Ni.updated,s))},this.get=async(i,s)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:i,id:s}),await this.getRecord(s)),this.delete=(i,s)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:s}),this.values.forEach(a=>{if(a.topic===i){if(typeof s<"u"&&a.id!==s)return;this.records.delete(a.id),this.events.emit(Ni.deleted,a)}}),this.persist()},this.exists=async(i,s)=>(this.isInitialized(),this.records.has(s)?(await this.getRecord(s)).topic===i:!1),this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=Gr(t,this.name)}get context(){return Vr(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const i={topic:t.topic,request:oo(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(i)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:i}=ge("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(i)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Ni.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:t}=ge("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Ni.created,e=>{const t=Ni.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Ni.updated,e=>{const t=Ni.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(Ni.deleted,e=>{const t=Ni.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(va.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{ye.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(Ni.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}};class w7 extends i4{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new Si.EventEmitter,this.name=Vx,this.version=Gx,this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=i=>{try{const s=this.formatTarget(i);return typeof this.getExpiration(s)<"u"}catch{return!1}},this.set=(i,s)=>{this.isInitialized();const a=this.formatTarget(i),u={target:a,expiry:s};this.expirations.set(a,u),this.checkExpiry(a,u),this.events.emit(bi.created,{target:a,expiration:u})},this.get=i=>{this.isInitialized();const s=this.formatTarget(i);return this.getExpiration(s)},this.del=i=>{if(this.isInitialized(),this.has(i)){const s=this.formatTarget(i),a=this.getExpiration(s);this.expirations.delete(s),this.events.emit(bi.deleted,{target:s,expiration:a})}},this.on=(i,s)=>{this.events.on(i,s)},this.once=(i,s)=>{this.events.once(i,s)},this.off=(i,s)=>{this.events.off(i,s)},this.removeListener=(i,s)=>{this.events.removeListener(i,s)},this.logger=Gr(t,this.name)}get context(){return Vr(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 $E(e);if(typeof e=="number")return zE(e);const{message:t}=ge("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(bi.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:t}=ge("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:i}=ge("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(i),new Error(i)}return t}checkExpiry(e,t){const{expiry:i}=t;ye.toMiliseconds(i)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(bi.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(va.pulse,()=>this.checkExpirations()),this.events.on(bi.created,e=>{const t=bi.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(bi.expired,e=>{const t=bi.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(bi.deleted,e=>{const t=bi.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}}}class b7 extends n4{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=Zh,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async i=>{if(this.verifyDisabled||lo()||!fo())return;const s=this.getVerifyUrl(i==null?void 0:i.verifyUrl);this.verifyUrl!==s&&this.removeIframe(),this.verifyUrl=s;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a),this.verifyDisabled=!0}},this.register=async i=>{this.initialized?this.sendPost(i.attestationId):(this.addToQueue(i.attestationId),await this.init())},this.resolve=async i=>{if(this.isDevEnv)return"";const s=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(i.attestationId,s)},this.fetchAttestation=async(i,s)=>{this.logger.info(`resolving attestation: ${i} from url: ${s}`);const a=this.startAbortTimer(ye.ONE_SECOND*5),u=await fetch(`${s}/attestation/${i}`,{signal:this.abortController.signal});return clearTimeout(a),u.status===200?await u.json():void 0},this.addToQueue=i=>{this.queue.push(i)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(i=>this.sendPost(i)),this.queue=[])},this.sendPost=i=>{var s;try{if(!this.iframe)return;(s=this.iframe.contentWindow)==null||s.postMessage(i,"*"),this.logger.info(`postMessage sent: ${i} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let i;const s=a=>{a.data==="verify_ready"&&(this.onInit(),window.removeEventListener("message",s),i())};await Promise.race([new Promise(a=>{const u=document.getElementById(Zh);if(u)return this.iframe=u,this.onInit(),a();window.addEventListener("message",s);const f=document.createElement("iframe");f.id=Zh,f.src=`${this.verifyUrl}/${this.projectId}`,f.style.display="none",document.body.append(f),this.iframe=f,i=a}),new Promise((a,u)=>setTimeout(()=>{window.removeEventListener("message",s),u("verify iframe load timeout")},ye.toMiliseconds(ye.FIVE_SECONDS)))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=i=>{let s=i||Wo;return Qx.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Wo}`),s=Wo),s},this.logger=Gr(t,this.name),this.verifyUrl=Wo,this.abortController=new AbortController,this.isDevEnv=ia()&&Q4.IS_VITEST}get context(){return Vr(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),ye.toMiliseconds(e))}}class _7 extends s4{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.context=Wx,this.registerDeviceToken=async i=>{const{clientId:s,token:a,notificationType:u,enableEncrypted:f=!1}=i,p=`${Jx}/${this.projectId}/clients`;await Y4(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:s,type:u,token:a,always_raw:f})})},this.logger=Gr(t,this.context)}}var E7=Object.defineProperty,Qp=Object.getOwnPropertySymbols,A7=Object.prototype.hasOwnProperty,S7=Object.prototype.propertyIsEnumerable,Wp=(r,e,t)=>e in r?E7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Jp=(r,e)=>{for(var t in e||(e={}))A7.call(e,t)&&Wp(r,t,e[t]);if(Qp)for(var t of Qp(e))S7.call(e,t)&&Wp(r,t,e[t]);return r};class sf extends WI{constructor(e){var t;super(e),this.protocol=um,this.version=bx,this.name=nf,this.events=new Si.EventEmitter,this.initialized=!1,this.on=(u,f)=>this.events.on(u,f),this.once=(u,f)=>this.events.once(u,f),this.off=(u,f)=>this.events.off(u,f),this.removeListener=(u,f)=>this.events.removeListener(u,f),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||lm,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const i=fu({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:_x.logger}),{logger:s,chunkLoggerController:a}=QI({opts:i,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=a,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var u,f;(u=this.logChunkController)!=null&&u.downloadLogsBlobInBrowser&&((f=this.logChunkController)==null||f.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Gr(s,this.name),this.heartbeat=new _I,this.crypto=new Zx(this,this.logger,e==null?void 0:e.keychain),this.history=new y7(this,this.logger),this.expirer=new w7(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new wI(Jp(Jp({},Ex),e==null?void 0:e.storageOptions)),this.relayer=new d7({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new v7(this,this.logger),this.verify=new b7(this.projectId||"",this.logger),this.echoClient=new _7(this.projectId||"",this.logger)}static async init(e){const t=new sf(e);await t.initialize();const i=await t.crypto.getClientId();return await t.storage.setItem(qx,i),t}get context(){return Vr(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const I7=sf,dm="wc",pm=2,gm="client",of=`${dm}@${pm}:${gm}:`,tl={name:gm,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Xp="WALLETCONNECT_DEEPLINK_CHOICE",D7="proposal",mm="Proposal expired",x7="session",Js=ye.SEVEN_DAYS,M7="engine",dr={wc_sessionPropose:{req:{ttl:ye.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ye.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ye.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ye.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ye.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ye.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ye.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ye.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ye.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ye.ONE_DAY,prompt:!1,tag:1114},res:{ttl:ye.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:ye.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:ye.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:ye.FIVE_MINUTES,prompt:!1,tag:1119}}},rl={min:ye.FIVE_MINUTES,max:ye.SEVEN_DAYS},Gi={idle:"IDLE",active:"ACTIVE"},C7="request",P7=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],O7="wc",N7="auth",R7="authKeys",T7="pairingTopics",U7="requests",vu=`${O7}@${1.5}:${N7}:`,zc=`${vu}:PUB_KEY`;var B7=Object.defineProperty,L7=Object.defineProperties,q7=Object.getOwnPropertyDescriptors,Zp=Object.getOwnPropertySymbols,j7=Object.prototype.hasOwnProperty,F7=Object.prototype.propertyIsEnumerable,eg=(r,e,t)=>e in r?B7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,nr=(r,e)=>{for(var t in e||(e={}))j7.call(e,t)&&eg(r,t,e[t]);if(Zp)for(var t of Zp(e))F7.call(e,t)&&eg(r,t,e[t]);return r},ys=(r,e)=>L7(r,q7(e));class $7 extends a4{constructor(e){super(e),this.name=M7,this.events=new Bl,this.initialized=!1,this.requestQueue={state:Gi.idle,queue:[]},this.sessionRequestQueue={state:Gi.idle,queue:[]},this.requestQueueDelay=ye.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(dr)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ye.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const i=ys(nr({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(i);const{pairingTopic:s,requiredNamespaces:a,optionalNamespaces:u,sessionProperties:f,relays:p}=i;let d=s,b,E=!1;try{d&&(E=this.client.core.pairing.pairings.get(d).active)}catch(q){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),q}if(!d||!E){const{topic:q,uri:$}=await this.client.core.pairing.create();d=q,b=$}if(!d){const{message:q}=ge("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(q)}const x=await this.client.core.crypto.generateKeyPair(),D=dr.wc_sessionPropose.req.ttl||ye.FIVE_MINUTES,C=pr(D),Q=nr({requiredNamespaces:a,optionalNamespaces:u,relays:p??[{protocol:hm}],proposer:{publicKey:x,metadata:this.client.metadata},expiryTimestamp:C,pairingTopic:d},f&&{sessionProperties:f}),{reject:G,resolve:ee,done:K}=ws(D,mm);this.events.once(dt("session_connect"),async({error:q,session:$})=>{if(q)G(q);else if($){$.self.publicKey=x;const z=ys(nr({},$),{pairingTopic:Q.pairingTopic,requiredNamespaces:Q.requiredNamespaces,optionalNamespaces:Q.optionalNamespaces});await this.client.session.set($.topic,z),await this.setExpiry($.topic,$.expiry),d&&await this.client.core.pairing.updateMetadata({topic:d,metadata:$.peer.metadata}),this.cleanupDuplicatePairings(z),ee(z)}});const V=await this.sendRequest({topic:d,method:"wc_sessionPropose",params:Q,throwOnFailedPublish:!0});return await this.setProposal(V,nr({id:V},Q)),{uri:b,approval:K}},this.pair=async t=>{await this.isInitialized();try{return await this.client.core.pairing.pair(t)}catch(i){throw this.client.logger.error("pair() failed"),i}},this.approve=async t=>{await this.isInitialized();try{await this.isValidApprove(t)}catch(K){throw this.client.logger.error("approve() -> isValidApprove() failed"),K}const{id:i,relayProtocol:s,namespaces:a,sessionProperties:u,sessionConfig:f}=t;let p;try{p=this.client.proposal.get(i)}catch(K){throw this.client.logger.error(`approve() -> proposal.get(${i}) failed`),K}const{pairingTopic:d,proposer:b,requiredNamespaces:E,optionalNamespaces:x}=p,D=await this.client.core.crypto.generateKeyPair(),C=b.publicKey,Q=await this.client.core.crypto.generateSharedKey(D,C),G=nr(nr({relay:{protocol:s??"irn"},namespaces:a,controller:{publicKey:D,metadata:this.client.metadata},expiry:pr(Js)},u&&{sessionProperties:u}),f&&{sessionConfig:f});await this.client.core.relayer.subscribe(Q);const ee=ys(nr({},G),{topic:Q,requiredNamespaces:E,optionalNamespaces:x,pairingTopic:d,acknowledged:!1,self:G.controller,peer:{publicKey:b.publicKey,metadata:b.metadata},controller:D});await this.client.session.set(Q,ee);try{await this.sendResult({id:i,topic:d,result:{relay:{protocol:s??"irn"},responderPublicKey:D},throwOnFailedPublish:!0}),await this.sendRequest({topic:Q,method:"wc_sessionSettle",params:G,throwOnFailedPublish:!0})}catch(K){throw this.client.logger.error(K),this.client.session.delete(Q,Nt("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(Q),K}return await this.client.core.pairing.updateMetadata({topic:d,metadata:b.metadata}),await this.client.proposal.delete(i,Nt("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:d}),await this.setExpiry(Q,pr(Js)),{topic:Q,acknowledged:()=>new Promise(K=>setTimeout(()=>K(this.client.session.get(Q)),500))}},this.reject=async t=>{await this.isInitialized();try{await this.isValidReject(t)}catch(u){throw this.client.logger.error("reject() -> isValidReject() failed"),u}const{id:i,reason:s}=t;let a;try{a=this.client.proposal.get(i).pairingTopic}catch(u){throw this.client.logger.error(`reject() -> proposal.get(${i}) failed`),u}a&&(await this.sendError({id:i,topic:a,error:s,rpcOpts:dr.wc_sessionPropose.reject}),await this.client.proposal.delete(i,Nt("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized();try{await this.isValidUpdate(t)}catch(E){throw this.client.logger.error("update() -> isValidUpdate() failed"),E}const{topic:i,namespaces:s}=t,{done:a,resolve:u,reject:f}=ws(),p=Kn(),d=Es().toString(),b=this.client.session.get(i).namespaces;return this.events.once(dt("session_update",p),({error:E})=>{E?f(E):u()}),await this.client.session.update(i,{namespaces:s}),await this.sendRequest({topic:i,method:"wc_sessionUpdate",params:{namespaces:s},throwOnFailedPublish:!0,clientRpcId:p,relayRpcId:d}).catch(E=>{this.client.logger.error(E),this.client.session.update(i,{namespaces:b}),f(E)}),{acknowledged:a}},this.extend=async t=>{await this.isInitialized();try{await this.isValidExtend(t)}catch(p){throw this.client.logger.error("extend() -> isValidExtend() failed"),p}const{topic:i}=t,s=Kn(),{done:a,resolve:u,reject:f}=ws();return this.events.once(dt("session_extend",s),({error:p})=>{p?f(p):u()}),await this.setExpiry(i,pr(Js)),this.sendRequest({topic:i,method:"wc_sessionExtend",params:{},clientRpcId:s,throwOnFailedPublish:!0}).catch(p=>{f(p)}),{acknowledged:a}},this.request=async t=>{await this.isInitialized();try{await this.isValidRequest(t)}catch(D){throw this.client.logger.error("request() -> isValidRequest() failed"),D}const{chainId:i,request:s,topic:a,expiry:u=dr.wc_sessionRequest.req.ttl}=t,f=this.client.session.get(a),p=Kn(),d=Es().toString(),{done:b,resolve:E,reject:x}=ws(u,"Request expired. Please try again.");return this.events.once(dt("session_request",p),({error:D,result:C})=>{D?x(D):E(C)}),await Promise.all([new Promise(async D=>{await this.sendRequest({clientRpcId:p,relayRpcId:d,topic:a,method:"wc_sessionRequest",params:{request:ys(nr({},s),{expiryTimestamp:pr(u)}),chainId:i},expiry:u,throwOnFailedPublish:!0}).catch(C=>x(C)),this.client.events.emit("session_request_sent",{topic:a,request:s,chainId:i,id:p}),D()}),new Promise(async D=>{var C;if(!((C=f.sessionConfig)!=null&&C.disableDeepLink)){const Q=await HE(this.client.core.storage,Xp);kE({id:p,topic:a,wcDeepLink:Q})}D()}),b()]).then(D=>D[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:i,response:s}=t,{id:a}=s;Wi(s)?await this.sendResult({id:a,topic:i,result:s.result,throwOnFailedPublish:!0}):Ei(s)&&await this.sendError({id:a,topic:i,error:s.error}),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized();try{await this.isValidPing(t)}catch(s){throw this.client.logger.error("ping() -> isValidPing() failed"),s}const{topic:i}=t;if(this.client.session.keys.includes(i)){const s=Kn(),a=Es().toString(),{done:u,resolve:f,reject:p}=ws();this.events.once(dt("session_ping",s),({error:d})=>{d?p(d):f()}),await Promise.all([this.sendRequest({topic:i,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:s,relayRpcId:a}),u()])}else this.client.core.pairing.pairings.keys.includes(i)&&await this.client.core.pairing.ping({topic:i})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:i,event:s,chainId:a}=t,u=Es().toString();await this.sendRequest({topic:i,method:"wc_sessionEvent",params:{event:s,chainId:a},throwOnFailedPublish:!0,relayRpcId:u})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:i}=t;if(this.client.session.keys.includes(i))await this.sendRequest({topic:i,method:"wc_sessionDelete",params:Nt("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:i,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(i))await this.client.core.pairing.disconnect({topic:i});else{const{message:s}=ge("MISMATCHED_TOPIC",`Session or pairing topic not found: ${i}`);throw new Error(s)}},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(i=>dS(i,t))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async t=>{this.isInitialized(),this.isValidAuthenticate(t);const{chains:i,statement:s="",uri:a,domain:u,nonce:f,type:p,exp:d,nbf:b,methods:E=[],expiry:x}=t,D=[...t.resources||[]],{topic:C,uri:Q}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:C,uri:Q}});const G=await this.client.core.crypto.generateKeyPair(),ee=jc(G);if(await Promise.all([this.client.auth.authKeys.set(zc,{responseTopic:ee,publicKey:G}),this.client.auth.pairingTopics.set(ee,{topic:ee,pairingTopic:C})]),await this.client.core.relayer.subscribe(ee),this.client.logger.info(`sending request to new pairing topic: ${C}`),E.length>0){const{namespace:l}=Jo(i[0]);let h=L8(l,"request",E);qc(D)&&(h=j8(h,D.pop())),D.push(h)}const K=x&&x>dr.wc_sessionAuthenticate.req.ttl?x:dr.wc_sessionAuthenticate.req.ttl,V={authPayload:{type:p??"caip122",chains:i,statement:s,aud:a,domain:u,version:"1",nonce:f,iat:new Date().toISOString(),exp:d,nbf:b,resources:D},requester:{publicKey:G,metadata:this.client.metadata},expiryTimestamp:pr(K)},q={eip155:{chains:i,methods:[...new Set(["personal_sign",...E])],events:["chainChanged","accountsChanged"]}},$={requiredNamespaces:{},optionalNamespaces:q,relays:[{protocol:"irn"}],pairingTopic:C,proposer:{publicKey:G,metadata:this.client.metadata},expiryTimestamp:pr(dr.wc_sessionPropose.req.ttl)},{done:z,resolve:y,reject:T}=ws(K,"Request expired"),ne=async({error:l,session:h})=>{if(this.events.off(dt("session_request",le),fe),l)T(l);else if(h){h.self.publicKey=G,await this.client.session.set(h.topic,h),await this.setExpiry(h.topic,h.expiry),C&&await this.client.core.pairing.updateMetadata({topic:C,metadata:h.peer.metadata});const w=this.client.session.get(h.topic);await this.deleteProposal(me),y({session:w})}},fe=async l=>{if(await this.deletePendingAuthRequest(le,{message:"fulfilled",code:0}),l.error){const I=Nt("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return l.error.code===I.code?void 0:(this.events.off(dt("session_connect"),ne),T(l.error.message))}await this.deleteProposal(me),this.events.off(dt("session_connect"),ne);const{cacaos:h,responder:w}=l.result,S=[],M=[];for(const I of h){await tp({cacao:I,projectId:this.client.core.projectId})||(this.client.logger.error(I,"Signature verification failed"),T(Nt("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:g}=I,N=qc(g.resources),ie=[ep(g.iss)],de=Qc(g.iss);if(N){const _=rp(N),Z=ip(N);S.push(..._),ie.push(...Z)}for(const _ of ie)M.push(`${_}:${de}`)}const O=await this.client.core.crypto.generateSharedKey(G,w.publicKey);let U;S.length>0&&(U={topic:O,acknowledged:!0,self:{publicKey:G,metadata:this.client.metadata},peer:w,controller:w.publicKey,expiry:pr(Js),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:C,namespaces:hp([...new Set(S)],[...new Set(M)])},await this.client.core.relayer.subscribe(O),await this.client.session.set(O,U),C&&await this.client.core.pairing.updateMetadata({topic:C,metadata:w.metadata}),U=this.client.session.get(O)),y({auths:h,session:U})},le=Kn(),me=Kn();this.events.once(dt("session_connect"),ne),this.events.once(dt("session_request",le),fe);try{await Promise.all([this.sendRequest({topic:C,method:"wc_sessionAuthenticate",params:V,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:le}),this.sendRequest({topic:C,method:"wc_sessionPropose",params:$,expiry:dr.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:me})])}catch(l){throw this.events.off(dt("session_connect"),ne),this.events.off(dt("session_request",le),fe),l}return await this.setProposal(me,nr({id:me},$)),await this.setAuthRequest(le,{request:ys(nr({},V),{verifyContext:{}}),pairingTopic:C}),{uri:Q,response:z}},this.approveSessionAuthenticate=async t=>{this.isInitialized();const{id:i,auths:s}=t,a=this.getPendingAuthRequest(i);if(!a)throw new Error(`Could not find pending auth request with id ${i}`);const u=a.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),p=jc(u),d={type:Dn,receiverPublicKey:u,senderPublicKey:f},b=[],E=[];for(const C of s){if(!await tp({cacao:C,projectId:this.client.core.projectId})){const V=Nt("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:i,topic:p,error:V,encodeOpts:d}),new Error(V.message)}const{p:Q}=C,G=qc(Q.resources),ee=[ep(Q.iss)],K=Qc(Q.iss);if(G){const V=rp(G),q=ip(G);b.push(...V),ee.push(...q)}for(const V of ee)E.push(`${V}:${K}`)}const x=await this.client.core.crypto.generateSharedKey(f,u);let D;return(b==null?void 0:b.length)>0&&(D={topic:x,acknowledged:!0,self:{publicKey:f,metadata:this.client.metadata},peer:{publicKey:u,metadata:a.requester.metadata},controller:u,expiry:pr(Js),authentication:s,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:a.pairingTopic,namespaces:hp([...new Set(b)],[...new Set(E)])},await this.client.core.relayer.subscribe(x),await this.client.session.set(x,D),await this.client.core.pairing.updateMetadata({topic:a.pairingTopic,metadata:a.requester.metadata})),await this.sendResult({topic:p,id:i,result:{cacaos:s,responder:{publicKey:f,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(i,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:a.pairingTopic}),{session:D}},this.rejectSessionAuthenticate=async t=>{await this.isInitialized();const{id:i,reason:s}=t,a=this.getPendingAuthRequest(i);if(!a)throw new Error(`Could not find pending auth request with id ${i}`);const u=a.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),p=jc(u),d={type:Dn,receiverPublicKey:u,senderPublicKey:f};await this.sendError({id:i,topic:p,error:s,encodeOpts:d,rpcOpts:dr.wc_sessionAuthenticate.reject}),await this.client.auth.requests.delete(i,{message:"rejected",code:0}),await this.client.proposal.delete(i,Nt("USER_DISCONNECTED"))},this.formatAuthMessage=t=>{this.isInitialized();const{request:i,iss:s}=t;return P1(i,s)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const t=this.relayMessageCache.shift();t&&await this.onRelayMessage(t)}catch(t){this.client.logger.error(t)}},50)},this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const i=this.client.core.pairing.pairings.get(t.pairingTopic),s=this.client.core.pairing.pairings.getAll().filter(a=>{var u,f;return((u=a.peerMetadata)==null?void 0:u.url)&&((f=a.peerMetadata)==null?void 0:f.url)===t.peer.metadata.url&&a.topic&&a.topic!==i.topic});if(s.length===0)return;this.client.logger.info(`Cleaning up ${s.length} duplicate pairing(s)`),await Promise.all(s.map(a=>this.client.core.pairing.disconnect({topic:a.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(i){this.client.logger.error(i)}},this.deleteSession=async t=>{var i;const{topic:s,expirerHasDeleted:a=!1,emitEvent:u=!0,id:f=0}=t,{self:p}=this.client.session.get(s);await this.client.core.relayer.unsubscribe(s),await this.client.session.delete(s,Nt("USER_DISCONNECTED")),this.addToRecentlyDeleted(s,"session"),this.client.core.crypto.keychain.has(p.publicKey)&&await this.client.core.crypto.deleteKeyPair(p.publicKey),this.client.core.crypto.keychain.has(s)&&await this.client.core.crypto.deleteSymKey(s),a||this.client.core.expirer.del(s),this.client.core.storage.removeItem(Xp).catch(d=>this.client.logger.warn(d)),this.getPendingSessionRequests().forEach(d=>{d.topic===s&&this.deletePendingSessionRequest(d.id,Nt("USER_DISCONNECTED"))}),s===((i=this.sessionRequestQueue.queue[0])==null?void 0:i.topic)&&(this.sessionRequestQueue.state=Gi.idle),u&&this.client.events.emit("session_delete",{id:f,topic:s})},this.deleteProposal=async(t,i)=>{await Promise.all([this.client.proposal.delete(t,Nt("USER_DISCONNECTED")),i?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"proposal")},this.deletePendingSessionRequest=async(t,i,s=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,i),s?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(a=>a.id!==t),s&&(this.sessionRequestQueue.state=Gi.idle,this.client.events.emit("session_request_expire",{id:t}))},this.deletePendingAuthRequest=async(t,i,s=!1)=>{await Promise.all([this.client.auth.requests.delete(t,i),s?Promise.resolve():this.client.core.expirer.del(t)])},this.setExpiry=async(t,i)=>{this.client.session.keys.includes(t)&&(this.client.core.expirer.set(t,i),await this.client.session.update(t,{expiry:i}))},this.setProposal=async(t,i)=>{this.client.core.expirer.set(t,pr(dr.wc_sessionPropose.req.ttl)),await this.client.proposal.set(t,i)},this.setAuthRequest=async(t,i)=>{const{request:s,pairingTopic:a}=i;this.client.core.expirer.set(t,s.expiryTimestamp),await this.client.auth.requests.set(t,{authPayload:s.authPayload,requester:s.requester,expiryTimestamp:s.expiryTimestamp,id:t,pairingTopic:a,verifyContext:s.verifyContext})},this.setPendingSessionRequest=async t=>{const{id:i,topic:s,params:a,verifyContext:u}=t,f=a.request.expiryTimestamp||pr(dr.wc_sessionRequest.req.ttl);this.client.core.expirer.set(i,f),await this.client.pendingRequest.set(i,{id:i,topic:s,params:a,verifyContext:u})},this.sendRequest=async t=>{const{topic:i,method:s,params:a,expiry:u,relayRpcId:f,clientRpcId:p,throwOnFailedPublish:d}=t,b=oo(s,a,p);if(fo()&&P7.includes(s)){const D=_s(JSON.stringify(b));this.client.core.verify.register({attestationId:D})}let E;try{E=await this.client.core.crypto.encode(i,b)}catch(D){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${i} failed`),D}const x=dr[s].req;return u&&(x.ttl=u),f&&(x.id=f),this.client.core.history.set(i,b),d?(x.internal=ys(nr({},x.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,E,x)):this.client.core.relayer.publish(i,E,x).catch(D=>this.client.logger.error(D)),b.id},this.sendResult=async t=>{const{id:i,topic:s,result:a,throwOnFailedPublish:u,encodeOpts:f}=t,p=du(i,a);let d;try{d=await this.client.core.crypto.encode(s,p,f)}catch(x){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${s} failed`),x}let b;try{b=await this.client.core.history.get(s,i)}catch(x){throw this.client.logger.error(`sendResult() -> history.get(${s}, ${i}) failed`),x}const E=dr[b.request.method].res;u?(E.internal=ys(nr({},E.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(s,d,E)):this.client.core.relayer.publish(s,d,E).catch(x=>this.client.logger.error(x)),await this.client.core.history.resolve(p)},this.sendError=async t=>{const{id:i,topic:s,error:a,encodeOpts:u,rpcOpts:f}=t,p=pu(i,a);let d;try{d=await this.client.core.crypto.encode(s,p,u)}catch(x){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${s} failed`),x}let b;try{b=await this.client.core.history.get(s,i)}catch(x){throw this.client.logger.error(`sendError() -> history.get(${s}, ${i}) failed`),x}const E=f||dr[b.request.method].res;this.client.core.relayer.publish(s,d,E),await this.client.core.history.resolve(p)},this.cleanup=async()=>{const t=[],i=[];this.client.session.getAll().forEach(s=>{let a=!1;kn(s.expiry)&&(a=!0),this.client.core.crypto.keychain.has(s.topic)||(a=!0),a&&t.push(s.topic)}),this.client.proposal.getAll().forEach(s=>{kn(s.expiryTimestamp)&&i.push(s.id)}),await Promise.all([...t.map(s=>this.deleteSession({topic:s})),...i.map(s=>this.deleteProposal(s))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===Gi.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=Gi.active;const t=this.requestQueue.queue.shift();if(t)try{await this.processRequest(t)}catch(i){this.client.logger.warn(i)}}this.requestQueue.state=Gi.idle},this.processRequest=async t=>{const{topic:i,payload:s}=t,a=s.method;if(!this.shouldIgnorePairingRequest({topic:i,requestMethod:a}))switch(a){case"wc_sessionPropose":return await this.onSessionProposeRequest(i,s);case"wc_sessionSettle":return await this.onSessionSettleRequest(i,s);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(i,s);case"wc_sessionExtend":return await this.onSessionExtendRequest(i,s);case"wc_sessionPing":return await this.onSessionPingRequest(i,s);case"wc_sessionDelete":return await this.onSessionDeleteRequest(i,s);case"wc_sessionRequest":return await this.onSessionRequest(i,s);case"wc_sessionEvent":return await this.onSessionEventRequest(i,s);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest(i,s);default:return this.client.logger.info(`Unsupported request method ${a}`)}},this.onRelayEventResponse=async t=>{const{topic:i,payload:s}=t,a=(await this.client.core.history.get(i,s.id)).request.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeResponse(i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(i,s);case"wc_sessionUpdate":return this.onSessionUpdateResponse(i,s);case"wc_sessionExtend":return this.onSessionExtendResponse(i,s);case"wc_sessionPing":return this.onSessionPingResponse(i,s);case"wc_sessionRequest":return this.onSessionRequestResponse(i,s);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(i,s);default:return this.client.logger.info(`Unsupported response method ${a}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:i}=t,{message:s}=ge("MISSING_OR_INVALID",`Decoded payload on topic ${i} is not identifiable as a JSON-RPC request or a response.`);throw new Error(s)},this.shouldIgnorePairingRequest=t=>{const{topic:i,requestMethod:s}=t,a=this.expectedPairingMethodMap.get(i);return!a||a.includes(s)?!1:!!(a.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(t,i)=>{const{params:s,id:a}=i;try{this.isValidConnect(nr({},i.params));const u=s.expiryTimestamp||pr(dr.wc_sessionPropose.req.ttl),f=nr({id:a,pairingTopic:t,expiryTimestamp:u},s);await this.setProposal(a,f);const p=_s(JSON.stringify(i)),d=await this.getVerifyContext(p,f.proposer.metadata);this.client.events.emit("session_proposal",{id:a,params:f,verifyContext:d})}catch(u){await this.sendError({id:a,topic:t,error:u,rpcOpts:dr.wc_sessionPropose.autoReject}),this.client.logger.error(u)}},this.onSessionProposeResponse=async(t,i)=>{const{id:s}=i;if(Wi(i)){const{result:a}=i;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const u=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:u});const f=u.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:f});const p=a.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:p});const d=await this.client.core.crypto.generateSharedKey(f,p);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:d});const b=await this.client.core.relayer.subscribe(d);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:b}),await this.client.core.pairing.activate({topic:t})}else if(Ei(i)){await this.client.proposal.delete(s,Nt("USER_DISCONNECTED"));const a=dt("session_connect");if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners, 954`);this.events.emit(dt("session_connect"),{error:i.error})}},this.onSessionSettleRequest=async(t,i)=>{const{id:s,params:a}=i;try{this.isValidSessionSettleRequest(a);const{relay:u,controller:f,expiry:p,namespaces:d,sessionProperties:b,sessionConfig:E}=i.params,x=nr(nr({topic:t,relay:u,expiry:p,namespaces:d,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:f.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:f.publicKey,metadata:f.metadata}},b&&{sessionProperties:b}),E&&{sessionConfig:E});await this.sendResult({id:i.id,topic:t,result:!0,throwOnFailedPublish:!0});const D=dt("session_connect");if(this.events.listenerCount(D)===0)throw new Error(`emitting ${D} without any listeners 997`);this.events.emit(dt("session_connect"),{session:x})}catch(u){await this.sendError({id:s,topic:t,error:u}),this.client.logger.error(u)}},this.onSessionSettleResponse=async(t,i)=>{const{id:s}=i;Wi(i)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(dt("session_approve",s),{})):Ei(i)&&(await this.client.session.delete(t,Nt("USER_DISCONNECTED")),this.events.emit(dt("session_approve",s),{error:i.error}))},this.onSessionUpdateRequest=async(t,i)=>{const{params:s,id:a}=i;try{const u=`${t}_session_update`,f=ko.get(u);if(f&&this.isRequestOutOfSync(f,a)){this.client.logger.info(`Discarding out of sync request - ${a}`),this.sendError({id:a,topic:t,error:Nt("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(nr({topic:t},s));try{ko.set(u,a),await this.client.session.update(t,{namespaces:s.namespaces}),await this.sendResult({id:a,topic:t,result:!0,throwOnFailedPublish:!0})}catch(p){throw ko.delete(u),p}this.client.events.emit("session_update",{id:a,topic:t,params:s})}catch(u){await this.sendError({id:a,topic:t,error:u}),this.client.logger.error(u)}},this.isRequestOutOfSync=(t,i)=>parseInt(i.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,i)=>{const{id:s}=i,a=dt("session_update",s);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);Wi(i)?this.events.emit(dt("session_update",s),{}):Ei(i)&&this.events.emit(dt("session_update",s),{error:i.error})},this.onSessionExtendRequest=async(t,i)=>{const{id:s}=i;try{this.isValidExtend({topic:t}),await this.setExpiry(t,pr(Js)),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:s,topic:t})}catch(a){await this.sendError({id:s,topic:t,error:a}),this.client.logger.error(a)}},this.onSessionExtendResponse=(t,i)=>{const{id:s}=i,a=dt("session_extend",s);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);Wi(i)?this.events.emit(dt("session_extend",s),{}):Ei(i)&&this.events.emit(dt("session_extend",s),{error:i.error})},this.onSessionPingRequest=async(t,i)=>{const{id:s}=i;try{this.isValidPing({topic:t}),await this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:s,topic:t})}catch(a){await this.sendError({id:s,topic:t,error:a}),this.client.logger.error(a)}},this.onSessionPingResponse=(t,i)=>{const{id:s}=i,a=dt("session_ping",s);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);setTimeout(()=>{Wi(i)?this.events.emit(dt("session_ping",s),{}):Ei(i)&&this.events.emit(dt("session_ping",s),{error:i.error})},500)},this.onSessionDeleteRequest=async(t,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:t,reason:i.params}),await Promise.all([new Promise(a=>{this.client.core.relayer.once(kr.publish,async()=>{a(await this.deleteSession({topic:t,id:s}))})}),this.sendResult({id:s,topic:t,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:Nt("USER_DISCONNECTED")})])}catch(a){this.client.logger.error(a)}},this.onSessionRequest=async(t,i)=>{var s;const{id:a,params:u}=i;try{await this.isValidRequest(nr({topic:t},u));const f=_s(JSON.stringify(oo("wc_sessionRequest",u,a))),p=this.client.session.get(t),d=await this.getVerifyContext(f,p.peer.metadata),b={id:a,topic:t,params:u,verifyContext:d};await this.setPendingSessionRequest(b),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(b):(this.addSessionRequestToSessionRequestQueue(b),this.processSessionRequestQueue())}catch(f){await this.sendError({id:a,topic:t,error:f}),this.client.logger.error(f)}},this.onSessionRequestResponse=(t,i)=>{const{id:s}=i,a=dt("session_request",s);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);Wi(i)?this.events.emit(dt("session_request",s),{result:i.result}):Ei(i)&&this.events.emit(dt("session_request",s),{error:i.error})},this.onSessionEventRequest=async(t,i)=>{const{id:s,params:a}=i;try{const u=`${t}_session_event_${a.event.name}`,f=ko.get(u);if(f&&this.isRequestOutOfSync(f,s)){this.client.logger.info(`Discarding out of sync request - ${s}`);return}this.isValidEmit(nr({topic:t},a)),this.client.events.emit("session_event",{id:s,topic:t,params:a}),ko.set(u,s)}catch(u){await this.sendError({id:s,topic:t,error:u}),this.client.logger.error(u)}},this.onSessionAuthenticateResponse=(t,i)=>{const{id:s}=i;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:t,payload:i}),Wi(i)?this.events.emit(dt("session_request",s),{result:i.result}):Ei(i)&&this.events.emit(dt("session_request",s),{error:i.error})},this.onSessionAuthenticateRequest=async(t,i)=>{try{const{requester:s,authPayload:a,expiryTimestamp:u}=i.params,f=_s(JSON.stringify(i)),p=await this.getVerifyContext(f,this.client.metadata),d={requester:s,pairingTopic:t,id:i.id,authPayload:a,verifyContext:p,expiryTimestamp:u};await this.setAuthRequest(i.id,{request:d,pairingTopic:t}),this.client.events.emit("session_authenticate",{topic:t,params:i.params,id:i.id,verifyContext:p})}catch(s){this.client.logger.error(s);const a=i.params.requester.publicKey,u=await this.client.core.crypto.generateKeyPair(),f={type:Dn,receiverPublicKey:a,senderPublicKey:u};await this.sendError({id:i.id,topic:t,error:s,encodeOpts:f,rpcOpts:dr.wc_sessionAuthenticate.autoReject})}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Gi.idle,this.processSessionRequestQueue()},ye.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:t,error:i})=>{const s=this.client.core.history.pending;s.length>0&&s.filter(a=>a.topic===t&&a.request.method==="wc_sessionRequest").forEach(a=>{const u=a.request.id,f=dt("session_request",u);if(this.events.listenerCount(f)===0)throw new Error(`emitting ${f} without any listeners`);this.events.emit(dt("session_request",a.request.id),{error:i})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Gi.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Gi.active,this.emitSessionRequest(t)}catch(i){this.client.logger.error(i)}},this.emitSessionRequest=t=>{this.client.events.emit("session_request",t)},this.onPairingCreated=t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const i=this.client.proposal.getAll().find(s=>s.pairingTopic===t.topic);i&&this.onSessionProposeRequest(t.topic,oo("wc_sessionPropose",{requiredNamespaces:i.requiredNamespaces,optionalNamespaces:i.optionalNamespaces,relays:i.relays,proposer:i.proposer,sessionProperties:i.sessionProperties},i.id))},this.isValidConnect=async t=>{if(!Fr(t)){const{message:p}=ge("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(p)}const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:a,sessionProperties:u,relays:f}=t;if(zr(i)||await this.isValidPairingTopic(i),!IS(f)){const{message:p}=ge("MISSING_OR_INVALID",`connect() relays: ${f}`);throw new Error(p)}!zr(s)&&oa(s)!==0&&this.validateNamespaces(s,"requiredNamespaces"),!zr(a)&&oa(a)!==0&&this.validateNamespaces(a,"optionalNamespaces"),zr(u)||this.validateSessionProps(u,"sessionProperties")},this.validateNamespaces=(t,i)=>{const s=SS(t,"connect()",i);if(s)throw new Error(s.message)},this.isValidApprove=async t=>{if(!Fr(t))throw new Error(ge("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:i,namespaces:s,relayProtocol:a,sessionProperties:u}=t;this.checkRecentlyDeleted(i),await this.isValidProposalId(i);const f=this.client.proposal.get(i),p=Gh(s,"approve()");if(p)throw new Error(p.message);const d=dp(f.requiredNamespaces,s,"approve()");if(d)throw new Error(d.message);if(!Zt(a,!0)){const{message:b}=ge("MISSING_OR_INVALID",`approve() relayProtocol: ${a}`);throw new Error(b)}zr(u)||this.validateSessionProps(u,"sessionProperties")},this.isValidReject=async t=>{if(!Fr(t)){const{message:a}=ge("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(a)}const{id:i,reason:s}=t;if(this.checkRecentlyDeleted(i),await this.isValidProposalId(i),!xS(s)){const{message:a}=ge("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(s)}`);throw new Error(a)}},this.isValidSessionSettleRequest=t=>{if(!Fr(t)){const{message:d}=ge("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(d)}const{relay:i,controller:s,namespaces:a,expiry:u}=t;if(!B1(i)){const{message:d}=ge("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const f=yS(s,"onSessionSettleRequest()");if(f)throw new Error(f.message);const p=Gh(a,"onSessionSettleRequest()");if(p)throw new Error(p.message);if(kn(u)){const{message:d}=ge("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async t=>{if(!Fr(t)){const{message:p}=ge("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(p)}const{topic:i,namespaces:s}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const a=this.client.session.get(i),u=Gh(s,"update()");if(u)throw new Error(u.message);const f=dp(a.requiredNamespaces,s,"update()");if(f)throw new Error(f.message)},this.isValidExtend=async t=>{if(!Fr(t)){const{message:s}=ge("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(s)}const{topic:i}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i)},this.isValidRequest=async t=>{if(!Fr(t)){const{message:p}=ge("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(p)}const{topic:i,request:s,chainId:a,expiry:u}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const{namespaces:f}=this.client.session.get(i);if(!fp(f,a)){const{message:p}=ge("MISSING_OR_INVALID",`request() chainId: ${a}`);throw new Error(p)}if(!MS(s)){const{message:p}=ge("MISSING_OR_INVALID",`request() ${JSON.stringify(s)}`);throw new Error(p)}if(!OS(f,a,s.method)){const{message:p}=ge("MISSING_OR_INVALID",`request() method: ${s.method}`);throw new Error(p)}if(u&&!US(u,rl)){const{message:p}=ge("MISSING_OR_INVALID",`request() expiry: ${u}. Expiry must be a number (in seconds) between ${rl.min} and ${rl.max}`);throw new Error(p)}},this.isValidRespond=async t=>{var i;if(!Fr(t)){const{message:u}=ge("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(u)}const{topic:s,response:a}=t;try{await this.isValidSessionTopic(s)}catch(u){throw(i=t==null?void 0:t.response)!=null&&i.id&&this.cleanupAfterResponse(t),u}if(!CS(a)){const{message:u}=ge("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(a)}`);throw new Error(u)}},this.isValidPing=async t=>{if(!Fr(t)){const{message:s}=ge("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(s)}const{topic:i}=t;await this.isValidSessionOrPairingTopic(i)},this.isValidEmit=async t=>{if(!Fr(t)){const{message:f}=ge("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(f)}const{topic:i,event:s,chainId:a}=t;await this.isValidSessionTopic(i);const{namespaces:u}=this.client.session.get(i);if(!fp(u,a)){const{message:f}=ge("MISSING_OR_INVALID",`emit() chainId: ${a}`);throw new Error(f)}if(!PS(s)){const{message:f}=ge("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(s)}`);throw new Error(f)}if(!NS(u,a,s.name)){const{message:f}=ge("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(s)}`);throw new Error(f)}},this.isValidDisconnect=async t=>{if(!Fr(t)){const{message:s}=ge("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(s)}const{topic:i}=t;await this.isValidSessionOrPairingTopic(i)},this.isValidAuthenticate=t=>{const{chains:i,uri:s,domain:a,nonce:u}=t;if(!Array.isArray(i)||i.length===0)throw new Error("chains is required and must be a non-empty array");if(!Zt(s,!1))throw new Error("uri is required parameter");if(!Zt(a,!1))throw new Error("domain is required parameter");if(!Zt(u,!1))throw new Error("nonce is required parameter");if([...new Set(i.map(p=>Jo(p).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:f}=Jo(i[0]);if(f!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(t,i)=>{const s={verified:{verifyUrl:i.verifyUrl||Wo,validation:"UNKNOWN",origin:i.url||""}};try{const a=await this.client.core.verify.resolve({attestationId:t,verifyUrl:i.verifyUrl});a&&(s.verified.origin=a.origin,s.verified.isScam=a.isScam,s.verified.validation=a.origin===new URL(i.url).origin?"VALID":"INVALID")}catch(a){this.client.logger.info(a)}return this.client.logger.info(`Verify context: ${JSON.stringify(s)}`),s},this.validateSessionProps=(t,i)=>{Object.values(t).forEach(s=>{if(!Zt(s,!1)){const{message:a}=ge("MISSING_OR_INVALID",`${i} must be in Record format. Received: ${JSON.stringify(s)}`);throw new Error(a)}})},this.getPendingAuthRequest=t=>{const i=this.client.auth.requests.get(t);return typeof i=="object"?i:void 0},this.addToRecentlyDeleted=(t,i)=>{if(this.recentlyDeletedMap.set(t,i),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let s=0;const a=this.recentlyDeletedLimit/2;for(const u of this.recentlyDeletedMap.keys()){if(s++>=a)break;this.recentlyDeletedMap.delete(u)}}},this.checkRecentlyDeleted=t=>{const i=this.recentlyDeletedMap.get(t);if(i){const{message:s}=ge("MISSING_OR_INVALID",`Record was recently deleted - ${i}: ${t}`);throw new Error(s)}}}async isInitialized(){if(!this.initialized){const{message:e}=ge("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(kr.message,e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):this.onRelayMessage(e)})}async onRelayMessage(e){const{topic:t,message:i}=e,{publicKey:s}=this.client.auth.authKeys.keys.includes(zc)?this.client.auth.authKeys.get(zc):{responseTopic:void 0,publicKey:void 0},a=await this.client.core.crypto.decode(t,i,{receiverPublicKey:s});try{rf(a)?(this.client.core.history.set(t,a),this.onRelayEventRequest({topic:t,payload:a})):gu(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:t,payload:a}),this.client.core.history.delete(t,a.id)):this.onRelayEventUnknownPayload({topic:t,payload:a})}catch(u){this.client.logger.error(u)}}registerExpirerEvents(){this.client.core.expirer.on(bi.expired,async e=>{const{topic:t,id:i}=Yg(e.target);if(i&&this.client.pendingRequest.keys.includes(i))return await this.deletePendingSessionRequest(i,ge("EXPIRED"),!0);if(i&&this.client.auth.requests.keys.includes(i))return await this.deletePendingAuthRequest(i,ge("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):i&&(await this.deleteProposal(i,!0),this.client.events.emit("proposal_expire",{id:i}))})}registerPairingEvents(){this.client.core.pairing.events.on(ro.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(ro.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Zt(e,!1)){const{message:t}=ge("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=ge("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if(kn(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=ge("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!Zt(e,!1)){const{message:t}=ge("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:t}=ge("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if(kn(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:t}=ge("EXPIRED",`session topic: ${e}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(e)){const{message:t}=ge("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Zt(e,!1)){const{message:t}=ge("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}else{const{message:t}=ge("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}async isValidProposalId(e){if(!DS(e)){const{message:t}=ge("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=ge("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if(kn(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:t}=ge("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class z7 extends Cs{constructor(e,t){super(e,t,D7,of),this.core=e,this.logger=t}}class k7 extends Cs{constructor(e,t){super(e,t,x7,of),this.core=e,this.logger=t}}class H7 extends Cs{constructor(e,t){super(e,t,C7,of,i=>i.id),this.core=e,this.logger=t}}class K7 extends Cs{constructor(e,t){super(e,t,R7,vu,()=>zc),this.core=e,this.logger=t}}class V7 extends Cs{constructor(e,t){super(e,t,T7,vu),this.core=e,this.logger=t}}class G7 extends Cs{constructor(e,t){super(e,t,U7,vu,i=>i.id),this.core=e,this.logger=t}}class Y7{constructor(e,t){this.core=e,this.logger=t,this.authKeys=new K7(this.core,this.logger),this.pairingTopics=new V7(this.core,this.logger),this.requests=new G7(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class af extends o4{constructor(e){super(e),this.protocol=dm,this.version=pm,this.name=tl.name,this.events=new Si.EventEmitter,this.on=(i,s)=>this.events.on(i,s),this.once=(i,s)=>this.events.once(i,s),this.off=(i,s)=>this.events.off(i,s),this.removeListener=(i,s)=>this.events.removeListener(i,s),this.removeAllListeners=i=>this.events.removeAllListeners(i),this.connect=async i=>{try{return await this.engine.connect(i)}catch(s){throw this.logger.error(s.message),s}},this.pair=async i=>{try{return await this.engine.pair(i)}catch(s){throw this.logger.error(s.message),s}},this.approve=async i=>{try{return await this.engine.approve(i)}catch(s){throw this.logger.error(s.message),s}},this.reject=async i=>{try{return await this.engine.reject(i)}catch(s){throw this.logger.error(s.message),s}},this.update=async i=>{try{return await this.engine.update(i)}catch(s){throw this.logger.error(s.message),s}},this.extend=async i=>{try{return await this.engine.extend(i)}catch(s){throw this.logger.error(s.message),s}},this.request=async i=>{try{return await this.engine.request(i)}catch(s){throw this.logger.error(s.message),s}},this.respond=async i=>{try{return await this.engine.respond(i)}catch(s){throw this.logger.error(s.message),s}},this.ping=async i=>{try{return await this.engine.ping(i)}catch(s){throw this.logger.error(s.message),s}},this.emit=async i=>{try{return await this.engine.emit(i)}catch(s){throw this.logger.error(s.message),s}},this.disconnect=async i=>{try{return await this.engine.disconnect(i)}catch(s){throw this.logger.error(s.message),s}},this.find=i=>{try{return this.engine.find(i)}catch(s){throw this.logger.error(s.message),s}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(i){throw this.logger.error(i.message),i}},this.authenticate=async i=>{try{return await this.engine.authenticate(i)}catch(s){throw this.logger.error(s.message),s}},this.formatAuthMessage=i=>{try{return this.engine.formatAuthMessage(i)}catch(s){throw this.logger.error(s.message),s}},this.approveSessionAuthenticate=async i=>{try{return await this.engine.approveSessionAuthenticate(i)}catch(s){throw this.logger.error(s.message),s}},this.rejectSessionAuthenticate=async i=>{try{return await this.engine.rejectSessionAuthenticate(i)}catch(s){throw this.logger.error(s.message),s}},this.name=(e==null?void 0:e.name)||tl.name,this.metadata=(e==null?void 0:e.metadata)||BE(),this.signConfig=e==null?void 0:e.signConfig;const t=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:ya(fu({level:(e==null?void 0:e.logger)||tl.logger}));this.core=(e==null?void 0:e.core)||new I7(e),this.logger=Gr(t,this.name),this.session=new k7(this.core,this.logger),this.proposal=new z7(this.core,this.logger),this.pendingRequest=new H7(this.core,this.logger),this.engine=new $7(this),this.auth=new Y7(this.core,this.logger)}static async init(e){const t=new af(e);return await t.initialize(),t}get context(){return Vr(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success"),this.engine.processRelayMessageCache()}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var Nl={exports:{}};(function(r,e){var t=typeof self<"u"?self:Bi,i=function(){function a(){this.fetch=!1,this.DOMException=t.DOMException}return a.prototype=t,new a}();(function(a){(function(u){var f={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 p(h){return h&&DataView.prototype.isPrototypeOf(h)}if(f.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(h){return h&&d.indexOf(Object.prototype.toString.call(h))>-1};function E(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function x(h){return typeof h!="string"&&(h=String(h)),h}function D(h){var w={next:function(){var S=h.shift();return{done:S===void 0,value:S}}};return f.iterable&&(w[Symbol.iterator]=function(){return w}),w}function C(h){this.map={},h instanceof C?h.forEach(function(w,S){this.append(S,w)},this):Array.isArray(h)?h.forEach(function(w){this.append(w[0],w[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(w){this.append(w,h[w])},this)}C.prototype.append=function(h,w){h=E(h),w=x(w);var S=this.map[h];this.map[h]=S?S+", "+w:w},C.prototype.delete=function(h){delete this.map[E(h)]},C.prototype.get=function(h){return h=E(h),this.has(h)?this.map[h]:null},C.prototype.has=function(h){return this.map.hasOwnProperty(E(h))},C.prototype.set=function(h,w){this.map[E(h)]=x(w)},C.prototype.forEach=function(h,w){for(var S in this.map)this.map.hasOwnProperty(S)&&h.call(w,this.map[S],S,this)},C.prototype.keys=function(){var h=[];return this.forEach(function(w,S){h.push(S)}),D(h)},C.prototype.values=function(){var h=[];return this.forEach(function(w){h.push(w)}),D(h)},C.prototype.entries=function(){var h=[];return this.forEach(function(w,S){h.push([S,w])}),D(h)},f.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function Q(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function G(h){return new Promise(function(w,S){h.onload=function(){w(h.result)},h.onerror=function(){S(h.error)}})}function ee(h){var w=new FileReader,S=G(w);return w.readAsArrayBuffer(h),S}function K(h){var w=new FileReader,S=G(w);return w.readAsText(h),S}function V(h){for(var w=new Uint8Array(h),S=new Array(w.length),M=0;M-1?w:h}function T(h,w){w=w||{};var S=w.body;if(h instanceof T){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,w.headers||(this.headers=new C(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!S&&h._bodyInit!=null&&(S=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new C(w.headers)),this.method=y(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&S)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(S)}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function ne(h){var w=new FormData;return h.trim().split("&").forEach(function(S){if(S){var M=S.split("="),O=M.shift().replace(/\+/g," "),U=M.join("=").replace(/\+/g," ");w.append(decodeURIComponent(O),decodeURIComponent(U))}}),w}function fe(h){var w=new C,S=h.replace(/\r?\n[\t ]+/g," ");return S.split(/\r?\n/).forEach(function(M){var O=M.split(":"),U=O.shift().trim();if(U){var I=O.join(":").trim();w.append(U,I)}}),w}$.call(T.prototype);function le(h,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new C(w.headers),this.url=w.url||"",this._initBody(h)}$.call(le.prototype),le.prototype.clone=function(){return new le(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})},le.error=function(){var h=new le(null,{status:0,statusText:""});return h.type="error",h};var me=[301,302,303,307,308];le.redirect=function(h,w){if(me.indexOf(w)===-1)throw new RangeError("Invalid status code");return new le(null,{status:w,headers:{location:h}})},u.DOMException=a.DOMException;try{new u.DOMException}catch{u.DOMException=function(w,S){this.message=w,this.name=S;var M=Error(w);this.stack=M.stack},u.DOMException.prototype=Object.create(Error.prototype),u.DOMException.prototype.constructor=u.DOMException}function l(h,w){return new Promise(function(S,M){var O=new T(h,w);if(O.signal&&O.signal.aborted)return M(new u.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function I(){U.abort()}U.onload=function(){var g={status:U.status,statusText:U.statusText,headers:fe(U.getAllResponseHeaders()||"")};g.url="responseURL"in U?U.responseURL:g.headers.get("X-Request-URL");var N="response"in U?U.response:U.responseText;S(new le(N,g))},U.onerror=function(){M(new TypeError("Network request failed"))},U.ontimeout=function(){M(new TypeError("Network request failed"))},U.onabort=function(){M(new u.DOMException("Aborted","AbortError"))},U.open(O.method,O.url,!0),O.credentials==="include"?U.withCredentials=!0:O.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&f.blob&&(U.responseType="blob"),O.headers.forEach(function(g,N){U.setRequestHeader(N,g)}),O.signal&&(O.signal.addEventListener("abort",I),U.onreadystatechange=function(){U.readyState===4&&O.signal.removeEventListener("abort",I)}),U.send(typeof O._bodyInit>"u"?null:O._bodyInit)})}return l.polyfill=!0,a.fetch||(a.fetch=l,a.Headers=C,a.Request=T,a.Response=le),u.Headers=C,u.Request=T,u.Response=le,u.fetch=l,Object.defineProperty(u,"__esModule",{value:!0}),u})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=i;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,r.exports=e})(Nl,Nl.exports);var Q7=Nl.exports;const tg=iu(Q7);var W7=Object.defineProperty,J7=Object.defineProperties,X7=Object.getOwnPropertyDescriptors,rg=Object.getOwnPropertySymbols,Z7=Object.prototype.hasOwnProperty,eM=Object.prototype.propertyIsEnumerable,ig=(r,e,t)=>e in r?W7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ng=(r,e)=>{for(var t in e||(e={}))Z7.call(e,t)&&ig(r,t,e[t]);if(rg)for(var t of rg(e))eM.call(e,t)&&ig(r,t,e[t]);return r},sg=(r,e)=>J7(r,X7(e));const tM={Accept:"application/json","Content-Type":"application/json"},rM="POST",og={headers:tM,method:rM},ag=10;class Cn{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new Si.EventEmitter,this.isAvailable=!1,this.registering=!1,!Pp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=xn(e),i=await(await tg(this.url,sg(ng({},og),{body:t}))).json();this.onPayload({data:i})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Pp(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((i,s)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),s(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return s(new Error("HTTP connection is missing or invalid"));i()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=xn({id:1,jsonrpc:"2.0",method:"test",params:[]});await tg(e,sg(ng({},og),{body:t}))}this.onOpen()}catch(t){const i=this.parseError(t);throw this.events.emit("register_error",i),this.onClose(),i}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?ma(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const i=this.parseError(t),s=i.message||i.toString(),a=pu(e,s);this.events.emit("payload",a)}parseError(e,t=this.url){return Q1(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>ag&&this.events.setMaxListeners(ag)}}const cg="error",iM="wss://relay.walletconnect.com",nM="wc",sM="universal_provider",ug=`${nM}@2:${sM}:`,oM="https://rpc.walletconnect.com/v1/",eo="generic",un={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Vo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rl={exports:{}};/** +* @license +* Lodash +* Copyright OpenJS Foundation and other contributors +* Released under MIT license +* Based on Underscore.js 1.8.3 +* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +*/(function(r,e){(function(){var t,i="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",f="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",d=500,b="__lodash_placeholder__",E=1,x=2,D=4,C=1,Q=2,G=1,ee=2,K=4,V=8,q=16,$=32,z=64,y=128,T=256,ne=512,fe=30,le="...",me=800,l=16,h=1,w=2,S=3,M=1/0,O=9007199254740991,U=17976931348623157e292,I=NaN,g=4294967295,N=g-1,ie=g>>>1,de=[["ary",y],["bind",G],["bindKey",ee],["curry",V],["curryRight",q],["flip",ne],["partial",$],["partialRight",z],["rearg",T]],_="[object Arguments]",Z="[object Array]",L="[object AsyncFunction]",j="[object Boolean]",k="[object Date]",m="[object DOMException]",B="[object Error]",te="[object Function]",ue="[object GeneratorFunction]",ae="[object Map]",Me="[object Number]",Pe="[object Null]",Ie="[object Object]",Et="[object Promise]",$e="[object Proxy]",xe="[object RegExp]",Le="[object Set]",_e="[object String]",Ee="[object Symbol]",Ve="[object Undefined]",we="[object WeakMap]",Ae="[object WeakSet]",Be="[object ArrayBuffer]",be="[object DataView]",Ce="[object Float32Array]",qe="[object Float64Array]",Oe="[object Int8Array]",Ne="[object Int16Array]",st="[object Int32Array]",Te="[object Uint8Array]",Re="[object Uint8ClampedArray]",Ht="[object Uint16Array]",ct="[object Uint32Array]",pt=/\b__p \+= '';/g,Kt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,Er=/[&<>"']/g,Ge=RegExp(_t.source),ze=RegExp(Er.source),It=/<%-([\s\S]+?)%>/g,Ye=/<%([\s\S]+?)%>/g,Ke=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Je=/^\w*$/,Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dt=/[\\^$.*+?()[\]{}|]/g,Ze=RegExp(Dt.source),Qe=/^\s+/,Mt=/\s/,We=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,je=/\{\n\/\* \[wrapped with (.+)\] \*/,Rt=/,? & /,et=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ct=/[()=,{}\[\]\/\s]/,Ii=/\\(\\)?/g,Pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lt=/\w*$/,ni=/^[-+]0x[0-9a-f]+$/i,si=/^0b[01]+$/i,oi=/^\[object .+?Constructor\]$/,ai=/^0o[0-7]+$/i,ci=/^(?:0|[1-9]\d*)$/,or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qi=/($^)/,Wn=/['\n\r\u2028\u2029\\]/g,ji="\\ud800-\\udfff",Jn="\\u0300-\\u036f",Xn="\\ufe20-\\ufe2f",Fi="\\u20d0-\\u20ff",Pn=Jn+Xn+Fi,On="\\u2700-\\u27bf",Ar="a-z\\xdf-\\xf6\\xf8-\\xff",Zn="\\xac\\xb1\\xd7\\xf7",es="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ts="\\u2000-\\u206f",rs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_a="A-Z\\xc0-\\xd6\\xd8-\\xde",Ea="\\ufe0e\\ufe0f",is=Zn+es+ts+rs,wo="['’]",ns="["+ji+"]",bo="["+is+"]",ss="["+Pn+"]",Aa="\\d+",yu="["+On+"]",Sa="["+Ar+"]",Ia="[^"+ji+is+Aa+On+Ar+_a+"]",Os="\\ud83c[\\udffb-\\udfff]",wu="(?:"+ss+"|"+Os+")",Da="[^"+ji+"]",Ns="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",Yr="["+_a+"]",xa="\\u200d",Ma="(?:"+Sa+"|"+Ia+")",$i="(?:"+Yr+"|"+Ia+")",Ca="(?:"+wo+"(?:d|ll|m|re|s|t|ve))?",Pa="(?:"+wo+"(?:D|LL|M|RE|S|T|VE))?",Oa=wu+"?",Na="["+Ea+"]?",bu="(?:"+xa+"(?:"+[Da,Ns,Nn].join("|")+")"+Na+Oa+")*",hn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ra="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ta=Na+Oa+bu,Rs="(?:"+[yu,Ns,Nn].join("|")+")"+Ta,_u="(?:"+[Da+ss+"?",ss,Ns,Nn,ns].join("|")+")",_o=RegExp(wo,"g"),Eu=RegExp(ss,"g"),Ts=RegExp(Os+"(?="+Os+")|"+_u+Ta,"g"),Ua=RegExp([Yr+"?"+Sa+"+"+Ca+"(?="+[bo,Yr,"$"].join("|")+")",$i+"+"+Pa+"(?="+[bo,Yr+Ma,"$"].join("|")+")",Yr+"?"+Ma+"+"+Ca,Yr+"+"+Pa,Ra,hn,Aa,Rs].join("|"),"g"),Ba=RegExp("["+xa+ji+Pn+Ea+"]"),os=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,La=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Au=-1,Ut={};Ut[Ce]=Ut[qe]=Ut[Oe]=Ut[Ne]=Ut[st]=Ut[Te]=Ut[Re]=Ut[Ht]=Ut[ct]=!0,Ut[_]=Ut[Z]=Ut[Be]=Ut[j]=Ut[be]=Ut[k]=Ut[B]=Ut[te]=Ut[ae]=Ut[Me]=Ut[Ie]=Ut[xe]=Ut[Le]=Ut[_e]=Ut[we]=!1;var Tt={};Tt[_]=Tt[Z]=Tt[Be]=Tt[be]=Tt[j]=Tt[k]=Tt[Ce]=Tt[qe]=Tt[Oe]=Tt[Ne]=Tt[st]=Tt[ae]=Tt[Me]=Tt[Ie]=Tt[xe]=Tt[Le]=Tt[_e]=Tt[Ee]=Tt[Te]=Tt[Re]=Tt[Ht]=Tt[ct]=!0,Tt[B]=Tt[te]=Tt[we]=!1;var F={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},W={"&":"&","<":"<",">":">",'"':""","'":"'"},he={"&":"&","<":"<",">":">",""":'"',"'":"'"},Se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bt=parseFloat,rt=parseInt,$t=typeof Vo=="object"&&Vo&&Vo.Object===Object&&Vo,er=typeof self=="object"&&self&&self.Object===Object&&self,wt=$t||er||Function("return this")(),Lt=e&&!e.nodeType&&e,Qt=Lt&&!0&&r&&!r.nodeType&&r,Rr=Qt&&Qt.exports===Lt,tr=Rr&&$t.process,zt=function(){try{var J=Qt&&Qt.require&&Qt.require("util").types;return J||tr&&tr.binding&&tr.binding("util")}catch{}}(),Sr=zt&&zt.isArrayBuffer,Di=zt&&zt.isDate,ui=zt&&zt.isMap,zi=zt&&zt.isRegExp,Eo=zt&&zt.isSet,as=zt&&zt.isTypedArray;function ar(J,se,re){switch(re.length){case 0:return J.call(se);case 1:return J.call(se,re[0]);case 2:return J.call(se,re[0],re[1]);case 3:return J.call(se,re[0],re[1],re[2])}return J.apply(se,re)}function wm(J,se,re,De){for(var tt=-1,St=J==null?0:J.length;++tt-1}function Su(J,se,re){for(var De=-1,tt=J==null?0:J.length;++De-1;);return re}function vf(J,se){for(var re=J.length;re--&&Us(se,J[re],0)>-1;);return re}function Mm(J,se){for(var re=J.length,De=0;re--;)J[re]===se&&++De;return De}var Cm=Mu(F),Pm=Mu(W);function Om(J){return"\\"+Se[J]}function Nm(J,se){return J==null?t:J[se]}function Bs(J){return Ba.test(J)}function Rm(J){return os.test(J)}function Tm(J){for(var se,re=[];!(se=J.next()).done;)re.push(se.value);return re}function Nu(J){var se=-1,re=Array(J.size);return J.forEach(function(De,tt){re[++se]=[tt,De]}),re}function yf(J,se){return function(re){return J(se(re))}}function Un(J,se){for(var re=-1,De=J.length,tt=0,St=[];++re-1}function _v(n,o){var c=this.__data__,v=tc(c,n);return v<0?(++this.size,c.push([n,o])):c[v][1]=o,this}ln.prototype.clear=vv,ln.prototype.delete=yv,ln.prototype.get=wv,ln.prototype.has=bv,ln.prototype.set=_v;function fn(n){var o=-1,c=n==null?0:n.length;for(this.clear();++o=o?n:o)),n}function di(n,o,c,v,A,R){var H,Y=o&E,X=o&x,oe=o&D;if(c&&(H=A?c(n,v,A,R):c(n)),H!==t)return H;if(!Vt(n))return n;var ce=it(n);if(ce){if(H=Iy(n),!Y)return Tr(n,H)}else{var pe=wr(n),ve=pe==te||pe==ue;if($n(n))return ed(n,Y);if(pe==Ie||pe==_||ve&&!A){if(H=X||ve?{}:wd(n),!Y)return X?py(n,Lv(H,n)):dy(n,Pf(H,n))}else{if(!Tt[pe])return A?n:{};H=Dy(n,pe,Y)}}R||(R=new Mi);var Ue=R.get(n);if(Ue)return Ue;R.set(n,H),Yd(n)?n.forEach(function(He){H.add(di(He,o,c,He,n,R))}):Vd(n)&&n.forEach(function(He,ft){H.set(ft,di(He,o,c,ft,n,R))});var ke=oe?X?nh:ih:X?Br:cr,ut=ce?t:ke(n);return hi(ut||n,function(He,ft){ut&&(ft=He,He=n[ft]),Co(H,ft,di(He,o,c,ft,n,R))}),H}function qv(n){var o=cr(n);return function(c){return Of(c,n,o)}}function Of(n,o,c){var v=c.length;if(n==null)return!v;for(n=qt(n);v--;){var A=c[v],R=o[A],H=n[A];if(H===t&&!(A in n)||!R(H))return!1}return!0}function Nf(n,o,c){if(typeof n!="function")throw new li(u);return Bo(function(){n.apply(t,c)},o)}function Po(n,o,c,v){var A=-1,R=qa,H=!0,Y=n.length,X=[],oe=o.length;if(!Y)return X;c&&(o=kt(o,Qr(c))),v?(R=Su,H=!1):o.length>=s&&(R=Ao,H=!1,o=new hs(o));e:for(;++AA?0:A+c),v=v===t||v>A?A:at(v),v<0&&(v+=A),v=c>v?0:Wd(v);c0&&c(Y)?o>1?lr(Y,o-1,c,v,A):Tn(A,Y):v||(A[A.length]=Y)}return A}var ju=od(),Uf=od(!0);function ki(n,o){return n&&ju(n,o,cr)}function Fu(n,o){return n&&Uf(n,o,cr)}function ic(n,o){return Rn(o,function(c){return vn(n[c])})}function fs(n,o){o=jn(o,n);for(var c=0,v=o.length;n!=null&&co}function $v(n,o){return n!=null&&Ot.call(n,o)}function zv(n,o){return n!=null&&o in qt(n)}function kv(n,o,c){return n>=yr(o,c)&&n=120&&ce.length>=120)?new hs(H&&ce):t}ce=n[0];var pe=-1,ve=Y[0];e:for(;++pe-1;)Y!==n&&Ya.call(Y,X,1),Ya.call(n,X,1);return n}function Vf(n,o){for(var c=n?o.length:0,v=c-1;c--;){var A=o[c];if(c==v||A!==R){var R=A;mn(A)?Ya.call(n,A,1):Wu(n,A)}}return n}function Gu(n,o){return n+Ja(Df()*(o-n+1))}function ry(n,o,c,v){for(var A=-1,R=ir(Wa((o-n)/(c||1)),0),H=re(R);R--;)H[v?R:++A]=n,n+=c;return H}function Yu(n,o){var c="";if(!n||o<1||o>O)return c;do o%2&&(c+=n),o=Ja(o/2),o&&(n+=n);while(o);return c}function ht(n,o){return lh(Ed(n,o,Lr),n+"")}function iy(n){return Cf(Gs(n))}function ny(n,o){var c=Gs(n);return pc(c,ls(o,0,c.length))}function Ro(n,o,c,v){if(!Vt(n))return n;o=jn(o,n);for(var A=-1,R=o.length,H=R-1,Y=n;Y!=null&&++AA?0:A+o),c=c>A?A:c,c<0&&(c+=A),A=o>c?0:c-o>>>0,o>>>=0;for(var R=re(A);++v>>1,H=n[R];H!==null&&!Jr(H)&&(c?H<=o:H=s){var oe=o?null:yy(n);if(oe)return Fa(oe);H=!1,A=Ao,X=new hs}else X=o?[]:Y;e:for(;++v=v?n:pi(n,o,c)}var Zf=Qm||function(n){return wt.clearTimeout(n)};function ed(n,o){if(o)return n.slice();var c=n.length,v=_f?_f(c):new n.constructor(c);return n.copy(v),v}function eh(n){var o=new n.constructor(n.byteLength);return new Va(o).set(new Va(n)),o}function uy(n,o){var c=o?eh(n.buffer):n.buffer;return new n.constructor(c,n.byteOffset,n.byteLength)}function hy(n){var o=new n.constructor(n.source,lt.exec(n));return o.lastIndex=n.lastIndex,o}function ly(n){return Mo?qt(Mo.call(n)):{}}function td(n,o){var c=o?eh(n.buffer):n.buffer;return new n.constructor(c,n.byteOffset,n.length)}function rd(n,o){if(n!==o){var c=n!==t,v=n===null,A=n===n,R=Jr(n),H=o!==t,Y=o===null,X=o===o,oe=Jr(o);if(!Y&&!oe&&!R&&n>o||R&&H&&X&&!Y&&!oe||v&&H&&X||!c&&X||!A)return 1;if(!v&&!R&&!oe&&n=Y)return X;var oe=c[v];return X*(oe=="desc"?-1:1)}}return n.index-o.index}function id(n,o,c,v){for(var A=-1,R=n.length,H=c.length,Y=-1,X=o.length,oe=ir(R-H,0),ce=re(X+oe),pe=!v;++Y1?c[A-1]:t,H=A>2?c[2]:t;for(R=n.length>3&&typeof R=="function"?(A--,R):t,H&&Dr(c[0],c[1],H)&&(R=A<3?t:R,A=1),o=qt(o);++v-1?A[R?o[H]:H]:t}}function ud(n){return gn(function(o){var c=o.length,v=c,A=fi.prototype.thru;for(n&&o.reverse();v--;){var R=o[v];if(typeof R!="function")throw new li(u);if(A&&!H&&fc(R)=="wrapper")var H=new fi([],!0)}for(v=H?v:c;++v1&&bt.reverse(),ce&&XY))return!1;var oe=R.get(n),ce=R.get(o);if(oe&&ce)return oe==o&&ce==n;var pe=-1,ve=!0,Ue=c&Q?new hs:t;for(R.set(n,o),R.set(o,n);++pe1?"& ":"")+o[v],o=o.join(c>2?", ":" "),n.replace(We,`{ +/* [wrapped with `+o+`] */ +`)}function My(n){return it(n)||gs(n)||!!(Sf&&n&&n[Sf])}function mn(n,o){var c=typeof n;return o=o??O,!!o&&(c=="number"||c!="symbol"&&ci.test(n))&&n>-1&&n%1==0&&n0){if(++o>=me)return arguments[0]}else o=0;return n.apply(t,arguments)}}function pc(n,o){var c=-1,v=n.length,A=v-1;for(o=o===t?v:o;++c1?n[o-1]:t;return c=typeof c=="function"?(n.pop(),c):t,Td(n,c)});function Ud(n){var o=P(n);return o.__chain__=!0,o}function jw(n,o){return o(n),n}function gc(n,o){return o(n)}var Fw=gn(function(n){var o=n.length,c=o?n[0]:0,v=this.__wrapped__,A=function(R){return qu(R,n)};return o>1||this.__actions__.length||!(v instanceof gt)||!mn(c)?this.thru(A):(v=v.slice(c,+c+(o?1:0)),v.__actions__.push({func:gc,args:[A],thisArg:t}),new fi(v,this.__chain__).thru(function(R){return o&&!R.length&&R.push(t),R}))});function $w(){return Ud(this)}function zw(){return new fi(this.value(),this.__chain__)}function kw(){this.__values__===t&&(this.__values__=Qd(this.value()));var n=this.__index__>=this.__values__.length,o=n?t:this.__values__[this.__index__++];return{done:n,value:o}}function Hw(){return this}function Kw(n){for(var o,c=this;c instanceof ec;){var v=Md(c);v.__index__=0,v.__values__=t,o?A.__wrapped__=v:o=v;var A=v;c=c.__wrapped__}return A.__wrapped__=n,o}function Vw(){var n=this.__wrapped__;if(n instanceof gt){var o=n;return this.__actions__.length&&(o=new gt(this)),o=o.reverse(),o.__actions__.push({func:gc,args:[fh],thisArg:t}),new fi(o,this.__chain__)}return this.thru(fh)}function Gw(){return Jf(this.__wrapped__,this.__actions__)}var Yw=ac(function(n,o,c){Ot.call(n,c)?++n[c]:dn(n,c,1)});function Qw(n,o,c){var v=it(n)?hf:jv;return c&&Dr(n,o,c)&&(o=t),v(n,Fe(o,3))}function Ww(n,o){var c=it(n)?Rn:Tf;return c(n,Fe(o,3))}var Jw=cd(Cd),Xw=cd(Pd);function Zw(n,o){return lr(mc(n,o),1)}function eb(n,o){return lr(mc(n,o),M)}function tb(n,o,c){return c=c===t?1:at(c),lr(mc(n,o),c)}function Bd(n,o){var c=it(n)?hi:Ln;return c(n,Fe(o,3))}function Ld(n,o){var c=it(n)?bm:Rf;return c(n,Fe(o,3))}var rb=ac(function(n,o,c){Ot.call(n,c)?n[c].push(o):dn(n,c,[o])});function ib(n,o,c,v){n=Ur(n)?n:Gs(n),c=c&&!v?at(c):0;var A=n.length;return c<0&&(c=ir(A+c,0)),_c(n)?c<=A&&n.indexOf(o,c)>-1:!!A&&Us(n,o,c)>-1}var nb=ht(function(n,o,c){var v=-1,A=typeof o=="function",R=Ur(n)?re(n.length):[];return Ln(n,function(H){R[++v]=A?ar(o,H,c):Oo(H,o,c)}),R}),sb=ac(function(n,o,c){dn(n,c,o)});function mc(n,o){var c=it(n)?kt:Ff;return c(n,Fe(o,3))}function ob(n,o,c,v){return n==null?[]:(it(o)||(o=o==null?[]:[o]),c=v?t:c,it(c)||(c=c==null?[]:[c]),Hf(n,o,c))}var ab=ac(function(n,o,c){n[c?0:1].push(o)},function(){return[[],[]]});function cb(n,o,c){var v=it(n)?Iu:pf,A=arguments.length<3;return v(n,Fe(o,4),c,A,Ln)}function ub(n,o,c){var v=it(n)?_m:pf,A=arguments.length<3;return v(n,Fe(o,4),c,A,Rf)}function hb(n,o){var c=it(n)?Rn:Tf;return c(n,wc(Fe(o,3)))}function lb(n){var o=it(n)?Cf:iy;return o(n)}function fb(n,o,c){(c?Dr(n,o,c):o===t)?o=1:o=at(o);var v=it(n)?Tv:ny;return v(n,o)}function db(n){var o=it(n)?Uv:oy;return o(n)}function pb(n){if(n==null)return 0;if(Ur(n))return _c(n)?Ls(n):n.length;var o=wr(n);return o==ae||o==Le?n.size:Hu(n).length}function gb(n,o,c){var v=it(n)?Du:ay;return c&&Dr(n,o,c)&&(o=t),v(n,Fe(o,3))}var mb=ht(function(n,o){if(n==null)return[];var c=o.length;return c>1&&Dr(n,o[0],o[1])?o=[]:c>2&&Dr(o[0],o[1],o[2])&&(o=[o[0]]),Hf(n,lr(o,1),[])}),vc=Wm||function(){return wt.Date.now()};function vb(n,o){if(typeof o!="function")throw new li(u);return n=at(n),function(){if(--n<1)return o.apply(this,arguments)}}function qd(n,o,c){return o=c?t:o,o=n&&o==null?n.length:o,pn(n,y,t,t,t,t,o)}function jd(n,o){var c;if(typeof o!="function")throw new li(u);return n=at(n),function(){return--n>0&&(c=o.apply(this,arguments)),n<=1&&(o=t),c}}var ph=ht(function(n,o,c){var v=G;if(c.length){var A=Un(c,Ks(ph));v|=$}return pn(n,v,o,c,A)}),Fd=ht(function(n,o,c){var v=G|ee;if(c.length){var A=Un(c,Ks(Fd));v|=$}return pn(o,v,n,c,A)});function $d(n,o,c){o=c?t:o;var v=pn(n,V,t,t,t,t,t,o);return v.placeholder=$d.placeholder,v}function zd(n,o,c){o=c?t:o;var v=pn(n,q,t,t,t,t,t,o);return v.placeholder=zd.placeholder,v}function kd(n,o,c){var v,A,R,H,Y,X,oe=0,ce=!1,pe=!1,ve=!0;if(typeof n!="function")throw new li(u);o=mi(o)||0,Vt(c)&&(ce=!!c.leading,pe="maxWait"in c,R=pe?ir(mi(c.maxWait)||0,o):R,ve="trailing"in c?!!c.trailing:ve);function Ue(Jt){var Pi=v,wn=A;return v=A=t,oe=Jt,H=n.apply(wn,Pi),H}function ke(Jt){return oe=Jt,Y=Bo(ft,o),ce?Ue(Jt):H}function ut(Jt){var Pi=Jt-X,wn=Jt-oe,c0=o-Pi;return pe?yr(c0,R-wn):c0}function He(Jt){var Pi=Jt-X,wn=Jt-oe;return X===t||Pi>=o||Pi<0||pe&&wn>=R}function ft(){var Jt=vc();if(He(Jt))return bt(Jt);Y=Bo(ft,ut(Jt))}function bt(Jt){return Y=t,ve&&v?Ue(Jt):(v=A=t,H)}function Xr(){Y!==t&&Zf(Y),oe=0,v=X=A=Y=t}function xr(){return Y===t?H:bt(vc())}function Zr(){var Jt=vc(),Pi=He(Jt);if(v=arguments,A=this,X=Jt,Pi){if(Y===t)return ke(X);if(pe)return Zf(Y),Y=Bo(ft,o),Ue(X)}return Y===t&&(Y=Bo(ft,o)),H}return Zr.cancel=Xr,Zr.flush=xr,Zr}var yb=ht(function(n,o){return Nf(n,1,o)}),wb=ht(function(n,o,c){return Nf(n,mi(o)||0,c)});function bb(n){return pn(n,ne)}function yc(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new li(u);var c=function(){var v=arguments,A=o?o.apply(this,v):v[0],R=c.cache;if(R.has(A))return R.get(A);var H=n.apply(this,v);return c.cache=R.set(A,H)||R,H};return c.cache=new(yc.Cache||fn),c}yc.Cache=fn;function wc(n){if(typeof n!="function")throw new li(u);return function(){var o=arguments;switch(o.length){case 0:return!n.call(this);case 1:return!n.call(this,o[0]);case 2:return!n.call(this,o[0],o[1]);case 3:return!n.call(this,o[0],o[1],o[2])}return!n.apply(this,o)}}function _b(n){return jd(2,n)}var Eb=cy(function(n,o){o=o.length==1&&it(o[0])?kt(o[0],Qr(Fe())):kt(lr(o,1),Qr(Fe()));var c=o.length;return ht(function(v){for(var A=-1,R=yr(v.length,c);++A=o}),gs=Lf(function(){return arguments}())?Lf:function(n){return Gt(n)&&Ot.call(n,"callee")&&!Af.call(n,"callee")},it=re.isArray,Lb=Sr?Qr(Sr):Kv;function Ur(n){return n!=null&&bc(n.length)&&!vn(n)}function Wt(n){return Gt(n)&&Ur(n)}function qb(n){return n===!0||n===!1||Gt(n)&&Ir(n)==j}var $n=Xm||Dh,jb=Di?Qr(Di):Vv;function Fb(n){return Gt(n)&&n.nodeType===1&&!Lo(n)}function $b(n){if(n==null)return!0;if(Ur(n)&&(it(n)||typeof n=="string"||typeof n.splice=="function"||$n(n)||Vs(n)||gs(n)))return!n.length;var o=wr(n);if(o==ae||o==Le)return!n.size;if(Uo(n))return!Hu(n).length;for(var c in n)if(Ot.call(n,c))return!1;return!0}function zb(n,o){return No(n,o)}function kb(n,o,c){c=typeof c=="function"?c:t;var v=c?c(n,o):t;return v===t?No(n,o,t,c):!!v}function mh(n){if(!Gt(n))return!1;var o=Ir(n);return o==B||o==m||typeof n.message=="string"&&typeof n.name=="string"&&!Lo(n)}function Hb(n){return typeof n=="number"&&If(n)}function vn(n){if(!Vt(n))return!1;var o=Ir(n);return o==te||o==ue||o==L||o==$e}function Kd(n){return typeof n=="number"&&n==at(n)}function bc(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=O}function Vt(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}function Gt(n){return n!=null&&typeof n=="object"}var Vd=ui?Qr(ui):Yv;function Kb(n,o){return n===o||ku(n,o,oh(o))}function Vb(n,o,c){return c=typeof c=="function"?c:t,ku(n,o,oh(o),c)}function Gb(n){return Gd(n)&&n!=+n}function Yb(n){if(Oy(n))throw new tt(a);return qf(n)}function Qb(n){return n===null}function Wb(n){return n==null}function Gd(n){return typeof n=="number"||Gt(n)&&Ir(n)==Me}function Lo(n){if(!Gt(n)||Ir(n)!=Ie)return!1;var o=Ga(n);if(o===null)return!0;var c=Ot.call(o,"constructor")&&o.constructor;return typeof c=="function"&&c instanceof c&&ka.call(c)==Vm}var vh=zi?Qr(zi):Qv;function Jb(n){return Kd(n)&&n>=-O&&n<=O}var Yd=Eo?Qr(Eo):Wv;function _c(n){return typeof n=="string"||!it(n)&&Gt(n)&&Ir(n)==_e}function Jr(n){return typeof n=="symbol"||Gt(n)&&Ir(n)==Ee}var Vs=as?Qr(as):Jv;function Xb(n){return n===t}function Zb(n){return Gt(n)&&wr(n)==we}function e2(n){return Gt(n)&&Ir(n)==Ae}var t2=lc(Ku),r2=lc(function(n,o){return n<=o});function Qd(n){if(!n)return[];if(Ur(n))return _c(n)?xi(n):Tr(n);if(So&&n[So])return Tm(n[So]());var o=wr(n),c=o==ae?Nu:o==Le?Fa:Gs;return c(n)}function yn(n){if(!n)return n===0?n:0;if(n=mi(n),n===M||n===-M){var o=n<0?-1:1;return o*U}return n===n?n:0}function at(n){var o=yn(n),c=o%1;return o===o?c?o-c:o:0}function Wd(n){return n?ls(at(n),0,g):0}function mi(n){if(typeof n=="number")return n;if(Jr(n))return I;if(Vt(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Vt(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=gf(n);var c=si.test(n);return c||ai.test(n)?rt(n.slice(2),c?2:8):ni.test(n)?I:+n}function Jd(n){return Hi(n,Br(n))}function i2(n){return n?ls(at(n),-O,O):n===0?n:0}function xt(n){return n==null?"":Wr(n)}var n2=ks(function(n,o){if(Uo(o)||Ur(o)){Hi(o,cr(o),n);return}for(var c in o)Ot.call(o,c)&&Co(n,c,o[c])}),Xd=ks(function(n,o){Hi(o,Br(o),n)}),Ec=ks(function(n,o,c,v){Hi(o,Br(o),n,v)}),s2=ks(function(n,o,c,v){Hi(o,cr(o),n,v)}),o2=gn(qu);function a2(n,o){var c=zs(n);return o==null?c:Pf(c,o)}var c2=ht(function(n,o){n=qt(n);var c=-1,v=o.length,A=v>2?o[2]:t;for(A&&Dr(o[0],o[1],A)&&(v=1);++c1),R}),Hi(n,nh(n),c),v&&(c=di(c,E|x|D,wy));for(var A=o.length;A--;)Wu(c,o[A]);return c});function D2(n,o){return e0(n,wc(Fe(o)))}var x2=gn(function(n,o){return n==null?{}:ey(n,o)});function e0(n,o){if(n==null)return{};var c=kt(nh(n),function(v){return[v]});return o=Fe(o),Kf(n,c,function(v,A){return o(v,A[0])})}function M2(n,o,c){o=jn(o,n);var v=-1,A=o.length;for(A||(A=1,n=t);++vo){var v=n;n=o,o=v}if(c||n%1||o%1){var A=Df();return yr(n+A*(o-n+Bt("1e-"+((A+"").length-1))),o)}return Gu(n,o)}var j2=Hs(function(n,o,c){return o=o.toLowerCase(),n+(c?i0(o):o)});function i0(n){return bh(xt(n).toLowerCase())}function n0(n){return n=xt(n),n&&n.replace(or,Cm).replace(Eu,"")}function F2(n,o,c){n=xt(n),o=Wr(o);var v=n.length;c=c===t?v:ls(at(c),0,v);var A=c;return c-=o.length,c>=0&&n.slice(c,A)==o}function $2(n){return n=xt(n),n&&ze.test(n)?n.replace(Er,Pm):n}function z2(n){return n=xt(n),n&&Ze.test(n)?n.replace(Dt,"\\$&"):n}var k2=Hs(function(n,o,c){return n+(c?"-":"")+o.toLowerCase()}),H2=Hs(function(n,o,c){return n+(c?" ":"")+o.toLowerCase()}),K2=ad("toLowerCase");function V2(n,o,c){n=xt(n),o=at(o);var v=o?Ls(n):0;if(!o||v>=o)return n;var A=(o-v)/2;return hc(Ja(A),c)+n+hc(Wa(A),c)}function G2(n,o,c){n=xt(n),o=at(o);var v=o?Ls(n):0;return o&&v>>0,c?(n=xt(n),n&&(typeof o=="string"||o!=null&&!vh(o))&&(o=Wr(o),!o&&Bs(n))?Fn(xi(n),0,c):n.split(o,c)):[]}var e3=Hs(function(n,o,c){return n+(c?" ":"")+bh(o)});function t3(n,o,c){return n=xt(n),c=c==null?0:ls(at(c),0,n.length),o=Wr(o),n.slice(c,c+o.length)==o}function r3(n,o,c){var v=P.templateSettings;c&&Dr(n,o,c)&&(o=t),n=xt(n),o=Ec({},o,v,pd);var A=Ec({},o.imports,v.imports,pd),R=cr(A),H=Ou(A,R),Y,X,oe=0,ce=o.interpolate||qi,pe="__p += '",ve=Ru((o.escape||qi).source+"|"+ce.source+"|"+(ce===Ke?Pt:qi).source+"|"+(o.evaluate||qi).source+"|$","g"),Ue="//# sourceURL="+(Ot.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Au+"]")+` +`;n.replace(ve,function(He,ft,bt,Xr,xr,Zr){return bt||(bt=Xr),pe+=n.slice(oe,Zr).replace(Wn,Om),ft&&(Y=!0,pe+=`' + +__e(`+ft+`) + +'`),xr&&(X=!0,pe+=`'; +`+xr+`; +__p += '`),bt&&(pe+=`' + +((__t = (`+bt+`)) == null ? '' : __t) + +'`),oe=Zr+He.length,He}),pe+=`'; +`;var ke=Ot.call(o,"variable")&&o.variable;if(!ke)pe=`with (obj) { +`+pe+` +} +`;else if(Ct.test(ke))throw new tt(f);pe=(X?pe.replace(pt,""):pe).replace(Kt,"$1").replace(yt,"$1;"),pe="function("+(ke||"obj")+`) { +`+(ke?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Y?", __e = _.escape":"")+(X?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+pe+`return __p +}`;var ut=o0(function(){return St(R,Ue+"return "+pe).apply(t,H)});if(ut.source=pe,mh(ut))throw ut;return ut}function i3(n){return xt(n).toLowerCase()}function n3(n){return xt(n).toUpperCase()}function s3(n,o,c){if(n=xt(n),n&&(c||o===t))return gf(n);if(!n||!(o=Wr(o)))return n;var v=xi(n),A=xi(o),R=mf(v,A),H=vf(v,A)+1;return Fn(v,R,H).join("")}function o3(n,o,c){if(n=xt(n),n&&(c||o===t))return n.slice(0,wf(n)+1);if(!n||!(o=Wr(o)))return n;var v=xi(n),A=vf(v,xi(o))+1;return Fn(v,0,A).join("")}function a3(n,o,c){if(n=xt(n),n&&(c||o===t))return n.replace(Qe,"");if(!n||!(o=Wr(o)))return n;var v=xi(n),A=mf(v,xi(o));return Fn(v,A).join("")}function c3(n,o){var c=fe,v=le;if(Vt(o)){var A="separator"in o?o.separator:A;c="length"in o?at(o.length):c,v="omission"in o?Wr(o.omission):v}n=xt(n);var R=n.length;if(Bs(n)){var H=xi(n);R=H.length}if(c>=R)return n;var Y=c-Ls(v);if(Y<1)return v;var X=H?Fn(H,0,Y).join(""):n.slice(0,Y);if(A===t)return X+v;if(H&&(Y+=X.length-Y),vh(A)){if(n.slice(Y).search(A)){var oe,ce=X;for(A.global||(A=Ru(A.source,xt(lt.exec(A))+"g")),A.lastIndex=0;oe=A.exec(ce);)var pe=oe.index;X=X.slice(0,pe===t?Y:pe)}}else if(n.indexOf(Wr(A),Y)!=Y){var ve=X.lastIndexOf(A);ve>-1&&(X=X.slice(0,ve))}return X+v}function u3(n){return n=xt(n),n&&Ge.test(n)?n.replace(_t,qm):n}var h3=Hs(function(n,o,c){return n+(c?" ":"")+o.toUpperCase()}),bh=ad("toUpperCase");function s0(n,o,c){return n=xt(n),o=c?t:o,o===t?Rm(n)?$m(n):Sm(n):n.match(o)||[]}var o0=ht(function(n,o){try{return ar(n,t,o)}catch(c){return mh(c)?c:new tt(c)}}),l3=gn(function(n,o){return hi(o,function(c){c=Ki(c),dn(n,c,ph(n[c],n))}),n});function f3(n){var o=n==null?0:n.length,c=Fe();return n=o?kt(n,function(v){if(typeof v[1]!="function")throw new li(u);return[c(v[0]),v[1]]}):[],ht(function(v){for(var A=-1;++AO)return[];var c=g,v=yr(n,g);o=Fe(o),n-=g;for(var A=Pu(v,o);++c0||o<0)?new gt(c):(n<0?c=c.takeRight(-n):n&&(c=c.drop(n)),o!==t&&(o=at(o),c=o<0?c.dropRight(-o):c.take(o-n)),c)},gt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},gt.prototype.toArray=function(){return this.take(g)},ki(gt.prototype,function(n,o){var c=/^(?:filter|find|map|reject)|While$/.test(o),v=/^(?:head|last)$/.test(o),A=P[v?"take"+(o=="last"?"Right":""):o],R=v||/^find/.test(o);A&&(P.prototype[o]=function(){var H=this.__wrapped__,Y=v?[1]:arguments,X=H instanceof gt,oe=Y[0],ce=X||it(H),pe=function(ft){var bt=A.apply(P,Tn([ft],Y));return v&&ve?bt[0]:bt};ce&&c&&typeof oe=="function"&&oe.length!=1&&(X=ce=!1);var ve=this.__chain__,Ue=!!this.__actions__.length,ke=R&&!ve,ut=X&&!Ue;if(!R&&ce){H=ut?H:new gt(this);var He=n.apply(H,Y);return He.__actions__.push({func:gc,args:[pe],thisArg:t}),new fi(He,ve)}return ke&&ut?n.apply(this,Y):(He=this.thru(pe),ke?v?He.value()[0]:He.value():He)})}),hi(["pop","push","shift","sort","splice","unshift"],function(n){var o=$a[n],c=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",v=/^(?:pop|shift)$/.test(n);P.prototype[n]=function(){var A=arguments;if(v&&!this.__chain__){var R=this.value();return o.apply(it(R)?R:[],A)}return this[c](function(H){return o.apply(it(H)?H:[],A)})}}),ki(gt.prototype,function(n,o){var c=P[o];if(c){var v=c.name+"";Ot.call($s,v)||($s[v]=[]),$s[v].push({name:o,func:c})}}),$s[cc(t,ee).name]=[{name:"wrapper",func:t}],gt.prototype.clone=uv,gt.prototype.reverse=hv,gt.prototype.value=lv,P.prototype.at=Fw,P.prototype.chain=$w,P.prototype.commit=zw,P.prototype.next=kw,P.prototype.plant=Kw,P.prototype.reverse=Vw,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=Gw,P.prototype.first=P.prototype.head,So&&(P.prototype[So]=Hw),P},qs=zm();Qt?((Qt.exports=qs)._=qs,Lt._=qs):wt._=qs}).call(Vo)})(Rl,Rl.exports);var aM=Object.defineProperty,cM=Object.defineProperties,uM=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,hM=Object.prototype.hasOwnProperty,lM=Object.prototype.propertyIsEnumerable,lg=(r,e,t)=>e in r?aM(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Oc=(r,e)=>{for(var t in e||(e={}))hM.call(e,t)&&lg(r,t,e[t]);if(hg)for(var t of hg(e))lM.call(e,t)&&lg(r,t,e[t]);return r},fM=(r,e)=>cM(r,uM(e));function Mn(r,e,t){var i;const s=Jo(r);return((i=e.rpcMap)==null?void 0:i[s.reference])||`${oM}?chainId=${s.namespace}:${s.reference}&projectId=${t}`}function Ps(r){return r.includes(":")?r.split(":")[1]:r}function vm(r){return r.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function dM(r,e){const t=Object.keys(e.namespaces).filter(s=>s.includes(r));if(!t.length)return[];const i=[];return t.forEach(s=>{const a=e.namespaces[s].accounts;i.push(...a)}),i}function il(r={},e={}){const t=fg(r),i=fg(e);return Rl.exports.merge(t,i)}function fg(r){var e,t,i,s;const a={};if(!oa(r))return a;for(const[u,f]of Object.entries(r)){const p=Jl(u)?[u]:f.chains,d=f.methods||[],b=f.events||[],E=f.rpcMap||{},x=Qo(u);a[x]=fM(Oc(Oc({},a[x]),f),{chains:Tc(p,(e=a[x])==null?void 0:e.chains),methods:Tc(d,(t=a[x])==null?void 0:t.methods),events:Tc(b,(i=a[x])==null?void 0:i.events),rpcMap:Oc(Oc({},E),(s=a[x])==null?void 0:s.rpcMap)})}return a}function pM(r){return r.includes(":")?r.split(":")[2]:r}function dg(r){const e={};for(const[t,i]of Object.entries(r)){const s=i.methods||[],a=i.events||[],u=i.accounts||[],f=Jl(t)?[t]:i.chains?i.chains:vm(i.accounts);e[t]={chains:f,methods:s,events:a,accounts:u}}return e}function nl(r){return typeof r=="number"?r:r.includes("0x")?parseInt(r,16):(r=r.includes(":")?r.split(":")[1]:r,isNaN(Number(r))?r:Number(r))}const ym={},jt=r=>ym[r],sl=(r,e)=>{ym[r]=e};class gM{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=Ps(t);e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}var mM=Object.defineProperty,vM=Object.defineProperties,yM=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,wM=Object.prototype.hasOwnProperty,bM=Object.prototype.propertyIsEnumerable,gg=(r,e,t)=>e in r?mM(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,mg=(r,e)=>{for(var t in e||(e={}))wM.call(e,t)&&gg(r,t,e[t]);if(pg)for(var t of pg(e))bM.call(e,t)&&gg(r,t,e[t]);return r},vg=(r,e)=>vM(r,yM(e));class _M{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("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)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const i=t||Mn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=parseInt(Ps(t));e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,i;let s=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";s=s.startsWith("0x")?s:`0x${s}`;const a=parseInt(s,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:s}]},chainId:(i=this.namespace.chains)==null?void 0:i[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,i,s;const a=(i=(t=e.request)==null?void 0:t.params)==null?void 0:i[0];if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(e.topic),f=((s=u==null?void 0:u.sessionProperties)==null?void 0:s.capabilities)||{};if(f!=null&&f[a])return f==null?void 0:f[a];const p=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:vg(mg({},u.sessionProperties||{}),{capabilities:vg(mg({},f||{}),{[a]:p})})})}catch(d){console.warn("Failed to update session with capabilities",d)}return p}}class EM{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=Ps(t);e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}class AM{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=Ps(t);e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}class SM{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const i=this.getCardanoRPCUrl(t),s=Ps(t);e[s]=this.createHttpProvider(s,i)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||this.getCardanoRPCUrl(e);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}class IM{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=Ps(t);e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}class DM{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;const s=Ps(t);e[s]=this.createHttpProvider(s,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}class xM{constructor(e){this.name="near",this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const i=t||Mn(`${this.name}:${e}`,this.namespace);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,i)}this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var i;e[t]=this.createHttpProvider(t,(i=this.namespace.rpcMap)==null?void 0:i[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace);return typeof i>"u"?void 0:new cn(new Cn(i,jt("disableProviderPing")))}}class MM{constructor(e){this.name=eo,this.namespace=e.namespace,this.events=jt("events"),this.client=jt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(un.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){var e,t;const i={};return(t=(e=this.namespace)==null?void 0:e.accounts)==null||t.forEach(s=>{const a=Jo(s);i[`${a.namespace}:${a.reference}`]=this.createHttpProvider(s)}),i}getHttpProvider(e){const t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const i=this.createHttpProvider(e,t);i&&(this.httpProviders[e]=i)}createHttpProvider(e,t){const i=t||Mn(e,this.namespace,this.client.core.projectId);if(!i)throw new Error(`No RPC url provided for chainId: ${e}`);return new cn(new Cn(i,jt("disableProviderPing")))}}var CM=Object.defineProperty,PM=Object.defineProperties,OM=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,NM=Object.prototype.hasOwnProperty,RM=Object.prototype.propertyIsEnumerable,wg=(r,e,t)=>e in r?CM(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Nc=(r,e)=>{for(var t in e||(e={}))NM.call(e,t)&&wg(r,t,e[t]);if(yg)for(var t of yg(e))RM.call(e,t)&&wg(r,t,e[t]);return r},ol=(r,e)=>PM(r,OM(e));class cf{constructor(e){this.events=new Bl,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:ya(fu({level:(e==null?void 0:e.logger)||cg})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new cf(e);return await t.initialize(),t}async request(e,t,i){const[s,a]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:Nc({},e),chainId:`${s}:${a}`,topic:this.session.topic,expiry:i})}sendAsync(e,t,i,s){const a=new Date().getTime();this.request(e,i,s).then(u=>t(null,du(a,u))).catch(u=>t(u,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Nt("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:t,response:i}=await this.client.authenticate(e);t&&(this.uri=t,this.events.emit("display_uri",t));const s=await i();if(this.session=s.session,this.session){const a=dg(this.session.namespaces);this.namespaces=il(this.namespaces,a),this.persist("namespaces",this.namespaces),this.onConnect()}return s}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:i,approval:s}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});i&&(this.uri=i,this.events.emit("display_uri",i)),await s().then(a=>{this.session=a;const u=dg(a.namespaces);this.namespaces=il(this.namespaces,u),this.persist("namespaces",this.namespaces)}).catch(a=>{if(a.message!==mm)throw a;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[i,s]=this.validateChain(e),a=this.getProvider(i);a.name===eo?a.setDefaultChain(`${i}:${s}`,t):a.setDefaultChain(s,t)}catch(i){if(!/Please call connect/.test(i.message))throw i}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(on(t)){for(const i of t)e.deletePairings?this.client.core.expirer.set(i.topic,0):await this.client.core.relayer.subscriber.unsubscribe(i.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await af.init({logger:this.providerOpts.logger||cg,relayUrl:this.providerOpts.relayUrl||iM,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>Qo(t)))];sl("client",this.client),sl("events",this.events),sl("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const i=dM(t,this.session),s=vm(i),a=il(this.namespaces,this.optionalNamespaces),u=ol(Nc({},a[t]),{accounts:i,chains:s});switch(t){case"eip155":this.rpcProviders[t]=new _M({namespace:u});break;case"solana":this.rpcProviders[t]=new EM({namespace:u});break;case"cosmos":this.rpcProviders[t]=new AM({namespace:u});break;case"polkadot":this.rpcProviders[t]=new gM({namespace:u});break;case"cip34":this.rpcProviders[t]=new SM({namespace:u});break;case"elrond":this.rpcProviders[t]=new IM({namespace:u});break;case"multiversx":this.rpcProviders[t]=new DM({namespace:u});break;case"near":this.rpcProviders[t]=new xM({namespace:u});break;default:this.rpcProviders[eo]?this.rpcProviders[eo].updateNamespace(u):this.rpcProviders[eo]=new MM({namespace:u})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:i}=t;if(i.name==="accountsChanged"){const s=i.data;s&&on(s)&&this.events.emit("accountsChanged",s.map(pM))}else if(i.name==="chainChanged"){const s=t.chainId,a=t.event.data,u=Qo(s),f=nl(s)!==nl(a)?`${u}:${nl(a)}`:s;this.onChainChanged(f)}else this.events.emit(i.name,i.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var i;const{namespaces:s}=t,a=(i=this.client)==null?void 0:i.session.get(e);this.session=ol(Nc({},a),{namespaces:s}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ol(Nc({},Nt("USER_DISCONNECTED")),{data:e.topic}))}),this.on(un.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[eo]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:i,sessionProperties:s}=e;t&&Object.keys(t).length&&(this.namespaces=t),i&&Object.keys(i).length&&(this.optionalNamespaces=i),this.sessionProperties=s,this.persist("namespaces",t),this.persist("optionalNamespaces",i)}validateChain(e){const[t,i]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,i];if(t&&!Object.keys(this.namespaces||{}).map(u=>Qo(u)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&i)return[t,i];const s=Qo(Object.keys(this.namespaces)[0]),a=this.rpcProviders[s].getDefaultChain();return[s,a]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[i,s]=this.validateChain(e);s&&(t||this.getProvider(i).setDefaultChain(s),this.namespaces[i]?this.namespaces[i].defaultChain=s:this.namespaces[`${i}:${s}`]?this.namespaces[`${i}:${s}`].defaultChain=s:this.namespaces[`${i}:${s}`]={defaultChain:s},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",s))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${ug}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${ug}/${e}`)}}const TM=cf,UM="wc",BM="ethereum_provider",LM=`${UM}@2:${BM}:`,qM="https://rpc.walletconnect.com/v1/",Tl=["eth_sendTransaction","personal_sign"],jM=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],Ul=["chainChanged","accountsChanged"],FM=["chainChanged","accountsChanged","message","disconnect","connect"];var $M=Object.defineProperty,zM=Object.defineProperties,kM=Object.getOwnPropertyDescriptors,bg=Object.getOwnPropertySymbols,HM=Object.prototype.hasOwnProperty,KM=Object.prototype.propertyIsEnumerable,_g=(r,e,t)=>e in r?$M(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,to=(r,e)=>{for(var t in e||(e={}))HM.call(e,t)&&_g(r,t,e[t]);if(bg)for(var t of bg(e))KM.call(e,t)&&_g(r,t,e[t]);return r},al=(r,e)=>zM(r,kM(e));function ru(r){return Number(r[0].split(":")[1])}function Rc(r){return`0x${r.toString(16)}`}function VM(r){const{chains:e,optionalChains:t,methods:i,optionalMethods:s,events:a,optionalEvents:u,rpcMap:f}=r;if(!on(e))throw new Error("Invalid chains");const p={chains:e,methods:i||Tl,events:a||Ul,rpcMap:to({},e.length?{[ru(e)]:f[ru(e)]}:{})},d=a==null?void 0:a.filter(D=>!Ul.includes(D)),b=i==null?void 0:i.filter(D=>!Tl.includes(D));if(!t&&!u&&!s&&!(d!=null&&d.length)&&!(b!=null&&b.length))return{required:e.length?p:void 0};const E=(d==null?void 0:d.length)&&(b==null?void 0:b.length)||!t,x={chains:[...new Set(E?p.chains.concat(t||[]):t)],methods:[...new Set(p.methods.concat(s!=null&&s.length?s:jM))],events:[...new Set(p.events.concat(u!=null&&u.length?u:FM))],rpcMap:f};return{required:e.length?p:void 0,optional:t.length?x:void 0}}class uf{constructor(){this.events=new Si.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=LM,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new uf;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,i){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),i)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:i}=VM(this.rpc);try{const s=await new Promise(async(u,f)=>{var p;this.rpc.showQrModal&&((p=this.modal)==null||p.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),f(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(al(to({namespaces:to({},t&&{[this.namespace]:t})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(d=>{u(d)}).catch(d=>{f(new Error(d.message))})});if(!s)return;const a=D0(s.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:Rc(this.chainId)})}catch(s){throw this.signer.logger.error(s),s}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const t=await new Promise(async(s,a)=>{var u;this.rpc.showQrModal&&((u=this.modal)==null||u.subscribeModal(f=>{!f.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(al(to({},e),{chains:this.rpc.chains})).then(f=>{s(f)}).catch(f=>{a(new Error(f.message))})}),i=t.session;if(i){const s=D0(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Rc(this.chainId)})}return t}catch(t){throw this.signer.logger.error(t),t}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:i}=t;i.name==="accountsChanged"?(this.accounts=this.parseAccounts(i.data),this.events.emit("accountsChanged",this.accounts)):i.name==="chainChanged"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Rc(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",al(to({},Nt("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,i;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(i=this.modal)==null||i.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Rc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,i,s]=e.split(":");return{chainId:`${t}:${i}`,address:s}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,i;const s=(t=e==null?void 0:e.chains)!=null?t:[],a=(i=e==null?void 0:e.optionalChains)!=null?i:[],u=s.concat(a);if(!u.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const f=s.length?(e==null?void 0:e.methods)||Tl:[],p=s.length?(e==null?void 0:e.events)||Ul:[],d=(e==null?void 0:e.optionalMethods)||[],b=(e==null?void 0:e.optionalEvents)||[],E=(e==null?void 0:e.rpcMap)||this.buildRpcMap(u,e.projectId),x=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:s==null?void 0:s.map(D=>this.formatChainId(D)),optionalChains:a.map(D=>this.formatChainId(D)),methods:f,events:p,optionalMethods:d,optionalEvents:b,rpcMap:E,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:x,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const i={};return e.forEach(s=>{i[s]=this.getRpcUrl(s,t)}),i}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?ru(this.rpc.chains):ru(this.rpc.optionalChains),this.signer=await TM.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:i}=await J3(()=>import("./index-CB5etGIE.js").then(s=>s.i),__vite__mapDeps([0,1,2]));t=i}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(to({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(i){throw this.signer.logger.error(i),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:i,rpcMap:s}=e;t&&on(t)&&(this.rpc.chains=t.map(a=>this.formatChainId(a)),t.forEach(a=>{this.rpc.rpcMap[a]=(s==null?void 0:s[a])||this.getRpcUrl(a)})),i&&on(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i==null?void 0:i.map(a=>this.formatChainId(a)),i.forEach(a=>{this.rpc.rpcMap[a]=(s==null?void 0:s[a])||this.getRpcUrl(a)}))}getRpcUrl(e,t){var i;return((i=this.rpc.rpcMap)==null?void 0:i[e])||`${qM}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(t=>this.signer.logger.warn(t))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}}const EC=uf;export{EC as EthereumProvider,FM as OPTIONAL_EVENTS,jM as OPTIONAL_METHODS,Ul as REQUIRED_EVENTS,Tl as REQUIRED_METHODS,uf as default}; diff --git a/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/1 b/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/1 index 7433c80..60807d8 100644 --- a/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/1 +++ b/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/1 @@ -1 +1 @@ -ScoZO5YXluY0C/ZG5eBAi3Fy5KC9LEkQ1KivkCS9BZ5DVGNO1walbf0tJQTL2TY+xkPXPw3TAVy4/rMBStdWtw3Cumo2CPOFIctjJI4X+qEeBCpqgyxBfjK8/v/UgVGGkYgcY1d7nABLLUn+hhNDnvBrXAmC1UUa48mbybJHYntlyhC8kZ91QIh/r0/5m60PkYvOq71h1dyaXAwBDgs51NLm0c0ltuE= \ No newline at end of file +bHX12d+eWrQZ0iO81ygsN8mwDNnTveQQo/IcB6bzbjIN7Axz7iGkDleVFGPe1AHqndhNTPq36F3D58SkXjtAeuvoO01dgWiVSnW2tufFEYYYIdy0bjbi+Tuquq4NYNniBoCs19A+NaLyglW+aWR//vn8Ct31c1dYe0HLi1fjDRjO/ayh/kaEYuRlEBpSlGLS+pwmFUIZcsGP7Ne68TpOg+pAzWayIa8= \ No newline at end of file diff --git a/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/2 b/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/2 index d4e0cf8..8b80092 100644 --- a/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/2 +++ b/game-data/0x907d8e470d67dd929d100654aa251e22549e5754f79ad30334fac1da8e968ff3/2 @@ -1 +1 @@ -IIUGJ4CQcELSEyufC05SOM0t24e01N3hxEmoqMuktKw8d59XbO8bCQqf4AyiCBOJYZmJYMwekfkk1+v2TllkspkERLOvu4LFUbkUIarrp94Xw1QMbhURfvRW2qV6W8aJyd8jffv+xw8SlfKuDhBDhd/lX4EeQ6idDStu3RmLmykmNUMEqMakx5cXHWDPLmWNIIWxqJbKAaHl1SEPbkI/kaYAIoquwtI2PzTkjiNsMv52PFePeOfCSqToj3kQZK5YzQmLxmwZiOcbj2qekHmupLJiTmEsQY9kWTJt7fiq2KGGn9p5cXHFaRMjmkiVq7jQUcOLBwhlB/KoPhfEDUPYkAioFj08lRoaq0qZY6whFxNJ9MWE0QghlMsyvU4D3km6OJ71mQ== \ No newline at end of file +m0yHCg1H3jKWRKqncYloYm57PsnqjBKee4D2kPiTr9+GJxrG3/y7xFjpnz4n4CH7y/ue2/7OUNIPzCq2n8LLFAVWDcsntz4bn/vnx/LKWYzAmV/sGrCY1WISTxvGw9MOHeVBKPjqbDaMHGW3ZL6hMtV+ihbYVHJDAOb1ZqnVED7YaRJc4Vroyh9dbF3/vpdf/hNtD20mspo0oR1LURgVhAntf/p8M0l/UX0lwj8kaXYbzGqVcwFQiy+b2RLqVoESPvrgYc4jbVNpC74ZEAfEWEn8Fgo0zKYh6OU1GgZ9CKeNc/tRBao3iXbFHyjQUTcpSX4CtFPJZnOz9xrys06blHVCblPhH5hy3zkHYmJ8tWa8mArFw27R3AlukLx/6cPVwX71mg== \ No newline at end of file diff --git a/index.html b/index.html index 1ddd171..da83307 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ THC - - + +