"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{3879:function(e,t,n){n.d(t,{E:function(){return r}});function r(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}},7354:function(e,t,n){n.d(t,{J:function(){return r}});function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}},3288:function(e,t,n){n.d(t,{_:function(){return o}});var r=n(7354);function o(e,t){var n=(0,r.J)(e,t,"get");return n.get?n.get.call(e):n.value}},8146:function(e,t,n){n.d(t,{_:function(){return o}});var r=n(3879);function o(e,t,n){(0,r.E)(e,t),t.set(e,n)}},5577:function(e,t,n){n.d(t,{_:function(){return o}});var r=n(7354);function o(e,t,n){var o=(0,r.J)(e,t,"set");return!function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}(e,o,n),n}},4831:function(e,t,n){n.d(t,{_:function(){return r}});function r(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n}},7920:function(e,t,n){n.d(t,{_:function(){return o}});var r=n(3879);function o(e,t){(0,r.E)(e,t),t.add(e)}},9555:function(e,t,n){n.d(t,{j:function(){return d}});var r,o,i,s=n(3288),a=n(8146),c=n(5577),u=n(4614),l=n(6063),d=new(r=new WeakMap,o=new WeakMap,i=new WeakMap,class extends u.l{onSubscribe(){(0,s._)(this,o)||this.setEventListener((0,s._)(this,i))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,s._)(this,o))||void 0===e||e.call(this),(0,c._)(this,o,void 0))}setEventListener(e){var t;(0,c._)(this,i,e),null===(t=(0,s._)(this,o))||void 0===t||t.call(this),(0,c._)(this,o,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){(0,s._)(this,r)!==e&&((0,c._)(this,r,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof(0,s._)(this,r)?(0,s._)(this,r):(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)!=="hidden"}constructor(){super(),(0,a._)(this,r,{writable:!0,value:void 0}),(0,a._)(this,o,{writable:!0,value:void 0}),(0,a._)(this,i,{writable:!0,value:void 0}),(0,c._)(this,i,e=>{if(!l.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}})},1793:function(e,t,n){n.d(t,{R:function(){return b},m:function(){return p}});var r,o,i,s,a=n(3288),c=n(8146),u=n(5577),l=n(4831),d=n(7920),h=n(5139),f=n(2041),v=n(326),p=(r=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakSet,class extends f.F{setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){(0,a._)(this,r).includes(e)||((0,a._)(this,r).push(e),this.clearGcTimeout(),(0,a._)(this,o).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){(0,u._)(this,r,(0,a._)(this,r).filter(t=>t!==e)),this.scheduleGc(),(0,a._)(this,o).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){(0,a._)(this,r).length||("pending"===this.state.status?this.scheduleGc():(0,a._)(this,o).remove(this))}continue(){var e,t;return null!==(t=null===(e=(0,a._)(this,i))||void 0===e?void 0:e.continue())&&void 0!==t?t:this.execute(this.state.variables)}async execute(e){var t,n,r,c,d,h,f,p,b,y,m,w,_,O,x,P,E,M,S,j,k;let C=()=>{(0,l._)(this,s,g).call(this,{type:"continue"})};(0,u._)(this,i,(0,v.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{(0,l._)(this,s,g).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,l._)(this,s,g).call(this,{type:"pause"})},onContinue:C,retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>(0,a._)(this,o).canRun(this)}));let R="pending"===this.state.status,A=!(0,a._)(this,i).canStart();try{if(R)C();else{(0,l._)(this,s,g).call(this,{type:"pending",variables:e,isPaused:A}),await (null===(y=(m=(0,a._)(this,o).config).onMutate)||void 0===y?void 0:y.call(m,e,this));let t=await (null===(w=(_=this.options).onMutate)||void 0===w?void 0:w.call(_,e));t!==this.state.context&&(0,l._)(this,s,g).call(this,{type:"pending",context:t,variables:e,isPaused:A})}let t=await (0,a._)(this,i).start();return await (null===(n=(r=(0,a._)(this,o).config).onSuccess)||void 0===n?void 0:n.call(r,t,e,this.state.context,this)),await (null===(c=(d=this.options).onSuccess)||void 0===c?void 0:c.call(d,t,e,this.state.context)),await (null===(h=(f=(0,a._)(this,o).config).onSettled)||void 0===h?void 0:h.call(f,t,null,this.state.variables,this.state.context,this)),await (null===(p=(b=this.options).onSettled)||void 0===p?void 0:p.call(b,t,null,e,this.state.context)),(0,l._)(this,s,g).call(this,{type:"success",data:t}),t}catch(t){try{throw await (null===(O=(x=(0,a._)(this,o).config).onError)||void 0===O?void 0:O.call(x,t,e,this.state.context,this)),await (null===(P=(E=this.options).onError)||void 0===P?void 0:P.call(E,t,e,this.state.context)),await (null===(M=(S=(0,a._)(this,o).config).onSettled)||void 0===M?void 0:M.call(S,void 0,t,this.state.variables,this.state.context,this)),await (null===(j=(k=this.options).onSettled)||void 0===j?void 0:j.call(k,void 0,t,e,this.state.context)),t}finally{(0,l._)(this,s,g).call(this,{type:"error",error:t})}}finally{(0,a._)(this,o).runNext(this)}}constructor(e){super(),(0,d._)(this,s),(0,c._)(this,r,{writable:!0,value:void 0}),(0,c._)(this,o,{writable:!0,value:void 0}),(0,c._)(this,i,{writable:!0,value:void 0}),this.mutationId=e.mutationId,(0,u._)(this,o,e.mutationCache),(0,u._)(this,r,[]),this.state=e.state||b(),this.setOptions(e.options),this.scheduleGc()}});function b(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}function g(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),h.Vr.batch(()=>{(0,a._)(this,r).forEach(t=>{t.onMutationUpdate(e)}),(0,a._)(this,o).notify({mutation:this,type:"updated",action:e})})}},5139:function(e,t,n){n.d(t,{Vr:function(){return o}});var r=e=>setTimeout(e,0),o=function(){let e=[],t=0,n=e=>{e()},o=e=>{e()},i=r,s=r=>{t?e.push(r):i(()=>{n(r)})},a=()=>{let t=e;e=[],t.length&&i(()=>{o(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||a()}return n},batchCalls:e=>function(){for(var t=arguments.length,n=Array(t),r=0;r{e(...n)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{o=e},setScheduler:e=>{i=e}}}()},7211:function(e,t,n){n.d(t,{N:function(){return d}});var r,o,i,s=n(3288),a=n(8146),c=n(5577),u=n(4614),l=n(6063),d=new(r=new WeakMap,o=new WeakMap,i=new WeakMap,class extends u.l{onSubscribe(){(0,s._)(this,o)||this.setEventListener((0,s._)(this,i))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,s._)(this,o))||void 0===e||e.call(this),(0,c._)(this,o,void 0))}setEventListener(e){var t;(0,c._)(this,i,e),null===(t=(0,s._)(this,o))||void 0===t||t.call(this),(0,c._)(this,o,e(this.setOnline.bind(this)))}setOnline(e){(0,s._)(this,r)!==e&&((0,c._)(this,r,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return(0,s._)(this,r)}constructor(){super(),(0,a._)(this,r,{writable:!0,value:void 0}),(0,a._)(this,o,{writable:!0,value:void 0}),(0,a._)(this,i,{writable:!0,value:void 0}),(0,c._)(this,r,!0),(0,c._)(this,i,e=>{if(!l.sk&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}})},4668:function(e,t,n){n.d(t,{A:function(){return w},z:function(){return _}});var r,o,i,s,a,c,u,l,d=n(3288),h=n(8146),f=n(5577),v=n(4831),p=n(7920),b=n(6063),g=n(5139),y=n(326),m=n(2041),w=(r=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakSet,class extends m.F{get meta(){return this.options.meta}get promise(){var e;return null===(e=(0,d._)(this,a))||void 0===e?void 0:e.promise}setOptions(e){this.options={...(0,d._)(this,c),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||(0,d._)(this,i).remove(this)}setData(e,t){let n=(0,b.oE)(this.state.data,e,this.options);return(0,v._)(this,l,O).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){(0,v._)(this,l,O).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;let r=null===(t=(0,d._)(this,a))||void 0===t?void 0:t.promise;return null===(n=(0,d._)(this,a))||void 0===n||n.cancel(e),r?r.then(b.ZT).catch(b.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState((0,d._)(this,r))}isActive(){return this.observers.some(e=>!1!==(0,b.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===b.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||void 0===this.state.data||!(0,b.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null===(e=(0,d._)(this,a))||void 0===e||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null===(e=(0,d._)(this,a))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),(0,d._)(this,i).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||((0,d._)(this,a)&&((0,d._)(this,u)?(0,d._)(this,a).cancel({revert:!0}):(0,d._)(this,a).cancelRetry()),this.scheduleGc()),(0,d._)(this,i).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||(0,v._)(this,l,O).call(this,{type:"invalidate"})}fetch(e,t){var n,r,c;if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if((0,d._)(this,a))return(0,d._)(this,a).continueRetry(),(0,d._)(this,a).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let h=new AbortController,p=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>((0,f._)(this,u,!0),h.signal)})},g={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:(0,d._)(this,s),state:this.state,fetchFn:()=>{let e=(0,b.cG)(this.options,t),n={client:(0,d._)(this,s),queryKey:this.queryKey,meta:this.meta};return(p(n),(0,f._)(this,u,!1),this.options.persister)?this.options.persister(e,n,this):e(n)}};p(g),null===(n=this.options.behavior)||void 0===n||n.onFetch(g,this),(0,f._)(this,o,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(r=g.fetchOptions)||void 0===r?void 0:r.meta))&&(0,v._)(this,l,O).call(this,{type:"fetch",meta:null===(c=g.fetchOptions)||void 0===c?void 0:c.meta});let m=e=>{if((0,y.DV)(e)&&e.silent||(0,v._)(this,l,O).call(this,{type:"error",error:e}),!(0,y.DV)(e)){var t,n,r,o;null===(t=(n=(0,d._)(this,i).config).onError)||void 0===t||t.call(n,e,this),null===(r=(o=(0,d._)(this,i).config).onSettled)||void 0===r||r.call(o,this.state.data,e,this)}this.scheduleGc()};return(0,f._)(this,a,(0,y.Mz)({initialPromise:null==t?void 0:t.initialPromise,fn:g.fetchFn,abort:h.abort.bind(h),onSuccess:e=>{var t,n,r,o;if(void 0===e){m(Error("".concat(this.queryHash," data is undefined")));return}try{this.setData(e)}catch(e){m(e);return}null===(t=(n=(0,d._)(this,i).config).onSuccess)||void 0===t||t.call(n,e,this),null===(r=(o=(0,d._)(this,i).config).onSettled)||void 0===r||r.call(o,e,this.state.error,this),this.scheduleGc()},onError:m,onFail:(e,t)=>{(0,v._)(this,l,O).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,v._)(this,l,O).call(this,{type:"pause"})},onContinue:()=>{(0,v._)(this,l,O).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0})),(0,d._)(this,a).start()}constructor(e){var t;super(),(0,p._)(this,l),(0,h._)(this,r,{writable:!0,value:void 0}),(0,h._)(this,o,{writable:!0,value:void 0}),(0,h._)(this,i,{writable:!0,value:void 0}),(0,h._)(this,s,{writable:!0,value:void 0}),(0,h._)(this,a,{writable:!0,value:void 0}),(0,h._)(this,c,{writable:!0,value:void 0}),(0,h._)(this,u,{writable:!0,value:void 0}),(0,f._)(this,u,!1),(0,f._)(this,c,e.defaultOptions),this.setOptions(e.options),this.observers=[],(0,f._)(this,s,e.client),(0,f._)(this,i,(0,d._)(this,s).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,(0,f._)(this,r,function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=null!==(t=e.state)&&void 0!==t?t:(0,d._)(this,r),this.scheduleGc()}});function _(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,y.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function O(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,..._(t.data,this.options),fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(r=e.dataUpdatedAt)&&void 0!==r?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if((0,y.DV)(i)&&i.revert&&(0,d._)(this,o))return{...(0,d._)(this,o),fetchStatus:"idle"};return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),g.Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),(0,d._)(this,i).notify({query:this,type:"updated",action:e})})}},2041:function(e,t,n){n.d(t,{F:function(){return c}});var r,o=n(3288),i=n(8146),s=n(5577),a=n(6063),c=(r=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,a.PN)(this.gcTime)&&(0,s._)(this,r,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:a.sk?1/0:3e5)}clearGcTimeout(){(0,o._)(this,r)&&(clearTimeout((0,o._)(this,r)),(0,s._)(this,r,void 0))}constructor(){(0,i._)(this,r,{writable:!0,value:void 0})}})},326:function(e,t,n){n.d(t,{DV:function(){return l},Kw:function(){return c},Mz:function(){return d}});var r=n(9555),o=n(7211),i=n(2649),s=n(6063);function a(e){return Math.min(1e3*2**e,3e4)}function c(e){return(null!=e?e:"online")!=="online"||o.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function l(e){return e instanceof u}function d(e){let t,n=!1,l=0,d=!1,h=(0,i.O)(),f=()=>r.j.isFocused()&&("always"===e.networkMode||o.N.isOnline())&&e.canRun(),v=()=>c(e.networkMode)&&e.canRun(),p=n=>{if(!d){var r;d=!0,null===(r=e.onSuccess)||void 0===r||r.call(e,n),null==t||t(),h.resolve(n)}},b=n=>{if(!d){var r;d=!0,null===(r=e.onError)||void 0===r||r.call(e,n),null==t||t(),h.reject(n)}},g=()=>new Promise(n=>{var r;t=e=>{(d||f())&&n(e)},null===(r=e.onPause)||void 0===r||r.call(e)}).then(()=>{if(t=void 0,!d){var n;null===(n=e.onContinue)||void 0===n||n.call(e)}}),y=()=>{let t;if(d)return;let r=0===l?e.initialPromise:void 0;try{t=null!=r?r:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(p).catch(t=>{var r,o,i;if(d)return;let c=null!==(o=e.retry)&&void 0!==o?o:s.sk?0:3,u=null!==(i=e.retryDelay)&&void 0!==i?i:a,h="function"==typeof u?u(l,t):u,v=!0===c||"number"==typeof c&&lf()?void 0:g()).then(()=>{n?b(t):y()})})};return{promise:h,cancel:t=>{if(!d){var n;b(new u(t)),null===(n=e.abort)||void 0===n||n.call(e)}},continue:()=>(null==t||t(),h),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:v,start:()=>(v()?y():g().then(y),h)}}},4614:function(e,t,n){n.d(t,{l:function(){return r}});var r=class{subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}}},2649:function(e,t,n){n.d(t,{O:function(){return r}});function r(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}},6063:function(e,t,n){n.d(t,{CN:function(){return x},Ht:function(){return O},KC:function(){return c},Kp:function(){return a},L3:function(){return E},Nc:function(){return u},PN:function(){return s},Rm:function(){return h},SE:function(){return i},VS:function(){return p},VX:function(){return _},X7:function(){return d},Ym:function(){return f},ZT:function(){return o},_v:function(){return m},_x:function(){return l},cG:function(){return P},oE:function(){return w},sk:function(){return r},to:function(){return v}});var r="Deno"in globalThis;function o(){}function i(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){return"function"==typeof e?e(t):e}function u(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==h(s,t.options))return!1}else if(!v(t.queryKey,s))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!o||o===t.state.fetchStatus)&&(!i||!!i(t))}function d(e,t){let{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(f(t.options.mutationKey)!==f(i))return!1}else if(!v(t.options.mutationKey,i))return!1}return(!r||t.state.status===r)&&(!o||!!o(t))}function h(e,t){return((null==t?void 0:t.queryKeyHashFn)||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>g(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function v(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(n=>v(e[n],t[n]))}function p(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g(e){if(!y(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(y(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function m(e){return new Promise(t=>{setTimeout(t,e)})}function w(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?function e(t,n){if(t===n)return t;let r=b(t)&&b(n);if(r||g(t)&&g(n)){let o=r?t:Object.keys(t),i=o.length,s=r?n:Object.keys(n),a=s.length,c=r?[]:{},u=0;for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:0,r=[...e,t];return n&&r.length>n?r.slice(1):r}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var x=Symbol();function P(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==x?e.queryFn:()=>Promise.reject(Error("Missing queryFn: '".concat(e.queryHash,"'")))}function E(e,t){return"function"==typeof e?e(...t):!!e}},7082:function(e,t,n){n.d(t,{NL:function(){return s},aH:function(){return a}});var r=n(4090),o=n(3827),i=r.createContext(void 0),s=e=>{let t=r.useContext(i);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,o.jsx)(i.Provider,{value:t,children:n})}},1257:function(e,t,n){n.d(t,{G:function(){return c}});var r,o,i=n(3816);let s=()=>"@wagmi/core@".concat(i.i);var a=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class c extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return s()}walk(e){return a(this,r,"m",o).call(this,this,e)}constructor(e,t={}){var n;super(),r.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"});let o=t.cause instanceof c?t.cause.details:(null===(n=t.cause)||void 0===n?void 0:n.message)?t.cause.message:t.details,i=t.cause instanceof c&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?["Docs: ".concat(this.docsBaseUrl).concat(i,".html").concat(t.docsSlug?"#".concat(t.docsSlug):"")]:[],...o?["Details: ".concat(o)]:[],"Version: ".concat(this.version)].join("\n"),t.cause&&(this.cause=t.cause),this.details=o,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}r=new WeakSet,o=function e(t,n){return(null==n?void 0:n(t))?t:t.cause?a(this,r,"m",e).call(this,t.cause,n):t}},2731:function(e,t,n){n.d(t,{$S:function(){return u},JK:function(){return a},X4:function(){return o},XZ:function(){return c},aH:function(){return s},wi:function(){return i}});var r=n(1257);class o extends r.G{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class i extends r.G{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class s extends r.G{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class a extends r.G{constructor({address:e,connector:t}){super('Account "'.concat(e,'" not found for connector "').concat(t.name,'".')),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class c extends r.G{constructor({connectionChainId:e,connectorChainId:t}){super("The current chain of the connector (id: ".concat(t,") does not match the connection's chain (id: ").concat(e,")."),{metaMessages:["Current Chain ID: ".concat(t),"Expected Chain ID: ".concat(e)]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class u extends r.G{constructor({connector:e}){super('Connector "'.concat(e.name,'" unavailable while reconnecting.'),{details:"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`. All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored. This error commonly occurs for connectors that asynchronously inject after reconnection has already started."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}},4497:function(e,t,n){n.d(t,{M:function(){return o},O:function(){return i}});var r=n(1257);class o extends r.G{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class i extends r.G{constructor({connector:e}){super('"'.concat(e.name,'" does not support programmatic chain switching.')),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}},3816:function(e,t,n){n.d(t,{i:function(){return r}});let r="2.17.2"},9561:function(e,t,n){n.d(t,{T:function(){return r}});function r(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},9187:function(e,t,n){n.d(t,{e:function(){return i}});var r=n(9561),o=n(2586);function i(e){var t;let{batch:n,cacheTime:i=null!==(t=e.pollingInterval)&&void 0!==t?t:4e3,ccipRead:s,key:a="base",name:c="Base Client",pollingInterval:u=4e3,type:l="base"}=e,d=e.chain,h=e.account?(0,r.T)(e.account):void 0,{config:f,request:v,value:p}=e.transport({chain:d,pollingInterval:u}),b={account:h,batch:n,cacheTime:i,ccipRead:s,chain:d,key:a,name:c,pollingInterval:u,request:v,transport:{...f,...p},type:l,uid:(0,o.h)()};return Object.assign(b,{extend:function e(t){return n=>{let r=n(t);for(let e in b)delete r[e];let o={...t,...r};return Object.assign(o,{extend:e(o)})}}(b)})}},2191:function(e,t,n){n.d(t,{q:function(){return d}});var r=n(1273),o=n(7825),i=n(4473),s=n(5578);let a=new(n(686)).k(8192);var c=n(2179),u=n(2791),l=n(2586);function d(e,t){let{key:n,methods:d,name:h,request:f,retryCount:v=3,retryDelay:p=150,timeout:b,type:g}=e;return{config:{key:n,methods:d,name:h,request:f,retryCount:v,retryDelay:p,timeout:b,type:g},request:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function(n){var l;let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dedupe:h=!1,methods:f,retryDelay:v=150,retryCount:p=3,uid:b}={...t,...d},{method:g}=n;if((null==f?void 0:null===(l=f.exclude)||void 0===l?void 0:l.includes(g))||(null==f?void 0:f.include)&&!f.include.includes(g))throw new i.gS(Error("method not supported"),{method:g});let y=h?(0,s.$G)("".concat(b,".").concat((0,u.P)(n))):void 0;return function(e,t){let{enabled:n=!0,id:r}=t;if(!n||!r)return e();if(a.get(r))return a.get(r);let o=e().finally(()=>a.delete(r));return a.set(r,o),o}(()=>(0,c.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case i.s7.code:throw new i.s7(e);case i.B.code:throw new i.B(e);case i.LX.code:throw new i.LX(e,{method:n.method});case i.nY.code:throw new i.nY(e);case i.XS.code:throw new i.XS(e);case i.yR.code:throw new i.yR(e);case i.Og.code:throw new i.Og(e);case i.pT.code:throw new i.pT(e);case i.KB.code:throw new i.KB(e);case i.gS.code:throw new i.gS(e,{method:n.method});case i.Pv.code:throw new i.Pv(e);case i.GD.code:throw new i.GD(e);case i.ab.code:throw new i.ab(e);case i.PE.code:throw new i.PE(e);case i.Ts.code:throw new i.Ts(e);case i.u5.code:throw new i.u5(e);case i.I0.code:throw new i.I0(e);case i.x3.code:throw new i.x3(e);case i.vl.code:throw new i.vl(e);case i.Uu.code:throw new i.Uu(e);case i.Nt.code:throw new i.Nt(e);case i.EJ.code:throw new i.EJ(e);case i.fl.code:throw new i.fl(e);case i.NO.code:throw new i.NO(e);case i.r0.code:throw new i.r0(e);case 5e3:throw new i.ab(e);default:if(e instanceof r.G)throw e;throw new i.ir(e)}}},{delay:e=>{let{count:t,error:n}=e;if(n&&n instanceof o.Gg){var r;let e=null==n?void 0:null===(r=n.headers)||void 0===r?void 0:r.get("Retry-After");if(null==e?void 0:e.match(/\d/))return 1e3*Number.parseInt(e)}return~~(1<{let{error:t}=e;return"code"in t&&"number"==typeof t.code?-1===t.code||t.code===i.Pv.code||t.code===i.XS.code:!(t instanceof o.Gg)||!t.status||403===t.status||408===t.status||413===t.status||429===t.status||500===t.status||502===t.status||503===t.status||504===t.status}}),{enabled:h,id:y})}}(f,{methods:d,retryCount:v,retryDelay:p,uid:(0,l.h)()}),value:t}}},4898:function(e,t,n){n.d(t,{b:function(){return o}});var r=n(1273);class o extends r.G{constructor({address:e}){super('Address "'.concat(e,'" is invalid.'),{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},1273:function(e,t,n){n.d(t,{G:function(){return i}});let r="2.30.0",o={getDocsUrl:e=>{let{docsBaseUrl:t,docsPath:n="",docsSlug:r}=e;return n?"".concat(null!=t?t:"https://viem.sh").concat(n).concat(r?"#".concat(r):""):void 0},version:"viem@".concat(r)};class i extends Error{walk(e){return function e(t,n){return(null==n?void 0:n(t))?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,n):n?null:t}(this,e)}constructor(e,t={}){var n,s,a;let c=t.cause instanceof i?t.cause.details:(null===(a=t.cause)||void 0===a?void 0:a.message)?t.cause.message:t.details,u=t.cause instanceof i&&t.cause.docsPath||t.docsPath,l=null===(n=o.getDocsUrl)||void 0===n?void 0:n.call(o,{...t,docsPath:u});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...l?["Docs: ".concat(l)]:[],...c?["Details: ".concat(c)]:[],...o.version?["Version: ".concat(o.version)]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=u,this.metaMessages=t.metaMessages,this.name=null!==(s=t.name)&&void 0!==s?s:this.name,this.shortMessage=e,this.version=r}}},1758:function(e,t,n){n.d(t,{$s:function(){return i},W_:function(){return s},mV:function(){return o}});var r=n(1273);class o extends r.G{constructor({offset:e,position:t,size:n}){super("Slice ".concat("start"===t?"starting":"ending",' at offset "').concat(e,'" is out-of-bounds (size: ').concat(n,")."),{name:"SliceOffsetOutOfBoundsError"})}}class i extends r.G{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," size (").concat(e,") exceeds padding size (").concat(t,")."),{name:"SizeExceedsPaddingSizeError"})}}class s extends r.G{constructor({size:e,targetSize:t,type:n}){super("".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase()," is expected to be ").concat(t," ").concat(n," long, but is ").concat(e," ").concat(n," long."),{name:"InvalidBytesLengthError"})}}},5851:function(e,t,n){n.d(t,{J5:function(){return o},M6:function(){return s},yr:function(){return i}});var r=n(1273);class o extends r.G{constructor({max:e,min:t,signed:n,size:r,value:o}){super('Number "'.concat(o,'" is not in safe ').concat(r?"".concat(8*r,"-bit ").concat(n?"signed":"unsigned"," "):"","integer range ").concat(e?"(".concat(t," to ").concat(e,")"):"(above ".concat(t,")")),{name:"IntegerOutOfRangeError"})}}class i extends r.G{constructor(e){super('Bytes value "'.concat(e,'" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.'),{name:"InvalidBytesBooleanError"})}}class s extends r.G{constructor({givenSize:e,maxSize:t}){super("Size cannot exceed ".concat(t," bytes. Given size: ").concat(e," bytes."),{name:"SizeOverflowError"})}}},7825:function(e,t,n){n.d(t,{Gg:function(){return s},W5:function(){return c},bs:function(){return a}});var r=n(2791),o=n(1273),i=n(7307);class s extends o.G{constructor({body:e,cause:t,details:n,headers:o,status:s,url:a}){super("HTTP request failed.",{cause:t,details:n,metaMessages:[s&&"Status: ".concat(s),"URL: ".concat((0,i.G)(a)),e&&"Request body: ".concat((0,r.P)(e))].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=s,this.url=a}}class a extends o.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:["URL: ".concat((0,i.G)(n)),"Request body: ".concat((0,r.P)(e))],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data}}class c extends o.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:["URL: ".concat((0,i.G)(t)),"Request body: ".concat((0,r.P)(e))],name:"TimeoutError"})}}},4473:function(e,t,n){n.d(t,{B:function(){return c},EJ:function(){return j},GD:function(){return y},I0:function(){return x},KB:function(){return p},LX:function(){return u},NO:function(){return C},Nt:function(){return S},Og:function(){return f},PE:function(){return w},Pv:function(){return g},Ts:function(){return _},Uu:function(){return M},XS:function(){return d},ab:function(){return m},fl:function(){return k},gS:function(){return b},ir:function(){return A},nY:function(){return l},pT:function(){return v},r0:function(){return R},s7:function(){return a},u5:function(){return O},vl:function(){return E},x3:function(){return P},yR:function(){return h}});var r=n(1273),o=n(7825);class i extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,name:i,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:r||(null==e?void 0:e.metaMessages),name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||e.name,this.code=e instanceof o.bs?e.code:null!=t?t:-1}}class s extends i{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends i{constructor(e){super(e,{code:a.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends i{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends i{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:"The method".concat(t?' "'.concat(t,'"'):""," does not exist / is not available.")})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends i{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends i{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class h extends i{constructor(e){super(e,{code:h.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends i{constructor(e){super(e,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class v extends i{constructor(e){super(e,{code:v.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class p extends i{constructor(e){super(e,{code:p.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class b extends i{constructor(e,{method:t}={}){super(e,{code:b.code,name:"MethodNotSupportedRpcError",shortMessage:"Method".concat(t?' "'.concat(t,'"'):""," is not supported.")})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends i{constructor(e){super(e,{code:g.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends i{constructor(e){super(e,{code:y.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class m extends s{constructor(e){super(e,{code:m.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class _ extends s{constructor(e,{method:t}={}){super(e,{code:_.code,name:"UnsupportedProviderMethodError",shortMessage:"The Provider does not support the requested method".concat(t?' " '.concat(t,'"'):"",".")})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class O extends s{constructor(e){super(e,{code:O.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class x extends s{constructor(e){super(e,{code:x.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class P extends s{constructor(e){super(e,{code:P.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class E extends s{constructor(e){super(e,{code:E.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class M extends s{constructor(e){super(e,{code:M.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class S extends s{constructor(e){super(e,{code:S.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class j extends s{constructor(e){super(e,{code:j.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class k extends s{constructor(e){super(e,{code:k.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class C extends s{constructor(e){super(e,{code:C.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class R extends s{constructor(e){super(e,{code:R.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class A extends i{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},7307:function(e,t,n){n.d(t,{C:function(){return r},G:function(){return o}});let r=e=>e,o=e=>e},5036:function(e,t,n){n.d(t,{K:function(){return l},x:function(){return u}});var r=n(4898),o=n(3596),i=n(2112),s=n(686),a=n(4433);let c=new s.k(8192);function u(e,t){if(c.has("".concat(e,".").concat(t)))return c.get("".concat(e,".").concat(t));let n=t?"".concat(t).concat(e.toLowerCase()):e.substring(2).toLowerCase(),r=(0,i.w)((0,o.qX)(n),"bytes"),s=(t?n.substring("".concat(t,"0x").length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&r[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());let a="0x".concat(s.join(""));return c.set("".concat(e,".").concat(t),a),a}function l(e,t){if(!(0,a.U)(e,{strict:!1}))throw new r.b({address:e});return u(e,t)}},4433:function(e,t,n){n.d(t,{U:function(){return a}});var r=n(686),o=n(5036);let i=/^0x[a-fA-F0-9]{40}$/,s=new r.k(8192);function a(e,t){let{strict:n=!0}=null!=t?t:{},r="".concat(e,".").concat(n);if(s.has(r))return s.get(r);let a=!!i.test(e)&&(e.toLowerCase()===e||!n||(0,o.x)(e)===e);return s.set(r,a),a}},5597:function(e,t,n){n.d(t,{a:function(){return r}});function r(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},1230:function(e,t,n){n.d(t,{v:function(){return r}});function r(e){let{strict:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},9507:function(e,t,n){n.d(t,{gc:function(){return i},vk:function(){return o}});var r=n(1758);function o(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?i(e,{dir:t,size:n}):function(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;if(e.length>n)throw new r.$s({size:e.length,targetSize:n,type:"bytes"});let o=new Uint8Array(n);for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;let o=e.replace("0x","");if(o.length>2*n)throw new r.$s({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return"0x".concat(o["right"===t?"padEnd":"padStart"](2*n,"0"))}},5305:function(e,t,n){n.d(t,{d:function(){return o}});var r=n(1230);function o(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},8142:function(e,t,n){n.d(t,{f:function(){return r}});function r(e){let{dir:t="left"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;en)throw new r.M6({givenSize:(0,o.d)(e),maxSize:n})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{signed:n}=t;t.size&&a(e,{size:t.size});let r=BigInt(e);if(!n)return r;let o=(e.length-2)/2;return r<=(1n<<8n*BigInt(o)-1n)-1n?r:r-BigInt("0x".concat("f".padStart(2*o,"f")))-1n}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Number(c(e,t))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.nr)(e);return t.size&&(a(n,{size:t.size}),n=(0,i.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},3596:function(e,t,n){n.d(t,{O0:function(){return u},nr:function(){return h},qX:function(){return f}});var r=n(1273),o=n(1230),i=n(9507),s=n(5936),a=n(5578);let c=new TextEncoder;function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?h((0,a.eC)(e,t)):"boolean"==typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}(e,t):(0,o.v)(e)?h(e,t):f(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,i.vk)(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o="0".concat(o));let a=o.length/2,c=new Uint8Array(a);for(let e=0,t=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=c.encode(e);return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}},5578:function(e,t,n){n.d(t,{$G:function(){return h},C4:function(){return c},NC:function(){return a},ci:function(){return u},eC:function(){return l}});var r=n(5851),o=n(9507),i=n(5936);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?h(e,t):"boolean"==typeof e?c(e,t):u(e,t)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="0x".concat(Number(e));return"number"==typeof t.size?((0,i.Yf)(n,{size:t.size}),(0,o.vk)(n,{size:t.size})):n}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{},{signed:i,size:s}=n,a=BigInt(e);s?t=i?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(t=BigInt(Number.MAX_SAFE_INTEGER));let c="bigint"==typeof t&&i?-t-1n:0;if(t&&a>t||a1&&void 0!==arguments[1]?arguments[1]:{};return u(d.encode(e),t)}},2112:function(e,t,n){n.d(t,{w:function(){return k}});var r=n(2674);let o=BigInt(4294967296-1),i=BigInt(32),s=(e,t,n)=>e<>>32-n,a=(e,t,n)=>t<>>32-n,c=(e,t,n)=>t<>>64-n,u=(e,t,n)=>e<>>64-n;var l=n(7721);let d=[],h=[],f=[],v=BigInt(0),p=BigInt(1),b=BigInt(2),g=BigInt(7),y=BigInt(256),m=BigInt(113);for(let e=0,t=p,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],d.push(2*(5*r+n)),h.push((e+1)*(e+2)/2%64);let o=v;for(let e=0;e<7;e++)(t=(t<>g)*m)%y)&b&&(o^=p<<(p<1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let s=0;s1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&o),l:Number(e>>i&o)}:{h:0|Number(e>>i&o),l:0|Number(e&o)}}(e[s],t);[n[s],r[s]]=[a,c]}return[n,r]}(f,!0),O=(e,t,n)=>n>32?c(e,t,n):s(e,t,n),x=(e,t,n)=>n>32?u(e,t,n):a(e,t,n);class P extends l.kb{keccak(){l.iA||(0,l.l1)(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,o=(t+2)%10,i=n[o],s=n[o+1],a=O(i,s,1)^n[r],c=x(i,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=a,e[t+n+1]^=c}let t=e[2],o=e[3];for(let n=0;n<24;n++){let r=h[n],i=O(t,o,r),s=x(t,o,r),a=d[n];t=e[a],o=e[a+1],e[a]=i,e[a+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=w[r],e[1]^=_[r]}n.fill(0)}(this.state32,this.rounds),l.iA||(0,l.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r.$h)(this);let{blockLen:t,state:n}=this,o=(e=(0,l.O0)(e)).length;for(let r=0;r=n&&this.keccak();let i=Math.min(n-this.posOut,o-r);e.set(t.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.k8)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.eB)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return e||(e=new P(t,n,r,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=r,e.enableXOF=i,e.destroyed=this.destroyed,e}constructor(e,t,n,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=i,(0,r.k8)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,l.Jq)(this.state)}}let E=(0,l.hE)(()=>new P(136,1,32));var M=n(1230),S=n(3596),j=n(5578);function k(e,t){let n=E((0,M.v)(e,{strict:!1})?(0,S.O0)(e):e);return"bytes"===(t||"hex")?n:(0,j.NC)(n)}},686:function(e,t,n){n.d(t,{k:function(){return r}});class r extends Map{get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}}},5493:function(e,t,n){n.d(t,{S:function(){return i}});var r=n(9212);let o=new Map;function i(e){let{fn:t,id:n,shouldSplitBatch:i,wait:s=0,sort:a}=e,c=async()=>{let e=d();u();let n=e.map(e=>{let{args:t}=e;return t});0!==n.length&&t(n).then(t=>{a&&Array.isArray(t)&&t.sort(a);for(let n=0;n{for(let n=0;no.delete(n),l=()=>d().map(e=>{let{args:t}=e;return t}),d=()=>o.get(n)||[],h=e=>o.set(n,[...d(),e]);return{flush:u,async schedule(e){let{promise:t,resolve:n,reject:o}=(0,r.n)();return((null==i?void 0:i([...l(),e]))&&c(),d().length>0)?h({args:e,resolve:n,reject:o}):(h({args:e,resolve:n,reject:o}),setTimeout(c,s)),t}}}},9212:function(e,t,n){n.d(t,{n:function(){return r}});function r(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}},2179:function(e,t,n){n.d(t,{J:function(){return o}});var r=n(3440);function o(e){let{delay:t=100,retryCount:n=2,shouldRetry:o=()=>!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((i,s)=>{let a=async function(){let{count:c=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=async e=>{let{error:n}=e,o="function"==typeof t?t({count:c,error:n}):t;o&&await (0,r.D)(o),a({count:c+1})};try{let t=await e();i(t)}catch(e){if(cJSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},2586:function(e,t,n){let r;n.d(t,{h:function(){return i}});let o=256;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11;if(!r||o+e>512){r="",o=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(o,o+++e)}},3440:function(e,t,n){n.d(t,{D:function(){return r}});async function r(e){return new Promise(t=>setTimeout(t,e))}},2674:function(e,t,n){function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&!n.includes(e.length))throw Error("Uint8Array expected of length "+n+", got length="+e.length)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function a(e,t){o(e);let n=t.outputLen;if(e.length>>t}let c=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function u(e){for(let n=0;n>>8&65280|t>>>24&255}}function l(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,o.gk)(e),e}function d(){for(var e=arguments.length,t=Array(e),n=0;ne().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));if(r&&"function"==typeof r.randomBytes)return Uint8Array.from(r.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}},604:function(e,t,n){n.d(t,{V:function(){return a},F:function(){return c}});var r=n(4090);let o=!1;async function i(e){var t,n;let r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return[];o=!0,e.setState(e=>({...e,status:e.current?"reconnecting":"connecting"}));let s=[];if(null===(t=i.connectors)||void 0===t?void 0:t.length)for(let t of i.connectors){let n;n="function"==typeof t?e._internal.connectors.setup(t):t,s.push(n)}else s.push(...e.connectors);try{r=await (null===(n=e.storage)||void 0===n?void 0:n.getItem("recentConnectorId"))}catch(e){}let a={};for(let[,t]of e.state.connections)a[t.connector.id]=1;r&&(a[r]=0);let c=Object.keys(a).length>0?[...s].sort((e,t)=>{var n,r;return(null!==(n=a[e.id])&&void 0!==n?n:10)-(null!==(r=a[t.id])&&void 0!==r?r:10)}):s,u=!1,l=[],d=[];for(let t of c){let n=await t.getProvider().catch(()=>void 0);if(!n||d.some(e=>e===n)||!await t.isAuthorized())continue;let r=await t.connect({isReconnecting:!0}).catch(()=>null);r&&(t.emitter.off("connect",e._internal.events.connect),t.emitter.on("change",e._internal.events.change),t.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{let n=new Map(u?e.connections:new Map).set(t.uid,{accounts:r.accounts,chainId:r.chainId,connector:t});return{...e,current:u?e.current:t.uid,connections:n}}),l.push({accounts:r.accounts,chainId:r.chainId,connector:t}),d.push(n),u=!0)}return("reconnecting"===e.state.status||"connecting"===e.state.status)&&(u?e.setState(e=>({...e,status:"connected"})):e.setState(e=>({...e,connections:new Map,current:null,status:"disconnected"}))),o=!1,l}function s(e){let{children:t,config:n,initialState:o,reconnectOnMount:s=!0}=e,{onMount:a}=function(e,t){let{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(e=>e.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(t=>{var n,r;let o=new Set;for(let e of null!=t?t:[])if(e.rdns)for(let t of Array.isArray(e.rdns)?e.rdns:[e.rdns])o.add(t);let i=[];for(let t of null!==(r=null===(n=e._internal.mipd)||void 0===n?void 0:n.getProviders())&&void 0!==r?r:[]){if(o.has(t.info.rdns))continue;let n=e._internal.connectors.providerDetailToConnector(t),r=e._internal.connectors.setup(n);i.push(r)}return[...t,...i]})),r?i(e):e.storage&&e.setState(e=>({...e,connections:new Map}))}}}(n,{initialState:o,reconnectOnMount:s});n._internal.ssr||a();let c=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(c.current&&n._internal.ssr)return a(),()=>{c.current=!1}},[]),t}let a=(0,r.createContext)(void 0);function c(e){let{children:t,config:n}=e;return(0,r.createElement)(s,e,(0,r.createElement)(a.Provider,{value:n},t))}}}]);