@reown/appkit-cdn 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appkit.js +1 -1
- package/dist/appkit.js.map +1 -1
- package/package.json +7 -7
package/dist/appkit.js
CHANGED
|
@@ -6094,7 +6094,7 @@ const f$9=e=>void 0===e.strings
|
|
|
6094
6094
|
* Released under MIT license <https://lodash.com/license>
|
|
6095
6095
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
6096
6096
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
6097
|
-
*/P2=qi,s2=qi.exports,function(){var e,t="Expected a function",r="__lodash_hash_undefined__",n="__lodash_placeholder__",i=16,o=32,a=64,s=128,c=256,l=1/0,u=9007199254740991,d=NaN,h=4294967295,f=h-1,p=h>>>1,m=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",a],["rearg",c]],g="[object Arguments]",b="[object Array]",y="[object Boolean]",v="[object Date]",w="[object Error]",_="[object Function]",E="[object GeneratorFunction]",C="[object Map]",$="[object Number]",S="[object Object]",x="[object Promise]",k="[object RegExp]",A="[object Set]",T="[object String]",I="[object Symbol]",R="[object WeakMap]",M="[object ArrayBuffer]",P="[object DataView]",N="[object Float32Array]",O="[object Float64Array]",L="[object Int8Array]",B="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",j="[object Uint8ClampedArray]",F="[object Uint16Array]",W="[object Uint32Array]",z=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(K.source),Z=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(re.source),ie=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Te="['’]",Ie="["+Ee+"]",Re="["+Ae+"]",Me="["+Ce+"]",Pe="\\d+",Ne="["+$e+"]",Oe="["+Se+"]",Le="[^"+Ee+Ae+Pe+$e+Se+xe+"]",Be="\\ud83c[\\udffb-\\udfff]",De="[^"+Ee+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+xe+"]",We="\\u200d",ze="(?:"+Oe+"|"+Le+")",He="(?:"+Fe+"|"+Le+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ke="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Me+"|"+Be+")?",Ge="["+ke+"]?",Ze=Ge+Ve+"(?:"+We+"(?:"+[De,Ue,je].join("|")+")"+Ge+Ve+")*",Ye="(?:"+[Ne,Ue,je].join("|")+")"+Ze,Je="(?:"+[De+Me+"?",Me,Ue,je,Ie].join("|")+")",Qe=RegExp(Te,"g"),Xe=RegExp(Me,"g"),et=RegExp(Be+"(?="+Be+")|"+Je+Ze,"g"),tt=RegExp([Fe+"?"+Oe+"+"+qe+"(?="+[Re,Fe,"$"].join("|")+")",He+"+"+Ke+"(?="+[Re,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+qe,Fe+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ye].join("|"),"g"),rt=RegExp("["+We+Ee+Ce+ke+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],ot=-1,at={};at[N]=at[O]=at[L]=at[B]=at[D]=at[U]=at[j]=at[F]=at[W]=!0,at[g]=at[b]=at[M]=at[y]=at[P]=at[v]=at[w]=at[_]=at[C]=at[$]=at[S]=at[k]=at[A]=at[T]=at[R]=!1;var st={};st[g]=st[b]=st[M]=st[P]=st[y]=st[v]=st[N]=st[O]=st[L]=st[B]=st[D]=st[C]=st[$]=st[S]=st[k]=st[A]=st[T]=st[I]=st[U]=st[j]=st[F]=st[W]=!0,st[w]=st[_]=st[R]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ut=parseInt,dt="object"==typeof _n&&_n&&_n.Object===Object&&_n,ht="object"==typeof self&&self&&self.Object===Object&&self,ft=dt||ht||Function("return this")(),pt=s2&&!s2.nodeType&&s2,mt=pt&&P2&&!P2.nodeType&&P2,gt=mt&&mt.exports===pt,bt=gt&&dt.process,yt=function(){try{return mt&&mt.require&&mt.require("util").types||bt&&bt.binding&&bt.binding("util")}catch{}}(),vt=yt&&yt.isArrayBuffer,wt=yt&&yt.isDate,_t=yt&&yt.isMap,Et=yt&&yt.isRegExp,Ct=yt&&yt.isSet,$t=yt&&yt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function xt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function kt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function Rt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Mt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Nt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Ot(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Lt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Bt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Dt=qt("length");function Ut(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function jt(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ft(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):jt(e,zt,r)}function Wt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function zt(e){return e!=e}function Ht(e,t){var r=null==e?0:e.length;return r?Gt(e,t)/r:d}function qt(t){return function(r){return null==r?e:r[t]}}function Kt(t){return function(r){return null==t?e:t[r]}}function Vt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Gt(t,r){for(var n,i=-1,o=t.length;++i<o;){var a=r(t[i]);a!==e&&(n=n===e?a:n+a)}return n}function Zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Yt(e){return e&&e.slice(0,hr(e)+1).replace(ie,"")}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Pt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function er(e,t){for(var r=-1,n=e.length;++r<n&&Ft(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length;r--&&Ft(t,e[r],0)>-1;);return r}var rr=Kt({"À":"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"}),nr=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+ct[e]}function or(e){return rt.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function sr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,i=e.length,o=0,a=[];++r<i;){var s=e[r];(s===t||s===n)&&(e[r]=n,a[o++]=r)}return a}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){return or(e)?function(e){for(var t=et.lastIndex=0;et.test(e);)++t;return t}(e):Dt(e)}function dr(e){return or(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var fr=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pr=function oe(Ee){var Ce,$e=(Ee=null==Ee?ft:pr.defaults(ft.Object(),Ee,pr.pick(ft,it))).Array,Se=Ee.Date,xe=Ee.Error,ke=Ee.Function,Ae=Ee.Math,Te=Ee.Object,Ie=Ee.RegExp,Re=Ee.String,Me=Ee.TypeError,Pe=$e.prototype,Ne=ke.prototype,Oe=Te.prototype,Le=Ee["__core-js_shared__"],Be=Ne.toString,De=Oe.hasOwnProperty,Ue=0,je=(Ce=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+Ce:"",Fe=Oe.toString,We=Be.call(Te),ze=ft._,He=Ie("^"+Be.call(De).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=gt?Ee.Buffer:e,Ke=Ee.Symbol,Ve=Ee.Uint8Array,Ge=qe?qe.allocUnsafe:e,Ze=sr(Te.getPrototypeOf,Te),Ye=Te.create,Je=Oe.propertyIsEnumerable,et=Pe.splice,rt=Ke?Ke.isConcatSpreadable:e,ct=Ke?Ke.iterator:e,dt=Ke?Ke.toStringTag:e,ht=function(){try{var e=po(Te,"defineProperty");return e({},"",{}),e}catch{}}(),pt=Ee.clearTimeout!==ft.clearTimeout&&Ee.clearTimeout,mt=Se&&Se.now!==ft.Date.now&&Se.now,bt=Ee.setTimeout!==ft.setTimeout&&Ee.setTimeout,yt=Ae.ceil,Dt=Ae.floor,Kt=Te.getOwnPropertySymbols,mr=qe?qe.isBuffer:e,gr=Ee.isFinite,br=Pe.join,yr=sr(Te.keys,Te),vr=Ae.max,wr=Ae.min,_r=Se.now,Er=Ee.parseInt,Cr=Ae.random,$r=Pe.reverse,Sr=po(Ee,"DataView"),xr=po(Ee,"Map"),kr=po(Ee,"Promise"),Ar=po(Ee,"Set"),Tr=po(Ee,"WeakMap"),Ir=po(Te,"create"),Rr=Tr&&new Tr,Mr={},Pr=jo(Sr),Nr=jo(xr),Or=jo(kr),Lr=jo(Ar),Br=jo(Tr),Dr=Ke?Ke.prototype:e,Ur=Dr?Dr.valueOf:e,jr=Dr?Dr.toString:e;function Fr(e){if(ns(e)&&!Ka(e)&&!(e instanceof qr)){if(e instanceof Hr)return e;if(De.call(e,"__wrapped__"))return Fo(e)}return new Hr(e)}var Wr=function(){function t(){}return function(r){if(!rs(r))return{};if(Ye)return Ye(r);t.prototype=r;var n=new t;return t.prototype=e,n}}();function zr(){}function Hr(t,r){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=e}function qr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Gr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Jr(e,t){var r=Ka(e),n=!r&&qa(e),i=!r&&!n&&Ya(e),o=!r&&!n&&!i&&ds(e),a=r||n||i||o,s=a?Zt(e.length,Re):[],c=s.length;for(var l in e)(t||De.call(e,l))&&(!a||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_o(l,c)))&&s.push(l);return s}function Qr(t){var r=t.length;return r?t[Yn(0,r-1)]:e}function Xr(e,t){return Bo(Ri(e),ln(t,0,e.length))}function en(e){return Bo(Ri(e))}function tn(t,r,n){(n!==e&&!Wa(t[r],n)||n===e&&!(r in t))&&sn(t,r,n)}function rn(t,r,n){var i=t[r];(!De.call(t,r)||!Wa(i,n)||n===e&&!(r in t))&&sn(t,r,n)}function nn(e,t){for(var r=e.length;r--;)if(Wa(e[r][0],t))return r;return-1}function on(e,t,r,n){return pn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function an(e,t){return e&&Mi(t,Ps(t),e)}function sn(e,t,r){"__proto__"==t&&ht?ht(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function cn(t,r){for(var n=-1,i=r.length,o=$e(i),a=null==t;++n<i;)o[n]=a?e:As(t,r[n]);return o}function ln(t,r,n){return t==t&&(n!==e&&(t=t<=n?t:n),r!==e&&(t=t>=r?t:r)),t}function un(t,r,n,i,o,a){var s,c=1&r,l=2&r,u=4&r;if(n&&(s=o?n(t,i,o,a):n(t)),s!==e)return s;if(!rs(t))return t;var d=Ka(t);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!c)return Ri(t,s)}else{var h=bo(t),f=h==_||h==E;if(Ya(t))return Si(t,c);if(h==S||h==g||f&&!o){if(s=l||f?{}:vo(t),!c)return l?function(e,t){return Mi(e,go(e),t)}(t,function(e,t){return e&&Mi(t,Ns(t),e)}(s,t)):function(e,t){return Mi(e,mo(e),t)}(t,an(s,t))}else{if(!st[h])return o?t:{};s=function(e,t,r){var n=e.constructor;switch(t){case M:return xi(e);case y:case v:return new n(+e);case P:return function(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case O:case L:case B:case D:case U:case j:case F:case W:return ki(e,r);case C:return new n;case $:case T:return new n(e);case k:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new n;case I:return function(e){return Ur?Te(Ur.call(e)):{}}(e)}}(t,h,c)}}a||(a=new Yr);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(e){s.add(un(e,r,n,e,t,a))})):is(t)&&t.forEach((function(e,i){s.set(i,un(e,r,n,i,t,a))}));var m=d?e:(u?l?ao:oo:l?Ns:Ps)(t);return kt(m||t,(function(e,i){m&&(e=t[i=e]),rn(s,i,un(e,r,n,i,t,a))})),s}function dn(t,r,n){var i=n.length;if(null==t)return!i;for(t=Te(t);i--;){var o=n[i],a=r[o],s=t[o];if(s===e&&!(o in t)||!a(s))return!1}return!0}function hn(r,n,i){if("function"!=typeof r)throw new Me(t);return Po((function(){r.apply(e,i)}),n)}function fn(e,t,r,n){var i=-1,o=Rt,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;r&&(t=Pt(t,Jt(r))),n?(o=Mt,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Zr(t));e:for(;++i<s;){var u=e[i],d=null==r?u:r(u);if(u=n||0!==u?u:0,a&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,n)||c.push(u)}return c}Fr.templateSettings={escape:Y,evaluate:J,interpolate:Q,variable:"",imports:{_:Fr}},Fr.prototype=zr.prototype,Fr.prototype.constructor=Fr,Hr.prototype=Wr(zr.prototype),Hr.prototype.constructor=Hr,qr.prototype=Wr(zr.prototype),qr.prototype.constructor=qr,Kr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Kr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kr.prototype.get=function(t){var n=this.__data__;if(Ir){var i=n[t];return i===r?e:i}return De.call(n,t)?n[t]:e},Kr.prototype.has=function(t){var r=this.__data__;return Ir?r[t]!==e:De.call(r,t)},Kr.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Ir&&n===e?r:n,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=nn(t,e);return!(r<0||(r==t.length-1?t.pop():et.call(t,r,1),--this.size,0))},Vr.prototype.get=function(t){var r=this.__data__,n=nn(r,t);return n<0?e:r[n][1]},Vr.prototype.has=function(e){return nn(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Kr,map:new(xr||Vr),string:new Kr}},Gr.prototype.delete=function(e){var t=ho(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return ho(this,e).get(e)},Gr.prototype.has=function(e){return ho(this,e).has(e)},Gr.prototype.set=function(e,t){var r=ho(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Zr.prototype.add=Zr.prototype.push=function(e){return this.__data__.set(e,r),this},Zr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!xr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var pn=Oi(En),mn=Oi(Cn,!0);function gn(e,t){var r=!0;return pn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function bn(t,r,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r(a);if(null!=s&&(c===e?s==s&&!us(s):n(s,c)))var c=s,l=a}return l}function yn(e,t){var r=[];return pn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function vn(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=wo),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?vn(s,t-1,r,n,i):Nt(i,s):n||(i[i.length]=s)}return i}var wn=Li(),_n=Li(!0);function En(e,t){return e&&wn(e,t,Ps)}function Cn(e,t){return e&&_n(e,t,Ps)}function $n(e,t){return It(t,(function(t){return Xa(e[t])}))}function Sn(t,r){for(var n=0,i=(r=_i(r,t)).length;null!=t&&n<i;)t=t[Uo(r[n++])];return n&&n==i?t:e}function xn(e,t,r){var n=t(e);return Ka(e)?n:Nt(n,r(e))}function kn(t){return null==t?t===e?"[object Undefined]":"[object Null]":dt&&dt in Te(t)?function(t){var r=De.call(t,dt),n=t[dt];try{t[dt]=e;var i=!0}catch{}var o=Fe.call(t);return i&&(r?t[dt]=n:delete t[dt]),o}(t):function(e){return Fe.call(e)}(t)}function An(e,t){return e>t}function Tn(e,t){return null!=e&&De.call(e,t)}function In(e,t){return null!=e&&t in Te(e)}function Rn(t,r,n){for(var i=n?Mt:Rt,o=t[0].length,a=t.length,s=a,c=$e(a),l=1/0,u=[];s--;){var d=t[s];s&&r&&(d=Pt(d,Jt(r))),l=wr(d.length,l),c[s]=!n&&(r||o>=120&&d.length>=120)?new Zr(s&&d):e}d=t[0];var h=-1,f=c[0];e:for(;++h<o&&u.length<l;){var p=d[h],m=r?r(p):p;if(p=n||0!==p?p:0,!(f?Xt(f,m):i(u,m,n))){for(s=a;--s;){var g=c[s];if(!(g?Xt(g,m):i(t[s],m,n)))continue e}f&&f.push(m),u.push(p)}}return u}function Mn(t,r,n){var i=null==(t=Io(t,r=_i(r,t)))?t:t[Uo(Qo(r))];return null==i?e:St(i,t,n)}function Pn(e){return ns(e)&&kn(e)==g}function Nn(t,r,n,i,o){return t===r||(null==t||null==r||!ns(t)&&!ns(r)?t!=t&&r!=r:function(t,r,n,i,o,a){var s=Ka(t),c=Ka(r),l=s?b:bo(t),u=c?b:bo(r),d=(l=l==g?S:l)==S,h=(u=u==g?S:u)==S,f=l==u;if(f&&Ya(t)){if(!Ya(r))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new Yr),s||ds(t)?no(t,r,n,i,o,a):function(e,t,r,n,i,o,a){switch(r){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case y:case v:case $:return Wa(+e,+t);case w:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case C:var s=ar;case A:var c=1&n;if(s||(s=lr),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var u=no(s(e),s(t),n,i,o,a);return a.delete(e),u;case I:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}(t,r,l,n,i,o,a);if(!(1&n)){var p=d&&De.call(t,"__wrapped__"),m=h&&De.call(r,"__wrapped__");if(p||m){var _=p?t.value():t,E=m?r.value():r;return a||(a=new Yr),o(_,E,n,i,a)}}return!!f&&(a||(a=new Yr),function(t,r,n,i,o,a){var s=1&n,c=oo(t),l=c.length,u=oo(r),d=u.length;if(l!=d&&!s)return!1;for(var h=l;h--;){var f=c[h];if(!(s?f in r:De.call(r,f)))return!1}var p=a.get(t),m=a.get(r);if(p&&m)return p==r&&m==t;var g=!0;a.set(t,r),a.set(r,t);for(var b=s;++h<l;){var y=t[f=c[h]],v=r[f];if(i)var w=s?i(v,y,f,r,t,a):i(y,v,f,t,r,a);if(!(w===e?y===v||o(y,v,n,i,a):w)){g=!1;break}b||(b="constructor"==f)}if(g&&!b){var _=t.constructor,E=r.constructor;_!=E&&"constructor"in t&&"constructor"in r&&!("function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E)&&(g=!1)}return a.delete(t),a.delete(r),g}(t,r,n,i,o,a))}(t,r,n,i,Nn,o))}function On(t,r,n,i){var o=n.length,a=o,s=!i;if(null==t)return!a;for(t=Te(t);o--;){var c=n[o];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<a;){var l=(c=n[o])[0],u=t[l],d=c[1];if(s&&c[2]){if(u===e&&!(l in t))return!1}else{var h=new Yr;if(i)var f=i(u,d,l,t,r,h);if(!(f===e?Nn(d,u,3,i,h):f))return!1}}return!0}function Ln(e){return!(!rs(e)||function(e){return!!je&&je in e}(e))&&(Xa(e)?He:ge).test(jo(e))}function Bn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Ka(e)?zn(e[0],e[1]):Wn(e):pc(e)}function Dn(e){if(!xo(e))return yr(e);var t=[];for(var r in Te(e))De.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Un(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var r in Te(e))t.push(r);return t}(e);var t=xo(e),r=[];for(var n in e)"constructor"==n&&(t||!De.call(e,n))||r.push(n);return r}function jn(e,t){return e<t}function Fn(e,t){var r=-1,n=Ga(e)?$e(e.length):[];return pn(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function Wn(e){var t=fo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||On(r,e,t)}}function zn(t,r){return Co(t)&&ko(r)?Ao(Uo(t),r):function(n){var i=As(n,t);return i===e&&i===r?Ts(n,t):Nn(r,i,3)}}function Hn(t,r,n,i,o){t!==r&&wn(r,(function(a,s){if(o||(o=new Yr),rs(a))!function(t,r,n,i,o,a,s){var c=Ro(t,n),l=Ro(r,n),u=s.get(l);if(u)tn(t,n,u);else{var d=a?a(c,l,n+"",t,r,s):e,h=d===e;if(h){var f=Ka(l),p=!f&&Ya(l),m=!f&&!p&&ds(l);d=l,f||p||m?Ka(c)?d=c:Za(c)?d=Ri(c):p?(h=!1,d=Si(l,!0)):m?(h=!1,d=ki(l,!0)):d=[]:as(l)||qa(l)?(d=c,qa(c)?d=vs(c):(!rs(c)||Xa(c))&&(d=vo(l))):h=!1}h&&(s.set(l,d),o(d,l,i,a,s),s.delete(l)),tn(t,n,d)}}(t,r,s,n,Hn,i,o);else{var c=i?i(Ro(t,s),a,s+"",t,r,o):e;c===e&&(c=a),tn(t,s,c)}}),Ns)}function qn(t,r){var n=t.length;if(n)return _o(r+=r<0?n:0,n)?t[r]:e}function Kn(e,t,r){t=t.length?Pt(t,(function(e){return Ka(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;return t=Pt(t,Jt(uo())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(Fn(e,(function(e,r,i){return{criteria:Pt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var c=Ai(i[n],o[n]);if(c)return n>=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Sn(e,a);r(s,a)&&ti(o,_i(a,e),s)}return o}function Gn(e,t,r,n){var i=n?Wt:Ft,o=-1,a=t.length,s=e;for(e===t&&(t=Ri(t)),r&&(s=Pt(e,Jt(r)));++o<a;)for(var c=0,l=t[o],u=r?r(l):l;(c=i(s,u,c,n))>-1;)s!==e&&et.call(s,c,1),et.call(e,c,1);return e}function Zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;_o(i)?et.call(e,i,1):fi(e,i)}}return e}function Yn(e,t){return e+Dt(Cr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>u)return r;do{t%2&&(r+=e),(t=Dt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return No(To(e,t,oc),e+"")}function Xn(e){return Qr(Ws(e))}function ei(e,t){var r=Ws(e);return Bo(r,ln(t,0,r.length))}function ti(t,r,n,i){if(!rs(t))return t;for(var o=-1,a=(r=_i(r,t)).length,s=a-1,c=t;null!=c&&++o<a;){var l=Uo(r[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(o!=s){var d=c[l];(u=i?i(d,l,c):e)===e&&(u=rs(d)?d:_o(r[o+1])?[]:{})}rn(c,l,u),c=c[l]}return t}var ri=Rr?function(e,t){return Rr.set(e,t),e}:oc,ni=ht?function(e,t){return ht(e,"toString",{configurable:!0,enumerable:!1,value:rc(t),writable:!0})}:oc;function ii(e){return Bo(Ws(e))}function oi(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=$e(i);++n<i;)o[n]=e[n+t];return o}function ai(e,t){var r;return pn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function si(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=p){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!us(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ci(e,t,oc,r)}function ci(t,r,n,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(r=n(r))!=r,c=null===r,l=us(r),u=r===e;o<a;){var d=Dt((o+a)/2),h=n(t[d]),p=h!==e,m=null===h,g=h==h,b=us(h);if(s)var y=i||g;else y=u?g&&(i||p):c?g&&p&&(i||!m):l?g&&p&&!m&&(i||!b):!m&&!b&&(i?h<=r:h<r);y?o=d+1:a=d}return wr(a,f)}function li(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!Wa(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?d:+e}function di(e){if("string"==typeof e)return e;if(Ka(e))return Pt(e,di)+"";if(us(e))return jr?jr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,r){var n=-1,i=Rt,o=e.length,a=!0,s=[],c=s;if(r)a=!1,i=Mt;else if(o>=200){var l=t?null:Ji(e);if(l)return lr(l);a=!1,i=Xt,c=new Zr}else c=t?[]:s;e:for(;++n<o;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,a&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(u)}else i(c,d,r)||(c!==s&&c.push(d),s.push(u))}return s}function fi(e,t){return null==(e=Io(e,t=_i(t,e)))||delete e[Uo(Qo(t))]}function pi(e,t,r,n){return ti(e,t,r(Sn(e,t)),n)}function mi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?oi(e,n?0:o,n?o+1:i):oi(e,n?o+1:0,n?i:o)}function gi(e,t){var r=e;return r instanceof qr&&(r=r.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))}),r)}function bi(e,t,r){var n=e.length;if(n<2)return n?hi(e[0]):[];for(var i=-1,o=$e(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=fn(o[i]||a,e[s],t,r));return hi(vn(o,1),t,r)}function yi(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:e;n(s,t[i],c)}return s}function vi(e){return Za(e)?e:[]}function wi(e){return"function"==typeof e?e:oc}function _i(e,t){return Ka(e)?e:Co(e,t)?[e]:Do(ws(e))}var Ei=Qn;function Ci(t,r,n){var i=t.length;return n=n===e?i:n,!r&&n>=i?t:oi(t,r,n)}var $i=pt||function(e){return ft.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function xi(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function ki(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(t,r){if(t!==r){var n=t!==e,i=null===t,o=t==t,a=us(t),s=r!==e,c=null===r,l=r==r,u=us(r);if(!c&&!u&&!a&&t>r||a&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!u&&t<r||u&&n&&o&&!i&&!a||c&&n&&o||!s&&o||!l)return-1}return 0}function Ti(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,c=t.length,l=vr(o-a,0),u=$e(c+l),d=!n;++s<c;)u[s]=t[s];for(;++i<a;)(d||i<o)&&(u[r[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function Ii(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,c=-1,l=t.length,u=vr(o-s,0),d=$e(u+l),h=!n;++i<u;)d[i]=e[i];for(var f=i;++c<l;)d[f+c]=t[c];for(;++a<s;)(h||i<o)&&(d[f+r[a]]=e[i++]);return d}function Ri(e,t){var r=-1,n=e.length;for(t||(t=$e(n));++r<n;)t[r]=e[r];return t}function Mi(t,r,n,i){var o=!n;n||(n={});for(var a=-1,s=r.length;++a<s;){var c=r[a],l=i?i(n[c],t[c],c,n,t):e;l===e&&(l=t[c]),o?sn(n,c,l):rn(n,c,l)}return n}function Pi(e,t){return function(r,n){var i=Ka(r)?xt:on,o=t?t():{};return i(r,e,uo(n,2),o)}}function Ni(t){return Qn((function(r,n){var i=-1,o=n.length,a=o>1?n[o-1]:e,s=o>2?n[2]:e;for(a=t.length>3&&"function"==typeof a?(o--,a):e,s&&Eo(n[0],n[1],s)&&(a=o<3?e:a,o=1),r=Te(r);++i<o;){var c=n[i];c&&t(r,c,i,a)}return r}))}function Oi(e,t){return function(r,n){if(null==r)return r;if(!Ga(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Te(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Li(e){return function(t,r,n){for(var i=-1,o=Te(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}function Bi(t){return function(r){var n=or(r=ws(r))?dr(r):e,i=n?n[0]:r.charAt(0),o=n?Ci(n,1).join(""):r.slice(1);return i[t]()+o}}function Di(e){return function(t){return Ot(Xs(qs(t).replace(Qe,"")),e,"")}}function Ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Wr(e.prototype),n=e.apply(r,t);return rs(n)?n:r}}function ji(t){return function(r,n,i){var o=Te(r);if(!Ga(r)){var a=uo(n,3);r=Ps(r),n=function(e){return a(o[e],e,o)}}var s=t(r,n,i);return s>-1?o[a?r[s]:s]:e}}function Fi(r){return io((function(n){var i=n.length,o=i,a=Hr.prototype.thru;for(r&&n.reverse();o--;){var s=n[o];if("function"!=typeof s)throw new Me(t);if(a&&!c&&"wrapper"==co(s))var c=new Hr([],!0)}for(o=c?o:i;++o<i;){var l=co(s=n[o]),u="wrapper"==l?so(s):e;c=u&&$o(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[co(u[0])].apply(c,u[3]):1==s.length&&$o(s)?c[l]():c.thru(s)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Ka(t))return c.plant(t).value();for(var r=0,o=i?n[r].apply(this,e):t;++r<i;)o=n[r].call(this,o);return o}}))}function Wi(t,r,n,i,o,a,c,l,u,d){var h=r&s,f=1&r,p=2&r,m=24&r,g=512&r,b=p?e:Ui(t);return function s(){for(var y=arguments.length,v=$e(y),w=y;w--;)v[w]=arguments[w];if(m)var _=lo(s),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,_);if(i&&(v=Ti(v,i,o,m)),a&&(v=Ii(v,a,c,m)),y-=E,m&&y<d){var C=cr(v,_);return Zi(t,r,Wi,s.placeholder,n,v,C,l,u,d-y)}var $=f?n:this,S=p?$[t]:t;return y=v.length,l?v=function(t,r){for(var n=t.length,i=wr(r.length,n),o=Ri(t);i--;){var a=r[i];t[i]=_o(a,n)?o[a]:e}return t}(v,l):g&&y>1&&v.reverse(),h&&u<y&&(v.length=u),this&&this!==ft&&this instanceof s&&(S=b||Ui(S)),S.apply($,v)}}function zi(e,t){return function(r,n){return function(e,t,r,n){return En(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Hi(t,r){return function(n,i){var o;if(n===e&&i===e)return r;if(n!==e&&(o=n),i!==e){if(o===e)return i;"string"==typeof n||"string"==typeof i?(n=di(n),i=di(i)):(n=ui(n),i=ui(i)),o=t(n,i)}return o}}function qi(e){return io((function(t){return t=Pt(t,Jt(uo())),Qn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Ki(t,r){var n=(r=r===e?" ":di(r)).length;if(n<2)return n?Jn(r,t):r;var i=Jn(r,yt(t/ur(r)));return or(r)?Ci(dr(i),0,t).join(""):i.slice(0,t)}function Vi(t){return function(r,n,i){return i&&"number"!=typeof i&&Eo(r,n,i)&&(n=i=e),r=ms(r),n===e?(n=r,r=0):n=ms(n),function(e,t,r,n){for(var i=-1,o=vr(yt((t-e)/(r||1)),0),a=$e(o);o--;)a[n?o:++i]=e,e+=r;return a}(r,n,i=i===e?r<n?1:-1:ms(i),t)}}function Gi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ys(t),r=ys(r)),e(t,r)}}function Zi(t,r,n,i,s,c,l,u,d,h){var f=8&r;r|=f?o:a,4&(r&=~(f?a:o))||(r&=-4);var p=[t,r,s,f?c:e,f?l:e,f?e:c,f?e:l,u,d,h],m=n.apply(e,p);return $o(t)&&Mo(m,p),m.placeholder=i,Oo(m,t,r)}function Yi(e){var t=Ae[e];return function(e,r){if(e=ys(e),(r=null==r?0:wr(gs(r),292))&&gr(e)){var n=(ws(e)+"e").split("e");return+((n=(ws(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Ji=Ar&&1/lr(new Ar([,-0]))[1]==l?function(e){return new Ar(e)}:uc;function Qi(e){return function(t){var r=bo(t);return r==C?ar(t):r==A?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(r,l,u,d,h,f,p,m){var g=2&l;if(!g&&"function"!=typeof r)throw new Me(t);var b=d?d.length:0;if(b||(l&=-97,d=h=e),p=p===e?p:vr(gs(p),0),m=m===e?m:gs(m),b-=h?h.length:0,l&a){var y=d,v=h;d=h=e}var w=g?e:so(r),_=[r,l,u,d,h,y,v,f,p,m];if(w&&function(e,t){var r=e[1],i=t[1],o=r|i,a=o<131,l=i==s&&8==r||i==s&&r==c&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!a&&!l)return e;1&i&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ti(d,u,t[4]):u,e[4]=d?cr(e[3],n):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ii(d,u,t[6]):u,e[6]=d?cr(e[5],n):t[6]),(u=t[7])&&(e[7]=u),i&s&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(_,w),r=_[0],l=_[1],u=_[2],d=_[3],h=_[4],!(m=_[9]=_[9]===e?g?0:r.length:vr(_[9]-b,0))&&24&l&&(l&=-25),l&&1!=l)E=8==l||l==i?function(t,r,n){var i=Ui(t);return function o(){for(var a=arguments.length,s=$e(a),c=a,l=lo(o);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:cr(s,l);return(a-=u.length)<n?Zi(t,r,Wi,o.placeholder,e,s,u,e,e,n-a):St(this&&this!==ft&&this instanceof o?i:t,this,s)}}(r,l,m):l!=o&&33!=l||h.length?Wi.apply(e,_):function(e,t,r,n){var i=1&t,o=Ui(e);return function t(){for(var a=-1,s=arguments.length,c=-1,l=n.length,u=$e(l+s),d=this&&this!==ft&&this instanceof t?o:e;++c<l;)u[c]=n[c];for(;s--;)u[c++]=arguments[++a];return St(d,i?r:this,u)}}(r,l,u,d);else var E=function(e,t,r){var n=1&t,i=Ui(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(r,l,u);return Oo((w?ri:Mo)(E,_),r,l)}function eo(t,r,n,i){return t===e||Wa(t,Oe[n])&&!De.call(i,n)?r:t}function to(t,r,n,i,o,a){return rs(t)&&rs(r)&&(a.set(r,t),Hn(t,r,e,to,a),a.delete(r)),t}function ro(t){return as(t)?e:t}function no(t,r,n,i,o,a){var s=1&n,c=t.length,l=r.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(t),d=a.get(r);if(u&&d)return u==r&&d==t;var h=-1,f=!0,p=2&n?new Zr:e;for(a.set(t,r),a.set(r,t);++h<c;){var m=t[h],g=r[h];if(i)var b=s?i(g,m,h,r,t,a):i(m,g,h,t,r,a);if(b!==e){if(b)continue;f=!1;break}if(p){if(!Bt(r,(function(e,t){if(!Xt(p,t)&&(m===e||o(m,e,n,i,a)))return p.push(t)}))){f=!1;break}}else if(m!==g&&!o(m,g,n,i,a)){f=!1;break}}return a.delete(t),a.delete(r),f}function io(t){return No(To(t,e,Vo),t+"")}function oo(e){return xn(e,Ps,mo)}function ao(e){return xn(e,Ns,go)}var so=Rr?function(e){return Rr.get(e)}:uc;function co(e){for(var t=e.name+"",r=Mr[t],n=De.call(Mr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function lo(e){return(De.call(Fr,"placeholder")?Fr:e).placeholder}function uo(){var e=Fr.iteratee||ac;return e=e===ac?Bn:e,arguments.length?e(arguments[0],arguments[1]):e}function ho(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function fo(e){for(var t=Ps(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ko(i)]}return t}function po(t,r){var n=function(t,r){return null==t?e:t[r]}(t,r);return Ln(n)?n:e}var mo=Kt?function(e){return null==e?[]:(e=Te(e),It(Kt(e),(function(t){return Je.call(e,t)})))}:bc,go=Kt?function(e){for(var t=[];e;)Nt(t,mo(e)),e=Ze(e);return t}:bc,bo=kn;function yo(e,t,r){for(var n=-1,i=(t=_i(t,e)).length,o=!1;++n<i;){var a=Uo(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ts(i)&&_o(a,i)&&(Ka(e)||qa(e))}function vo(e){return"function"!=typeof e.constructor||xo(e)?{}:Wr(Ze(e))}function wo(e){return Ka(e)||qa(e)||!!(rt&&e&&e[rt])}function _o(e,t){var r=typeof e;return!!(t=t??u)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Eo(e,t,r){if(!rs(r))return!1;var n=typeof t;return!!("number"==n?Ga(r)&&_o(t,r.length):"string"==n&&t in r)&&Wa(r[t],e)}function Co(e,t){if(Ka(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!us(e))||ee.test(e)||!X.test(e)||null!=t&&e in Te(t)}function $o(e){var t=co(e),r=Fr[t];if("function"!=typeof r||!(t in qr.prototype))return!1;if(e===r)return!0;var n=so(r);return!!n&&e===n[0]}(Sr&&bo(new Sr(new ArrayBuffer(1)))!=P||xr&&bo(new xr)!=C||kr&&bo(kr.resolve())!=x||Ar&&bo(new Ar)!=A||Tr&&bo(new Tr)!=R)&&(bo=function(t){var r=kn(t),n=r==S?t.constructor:e,i=n?jo(n):"";if(i)switch(i){case Pr:return P;case Nr:return C;case Or:return x;case Lr:return A;case Br:return R}return r});var So=Le?Xa:yc;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function ko(e){return e==e&&!rs(e)}function Ao(t,r){return function(n){return null!=n&&n[t]===r&&(r!==e||t in Te(n))}}function To(t,r,n){return r=vr(r===e?t.length-1:r,0),function(){for(var e=arguments,i=-1,o=vr(e.length-r,0),a=$e(o);++i<o;)a[i]=e[r+i];i=-1;for(var s=$e(r+1);++i<r;)s[i]=e[i];return s[r]=n(a),St(t,this,s)}}function Io(e,t){return t.length<2?e:Sn(e,oi(t,0,-1))}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Lo(ri),Po=bt||function(e,t){return ft.setTimeout(e,t)},No=Lo(ni);function Oo(e,t,r){var n=t+"";return No(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return kt(m,(function(r){var n="_."+r[0];t&r[1]&&!Rt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ce):[]}(n),r)))}function Lo(t){var r=0,n=0;return function(){var i=_r(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(e,arguments)}}function Bo(t,r){var n=-1,i=t.length,o=i-1;for(r=r===e?i:r;++n<r;){var a=Yn(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=r,t}var Do=function(e){var t=La(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,r,n,i){t.push(n?i.replace(de,"$1"):r||e)})),t}));function Uo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return Be.call(e)}catch{}try{return e+""}catch{}}return""}function Fo(e){if(e instanceof qr)return e.clone();var t=new Hr(e.__wrapped__,e.__chain__);return t.__actions__=Ri(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Wo=Qn((function(e,t){return Za(e)?fn(e,vn(t,1,Za,!0)):[]})),zo=Qn((function(t,r){var n=Qo(r);return Za(n)&&(n=e),Za(t)?fn(t,vn(r,1,Za,!0),uo(n,2)):[]})),Ho=Qn((function(t,r){var n=Qo(r);return Za(n)&&(n=e),Za(t)?fn(t,vn(r,1,Za,!0),e,n):[]}));function qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:gs(r);return i<0&&(i=vr(n+i,0)),jt(e,uo(t,3),i)}function Ko(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==e&&(o=gs(n),o=n<0?vr(i+o,0):wr(o,i-1)),jt(t,uo(r,3),o,!0)}function Vo(e){return null!=e&&e.length?vn(e,1):[]}function Go(t){return t&&t.length?t[0]:e}var Zo=Qn((function(e){var t=Pt(e,vi);return t.length&&t[0]===e[0]?Rn(t):[]})),Yo=Qn((function(t){var r=Qo(t),n=Pt(t,vi);return r===Qo(n)?r=e:n.pop(),n.length&&n[0]===t[0]?Rn(n,uo(r,2)):[]})),Jo=Qn((function(t){var r=Qo(t),n=Pt(t,vi);return(r="function"==typeof r?r:e)&&n.pop(),n.length&&n[0]===t[0]?Rn(n,e,r):[]}));function Qo(t){var r=null==t?0:t.length;return r?t[r-1]:e}var Xo=Qn(ea);function ea(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var ta=io((function(e,t){var r=null==e?0:e.length,n=cn(e,t);return Zn(e,Pt(t,(function(e){return _o(e,r)?+e:e})).sort(Ai)),n}));function ra(e){return null==e?e:$r.call(e)}var na=Qn((function(e){return hi(vn(e,1,Za,!0))})),ia=Qn((function(t){var r=Qo(t);return Za(r)&&(r=e),hi(vn(t,1,Za,!0),uo(r,2))})),oa=Qn((function(t){var r=Qo(t);return r="function"==typeof r?r:e,hi(vn(t,1,Za,!0),e,r)}));function aa(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Za(e))return t=vr(e.length,t),!0})),Zt(t,(function(t){return Pt(e,qt(t))}))}function sa(t,r){if(!t||!t.length)return[];var n=aa(t);return null==r?n:Pt(n,(function(t){return St(r,e,t)}))}var ca=Qn((function(e,t){return Za(e)?fn(e,t):[]})),la=Qn((function(e){return bi(It(e,Za))})),ua=Qn((function(t){var r=Qo(t);return Za(r)&&(r=e),bi(It(t,Za),uo(r,2))})),da=Qn((function(t){var r=Qo(t);return r="function"==typeof r?r:e,bi(It(t,Za),e,r)})),ha=Qn(aa),fa=Qn((function(t){var r=t.length,n=r>1?t[r-1]:e;return n="function"==typeof n?(t.pop(),n):e,sa(t,n)}));function pa(e){var t=Fr(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var ga=io((function(t){var r=t.length,n=r?t[0]:0,i=this.__wrapped__,o=function(e){return cn(e,t)};return!(r>1||this.__actions__.length)&&i instanceof qr&&_o(n)?((i=i.slice(n,+n+(r?1:0))).__actions__.push({func:ma,args:[o],thisArg:e}),new Hr(i,this.__chain__).thru((function(t){return r&&!t.length&&t.push(e),t}))):this.thru(o)})),ba=Pi((function(e,t,r){De.call(e,r)?++e[r]:sn(e,r,1)})),ya=ji(qo),va=ji(Ko);function wa(e,t){return(Ka(e)?kt:pn)(e,uo(t,3))}function _a(e,t){return(Ka(e)?At:mn)(e,uo(t,3))}var Ea=Pi((function(e,t,r){De.call(e,r)?e[r].push(t):sn(e,r,[t])})),Ca=Qn((function(e,t,r){var n=-1,i="function"==typeof t,o=Ga(e)?$e(e.length):[];return pn(e,(function(e){o[++n]=i?St(t,e,r):Mn(e,t,r)})),o})),$a=Pi((function(e,t,r){sn(e,r,t)}));function Sa(e,t){return(Ka(e)?Pt:Fn)(e,uo(t,3))}var xa=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ka=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Eo(e,t[0],t[1])?t=[]:r>2&&Eo(t[0],t[1],t[2])&&(t=[t[0]]),Kn(e,vn(t,1),[])})),Aa=mt||function(){return ft.Date.now()};function Ta(t,r,n){return r=n?e:r,r=t&&null==r?t.length:r,Xi(t,s,e,e,e,e,r)}function Ia(r,n){var i;if("function"!=typeof n)throw new Me(t);return r=gs(r),function(){return--r>0&&(i=n.apply(this,arguments)),r<=1&&(n=e),i}}var Ra=Qn((function(e,t,r){var n=1;if(r.length){var i=cr(r,lo(Ra));n|=o}return Xi(e,n,t,r,i)})),Ma=Qn((function(e,t,r){var n=3;if(r.length){var i=cr(r,lo(Ma));n|=o}return Xi(t,n,e,r,i)}));function Pa(r,n,i){var o,a,s,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof r)throw new Me(t);function m(t){var n=o,i=a;return o=a=e,d=t,c=r.apply(i,n)}function g(t){var r=t-u;return u===e||r>=n||r<0||f&&t-d>=s}function b(){var e=Aa();if(g(e))return y(e);l=Po(b,function(e){var t=n-(e-u);return f?wr(t,s-(e-d)):t}(e))}function y(t){return l=e,p&&o?m(t):(o=a=e,c)}function v(){var t=Aa(),r=g(t);if(o=arguments,a=this,u=t,r){if(l===e)return function(e){return d=e,l=Po(b,n),h?m(e):c}(u);if(f)return $i(l),l=Po(b,n),m(u)}return l===e&&(l=Po(b,n)),c}return n=ys(n)||0,rs(i)&&(h=!!i.leading,s=(f="maxWait"in i)?vr(ys(i.maxWait)||0,n):s,p="trailing"in i?!!i.trailing:p),v.cancel=function(){l!==e&&$i(l),d=0,o=u=a=l=e},v.flush=function(){return l===e?c:y(Aa())},v}var Na=Qn((function(e,t){return hn(e,1,t)})),Oa=Qn((function(e,t,r){return hn(e,ys(t)||0,r)}));function La(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new Me(t);var n=function(){var t=arguments,i=r?r.apply(this,t):t[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,t);return n.cache=o.set(i,a)||o,a};return n.cache=new(La.Cache||Gr),n}function Ba(e){if("function"!=typeof e)throw new Me(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Gr;var Da=Ei((function(e,t){var r=(t=1==t.length&&Ka(t[0])?Pt(t[0],Jt(uo())):Pt(vn(t,1),Jt(uo()))).length;return Qn((function(n){for(var i=-1,o=wr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Ua=Qn((function(t,r){var n=cr(r,lo(Ua));return Xi(t,o,e,r,n)})),ja=Qn((function(t,r){var n=cr(r,lo(ja));return Xi(t,a,e,r,n)})),Fa=io((function(t,r){return Xi(t,c,e,e,e,r)}));function Wa(e,t){return e===t||e!=e&&t!=t}var za=Gi(An),Ha=Gi((function(e,t){return e>=t})),qa=Pn(function(){return arguments}())?Pn:function(e){return ns(e)&&De.call(e,"callee")&&!Je.call(e,"callee")},Ka=$e.isArray,Va=vt?Jt(vt):function(e){return ns(e)&&kn(e)==M};function Ga(e){return null!=e&&ts(e.length)&&!Xa(e)}function Za(e){return ns(e)&&Ga(e)}var Ya=mr||yc,Ja=wt?Jt(wt):function(e){return ns(e)&&kn(e)==v};function Qa(e){if(!ns(e))return!1;var t=kn(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Xa(e){if(!rs(e))return!1;var t=kn(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==gs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var is=_t?Jt(_t):function(e){return ns(e)&&bo(e)==C};function os(e){return"number"==typeof e||ns(e)&&kn(e)==$}function as(e){if(!ns(e)||kn(e)!=S)return!1;var t=Ze(e);if(null===t)return!0;var r=De.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Be.call(r)==We}var ss=Et?Jt(Et):function(e){return ns(e)&&kn(e)==k},cs=Ct?Jt(Ct):function(e){return ns(e)&&bo(e)==A};function ls(e){return"string"==typeof e||!Ka(e)&&ns(e)&&kn(e)==T}function us(e){return"symbol"==typeof e||ns(e)&&kn(e)==I}var ds=$t?Jt($t):function(e){return ns(e)&&ts(e.length)&&!!at[kn(e)]},hs=Gi(jn),fs=Gi((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ga(e))return ls(e)?dr(e):Ri(e);if(ct&&e[ct])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[ct]());var t=bo(e);return(t==C?ar:t==A?lr:Ws)(e)}function ms(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gs(e){var t=ms(e),r=t%1;return t==t?r?t-r:t:0}function bs(e){return e?ln(gs(e),0,h):0}function ys(e){if("number"==typeof e)return e;if(us(e))return d;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var r=me.test(e);return r||be.test(e)?ut(e.slice(2),r?2:8):pe.test(e)?d:+e}function vs(e){return Mi(e,Ns(e))}function ws(e){return null==e?"":di(e)}var _s=Ni((function(e,t){if(xo(t)||Ga(t))Mi(t,Ps(t),e);else for(var r in t)De.call(t,r)&&rn(e,r,t[r])})),Es=Ni((function(e,t){Mi(t,Ns(t),e)})),Cs=Ni((function(e,t,r,n){Mi(t,Ns(t),e,n)})),$s=Ni((function(e,t,r,n){Mi(t,Ps(t),e,n)})),Ss=io(cn),xs=Qn((function(t,r){t=Te(t);var n=-1,i=r.length,o=i>2?r[2]:e;for(o&&Eo(r[0],r[1],o)&&(i=1);++n<i;)for(var a=r[n],s=Ns(a),c=-1,l=s.length;++c<l;){var u=s[c],d=t[u];(d===e||Wa(d,Oe[u])&&!De.call(t,u))&&(t[u]=a[u])}return t})),ks=Qn((function(t){return t.push(e,to),St(Ls,e,t)}));function As(t,r,n){var i=null==t?e:Sn(t,r);return i===e?n:i}function Ts(e,t){return null!=e&&yo(e,t,In)}var Is=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=r}),rc(oc)),Rs=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),De.call(e,t)?e[t].push(r):e[t]=[r]}),uo),Ms=Qn(Mn);function Ps(e){return Ga(e)?Jr(e):Dn(e)}function Ns(e){return Ga(e)?Jr(e,!0):Un(e)}var Os=Ni((function(e,t,r){Hn(e,t,r)})),Ls=Ni((function(e,t,r,n){Hn(e,t,r,n)})),Bs=io((function(e,t){var r={};if(null==e)return r;var n=!1;t=Pt(t,(function(t){return t=_i(t,e),n||(n=t.length>1),t})),Mi(e,ao(e),r),n&&(r=un(r,7,ro));for(var i=t.length;i--;)fi(r,t[i]);return r})),Ds=io((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Ts(e,r)}))}(e,t)}));function Us(e,t){if(null==e)return{};var r=Pt(ao(e),(function(e){return[e]}));return t=uo(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var js=Qi(Ps),Fs=Qi(Ns);function Ws(e){return null==e?[]:Qt(e,Ps(e))}var zs=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Hs(t):t)}));function Hs(e){return Qs(ws(e).toLowerCase())}function qs(e){return(e=ws(e))&&e.replace(ve,rr).replace(Xe,"")}var Ks=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Vs=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Gs=Bi("toLowerCase"),Zs=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ys=Di((function(e,t,r){return e+(r?" ":"")+Qs(t)})),Js=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qs=Bi("toUpperCase");function Xs(t,r,n){return t=ws(t),(r=n?e:r)===e?function(e){return nt.test(e)}(t)?function(e){return e.match(tt)||[]}(t):function(e){return e.match(le)||[]}(t):t.match(r)||[]}var ec=Qn((function(t,r){try{return St(t,e,r)}catch(n){return Qa(n)?n:new xe(n)}})),tc=io((function(e,t){return kt(t,(function(t){t=Uo(t),sn(e,t,Ra(e[t],e))})),e}));function rc(e){return function(){return e}}var nc=Fi(),ic=Fi(!0);function oc(e){return e}function ac(e){return Bn("function"==typeof e?e:un(e,1))}var sc=Qn((function(e,t){return function(r){return Mn(r,e,t)}})),cc=Qn((function(e,t){return function(r){return Mn(e,r,t)}}));function lc(e,t,r){var n=Ps(t),i=$n(t,n);null==r&&(!rs(t)||!i.length&&n.length)&&(r=t,t=e,e=this,i=$n(t,Ps(t)));var o=!(rs(r)&&"chain"in r&&!r.chain),a=Xa(e);return kt(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ri(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Nt([this.value()],arguments))})})),e}function uc(){}var dc=qi(Pt),hc=qi(Tt),fc=qi(Bt);function pc(e){return Co(e)?qt(Uo(e)):function(e){return function(t){return Sn(t,e)}}(e)}var mc=Vi(),gc=Vi(!0);function bc(){return[]}function yc(){return!1}var vc=Hi((function(e,t){return e+t}),0),wc=Yi("ceil"),_c=Hi((function(e,t){return e/t}),1),Ec=Yi("floor"),Cc=Hi((function(e,t){return e*t}),1),$c=Yi("round"),Sc=Hi((function(e,t){return e-t}),0);return Fr.after=function(e,r){if("function"!=typeof r)throw new Me(t);return e=gs(e),function(){if(--e<1)return r.apply(this,arguments)}},Fr.ary=Ta,Fr.assign=_s,Fr.assignIn=Es,Fr.assignInWith=Cs,Fr.assignWith=$s,Fr.at=Ss,Fr.before=Ia,Fr.bind=Ra,Fr.bindAll=tc,Fr.bindKey=Ma,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Fr.chain=pa,Fr.chunk=function(t,r,n){r=(n?Eo(t,r,n):r===e)?1:vr(gs(r),0);var i=null==t?0:t.length;if(!i||r<1)return[];for(var o=0,a=0,s=$e(yt(i/r));o<i;)s[a++]=oi(t,o,o+=r);return s},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=$e(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Nt(Ka(r)?Ri(r):[r],vn(t,1))},Fr.cond=function(e){var r=null==e?0:e.length,n=uo();return e=r?Pt(e,(function(e){if("function"!=typeof e[1])throw new Me(t);return[n(e[0]),e[1]]})):[],Qn((function(t){for(var n=-1;++n<r;){var i=e[n];if(St(i[0],this,t))return St(i[1],this,t)}}))},Fr.conforms=function(e){return function(e){var t=Ps(e);return function(r){return dn(r,e,t)}}(un(e,1))},Fr.constant=rc,Fr.countBy=ba,Fr.create=function(e,t){var r=Wr(e);return null==t?r:an(r,t)},Fr.curry=function t(r,n,i){var o=Xi(r,8,e,e,e,e,e,n=i?e:n);return o.placeholder=t.placeholder,o},Fr.curryRight=function t(r,n,o){var a=Xi(r,i,e,e,e,e,e,n=o?e:n);return a.placeholder=t.placeholder,a},Fr.debounce=Pa,Fr.defaults=xs,Fr.defaultsDeep=ks,Fr.defer=Na,Fr.delay=Oa,Fr.difference=Wo,Fr.differenceBy=zo,Fr.differenceWith=Ho,Fr.drop=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,(r=n||r===e?1:gs(r))<0?0:r,i):[]},Fr.dropRight=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,0,(r=i-(r=n||r===e?1:gs(r)))<0?0:r):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!0):[]},Fr.fill=function(t,r,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Eo(t,r,n)&&(n=0,i=o),function(t,r,n,i){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(i=i===e||i>o?o:gs(i))<0&&(i+=o),i=n>i?0:bs(i);n<i;)t[n++]=r;return t}(t,r,n,i)):[]},Fr.filter=function(e,t){return(Ka(e)?It:yn)(e,uo(t,3))},Fr.flatMap=function(e,t){return vn(Sa(e,t),1)},Fr.flatMapDeep=function(e,t){return vn(Sa(e,t),l)},Fr.flatMapDepth=function(t,r,n){return n=n===e?1:gs(n),vn(Sa(t,r),n)},Fr.flatten=Vo,Fr.flattenDeep=function(e){return null!=e&&e.length?vn(e,l):[]},Fr.flattenDepth=function(t,r){return null!=t&&t.length?vn(t,r=r===e?1:gs(r)):[]},Fr.flip=function(e){return Xi(e,512)},Fr.flow=nc,Fr.flowRight=ic,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Fr.functions=function(e){return null==e?[]:$n(e,Ps(e))},Fr.functionsIn=function(e){return null==e?[]:$n(e,Ns(e))},Fr.groupBy=Ea,Fr.initial=function(e){return null!=e&&e.length?oi(e,0,-1):[]},Fr.intersection=Zo,Fr.intersectionBy=Yo,Fr.intersectionWith=Jo,Fr.invert=Is,Fr.invertBy=Rs,Fr.invokeMap=Ca,Fr.iteratee=ac,Fr.keyBy=$a,Fr.keys=Ps,Fr.keysIn=Ns,Fr.map=Sa,Fr.mapKeys=function(e,t){var r={};return t=uo(t,3),En(e,(function(e,n,i){sn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=uo(t,3),En(e,(function(e,n,i){sn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Wn(un(e,1))},Fr.matchesProperty=function(e,t){return zn(e,un(t,1))},Fr.memoize=La,Fr.merge=Os,Fr.mergeWith=Ls,Fr.method=sc,Fr.methodOf=cc,Fr.mixin=lc,Fr.negate=Ba,Fr.nthArg=function(e){return e=gs(e),Qn((function(t){return qn(t,e)}))},Fr.omit=Bs,Fr.omitBy=function(e,t){return Us(e,Ba(uo(t)))},Fr.once=function(e){return Ia(2,e)},Fr.orderBy=function(t,r,n,i){return null==t?[]:(Ka(r)||(r=null==r?[]:[r]),Ka(n=i?e:n)||(n=null==n?[]:[n]),Kn(t,r,n))},Fr.over=dc,Fr.overArgs=Da,Fr.overEvery=hc,Fr.overSome=fc,Fr.partial=Ua,Fr.partialRight=ja,Fr.partition=xa,Fr.pick=Ds,Fr.pickBy=Us,Fr.property=pc,Fr.propertyOf=function(t){return function(r){return null==t?e:Sn(t,r)}},Fr.pull=Xo,Fr.pullAll=ea,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Gn(e,t,uo(r,2)):e},Fr.pullAllWith=function(t,r,n){return t&&t.length&&r&&r.length?Gn(t,r,e,n):t},Fr.pullAt=ta,Fr.range=mc,Fr.rangeRight=gc,Fr.rearg=Fa,Fr.reject=function(e,t){return(Ka(e)?It:yn)(e,Ba(uo(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=uo(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Zn(e,i),r},Fr.rest=function(r,n){if("function"!=typeof r)throw new Me(t);return Qn(r,n=n===e?n:gs(n))},Fr.reverse=ra,Fr.sampleSize=function(t,r,n){return r=(n?Eo(t,r,n):r===e)?1:gs(r),(Ka(t)?Xr:ei)(t,r)},Fr.set=function(e,t,r){return null==e?e:ti(e,t,r)},Fr.setWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:ti(t,r,n,i)},Fr.shuffle=function(e){return(Ka(e)?en:ii)(e)},Fr.slice=function(t,r,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Eo(t,r,n)?(r=0,n=i):(r=null==r?0:gs(r),n=n===e?i:gs(n)),oi(t,r,n)):[]},Fr.sortBy=ka,Fr.sortedUniq=function(e){return e&&e.length?li(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Fr.split=function(t,r,n){return n&&"number"!=typeof n&&Eo(t,r,n)&&(r=n=e),(n=n===e?h:n>>>0)?(t=ws(t))&&("string"==typeof r||null!=r&&!ss(r))&&!(r=di(r))&&or(t)?Ci(dr(t),0,n):t.split(r,n):[]},Fr.spread=function(e,r){if("function"!=typeof e)throw new Me(t);return r=null==r?0:vr(gs(r),0),Qn((function(t){var n=t[r],i=Ci(t,0,r);return n&&Nt(i,n),St(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Fr.take=function(t,r,n){return t&&t.length?oi(t,0,(r=n||r===e?1:gs(r))<0?0:r):[]},Fr.takeRight=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,(r=i-(r=n||r===e?1:gs(r)))<0?0:r,i):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mi(e,uo(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,r,n){var i=!0,o=!0;if("function"!=typeof e)throw new Me(t);return rs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Pa(e,r,{leading:i,maxWait:r,trailing:o})},Fr.thru=ma,Fr.toArray=ps,Fr.toPairs=js,Fr.toPairsIn=Fs,Fr.toPath=function(e){return Ka(e)?Pt(e,Uo):us(e)?[e]:Ri(Do(ws(e)))},Fr.toPlainObject=vs,Fr.transform=function(e,t,r){var n=Ka(e),i=n||Ya(e)||ds(e);if(t=uo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:rs(e)&&Xa(o)?Wr(Ze(e)):{}}return(i?kt:En)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Ta(e,1)},Fr.union=na,Fr.unionBy=ia,Fr.unionWith=oa,Fr.uniq=function(e){return e&&e.length?hi(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?hi(e,uo(t,2)):[]},Fr.uniqWith=function(t,r){return r="function"==typeof r?r:e,t&&t.length?hi(t,e,r):[]},Fr.unset=function(e,t){return null==e||fi(e,t)},Fr.unzip=aa,Fr.unzipWith=sa,Fr.update=function(e,t,r){return null==e?e:pi(e,t,wi(r))},Fr.updateWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:pi(t,r,wi(n),i)},Fr.values=Ws,Fr.valuesIn=function(e){return null==e?[]:Qt(e,Ns(e))},Fr.without=ca,Fr.words=Xs,Fr.wrap=function(e,t){return Ua(wi(t),e)},Fr.xor=la,Fr.xorBy=ua,Fr.xorWith=da,Fr.zip=ha,Fr.zipObject=function(e,t){return yi(e||[],t||[],rn)},Fr.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},Fr.zipWith=fa,Fr.entries=js,Fr.entriesIn=Fs,Fr.extend=Es,Fr.extendWith=Cs,lc(Fr,Fr),Fr.add=vc,Fr.attempt=ec,Fr.camelCase=zs,Fr.capitalize=Hs,Fr.ceil=wc,Fr.clamp=function(t,r,n){return n===e&&(n=r,r=e),n!==e&&(n=(n=ys(n))==n?n:0),r!==e&&(r=(r=ys(r))==r?r:0),ln(ys(t),r,n)},Fr.clone=function(e){return un(e,4)},Fr.cloneDeep=function(e){return un(e,5)},Fr.cloneDeepWith=function(t,r){return un(t,5,r="function"==typeof r?r:e)},Fr.cloneWith=function(t,r){return un(t,4,r="function"==typeof r?r:e)},Fr.conformsTo=function(e,t){return null==t||dn(e,t,Ps(t))},Fr.deburr=qs,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=_c,Fr.endsWith=function(t,r,n){t=ws(t),r=di(r);var i=t.length,o=n=n===e?i:ln(gs(n),0,i);return(n-=r.length)>=0&&t.slice(n,o)==r},Fr.eq=Wa,Fr.escape=function(e){return(e=ws(e))&&Z.test(e)?e.replace(V,nr):e},Fr.escapeRegExp=function(e){return(e=ws(e))&&ne.test(e)?e.replace(re,"\\$&"):e},Fr.every=function(t,r,n){var i=Ka(t)?Tt:gn;return n&&Eo(t,r,n)&&(r=e),i(t,uo(r,3))},Fr.find=ya,Fr.findIndex=qo,Fr.findKey=function(e,t){return Ut(e,uo(t,3),En)},Fr.findLast=va,Fr.findLastIndex=Ko,Fr.findLastKey=function(e,t){return Ut(e,uo(t,3),Cn)},Fr.floor=Ec,Fr.forEach=wa,Fr.forEachRight=_a,Fr.forIn=function(e,t){return null==e?e:wn(e,uo(t,3),Ns)},Fr.forInRight=function(e,t){return null==e?e:_n(e,uo(t,3),Ns)},Fr.forOwn=function(e,t){return e&&En(e,uo(t,3))},Fr.forOwnRight=function(e,t){return e&&Cn(e,uo(t,3))},Fr.get=As,Fr.gt=za,Fr.gte=Ha,Fr.has=function(e,t){return null!=e&&yo(e,t,Tn)},Fr.hasIn=Ts,Fr.head=Go,Fr.identity=oc,Fr.includes=function(e,t,r,n){e=Ga(e)?e:Ws(e),r=r&&!n?gs(r):0;var i=e.length;return r<0&&(r=vr(i+r,0)),ls(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Ft(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:gs(r);return i<0&&(i=vr(n+i,0)),Ft(e,t,i)},Fr.inRange=function(t,r,n){return r=ms(r),n===e?(n=r,r=0):n=ms(n),function(e,t,r){return e>=wr(t,r)&&e<vr(t,r)}(t=ys(t),r,n)},Fr.invoke=Ms,Fr.isArguments=qa,Fr.isArray=Ka,Fr.isArrayBuffer=Va,Fr.isArrayLike=Ga,Fr.isArrayLikeObject=Za,Fr.isBoolean=function(e){return!0===e||!1===e||ns(e)&&kn(e)==y},Fr.isBuffer=Ya,Fr.isDate=Ja,Fr.isElement=function(e){return ns(e)&&1===e.nodeType&&!as(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ds(e)||qa(e)))return!e.length;var t=bo(e);if(t==C||t==A)return!e.size;if(xo(e))return!Dn(e).length;for(var r in e)if(De.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Nn(e,t)},Fr.isEqualWith=function(t,r,n){var i=(n="function"==typeof n?n:e)?n(t,r):e;return i===e?Nn(t,r,e,n):!!i},Fr.isError=Qa,Fr.isFinite=function(e){return"number"==typeof e&&gr(e)},Fr.isFunction=Xa,Fr.isInteger=es,Fr.isLength=ts,Fr.isMap=is,Fr.isMatch=function(e,t){return e===t||On(e,t,fo(t))},Fr.isMatchWith=function(t,r,n){return n="function"==typeof n?n:e,On(t,r,fo(r),n)},Fr.isNaN=function(e){return os(e)&&e!=+e},Fr.isNative=function(e){if(So(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=os,Fr.isObject=rs,Fr.isObjectLike=ns,Fr.isPlainObject=as,Fr.isRegExp=ss,Fr.isSafeInteger=function(e){return es(e)&&e>=-u&&e<=u},Fr.isSet=cs,Fr.isString=ls,Fr.isSymbol=us,Fr.isTypedArray=ds,Fr.isUndefined=function(t){return t===e},Fr.isWeakMap=function(e){return ns(e)&&bo(e)==R},Fr.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==kn(e)},Fr.join=function(e,t){return null==e?"":br.call(e,t)},Fr.kebabCase=Ks,Fr.last=Qo,Fr.lastIndexOf=function(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==e&&(o=(o=gs(n))<0?vr(i+o,0):wr(o,i-1)),r==r?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(t,r,o):jt(t,zt,o,!0)},Fr.lowerCase=Vs,Fr.lowerFirst=Gs,Fr.lt=hs,Fr.lte=fs,Fr.max=function(t){return t&&t.length?bn(t,oc,An):e},Fr.maxBy=function(t,r){return t&&t.length?bn(t,uo(r,2),An):e},Fr.mean=function(e){return Ht(e,oc)},Fr.meanBy=function(e,t){return Ht(e,uo(t,2))},Fr.min=function(t){return t&&t.length?bn(t,oc,jn):e},Fr.minBy=function(t,r){return t&&t.length?bn(t,uo(r,2),jn):e},Fr.stubArray=bc,Fr.stubFalse=yc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Cc,Fr.nth=function(t,r){return t&&t.length?qn(t,gs(r)):e},Fr.noConflict=function(){return ft._===this&&(ft._=ze),this},Fr.noop=uc,Fr.now=Aa,Fr.pad=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ki(Dt(i),r)+e+Ki(yt(i),r)},Fr.padEnd=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;return t&&n<t?e+Ki(t-n,r):e},Fr.padStart=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;return t&&n<t?Ki(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Er(ws(e).replace(ie,""),t||0)},Fr.random=function(t,r,n){if(n&&"boolean"!=typeof n&&Eo(t,r,n)&&(r=n=e),n===e&&("boolean"==typeof r?(n=r,r=e):"boolean"==typeof t&&(n=t,t=e)),t===e&&r===e?(t=0,r=1):(t=ms(t),r===e?(r=t,t=0):r=ms(r)),t>r){var i=t;t=r,r=i}if(n||t%1||r%1){var o=Cr();return wr(t+o*(r-t+lt("1e-"+((o+"").length-1))),r)}return Yn(t,r)},Fr.reduce=function(e,t,r){var n=Ka(e)?Ot:Vt,i=arguments.length<3;return n(e,uo(t,4),r,i,pn)},Fr.reduceRight=function(e,t,r){var n=Ka(e)?Lt:Vt,i=arguments.length<3;return n(e,uo(t,4),r,i,mn)},Fr.repeat=function(t,r,n){return r=(n?Eo(t,r,n):r===e)?1:gs(r),Jn(ws(t),r)},Fr.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(t,r,n){var i=-1,o=(r=_i(r,t)).length;for(o||(o=1,t=e);++i<o;){var a=null==t?e:t[Uo(r[i])];a===e&&(i=o,a=n),t=Xa(a)?a.call(t):a}return t},Fr.round=$c,Fr.runInContext=oe,Fr.sample=function(e){return(Ka(e)?Qr:Xn)(e)},Fr.size=function(e){if(null==e)return 0;if(Ga(e))return ls(e)?ur(e):e.length;var t=bo(e);return t==C||t==A?e.size:Dn(e).length},Fr.snakeCase=Zs,Fr.some=function(t,r,n){var i=Ka(t)?Bt:ai;return n&&Eo(t,r,n)&&(r=e),i(t,uo(r,3))},Fr.sortedIndex=function(e,t){return si(e,t)},Fr.sortedIndexBy=function(e,t,r){return ci(e,t,uo(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=si(e,t);if(n<r&&Wa(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return si(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ci(e,t,uo(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=si(e,t,!0)-1;if(Wa(e[r],t))return r}return-1},Fr.startCase=Ys,Fr.startsWith=function(e,t,r){return e=ws(e),r=null==r?0:ln(gs(r),0,e.length),t=di(t),e.slice(r,r+t.length)==t},Fr.subtract=Sc,Fr.sum=function(e){return e&&e.length?Gt(e,oc):0},Fr.sumBy=function(e,t){return e&&e.length?Gt(e,uo(t,2)):0},Fr.template=function(t,r,n){var i=Fr.templateSettings;n&&Eo(t,r,n)&&(r=e),t=ws(t),r=Cs({},r,i,eo);var o,a,s=Cs({},r.imports,i.imports,eo),c=Ps(s),l=Qt(s,c),u=0,d=r.interpolate||we,h="__p += '",f=Ie((r.escape||we).source+"|"+d.source+"|"+(d===Q?he:we).source+"|"+(r.evaluate||we).source+"|$","g"),p="//# sourceURL="+(De.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";t.replace(f,(function(e,r,n,i,s,c){return n||(n=i),h+=t.slice(u,c).replace(_e,ir),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var m=De.call(r,"variable")&&r.variable;if(m){if(ue.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(z,""):h).replace(H,"$1").replace(q,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=ec((function(){return ke(c,p+"return "+h).apply(e,l)}));if(g.source=h,Qa(g))throw g;return g},Fr.times=function(e,t){if((e=gs(e))<1||e>u)return[];var r=h,n=wr(e,h);t=uo(t),e-=h;for(var i=Zt(n,t);++r<e;)t(r);return i},Fr.toFinite=ms,Fr.toInteger=gs,Fr.toLength=bs,Fr.toLower=function(e){return ws(e).toLowerCase()},Fr.toNumber=ys,Fr.toSafeInteger=function(e){return e?ln(gs(e),-u,u):0===e?e:0},Fr.toString=ws,Fr.toUpper=function(e){return ws(e).toUpperCase()},Fr.trim=function(t,r,n){if((t=ws(t))&&(n||r===e))return Yt(t);if(!t||!(r=di(r)))return t;var i=dr(t),o=dr(r);return Ci(i,er(i,o),tr(i,o)+1).join("")},Fr.trimEnd=function(t,r,n){if((t=ws(t))&&(n||r===e))return t.slice(0,hr(t)+1);if(!t||!(r=di(r)))return t;var i=dr(t);return Ci(i,0,tr(i,dr(r))+1).join("")},Fr.trimStart=function(t,r,n){if((t=ws(t))&&(n||r===e))return t.replace(ie,"");if(!t||!(r=di(r)))return t;var i=dr(t);return Ci(i,er(i,dr(r))).join("")},Fr.truncate=function(t,r){var n=30,i="...";if(rs(r)){var o="separator"in r?r.separator:o;n="length"in r?gs(r.length):n,i="omission"in r?di(r.omission):i}var a=(t=ws(t)).length;if(or(t)){var s=dr(t);a=s.length}if(n>=a)return t;var c=n-ur(i);if(c<1)return i;var l=s?Ci(s,0,c).join(""):t.slice(0,c);if(o===e)return l+i;if(s&&(c+=l.length-c),ss(o)){if(t.slice(c).search(o)){var u,d=l;for(o.global||(o=Ie(o.source,ws(fe.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;l=l.slice(0,h===e?c:h)}}else if(t.indexOf(di(o),c)!=c){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+i},Fr.unescape=function(e){return(e=ws(e))&&G.test(e)?e.replace(K,fr):e},Fr.uniqueId=function(e){var t=++Ue;return ws(e)+t},Fr.upperCase=Js,Fr.upperFirst=Qs,Fr.each=wa,Fr.eachRight=_a,Fr.first=Go,lc(Fr,function(){var e={};return En(Fr,(function(t,r){De.call(Fr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Fr.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),kt(["drop","take"],(function(t,r){qr.prototype[t]=function(n){n=n===e?1:vr(gs(n),0);var i=this.__filtered__&&!r?new qr(this):this.clone();return i.__filtered__?i.__takeCount__=wr(n,i.__takeCount__):i.__views__.push({size:wr(n,h),type:t+(i.__dir__<0?"Right":"")}),i},qr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),kt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;qr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),kt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");qr.prototype[e]=function(){return this[r](1).value()[0]}})),kt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");qr.prototype[e]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(oc)},qr.prototype.find=function(e){return this.filter(e).head()},qr.prototype.findLast=function(e){return this.reverse().find(e)},qr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new qr(this):this.map((function(r){return Mn(r,e,t)}))})),qr.prototype.reject=function(e){return this.filter(Ba(uo(e)))},qr.prototype.slice=function(t,r){t=gs(t);var n=this;return n.__filtered__&&(t>0||r<0)?new qr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==e&&(n=(r=gs(r))<0?n.dropRight(-r):n.take(r-t)),n)},qr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qr.prototype.toArray=function(){return this.take(h)},En(qr.prototype,(function(t,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=Fr[i?"take"+("last"==r?"Right":""):r],a=i||/^find/.test(r);o&&(Fr.prototype[r]=function(){var r=this.__wrapped__,s=i?[1]:arguments,c=r instanceof qr,l=s[0],u=c||Ka(r),d=function(e){var t=o.apply(Fr,Nt([e],s));return i&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=c&&!f;if(!a&&u){r=m?r:new qr(this);var g=t.apply(r,s);return g.__actions__.push({func:ma,args:[d],thisArg:e}),new Hr(g,h)}return p&&m?t.apply(this,s):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})})),kt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[r]((function(r){return t.apply(Ka(r)?r:[],e)}))}})),En(qr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";De.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Wi(e,2).name]=[{name:"wrapper",func:e}],qr.prototype.clone=function(){var e=new qr(this.__wrapped__);return e.__actions__=Ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ri(this.__views__),e},qr.prototype.reverse=function(){if(this.__filtered__){var e=new qr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ka(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wr(t,e+a);break;case"takeRight":e=vr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=n?s:a-1,u=this.__iteratees__,d=u.length,h=0,f=wr(c,this.__takeCount__);if(!r||!n&&i==c&&f==c)return gi(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var m=-1,g=e[l+=t];++m<d;){var b=u[m],y=b.iteratee,v=b.type,w=y(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[h++]=g}return p},Fr.prototype.at=ga,Fr.prototype.chain=function(){return pa(this)},Fr.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===e&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Fr.prototype.plant=function(t){for(var r,n=this;n instanceof zr;){var i=Fo(n);i.__index__=0,i.__values__=e,r?o.__wrapped__=i:r=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,r},Fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qr){var r=t;return this.__actions__.length&&(r=new qr(this)),(r=r.reverse()).__actions__.push({func:ma,args:[ra],thisArg:e}),new Hr(r,this.__chain__)}return this.thru(ra)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,ct&&(Fr.prototype[ct]=function(){return this}),Fr}();mt?((mt.exports=pr)._=pr,pt._=pr):ft._=pr}.call(_n);var Vg=Object.defineProperty,kg=Object.defineProperties,jg=Object.getOwnPropertyDescriptors,Ra=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,ev=Object.prototype.propertyIsEnumerable,ba=(e,t,r)=>t in e?Vg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lr=(e,t)=>{for(var r in t||(t={}))tv.call(t,r)&&ba(e,r,t[r]);if(Ra)for(var r of Ra(t))ev.call(t,r)&&ba(e,r,t[r]);return e},nv=(e,t)=>kg(e,jg(t));function Lt(e,t,r){var n;const i=An(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`${Oa}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Ae(e){return e.includes(":")?e.split(":")[1]:e}function Ta(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function rv(e,t){const r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];const n=[];return r.forEach((e=>{const r=t.namespaces[e].accounts;n.push(...r)})),n}function Fi(e={},t={}){const r=La(e),n=La(t);return qi.exports.merge(r,n)}function La(e){var t,r,n,i;const o={};if(!Xr$1(e))return o;for(const[a,s]of Object.entries(e)){const e=on$3(a)?[a]:s.chains,c=s.methods||[],l=s.events||[],u=s.rpcMap||{},d=xo(a);o[d]=nv(lr(lr({},o[d]),s),{chains:me$1(e,null==(t=o[d])?void 0:t.chains),methods:me$1(c,null==(r=o[d])?void 0:r.methods),events:me$1(l,null==(n=o[d])?void 0:n.events),rpcMap:lr(lr({},u),null==(i=o[d])?void 0:i.rpcMap)})}return o}function iv(e){return e.includes(":")?e.split(":")[2]:e}function Ha(e){const t={};for(const[r,n]of Object.entries(e)){const e=n.methods||[],i=n.events||[],o=n.accounts||[],a=on$3(r)?[r]:n.chains?n.chains:Ta(n.accounts);t[r]={chains:a,methods:e,events:i,accounts:o}}return t}function Wi(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):(e=e.includes(":")?e.split(":")[1]:e,isNaN(Number(e))?e:Number(e))}const Da={},F$2=e=>Da[e],Mi=(e,t)=>{Da[e]=t};class sv{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}var uv=Object.defineProperty,av=Object.defineProperties,ov=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,fv=Object.prototype.propertyIsEnumerable,$a=(e,t,r)=>t in e?uv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ua=(e,t)=>{for(var r in t||(t={}))cv.call(t,r)&&$a(e,r,t[r]);if(Na)for(var r of Na(t))fv.call(t,r)&&$a(e,r,t[r]);return e},qa=(e,t)=>av(e,ov(t));class hv{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Tt.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 r=t||Lt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=parseInt(Ae(t));e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.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,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const i=parseInt(n,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,r,n;const i=null==(r=null==(t=e.request)?void 0:t.params)?void 0:r[0];if(!i)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const o=this.client.session.get(e.topic),a=(null==(n=null==o?void 0:o.sessionProperties)?void 0:n.capabilities)||{};if(null!=a&&a[i])return null==a?void 0:a[i];const s=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:qa(Ua({},o.sessionProperties||{}),{capabilities:qa(Ua({},a||{}),{[i]:s})})})}catch(c){console.warn("Failed to update session with capabilities",c)}return s}async getCallStatus(e){var t,r;const n=this.client.session.get(e.topic),i=null==(t=n.sessionProperties)?void 0:t.bundler_name;if(i){const t=this.getBundlerUrl(e.chainId,i);try{return await this.getUserOperationReceipt(t,e)}catch(a){console.warn("Failed to fetch call status from bundler",a,t)}}const o=null==(r=n.sessionProperties)?void 0:r.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(s){console.warn("Failed to fetch call status from custom bundler",s,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var r;const n=new URL(e),i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(formatJsonRpcRequest("eth_getUserOperationReceipt",[null==(r=t.request.params)?void 0:r[0]]))});if(!i.ok)throw new Error(`Failed to fetch user operation receipt - ${i.status}`);return await i.json()}getBundlerUrl(e,t){return`${Qg}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}}class lv{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class pv{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class dv{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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){if(!this.httpProviders[e]){const r=t||Lt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new o$8(new f$4(r,F$2("disableProviderPing")))}}class gv{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const r=this.getCardanoRPCUrl(t),n=Ae(t);e[n]=this.createHttpProvider(n,r)})),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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class vv{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class _v{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class mv{constructor(e){this.name="near",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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 r=t||Lt(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace);return typeof r>"u"?void 0:new o$8(new f$4(r,F$2("disableProviderPing")))}}class wv{constructor(e){this.name=ze,this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){var e,t;const r={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach((e=>{const t=An(e);r[`${t.namespace}:${t.reference}`]=this.createHttpProvider(e)})),r}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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}var Pv=Object.defineProperty,Cv=Object.defineProperties,Av=Object.getOwnPropertyDescriptors,Fa=Object.getOwnPropertySymbols,Iv=Object.prototype.hasOwnProperty,xv=Object.prototype.propertyIsEnumerable,Wa=(e,t,r)=>t in e?Pv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pr=(e,t)=>{for(var r in t||(t={}))Iv.call(t,r)&&Wa(e,r,t[r]);if(Fa)for(var r of Fa(t))xv.call(t,r)&&Wa(e,r,t[r]);return e},Bi=(e,t)=>Cv(e,Av(t));class dr{constructor(e){this.events=new Jg,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(null==e?void 0:e.logger)<"u"&&"string"!=typeof(null==e?void 0:e.logger)?e.logger:Mg(k$5({level:(null==e?void 0:e.logger)||ya})),this.disableProviderPing=(null==e?void 0:e.disableProviderPing)||!1}static async init(e){const t=new dr(e);return await t.initialize(),t}async request(e,t,r){const[n,i]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:pr({},e),chainId:`${n}:${i}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,n){const i=(new Date).getTime();this.request(e,r,n).then((e=>t(null,formatJsonRpcResult(i,e)))).catch((e=>t(e,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:null==(e=this.session)?void 0:e.topic,reason:er$1("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,t){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:r,response:n}=await this.client.authenticate(e,t);r&&(this.uri=r,this.events.emit("display_uri",r));const i=await n();if(this.session=i.session,this.session){const e=Ha(this.session.namespaces);this.namespaces=Fi(this.namespaces,e),this.persist("namespaces",this.namespaces),this.onConnect()}return i}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:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then((e=>{this.session=e;const t=Ha(e.namespaces);this.namespaces=Fi(this.namespaces,t),this.persist("namespaces",this.namespaces)})).catch((e=>{if(e.message!==it)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[r,n]=this.validateChain(e),i=this.getProvider(r);i.name===ze?i.setDefaultChain(`${r}:${n}`,t):i.setDefaultChain(n,t)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Nr$1(t)){for(const r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.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 _e.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ya,relayUrl:this.providerOpts.relayUrl||Yg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.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((e=>xo(e))))];Mi("client",this.client),Mi("events",this.events),Mi("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=rv(e,this.session),r=Ta(t),n=Fi(this.namespaces,this.optionalNamespaces),i=Bi(pr({},n[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new hv({namespace:i});break;case"algorand":this.rpcProviders[e]=new dv({namespace:i});break;case"solana":this.rpcProviders[e]=new lv({namespace:i});break;case"cosmos":this.rpcProviders[e]=new pv({namespace:i});break;case"polkadot":this.rpcProviders[e]=new sv({namespace:i});break;case"cip34":this.rpcProviders[e]=new gv({namespace:i});break;case"elrond":this.rpcProviders[e]=new vv({namespace:i});break;case"multiversx":this.rpcProviders[e]=new _v({namespace:i});break;case"near":this.rpcProviders[e]=new mv({namespace:i});break;default:this.rpcProviders[ze]?this.rpcProviders[ze].updateNamespace(i):this.rpcProviders[ze]=new wv({namespace:i})}}))}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:r}=t;if("accountsChanged"===r.name){const e=r.data;e&&Nr$1(e)&&this.events.emit("accountsChanged",e.map(iv))}else if("chainChanged"===r.name){const e=t.chainId,r=t.event.data,n=xo(e),i=Wi(e)!==Wi(r)?`${n}:${Wi(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;const{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=Bi(pr({},i),{namespaces:n}),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",Bi(pr({},er$1("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Tt.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[ze]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){const[t,r]=(null==e?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map((e=>xo(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];const n=xo(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[r,n]=this.validateChain(e);n&&(t||this.getProvider(r).setDefaultChain(n),this.namespaces[r]?this.namespaces[r].defaultChain=n:this.namespaces[`${r}:${n}`]?this.namespaces[`${r}:${n}`].defaultChain=n:this.namespaces[`${r}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}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(`${Sa}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Sa}/${e}`)}}const Ev=dr,WcHelpersUtil={getMethodsByChainNamespace(e){switch(e){case"solana":return["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"];case"eip155":return["personal_sign","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendRawTransaction","eth_sendTransaction","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus","wallet_getCallsStatus","wallet_grantPermissions","wallet_revokePermissions","wallet_switchEthereumChain"];default:return[]}},createNamespaces(e){return e.reduce(((e,t)=>{const{id:r,chainNamespace:n,rpcUrls:i}=t,o=i.default.http[0],a=this.getMethodsByChainNamespace(n);e[n]||(e[n]={methods:a,events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}});const s=`${n}:${r}`,c=e[n];return c.chains.push(s),(null==c?void 0:c.rpcMap)&&o&&(c.rpcMap[r]=o),e}),{})},getChainsFromNamespaces:(e={})=>Object.values(e).flatMap((e=>{const t=e.chains||[],r=e.accounts.map((e=>{const[t,r]=e.split(":");return`${t}:${r}`}));return Array.from(new Set([...t,...r]))}))},state$a=proxy({providers:{eip155:void 0,solana:void 0,polkadot:void 0},providerIds:{eip155:void 0,solana:void 0,polkadot:void 0}}),ProviderUtil={state:state$a,subscribeKey:(e,t)=>subscribeKey(state$a,e,t),subscribeProviders:e=>subscribe(state$a.providers,(()=>e(state$a.providers))),setProvider(e,t){t&&(state$a.providers[e]=ref$1(t))},getProvider:e=>state$a.providers[e],setProviderId(e,t){t&&(state$a.providerIds[e]=t)},getProviderId:e=>state$a.providerIds[e],reset(){state$a.providers={eip155:void 0,solana:void 0,polkadot:void 0},state$a.providerIds={eip155:void 0,solana:void 0,polkadot:void 0}},resetChain(e){state$a.providers[e]=void 0,state$a.providerIds[e]=void 0}},OPTIONAL_METHODS$1=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions"];class UniversalAdapterClient{constructor(e){this.appKit=void 0,this.isUniversalAdapterClient=!0,this.options=void 0,this.adapterType="universal",this.reportErrors=!0;const{siweConfig:t,metadata:r}=e;this.caipNetworks=e.networks,this.chainNamespace=ConstantsUtil$3.CHAIN.EVM,this.metadata=r,this.networkControllerClient={switchCaipNetwork:e=>{e&&this.switchNetwork(e)},getApprovedCaipNetworksData:async()=>{var e;const t=await this.getWalletConnectProvider();if(!t)return Promise.resolve({supportsAllNetworks:!1,approvedCaipNetworkIds:[]});const r=WcHelpersUtil.getChainsFromNamespaces(null==(e=t.session)?void 0:e.namespaces);return Promise.resolve({supportsAllNetworks:!1,approvedCaipNetworkIds:r})}},this.connectionControllerClient={connectWalletConnect:async e=>{var r,n,i,o,a,s,c,l,u,d,h;const f=await this.getWalletConnectProvider();if(!f)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");if(f.on("display_uri",(t=>{e(t)})),ChainController.state.activeChain&&"wagmi"===(null==(i=null==(n=null==(r=ChainController.state)?void 0:r.chains)?void 0:n.get(ChainController.state.activeChain))?void 0:i.adapterType)){const t=ChainController.state.chains.get(ChainController.state.activeChain);await(null==(a=null==(o=null==t?void 0:t.connectionControllerClient)?void 0:o.connectWalletConnect)?void 0:a.call(o,e)),this.setWalletConnectProvider()}else{const e=await(null==(s=null==t?void 0:t.getMessageParams)?void 0:s.call(t)),r=null==(c=null==t?void 0:t.options)?void 0:c.enabled,n="function"==typeof(null==f?void 0:f.authenticate),i=e&&Object.keys(e||{}).length>0;if(t&&r&&e&&n&&i&&ChainController.state.activeChain===ConstantsUtil$3.CHAIN.EVM){const{SIWEController:r,getDidChainId:n,getDidAddress:i}=await Promise.resolve().then((()=>index$8)),o=null==(l=this.caipNetworks)?void 0:l.filter((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)).map((e=>e.caipNetworkId));e.chains=null==(u=this.caipNetworks)?void 0:u.filter((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)).map((e=>e.id));const a=await f.authenticate({nonce:await(null==(d=null==t?void 0:t.getNonce)?void 0:d.call(t)),methods:[...OPTIONAL_METHODS$1],...e,chains:o}),s=null==(h=null==a?void 0:a.auths)?void 0:h[0];if(s){const{p:e,s:t}=s,o=n(e.iss),a=i(e.iss);a&&o&&r.setSession({address:a,chainId:parseInt(o,10)});try{const n=f.client.formatAuthMessage({request:e,iss:e.iss});await r.verifyMessage({message:n,signature:t.s,cacao:s})}catch(p){throw console.error("Error verifying message",p),await f.disconnect().catch(console.error),await r.signOut().catch(console.error),p}}}else{const e=WcHelpersUtil.createNamespaces(this.caipNetworks);await f.connect({optionalNamespaces:e})}this.setWalletConnectProvider()}},disconnect:async()=>{var e,r,n,i;if(SafeLocalStorage.removeItem(SafeLocalStorageKeys.WALLET_ID),null==(e=null==t?void 0:t.options)?void 0:e.signOutOnDisconnect){const{SIWEController:e}=await Promise.resolve().then((()=>index$8));await e.signOut()}await(null==(r=this.walletConnectProvider)?void 0:r.disconnect()),null==(n=this.appKit)||n.resetAccount(ConstantsUtil$3.CHAIN.EVM),null==(i=this.appKit)||i.resetAccount(ConstantsUtil$3.CHAIN.SOLANA)},signMessage:async e=>{const t=await this.getWalletConnectProvider(),r=ChainController.state.activeCaipAddress,n=CoreHelperUtil.getPlainAddress(r);if(!t)throw new Error("connectionControllerClient:signMessage - provider is undefined");return await t.request({method:"personal_sign",params:[e,n]})},estimateGas:async()=>await Promise.resolve(BigInt(0)),getEnsAvatar:async e=>await Promise.resolve(e),getEnsAddress:async e=>await Promise.resolve(e),writeContract:async()=>await Promise.resolve("0x"),getCapabilities:async e=>{var t,r;const n=await this.getWalletConnectProvider();if(!n)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");const i=null==(r=null==(t=n.session)?void 0:t.sessionProperties)?void 0:r.capabilities;if(i){const t=this.parseWalletCapabilities(i)[e];if(t)return t}return await n.request({method:"wallet_getCapabilities",params:[e]})},grantPermissions:async e=>{const t=await this.getWalletConnectProvider();if(!t)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return t.request({method:"wallet_grantPermissions",params:e})},revokePermissions:async e=>{const t=await this.getWalletConnectProvider();if(!t)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return t.request({method:"wallet_revokePermissions",params:[e]})},sendTransaction:async()=>await Promise.resolve("0x"),parseUnits:()=>BigInt(0),formatUnits:()=>""}}construct(e,t){this.appKit=e,this.options=t,this.createProvider(),this.syncRequestedNetworks(this.caipNetworks),this.syncConnectors()}switchNetwork(e){e&&this.walletConnectProvider&&this.walletConnectProvider.setDefaultChain(e.caipNetworkId)}async disconnect(){var e,t;this.walletConnectProvider&&(await this.walletConnectProvider.disconnect(),null==(e=this.appKit)||e.resetAccount(ConstantsUtil$3.CHAIN.EVM),null==(t=this.appKit)||t.resetAccount(ConstantsUtil$3.CHAIN.SOLANA))}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{await this.createProvider()}catch(e){throw new Error("EthereumAdapter:getWalletConnectProvider - Cannot create provider")}return this.walletConnectProvider}createProvider(){var e,t;return!this.walletConnectProviderInitPromise&&"undefined"!=typeof window&&(null==(e=this.options)?void 0:e.projectId)&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider(null==(t=this.options)?void 0:t.projectId)),this.walletConnectProviderInitPromise}async initWalletConnectProvider(e){const t=LoggerUtil.createLogger(((e,...t)=>{e.message.includes(ErrorUtil.UniversalProviderErrors.UNAUTHORIZED_DOMAIN_NOT_ALLOWED)?this.reportErrors&&(AlertController.open(ErrorUtil.ALERT_ERRORS.INVALID_APP_CONFIGURATION,"error"),this.reportErrors=!1):console.error(...t)})),r={projectId:e,metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]},logger:t};this.walletConnectProvider=await dr.init(r),await this.checkActiveWalletConnectProvider()}syncRequestedNetworks(e){[...new Set(e.map((e=>e.chainNamespace)))].filter((e=>Boolean(e))).forEach((t=>{var r;null==(r=this.appKit)||r.setRequestedCaipNetworks(e.filter((e=>e.chainNamespace===t)),t)}))}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=SafeLocalStorage.getItem(SafeLocalStorageKeys.WALLET_ID);e&&t===ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID&&this.setWalletConnectProvider()}setWalletConnectProvider(){var e,t;SafeLocalStorage.setItem(SafeLocalStorageKeys.WALLET_ID,ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID);const r=null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces;if(r){Object.keys(r).reverse().forEach((e=>{var t,n,i;const o=null==(t=null==r?void 0:r[e])?void 0:t.accounts[0];ProviderUtil.setProvider(e,this.walletConnectProvider),ProviderUtil.setProviderId(e,"walletConnect"),null==(n=this.appKit)||n.setApprovedCaipNetworksData(e),o&&(null==(i=this.appKit)||i.setCaipAddress(o,e))}));const e=StorageUtil.getStoredActiveCaipNetwork(),t=ChainController.state.activeCaipNetwork;try{e?ChainController.setActiveCaipNetwork(e):t&&ChainController.getAllApprovedCaipNetworkIds().includes(t.caipNetworkId)||this.setDefaultNetwork(r)}catch(n){console.warn(">>> Error setting active caip network",n)}}this.syncAccount(),this.watchWalletConnect()}setDefaultNetwork(e){var t;const r=null==(t=this.caipNetworks[0])?void 0:t.chainNamespace;if(r){const t=null==e?void 0:e[r];if(null==t?void 0:t.chains){const e=t.chains[0];if(e){const t=ChainController.getRequestedCaipNetworks(r);if(t){const r=t.find((t=>t.caipNetworkId===e));r&&ChainController.setActiveCaipNetwork(r)}}}}}async watchWalletConnect(){var e;const t=await this.getWalletConnectProvider(),r=(null==(e=null==t?void 0:t.session)?void 0:e.namespaces)||{};const n=e=>{e.length>0&&this.syncAccount()},i=e=>{var t,r,n;const i=this.caipNetworks.find((t=>t.id==e)),o=null==(t=this.appKit)?void 0:t.getCaipNetwork();if(i)o&&(null==o?void 0:o.id)===(null==i?void 0:i.id)||null==(n=this.appKit)||n.setCaipNetwork(i);else{const t=(null==(r=this.appKit)?void 0:r.getActiveChainNamespace())||ConstantsUtil$3.CHAIN.EVM;ChainController.setActiveCaipNetwork({id:e,caipNetworkId:`${t}:${e}`,name:"Unknown Network",chainNamespace:t,nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}})}};t&&(t.on("disconnect",(function e(){Object.keys(r).forEach((e=>{AccountController.resetAccount(e)})),ConnectionController.resetWcConnection(),SafeLocalStorage.removeItem(SafeLocalStorageKeys.WALLET_ID),null==t||t.removeListener("disconnect",e),null==t||t.removeListener("accountsChanged",n)})),t.on("accountsChanged",n),t.on("chainChanged",i))}getProviderData(){var e,t,r,n;const i=(null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces)||{},o=(null==(r=this.appKit)?void 0:r.getIsConnectedState())||!1,a=(null==(n=this.appKit)?void 0:n.getPreferredAccountType())||"";return{provider:this.walletConnectProvider,namespaces:i,namespaceKeys:i?Object.keys(i):[],isConnected:o,preferredAccountType:a}}syncAccount(){var e,t,r,n;const{namespaceKeys:i,namespaces:o}=this.getProviderData(),a=null==(e=this.appKit)?void 0:e.getPreferredAccountType();(null==(t=this.appKit)?void 0:t.getIsConnectedState())||!1?i.forEach((async e=>{var t,r,n,i,s;const c=e,l=null==(t=null==o?void 0:o[e])?void 0:t.accounts[0];(null==(r=this.appKit)?void 0:r.getCaipAddress(c))||(null==(n=this.appKit)||n.setPreferredAccountType(a,c),null==(i=this.appKit)||i.setCaipAddress(l,c),this.syncConnectedWalletInfo(),await Promise.all([null==(s=this.appKit)?void 0:s.setApprovedCaipNetworksData(c)])),this.syncAccounts()})):(null==(r=this.appKit)||r.resetWcConnection(),null==(n=this.appKit)||n.resetNetwork(this.chainNamespace),this.syncAccounts(!0))}syncAccounts(e=!1){const{namespaces:t}=this.getProviderData();Object.keys(t).forEach((r=>{var n,i,o,a;const s=null==(i=null==(n=null==t?void 0:t[r])?void 0:n.accounts)?void 0:i.map((e=>{const[,,t]=e.split(":");return t})).filter(((e,t,r)=>r.indexOf(e)===t));e&&(null==(o=this.appKit)||o.setAllAccounts([],r)),s&&(null==(a=this.appKit)||a.setAllAccounts(s.map((e=>({address:e,type:"eoa"}))),r))}))}syncConnectedWalletInfo(){var e,t;const r=SafeLocalStorage.getItem(SafeLocalStorageKeys.WALLET_ID),n=(null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces)||{};Object.keys(n).forEach((e=>{var t,n,i,o,a;(null==(t=this.walletConnectProvider)?void 0:t.session)?null==(i=this.appKit)||i.setConnectedWalletInfo({...this.walletConnectProvider.session.peer.metadata,name:this.walletConnectProvider.session.peer.metadata.name,icon:null==(n=this.walletConnectProvider.session.peer.metadata.icons)?void 0:n[0]},e):r&&(null==(o=this.appKit)||o.setConnectedWalletInfo({name:r},ConstantsUtil$3.CHAIN.EVM),null==(a=this.appKit)||a.setConnectedWalletInfo({name:r},ConstantsUtil$3.CHAIN.SOLANA))}))}syncConnectors(){var e;const t=[];t.push({id:ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID,explorerId:PresetsUtil.ConnectorExplorerIds[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],imageId:PresetsUtil.ConnectorImageIds[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],name:PresetsUtil.ConnectorNamesMap[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],type:"WALLET_CONNECT",chain:this.chainNamespace}),null==(e=this.appKit)||e.setConnectors(t)}parseWalletCapabilities(e){try{return JSON.parse(e)}catch(t){throw new Error("Error parsing wallet capabilities")}}}let isInitialized=!1;class AppKit{constructor(e){var t;this.initPromise=void 0,this.setStatus=(e,t)=>{AccountController.setStatus(e,t)},this.getIsConnectedState=()=>Boolean(ChainController.state.activeCaipAddress),this.setAllAccounts=(e,t)=>{AccountController.setAllAccounts(e,t),OptionsController.setHasMultipleAddresses((null==e?void 0:e.length)>1)},this.addAddressLabel=(e,t,r)=>{AccountController.addAddressLabel(e,t,r)},this.removeAddressLabel=(e,t)=>{AccountController.removeAddressLabel(e,t)},this.getCaipAddress=e=>ChainController.state.activeChain!==e&&e?ChainController.getAccountProp("caipAddress",e):ChainController.state.activeCaipAddress,this.getAddress=e=>ChainController.state.activeChain!==e&&e?ChainController.getAccountProp("address",e):AccountController.state.address,this.getProvider=()=>AccountController.state.provider,this.getPreferredAccountType=()=>AccountController.state.preferredAccountType,this.setCaipAddress=(e,t)=>{AccountController.setCaipAddress(e,t)},this.setProvider=(e,t)=>{AccountController.setProvider(e,t)},this.setBalance=(e,t,r)=>{AccountController.setBalance(e,t,r)},this.setProfileName=(e,t)=>{AccountController.setProfileName(e,t)},this.setProfileImage=(e,t)=>{AccountController.setProfileImage(e,t)},this.resetAccount=e=>{AccountController.resetAccount(e)},this.setCaipNetwork=e=>{ChainController.setActiveCaipNetwork(e)},this.getCaipNetwork=e=>{var t;return e?null==(t=ChainController.getRequestedCaipNetworks(e).filter((t=>t.chainNamespace===e)))?void 0:t[0]:ChainController.state.activeCaipNetwork},this.getCaipNetworkId=()=>{const e=this.getCaipNetwork();if(e)return e.id},this.getCaipNetworks=e=>ChainController.getRequestedCaipNetworks(e),this.getActiveChainNamespace=()=>ChainController.state.activeChain,this.setRequestedCaipNetworks=(e,t)=>{ChainController.setRequestedCaipNetworks(e,t)},this.getApprovedCaipNetworkIds=()=>ChainController.getAllApprovedCaipNetworkIds(),this.setApprovedCaipNetworksData=e=>ChainController.setApprovedCaipNetworksData(e),this.resetNetwork=e=>{ChainController.resetNetwork(e)},this.setConnectors=e=>{const t=[...ConnectorController.getConnectors(),...e];ConnectorController.setConnectors(t)},this.addConnector=e=>{ConnectorController.addConnector(e)},this.getConnectors=()=>ConnectorController.getConnectors(),this.resetWcConnection=()=>{ConnectionController.resetWcConnection()},this.fetchIdentity=e=>BlockchainApiController.fetchIdentity(e),this.setAddressExplorerUrl=(e,t)=>{AccountController.setAddressExplorerUrl(e,t)},this.setSmartAccountDeployed=(e,t)=>{AccountController.setSmartAccountDeployed(e,t)},this.setConnectedWalletInfo=(e,t)=>{AccountController.setConnectedWalletInfo(e,t)},this.setSmartAccountEnabledNetworks=(e,t)=>{ChainController.setSmartAccountEnabledNetworks(e,t)},this.setPreferredAccountType=(e,t)=>{AccountController.setPreferredAccountType(e,t)},this.getReownName=e=>EnsController.getNamesForAddress(e),this.resolveReownName=async e=>{var t;const r=await EnsController.resolveName(e);return(null==(t=(Object.values(null==r?void 0:r.addresses)||[])[0])?void 0:t.address)||!1},this.setEIP6963Enabled=e=>{OptionsController.setEIP6963Enabled(e)},this.setClientId=e=>{BlockchainApiController.setClientId(e)},this.getConnectorImage=e=>AssetUtil.getConnectorImage(e),this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect("ApproveTransaction")}else this.open({view:"ApproveTransaction"})},this.adapter=null==(t=e.adapters)?void 0:t[0],this.caipNetworks=this.extendCaipNetworks(e),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.initControllers(e),this.initOrContinue(),this.version=e.sdkVersion}static getInstance(){return this.instance}async open(e){await this.initOrContinue(),ModalController.open(e)}async close(){await this.initOrContinue(),ModalController.close()}setLoading(e){ModalController.setLoading(e)}getError(){return""}getChainId(){var e;return null==(e=ChainController.state.activeCaipNetwork)?void 0:e.id}switchNetwork(e){return ChainController.switchActiveNetwork(e)}getWalletProvider(){return ChainController.state.activeChain?ProviderUtil.state.providers[ChainController.state.activeChain]:null}getWalletProviderType(){return ChainController.state.activeChain?ProviderUtil.state.providerIds[ChainController.state.activeChain]:null}subscribeProvider(){return null}getThemeMode(){return ThemeController.state.themeMode}getThemeVariables(){return ThemeController.state.themeVariables}setThemeMode(e){ThemeController.setThemeMode(e),setColorTheme(ThemeController.state.themeMode)}setThemeVariables(e){ThemeController.setThemeVariables(e),setThemeVariables(ThemeController.state.themeVariables)}subscribeTheme(e){return ThemeController.subscribe(e)}getWalletInfo(){return AccountController.state.connectedWalletInfo}subscribeWalletInfo(e){return AccountController.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){AccountController.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){ChainController.subscribeKey("activeCaipNetwork",e)}getState(){return PublicStateController.state}subscribeState(e){return PublicStateController.subscribe(e)}showErrorMessage(e){SnackController.showError(e)}showSuccessMessage(e){SnackController.showSuccess(e)}getEvent(){return{...EventsController.state}}subscribeEvents(e){return EventsController.subscribe(e)}replace(e){RouterController.replace(e)}redirect(e){RouterController.push(e)}popTransactionStack(e){RouterController.popTransactionStack(e)}isOpen(){return ModalController.state.open}isTransactionStackEmpty(){return 0===RouterController.state.transactionStack.length}isTransactionShouldReplaceView(){var e;return null==(e=RouterController.state.transactionStack[RouterController.state.transactionStack.length-1])?void 0:e.replace}async initControllers(e){var t;if(OptionsController.setDebug(e.debug),OptionsController.setProjectId(e.projectId),OptionsController.setSdkVersion(e.sdkVersion),!e.projectId)return void AlertController.open(ErrorUtil.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");this.adapters=e.adapters,this.setMetadata(e),this.initializeUniversalAdapter(e),this.initializeAdapters(e),this.setDefaultNetwork(),OptionsController.setAllWallets(e.allWallets),OptionsController.setIncludeWalletIds(e.includeWalletIds),OptionsController.setExcludeWalletIds(e.excludeWalletIds),e.excludeWalletIds&&ApiController.searchWalletByIds({ids:e.excludeWalletIds}),OptionsController.setFeaturedWalletIds(e.featuredWalletIds),OptionsController.setTokens(e.tokens),OptionsController.setTermsConditionsUrl(e.termsConditionsUrl),OptionsController.setPrivacyPolicyUrl(e.privacyPolicyUrl),OptionsController.setCustomWallets(e.customWallets),OptionsController.setFeatures(e.features),OptionsController.setEnableWalletConnect(!1!==e.enableWalletConnect),OptionsController.setEnableWallets(!1!==e.enableWallets),e.metadata&&OptionsController.setMetadata(e.metadata),e.themeMode&&ThemeController.setThemeMode(e.themeMode),e.themeVariables&&ThemeController.setThemeVariables(e.themeVariables),e.disableAppend&&OptionsController.setDisableAppend(Boolean(e.disableAppend));if((null==(t=e.adapters)?void 0:t.find((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)))&&e.siweConfig){const{SIWEController:t}=await Promise.resolve().then((()=>index$8));t.setSIWEClient(e.siweConfig)}}setMetadata(e){var t,r,n;"undefined"!=typeof window&&"undefined"!=typeof document&&(e.metadata={name:(null==(t=document.getElementsByTagName("title")[0])?void 0:t.textContent)||"",description:(null==(r=document.querySelector('meta[property="og:description"]'))?void 0:r.content)||"",url:window.location.origin,icons:[(null==(n=document.querySelector('link[rel~="icon"]'))?void 0:n.href)||""]})}extendCaipNetworks(e){return CaipNetworksUtil.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,projectId:e.projectId})}extendDefaultCaipNetwork(e){const t=e.networks.find((t=>{var r;return t.id===(null==(r=e.defaultNetwork)?void 0:r.id)}));return t?CaipNetworksUtil.extendCaipNetwork(t,{customNetworkImageUrls:e.chainImages,projectId:e.projectId}):void 0}initializeUniversalAdapter(e){var t,r;const n={...e,networks:this.caipNetworks,defaultNetwork:this.defaultCaipNetwork};this.universalAdapter=new UniversalAdapterClient(n),ChainController.initializeUniversalAdapter(this.universalAdapter,e.adapters||[]),null==(r=(t=this.universalAdapter).construct)||r.call(t,this,n)}initializeAdapters(e){var t;const r={...e,networks:this.caipNetworks,defaultNetwork:this.defaultCaipNetwork};ChainController.initialize(e.adapters||[]),null==(t=e.adapters)||t.forEach((e=>{var t;null==(t=e.construct)||t.call(e,this,r)}))}setDefaultNetwork(){const e=SafeLocalStorage.getItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK_ID),t=(e?this.caipNetworks.find((t=>t.caipNetworkId===e)):void 0)||this.defaultCaipNetwork||this.caipNetworks[0];ChainController.setActiveCaipNetwork(t)}async initOrContinue(){return this.initPromise||isInitialized||!CoreHelperUtil.isClient()||(isInitialized=!0,this.initPromise=new Promise((async e=>{await Promise.all([Promise.resolve().then((()=>index$e)),Promise.resolve().then((()=>w3mModal))]);const t=document.createElement("w3m-modal");OptionsController.state.disableAppend||document.body.insertAdjacentElement("beforeend",t),e()}))),this.initPromise}}const PACKAGE_VERSION="1.1.8";var __decorate$1M=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let W3mAccountButton=class extends r$c{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.caipAddress=ChainController.state.activeCaipAddress,this.balanceVal=AccountController.state.balance,this.balanceSymbol=AccountController.state.balanceSymbol,this.profileName=AccountController.state.profileName,this.profileImage=AccountController.state.profileImage,this.network=ChainController.state.activeCaipNetwork,this.networkImage=AssetUtil.getNetworkImage(this.network),this.isSupported=!0,this.unsubscribe.push(AssetController.subscribeNetworkImages((()=>{this.networkImage=AssetUtil.getNetworkImage(this.network)})),ChainController.subscribeKey("activeCaipAddress",(e=>this.caipAddress=e)),AccountController.subscribeKey("balance",(e=>this.balanceVal=e)),AccountController.subscribeKey("balanceSymbol",(e=>this.balanceSymbol=e)),AccountController.subscribeKey("profileName",(e=>this.profileName=e)),AccountController.subscribeKey("profileImage",(e=>this.profileImage=e)),ChainController.subscribeKey("activeCaipNetwork",(e=>{this.network=e,this.networkImage=AssetUtil.getNetworkImage(e),this.isSupported=!(null==e?void 0:e.chainNamespace)||ChainController.checkIfSupportedNetwork(null==e?void 0:e.chainNamespace)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!ChainController.state.activeChain)return null;const e="show"===this.balance;return x$7`
|
|
6097
|
+
*/P2=qi,s2=qi.exports,function(){var e,t="Expected a function",r="__lodash_hash_undefined__",n="__lodash_placeholder__",i=16,o=32,a=64,s=128,c=256,l=1/0,u=9007199254740991,d=NaN,h=4294967295,f=h-1,p=h>>>1,m=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",a],["rearg",c]],g="[object Arguments]",b="[object Array]",y="[object Boolean]",v="[object Date]",w="[object Error]",_="[object Function]",E="[object GeneratorFunction]",C="[object Map]",$="[object Number]",S="[object Object]",x="[object Promise]",k="[object RegExp]",A="[object Set]",T="[object String]",I="[object Symbol]",R="[object WeakMap]",M="[object ArrayBuffer]",P="[object DataView]",N="[object Float32Array]",O="[object Float64Array]",L="[object Int8Array]",B="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",j="[object Uint8ClampedArray]",F="[object Uint16Array]",W="[object Uint32Array]",z=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(K.source),Z=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(re.source),ie=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Te="['’]",Ie="["+Ee+"]",Re="["+Ae+"]",Me="["+Ce+"]",Pe="\\d+",Ne="["+$e+"]",Oe="["+Se+"]",Le="[^"+Ee+Ae+Pe+$e+Se+xe+"]",Be="\\ud83c[\\udffb-\\udfff]",De="[^"+Ee+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",je="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+xe+"]",We="\\u200d",ze="(?:"+Oe+"|"+Le+")",He="(?:"+Fe+"|"+Le+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ke="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Me+"|"+Be+")?",Ge="["+ke+"]?",Ze=Ge+Ve+"(?:"+We+"(?:"+[De,Ue,je].join("|")+")"+Ge+Ve+")*",Ye="(?:"+[Ne,Ue,je].join("|")+")"+Ze,Je="(?:"+[De+Me+"?",Me,Ue,je,Ie].join("|")+")",Qe=RegExp(Te,"g"),Xe=RegExp(Me,"g"),et=RegExp(Be+"(?="+Be+")|"+Je+Ze,"g"),tt=RegExp([Fe+"?"+Oe+"+"+qe+"(?="+[Re,Fe,"$"].join("|")+")",He+"+"+Ke+"(?="+[Re,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+qe,Fe+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ye].join("|"),"g"),rt=RegExp("["+We+Ee+Ce+ke+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],ot=-1,at={};at[N]=at[O]=at[L]=at[B]=at[D]=at[U]=at[j]=at[F]=at[W]=!0,at[g]=at[b]=at[M]=at[y]=at[P]=at[v]=at[w]=at[_]=at[C]=at[$]=at[S]=at[k]=at[A]=at[T]=at[R]=!1;var st={};st[g]=st[b]=st[M]=st[P]=st[y]=st[v]=st[N]=st[O]=st[L]=st[B]=st[D]=st[C]=st[$]=st[S]=st[k]=st[A]=st[T]=st[I]=st[U]=st[j]=st[F]=st[W]=!0,st[w]=st[_]=st[R]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ut=parseInt,dt="object"==typeof _n&&_n&&_n.Object===Object&&_n,ht="object"==typeof self&&self&&self.Object===Object&&self,ft=dt||ht||Function("return this")(),pt=s2&&!s2.nodeType&&s2,mt=pt&&P2&&!P2.nodeType&&P2,gt=mt&&mt.exports===pt,bt=gt&&dt.process,yt=function(){try{return mt&&mt.require&&mt.require("util").types||bt&&bt.binding&&bt.binding("util")}catch{}}(),vt=yt&&yt.isArrayBuffer,wt=yt&&yt.isDate,_t=yt&&yt.isMap,Et=yt&&yt.isRegExp,Ct=yt&&yt.isSet,$t=yt&&yt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function xt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function kt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function Rt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Mt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Nt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Ot(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Lt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Bt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Dt=qt("length");function Ut(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function jt(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ft(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):jt(e,zt,r)}function Wt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function zt(e){return e!=e}function Ht(e,t){var r=null==e?0:e.length;return r?Gt(e,t)/r:d}function qt(t){return function(r){return null==r?e:r[t]}}function Kt(t){return function(r){return null==t?e:t[r]}}function Vt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Gt(t,r){for(var n,i=-1,o=t.length;++i<o;){var a=r(t[i]);a!==e&&(n=n===e?a:n+a)}return n}function Zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Yt(e){return e&&e.slice(0,hr(e)+1).replace(ie,"")}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Pt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function er(e,t){for(var r=-1,n=e.length;++r<n&&Ft(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length;r--&&Ft(t,e[r],0)>-1;);return r}var rr=Kt({"À":"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"}),nr=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+ct[e]}function or(e){return rt.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function sr(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,i=e.length,o=0,a=[];++r<i;){var s=e[r];(s===t||s===n)&&(e[r]=n,a[o++]=r)}return a}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){return or(e)?function(e){for(var t=et.lastIndex=0;et.test(e);)++t;return t}(e):Dt(e)}function dr(e){return or(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var fr=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pr=function oe(Ee){var Ce,$e=(Ee=null==Ee?ft:pr.defaults(ft.Object(),Ee,pr.pick(ft,it))).Array,Se=Ee.Date,xe=Ee.Error,ke=Ee.Function,Ae=Ee.Math,Te=Ee.Object,Ie=Ee.RegExp,Re=Ee.String,Me=Ee.TypeError,Pe=$e.prototype,Ne=ke.prototype,Oe=Te.prototype,Le=Ee["__core-js_shared__"],Be=Ne.toString,De=Oe.hasOwnProperty,Ue=0,je=(Ce=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+Ce:"",Fe=Oe.toString,We=Be.call(Te),ze=ft._,He=Ie("^"+Be.call(De).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=gt?Ee.Buffer:e,Ke=Ee.Symbol,Ve=Ee.Uint8Array,Ge=qe?qe.allocUnsafe:e,Ze=sr(Te.getPrototypeOf,Te),Ye=Te.create,Je=Oe.propertyIsEnumerable,et=Pe.splice,rt=Ke?Ke.isConcatSpreadable:e,ct=Ke?Ke.iterator:e,dt=Ke?Ke.toStringTag:e,ht=function(){try{var e=po(Te,"defineProperty");return e({},"",{}),e}catch{}}(),pt=Ee.clearTimeout!==ft.clearTimeout&&Ee.clearTimeout,mt=Se&&Se.now!==ft.Date.now&&Se.now,bt=Ee.setTimeout!==ft.setTimeout&&Ee.setTimeout,yt=Ae.ceil,Dt=Ae.floor,Kt=Te.getOwnPropertySymbols,mr=qe?qe.isBuffer:e,gr=Ee.isFinite,br=Pe.join,yr=sr(Te.keys,Te),vr=Ae.max,wr=Ae.min,_r=Se.now,Er=Ee.parseInt,Cr=Ae.random,$r=Pe.reverse,Sr=po(Ee,"DataView"),xr=po(Ee,"Map"),kr=po(Ee,"Promise"),Ar=po(Ee,"Set"),Tr=po(Ee,"WeakMap"),Ir=po(Te,"create"),Rr=Tr&&new Tr,Mr={},Pr=jo(Sr),Nr=jo(xr),Or=jo(kr),Lr=jo(Ar),Br=jo(Tr),Dr=Ke?Ke.prototype:e,Ur=Dr?Dr.valueOf:e,jr=Dr?Dr.toString:e;function Fr(e){if(ns(e)&&!Ka(e)&&!(e instanceof qr)){if(e instanceof Hr)return e;if(De.call(e,"__wrapped__"))return Fo(e)}return new Hr(e)}var Wr=function(){function t(){}return function(r){if(!rs(r))return{};if(Ye)return Ye(r);t.prototype=r;var n=new t;return t.prototype=e,n}}();function zr(){}function Hr(t,r){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=e}function qr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Gr;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Jr(e,t){var r=Ka(e),n=!r&&qa(e),i=!r&&!n&&Ya(e),o=!r&&!n&&!i&&ds(e),a=r||n||i||o,s=a?Zt(e.length,Re):[],c=s.length;for(var l in e)(t||De.call(e,l))&&(!a||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_o(l,c)))&&s.push(l);return s}function Qr(t){var r=t.length;return r?t[Yn(0,r-1)]:e}function Xr(e,t){return Bo(Ri(e),ln(t,0,e.length))}function en(e){return Bo(Ri(e))}function tn(t,r,n){(n!==e&&!Wa(t[r],n)||n===e&&!(r in t))&&sn(t,r,n)}function rn(t,r,n){var i=t[r];(!De.call(t,r)||!Wa(i,n)||n===e&&!(r in t))&&sn(t,r,n)}function nn(e,t){for(var r=e.length;r--;)if(Wa(e[r][0],t))return r;return-1}function on(e,t,r,n){return pn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function an(e,t){return e&&Mi(t,Ps(t),e)}function sn(e,t,r){"__proto__"==t&&ht?ht(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function cn(t,r){for(var n=-1,i=r.length,o=$e(i),a=null==t;++n<i;)o[n]=a?e:As(t,r[n]);return o}function ln(t,r,n){return t==t&&(n!==e&&(t=t<=n?t:n),r!==e&&(t=t>=r?t:r)),t}function un(t,r,n,i,o,a){var s,c=1&r,l=2&r,u=4&r;if(n&&(s=o?n(t,i,o,a):n(t)),s!==e)return s;if(!rs(t))return t;var d=Ka(t);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!c)return Ri(t,s)}else{var h=bo(t),f=h==_||h==E;if(Ya(t))return Si(t,c);if(h==S||h==g||f&&!o){if(s=l||f?{}:vo(t),!c)return l?function(e,t){return Mi(e,go(e),t)}(t,function(e,t){return e&&Mi(t,Ns(t),e)}(s,t)):function(e,t){return Mi(e,mo(e),t)}(t,an(s,t))}else{if(!st[h])return o?t:{};s=function(e,t,r){var n=e.constructor;switch(t){case M:return xi(e);case y:case v:return new n(+e);case P:return function(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case O:case L:case B:case D:case U:case j:case F:case W:return ki(e,r);case C:return new n;case $:case T:return new n(e);case k:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new n;case I:return function(e){return Ur?Te(Ur.call(e)):{}}(e)}}(t,h,c)}}a||(a=new Yr);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(e){s.add(un(e,r,n,e,t,a))})):is(t)&&t.forEach((function(e,i){s.set(i,un(e,r,n,i,t,a))}));var m=d?e:(u?l?ao:oo:l?Ns:Ps)(t);return kt(m||t,(function(e,i){m&&(e=t[i=e]),rn(s,i,un(e,r,n,i,t,a))})),s}function dn(t,r,n){var i=n.length;if(null==t)return!i;for(t=Te(t);i--;){var o=n[i],a=r[o],s=t[o];if(s===e&&!(o in t)||!a(s))return!1}return!0}function hn(r,n,i){if("function"!=typeof r)throw new Me(t);return Po((function(){r.apply(e,i)}),n)}function fn(e,t,r,n){var i=-1,o=Rt,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;r&&(t=Pt(t,Jt(r))),n?(o=Mt,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Zr(t));e:for(;++i<s;){var u=e[i],d=null==r?u:r(u);if(u=n||0!==u?u:0,a&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,n)||c.push(u)}return c}Fr.templateSettings={escape:Y,evaluate:J,interpolate:Q,variable:"",imports:{_:Fr}},Fr.prototype=zr.prototype,Fr.prototype.constructor=Fr,Hr.prototype=Wr(zr.prototype),Hr.prototype.constructor=Hr,qr.prototype=Wr(zr.prototype),qr.prototype.constructor=qr,Kr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Kr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kr.prototype.get=function(t){var n=this.__data__;if(Ir){var i=n[t];return i===r?e:i}return De.call(n,t)?n[t]:e},Kr.prototype.has=function(t){var r=this.__data__;return Ir?r[t]!==e:De.call(r,t)},Kr.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Ir&&n===e?r:n,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=nn(t,e);return!(r<0||(r==t.length-1?t.pop():et.call(t,r,1),--this.size,0))},Vr.prototype.get=function(t){var r=this.__data__,n=nn(r,t);return n<0?e:r[n][1]},Vr.prototype.has=function(e){return nn(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Kr,map:new(xr||Vr),string:new Kr}},Gr.prototype.delete=function(e){var t=ho(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return ho(this,e).get(e)},Gr.prototype.has=function(e){return ho(this,e).has(e)},Gr.prototype.set=function(e,t){var r=ho(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Zr.prototype.add=Zr.prototype.push=function(e){return this.__data__.set(e,r),this},Zr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!xr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var pn=Oi(En),mn=Oi(Cn,!0);function gn(e,t){var r=!0;return pn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function bn(t,r,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r(a);if(null!=s&&(c===e?s==s&&!us(s):n(s,c)))var c=s,l=a}return l}function yn(e,t){var r=[];return pn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function vn(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=wo),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?vn(s,t-1,r,n,i):Nt(i,s):n||(i[i.length]=s)}return i}var wn=Li(),_n=Li(!0);function En(e,t){return e&&wn(e,t,Ps)}function Cn(e,t){return e&&_n(e,t,Ps)}function $n(e,t){return It(t,(function(t){return Xa(e[t])}))}function Sn(t,r){for(var n=0,i=(r=_i(r,t)).length;null!=t&&n<i;)t=t[Uo(r[n++])];return n&&n==i?t:e}function xn(e,t,r){var n=t(e);return Ka(e)?n:Nt(n,r(e))}function kn(t){return null==t?t===e?"[object Undefined]":"[object Null]":dt&&dt in Te(t)?function(t){var r=De.call(t,dt),n=t[dt];try{t[dt]=e;var i=!0}catch{}var o=Fe.call(t);return i&&(r?t[dt]=n:delete t[dt]),o}(t):function(e){return Fe.call(e)}(t)}function An(e,t){return e>t}function Tn(e,t){return null!=e&&De.call(e,t)}function In(e,t){return null!=e&&t in Te(e)}function Rn(t,r,n){for(var i=n?Mt:Rt,o=t[0].length,a=t.length,s=a,c=$e(a),l=1/0,u=[];s--;){var d=t[s];s&&r&&(d=Pt(d,Jt(r))),l=wr(d.length,l),c[s]=!n&&(r||o>=120&&d.length>=120)?new Zr(s&&d):e}d=t[0];var h=-1,f=c[0];e:for(;++h<o&&u.length<l;){var p=d[h],m=r?r(p):p;if(p=n||0!==p?p:0,!(f?Xt(f,m):i(u,m,n))){for(s=a;--s;){var g=c[s];if(!(g?Xt(g,m):i(t[s],m,n)))continue e}f&&f.push(m),u.push(p)}}return u}function Mn(t,r,n){var i=null==(t=Io(t,r=_i(r,t)))?t:t[Uo(Qo(r))];return null==i?e:St(i,t,n)}function Pn(e){return ns(e)&&kn(e)==g}function Nn(t,r,n,i,o){return t===r||(null==t||null==r||!ns(t)&&!ns(r)?t!=t&&r!=r:function(t,r,n,i,o,a){var s=Ka(t),c=Ka(r),l=s?b:bo(t),u=c?b:bo(r),d=(l=l==g?S:l)==S,h=(u=u==g?S:u)==S,f=l==u;if(f&&Ya(t)){if(!Ya(r))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new Yr),s||ds(t)?no(t,r,n,i,o,a):function(e,t,r,n,i,o,a){switch(r){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case y:case v:case $:return Wa(+e,+t);case w:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case C:var s=ar;case A:var c=1&n;if(s||(s=lr),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var u=no(s(e),s(t),n,i,o,a);return a.delete(e),u;case I:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}(t,r,l,n,i,o,a);if(!(1&n)){var p=d&&De.call(t,"__wrapped__"),m=h&&De.call(r,"__wrapped__");if(p||m){var _=p?t.value():t,E=m?r.value():r;return a||(a=new Yr),o(_,E,n,i,a)}}return!!f&&(a||(a=new Yr),function(t,r,n,i,o,a){var s=1&n,c=oo(t),l=c.length,u=oo(r),d=u.length;if(l!=d&&!s)return!1;for(var h=l;h--;){var f=c[h];if(!(s?f in r:De.call(r,f)))return!1}var p=a.get(t),m=a.get(r);if(p&&m)return p==r&&m==t;var g=!0;a.set(t,r),a.set(r,t);for(var b=s;++h<l;){var y=t[f=c[h]],v=r[f];if(i)var w=s?i(v,y,f,r,t,a):i(y,v,f,t,r,a);if(!(w===e?y===v||o(y,v,n,i,a):w)){g=!1;break}b||(b="constructor"==f)}if(g&&!b){var _=t.constructor,E=r.constructor;_!=E&&"constructor"in t&&"constructor"in r&&!("function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E)&&(g=!1)}return a.delete(t),a.delete(r),g}(t,r,n,i,o,a))}(t,r,n,i,Nn,o))}function On(t,r,n,i){var o=n.length,a=o,s=!i;if(null==t)return!a;for(t=Te(t);o--;){var c=n[o];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<a;){var l=(c=n[o])[0],u=t[l],d=c[1];if(s&&c[2]){if(u===e&&!(l in t))return!1}else{var h=new Yr;if(i)var f=i(u,d,l,t,r,h);if(!(f===e?Nn(d,u,3,i,h):f))return!1}}return!0}function Ln(e){return!(!rs(e)||function(e){return!!je&&je in e}(e))&&(Xa(e)?He:ge).test(jo(e))}function Bn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Ka(e)?zn(e[0],e[1]):Wn(e):pc(e)}function Dn(e){if(!xo(e))return yr(e);var t=[];for(var r in Te(e))De.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Un(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var r in Te(e))t.push(r);return t}(e);var t=xo(e),r=[];for(var n in e)"constructor"==n&&(t||!De.call(e,n))||r.push(n);return r}function jn(e,t){return e<t}function Fn(e,t){var r=-1,n=Ga(e)?$e(e.length):[];return pn(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function Wn(e){var t=fo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||On(r,e,t)}}function zn(t,r){return Co(t)&&ko(r)?Ao(Uo(t),r):function(n){var i=As(n,t);return i===e&&i===r?Ts(n,t):Nn(r,i,3)}}function Hn(t,r,n,i,o){t!==r&&wn(r,(function(a,s){if(o||(o=new Yr),rs(a))!function(t,r,n,i,o,a,s){var c=Ro(t,n),l=Ro(r,n),u=s.get(l);if(u)tn(t,n,u);else{var d=a?a(c,l,n+"",t,r,s):e,h=d===e;if(h){var f=Ka(l),p=!f&&Ya(l),m=!f&&!p&&ds(l);d=l,f||p||m?Ka(c)?d=c:Za(c)?d=Ri(c):p?(h=!1,d=Si(l,!0)):m?(h=!1,d=ki(l,!0)):d=[]:as(l)||qa(l)?(d=c,qa(c)?d=vs(c):(!rs(c)||Xa(c))&&(d=vo(l))):h=!1}h&&(s.set(l,d),o(d,l,i,a,s),s.delete(l)),tn(t,n,d)}}(t,r,s,n,Hn,i,o);else{var c=i?i(Ro(t,s),a,s+"",t,r,o):e;c===e&&(c=a),tn(t,s,c)}}),Ns)}function qn(t,r){var n=t.length;if(n)return _o(r+=r<0?n:0,n)?t[r]:e}function Kn(e,t,r){t=t.length?Pt(t,(function(e){return Ka(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;return t=Pt(t,Jt(uo())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(Fn(e,(function(e,r,i){return{criteria:Pt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var c=Ai(i[n],o[n]);if(c)return n>=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Sn(e,a);r(s,a)&&ti(o,_i(a,e),s)}return o}function Gn(e,t,r,n){var i=n?Wt:Ft,o=-1,a=t.length,s=e;for(e===t&&(t=Ri(t)),r&&(s=Pt(e,Jt(r)));++o<a;)for(var c=0,l=t[o],u=r?r(l):l;(c=i(s,u,c,n))>-1;)s!==e&&et.call(s,c,1),et.call(e,c,1);return e}function Zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;_o(i)?et.call(e,i,1):fi(e,i)}}return e}function Yn(e,t){return e+Dt(Cr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>u)return r;do{t%2&&(r+=e),(t=Dt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return No(To(e,t,oc),e+"")}function Xn(e){return Qr(Ws(e))}function ei(e,t){var r=Ws(e);return Bo(r,ln(t,0,r.length))}function ti(t,r,n,i){if(!rs(t))return t;for(var o=-1,a=(r=_i(r,t)).length,s=a-1,c=t;null!=c&&++o<a;){var l=Uo(r[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(o!=s){var d=c[l];(u=i?i(d,l,c):e)===e&&(u=rs(d)?d:_o(r[o+1])?[]:{})}rn(c,l,u),c=c[l]}return t}var ri=Rr?function(e,t){return Rr.set(e,t),e}:oc,ni=ht?function(e,t){return ht(e,"toString",{configurable:!0,enumerable:!1,value:rc(t),writable:!0})}:oc;function ii(e){return Bo(Ws(e))}function oi(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=$e(i);++n<i;)o[n]=e[n+t];return o}function ai(e,t){var r;return pn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function si(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=p){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!us(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ci(e,t,oc,r)}function ci(t,r,n,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(r=n(r))!=r,c=null===r,l=us(r),u=r===e;o<a;){var d=Dt((o+a)/2),h=n(t[d]),p=h!==e,m=null===h,g=h==h,b=us(h);if(s)var y=i||g;else y=u?g&&(i||p):c?g&&p&&(i||!m):l?g&&p&&!m&&(i||!b):!m&&!b&&(i?h<=r:h<r);y?o=d+1:a=d}return wr(a,f)}function li(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!Wa(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?d:+e}function di(e){if("string"==typeof e)return e;if(Ka(e))return Pt(e,di)+"";if(us(e))return jr?jr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,r){var n=-1,i=Rt,o=e.length,a=!0,s=[],c=s;if(r)a=!1,i=Mt;else if(o>=200){var l=t?null:Ji(e);if(l)return lr(l);a=!1,i=Xt,c=new Zr}else c=t?[]:s;e:for(;++n<o;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,a&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(u)}else i(c,d,r)||(c!==s&&c.push(d),s.push(u))}return s}function fi(e,t){return null==(e=Io(e,t=_i(t,e)))||delete e[Uo(Qo(t))]}function pi(e,t,r,n){return ti(e,t,r(Sn(e,t)),n)}function mi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?oi(e,n?0:o,n?o+1:i):oi(e,n?o+1:0,n?i:o)}function gi(e,t){var r=e;return r instanceof qr&&(r=r.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))}),r)}function bi(e,t,r){var n=e.length;if(n<2)return n?hi(e[0]):[];for(var i=-1,o=$e(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=fn(o[i]||a,e[s],t,r));return hi(vn(o,1),t,r)}function yi(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:e;n(s,t[i],c)}return s}function vi(e){return Za(e)?e:[]}function wi(e){return"function"==typeof e?e:oc}function _i(e,t){return Ka(e)?e:Co(e,t)?[e]:Do(ws(e))}var Ei=Qn;function Ci(t,r,n){var i=t.length;return n=n===e?i:n,!r&&n>=i?t:oi(t,r,n)}var $i=pt||function(e){return ft.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function xi(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function ki(e,t){var r=t?xi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(t,r){if(t!==r){var n=t!==e,i=null===t,o=t==t,a=us(t),s=r!==e,c=null===r,l=r==r,u=us(r);if(!c&&!u&&!a&&t>r||a&&s&&l&&!c&&!u||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!u&&t<r||u&&n&&o&&!i&&!a||c&&n&&o||!s&&o||!l)return-1}return 0}function Ti(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,c=t.length,l=vr(o-a,0),u=$e(c+l),d=!n;++s<c;)u[s]=t[s];for(;++i<a;)(d||i<o)&&(u[r[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function Ii(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,c=-1,l=t.length,u=vr(o-s,0),d=$e(u+l),h=!n;++i<u;)d[i]=e[i];for(var f=i;++c<l;)d[f+c]=t[c];for(;++a<s;)(h||i<o)&&(d[f+r[a]]=e[i++]);return d}function Ri(e,t){var r=-1,n=e.length;for(t||(t=$e(n));++r<n;)t[r]=e[r];return t}function Mi(t,r,n,i){var o=!n;n||(n={});for(var a=-1,s=r.length;++a<s;){var c=r[a],l=i?i(n[c],t[c],c,n,t):e;l===e&&(l=t[c]),o?sn(n,c,l):rn(n,c,l)}return n}function Pi(e,t){return function(r,n){var i=Ka(r)?xt:on,o=t?t():{};return i(r,e,uo(n,2),o)}}function Ni(t){return Qn((function(r,n){var i=-1,o=n.length,a=o>1?n[o-1]:e,s=o>2?n[2]:e;for(a=t.length>3&&"function"==typeof a?(o--,a):e,s&&Eo(n[0],n[1],s)&&(a=o<3?e:a,o=1),r=Te(r);++i<o;){var c=n[i];c&&t(r,c,i,a)}return r}))}function Oi(e,t){return function(r,n){if(null==r)return r;if(!Ga(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Te(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Li(e){return function(t,r,n){for(var i=-1,o=Te(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}function Bi(t){return function(r){var n=or(r=ws(r))?dr(r):e,i=n?n[0]:r.charAt(0),o=n?Ci(n,1).join(""):r.slice(1);return i[t]()+o}}function Di(e){return function(t){return Ot(Xs(qs(t).replace(Qe,"")),e,"")}}function Ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Wr(e.prototype),n=e.apply(r,t);return rs(n)?n:r}}function ji(t){return function(r,n,i){var o=Te(r);if(!Ga(r)){var a=uo(n,3);r=Ps(r),n=function(e){return a(o[e],e,o)}}var s=t(r,n,i);return s>-1?o[a?r[s]:s]:e}}function Fi(r){return io((function(n){var i=n.length,o=i,a=Hr.prototype.thru;for(r&&n.reverse();o--;){var s=n[o];if("function"!=typeof s)throw new Me(t);if(a&&!c&&"wrapper"==co(s))var c=new Hr([],!0)}for(o=c?o:i;++o<i;){var l=co(s=n[o]),u="wrapper"==l?so(s):e;c=u&&$o(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[co(u[0])].apply(c,u[3]):1==s.length&&$o(s)?c[l]():c.thru(s)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&Ka(t))return c.plant(t).value();for(var r=0,o=i?n[r].apply(this,e):t;++r<i;)o=n[r].call(this,o);return o}}))}function Wi(t,r,n,i,o,a,c,l,u,d){var h=r&s,f=1&r,p=2&r,m=24&r,g=512&r,b=p?e:Ui(t);return function s(){for(var y=arguments.length,v=$e(y),w=y;w--;)v[w]=arguments[w];if(m)var _=lo(s),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,_);if(i&&(v=Ti(v,i,o,m)),a&&(v=Ii(v,a,c,m)),y-=E,m&&y<d){var C=cr(v,_);return Zi(t,r,Wi,s.placeholder,n,v,C,l,u,d-y)}var $=f?n:this,S=p?$[t]:t;return y=v.length,l?v=function(t,r){for(var n=t.length,i=wr(r.length,n),o=Ri(t);i--;){var a=r[i];t[i]=_o(a,n)?o[a]:e}return t}(v,l):g&&y>1&&v.reverse(),h&&u<y&&(v.length=u),this&&this!==ft&&this instanceof s&&(S=b||Ui(S)),S.apply($,v)}}function zi(e,t){return function(r,n){return function(e,t,r,n){return En(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Hi(t,r){return function(n,i){var o;if(n===e&&i===e)return r;if(n!==e&&(o=n),i!==e){if(o===e)return i;"string"==typeof n||"string"==typeof i?(n=di(n),i=di(i)):(n=ui(n),i=ui(i)),o=t(n,i)}return o}}function qi(e){return io((function(t){return t=Pt(t,Jt(uo())),Qn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Ki(t,r){var n=(r=r===e?" ":di(r)).length;if(n<2)return n?Jn(r,t):r;var i=Jn(r,yt(t/ur(r)));return or(r)?Ci(dr(i),0,t).join(""):i.slice(0,t)}function Vi(t){return function(r,n,i){return i&&"number"!=typeof i&&Eo(r,n,i)&&(n=i=e),r=ms(r),n===e?(n=r,r=0):n=ms(n),function(e,t,r,n){for(var i=-1,o=vr(yt((t-e)/(r||1)),0),a=$e(o);o--;)a[n?o:++i]=e,e+=r;return a}(r,n,i=i===e?r<n?1:-1:ms(i),t)}}function Gi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ys(t),r=ys(r)),e(t,r)}}function Zi(t,r,n,i,s,c,l,u,d,h){var f=8&r;r|=f?o:a,4&(r&=~(f?a:o))||(r&=-4);var p=[t,r,s,f?c:e,f?l:e,f?e:c,f?e:l,u,d,h],m=n.apply(e,p);return $o(t)&&Mo(m,p),m.placeholder=i,Oo(m,t,r)}function Yi(e){var t=Ae[e];return function(e,r){if(e=ys(e),(r=null==r?0:wr(gs(r),292))&&gr(e)){var n=(ws(e)+"e").split("e");return+((n=(ws(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Ji=Ar&&1/lr(new Ar([,-0]))[1]==l?function(e){return new Ar(e)}:uc;function Qi(e){return function(t){var r=bo(t);return r==C?ar(t):r==A?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(r,l,u,d,h,f,p,m){var g=2&l;if(!g&&"function"!=typeof r)throw new Me(t);var b=d?d.length:0;if(b||(l&=-97,d=h=e),p=p===e?p:vr(gs(p),0),m=m===e?m:gs(m),b-=h?h.length:0,l&a){var y=d,v=h;d=h=e}var w=g?e:so(r),_=[r,l,u,d,h,y,v,f,p,m];if(w&&function(e,t){var r=e[1],i=t[1],o=r|i,a=o<131,l=i==s&&8==r||i==s&&r==c&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!a&&!l)return e;1&i&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ti(d,u,t[4]):u,e[4]=d?cr(e[3],n):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ii(d,u,t[6]):u,e[6]=d?cr(e[5],n):t[6]),(u=t[7])&&(e[7]=u),i&s&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(_,w),r=_[0],l=_[1],u=_[2],d=_[3],h=_[4],!(m=_[9]=_[9]===e?g?0:r.length:vr(_[9]-b,0))&&24&l&&(l&=-25),l&&1!=l)E=8==l||l==i?function(t,r,n){var i=Ui(t);return function o(){for(var a=arguments.length,s=$e(a),c=a,l=lo(o);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:cr(s,l);return(a-=u.length)<n?Zi(t,r,Wi,o.placeholder,e,s,u,e,e,n-a):St(this&&this!==ft&&this instanceof o?i:t,this,s)}}(r,l,m):l!=o&&33!=l||h.length?Wi.apply(e,_):function(e,t,r,n){var i=1&t,o=Ui(e);return function t(){for(var a=-1,s=arguments.length,c=-1,l=n.length,u=$e(l+s),d=this&&this!==ft&&this instanceof t?o:e;++c<l;)u[c]=n[c];for(;s--;)u[c++]=arguments[++a];return St(d,i?r:this,u)}}(r,l,u,d);else var E=function(e,t,r){var n=1&t,i=Ui(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(r,l,u);return Oo((w?ri:Mo)(E,_),r,l)}function eo(t,r,n,i){return t===e||Wa(t,Oe[n])&&!De.call(i,n)?r:t}function to(t,r,n,i,o,a){return rs(t)&&rs(r)&&(a.set(r,t),Hn(t,r,e,to,a),a.delete(r)),t}function ro(t){return as(t)?e:t}function no(t,r,n,i,o,a){var s=1&n,c=t.length,l=r.length;if(c!=l&&!(s&&l>c))return!1;var u=a.get(t),d=a.get(r);if(u&&d)return u==r&&d==t;var h=-1,f=!0,p=2&n?new Zr:e;for(a.set(t,r),a.set(r,t);++h<c;){var m=t[h],g=r[h];if(i)var b=s?i(g,m,h,r,t,a):i(m,g,h,t,r,a);if(b!==e){if(b)continue;f=!1;break}if(p){if(!Bt(r,(function(e,t){if(!Xt(p,t)&&(m===e||o(m,e,n,i,a)))return p.push(t)}))){f=!1;break}}else if(m!==g&&!o(m,g,n,i,a)){f=!1;break}}return a.delete(t),a.delete(r),f}function io(t){return No(To(t,e,Vo),t+"")}function oo(e){return xn(e,Ps,mo)}function ao(e){return xn(e,Ns,go)}var so=Rr?function(e){return Rr.get(e)}:uc;function co(e){for(var t=e.name+"",r=Mr[t],n=De.call(Mr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function lo(e){return(De.call(Fr,"placeholder")?Fr:e).placeholder}function uo(){var e=Fr.iteratee||ac;return e=e===ac?Bn:e,arguments.length?e(arguments[0],arguments[1]):e}function ho(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function fo(e){for(var t=Ps(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ko(i)]}return t}function po(t,r){var n=function(t,r){return null==t?e:t[r]}(t,r);return Ln(n)?n:e}var mo=Kt?function(e){return null==e?[]:(e=Te(e),It(Kt(e),(function(t){return Je.call(e,t)})))}:bc,go=Kt?function(e){for(var t=[];e;)Nt(t,mo(e)),e=Ze(e);return t}:bc,bo=kn;function yo(e,t,r){for(var n=-1,i=(t=_i(t,e)).length,o=!1;++n<i;){var a=Uo(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ts(i)&&_o(a,i)&&(Ka(e)||qa(e))}function vo(e){return"function"!=typeof e.constructor||xo(e)?{}:Wr(Ze(e))}function wo(e){return Ka(e)||qa(e)||!!(rt&&e&&e[rt])}function _o(e,t){var r=typeof e;return!!(t=t??u)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Eo(e,t,r){if(!rs(r))return!1;var n=typeof t;return!!("number"==n?Ga(r)&&_o(t,r.length):"string"==n&&t in r)&&Wa(r[t],e)}function Co(e,t){if(Ka(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!us(e))||ee.test(e)||!X.test(e)||null!=t&&e in Te(t)}function $o(e){var t=co(e),r=Fr[t];if("function"!=typeof r||!(t in qr.prototype))return!1;if(e===r)return!0;var n=so(r);return!!n&&e===n[0]}(Sr&&bo(new Sr(new ArrayBuffer(1)))!=P||xr&&bo(new xr)!=C||kr&&bo(kr.resolve())!=x||Ar&&bo(new Ar)!=A||Tr&&bo(new Tr)!=R)&&(bo=function(t){var r=kn(t),n=r==S?t.constructor:e,i=n?jo(n):"";if(i)switch(i){case Pr:return P;case Nr:return C;case Or:return x;case Lr:return A;case Br:return R}return r});var So=Le?Xa:yc;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function ko(e){return e==e&&!rs(e)}function Ao(t,r){return function(n){return null!=n&&n[t]===r&&(r!==e||t in Te(n))}}function To(t,r,n){return r=vr(r===e?t.length-1:r,0),function(){for(var e=arguments,i=-1,o=vr(e.length-r,0),a=$e(o);++i<o;)a[i]=e[r+i];i=-1;for(var s=$e(r+1);++i<r;)s[i]=e[i];return s[r]=n(a),St(t,this,s)}}function Io(e,t){return t.length<2?e:Sn(e,oi(t,0,-1))}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Lo(ri),Po=bt||function(e,t){return ft.setTimeout(e,t)},No=Lo(ni);function Oo(e,t,r){var n=t+"";return No(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return kt(m,(function(r){var n="_."+r[0];t&r[1]&&!Rt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ce):[]}(n),r)))}function Lo(t){var r=0,n=0;return function(){var i=_r(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(e,arguments)}}function Bo(t,r){var n=-1,i=t.length,o=i-1;for(r=r===e?i:r;++n<r;){var a=Yn(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=r,t}var Do=function(e){var t=La(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,r,n,i){t.push(n?i.replace(de,"$1"):r||e)})),t}));function Uo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return Be.call(e)}catch{}try{return e+""}catch{}}return""}function Fo(e){if(e instanceof qr)return e.clone();var t=new Hr(e.__wrapped__,e.__chain__);return t.__actions__=Ri(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Wo=Qn((function(e,t){return Za(e)?fn(e,vn(t,1,Za,!0)):[]})),zo=Qn((function(t,r){var n=Qo(r);return Za(n)&&(n=e),Za(t)?fn(t,vn(r,1,Za,!0),uo(n,2)):[]})),Ho=Qn((function(t,r){var n=Qo(r);return Za(n)&&(n=e),Za(t)?fn(t,vn(r,1,Za,!0),e,n):[]}));function qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:gs(r);return i<0&&(i=vr(n+i,0)),jt(e,uo(t,3),i)}function Ko(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==e&&(o=gs(n),o=n<0?vr(i+o,0):wr(o,i-1)),jt(t,uo(r,3),o,!0)}function Vo(e){return null!=e&&e.length?vn(e,1):[]}function Go(t){return t&&t.length?t[0]:e}var Zo=Qn((function(e){var t=Pt(e,vi);return t.length&&t[0]===e[0]?Rn(t):[]})),Yo=Qn((function(t){var r=Qo(t),n=Pt(t,vi);return r===Qo(n)?r=e:n.pop(),n.length&&n[0]===t[0]?Rn(n,uo(r,2)):[]})),Jo=Qn((function(t){var r=Qo(t),n=Pt(t,vi);return(r="function"==typeof r?r:e)&&n.pop(),n.length&&n[0]===t[0]?Rn(n,e,r):[]}));function Qo(t){var r=null==t?0:t.length;return r?t[r-1]:e}var Xo=Qn(ea);function ea(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var ta=io((function(e,t){var r=null==e?0:e.length,n=cn(e,t);return Zn(e,Pt(t,(function(e){return _o(e,r)?+e:e})).sort(Ai)),n}));function ra(e){return null==e?e:$r.call(e)}var na=Qn((function(e){return hi(vn(e,1,Za,!0))})),ia=Qn((function(t){var r=Qo(t);return Za(r)&&(r=e),hi(vn(t,1,Za,!0),uo(r,2))})),oa=Qn((function(t){var r=Qo(t);return r="function"==typeof r?r:e,hi(vn(t,1,Za,!0),e,r)}));function aa(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Za(e))return t=vr(e.length,t),!0})),Zt(t,(function(t){return Pt(e,qt(t))}))}function sa(t,r){if(!t||!t.length)return[];var n=aa(t);return null==r?n:Pt(n,(function(t){return St(r,e,t)}))}var ca=Qn((function(e,t){return Za(e)?fn(e,t):[]})),la=Qn((function(e){return bi(It(e,Za))})),ua=Qn((function(t){var r=Qo(t);return Za(r)&&(r=e),bi(It(t,Za),uo(r,2))})),da=Qn((function(t){var r=Qo(t);return r="function"==typeof r?r:e,bi(It(t,Za),e,r)})),ha=Qn(aa),fa=Qn((function(t){var r=t.length,n=r>1?t[r-1]:e;return n="function"==typeof n?(t.pop(),n):e,sa(t,n)}));function pa(e){var t=Fr(e);return t.__chain__=!0,t}function ma(e,t){return t(e)}var ga=io((function(t){var r=t.length,n=r?t[0]:0,i=this.__wrapped__,o=function(e){return cn(e,t)};return!(r>1||this.__actions__.length)&&i instanceof qr&&_o(n)?((i=i.slice(n,+n+(r?1:0))).__actions__.push({func:ma,args:[o],thisArg:e}),new Hr(i,this.__chain__).thru((function(t){return r&&!t.length&&t.push(e),t}))):this.thru(o)})),ba=Pi((function(e,t,r){De.call(e,r)?++e[r]:sn(e,r,1)})),ya=ji(qo),va=ji(Ko);function wa(e,t){return(Ka(e)?kt:pn)(e,uo(t,3))}function _a(e,t){return(Ka(e)?At:mn)(e,uo(t,3))}var Ea=Pi((function(e,t,r){De.call(e,r)?e[r].push(t):sn(e,r,[t])})),Ca=Qn((function(e,t,r){var n=-1,i="function"==typeof t,o=Ga(e)?$e(e.length):[];return pn(e,(function(e){o[++n]=i?St(t,e,r):Mn(e,t,r)})),o})),$a=Pi((function(e,t,r){sn(e,r,t)}));function Sa(e,t){return(Ka(e)?Pt:Fn)(e,uo(t,3))}var xa=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ka=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Eo(e,t[0],t[1])?t=[]:r>2&&Eo(t[0],t[1],t[2])&&(t=[t[0]]),Kn(e,vn(t,1),[])})),Aa=mt||function(){return ft.Date.now()};function Ta(t,r,n){return r=n?e:r,r=t&&null==r?t.length:r,Xi(t,s,e,e,e,e,r)}function Ia(r,n){var i;if("function"!=typeof n)throw new Me(t);return r=gs(r),function(){return--r>0&&(i=n.apply(this,arguments)),r<=1&&(n=e),i}}var Ra=Qn((function(e,t,r){var n=1;if(r.length){var i=cr(r,lo(Ra));n|=o}return Xi(e,n,t,r,i)})),Ma=Qn((function(e,t,r){var n=3;if(r.length){var i=cr(r,lo(Ma));n|=o}return Xi(t,n,e,r,i)}));function Pa(r,n,i){var o,a,s,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof r)throw new Me(t);function m(t){var n=o,i=a;return o=a=e,d=t,c=r.apply(i,n)}function g(t){var r=t-u;return u===e||r>=n||r<0||f&&t-d>=s}function b(){var e=Aa();if(g(e))return y(e);l=Po(b,function(e){var t=n-(e-u);return f?wr(t,s-(e-d)):t}(e))}function y(t){return l=e,p&&o?m(t):(o=a=e,c)}function v(){var t=Aa(),r=g(t);if(o=arguments,a=this,u=t,r){if(l===e)return function(e){return d=e,l=Po(b,n),h?m(e):c}(u);if(f)return $i(l),l=Po(b,n),m(u)}return l===e&&(l=Po(b,n)),c}return n=ys(n)||0,rs(i)&&(h=!!i.leading,s=(f="maxWait"in i)?vr(ys(i.maxWait)||0,n):s,p="trailing"in i?!!i.trailing:p),v.cancel=function(){l!==e&&$i(l),d=0,o=u=a=l=e},v.flush=function(){return l===e?c:y(Aa())},v}var Na=Qn((function(e,t){return hn(e,1,t)})),Oa=Qn((function(e,t,r){return hn(e,ys(t)||0,r)}));function La(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new Me(t);var n=function(){var t=arguments,i=r?r.apply(this,t):t[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,t);return n.cache=o.set(i,a)||o,a};return n.cache=new(La.Cache||Gr),n}function Ba(e){if("function"!=typeof e)throw new Me(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Gr;var Da=Ei((function(e,t){var r=(t=1==t.length&&Ka(t[0])?Pt(t[0],Jt(uo())):Pt(vn(t,1),Jt(uo()))).length;return Qn((function(n){for(var i=-1,o=wr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Ua=Qn((function(t,r){var n=cr(r,lo(Ua));return Xi(t,o,e,r,n)})),ja=Qn((function(t,r){var n=cr(r,lo(ja));return Xi(t,a,e,r,n)})),Fa=io((function(t,r){return Xi(t,c,e,e,e,r)}));function Wa(e,t){return e===t||e!=e&&t!=t}var za=Gi(An),Ha=Gi((function(e,t){return e>=t})),qa=Pn(function(){return arguments}())?Pn:function(e){return ns(e)&&De.call(e,"callee")&&!Je.call(e,"callee")},Ka=$e.isArray,Va=vt?Jt(vt):function(e){return ns(e)&&kn(e)==M};function Ga(e){return null!=e&&ts(e.length)&&!Xa(e)}function Za(e){return ns(e)&&Ga(e)}var Ya=mr||yc,Ja=wt?Jt(wt):function(e){return ns(e)&&kn(e)==v};function Qa(e){if(!ns(e))return!1;var t=kn(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Xa(e){if(!rs(e))return!1;var t=kn(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==gs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var is=_t?Jt(_t):function(e){return ns(e)&&bo(e)==C};function os(e){return"number"==typeof e||ns(e)&&kn(e)==$}function as(e){if(!ns(e)||kn(e)!=S)return!1;var t=Ze(e);if(null===t)return!0;var r=De.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Be.call(r)==We}var ss=Et?Jt(Et):function(e){return ns(e)&&kn(e)==k},cs=Ct?Jt(Ct):function(e){return ns(e)&&bo(e)==A};function ls(e){return"string"==typeof e||!Ka(e)&&ns(e)&&kn(e)==T}function us(e){return"symbol"==typeof e||ns(e)&&kn(e)==I}var ds=$t?Jt($t):function(e){return ns(e)&&ts(e.length)&&!!at[kn(e)]},hs=Gi(jn),fs=Gi((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ga(e))return ls(e)?dr(e):Ri(e);if(ct&&e[ct])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[ct]());var t=bo(e);return(t==C?ar:t==A?lr:Ws)(e)}function ms(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gs(e){var t=ms(e),r=t%1;return t==t?r?t-r:t:0}function bs(e){return e?ln(gs(e),0,h):0}function ys(e){if("number"==typeof e)return e;if(us(e))return d;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var r=me.test(e);return r||be.test(e)?ut(e.slice(2),r?2:8):pe.test(e)?d:+e}function vs(e){return Mi(e,Ns(e))}function ws(e){return null==e?"":di(e)}var _s=Ni((function(e,t){if(xo(t)||Ga(t))Mi(t,Ps(t),e);else for(var r in t)De.call(t,r)&&rn(e,r,t[r])})),Es=Ni((function(e,t){Mi(t,Ns(t),e)})),Cs=Ni((function(e,t,r,n){Mi(t,Ns(t),e,n)})),$s=Ni((function(e,t,r,n){Mi(t,Ps(t),e,n)})),Ss=io(cn),xs=Qn((function(t,r){t=Te(t);var n=-1,i=r.length,o=i>2?r[2]:e;for(o&&Eo(r[0],r[1],o)&&(i=1);++n<i;)for(var a=r[n],s=Ns(a),c=-1,l=s.length;++c<l;){var u=s[c],d=t[u];(d===e||Wa(d,Oe[u])&&!De.call(t,u))&&(t[u]=a[u])}return t})),ks=Qn((function(t){return t.push(e,to),St(Ls,e,t)}));function As(t,r,n){var i=null==t?e:Sn(t,r);return i===e?n:i}function Ts(e,t){return null!=e&&yo(e,t,In)}var Is=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=r}),rc(oc)),Rs=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),De.call(e,t)?e[t].push(r):e[t]=[r]}),uo),Ms=Qn(Mn);function Ps(e){return Ga(e)?Jr(e):Dn(e)}function Ns(e){return Ga(e)?Jr(e,!0):Un(e)}var Os=Ni((function(e,t,r){Hn(e,t,r)})),Ls=Ni((function(e,t,r,n){Hn(e,t,r,n)})),Bs=io((function(e,t){var r={};if(null==e)return r;var n=!1;t=Pt(t,(function(t){return t=_i(t,e),n||(n=t.length>1),t})),Mi(e,ao(e),r),n&&(r=un(r,7,ro));for(var i=t.length;i--;)fi(r,t[i]);return r})),Ds=io((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Ts(e,r)}))}(e,t)}));function Us(e,t){if(null==e)return{};var r=Pt(ao(e),(function(e){return[e]}));return t=uo(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var js=Qi(Ps),Fs=Qi(Ns);function Ws(e){return null==e?[]:Qt(e,Ps(e))}var zs=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Hs(t):t)}));function Hs(e){return Qs(ws(e).toLowerCase())}function qs(e){return(e=ws(e))&&e.replace(ve,rr).replace(Xe,"")}var Ks=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Vs=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Gs=Bi("toLowerCase"),Zs=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ys=Di((function(e,t,r){return e+(r?" ":"")+Qs(t)})),Js=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qs=Bi("toUpperCase");function Xs(t,r,n){return t=ws(t),(r=n?e:r)===e?function(e){return nt.test(e)}(t)?function(e){return e.match(tt)||[]}(t):function(e){return e.match(le)||[]}(t):t.match(r)||[]}var ec=Qn((function(t,r){try{return St(t,e,r)}catch(n){return Qa(n)?n:new xe(n)}})),tc=io((function(e,t){return kt(t,(function(t){t=Uo(t),sn(e,t,Ra(e[t],e))})),e}));function rc(e){return function(){return e}}var nc=Fi(),ic=Fi(!0);function oc(e){return e}function ac(e){return Bn("function"==typeof e?e:un(e,1))}var sc=Qn((function(e,t){return function(r){return Mn(r,e,t)}})),cc=Qn((function(e,t){return function(r){return Mn(e,r,t)}}));function lc(e,t,r){var n=Ps(t),i=$n(t,n);null==r&&(!rs(t)||!i.length&&n.length)&&(r=t,t=e,e=this,i=$n(t,Ps(t)));var o=!(rs(r)&&"chain"in r&&!r.chain),a=Xa(e);return kt(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ri(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Nt([this.value()],arguments))})})),e}function uc(){}var dc=qi(Pt),hc=qi(Tt),fc=qi(Bt);function pc(e){return Co(e)?qt(Uo(e)):function(e){return function(t){return Sn(t,e)}}(e)}var mc=Vi(),gc=Vi(!0);function bc(){return[]}function yc(){return!1}var vc=Hi((function(e,t){return e+t}),0),wc=Yi("ceil"),_c=Hi((function(e,t){return e/t}),1),Ec=Yi("floor"),Cc=Hi((function(e,t){return e*t}),1),$c=Yi("round"),Sc=Hi((function(e,t){return e-t}),0);return Fr.after=function(e,r){if("function"!=typeof r)throw new Me(t);return e=gs(e),function(){if(--e<1)return r.apply(this,arguments)}},Fr.ary=Ta,Fr.assign=_s,Fr.assignIn=Es,Fr.assignInWith=Cs,Fr.assignWith=$s,Fr.at=Ss,Fr.before=Ia,Fr.bind=Ra,Fr.bindAll=tc,Fr.bindKey=Ma,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Fr.chain=pa,Fr.chunk=function(t,r,n){r=(n?Eo(t,r,n):r===e)?1:vr(gs(r),0);var i=null==t?0:t.length;if(!i||r<1)return[];for(var o=0,a=0,s=$e(yt(i/r));o<i;)s[a++]=oi(t,o,o+=r);return s},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=$e(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Nt(Ka(r)?Ri(r):[r],vn(t,1))},Fr.cond=function(e){var r=null==e?0:e.length,n=uo();return e=r?Pt(e,(function(e){if("function"!=typeof e[1])throw new Me(t);return[n(e[0]),e[1]]})):[],Qn((function(t){for(var n=-1;++n<r;){var i=e[n];if(St(i[0],this,t))return St(i[1],this,t)}}))},Fr.conforms=function(e){return function(e){var t=Ps(e);return function(r){return dn(r,e,t)}}(un(e,1))},Fr.constant=rc,Fr.countBy=ba,Fr.create=function(e,t){var r=Wr(e);return null==t?r:an(r,t)},Fr.curry=function t(r,n,i){var o=Xi(r,8,e,e,e,e,e,n=i?e:n);return o.placeholder=t.placeholder,o},Fr.curryRight=function t(r,n,o){var a=Xi(r,i,e,e,e,e,e,n=o?e:n);return a.placeholder=t.placeholder,a},Fr.debounce=Pa,Fr.defaults=xs,Fr.defaultsDeep=ks,Fr.defer=Na,Fr.delay=Oa,Fr.difference=Wo,Fr.differenceBy=zo,Fr.differenceWith=Ho,Fr.drop=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,(r=n||r===e?1:gs(r))<0?0:r,i):[]},Fr.dropRight=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,0,(r=i-(r=n||r===e?1:gs(r)))<0?0:r):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!0):[]},Fr.fill=function(t,r,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Eo(t,r,n)&&(n=0,i=o),function(t,r,n,i){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(i=i===e||i>o?o:gs(i))<0&&(i+=o),i=n>i?0:bs(i);n<i;)t[n++]=r;return t}(t,r,n,i)):[]},Fr.filter=function(e,t){return(Ka(e)?It:yn)(e,uo(t,3))},Fr.flatMap=function(e,t){return vn(Sa(e,t),1)},Fr.flatMapDeep=function(e,t){return vn(Sa(e,t),l)},Fr.flatMapDepth=function(t,r,n){return n=n===e?1:gs(n),vn(Sa(t,r),n)},Fr.flatten=Vo,Fr.flattenDeep=function(e){return null!=e&&e.length?vn(e,l):[]},Fr.flattenDepth=function(t,r){return null!=t&&t.length?vn(t,r=r===e?1:gs(r)):[]},Fr.flip=function(e){return Xi(e,512)},Fr.flow=nc,Fr.flowRight=ic,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Fr.functions=function(e){return null==e?[]:$n(e,Ps(e))},Fr.functionsIn=function(e){return null==e?[]:$n(e,Ns(e))},Fr.groupBy=Ea,Fr.initial=function(e){return null!=e&&e.length?oi(e,0,-1):[]},Fr.intersection=Zo,Fr.intersectionBy=Yo,Fr.intersectionWith=Jo,Fr.invert=Is,Fr.invertBy=Rs,Fr.invokeMap=Ca,Fr.iteratee=ac,Fr.keyBy=$a,Fr.keys=Ps,Fr.keysIn=Ns,Fr.map=Sa,Fr.mapKeys=function(e,t){var r={};return t=uo(t,3),En(e,(function(e,n,i){sn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=uo(t,3),En(e,(function(e,n,i){sn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Wn(un(e,1))},Fr.matchesProperty=function(e,t){return zn(e,un(t,1))},Fr.memoize=La,Fr.merge=Os,Fr.mergeWith=Ls,Fr.method=sc,Fr.methodOf=cc,Fr.mixin=lc,Fr.negate=Ba,Fr.nthArg=function(e){return e=gs(e),Qn((function(t){return qn(t,e)}))},Fr.omit=Bs,Fr.omitBy=function(e,t){return Us(e,Ba(uo(t)))},Fr.once=function(e){return Ia(2,e)},Fr.orderBy=function(t,r,n,i){return null==t?[]:(Ka(r)||(r=null==r?[]:[r]),Ka(n=i?e:n)||(n=null==n?[]:[n]),Kn(t,r,n))},Fr.over=dc,Fr.overArgs=Da,Fr.overEvery=hc,Fr.overSome=fc,Fr.partial=Ua,Fr.partialRight=ja,Fr.partition=xa,Fr.pick=Ds,Fr.pickBy=Us,Fr.property=pc,Fr.propertyOf=function(t){return function(r){return null==t?e:Sn(t,r)}},Fr.pull=Xo,Fr.pullAll=ea,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Gn(e,t,uo(r,2)):e},Fr.pullAllWith=function(t,r,n){return t&&t.length&&r&&r.length?Gn(t,r,e,n):t},Fr.pullAt=ta,Fr.range=mc,Fr.rangeRight=gc,Fr.rearg=Fa,Fr.reject=function(e,t){return(Ka(e)?It:yn)(e,Ba(uo(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=uo(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Zn(e,i),r},Fr.rest=function(r,n){if("function"!=typeof r)throw new Me(t);return Qn(r,n=n===e?n:gs(n))},Fr.reverse=ra,Fr.sampleSize=function(t,r,n){return r=(n?Eo(t,r,n):r===e)?1:gs(r),(Ka(t)?Xr:ei)(t,r)},Fr.set=function(e,t,r){return null==e?e:ti(e,t,r)},Fr.setWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:ti(t,r,n,i)},Fr.shuffle=function(e){return(Ka(e)?en:ii)(e)},Fr.slice=function(t,r,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Eo(t,r,n)?(r=0,n=i):(r=null==r?0:gs(r),n=n===e?i:gs(n)),oi(t,r,n)):[]},Fr.sortBy=ka,Fr.sortedUniq=function(e){return e&&e.length?li(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Fr.split=function(t,r,n){return n&&"number"!=typeof n&&Eo(t,r,n)&&(r=n=e),(n=n===e?h:n>>>0)?(t=ws(t))&&("string"==typeof r||null!=r&&!ss(r))&&!(r=di(r))&&or(t)?Ci(dr(t),0,n):t.split(r,n):[]},Fr.spread=function(e,r){if("function"!=typeof e)throw new Me(t);return r=null==r?0:vr(gs(r),0),Qn((function(t){var n=t[r],i=Ci(t,0,r);return n&&Nt(i,n),St(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Fr.take=function(t,r,n){return t&&t.length?oi(t,0,(r=n||r===e?1:gs(r))<0?0:r):[]},Fr.takeRight=function(t,r,n){var i=null==t?0:t.length;return i?oi(t,(r=i-(r=n||r===e?1:gs(r)))<0?0:r,i):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?mi(e,uo(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?mi(e,uo(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,r,n){var i=!0,o=!0;if("function"!=typeof e)throw new Me(t);return rs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Pa(e,r,{leading:i,maxWait:r,trailing:o})},Fr.thru=ma,Fr.toArray=ps,Fr.toPairs=js,Fr.toPairsIn=Fs,Fr.toPath=function(e){return Ka(e)?Pt(e,Uo):us(e)?[e]:Ri(Do(ws(e)))},Fr.toPlainObject=vs,Fr.transform=function(e,t,r){var n=Ka(e),i=n||Ya(e)||ds(e);if(t=uo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:rs(e)&&Xa(o)?Wr(Ze(e)):{}}return(i?kt:En)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Ta(e,1)},Fr.union=na,Fr.unionBy=ia,Fr.unionWith=oa,Fr.uniq=function(e){return e&&e.length?hi(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?hi(e,uo(t,2)):[]},Fr.uniqWith=function(t,r){return r="function"==typeof r?r:e,t&&t.length?hi(t,e,r):[]},Fr.unset=function(e,t){return null==e||fi(e,t)},Fr.unzip=aa,Fr.unzipWith=sa,Fr.update=function(e,t,r){return null==e?e:pi(e,t,wi(r))},Fr.updateWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:pi(t,r,wi(n),i)},Fr.values=Ws,Fr.valuesIn=function(e){return null==e?[]:Qt(e,Ns(e))},Fr.without=ca,Fr.words=Xs,Fr.wrap=function(e,t){return Ua(wi(t),e)},Fr.xor=la,Fr.xorBy=ua,Fr.xorWith=da,Fr.zip=ha,Fr.zipObject=function(e,t){return yi(e||[],t||[],rn)},Fr.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},Fr.zipWith=fa,Fr.entries=js,Fr.entriesIn=Fs,Fr.extend=Es,Fr.extendWith=Cs,lc(Fr,Fr),Fr.add=vc,Fr.attempt=ec,Fr.camelCase=zs,Fr.capitalize=Hs,Fr.ceil=wc,Fr.clamp=function(t,r,n){return n===e&&(n=r,r=e),n!==e&&(n=(n=ys(n))==n?n:0),r!==e&&(r=(r=ys(r))==r?r:0),ln(ys(t),r,n)},Fr.clone=function(e){return un(e,4)},Fr.cloneDeep=function(e){return un(e,5)},Fr.cloneDeepWith=function(t,r){return un(t,5,r="function"==typeof r?r:e)},Fr.cloneWith=function(t,r){return un(t,4,r="function"==typeof r?r:e)},Fr.conformsTo=function(e,t){return null==t||dn(e,t,Ps(t))},Fr.deburr=qs,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=_c,Fr.endsWith=function(t,r,n){t=ws(t),r=di(r);var i=t.length,o=n=n===e?i:ln(gs(n),0,i);return(n-=r.length)>=0&&t.slice(n,o)==r},Fr.eq=Wa,Fr.escape=function(e){return(e=ws(e))&&Z.test(e)?e.replace(V,nr):e},Fr.escapeRegExp=function(e){return(e=ws(e))&&ne.test(e)?e.replace(re,"\\$&"):e},Fr.every=function(t,r,n){var i=Ka(t)?Tt:gn;return n&&Eo(t,r,n)&&(r=e),i(t,uo(r,3))},Fr.find=ya,Fr.findIndex=qo,Fr.findKey=function(e,t){return Ut(e,uo(t,3),En)},Fr.findLast=va,Fr.findLastIndex=Ko,Fr.findLastKey=function(e,t){return Ut(e,uo(t,3),Cn)},Fr.floor=Ec,Fr.forEach=wa,Fr.forEachRight=_a,Fr.forIn=function(e,t){return null==e?e:wn(e,uo(t,3),Ns)},Fr.forInRight=function(e,t){return null==e?e:_n(e,uo(t,3),Ns)},Fr.forOwn=function(e,t){return e&&En(e,uo(t,3))},Fr.forOwnRight=function(e,t){return e&&Cn(e,uo(t,3))},Fr.get=As,Fr.gt=za,Fr.gte=Ha,Fr.has=function(e,t){return null!=e&&yo(e,t,Tn)},Fr.hasIn=Ts,Fr.head=Go,Fr.identity=oc,Fr.includes=function(e,t,r,n){e=Ga(e)?e:Ws(e),r=r&&!n?gs(r):0;var i=e.length;return r<0&&(r=vr(i+r,0)),ls(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Ft(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:gs(r);return i<0&&(i=vr(n+i,0)),Ft(e,t,i)},Fr.inRange=function(t,r,n){return r=ms(r),n===e?(n=r,r=0):n=ms(n),function(e,t,r){return e>=wr(t,r)&&e<vr(t,r)}(t=ys(t),r,n)},Fr.invoke=Ms,Fr.isArguments=qa,Fr.isArray=Ka,Fr.isArrayBuffer=Va,Fr.isArrayLike=Ga,Fr.isArrayLikeObject=Za,Fr.isBoolean=function(e){return!0===e||!1===e||ns(e)&&kn(e)==y},Fr.isBuffer=Ya,Fr.isDate=Ja,Fr.isElement=function(e){return ns(e)&&1===e.nodeType&&!as(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ds(e)||qa(e)))return!e.length;var t=bo(e);if(t==C||t==A)return!e.size;if(xo(e))return!Dn(e).length;for(var r in e)if(De.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Nn(e,t)},Fr.isEqualWith=function(t,r,n){var i=(n="function"==typeof n?n:e)?n(t,r):e;return i===e?Nn(t,r,e,n):!!i},Fr.isError=Qa,Fr.isFinite=function(e){return"number"==typeof e&&gr(e)},Fr.isFunction=Xa,Fr.isInteger=es,Fr.isLength=ts,Fr.isMap=is,Fr.isMatch=function(e,t){return e===t||On(e,t,fo(t))},Fr.isMatchWith=function(t,r,n){return n="function"==typeof n?n:e,On(t,r,fo(r),n)},Fr.isNaN=function(e){return os(e)&&e!=+e},Fr.isNative=function(e){if(So(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=os,Fr.isObject=rs,Fr.isObjectLike=ns,Fr.isPlainObject=as,Fr.isRegExp=ss,Fr.isSafeInteger=function(e){return es(e)&&e>=-u&&e<=u},Fr.isSet=cs,Fr.isString=ls,Fr.isSymbol=us,Fr.isTypedArray=ds,Fr.isUndefined=function(t){return t===e},Fr.isWeakMap=function(e){return ns(e)&&bo(e)==R},Fr.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==kn(e)},Fr.join=function(e,t){return null==e?"":br.call(e,t)},Fr.kebabCase=Ks,Fr.last=Qo,Fr.lastIndexOf=function(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==e&&(o=(o=gs(n))<0?vr(i+o,0):wr(o,i-1)),r==r?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(t,r,o):jt(t,zt,o,!0)},Fr.lowerCase=Vs,Fr.lowerFirst=Gs,Fr.lt=hs,Fr.lte=fs,Fr.max=function(t){return t&&t.length?bn(t,oc,An):e},Fr.maxBy=function(t,r){return t&&t.length?bn(t,uo(r,2),An):e},Fr.mean=function(e){return Ht(e,oc)},Fr.meanBy=function(e,t){return Ht(e,uo(t,2))},Fr.min=function(t){return t&&t.length?bn(t,oc,jn):e},Fr.minBy=function(t,r){return t&&t.length?bn(t,uo(r,2),jn):e},Fr.stubArray=bc,Fr.stubFalse=yc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Cc,Fr.nth=function(t,r){return t&&t.length?qn(t,gs(r)):e},Fr.noConflict=function(){return ft._===this&&(ft._=ze),this},Fr.noop=uc,Fr.now=Aa,Fr.pad=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ki(Dt(i),r)+e+Ki(yt(i),r)},Fr.padEnd=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;return t&&n<t?e+Ki(t-n,r):e},Fr.padStart=function(e,t,r){e=ws(e);var n=(t=gs(t))?ur(e):0;return t&&n<t?Ki(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Er(ws(e).replace(ie,""),t||0)},Fr.random=function(t,r,n){if(n&&"boolean"!=typeof n&&Eo(t,r,n)&&(r=n=e),n===e&&("boolean"==typeof r?(n=r,r=e):"boolean"==typeof t&&(n=t,t=e)),t===e&&r===e?(t=0,r=1):(t=ms(t),r===e?(r=t,t=0):r=ms(r)),t>r){var i=t;t=r,r=i}if(n||t%1||r%1){var o=Cr();return wr(t+o*(r-t+lt("1e-"+((o+"").length-1))),r)}return Yn(t,r)},Fr.reduce=function(e,t,r){var n=Ka(e)?Ot:Vt,i=arguments.length<3;return n(e,uo(t,4),r,i,pn)},Fr.reduceRight=function(e,t,r){var n=Ka(e)?Lt:Vt,i=arguments.length<3;return n(e,uo(t,4),r,i,mn)},Fr.repeat=function(t,r,n){return r=(n?Eo(t,r,n):r===e)?1:gs(r),Jn(ws(t),r)},Fr.replace=function(){var e=arguments,t=ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(t,r,n){var i=-1,o=(r=_i(r,t)).length;for(o||(o=1,t=e);++i<o;){var a=null==t?e:t[Uo(r[i])];a===e&&(i=o,a=n),t=Xa(a)?a.call(t):a}return t},Fr.round=$c,Fr.runInContext=oe,Fr.sample=function(e){return(Ka(e)?Qr:Xn)(e)},Fr.size=function(e){if(null==e)return 0;if(Ga(e))return ls(e)?ur(e):e.length;var t=bo(e);return t==C||t==A?e.size:Dn(e).length},Fr.snakeCase=Zs,Fr.some=function(t,r,n){var i=Ka(t)?Bt:ai;return n&&Eo(t,r,n)&&(r=e),i(t,uo(r,3))},Fr.sortedIndex=function(e,t){return si(e,t)},Fr.sortedIndexBy=function(e,t,r){return ci(e,t,uo(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=si(e,t);if(n<r&&Wa(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return si(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ci(e,t,uo(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=si(e,t,!0)-1;if(Wa(e[r],t))return r}return-1},Fr.startCase=Ys,Fr.startsWith=function(e,t,r){return e=ws(e),r=null==r?0:ln(gs(r),0,e.length),t=di(t),e.slice(r,r+t.length)==t},Fr.subtract=Sc,Fr.sum=function(e){return e&&e.length?Gt(e,oc):0},Fr.sumBy=function(e,t){return e&&e.length?Gt(e,uo(t,2)):0},Fr.template=function(t,r,n){var i=Fr.templateSettings;n&&Eo(t,r,n)&&(r=e),t=ws(t),r=Cs({},r,i,eo);var o,a,s=Cs({},r.imports,i.imports,eo),c=Ps(s),l=Qt(s,c),u=0,d=r.interpolate||we,h="__p += '",f=Ie((r.escape||we).source+"|"+d.source+"|"+(d===Q?he:we).source+"|"+(r.evaluate||we).source+"|$","g"),p="//# sourceURL="+(De.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";t.replace(f,(function(e,r,n,i,s,c){return n||(n=i),h+=t.slice(u,c).replace(_e,ir),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+e.length,e})),h+="';\n";var m=De.call(r,"variable")&&r.variable;if(m){if(ue.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(z,""):h).replace(H,"$1").replace(q,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=ec((function(){return ke(c,p+"return "+h).apply(e,l)}));if(g.source=h,Qa(g))throw g;return g},Fr.times=function(e,t){if((e=gs(e))<1||e>u)return[];var r=h,n=wr(e,h);t=uo(t),e-=h;for(var i=Zt(n,t);++r<e;)t(r);return i},Fr.toFinite=ms,Fr.toInteger=gs,Fr.toLength=bs,Fr.toLower=function(e){return ws(e).toLowerCase()},Fr.toNumber=ys,Fr.toSafeInteger=function(e){return e?ln(gs(e),-u,u):0===e?e:0},Fr.toString=ws,Fr.toUpper=function(e){return ws(e).toUpperCase()},Fr.trim=function(t,r,n){if((t=ws(t))&&(n||r===e))return Yt(t);if(!t||!(r=di(r)))return t;var i=dr(t),o=dr(r);return Ci(i,er(i,o),tr(i,o)+1).join("")},Fr.trimEnd=function(t,r,n){if((t=ws(t))&&(n||r===e))return t.slice(0,hr(t)+1);if(!t||!(r=di(r)))return t;var i=dr(t);return Ci(i,0,tr(i,dr(r))+1).join("")},Fr.trimStart=function(t,r,n){if((t=ws(t))&&(n||r===e))return t.replace(ie,"");if(!t||!(r=di(r)))return t;var i=dr(t);return Ci(i,er(i,dr(r))).join("")},Fr.truncate=function(t,r){var n=30,i="...";if(rs(r)){var o="separator"in r?r.separator:o;n="length"in r?gs(r.length):n,i="omission"in r?di(r.omission):i}var a=(t=ws(t)).length;if(or(t)){var s=dr(t);a=s.length}if(n>=a)return t;var c=n-ur(i);if(c<1)return i;var l=s?Ci(s,0,c).join(""):t.slice(0,c);if(o===e)return l+i;if(s&&(c+=l.length-c),ss(o)){if(t.slice(c).search(o)){var u,d=l;for(o.global||(o=Ie(o.source,ws(fe.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;l=l.slice(0,h===e?c:h)}}else if(t.indexOf(di(o),c)!=c){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+i},Fr.unescape=function(e){return(e=ws(e))&&G.test(e)?e.replace(K,fr):e},Fr.uniqueId=function(e){var t=++Ue;return ws(e)+t},Fr.upperCase=Js,Fr.upperFirst=Qs,Fr.each=wa,Fr.eachRight=_a,Fr.first=Go,lc(Fr,function(){var e={};return En(Fr,(function(t,r){De.call(Fr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Fr.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),kt(["drop","take"],(function(t,r){qr.prototype[t]=function(n){n=n===e?1:vr(gs(n),0);var i=this.__filtered__&&!r?new qr(this):this.clone();return i.__filtered__?i.__takeCount__=wr(n,i.__takeCount__):i.__views__.push({size:wr(n,h),type:t+(i.__dir__<0?"Right":"")}),i},qr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),kt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;qr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),kt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");qr.prototype[e]=function(){return this[r](1).value()[0]}})),kt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");qr.prototype[e]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(oc)},qr.prototype.find=function(e){return this.filter(e).head()},qr.prototype.findLast=function(e){return this.reverse().find(e)},qr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new qr(this):this.map((function(r){return Mn(r,e,t)}))})),qr.prototype.reject=function(e){return this.filter(Ba(uo(e)))},qr.prototype.slice=function(t,r){t=gs(t);var n=this;return n.__filtered__&&(t>0||r<0)?new qr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==e&&(n=(r=gs(r))<0?n.dropRight(-r):n.take(r-t)),n)},qr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qr.prototype.toArray=function(){return this.take(h)},En(qr.prototype,(function(t,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=Fr[i?"take"+("last"==r?"Right":""):r],a=i||/^find/.test(r);o&&(Fr.prototype[r]=function(){var r=this.__wrapped__,s=i?[1]:arguments,c=r instanceof qr,l=s[0],u=c||Ka(r),d=function(e){var t=o.apply(Fr,Nt([e],s));return i&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=c&&!f;if(!a&&u){r=m?r:new qr(this);var g=t.apply(r,s);return g.__actions__.push({func:ma,args:[d],thisArg:e}),new Hr(g,h)}return p&&m?t.apply(this,s):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})})),kt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[r]((function(r){return t.apply(Ka(r)?r:[],e)}))}})),En(qr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";De.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Wi(e,2).name]=[{name:"wrapper",func:e}],qr.prototype.clone=function(){var e=new qr(this.__wrapped__);return e.__actions__=Ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ri(this.__views__),e},qr.prototype.reverse=function(){if(this.__filtered__){var e=new qr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ka(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wr(t,e+a);break;case"takeRight":e=vr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=n?s:a-1,u=this.__iteratees__,d=u.length,h=0,f=wr(c,this.__takeCount__);if(!r||!n&&i==c&&f==c)return gi(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var m=-1,g=e[l+=t];++m<d;){var b=u[m],y=b.iteratee,v=b.type,w=y(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[h++]=g}return p},Fr.prototype.at=ga,Fr.prototype.chain=function(){return pa(this)},Fr.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===e&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Fr.prototype.plant=function(t){for(var r,n=this;n instanceof zr;){var i=Fo(n);i.__index__=0,i.__values__=e,r?o.__wrapped__=i:r=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,r},Fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qr){var r=t;return this.__actions__.length&&(r=new qr(this)),(r=r.reverse()).__actions__.push({func:ma,args:[ra],thisArg:e}),new Hr(r,this.__chain__)}return this.thru(ra)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,ct&&(Fr.prototype[ct]=function(){return this}),Fr}();mt?((mt.exports=pr)._=pr,pt._=pr):ft._=pr}.call(_n);var Vg=Object.defineProperty,kg=Object.defineProperties,jg=Object.getOwnPropertyDescriptors,Ra=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,ev=Object.prototype.propertyIsEnumerable,ba=(e,t,r)=>t in e?Vg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lr=(e,t)=>{for(var r in t||(t={}))tv.call(t,r)&&ba(e,r,t[r]);if(Ra)for(var r of Ra(t))ev.call(t,r)&&ba(e,r,t[r]);return e},nv=(e,t)=>kg(e,jg(t));function Lt(e,t,r){var n;const i=An(e);return(null==(n=t.rpcMap)?void 0:n[i.reference])||`${Oa}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Ae(e){return e.includes(":")?e.split(":")[1]:e}function Ta(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function rv(e,t){const r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];const n=[];return r.forEach((e=>{const r=t.namespaces[e].accounts;n.push(...r)})),n}function Fi(e={},t={}){const r=La(e),n=La(t);return qi.exports.merge(r,n)}function La(e){var t,r,n,i;const o={};if(!Xr$1(e))return o;for(const[a,s]of Object.entries(e)){const e=on$3(a)?[a]:s.chains,c=s.methods||[],l=s.events||[],u=s.rpcMap||{},d=xo(a);o[d]=nv(lr(lr({},o[d]),s),{chains:me$1(e,null==(t=o[d])?void 0:t.chains),methods:me$1(c,null==(r=o[d])?void 0:r.methods),events:me$1(l,null==(n=o[d])?void 0:n.events),rpcMap:lr(lr({},u),null==(i=o[d])?void 0:i.rpcMap)})}return o}function iv(e){return e.includes(":")?e.split(":")[2]:e}function Ha(e){const t={};for(const[r,n]of Object.entries(e)){const e=n.methods||[],i=n.events||[],o=n.accounts||[],a=on$3(r)?[r]:n.chains?n.chains:Ta(n.accounts);t[r]={chains:a,methods:e,events:i,accounts:o}}return t}function Wi(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):(e=e.includes(":")?e.split(":")[1]:e,isNaN(Number(e))?e:Number(e))}const Da={},F$2=e=>Da[e],Mi=(e,t)=>{Da[e]=t};class sv{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}var uv=Object.defineProperty,av=Object.defineProperties,ov=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,fv=Object.prototype.propertyIsEnumerable,$a=(e,t,r)=>t in e?uv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ua=(e,t)=>{for(var r in t||(t={}))cv.call(t,r)&&$a(e,r,t[r]);if(Na)for(var r of Na(t))fv.call(t,r)&&$a(e,r,t[r]);return e},qa=(e,t)=>av(e,ov(t));class hv{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Tt.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 r=t||Lt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=parseInt(Ae(t));e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.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,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const i=parseInt(n,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,r,n;const i=null==(r=null==(t=e.request)?void 0:t.params)?void 0:r[0];if(!i)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const o=this.client.session.get(e.topic),a=(null==(n=null==o?void 0:o.sessionProperties)?void 0:n.capabilities)||{};if(null!=a&&a[i])return null==a?void 0:a[i];const s=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:qa(Ua({},o.sessionProperties||{}),{capabilities:qa(Ua({},a||{}),{[i]:s})})})}catch(c){console.warn("Failed to update session with capabilities",c)}return s}async getCallStatus(e){var t,r;const n=this.client.session.get(e.topic),i=null==(t=n.sessionProperties)?void 0:t.bundler_name;if(i){const t=this.getBundlerUrl(e.chainId,i);try{return await this.getUserOperationReceipt(t,e)}catch(a){console.warn("Failed to fetch call status from bundler",a,t)}}const o=null==(r=n.sessionProperties)?void 0:r.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(s){console.warn("Failed to fetch call status from custom bundler",s,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var r;const n=new URL(e),i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(formatJsonRpcRequest("eth_getUserOperationReceipt",[null==(r=t.request.params)?void 0:r[0]]))});if(!i.ok)throw new Error(`Failed to fetch user operation receipt - ${i.status}`);return await i.json()}getBundlerUrl(e,t){return`${Qg}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}}class lv{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class pv{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class dv{constructor(e){this.name="algorand",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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){if(!this.httpProviders[e]){const r=t||Lt(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new o$8(new f$4(r,F$2("disableProviderPing")))}}class gv{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const r=this.getCardanoRPCUrl(t),n=Ae(t);e[n]=this.createHttpProvider(n,r)})),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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class vv{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class _v{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=Ae(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}class mv{constructor(e){this.name="near",this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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 r=t||Lt(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Tt.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace);return typeof r>"u"?void 0:new o$8(new f$4(r,F$2("disableProviderPing")))}}class wv{constructor(e){this.name=ze,this.namespace=e.namespace,this.events=F$2("events"),this.client=F$2("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(Tt.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((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){var e,t;const r={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach((e=>{const t=An(e);r[`${t.namespace}:${t.reference}`]=this.createHttpProvider(e)})),r}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 r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Lt(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new o$8(new f$4(r,F$2("disableProviderPing")))}}var Pv=Object.defineProperty,Cv=Object.defineProperties,Av=Object.getOwnPropertyDescriptors,Fa=Object.getOwnPropertySymbols,Iv=Object.prototype.hasOwnProperty,xv=Object.prototype.propertyIsEnumerable,Wa=(e,t,r)=>t in e?Pv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pr=(e,t)=>{for(var r in t||(t={}))Iv.call(t,r)&&Wa(e,r,t[r]);if(Fa)for(var r of Fa(t))xv.call(t,r)&&Wa(e,r,t[r]);return e},Bi=(e,t)=>Cv(e,Av(t));class dr{constructor(e){this.events=new Jg,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(null==e?void 0:e.logger)<"u"&&"string"!=typeof(null==e?void 0:e.logger)?e.logger:Mg(k$5({level:(null==e?void 0:e.logger)||ya})),this.disableProviderPing=(null==e?void 0:e.disableProviderPing)||!1}static async init(e){const t=new dr(e);return await t.initialize(),t}async request(e,t,r){const[n,i]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:pr({},e),chainId:`${n}:${i}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,n){const i=(new Date).getTime();this.request(e,r,n).then((e=>t(null,formatJsonRpcResult(i,e)))).catch((e=>t(e,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:null==(e=this.session)?void 0:e.topic,reason:er$1("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,t){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:r,response:n}=await this.client.authenticate(e,t);r&&(this.uri=r,this.events.emit("display_uri",r));const i=await n();if(this.session=i.session,this.session){const e=Ha(this.session.namespaces);this.namespaces=Fi(this.namespaces,e),this.persist("namespaces",this.namespaces),this.onConnect()}return i}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:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then((e=>{this.session=e;const t=Ha(e.namespaces);this.namespaces=Fi(this.namespaces,t),this.persist("namespaces",this.namespaces)})).catch((e=>{if(e.message!==it)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[r,n]=this.validateChain(e),i=this.getProvider(r);i.name===ze?i.setDefaultChain(`${r}:${n}`,t):i.setDefaultChain(n,t)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(Nr$1(t)){for(const r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.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 _e.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ya,relayUrl:this.providerOpts.relayUrl||Yg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.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((e=>xo(e))))];Mi("client",this.client),Mi("events",this.events),Mi("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=rv(e,this.session),r=Ta(t),n=Fi(this.namespaces,this.optionalNamespaces),i=Bi(pr({},n[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new hv({namespace:i});break;case"algorand":this.rpcProviders[e]=new dv({namespace:i});break;case"solana":this.rpcProviders[e]=new lv({namespace:i});break;case"cosmos":this.rpcProviders[e]=new pv({namespace:i});break;case"polkadot":this.rpcProviders[e]=new sv({namespace:i});break;case"cip34":this.rpcProviders[e]=new gv({namespace:i});break;case"elrond":this.rpcProviders[e]=new vv({namespace:i});break;case"multiversx":this.rpcProviders[e]=new _v({namespace:i});break;case"near":this.rpcProviders[e]=new mv({namespace:i});break;default:this.rpcProviders[ze]?this.rpcProviders[ze].updateNamespace(i):this.rpcProviders[ze]=new wv({namespace:i})}}))}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:r}=t;if("accountsChanged"===r.name){const e=r.data;e&&Nr$1(e)&&this.events.emit("accountsChanged",e.map(iv))}else if("chainChanged"===r.name){const e=t.chainId,r=t.event.data,n=xo(e),i=Wi(e)!==Wi(r)?`${n}:${Wi(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;const{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=Bi(pr({},i),{namespaces:n}),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",Bi(pr({},er$1("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Tt.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[ze]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){const[t,r]=(null==e?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map((e=>xo(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];const n=xo(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[r,n]=this.validateChain(e);n&&(t||this.getProvider(r).setDefaultChain(n),this.namespaces[r]?this.namespaces[r].defaultChain=n:this.namespaces[`${r}:${n}`]?this.namespaces[`${r}:${n}`].defaultChain=n:this.namespaces[`${r}:${n}`]={defaultChain:n},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",n))}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(`${Sa}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Sa}/${e}`)}}const Ev=dr,WcHelpersUtil={getMethodsByChainNamespace(e){switch(e){case"solana":return["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"];case"eip155":return["personal_sign","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendRawTransaction","eth_sendTransaction","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus","wallet_getCallsStatus","wallet_grantPermissions","wallet_revokePermissions","wallet_switchEthereumChain"];default:return[]}},createNamespaces(e){return e.reduce(((e,t)=>{const{id:r,chainNamespace:n,rpcUrls:i}=t,o=i.default.http[0],a=this.getMethodsByChainNamespace(n);e[n]||(e[n]={methods:a,events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}});const s=`${n}:${r}`,c=e[n];return c.chains.push(s),(null==c?void 0:c.rpcMap)&&o&&(c.rpcMap[r]=o),e}),{})},getChainsFromNamespaces:(e={})=>Object.values(e).flatMap((e=>{const t=e.chains||[],r=e.accounts.map((e=>{const[t,r]=e.split(":");return`${t}:${r}`}));return Array.from(new Set([...t,...r]))}))},state$a=proxy({providers:{eip155:void 0,solana:void 0,polkadot:void 0},providerIds:{eip155:void 0,solana:void 0,polkadot:void 0}}),ProviderUtil={state:state$a,subscribeKey:(e,t)=>subscribeKey(state$a,e,t),subscribeProviders:e=>subscribe(state$a.providers,(()=>e(state$a.providers))),setProvider(e,t){t&&(state$a.providers[e]=ref$1(t))},getProvider:e=>state$a.providers[e],setProviderId(e,t){t&&(state$a.providerIds[e]=t)},getProviderId:e=>state$a.providerIds[e],reset(){state$a.providers={eip155:void 0,solana:void 0,polkadot:void 0},state$a.providerIds={eip155:void 0,solana:void 0,polkadot:void 0}},resetChain(e){state$a.providers[e]=void 0,state$a.providerIds[e]=void 0}},OPTIONAL_METHODS$1=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions"];class UniversalAdapterClient{constructor(e){this.appKit=void 0,this.isUniversalAdapterClient=!0,this.options=void 0,this.adapterType="universal",this.reportErrors=!0;const{siweConfig:t,metadata:r}=e;this.caipNetworks=e.networks,this.chainNamespace=ConstantsUtil$3.CHAIN.EVM,this.metadata=r,this.networkControllerClient={switchCaipNetwork:e=>{e&&this.switchNetwork(e)},getApprovedCaipNetworksData:async()=>{var e;const t=await this.getWalletConnectProvider();if(!t)return Promise.resolve({supportsAllNetworks:!1,approvedCaipNetworkIds:[]});const r=WcHelpersUtil.getChainsFromNamespaces(null==(e=t.session)?void 0:e.namespaces);return Promise.resolve({supportsAllNetworks:!1,approvedCaipNetworkIds:r})}},this.connectionControllerClient={connectWalletConnect:async e=>{var r,n,i,o,a,s,c,l,u,d,h;const f=await this.getWalletConnectProvider();if(!f)throw new Error("connectionControllerClient:getWalletConnectUri - provider is undefined");if(f.on("display_uri",(t=>{e(t)})),ChainController.state.activeChain&&"wagmi"===(null==(i=null==(n=null==(r=ChainController.state)?void 0:r.chains)?void 0:n.get(ChainController.state.activeChain))?void 0:i.adapterType)){const t=ChainController.state.chains.get(ChainController.state.activeChain);await(null==(a=null==(o=null==t?void 0:t.connectionControllerClient)?void 0:o.connectWalletConnect)?void 0:a.call(o,e)),this.setWalletConnectProvider()}else{const e=await(null==(s=null==t?void 0:t.getMessageParams)?void 0:s.call(t)),r=null==(c=null==t?void 0:t.options)?void 0:c.enabled,n="function"==typeof(null==f?void 0:f.authenticate),i=e&&Object.keys(e||{}).length>0;if(t&&r&&e&&n&&i&&ChainController.state.activeChain===ConstantsUtil$3.CHAIN.EVM){const{SIWEController:r,getDidChainId:n,getDidAddress:i}=await Promise.resolve().then((()=>index$8)),o=null==(l=this.caipNetworks)?void 0:l.filter((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)).map((e=>e.caipNetworkId));e.chains=null==(u=this.caipNetworks)?void 0:u.filter((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)).map((e=>e.id));const a=await f.authenticate({nonce:await(null==(d=null==t?void 0:t.getNonce)?void 0:d.call(t)),methods:[...OPTIONAL_METHODS$1],...e,chains:o}),s=null==(h=null==a?void 0:a.auths)?void 0:h[0];if(s){const{p:e,s:t}=s,o=n(e.iss),a=i(e.iss);a&&o&&r.setSession({address:a,chainId:parseInt(o,10)});try{const n=f.client.formatAuthMessage({request:e,iss:e.iss});await r.verifyMessage({message:n,signature:t.s,cacao:s})}catch(p){throw console.error("Error verifying message",p),await f.disconnect().catch(console.error),await r.signOut().catch(console.error),p}}}else{const e=WcHelpersUtil.createNamespaces(this.caipNetworks);await f.connect({optionalNamespaces:e})}this.setWalletConnectProvider()}},disconnect:async()=>{var e,r,n,i;if(SafeLocalStorage.removeItem(SafeLocalStorageKeys.WALLET_ID),null==(e=null==t?void 0:t.options)?void 0:e.signOutOnDisconnect){const{SIWEController:e}=await Promise.resolve().then((()=>index$8));await e.signOut()}await(null==(r=this.walletConnectProvider)?void 0:r.disconnect()),null==(n=this.appKit)||n.resetAccount(ConstantsUtil$3.CHAIN.EVM),null==(i=this.appKit)||i.resetAccount(ConstantsUtil$3.CHAIN.SOLANA)},signMessage:async e=>{const t=await this.getWalletConnectProvider(),r=ChainController.state.activeCaipAddress,n=CoreHelperUtil.getPlainAddress(r);if(!t)throw new Error("connectionControllerClient:signMessage - provider is undefined");return await t.request({method:"personal_sign",params:[e,n]})},estimateGas:async()=>await Promise.resolve(BigInt(0)),getEnsAvatar:async e=>await Promise.resolve(e),getEnsAddress:async e=>await Promise.resolve(e),writeContract:async()=>await Promise.resolve("0x"),getCapabilities:async e=>{var t,r;const n=await this.getWalletConnectProvider();if(!n)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");const i=null==(r=null==(t=n.session)?void 0:t.sessionProperties)?void 0:r.capabilities;if(i){const t=this.parseWalletCapabilities(i)[e];if(t)return t}return await n.request({method:"wallet_getCapabilities",params:[e]})},grantPermissions:async e=>{const t=await this.getWalletConnectProvider();if(!t)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return t.request({method:"wallet_grantPermissions",params:e})},revokePermissions:async e=>{const t=await this.getWalletConnectProvider();if(!t)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return t.request({method:"wallet_revokePermissions",params:[e]})},sendTransaction:async()=>await Promise.resolve("0x"),parseUnits:()=>BigInt(0),formatUnits:()=>""}}construct(e,t){this.appKit=e,this.options=t,this.createProvider(),this.syncRequestedNetworks(this.caipNetworks),this.syncConnectors()}switchNetwork(e){e&&this.walletConnectProvider&&this.walletConnectProvider.setDefaultChain(e.caipNetworkId)}async disconnect(){var e,t;this.walletConnectProvider&&(await this.walletConnectProvider.disconnect(),null==(e=this.appKit)||e.resetAccount(ConstantsUtil$3.CHAIN.EVM),null==(t=this.appKit)||t.resetAccount(ConstantsUtil$3.CHAIN.SOLANA))}async getWalletConnectProvider(){if(!this.walletConnectProvider)try{await this.createProvider()}catch(e){throw new Error("EthereumAdapter:getWalletConnectProvider - Cannot create provider")}return this.walletConnectProvider}createProvider(){var e,t;return!this.walletConnectProviderInitPromise&&"undefined"!=typeof window&&(null==(e=this.options)?void 0:e.projectId)&&(this.walletConnectProviderInitPromise=this.initWalletConnectProvider(null==(t=this.options)?void 0:t.projectId)),this.walletConnectProviderInitPromise}async initWalletConnectProvider(e){const t=LoggerUtil.createLogger(((e,...t)=>{e.message.includes(ErrorUtil.UniversalProviderErrors.UNAUTHORIZED_DOMAIN_NOT_ALLOWED)?this.reportErrors&&(AlertController.open(ErrorUtil.ALERT_ERRORS.INVALID_APP_CONFIGURATION,"error"),this.reportErrors=!1):console.error(...t)})),r={projectId:e,metadata:{name:this.metadata?this.metadata.name:"",description:this.metadata?this.metadata.description:"",url:this.metadata?this.metadata.url:"",icons:this.metadata?this.metadata.icons:[""]},logger:t};this.walletConnectProvider=await dr.init(r),await this.checkActiveWalletConnectProvider()}syncRequestedNetworks(e){[...new Set(e.map((e=>e.chainNamespace)))].filter((e=>Boolean(e))).forEach((t=>{var r;null==(r=this.appKit)||r.setRequestedCaipNetworks(e.filter((e=>e.chainNamespace===t)),t)}))}async checkActiveWalletConnectProvider(){const e=await this.getWalletConnectProvider(),t=SafeLocalStorage.getItem(SafeLocalStorageKeys.WALLET_ID);e&&t===ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID&&this.setWalletConnectProvider()}setWalletConnectProvider(){var e,t;SafeLocalStorage.setItem(SafeLocalStorageKeys.WALLET_ID,ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID);const r=null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces;if(r){Object.keys(r).reverse().forEach((e=>{var t,n,i;const o=null==(t=null==r?void 0:r[e])?void 0:t.accounts[0];ProviderUtil.setProvider(e,this.walletConnectProvider),ProviderUtil.setProviderId(e,"walletConnect"),null==(n=this.appKit)||n.setApprovedCaipNetworksData(e),o&&(null==(i=this.appKit)||i.setCaipAddress(o,e))}));const e=StorageUtil.getStoredActiveCaipNetwork(),t=ChainController.state.activeCaipNetwork;try{e?ChainController.setActiveCaipNetwork(e):t&&ChainController.getAllApprovedCaipNetworkIds().includes(t.caipNetworkId)||this.setDefaultNetwork(r)}catch(n){console.warn(">>> Error setting active caip network",n)}}this.syncAccount(),this.watchWalletConnect()}setDefaultNetwork(e){var t;const r=null==(t=this.caipNetworks[0])?void 0:t.chainNamespace;if(r){const t=null==e?void 0:e[r];if(null==t?void 0:t.chains){const e=t.chains[0];if(e){const t=ChainController.getRequestedCaipNetworks(r);if(t){const r=t.find((t=>t.caipNetworkId===e));r&&ChainController.setActiveCaipNetwork(r)}}}}}async watchWalletConnect(){var e;const t=await this.getWalletConnectProvider(),r=(null==(e=null==t?void 0:t.session)?void 0:e.namespaces)||{};const n=e=>{e.length>0&&this.syncAccount()},i=e=>{var t,r,n;const i=this.caipNetworks.find((t=>t.id==e)),o=null==(t=this.appKit)?void 0:t.getCaipNetwork();if(i)o&&(null==o?void 0:o.id)===(null==i?void 0:i.id)||null==(n=this.appKit)||n.setCaipNetwork(i);else{const t=(null==(r=this.appKit)?void 0:r.getActiveChainNamespace())||ConstantsUtil$3.CHAIN.EVM;ChainController.setActiveCaipNetwork({id:e,caipNetworkId:`${t}:${e}`,name:"Unknown Network",chainNamespace:t,nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}})}};t&&(t.on("disconnect",(function e(){Object.keys(r).forEach((e=>{AccountController.resetAccount(e)})),ConnectionController.resetWcConnection(),SafeLocalStorage.removeItem(SafeLocalStorageKeys.WALLET_ID),null==t||t.removeListener("disconnect",e),null==t||t.removeListener("accountsChanged",n)})),t.on("accountsChanged",n),t.on("chainChanged",i))}getProviderData(){var e,t,r,n;const i=(null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces)||{},o=(null==(r=this.appKit)?void 0:r.getIsConnectedState())||!1,a=(null==(n=this.appKit)?void 0:n.getPreferredAccountType())||"";return{provider:this.walletConnectProvider,namespaces:i,namespaceKeys:i?Object.keys(i):[],isConnected:o,preferredAccountType:a}}syncAccount(){var e,t,r,n;const{namespaceKeys:i,namespaces:o}=this.getProviderData(),a=null==(e=this.appKit)?void 0:e.getPreferredAccountType();(null==(t=this.appKit)?void 0:t.getIsConnectedState())||!1?i.forEach((async e=>{var t,r,n,i,s;const c=e,l=null==(t=null==o?void 0:o[e])?void 0:t.accounts[0];(null==(r=this.appKit)?void 0:r.getCaipAddress(c))||(null==(n=this.appKit)||n.setPreferredAccountType(a,c),null==(i=this.appKit)||i.setCaipAddress(l,c),this.syncConnectedWalletInfo(),await Promise.all([null==(s=this.appKit)?void 0:s.setApprovedCaipNetworksData(c)])),this.syncAccounts()})):(null==(r=this.appKit)||r.resetWcConnection(),null==(n=this.appKit)||n.resetNetwork(this.chainNamespace),this.syncAccounts(!0))}syncAccounts(e=!1){const{namespaces:t}=this.getProviderData();Object.keys(t).forEach((r=>{var n,i,o,a;const s=null==(i=null==(n=null==t?void 0:t[r])?void 0:n.accounts)?void 0:i.map((e=>{const[,,t]=e.split(":");return t})).filter(((e,t,r)=>r.indexOf(e)===t));e&&(null==(o=this.appKit)||o.setAllAccounts([],r)),s&&(null==(a=this.appKit)||a.setAllAccounts(s.map((e=>({address:e,type:"eoa"}))),r))}))}syncConnectedWalletInfo(){var e,t;const r=SafeLocalStorage.getItem(SafeLocalStorageKeys.WALLET_ID),n=(null==(t=null==(e=this.walletConnectProvider)?void 0:e.session)?void 0:t.namespaces)||{};Object.keys(n).forEach((e=>{var t,n,i,o,a;(null==(t=this.walletConnectProvider)?void 0:t.session)?null==(i=this.appKit)||i.setConnectedWalletInfo({...this.walletConnectProvider.session.peer.metadata,name:this.walletConnectProvider.session.peer.metadata.name,icon:null==(n=this.walletConnectProvider.session.peer.metadata.icons)?void 0:n[0]},e):r&&(null==(o=this.appKit)||o.setConnectedWalletInfo({name:r},ConstantsUtil$3.CHAIN.EVM),null==(a=this.appKit)||a.setConnectedWalletInfo({name:r},ConstantsUtil$3.CHAIN.SOLANA))}))}syncConnectors(){var e;const t=[];t.push({id:ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID,explorerId:PresetsUtil.ConnectorExplorerIds[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],imageId:PresetsUtil.ConnectorImageIds[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],name:PresetsUtil.ConnectorNamesMap[ConstantsUtil$1.WALLET_CONNECT_CONNECTOR_ID],type:"WALLET_CONNECT",chain:this.chainNamespace}),null==(e=this.appKit)||e.setConnectors(t)}parseWalletCapabilities(e){try{return JSON.parse(e)}catch(t){throw new Error("Error parsing wallet capabilities")}}}let isInitialized=!1;class AppKit{constructor(e){var t;this.initPromise=void 0,this.setStatus=(e,t)=>{AccountController.setStatus(e,t)},this.getIsConnectedState=()=>Boolean(ChainController.state.activeCaipAddress),this.setAllAccounts=(e,t)=>{AccountController.setAllAccounts(e,t),OptionsController.setHasMultipleAddresses((null==e?void 0:e.length)>1)},this.addAddressLabel=(e,t,r)=>{AccountController.addAddressLabel(e,t,r)},this.removeAddressLabel=(e,t)=>{AccountController.removeAddressLabel(e,t)},this.getCaipAddress=e=>ChainController.state.activeChain!==e&&e?ChainController.getAccountProp("caipAddress",e):ChainController.state.activeCaipAddress,this.getAddress=e=>ChainController.state.activeChain!==e&&e?ChainController.getAccountProp("address",e):AccountController.state.address,this.getProvider=()=>AccountController.state.provider,this.getPreferredAccountType=()=>AccountController.state.preferredAccountType,this.setCaipAddress=(e,t)=>{AccountController.setCaipAddress(e,t)},this.setProvider=(e,t)=>{AccountController.setProvider(e,t)},this.setBalance=(e,t,r)=>{AccountController.setBalance(e,t,r)},this.setProfileName=(e,t)=>{AccountController.setProfileName(e,t)},this.setProfileImage=(e,t)=>{AccountController.setProfileImage(e,t)},this.resetAccount=e=>{AccountController.resetAccount(e)},this.setCaipNetwork=e=>{ChainController.setActiveCaipNetwork(e)},this.getCaipNetwork=e=>{var t;return e?null==(t=ChainController.getRequestedCaipNetworks(e).filter((t=>t.chainNamespace===e)))?void 0:t[0]:ChainController.state.activeCaipNetwork},this.getCaipNetworkId=()=>{const e=this.getCaipNetwork();if(e)return e.id},this.getCaipNetworks=e=>ChainController.getRequestedCaipNetworks(e),this.getActiveChainNamespace=()=>ChainController.state.activeChain,this.setRequestedCaipNetworks=(e,t)=>{ChainController.setRequestedCaipNetworks(e,t)},this.getApprovedCaipNetworkIds=()=>ChainController.getAllApprovedCaipNetworkIds(),this.setApprovedCaipNetworksData=e=>ChainController.setApprovedCaipNetworksData(e),this.resetNetwork=e=>{ChainController.resetNetwork(e)},this.setConnectors=e=>{const t=[...ConnectorController.getConnectors(),...e];ConnectorController.setConnectors(t)},this.addConnector=e=>{ConnectorController.addConnector(e)},this.getConnectors=()=>ConnectorController.getConnectors(),this.resetWcConnection=()=>{ConnectionController.resetWcConnection()},this.fetchIdentity=e=>BlockchainApiController.fetchIdentity(e),this.setAddressExplorerUrl=(e,t)=>{AccountController.setAddressExplorerUrl(e,t)},this.setSmartAccountDeployed=(e,t)=>{AccountController.setSmartAccountDeployed(e,t)},this.setConnectedWalletInfo=(e,t)=>{AccountController.setConnectedWalletInfo(e,t)},this.setSmartAccountEnabledNetworks=(e,t)=>{ChainController.setSmartAccountEnabledNetworks(e,t)},this.setPreferredAccountType=(e,t)=>{AccountController.setPreferredAccountType(e,t)},this.getReownName=e=>EnsController.getNamesForAddress(e),this.resolveReownName=async e=>{var t;const r=await EnsController.resolveName(e);return(null==(t=(Object.values(null==r?void 0:r.addresses)||[])[0])?void 0:t.address)||!1},this.setEIP6963Enabled=e=>{OptionsController.setEIP6963Enabled(e)},this.setClientId=e=>{BlockchainApiController.setClientId(e)},this.getConnectorImage=e=>AssetUtil.getConnectorImage(e),this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect("ApproveTransaction")}else this.open({view:"ApproveTransaction"})},this.adapter=null==(t=e.adapters)?void 0:t[0],this.caipNetworks=this.extendCaipNetworks(e),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.initControllers(e),this.initOrContinue(),this.version=e.sdkVersion}static getInstance(){return this.instance}async open(e){await this.initOrContinue(),ModalController.open(e)}async close(){await this.initOrContinue(),ModalController.close()}setLoading(e){ModalController.setLoading(e)}getError(){return""}getChainId(){var e;return null==(e=ChainController.state.activeCaipNetwork)?void 0:e.id}switchNetwork(e){return ChainController.switchActiveNetwork(e)}getWalletProvider(){return ChainController.state.activeChain?ProviderUtil.state.providers[ChainController.state.activeChain]:null}getWalletProviderType(){return ChainController.state.activeChain?ProviderUtil.state.providerIds[ChainController.state.activeChain]:null}subscribeProvider(){return null}getThemeMode(){return ThemeController.state.themeMode}getThemeVariables(){return ThemeController.state.themeVariables}setThemeMode(e){ThemeController.setThemeMode(e),setColorTheme(ThemeController.state.themeMode)}setThemeVariables(e){ThemeController.setThemeVariables(e),setThemeVariables(ThemeController.state.themeVariables)}subscribeTheme(e){return ThemeController.subscribe(e)}getWalletInfo(){return AccountController.state.connectedWalletInfo}subscribeWalletInfo(e){return AccountController.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){AccountController.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){ChainController.subscribeKey("activeCaipNetwork",e)}getState(){return PublicStateController.state}subscribeState(e){return PublicStateController.subscribe(e)}showErrorMessage(e){SnackController.showError(e)}showSuccessMessage(e){SnackController.showSuccess(e)}getEvent(){return{...EventsController.state}}subscribeEvents(e){return EventsController.subscribe(e)}replace(e){RouterController.replace(e)}redirect(e){RouterController.push(e)}popTransactionStack(e){RouterController.popTransactionStack(e)}isOpen(){return ModalController.state.open}isTransactionStackEmpty(){return 0===RouterController.state.transactionStack.length}isTransactionShouldReplaceView(){var e;return null==(e=RouterController.state.transactionStack[RouterController.state.transactionStack.length-1])?void 0:e.replace}async initControllers(e){var t;if(OptionsController.setDebug(e.debug),OptionsController.setProjectId(e.projectId),OptionsController.setSdkVersion(e.sdkVersion),!e.projectId)return void AlertController.open(ErrorUtil.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");this.adapters=e.adapters,this.initializeUniversalAdapter(e),this.initializeAdapters(e),this.setDefaultNetwork(),OptionsController.setAllWallets(e.allWallets),OptionsController.setIncludeWalletIds(e.includeWalletIds),OptionsController.setExcludeWalletIds(e.excludeWalletIds),e.excludeWalletIds&&ApiController.searchWalletByIds({ids:e.excludeWalletIds}),OptionsController.setFeaturedWalletIds(e.featuredWalletIds),OptionsController.setTokens(e.tokens),OptionsController.setTermsConditionsUrl(e.termsConditionsUrl),OptionsController.setPrivacyPolicyUrl(e.privacyPolicyUrl),OptionsController.setCustomWallets(e.customWallets),OptionsController.setFeatures(e.features),OptionsController.setEnableWalletConnect(!1!==e.enableWalletConnect),OptionsController.setEnableWallets(!1!==e.enableWallets);const r=e.metadata??this.getDefaultMetaData();r&&OptionsController.setMetadata(r),e.themeMode&&ThemeController.setThemeMode(e.themeMode),e.themeVariables&&ThemeController.setThemeVariables(e.themeVariables),e.disableAppend&&OptionsController.setDisableAppend(Boolean(e.disableAppend));if((null==(t=e.adapters)?void 0:t.find((e=>e.chainNamespace===ConstantsUtil$3.CHAIN.EVM)))&&e.siweConfig){const{SIWEController:t}=await Promise.resolve().then((()=>index$8));t.setSIWEClient(e.siweConfig)}}getDefaultMetaData(){var e,t,r;return"undefined"!=typeof window&&"undefined"!=typeof document?{name:(null==(e=document.getElementsByTagName("title")[0])?void 0:e.textContent)||"",description:(null==(t=document.querySelector('meta[property="og:description"]'))?void 0:t.content)||"",url:window.location.origin,icons:[(null==(r=document.querySelector('link[rel~="icon"]'))?void 0:r.href)||""]}:null}extendCaipNetworks(e){return CaipNetworksUtil.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,projectId:e.projectId})}extendDefaultCaipNetwork(e){const t=e.networks.find((t=>{var r;return t.id===(null==(r=e.defaultNetwork)?void 0:r.id)}));return t?CaipNetworksUtil.extendCaipNetwork(t,{customNetworkImageUrls:e.chainImages,projectId:e.projectId}):void 0}initializeUniversalAdapter(e){var t,r;const n={...e,networks:this.caipNetworks,defaultNetwork:this.defaultCaipNetwork};this.universalAdapter=new UniversalAdapterClient(n),ChainController.initializeUniversalAdapter(this.universalAdapter,e.adapters||[]),null==(r=(t=this.universalAdapter).construct)||r.call(t,this,n)}initializeAdapters(e){var t;const r={...e,networks:this.caipNetworks,defaultNetwork:this.defaultCaipNetwork};ChainController.initialize(e.adapters||[]),null==(t=e.adapters)||t.forEach((e=>{var t;null==(t=e.construct)||t.call(e,this,r)}))}setDefaultNetwork(){const e=SafeLocalStorage.getItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK_ID),t=(e?this.caipNetworks.find((t=>t.caipNetworkId===e)):void 0)||this.defaultCaipNetwork||this.caipNetworks[0];ChainController.setActiveCaipNetwork(t)}async initOrContinue(){return this.initPromise||isInitialized||!CoreHelperUtil.isClient()||(isInitialized=!0,this.initPromise=new Promise((async e=>{await Promise.all([Promise.resolve().then((()=>index$e)),Promise.resolve().then((()=>w3mModal))]);const t=document.createElement("w3m-modal");OptionsController.state.disableAppend||document.body.insertAdjacentElement("beforeend",t),e()}))),this.initPromise}}const PACKAGE_VERSION="1.2.0";var __decorate$1M=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};let W3mAccountButton=class extends r$c{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.caipAddress=ChainController.state.activeCaipAddress,this.balanceVal=AccountController.state.balance,this.balanceSymbol=AccountController.state.balanceSymbol,this.profileName=AccountController.state.profileName,this.profileImage=AccountController.state.profileImage,this.network=ChainController.state.activeCaipNetwork,this.networkImage=AssetUtil.getNetworkImage(this.network),this.isSupported=!0,this.unsubscribe.push(AssetController.subscribeNetworkImages((()=>{this.networkImage=AssetUtil.getNetworkImage(this.network)})),ChainController.subscribeKey("activeCaipAddress",(e=>this.caipAddress=e)),AccountController.subscribeKey("balance",(e=>this.balanceVal=e)),AccountController.subscribeKey("balanceSymbol",(e=>this.balanceSymbol=e)),AccountController.subscribeKey("profileName",(e=>this.profileName=e)),AccountController.subscribeKey("profileImage",(e=>this.profileImage=e)),ChainController.subscribeKey("activeCaipNetwork",(e=>{this.network=e,this.networkImage=AssetUtil.getNetworkImage(e),this.isSupported=!(null==e?void 0:e.chainNamespace)||ChainController.checkIfSupportedNetwork(null==e?void 0:e.chainNamespace)})))}disconnectedCallback(){this.unsubscribe.forEach((e=>e()))}render(){if(!ChainController.state.activeChain)return null;const e="show"===this.balance;return x$7`
|
|
6098
6098
|
<wui-account-button
|
|
6099
6099
|
.disabled=${Boolean(this.disabled)}
|
|
6100
6100
|
.isUnsupportedChain=${!this.isSupported}
|