Files
bitvid/vendor/bitcoin-connect.bundle.min.js
T
thePR0M3TH3ANandClaude Opus 4.8 69e87c6e15 feat(wallet): Bitcoin Connect NWC "Connect wallet" flow [LOCAL — flag ON, do not push as-is]
Phase 0+1 of docs/bitcoin-connect-plan.md (#61). Adds Alby's Bitcoin Connect as a
one-tap NWC connect front-end that feeds bitvid's EXISTING wallet pipeline; manual
URI entry stays as the backup.

- Vendored: pinned @getalby/[email protected].3 bundled by
  scripts/build-bitcoin-connect.mjs → vendor/bitcoin-connect.bundle.min.js (esbuild,
  browser ESM). crypto-shim aliases the L402-only `import('crypto')` bitvid never
  calls. `npm run build:bitcoin-connect` rebuilds it.
- Flag: FEATURE_BITCOIN_CONNECT wired like FEATURE_AUDIO_INGEST
  (instance-config → config → constants).
- UI: a "Connect wallet" button in the Wallet Connect pane (hidden unless the flag
  is on); the manual URI field stays below as the backup.
- Controller: ProfileWalletController.handleBitcoinConnect() lazy-imports the bundle
  (only on click — the ~700KB never touches the main bundle), inits NWC-only with
  least-privilege requestMethods and persistConnection:false, then on onConnected
  extracts provider.client.nostrWalletConnectUrl → the SAME validate→save path as
  the manual field → disconnect() so bitvid solely holds the spending secret. The
  URI is never logged.

NOTE: config/instance-config.js FEATURE_BITCOIN_CONNECT is TRUE for local testing
only. Reset to false (shipping default) before pushing/deploying. Local commit;
not pushed, not deployed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-09 14:49:37 -04:00

1250 lines
732 KiB
JavaScript

var Xh=Object.create;var xo=Object.defineProperty;var ef=Object.getOwnPropertyDescriptor;var tf=Object.getOwnPropertyNames;var nf=Object.getPrototypeOf,rf=Object.prototype.hasOwnProperty;var of=(e,t,r)=>t in e?xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ga=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var sf=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tf(t))!rf.call(e,i)&&i!==r&&xo(e,i,{get:()=>t[i],enumerable:!(n=ef(t,i))||n.enumerable});return e};var ba=(e,t,r)=>(r=e!=null?Xh(nf(e)):{},sf(t||!e||!e.__esModule?xo(r,"default",{value:e,enumerable:!0}):r,e));var J=(e,t,r)=>of(e,typeof t!="symbol"?t+"":t,r);var Fl=ga((Dl,Bl)=>{var Ml=(function(){var e=function(y,v){var m=236,C=17,E=y,O=r[v],_=null,S=0,R=null,A=[],T={},N=function(U,F){S=E*4+17,_=(function(D){for(var k=new Array(D),j=0;j<D;j+=1){k[j]=new Array(D);for(var M=0;M<D;M+=1)k[j][M]=null}return k})(S),x(0,0),x(S-7,0),x(0,S-7),H(),L(),K(U,F),E>=7&&Z(U),R==null&&(R=G(E,O,A)),P(R,F)},x=function(U,F){for(var D=-1;D<=7;D+=1)if(!(U+D<=-1||S<=U+D))for(var k=-1;k<=7;k+=1)F+k<=-1||S<=F+k||(0<=D&&D<=6&&(k==0||k==6)||0<=k&&k<=6&&(D==0||D==6)||2<=D&&D<=4&&2<=k&&k<=4?_[U+D][F+k]=!0:_[U+D][F+k]=!1)},I=function(){for(var U=0,F=0,D=0;D<8;D+=1){N(!0,D);var k=i.getLostPoint(T);(D==0||U>k)&&(U=k,F=D)}return F},L=function(){for(var U=8;U<S-8;U+=1)_[U][6]==null&&(_[U][6]=U%2==0);for(var F=8;F<S-8;F+=1)_[6][F]==null&&(_[6][F]=F%2==0)},H=function(){for(var U=i.getPatternPosition(E),F=0;F<U.length;F+=1)for(var D=0;D<U.length;D+=1){var k=U[F],j=U[D];if(_[k][j]==null)for(var M=-2;M<=2;M+=1)for(var $=-2;$<=2;$+=1)M==-2||M==2||$==-2||$==2||M==0&&$==0?_[k+M][j+$]=!0:_[k+M][j+$]=!1}},Z=function(U){for(var F=i.getBCHTypeNumber(E),D=0;D<18;D+=1){var k=!U&&(F>>D&1)==1;_[Math.floor(D/3)][D%3+S-8-3]=k}for(var D=0;D<18;D+=1){var k=!U&&(F>>D&1)==1;_[D%3+S-8-3][Math.floor(D/3)]=k}},K=function(U,F){for(var D=O<<3|F,k=i.getBCHTypeInfo(D),j=0;j<15;j+=1){var M=!U&&(k>>j&1)==1;j<6?_[j][8]=M:j<8?_[j+1][8]=M:_[S-15+j][8]=M}for(var j=0;j<15;j+=1){var M=!U&&(k>>j&1)==1;j<8?_[8][S-j-1]=M:j<9?_[8][15-j-1+1]=M:_[8][15-j-1]=M}_[S-8][8]=!U},P=function(U,F){for(var D=-1,k=S-1,j=7,M=0,$=i.getMaskFunction(F),W=S-1;W>0;W-=2)for(W==6&&(W-=1);;){for(var Y=0;Y<2;Y+=1)if(_[k][W-Y]==null){var Q=!1;M<U.length&&(Q=(U[M]>>>j&1)==1);var q=$(k,W-Y);q&&(Q=!Q),_[k][W-Y]=Q,j-=1,j==-1&&(M+=1,j=7)}if(k+=D,k<0||S<=k){k-=D,D=-D;break}}},B=function(U,F){for(var D=0,k=0,j=0,M=new Array(F.length),$=new Array(F.length),W=0;W<F.length;W+=1){var Y=F[W].dataCount,Q=F[W].totalCount-Y;k=Math.max(k,Y),j=Math.max(j,Q),M[W]=new Array(Y);for(var q=0;q<M[W].length;q+=1)M[W][q]=255&U.getBuffer()[q+D];D+=Y;var te=i.getErrorCorrectPolynomial(Q),ie=f(M[W],te.getLength()-1),ae=ie.mod(te);$[W]=new Array(te.getLength()-1);for(var q=0;q<$[W].length;q+=1){var ue=q+ae.getLength()-$[W].length;$[W][q]=ue>=0?ae.getAt(ue):0}}for(var le=0,q=0;q<F.length;q+=1)le+=F[q].totalCount;for(var me=new Array(le),Ae=0,q=0;q<k;q+=1)for(var W=0;W<F.length;W+=1)q<M[W].length&&(me[Ae]=M[W][q],Ae+=1);for(var q=0;q<j;q+=1)for(var W=0;W<F.length;W+=1)q<$[W].length&&(me[Ae]=$[W][q],Ae+=1);return me},G=function(U,F,D){for(var k=b.getRSBlocks(U,F),j=o(),M=0;M<D.length;M+=1){var $=D[M];j.put($.getMode(),4),j.put($.getLength(),i.getLengthInBits($.getMode(),U)),$.write(j)}for(var W=0,M=0;M<k.length;M+=1)W+=k[M].dataCount;if(j.getLengthInBits()>W*8)throw"code length overflow. ("+j.getLengthInBits()+">"+W*8+")";for(j.getLengthInBits()+4<=W*8&&j.put(0,4);j.getLengthInBits()%8!=0;)j.putBit(!1);for(;!(j.getLengthInBits()>=W*8||(j.put(m,8),j.getLengthInBits()>=W*8));)j.put(C,8);return B(j,k)};T.addData=function(U,F){F=F||"Byte";var D=null;switch(F){case"Numeric":D=p(U);break;case"Alphanumeric":D=d(U);break;case"Byte":D=h(U);break;case"Kanji":D=u(U);break;default:throw"mode:"+F}A.push(D),R=null},T.isDark=function(U,F){if(U<0||S<=U||F<0||S<=F)throw U+","+F;return _[U][F]},T.getModuleCount=function(){return S},T.make=function(){if(E<1){for(var U=1;U<40;U++){for(var F=b.getRSBlocks(U,O),D=o(),k=0;k<A.length;k++){var j=A[k];D.put(j.getMode(),4),D.put(j.getLength(),i.getLengthInBits(j.getMode(),U)),j.write(D)}for(var M=0,k=0;k<F.length;k++)M+=F[k].dataCount;if(D.getLengthInBits()<=M*8)break}E=U}N(!1,I())},T.createTableTag=function(U,F){U=U||2,F=typeof F>"u"?U*4:F;var D="";D+='<table style="',D+=" border-width: 0px; border-style: none;",D+=" border-collapse: collapse;",D+=" padding: 0px; margin: "+F+"px;",D+='">',D+="<tbody>";for(var k=0;k<T.getModuleCount();k+=1){D+="<tr>";for(var j=0;j<T.getModuleCount();j+=1)D+='<td style="',D+=" border-width: 0px; border-style: none;",D+=" border-collapse: collapse;",D+=" padding: 0px; margin: 0px;",D+=" width: "+U+"px;",D+=" height: "+U+"px;",D+=" background-color: ",D+=T.isDark(k,j)?"#000000":"#ffffff",D+=";",D+='"/>';D+="</tr>"}return D+="</tbody>",D+="</table>",D},T.createSvgTag=function(U,F,D,k){var j={};typeof arguments[0]=="object"&&(j=arguments[0],U=j.cellSize,F=j.margin,D=j.alt,k=j.title),U=U||2,F=typeof F>"u"?U*4:F,D=typeof D=="string"?{text:D}:D||{},D.text=D.text||null,D.id=D.text?D.id||"qrcode-description":null,k=typeof k=="string"?{text:k}:k||{},k.text=k.text||null,k.id=k.text?k.id||"qrcode-title":null;var M=T.getModuleCount()*U+F*2,$,W,Y,Q,q="",te;for(te="l"+U+",0 0,"+U+" -"+U+",0 0,-"+U+"z ",q+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',q+=j.scalable?"":' width="'+M+'px" height="'+M+'px"',q+=' viewBox="0 0 '+M+" "+M+'" ',q+=' preserveAspectRatio="xMinYMin meet"',q+=k.text||D.text?' role="img" aria-labelledby="'+V([k.id,D.id].join(" ").trim())+'"':"",q+=">",q+=k.text?'<title id="'+V(k.id)+'">'+V(k.text)+"</title>":"",q+=D.text?'<description id="'+V(D.id)+'">'+V(D.text)+"</description>":"",q+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',q+='<path d="',Y=0;Y<T.getModuleCount();Y+=1)for(Q=Y*U+F,$=0;$<T.getModuleCount();$+=1)T.isDark(Y,$)&&(W=$*U+F,q+="M"+W+","+Q+te);return q+='" stroke="transparent" fill="black"/>',q+="</svg>",q},T.createDataURL=function(U,F){U=U||2,F=typeof F>"u"?U*4:F;var D=T.getModuleCount()*U+F*2,k=F,j=D-F;return w(D,D,function(M,$){if(k<=M&&M<j&&k<=$&&$<j){var W=Math.floor((M-k)/U),Y=Math.floor(($-k)/U);return T.isDark(Y,W)?0:1}else return 1})},T.createImgTag=function(U,F,D){U=U||2,F=typeof F>"u"?U*4:F;var k=T.getModuleCount()*U+F*2,j="";return j+="<img",j+=' src="',j+=T.createDataURL(U,F),j+='"',j+=' width="',j+=k,j+='"',j+=' height="',j+=k,j+='"',D&&(j+=' alt="',j+=V(D),j+='"'),j+="/>",j};var V=function(U){for(var F="",D=0;D<U.length;D+=1){var k=U.charAt(D);switch(k){case"<":F+="&lt;";break;case">":F+="&gt;";break;case"&":F+="&amp;";break;case'"':F+="&quot;";break;default:F+=k;break}}return F},z=function(U){var F=1;U=typeof U>"u"?F*2:U;var D=T.getModuleCount()*F+U*2,k=U,j=D-U,M,$,W,Y,Q,q={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},te={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},ie="";for(M=0;M<D;M+=2){for(W=Math.floor((M-k)/F),Y=Math.floor((M+1-k)/F),$=0;$<D;$+=1)Q="\u2588",k<=$&&$<j&&k<=M&&M<j&&T.isDark(W,Math.floor(($-k)/F))&&(Q=" "),k<=$&&$<j&&k<=M+1&&M+1<j&&T.isDark(Y,Math.floor(($-k)/F))?Q+=" ":Q+="\u2588",ie+=U<1&&M+1>=j?te[Q]:q[Q];ie+=`
`}return D%2&&U>0?ie.substring(0,ie.length-D-1)+Array(D+1).join("\u2580"):ie.substring(0,ie.length-1)};return T.createASCII=function(U,F){if(U=U||1,U<2)return z(F);U-=1,F=typeof F>"u"?U*2:F;var D=T.getModuleCount()*U+F*2,k=F,j=D-F,M,$,W,Y,Q=Array(U+1).join("\u2588\u2588"),q=Array(U+1).join(" "),te="",ie="";for(M=0;M<D;M+=1){for(W=Math.floor((M-k)/U),ie="",$=0;$<D;$+=1)Y=1,k<=$&&$<j&&k<=M&&M<j&&T.isDark(W,Math.floor(($-k)/U))&&(Y=0),ie+=Y?Q:q;for(W=0;W<U;W+=1)te+=ie+`
`}return te.substring(0,te.length-1)},T.renderTo2dContext=function(U,F){F=F||2;for(var D=T.getModuleCount(),k=0;k<D;k++)for(var j=0;j<D;j++)U.fillStyle=T.isDark(k,j)?"black":"white",U.fillRect(k*F,j*F,F,F)},T};e.stringToBytesFuncs={default:function(y){for(var v=[],m=0;m<y.length;m+=1){var C=y.charCodeAt(m);v.push(C&255)}return v}},e.stringToBytes=e.stringToBytesFuncs.default,e.createStringToBytes=function(y,v){var m=(function(){for(var E=l(y),O=function(){var L=E.read();if(L==-1)throw"eof";return L},_=0,S={};;){var R=E.read();if(R==-1)break;var A=O(),T=O(),N=O(),x=String.fromCharCode(R<<8|A),I=T<<8|N;S[x]=I,_+=1}if(_!=v)throw _+" != "+v;return S})(),C=63;return function(E){for(var O=[],_=0;_<E.length;_+=1){var S=E.charCodeAt(_);if(S<128)O.push(S);else{var R=m[E.charAt(_)];typeof R=="number"?(R&255)==R?O.push(R):(O.push(R>>>8),O.push(R&255)):O.push(C)}}return O}};var t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i=(function(){var y=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],v=1335,m=7973,C=21522,E={},O=function(_){for(var S=0;_!=0;)S+=1,_>>>=1;return S};return E.getBCHTypeInfo=function(_){for(var S=_<<10;O(S)-O(v)>=0;)S^=v<<O(S)-O(v);return(_<<10|S)^C},E.getBCHTypeNumber=function(_){for(var S=_<<12;O(S)-O(m)>=0;)S^=m<<O(S)-O(m);return _<<12|S},E.getPatternPosition=function(_){return y[_-1]},E.getMaskFunction=function(_){switch(_){case n.PATTERN000:return function(S,R){return(S+R)%2==0};case n.PATTERN001:return function(S,R){return S%2==0};case n.PATTERN010:return function(S,R){return R%3==0};case n.PATTERN011:return function(S,R){return(S+R)%3==0};case n.PATTERN100:return function(S,R){return(Math.floor(S/2)+Math.floor(R/3))%2==0};case n.PATTERN101:return function(S,R){return S*R%2+S*R%3==0};case n.PATTERN110:return function(S,R){return(S*R%2+S*R%3)%2==0};case n.PATTERN111:return function(S,R){return(S*R%3+(S+R)%2)%2==0};default:throw"bad maskPattern:"+_}},E.getErrorCorrectPolynomial=function(_){for(var S=f([1],0),R=0;R<_;R+=1)S=S.multiply(f([1,a.gexp(R)],0));return S},E.getLengthInBits=function(_,S){if(1<=S&&S<10)switch(_){case t.MODE_NUMBER:return 10;case t.MODE_ALPHA_NUM:return 9;case t.MODE_8BIT_BYTE:return 8;case t.MODE_KANJI:return 8;default:throw"mode:"+_}else if(S<27)switch(_){case t.MODE_NUMBER:return 12;case t.MODE_ALPHA_NUM:return 11;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 10;default:throw"mode:"+_}else if(S<41)switch(_){case t.MODE_NUMBER:return 14;case t.MODE_ALPHA_NUM:return 13;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 12;default:throw"mode:"+_}else throw"type:"+S},E.getLostPoint=function(_){for(var S=_.getModuleCount(),R=0,A=0;A<S;A+=1)for(var T=0;T<S;T+=1){for(var N=0,x=_.isDark(A,T),I=-1;I<=1;I+=1)if(!(A+I<0||S<=A+I))for(var L=-1;L<=1;L+=1)T+L<0||S<=T+L||I==0&&L==0||x==_.isDark(A+I,T+L)&&(N+=1);N>5&&(R+=3+N-5)}for(var A=0;A<S-1;A+=1)for(var T=0;T<S-1;T+=1){var H=0;_.isDark(A,T)&&(H+=1),_.isDark(A+1,T)&&(H+=1),_.isDark(A,T+1)&&(H+=1),_.isDark(A+1,T+1)&&(H+=1),(H==0||H==4)&&(R+=3)}for(var A=0;A<S;A+=1)for(var T=0;T<S-6;T+=1)_.isDark(A,T)&&!_.isDark(A,T+1)&&_.isDark(A,T+2)&&_.isDark(A,T+3)&&_.isDark(A,T+4)&&!_.isDark(A,T+5)&&_.isDark(A,T+6)&&(R+=40);for(var T=0;T<S;T+=1)for(var A=0;A<S-6;A+=1)_.isDark(A,T)&&!_.isDark(A+1,T)&&_.isDark(A+2,T)&&_.isDark(A+3,T)&&_.isDark(A+4,T)&&!_.isDark(A+5,T)&&_.isDark(A+6,T)&&(R+=40);for(var Z=0,T=0;T<S;T+=1)for(var A=0;A<S;A+=1)_.isDark(A,T)&&(Z+=1);var K=Math.abs(100*Z/S/S-50)/5;return R+=K*10,R},E})(),a=(function(){for(var y=new Array(256),v=new Array(256),m=0;m<8;m+=1)y[m]=1<<m;for(var m=8;m<256;m+=1)y[m]=y[m-4]^y[m-5]^y[m-6]^y[m-8];for(var m=0;m<255;m+=1)v[y[m]]=m;var C={};return C.glog=function(E){if(E<1)throw"glog("+E+")";return v[E]},C.gexp=function(E){for(;E<0;)E+=255;for(;E>=256;)E-=255;return y[E]},C})();function f(y,v){if(typeof y.length>"u")throw y.length+"/"+v;var m=(function(){for(var E=0;E<y.length&&y[E]==0;)E+=1;for(var O=new Array(y.length-E+v),_=0;_<y.length-E;_+=1)O[_]=y[_+E];return O})(),C={};return C.getAt=function(E){return m[E]},C.getLength=function(){return m.length},C.multiply=function(E){for(var O=new Array(C.getLength()+E.getLength()-1),_=0;_<C.getLength();_+=1)for(var S=0;S<E.getLength();S+=1)O[_+S]^=a.gexp(a.glog(C.getAt(_))+a.glog(E.getAt(S)));return f(O,0)},C.mod=function(E){if(C.getLength()-E.getLength()<0)return C;for(var O=a.glog(C.getAt(0))-a.glog(E.getAt(0)),_=new Array(C.getLength()),S=0;S<C.getLength();S+=1)_[S]=C.getAt(S);for(var S=0;S<E.getLength();S+=1)_[S]^=a.gexp(a.glog(E.getAt(S))+O);return f(_,0).mod(E)},C}var b=(function(){var y=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],v=function(E,O){var _={};return _.totalCount=E,_.dataCount=O,_},m={},C=function(E,O){switch(O){case r.L:return y[(E-1)*4+0];case r.M:return y[(E-1)*4+1];case r.Q:return y[(E-1)*4+2];case r.H:return y[(E-1)*4+3];default:return}};return m.getRSBlocks=function(E,O){var _=C(E,O);if(typeof _>"u")throw"bad rs block @ typeNumber:"+E+"/errorCorrectionLevel:"+O;for(var S=_.length/3,R=[],A=0;A<S;A+=1)for(var T=_[A*3+0],N=_[A*3+1],x=_[A*3+2],I=0;I<T;I+=1)R.push(v(N,x));return R},m})(),o=function(){var y=[],v=0,m={};return m.getBuffer=function(){return y},m.getAt=function(C){var E=Math.floor(C/8);return(y[E]>>>7-C%8&1)==1},m.put=function(C,E){for(var O=0;O<E;O+=1)m.putBit((C>>>E-O-1&1)==1)},m.getLengthInBits=function(){return v},m.putBit=function(C){var E=Math.floor(v/8);y.length<=E&&y.push(0),C&&(y[E]|=128>>>v%8),v+=1},m},p=function(y){var v=t.MODE_NUMBER,m=y,C={};C.getMode=function(){return v},C.getLength=function(_){return m.length},C.write=function(_){for(var S=m,R=0;R+2<S.length;)_.put(E(S.substring(R,R+3)),10),R+=3;R<S.length&&(S.length-R==1?_.put(E(S.substring(R,R+1)),4):S.length-R==2&&_.put(E(S.substring(R,R+2)),7))};var E=function(_){for(var S=0,R=0;R<_.length;R+=1)S=S*10+O(_.charAt(R));return S},O=function(_){if("0"<=_&&_<="9")return _.charCodeAt(0)-48;throw"illegal char :"+_};return C},d=function(y){var v=t.MODE_ALPHA_NUM,m=y,C={};C.getMode=function(){return v},C.getLength=function(O){return m.length},C.write=function(O){for(var _=m,S=0;S+1<_.length;)O.put(E(_.charAt(S))*45+E(_.charAt(S+1)),11),S+=2;S<_.length&&O.put(E(_.charAt(S)),6)};var E=function(O){if("0"<=O&&O<="9")return O.charCodeAt(0)-48;if("A"<=O&&O<="Z")return O.charCodeAt(0)-65+10;switch(O){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+O}};return C},h=function(y){var v=t.MODE_8BIT_BYTE,m=y,C=e.stringToBytes(y),E={};return E.getMode=function(){return v},E.getLength=function(O){return C.length},E.write=function(O){for(var _=0;_<C.length;_+=1)O.put(C[_],8)},E},u=function(y){var v=t.MODE_KANJI,m=y,C=e.stringToBytesFuncs.SJIS;if(!C)throw"sjis not supported.";(function(_,S){var R=C(_);if(R.length!=2||(R[0]<<8|R[1])!=S)throw"sjis not supported."})("\u53CB",38726);var E=C(y),O={};return O.getMode=function(){return v},O.getLength=function(_){return~~(E.length/2)},O.write=function(_){for(var S=E,R=0;R+1<S.length;){var A=(255&S[R])<<8|255&S[R+1];if(33088<=A&&A<=40956)A-=33088;else if(57408<=A&&A<=60351)A-=49472;else throw"illegal char at "+(R+1)+"/"+A;A=(A>>>8&255)*192+(A&255),_.put(A,13),R+=2}if(R<S.length)throw"illegal char at "+(R+1)},O},c=function(){var y=[],v={};return v.writeByte=function(m){y.push(m&255)},v.writeShort=function(m){v.writeByte(m),v.writeByte(m>>>8)},v.writeBytes=function(m,C,E){C=C||0,E=E||m.length;for(var O=0;O<E;O+=1)v.writeByte(m[O+C])},v.writeString=function(m){for(var C=0;C<m.length;C+=1)v.writeByte(m.charCodeAt(C))},v.toByteArray=function(){return y},v.toString=function(){var m="";m+="[";for(var C=0;C<y.length;C+=1)C>0&&(m+=","),m+=y[C];return m+="]",m},v},s=function(){var y=0,v=0,m=0,C="",E={},O=function(S){C+=String.fromCharCode(_(S&63))},_=function(S){if(!(S<0)){if(S<26)return 65+S;if(S<52)return 97+(S-26);if(S<62)return 48+(S-52);if(S==62)return 43;if(S==63)return 47}throw"n:"+S};return E.writeByte=function(S){for(y=y<<8|S&255,v+=8,m+=1;v>=6;)O(y>>>v-6),v-=6},E.flush=function(){if(v>0&&(O(y<<6-v),y=0,v=0),m%3!=0)for(var S=3-m%3,R=0;R<S;R+=1)C+="="},E.toString=function(){return C},E},l=function(y){var v=y,m=0,C=0,E=0,O={};O.read=function(){for(;E<8;){if(m>=v.length){if(E==0)return-1;throw"unexpected end of file./"+E}var S=v.charAt(m);if(m+=1,S=="=")return E=0,-1;if(S.match(/^\s$/))continue;C=C<<6|_(S.charCodeAt(0)),E+=6}var R=C>>>E-8&255;return E-=8,R};var _=function(S){if(65<=S&&S<=90)return S-65;if(97<=S&&S<=122)return S-97+26;if(48<=S&&S<=57)return S-48+52;if(S==43)return 62;if(S==47)return 63;throw"c:"+S};return O},g=function(y,v){var m=y,C=v,E=new Array(y*v),O={};O.setPixel=function(A,T,N){E[T*m+A]=N},O.write=function(A){A.writeString("GIF87a"),A.writeShort(m),A.writeShort(C),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(m),A.writeShort(C),A.writeByte(0);var T=2,N=S(T);A.writeByte(T);for(var x=0;N.length-x>255;)A.writeByte(255),A.writeBytes(N,x,255),x+=255;A.writeByte(N.length-x),A.writeBytes(N,x,N.length-x),A.writeByte(0),A.writeString(";")};var _=function(A){var T=A,N=0,x=0,I={};return I.write=function(L,H){if(L>>>H)throw"length over";for(;N+H>=8;)T.writeByte(255&(L<<N|x)),H-=8-N,L>>>=8-N,x=0,N=0;x=L<<N|x,N=N+H},I.flush=function(){N>0&&T.writeByte(x)},I},S=function(A){for(var T=1<<A,N=(1<<A)+1,x=A+1,I=R(),L=0;L<T;L+=1)I.add(String.fromCharCode(L));I.add(String.fromCharCode(T)),I.add(String.fromCharCode(N));var H=c(),Z=_(H);Z.write(T,x);var K=0,P=String.fromCharCode(E[K]);for(K+=1;K<E.length;){var B=String.fromCharCode(E[K]);K+=1,I.contains(P+B)?P=P+B:(Z.write(I.indexOf(P),x),I.size()<4095&&(I.size()==1<<x&&(x+=1),I.add(P+B)),P=B)}return Z.write(I.indexOf(P),x),Z.write(N,x),Z.flush(),H.toByteArray()},R=function(){var A={},T=0,N={};return N.add=function(x){if(N.contains(x))throw"dup key:"+x;A[x]=T,T+=1},N.size=function(){return T},N.indexOf=function(x){return A[x]},N.contains=function(x){return typeof A[x]<"u"},N};return O},w=function(y,v,m){for(var C=g(y,v),E=0;E<v;E+=1)for(var O=0;O<y;O+=1)C.setPixel(O,E,m(O,E));var _=c();C.write(_);for(var S=s(),R=_.toByteArray(),A=0;A<R.length;A+=1)S.writeByte(R[A]);return S.flush(),"data:image/gif;base64,"+S};return e})();(function(){Ml.stringToBytesFuncs["UTF-8"]=function(e){function t(r){for(var n=[],i=0;i<r.length;i++){var a=r.charCodeAt(i);a<128?n.push(a):a<2048?n.push(192|a>>6,128|a&63):a<55296||a>=57344?n.push(224|a>>12,128|a>>6&63,128|a&63):(i++,a=65536+((a&1023)<<10|r.charCodeAt(i)&1023),n.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|a&63))}return n}return t(e)}})();(function(e){typeof define=="function"&&define.amd?define([],e):typeof Dl=="object"&&(Bl.exports=e())})(function(){return Ml})});var jl=ga((Qn,Qi)=>{(function(e,t){typeof Qn=="object"&&typeof Qi=="object"?Qi.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Qn=="object"?Qn["@lightninglabs/lnc-web"]=t():e["@lightninglabs/lnc-web"]=t()})(Qn,()=>(()=>{var e={7289(n,i,a){"use strict";var f=a(6763);(()=>{let b=()=>{let d=new Error("not implemented");return d.code="ENOSYS",d};if(!globalThis.fs){let d="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(h,u){d+=p.decode(u);let c=d.lastIndexOf(`
`);return c!=-1&&(f.log(d.substring(0,c)),d=d.substring(c+1)),u.length},write(h,u,c,s,l,g){c===0&&s===u.length&&l===null?g(null,this.writeSync(h,u)):g(b())},chmod(h,u,c){c(b())},chown(h,u,c,s){s(b())},close(h,u){u(b())},fchmod(h,u,c){c(b())},fchown(h,u,c,s){s(b())},fstat(h,u){u(b())},fsync(h,u){u(null)},ftruncate(h,u,c){c(b())},lchown(h,u,c,s){s(b())},link(h,u,c){c(b())},lstat(h,u){u(b())},mkdir(h,u,c){c(b())},open(h,u,c,s){s(b())},read(h,u,c,s,l,g){g(b())},readdir(h,u){u(b())},readlink(h,u){u(b())},rename(h,u,c){c(b())},rmdir(h,u){u(b())},stat(h,u){u(b())},symlink(h,u,c){c(b())},truncate(h,u,c){c(b())},unlink(h,u){u(b())},utimes(h,u,c,s){s(b())}}}if(globalThis.process||(globalThis.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw b()},pid:-1,ppid:-1,umask(){throw b()},cwd(){throw b()},chdir(){throw b()}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");let o=new TextEncoder("utf-8"),p=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=y=>{y!==0&&f.warn("exit code:",y)},this._exitPromise=new Promise(y=>{this._resolveExitPromise=y}),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;let d=(y,v)=>{this.mem.setUint32(y+0,v,!0),this.mem.setUint32(y+4,Math.floor(v/4294967296),!0)},h=y=>this.mem.getUint32(y+0,!0)+4294967296*this.mem.getInt32(y+4,!0),u=y=>{let v=this.mem.getFloat64(y,!0);if(v===0)return;if(!isNaN(v))return v;let m=this.mem.getUint32(y,!0);return this._values[m]},c=(y,v)=>{if(typeof v=="number"&&v!==0)return isNaN(v)?(this.mem.setUint32(y+4,2146959360,!0),void this.mem.setUint32(y,0,!0)):void this.mem.setFloat64(y,v,!0);if(v===void 0)return void this.mem.setFloat64(y,0,!0);let C=this._ids.get(v);C===void 0&&(C=this._idPool.pop(),C===void 0&&(C=this._values.length),this._values[C]=v,this._goRefCounts[C]=0,this._ids.set(v,C)),this._goRefCounts[C]++;let E=0;switch(typeof v){case"object":v!==null&&(E=1);break;case"string":E=2;break;case"symbol":E=3;break;case"function":E=4}this.mem.setUint32(y+4,2146959360|E,!0),this.mem.setUint32(y,C,!0)},s=y=>{let v=h(y+0),m=h(y+8);return new Uint8Array(this._inst.exports.mem.buffer,v,m)},l=y=>{let v=h(y+0),m=h(y+8),C=new Array(m);for(let E=0;E<m;E++)C[E]=u(v+8*E);return C},g=y=>{let v=h(y+0),m=h(y+8);return p.decode(new DataView(this._inst.exports.mem.buffer,v,m))},w=Date.now()-performance.now();this.importObject={_gotest:{add:(y,v)=>y+v},gojs:{"runtime.wasmExit":y=>{y>>>=0;let v=this.mem.getInt32(y+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(v)},"runtime.wasmWrite":y=>{let v=h((y>>>=0)+8),m=h(y+16),C=this.mem.getInt32(y+24,!0);fs.writeSync(v,new Uint8Array(this._inst.exports.mem.buffer,m,C))},"runtime.resetMemoryDataView":y=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":y=>{d((y>>>=0)+8,1e6*(w+performance.now()))},"runtime.walltime":y=>{y>>>=0;let v=new Date().getTime();d(y+8,v/1e3),this.mem.setInt32(y+16,v%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":y=>{y>>>=0;let v=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(v,setTimeout(()=>{for(this._resume();this._scheduledTimeouts.has(v);)f.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()},h(y+8))),this.mem.setInt32(y+16,v,!0)},"runtime.clearTimeoutEvent":y=>{y>>>=0;let v=this.mem.getInt32(y+8,!0);clearTimeout(this._scheduledTimeouts.get(v)),this._scheduledTimeouts.delete(v)},"runtime.getRandomData":y=>{y>>>=0,crypto.getRandomValues(s(y+8))},"syscall/js.finalizeRef":y=>{y>>>=0;let v=this.mem.getUint32(y+8,!0);if(this._goRefCounts[v]--,this._goRefCounts[v]===0){let m=this._values[v];this._values[v]=null,this._ids.delete(m),this._idPool.push(v)}},"syscall/js.stringVal":y=>{c((y>>>=0)+24,g(y+8))},"syscall/js.valueGet":y=>{y>>>=0;let v=Reflect.get(u(y+8),g(y+16));y=this._inst.exports.getsp()>>>0,c(y+32,v)},"syscall/js.valueSet":y=>{y>>>=0,Reflect.set(u(y+8),g(y+16),u(y+32))},"syscall/js.valueDelete":y=>{y>>>=0,Reflect.deleteProperty(u(y+8),g(y+16))},"syscall/js.valueIndex":y=>{c((y>>>=0)+24,Reflect.get(u(y+8),h(y+16)))},"syscall/js.valueSetIndex":y=>{y>>>=0,Reflect.set(u(y+8),h(y+16),u(y+24))},"syscall/js.valueCall":y=>{y>>>=0;try{let v=u(y+8),m=Reflect.get(v,g(y+16)),C=l(y+32),E=Reflect.apply(m,v,C);y=this._inst.exports.getsp()>>>0,c(y+56,E),this.mem.setUint8(y+64,1)}catch(v){y=this._inst.exports.getsp()>>>0,c(y+56,v),this.mem.setUint8(y+64,0)}},"syscall/js.valueInvoke":y=>{y>>>=0;try{let v=u(y+8),m=l(y+16),C=Reflect.apply(v,void 0,m);y=this._inst.exports.getsp()>>>0,c(y+40,C),this.mem.setUint8(y+48,1)}catch(v){y=this._inst.exports.getsp()>>>0,c(y+40,v),this.mem.setUint8(y+48,0)}},"syscall/js.valueNew":y=>{y>>>=0;try{let v=u(y+8),m=l(y+16),C=Reflect.construct(v,m);y=this._inst.exports.getsp()>>>0,c(y+40,C),this.mem.setUint8(y+48,1)}catch(v){y=this._inst.exports.getsp()>>>0,c(y+40,v),this.mem.setUint8(y+48,0)}},"syscall/js.valueLength":y=>{d((y>>>=0)+16,parseInt(u(y+8).length))},"syscall/js.valuePrepareString":y=>{y>>>=0;let v=o.encode(String(u(y+8)));c(y+16,v),d(y+24,v.length)},"syscall/js.valueLoadString":y=>{let v=u((y>>>=0)+8);s(y+16).set(v)},"syscall/js.valueInstanceOf":y=>{y>>>=0,this.mem.setUint8(y+24,u(y+8)instanceof u(y+16)?1:0)},"syscall/js.copyBytesToGo":y=>{let v=s((y>>>=0)+8),m=u(y+32);if(!(m instanceof Uint8Array||m instanceof Uint8ClampedArray))return void this.mem.setUint8(y+48,0);let C=m.subarray(0,v.length);v.set(C),d(y+40,C.length),this.mem.setUint8(y+48,1)},"syscall/js.copyBytesToJS":y=>{let v=u((y>>>=0)+8),m=s(y+16);if(!(v instanceof Uint8Array||v instanceof Uint8ClampedArray))return void this.mem.setUint8(y+48,0);let C=m.subarray(0,v.length);v.set(C),d(y+40,C.length),this.mem.setUint8(y+48,1)},debug:y=>{f.log(y)}}}}async run(d){if(!(d instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=d,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let h=4096,u=g=>{let w=h,y=o.encode(g+"\0");return new Uint8Array(this.mem.buffer,h,y.length).set(y),h+=y.length,h%8!=0&&(h+=8-h%8),w},c=this.argv.length,s=[];this.argv.forEach(g=>{s.push(u(g))}),s.push(0),Object.keys(this.env).sort().forEach(g=>{s.push(u(`${g}=${this.env[g]}`))}),s.push(0);let l=h;if(s.forEach(g=>{this.mem.setUint32(h,g,!0),this.mem.setUint32(h+4,0,!0),h+=8}),h>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(c,l),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(d){let h=this;return function(){let u={id:d,this:this,args:arguments};return h._pendingEvent=u,h._resume(),u.result}}}})()},3318(n){var i;i=()=>(()=>{"use strict";var a={5804(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.faradayServer=h(d.serviceNames.frdrpc.FaradayServer,u)}},3586(b,o,p){var d=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(o,"__esModule",{value:!0}),o.LitApi=o.TaprootAssetsApi=o.FaradayApi=o.PoolApi=o.LoopApi=o.LndApi=void 0;var h=p(728);Object.defineProperty(o,"LndApi",{enumerable:!0,get:function(){return d(h).default}});var u=p(3762);Object.defineProperty(o,"LoopApi",{enumerable:!0,get:function(){return d(u).default}});var c=p(7082);Object.defineProperty(o,"PoolApi",{enumerable:!0,get:function(){return d(c).default}});var s=p(5804);Object.defineProperty(o,"FaradayApi",{enumerable:!0,get:function(){return d(s).default}});var l=p(9147);Object.defineProperty(o,"TaprootAssetsApi",{enumerable:!0,get:function(){return d(l).default}});var g=p(2191);Object.defineProperty(o,"LitApi",{enumerable:!0,get:function(){return d(g).default}})},2191(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.autopilot=h(d.serviceNames.litrpc.Autopilot,u),this.firewall=h(d.serviceNames.litrpc.Firewall,u),this.sessions=h(d.serviceNames.litrpc.Sessions,u),this.status=h(d.serviceNames.litrpc.Status,u)}},728(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.autopilot=h(d.serviceNames.autopilotrpc.Autopilot,u),this.chainNotifier=h(d.serviceNames.chainrpc.ChainNotifier,u),this.invoices=h(d.serviceNames.invoicesrpc.Invoices,u),this.lightning=h(d.serviceNames.lnrpc.Lightning,u),this.router=h(d.serviceNames.routerrpc.Router,u),this.signer=h(d.serviceNames.signrpc.Signer,u),this.walletKit=h(d.serviceNames.walletrpc.WalletKit,u),this.walletUnlocker=h(d.serviceNames.lnrpc.WalletUnlocker,u),this.watchtower=h(d.serviceNames.watchtowerrpc.Watchtower,u),this.watchtowerClient=h(d.serviceNames.wtclientrpc.WatchtowerClient,u)}},3762(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.swapClient=h(d.serviceNames.looprpc.SwapClient,u),this.debug=h(d.serviceNames.looprpc.Debug,u)}},7082(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.trader=h(d.serviceNames.poolrpc.Trader,u),this.channelAuctioneer=h(d.serviceNames.poolrpc.ChannelAuctioneer,u),this.hashmail=h(d.serviceNames.poolrpc.HashMail,u)}},9147(b,o,p){Object.defineProperty(o,"__esModule",{value:!0});var d=p(2495);o.default=function(h,u){this.taprootAssets=h(d.serviceNames.taprpc.TaprootAssets,u),this.assetWallet=h(d.serviceNames.assetwalletrpc.AssetWallet,u),this.mint=h(d.serviceNames.mintrpc.Mint,u),this.priceOracle=h(d.serviceNames.priceoraclerpc.PriceOracle,u),this.rfq=h(d.serviceNames.rfqrpc.Rfq,u),this.tapChannels=h(d.serviceNames.tapchannelrpc.TaprootAssetChannels,u),this.tapDev=h(d.serviceNames.tapdevrpc.TapDev,u),this.universe=h(d.serviceNames.universerpc.Universe,u)}},4245(b,o,p){var d=this&&this.__createBinding||(Object.create?function(l,g,w,y){y===void 0&&(y=w),Object.defineProperty(l,y,{enumerable:!0,get:function(){return g[w]}})}:function(l,g,w,y){y===void 0&&(y=w),l[y]=g[w]}),h=this&&this.__exportStar||function(l,g){for(var w in l)w==="default"||Object.prototype.hasOwnProperty.call(g,w)||d(g,l,w)};Object.defineProperty(o,"__esModule",{value:!0}),o.subscriptionMethods=o.TaprootAssetsApi=o.LitApi=o.FaradayApi=o.PoolApi=o.LoopApi=o.LndApi=o.snakeKeysToCamel=o.isObject=o.camelKeysToSnake=void 0,h(p(4578),o);var u=p(1022);Object.defineProperty(o,"camelKeysToSnake",{enumerable:!0,get:function(){return u.camelKeysToSnake}}),Object.defineProperty(o,"isObject",{enumerable:!0,get:function(){return u.isObject}}),Object.defineProperty(o,"snakeKeysToCamel",{enumerable:!0,get:function(){return u.snakeKeysToCamel}});var c=p(3586);Object.defineProperty(o,"LndApi",{enumerable:!0,get:function(){return c.LndApi}}),Object.defineProperty(o,"LoopApi",{enumerable:!0,get:function(){return c.LoopApi}}),Object.defineProperty(o,"PoolApi",{enumerable:!0,get:function(){return c.PoolApi}}),Object.defineProperty(o,"FaradayApi",{enumerable:!0,get:function(){return c.FaradayApi}}),Object.defineProperty(o,"LitApi",{enumerable:!0,get:function(){return c.LitApi}}),Object.defineProperty(o,"TaprootAssetsApi",{enumerable:!0,get:function(){return c.TaprootAssetsApi}});var s=p(2495);Object.defineProperty(o,"subscriptionMethods",{enumerable:!0,get:function(){return s.subscriptionMethods}})},9444(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(5712),o)},1241(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(4376),o)},9926(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(2277),o)},6636(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(8647),o)},8925(b,o){var p,d,h,u;Object.defineProperty(o,"__esModule",{value:!0}),o.CloseRecommendationRequest_Metric=o.EntryType=o.FiatBackend=o.Granularity=void 0,(u=o.Granularity||(o.Granularity={})).UNKNOWN_GRANULARITY="UNKNOWN_GRANULARITY",u.MINUTE="MINUTE",u.FIVE_MINUTES="FIVE_MINUTES",u.FIFTEEN_MINUTES="FIFTEEN_MINUTES",u.THIRTY_MINUTES="THIRTY_MINUTES",u.HOUR="HOUR",u.SIX_HOURS="SIX_HOURS",u.TWELVE_HOURS="TWELVE_HOURS",u.DAY="DAY",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.FiatBackend||(o.FiatBackend={})).UNKNOWN_FIATBACKEND="UNKNOWN_FIATBACKEND",h.COINCAP="COINCAP",h.COINDESK="COINDESK",h.CUSTOM="CUSTOM",h.COINGECKO="COINGECKO",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.EntryType||(o.EntryType={})).UNKNOWN="UNKNOWN",d.LOCAL_CHANNEL_OPEN="LOCAL_CHANNEL_OPEN",d.REMOTE_CHANNEL_OPEN="REMOTE_CHANNEL_OPEN",d.CHANNEL_OPEN_FEE="CHANNEL_OPEN_FEE",d.CHANNEL_CLOSE="CHANNEL_CLOSE",d.RECEIPT="RECEIPT",d.PAYMENT="PAYMENT",d.FEE="FEE",d.CIRCULAR_RECEIPT="CIRCULAR_RECEIPT",d.FORWARD="FORWARD",d.FORWARD_FEE="FORWARD_FEE",d.CIRCULAR_PAYMENT="CIRCULAR_PAYMENT",d.CIRCULAR_FEE="CIRCULAR_FEE",d.SWEEP="SWEEP",d.SWEEP_FEE="SWEEP_FEE",d.CHANNEL_CLOSE_FEE="CHANNEL_CLOSE_FEE",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.CloseRecommendationRequest_Metric||(o.CloseRecommendationRequest_Metric={})).UNKNOWN="UNKNOWN",p.UPTIME="UPTIME",p.REVENUE="REVENUE",p.INCOMING_VOLUME="INCOMING_VOLUME",p.OUTGOING_VOLUME="OUTGOING_VOLUME",p.TOTAL_VOLUME="TOTAL_VOLUME",p.UNRECOGNIZED="UNRECOGNIZED"},8507(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(8925),o)},4578(b,o,p){var d=this&&this.__createBinding||(Object.create?function(P,B,G,V){V===void 0&&(V=G),Object.defineProperty(P,V,{enumerable:!0,get:function(){return B[G]}})}:function(P,B,G,V){V===void 0&&(V=G),P[V]=B[G]}),h=this&&this.__setModuleDefault||(Object.create?function(P,B){Object.defineProperty(P,"default",{enumerable:!0,value:B})}:function(P,B){P.default=B}),u=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var B={};if(P!=null)for(var G in P)G!=="default"&&Object.prototype.hasOwnProperty.call(P,G)&&d(B,P,G);return h(B,P),B};Object.defineProperty(o,"__esModule",{value:!0}),o.universerpc=o.taprpc=o.tapdevrpc=o.tapchannelrpc=o.rfqrpc=o.priceoraclerpc=o.mintrpc=o.authmailboxrpc=o.assetwalletrpc=o.poolrpc=o.looprpc=o.wtclientrpc=o.watchtowerrpc=o.walletrpc=o.signrpc=o.routerrpc=o.peersrpc=o.lnrpc=o.invoicesrpc=o.chainrpc=o.autopilotrpc=o.litrpc=o.frdrpc=void 0;var c=u(p(8507));o.frdrpc=c;var s=u(p(2844));o.litrpc=s;var l=u(p(9926));o.autopilotrpc=l;var g=u(p(6636));o.chainrpc=g;var w=u(p(8561));o.invoicesrpc=w;var y=u(p(1419));o.lnrpc=y;var v=u(p(1908));o.peersrpc=v;var m=u(p(6534));o.routerrpc=m;var C=u(p(8054));o.signrpc=C;var E=u(p(718));o.walletrpc=E;var O=u(p(5109));o.watchtowerrpc=O;var _=u(p(7685));o.wtclientrpc=_;var S=u(p(7967));o.looprpc=S;var R=u(p(2471));o.poolrpc=R;var A=u(p(9444));o.assetwalletrpc=A;var T=u(p(1241));o.authmailboxrpc=T;var N=u(p(1393));o.mintrpc=N;var x=u(p(2162));o.priceoraclerpc=x;var I=u(p(4386));o.rfqrpc=I;var L=u(p(8933));o.tapchannelrpc=L;var H=u(p(8753));o.tapdevrpc=H;var Z=u(p(5600));o.taprpc=Z;var K=u(p(7164));o.universerpc=K},8561(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(4195),o)},8650(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.ActionState=void 0,(p=o.ActionState||(o.ActionState={})).STATE_UNKNOWN="STATE_UNKNOWN",p.STATE_PENDING="STATE_PENDING",p.STATE_DONE="STATE_DONE",p.STATE_ERROR="STATE_ERROR",p.UNRECOGNIZED="UNRECOGNIZED"},5547(b,o){Object.defineProperty(o,"__esModule",{value:!0})},1199(b,o){var p,d;Object.defineProperty(o,"__esModule",{value:!0}),o.SessionState=o.SessionType=void 0,(d=o.SessionType||(o.SessionType={})).TYPE_MACAROON_READONLY="TYPE_MACAROON_READONLY",d.TYPE_MACAROON_ADMIN="TYPE_MACAROON_ADMIN",d.TYPE_MACAROON_CUSTOM="TYPE_MACAROON_CUSTOM",d.TYPE_UI_PASSWORD="TYPE_UI_PASSWORD",d.TYPE_AUTOPILOT="TYPE_AUTOPILOT",d.TYPE_MACAROON_ACCOUNT="TYPE_MACAROON_ACCOUNT",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.SessionState||(o.SessionState={})).STATE_CREATED="STATE_CREATED",p.STATE_IN_USE="STATE_IN_USE",p.STATE_REVOKED="STATE_REVOKED",p.STATE_EXPIRED="STATE_EXPIRED",p.STATE_RESERVED="STATE_RESERVED",p.UNRECOGNIZED="UNRECOGNIZED"},6440(b,o){Object.defineProperty(o,"__esModule",{value:!0})},2844(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(8650),o),h(p(5547),o),h(p(1199),o),h(p(6440),o)},2277(b,o){Object.defineProperty(o,"__esModule",{value:!0})},8647(b,o){Object.defineProperty(o,"__esModule",{value:!0})},4195(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.LookupModifier=void 0,(p=o.LookupModifier||(o.LookupModifier={})).DEFAULT="DEFAULT",p.HTLC_SET_ONLY="HTLC_SET_ONLY",p.HTLC_SET_BLANK="HTLC_SET_BLANK",p.UNRECOGNIZED="UNRECOGNIZED"},4377(b,o){var p,d,h,u,c,s,l,g,w,y,v,m,C,E,O,_,S,R,A,T,N;Object.defineProperty(o,"__esModule",{value:!0}),o.Failure_FailureCode=o.HTLCAttempt_HTLCStatus=o.Payment_PaymentStatus=o.Invoice_InvoiceState=o.ChannelEventUpdate_UpdateType=o.PendingChannelsResponse_ForceClosedChannel_AnchorState=o.PeerEvent_EventType=o.Peer_SyncType=o.ChannelCloseSummary_ClosureType=o.UpdateFailure=o.FeatureBit=o.PaymentFailureReason=o.InvoiceHTLCState=o.NodeMetricType=o.ResolutionOutcome=o.ResolutionType=o.Initiator=o.CommitmentType=o.AddressType=o.CoinSelectionStrategy=o.OutputScriptType=void 0,(N=o.OutputScriptType||(o.OutputScriptType={})).SCRIPT_TYPE_PUBKEY_HASH="SCRIPT_TYPE_PUBKEY_HASH",N.SCRIPT_TYPE_SCRIPT_HASH="SCRIPT_TYPE_SCRIPT_HASH",N.SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH="SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH",N.SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH="SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH",N.SCRIPT_TYPE_PUBKEY="SCRIPT_TYPE_PUBKEY",N.SCRIPT_TYPE_MULTISIG="SCRIPT_TYPE_MULTISIG",N.SCRIPT_TYPE_NULLDATA="SCRIPT_TYPE_NULLDATA",N.SCRIPT_TYPE_NON_STANDARD="SCRIPT_TYPE_NON_STANDARD",N.SCRIPT_TYPE_WITNESS_UNKNOWN="SCRIPT_TYPE_WITNESS_UNKNOWN",N.SCRIPT_TYPE_WITNESS_V1_TAPROOT="SCRIPT_TYPE_WITNESS_V1_TAPROOT",N.UNRECOGNIZED="UNRECOGNIZED",(T=o.CoinSelectionStrategy||(o.CoinSelectionStrategy={})).STRATEGY_USE_GLOBAL_CONFIG="STRATEGY_USE_GLOBAL_CONFIG",T.STRATEGY_LARGEST="STRATEGY_LARGEST",T.STRATEGY_RANDOM="STRATEGY_RANDOM",T.UNRECOGNIZED="UNRECOGNIZED",(A=o.AddressType||(o.AddressType={})).WITNESS_PUBKEY_HASH="WITNESS_PUBKEY_HASH",A.NESTED_PUBKEY_HASH="NESTED_PUBKEY_HASH",A.UNUSED_WITNESS_PUBKEY_HASH="UNUSED_WITNESS_PUBKEY_HASH",A.UNUSED_NESTED_PUBKEY_HASH="UNUSED_NESTED_PUBKEY_HASH",A.TAPROOT_PUBKEY="TAPROOT_PUBKEY",A.UNUSED_TAPROOT_PUBKEY="UNUSED_TAPROOT_PUBKEY",A.UNRECOGNIZED="UNRECOGNIZED",(R=o.CommitmentType||(o.CommitmentType={})).UNKNOWN_COMMITMENT_TYPE="UNKNOWN_COMMITMENT_TYPE",R.LEGACY="LEGACY",R.STATIC_REMOTE_KEY="STATIC_REMOTE_KEY",R.ANCHORS="ANCHORS",R.SCRIPT_ENFORCED_LEASE="SCRIPT_ENFORCED_LEASE",R.SIMPLE_TAPROOT="SIMPLE_TAPROOT",R.SIMPLE_TAPROOT_OVERLAY="SIMPLE_TAPROOT_OVERLAY",R.UNRECOGNIZED="UNRECOGNIZED",(S=o.Initiator||(o.Initiator={})).INITIATOR_UNKNOWN="INITIATOR_UNKNOWN",S.INITIATOR_LOCAL="INITIATOR_LOCAL",S.INITIATOR_REMOTE="INITIATOR_REMOTE",S.INITIATOR_BOTH="INITIATOR_BOTH",S.UNRECOGNIZED="UNRECOGNIZED",(_=o.ResolutionType||(o.ResolutionType={})).TYPE_UNKNOWN="TYPE_UNKNOWN",_.ANCHOR="ANCHOR",_.INCOMING_HTLC="INCOMING_HTLC",_.OUTGOING_HTLC="OUTGOING_HTLC",_.COMMIT="COMMIT",_.UNRECOGNIZED="UNRECOGNIZED",(O=o.ResolutionOutcome||(o.ResolutionOutcome={})).OUTCOME_UNKNOWN="OUTCOME_UNKNOWN",O.CLAIMED="CLAIMED",O.UNCLAIMED="UNCLAIMED",O.ABANDONED="ABANDONED",O.FIRST_STAGE="FIRST_STAGE",O.TIMEOUT="TIMEOUT",O.UNRECOGNIZED="UNRECOGNIZED",(E=o.NodeMetricType||(o.NodeMetricType={})).UNKNOWN="UNKNOWN",E.BETWEENNESS_CENTRALITY="BETWEENNESS_CENTRALITY",E.UNRECOGNIZED="UNRECOGNIZED",(C=o.InvoiceHTLCState||(o.InvoiceHTLCState={})).ACCEPTED="ACCEPTED",C.SETTLED="SETTLED",C.CANCELED="CANCELED",C.UNRECOGNIZED="UNRECOGNIZED",(m=o.PaymentFailureReason||(o.PaymentFailureReason={})).FAILURE_REASON_NONE="FAILURE_REASON_NONE",m.FAILURE_REASON_TIMEOUT="FAILURE_REASON_TIMEOUT",m.FAILURE_REASON_NO_ROUTE="FAILURE_REASON_NO_ROUTE",m.FAILURE_REASON_ERROR="FAILURE_REASON_ERROR",m.FAILURE_REASON_INCORRECT_PAYMENT_DETAILS="FAILURE_REASON_INCORRECT_PAYMENT_DETAILS",m.FAILURE_REASON_INSUFFICIENT_BALANCE="FAILURE_REASON_INSUFFICIENT_BALANCE",m.FAILURE_REASON_CANCELED="FAILURE_REASON_CANCELED",m.UNRECOGNIZED="UNRECOGNIZED",(v=o.FeatureBit||(o.FeatureBit={})).DATALOSS_PROTECT_REQ="DATALOSS_PROTECT_REQ",v.DATALOSS_PROTECT_OPT="DATALOSS_PROTECT_OPT",v.INITIAL_ROUING_SYNC="INITIAL_ROUING_SYNC",v.UPFRONT_SHUTDOWN_SCRIPT_REQ="UPFRONT_SHUTDOWN_SCRIPT_REQ",v.UPFRONT_SHUTDOWN_SCRIPT_OPT="UPFRONT_SHUTDOWN_SCRIPT_OPT",v.GOSSIP_QUERIES_REQ="GOSSIP_QUERIES_REQ",v.GOSSIP_QUERIES_OPT="GOSSIP_QUERIES_OPT",v.TLV_ONION_REQ="TLV_ONION_REQ",v.TLV_ONION_OPT="TLV_ONION_OPT",v.EXT_GOSSIP_QUERIES_REQ="EXT_GOSSIP_QUERIES_REQ",v.EXT_GOSSIP_QUERIES_OPT="EXT_GOSSIP_QUERIES_OPT",v.STATIC_REMOTE_KEY_REQ="STATIC_REMOTE_KEY_REQ",v.STATIC_REMOTE_KEY_OPT="STATIC_REMOTE_KEY_OPT",v.PAYMENT_ADDR_REQ="PAYMENT_ADDR_REQ",v.PAYMENT_ADDR_OPT="PAYMENT_ADDR_OPT",v.MPP_REQ="MPP_REQ",v.MPP_OPT="MPP_OPT",v.WUMBO_CHANNELS_REQ="WUMBO_CHANNELS_REQ",v.WUMBO_CHANNELS_OPT="WUMBO_CHANNELS_OPT",v.ANCHORS_REQ="ANCHORS_REQ",v.ANCHORS_OPT="ANCHORS_OPT",v.ANCHORS_ZERO_FEE_HTLC_REQ="ANCHORS_ZERO_FEE_HTLC_REQ",v.ANCHORS_ZERO_FEE_HTLC_OPT="ANCHORS_ZERO_FEE_HTLC_OPT",v.ROUTE_BLINDING_REQUIRED="ROUTE_BLINDING_REQUIRED",v.ROUTE_BLINDING_OPTIONAL="ROUTE_BLINDING_OPTIONAL",v.AMP_REQ="AMP_REQ",v.AMP_OPT="AMP_OPT",v.UNRECOGNIZED="UNRECOGNIZED",(y=o.UpdateFailure||(o.UpdateFailure={})).UPDATE_FAILURE_UNKNOWN="UPDATE_FAILURE_UNKNOWN",y.UPDATE_FAILURE_PENDING="UPDATE_FAILURE_PENDING",y.UPDATE_FAILURE_NOT_FOUND="UPDATE_FAILURE_NOT_FOUND",y.UPDATE_FAILURE_INTERNAL_ERR="UPDATE_FAILURE_INTERNAL_ERR",y.UPDATE_FAILURE_INVALID_PARAMETER="UPDATE_FAILURE_INVALID_PARAMETER",y.UNRECOGNIZED="UNRECOGNIZED",(w=o.ChannelCloseSummary_ClosureType||(o.ChannelCloseSummary_ClosureType={})).COOPERATIVE_CLOSE="COOPERATIVE_CLOSE",w.LOCAL_FORCE_CLOSE="LOCAL_FORCE_CLOSE",w.REMOTE_FORCE_CLOSE="REMOTE_FORCE_CLOSE",w.BREACH_CLOSE="BREACH_CLOSE",w.FUNDING_CANCELED="FUNDING_CANCELED",w.ABANDONED="ABANDONED",w.UNRECOGNIZED="UNRECOGNIZED",(g=o.Peer_SyncType||(o.Peer_SyncType={})).UNKNOWN_SYNC="UNKNOWN_SYNC",g.ACTIVE_SYNC="ACTIVE_SYNC",g.PASSIVE_SYNC="PASSIVE_SYNC",g.PINNED_SYNC="PINNED_SYNC",g.UNRECOGNIZED="UNRECOGNIZED",(l=o.PeerEvent_EventType||(o.PeerEvent_EventType={})).PEER_ONLINE="PEER_ONLINE",l.PEER_OFFLINE="PEER_OFFLINE",l.UNRECOGNIZED="UNRECOGNIZED",(s=o.PendingChannelsResponse_ForceClosedChannel_AnchorState||(o.PendingChannelsResponse_ForceClosedChannel_AnchorState={})).LIMBO="LIMBO",s.RECOVERED="RECOVERED",s.LOST="LOST",s.UNRECOGNIZED="UNRECOGNIZED",(c=o.ChannelEventUpdate_UpdateType||(o.ChannelEventUpdate_UpdateType={})).OPEN_CHANNEL="OPEN_CHANNEL",c.CLOSED_CHANNEL="CLOSED_CHANNEL",c.ACTIVE_CHANNEL="ACTIVE_CHANNEL",c.INACTIVE_CHANNEL="INACTIVE_CHANNEL",c.PENDING_OPEN_CHANNEL="PENDING_OPEN_CHANNEL",c.FULLY_RESOLVED_CHANNEL="FULLY_RESOLVED_CHANNEL",c.CHANNEL_FUNDING_TIMEOUT="CHANNEL_FUNDING_TIMEOUT",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.Invoice_InvoiceState||(o.Invoice_InvoiceState={})).OPEN="OPEN",u.SETTLED="SETTLED",u.CANCELED="CANCELED",u.ACCEPTED="ACCEPTED",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.Payment_PaymentStatus||(o.Payment_PaymentStatus={})).UNKNOWN="UNKNOWN",h.IN_FLIGHT="IN_FLIGHT",h.SUCCEEDED="SUCCEEDED",h.FAILED="FAILED",h.INITIATED="INITIATED",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.HTLCAttempt_HTLCStatus||(o.HTLCAttempt_HTLCStatus={})).IN_FLIGHT="IN_FLIGHT",d.SUCCEEDED="SUCCEEDED",d.FAILED="FAILED",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.Failure_FailureCode||(o.Failure_FailureCode={})).RESERVED="RESERVED",p.INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS="INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS",p.INCORRECT_PAYMENT_AMOUNT="INCORRECT_PAYMENT_AMOUNT",p.FINAL_INCORRECT_CLTV_EXPIRY="FINAL_INCORRECT_CLTV_EXPIRY",p.FINAL_INCORRECT_HTLC_AMOUNT="FINAL_INCORRECT_HTLC_AMOUNT",p.FINAL_EXPIRY_TOO_SOON="FINAL_EXPIRY_TOO_SOON",p.INVALID_REALM="INVALID_REALM",p.EXPIRY_TOO_SOON="EXPIRY_TOO_SOON",p.INVALID_ONION_VERSION="INVALID_ONION_VERSION",p.INVALID_ONION_HMAC="INVALID_ONION_HMAC",p.INVALID_ONION_KEY="INVALID_ONION_KEY",p.AMOUNT_BELOW_MINIMUM="AMOUNT_BELOW_MINIMUM",p.FEE_INSUFFICIENT="FEE_INSUFFICIENT",p.INCORRECT_CLTV_EXPIRY="INCORRECT_CLTV_EXPIRY",p.CHANNEL_DISABLED="CHANNEL_DISABLED",p.TEMPORARY_CHANNEL_FAILURE="TEMPORARY_CHANNEL_FAILURE",p.REQUIRED_NODE_FEATURE_MISSING="REQUIRED_NODE_FEATURE_MISSING",p.REQUIRED_CHANNEL_FEATURE_MISSING="REQUIRED_CHANNEL_FEATURE_MISSING",p.UNKNOWN_NEXT_PEER="UNKNOWN_NEXT_PEER",p.TEMPORARY_NODE_FAILURE="TEMPORARY_NODE_FAILURE",p.PERMANENT_NODE_FAILURE="PERMANENT_NODE_FAILURE",p.PERMANENT_CHANNEL_FAILURE="PERMANENT_CHANNEL_FAILURE",p.EXPIRY_TOO_FAR="EXPIRY_TOO_FAR",p.MPP_TIMEOUT="MPP_TIMEOUT",p.INVALID_ONION_PAYLOAD="INVALID_ONION_PAYLOAD",p.INVALID_ONION_BLINDING="INVALID_ONION_BLINDING",p.INTERNAL_FAILURE="INTERNAL_FAILURE",p.UNKNOWN_FAILURE="UNKNOWN_FAILURE",p.UNREADABLE_FAILURE="UNREADABLE_FAILURE",p.UNRECOGNIZED="UNRECOGNIZED"},9353(b,o){var p,d;Object.defineProperty(o,"__esModule",{value:!0}),o.FeatureSet=o.UpdateAction=void 0,(d=o.UpdateAction||(o.UpdateAction={})).ADD="ADD",d.REMOVE="REMOVE",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.FeatureSet||(o.FeatureSet={})).SET_INIT="SET_INIT",p.SET_LEGACY_GLOBAL="SET_LEGACY_GLOBAL",p.SET_NODE_ANN="SET_NODE_ANN",p.SET_INVOICE="SET_INVOICE",p.SET_INVOICE_AMP="SET_INVOICE_AMP",p.UNRECOGNIZED="UNRECOGNIZED"},7543(b,o){var p,d,h,u,c,s;Object.defineProperty(o,"__esModule",{value:!0}),o.HtlcEvent_EventType=o.MissionControlConfig_ProbabilityModel=o.ChanStatusAction=o.ResolveHoldForwardAction=o.PaymentState=o.FailureDetail=void 0,(s=o.FailureDetail||(o.FailureDetail={})).UNKNOWN="UNKNOWN",s.NO_DETAIL="NO_DETAIL",s.ONION_DECODE="ONION_DECODE",s.LINK_NOT_ELIGIBLE="LINK_NOT_ELIGIBLE",s.ON_CHAIN_TIMEOUT="ON_CHAIN_TIMEOUT",s.HTLC_EXCEEDS_MAX="HTLC_EXCEEDS_MAX",s.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",s.INCOMPLETE_FORWARD="INCOMPLETE_FORWARD",s.HTLC_ADD_FAILED="HTLC_ADD_FAILED",s.FORWARDS_DISABLED="FORWARDS_DISABLED",s.INVOICE_CANCELED="INVOICE_CANCELED",s.INVOICE_UNDERPAID="INVOICE_UNDERPAID",s.INVOICE_EXPIRY_TOO_SOON="INVOICE_EXPIRY_TOO_SOON",s.INVOICE_NOT_OPEN="INVOICE_NOT_OPEN",s.MPP_INVOICE_TIMEOUT="MPP_INVOICE_TIMEOUT",s.ADDRESS_MISMATCH="ADDRESS_MISMATCH",s.SET_TOTAL_MISMATCH="SET_TOTAL_MISMATCH",s.SET_TOTAL_TOO_LOW="SET_TOTAL_TOO_LOW",s.SET_OVERPAID="SET_OVERPAID",s.UNKNOWN_INVOICE="UNKNOWN_INVOICE",s.INVALID_KEYSEND="INVALID_KEYSEND",s.MPP_IN_PROGRESS="MPP_IN_PROGRESS",s.CIRCULAR_ROUTE="CIRCULAR_ROUTE",s.UNRECOGNIZED="UNRECOGNIZED",(c=o.PaymentState||(o.PaymentState={})).IN_FLIGHT="IN_FLIGHT",c.SUCCEEDED="SUCCEEDED",c.FAILED_TIMEOUT="FAILED_TIMEOUT",c.FAILED_NO_ROUTE="FAILED_NO_ROUTE",c.FAILED_ERROR="FAILED_ERROR",c.FAILED_INCORRECT_PAYMENT_DETAILS="FAILED_INCORRECT_PAYMENT_DETAILS",c.FAILED_INSUFFICIENT_BALANCE="FAILED_INSUFFICIENT_BALANCE",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.ResolveHoldForwardAction||(o.ResolveHoldForwardAction={})).SETTLE="SETTLE",u.FAIL="FAIL",u.RESUME="RESUME",u.RESUME_MODIFIED="RESUME_MODIFIED",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.ChanStatusAction||(o.ChanStatusAction={})).ENABLE="ENABLE",h.DISABLE="DISABLE",h.AUTO="AUTO",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.MissionControlConfig_ProbabilityModel||(o.MissionControlConfig_ProbabilityModel={})).APRIORI="APRIORI",d.BIMODAL="BIMODAL",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.HtlcEvent_EventType||(o.HtlcEvent_EventType={})).UNKNOWN="UNKNOWN",p.SEND="SEND",p.RECEIVE="RECEIVE",p.FORWARD="FORWARD",p.UNRECOGNIZED="UNRECOGNIZED"},5636(b,o){var p,d;Object.defineProperty(o,"__esModule",{value:!0}),o.MuSig2Version=o.SignMethod=void 0,(d=o.SignMethod||(o.SignMethod={})).SIGN_METHOD_WITNESS_V0="SIGN_METHOD_WITNESS_V0",d.SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086="SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086",d.SIGN_METHOD_TAPROOT_KEY_SPEND="SIGN_METHOD_TAPROOT_KEY_SPEND",d.SIGN_METHOD_TAPROOT_SCRIPT_SPEND="SIGN_METHOD_TAPROOT_SCRIPT_SPEND",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.MuSig2Version||(o.MuSig2Version={})).MUSIG2_VERSION_UNDEFINED="MUSIG2_VERSION_UNDEFINED",p.MUSIG2_VERSION_V040="MUSIG2_VERSION_V040",p.MUSIG2_VERSION_V100RC2="MUSIG2_VERSION_V100RC2",p.UNRECOGNIZED="UNRECOGNIZED"},4219(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.WalletState=void 0,(p=o.WalletState||(o.WalletState={})).NON_EXISTING="NON_EXISTING",p.LOCKED="LOCKED",p.UNLOCKED="UNLOCKED",p.RPC_ACTIVE="RPC_ACTIVE",p.SERVER_ACTIVE="SERVER_ACTIVE",p.WAITING_TO_START="WAITING_TO_START",p.UNRECOGNIZED="UNRECOGNIZED"},5779(b,o){var p,d,h;Object.defineProperty(o,"__esModule",{value:!0}),o.ChangeAddressType=o.WitnessType=o.AddressType=void 0,(h=o.AddressType||(o.AddressType={})).UNKNOWN="UNKNOWN",h.WITNESS_PUBKEY_HASH="WITNESS_PUBKEY_HASH",h.NESTED_WITNESS_PUBKEY_HASH="NESTED_WITNESS_PUBKEY_HASH",h.HYBRID_NESTED_WITNESS_PUBKEY_HASH="HYBRID_NESTED_WITNESS_PUBKEY_HASH",h.TAPROOT_PUBKEY="TAPROOT_PUBKEY",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.WitnessType||(o.WitnessType={})).UNKNOWN_WITNESS="UNKNOWN_WITNESS",d.COMMITMENT_TIME_LOCK="COMMITMENT_TIME_LOCK",d.COMMITMENT_NO_DELAY="COMMITMENT_NO_DELAY",d.COMMITMENT_REVOKE="COMMITMENT_REVOKE",d.HTLC_OFFERED_REVOKE="HTLC_OFFERED_REVOKE",d.HTLC_ACCEPTED_REVOKE="HTLC_ACCEPTED_REVOKE",d.HTLC_OFFERED_TIMEOUT_SECOND_LEVEL="HTLC_OFFERED_TIMEOUT_SECOND_LEVEL",d.HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL="HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL",d.HTLC_OFFERED_REMOTE_TIMEOUT="HTLC_OFFERED_REMOTE_TIMEOUT",d.HTLC_ACCEPTED_REMOTE_SUCCESS="HTLC_ACCEPTED_REMOTE_SUCCESS",d.HTLC_SECOND_LEVEL_REVOKE="HTLC_SECOND_LEVEL_REVOKE",d.WITNESS_KEY_HASH="WITNESS_KEY_HASH",d.NESTED_WITNESS_KEY_HASH="NESTED_WITNESS_KEY_HASH",d.COMMITMENT_ANCHOR="COMMITMENT_ANCHOR",d.COMMITMENT_NO_DELAY_TWEAKLESS="COMMITMENT_NO_DELAY_TWEAKLESS",d.COMMITMENT_TO_REMOTE_CONFIRMED="COMMITMENT_TO_REMOTE_CONFIRMED",d.HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED="HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED",d.HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED="HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED",d.LEASE_COMMITMENT_TIME_LOCK="LEASE_COMMITMENT_TIME_LOCK",d.LEASE_COMMITMENT_TO_REMOTE_CONFIRMED="LEASE_COMMITMENT_TO_REMOTE_CONFIRMED",d.LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL="LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL",d.LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL="LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL",d.TAPROOT_PUB_KEY_SPEND="TAPROOT_PUB_KEY_SPEND",d.TAPROOT_LOCAL_COMMIT_SPEND="TAPROOT_LOCAL_COMMIT_SPEND",d.TAPROOT_REMOTE_COMMIT_SPEND="TAPROOT_REMOTE_COMMIT_SPEND",d.TAPROOT_ANCHOR_SWEEP_SPEND="TAPROOT_ANCHOR_SWEEP_SPEND",d.TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL="TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL",d.TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL="TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL",d.TAPROOT_HTLC_SECOND_LEVEL_REVOKE="TAPROOT_HTLC_SECOND_LEVEL_REVOKE",d.TAPROOT_HTLC_ACCEPTED_REVOKE="TAPROOT_HTLC_ACCEPTED_REVOKE",d.TAPROOT_HTLC_OFFERED_REVOKE="TAPROOT_HTLC_OFFERED_REVOKE",d.TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT="TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT",d.TAPROOT_HTLC_LOCAL_OFFERED_TIMEOUT="TAPROOT_HTLC_LOCAL_OFFERED_TIMEOUT",d.TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS="TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS",d.TAPROOT_HTLC_ACCEPTED_LOCAL_SUCCESS="TAPROOT_HTLC_ACCEPTED_LOCAL_SUCCESS",d.TAPROOT_COMMITMENT_REVOKE="TAPROOT_COMMITMENT_REVOKE",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.ChangeAddressType||(o.ChangeAddressType={})).CHANGE_ADDRESS_TYPE_UNSPECIFIED="CHANGE_ADDRESS_TYPE_UNSPECIFIED",p.CHANGE_ADDRESS_TYPE_P2TR="CHANGE_ADDRESS_TYPE_P2TR",p.UNRECOGNIZED="UNRECOGNIZED"},5577(b,o){Object.defineProperty(o,"__esModule",{value:!0})},4899(b,o){Object.defineProperty(o,"__esModule",{value:!0})},6035(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.PolicyType=void 0,(p=o.PolicyType||(o.PolicyType={})).LEGACY="LEGACY",p.ANCHOR="ANCHOR",p.TAPROOT="TAPROOT",p.UNRECOGNIZED="UNRECOGNIZED"},1419(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(4377),o),h(p(4219),o),h(p(5577),o)},1730(b,o){var p,d,h,u,c,s,l,g,w;Object.defineProperty(o,"__esModule",{value:!0}),o.ListSwapsFilter_SwapTypeFilter=o.StaticAddressLoopInSwapState=o.DepositState=o.AutoReason=o.LiquidityRuleType=o.FailureReason=o.SwapState=o.SwapType=o.AddressType=void 0,(w=o.AddressType||(o.AddressType={})).ADDRESS_TYPE_UNKNOWN="ADDRESS_TYPE_UNKNOWN",w.TAPROOT_PUBKEY="TAPROOT_PUBKEY",w.UNRECOGNIZED="UNRECOGNIZED",(g=o.SwapType||(o.SwapType={})).LOOP_OUT="LOOP_OUT",g.LOOP_IN="LOOP_IN",g.UNRECOGNIZED="UNRECOGNIZED",(l=o.SwapState||(o.SwapState={})).INITIATED="INITIATED",l.PREIMAGE_REVEALED="PREIMAGE_REVEALED",l.HTLC_PUBLISHED="HTLC_PUBLISHED",l.SUCCESS="SUCCESS",l.FAILED="FAILED",l.INVOICE_SETTLED="INVOICE_SETTLED",l.UNRECOGNIZED="UNRECOGNIZED",(s=o.FailureReason||(o.FailureReason={})).FAILURE_REASON_NONE="FAILURE_REASON_NONE",s.FAILURE_REASON_OFFCHAIN="FAILURE_REASON_OFFCHAIN",s.FAILURE_REASON_TIMEOUT="FAILURE_REASON_TIMEOUT",s.FAILURE_REASON_SWEEP_TIMEOUT="FAILURE_REASON_SWEEP_TIMEOUT",s.FAILURE_REASON_INSUFFICIENT_VALUE="FAILURE_REASON_INSUFFICIENT_VALUE",s.FAILURE_REASON_TEMPORARY="FAILURE_REASON_TEMPORARY",s.FAILURE_REASON_INCORRECT_AMOUNT="FAILURE_REASON_INCORRECT_AMOUNT",s.FAILURE_REASON_ABANDONED="FAILURE_REASON_ABANDONED",s.FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE="FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE",s.FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT="FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT",s.UNRECOGNIZED="UNRECOGNIZED",(c=o.LiquidityRuleType||(o.LiquidityRuleType={})).UNKNOWN="UNKNOWN",c.THRESHOLD="THRESHOLD",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.AutoReason||(o.AutoReason={})).AUTO_REASON_UNKNOWN="AUTO_REASON_UNKNOWN",u.AUTO_REASON_BUDGET_NOT_STARTED="AUTO_REASON_BUDGET_NOT_STARTED",u.AUTO_REASON_SWEEP_FEES="AUTO_REASON_SWEEP_FEES",u.AUTO_REASON_BUDGET_ELAPSED="AUTO_REASON_BUDGET_ELAPSED",u.AUTO_REASON_IN_FLIGHT="AUTO_REASON_IN_FLIGHT",u.AUTO_REASON_SWAP_FEE="AUTO_REASON_SWAP_FEE",u.AUTO_REASON_MINER_FEE="AUTO_REASON_MINER_FEE",u.AUTO_REASON_PREPAY="AUTO_REASON_PREPAY",u.AUTO_REASON_FAILURE_BACKOFF="AUTO_REASON_FAILURE_BACKOFF",u.AUTO_REASON_LOOP_OUT="AUTO_REASON_LOOP_OUT",u.AUTO_REASON_LOOP_IN="AUTO_REASON_LOOP_IN",u.AUTO_REASON_LIQUIDITY_OK="AUTO_REASON_LIQUIDITY_OK",u.AUTO_REASON_BUDGET_INSUFFICIENT="AUTO_REASON_BUDGET_INSUFFICIENT",u.AUTO_REASON_FEE_INSUFFICIENT="AUTO_REASON_FEE_INSUFFICIENT",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.DepositState||(o.DepositState={})).UNKNOWN_STATE="UNKNOWN_STATE",h.DEPOSITED="DEPOSITED",h.WITHDRAWING="WITHDRAWING",h.WITHDRAWN="WITHDRAWN",h.LOOPING_IN="LOOPING_IN",h.LOOPED_IN="LOOPED_IN",h.SWEEP_HTLC_TIMEOUT="SWEEP_HTLC_TIMEOUT",h.HTLC_TIMEOUT_SWEPT="HTLC_TIMEOUT_SWEPT",h.PUBLISH_EXPIRED="PUBLISH_EXPIRED",h.WAIT_FOR_EXPIRY_SWEEP="WAIT_FOR_EXPIRY_SWEEP",h.EXPIRED="EXPIRED",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.StaticAddressLoopInSwapState||(o.StaticAddressLoopInSwapState={})).UNKNOWN_STATIC_ADDRESS_SWAP_STATE="UNKNOWN_STATIC_ADDRESS_SWAP_STATE",d.INIT_HTLC="INIT_HTLC",d.SIGN_HTLC_TX="SIGN_HTLC_TX",d.MONITOR_INVOICE_HTLC_TX="MONITOR_INVOICE_HTLC_TX",d.PAYMENT_RECEIVED="PAYMENT_RECEIVED",d.SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT="SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT",d.MONITOR_HTLC_TIMEOUT_SWEEP="MONITOR_HTLC_TIMEOUT_SWEEP",d.HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT="HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT",d.SUCCEEDED="SUCCEEDED",d.SUCCEEDED_TRANSITIONING_FAILED="SUCCEEDED_TRANSITIONING_FAILED",d.UNLOCK_DEPOSITS="UNLOCK_DEPOSITS",d.FAILED_STATIC_ADDRESS_SWAP="FAILED_STATIC_ADDRESS_SWAP",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.ListSwapsFilter_SwapTypeFilter||(o.ListSwapsFilter_SwapTypeFilter={})).ANY="ANY",p.LOOP_OUT="LOOP_OUT",p.LOOP_IN="LOOP_IN",p.UNRECOGNIZED="UNRECOGNIZED"},66(b,o){Object.defineProperty(o,"__esModule",{value:!0})},7967(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(1730),o),h(p(66),o)},1393(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(5398),o)},1908(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(9353),o)},3029(b,o){var p,d,h,u,c,s,l,g,w,y,v,m,C,E;Object.defineProperty(o,"__esModule",{value:!0}),o.InvalidOrder_FailReason=o.AccountDiff_AccountState=o.SubscribeError_Error=o.OrderReject_OrderRejectReason=o.OrderMatchReject_RejectReason=o.DurationBucketState=o.OrderState=o.ChannelConfirmationConstraints=o.ChannelAnnouncementConstraints=o.NodeTier=o.AuctionType=o.OrderChannelType=o.AuctionAccountState=o.ChannelType=void 0,(E=o.ChannelType||(o.ChannelType={})).TWEAKLESS="TWEAKLESS",E.ANCHORS="ANCHORS",E.SCRIPT_ENFORCED_LEASE="SCRIPT_ENFORCED_LEASE",E.UNRECOGNIZED="UNRECOGNIZED",(C=o.AuctionAccountState||(o.AuctionAccountState={})).STATE_PENDING_OPEN="STATE_PENDING_OPEN",C.STATE_OPEN="STATE_OPEN",C.STATE_EXPIRED="STATE_EXPIRED",C.STATE_PENDING_UPDATE="STATE_PENDING_UPDATE",C.STATE_CLOSED="STATE_CLOSED",C.STATE_PENDING_BATCH="STATE_PENDING_BATCH",C.STATE_EXPIRED_PENDING_UPDATE="STATE_EXPIRED_PENDING_UPDATE",C.UNRECOGNIZED="UNRECOGNIZED",(m=o.OrderChannelType||(o.OrderChannelType={})).ORDER_CHANNEL_TYPE_UNKNOWN="ORDER_CHANNEL_TYPE_UNKNOWN",m.ORDER_CHANNEL_TYPE_PEER_DEPENDENT="ORDER_CHANNEL_TYPE_PEER_DEPENDENT",m.ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED="ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED",m.UNRECOGNIZED="UNRECOGNIZED",(v=o.AuctionType||(o.AuctionType={})).AUCTION_TYPE_BTC_INBOUND_LIQUIDITY="AUCTION_TYPE_BTC_INBOUND_LIQUIDITY",v.AUCTION_TYPE_BTC_OUTBOUND_LIQUIDITY="AUCTION_TYPE_BTC_OUTBOUND_LIQUIDITY",v.UNRECOGNIZED="UNRECOGNIZED",(y=o.NodeTier||(o.NodeTier={})).TIER_DEFAULT="TIER_DEFAULT",y.TIER_0="TIER_0",y.TIER_1="TIER_1",y.UNRECOGNIZED="UNRECOGNIZED",(w=o.ChannelAnnouncementConstraints||(o.ChannelAnnouncementConstraints={})).ANNOUNCEMENT_NO_PREFERENCE="ANNOUNCEMENT_NO_PREFERENCE",w.ONLY_ANNOUNCED="ONLY_ANNOUNCED",w.ONLY_UNANNOUNCED="ONLY_UNANNOUNCED",w.UNRECOGNIZED="UNRECOGNIZED",(g=o.ChannelConfirmationConstraints||(o.ChannelConfirmationConstraints={})).CONFIRMATION_NO_PREFERENCE="CONFIRMATION_NO_PREFERENCE",g.ONLY_CONFIRMED="ONLY_CONFIRMED",g.ONLY_ZEROCONF="ONLY_ZEROCONF",g.UNRECOGNIZED="UNRECOGNIZED",(l=o.OrderState||(o.OrderState={})).ORDER_SUBMITTED="ORDER_SUBMITTED",l.ORDER_CLEARED="ORDER_CLEARED",l.ORDER_PARTIALLY_FILLED="ORDER_PARTIALLY_FILLED",l.ORDER_EXECUTED="ORDER_EXECUTED",l.ORDER_CANCELED="ORDER_CANCELED",l.ORDER_EXPIRED="ORDER_EXPIRED",l.ORDER_FAILED="ORDER_FAILED",l.UNRECOGNIZED="UNRECOGNIZED",(s=o.DurationBucketState||(o.DurationBucketState={})).NO_MARKET="NO_MARKET",s.MARKET_CLOSED="MARKET_CLOSED",s.ACCEPTING_ORDERS="ACCEPTING_ORDERS",s.MARKET_OPEN="MARKET_OPEN",s.UNRECOGNIZED="UNRECOGNIZED",(c=o.OrderMatchReject_RejectReason||(o.OrderMatchReject_RejectReason={})).UNKNOWN="UNKNOWN",c.SERVER_MISBEHAVIOR="SERVER_MISBEHAVIOR",c.BATCH_VERSION_MISMATCH="BATCH_VERSION_MISMATCH",c.PARTIAL_REJECT="PARTIAL_REJECT",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.OrderReject_OrderRejectReason||(o.OrderReject_OrderRejectReason={})).DUPLICATE_PEER="DUPLICATE_PEER",u.CHANNEL_FUNDING_FAILED="CHANNEL_FUNDING_FAILED",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.SubscribeError_Error||(o.SubscribeError_Error={})).UNKNOWN="UNKNOWN",h.SERVER_SHUTDOWN="SERVER_SHUTDOWN",h.ACCOUNT_DOES_NOT_EXIST="ACCOUNT_DOES_NOT_EXIST",h.INCOMPLETE_ACCOUNT_RESERVATION="INCOMPLETE_ACCOUNT_RESERVATION",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.AccountDiff_AccountState||(o.AccountDiff_AccountState={})).OUTPUT_RECREATED="OUTPUT_RECREATED",d.OUTPUT_DUST_EXTENDED_OFFCHAIN="OUTPUT_DUST_EXTENDED_OFFCHAIN",d.OUTPUT_DUST_ADDED_TO_FEES="OUTPUT_DUST_ADDED_TO_FEES",d.OUTPUT_FULLY_SPENT="OUTPUT_FULLY_SPENT",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.InvalidOrder_FailReason||(o.InvalidOrder_FailReason={})).INVALID_AMT="INVALID_AMT",p.UNRECOGNIZED="UNRECOGNIZED"},4541(b,o){Object.defineProperty(o,"__esModule",{value:!0})},7521(b,o){var p,d,h,u;Object.defineProperty(o,"__esModule",{value:!0}),o.MatchRejectReason=o.MatchState=o.AccountState=o.AccountVersion=void 0,(u=o.AccountVersion||(o.AccountVersion={})).ACCOUNT_VERSION_LND_DEPENDENT="ACCOUNT_VERSION_LND_DEPENDENT",u.ACCOUNT_VERSION_LEGACY="ACCOUNT_VERSION_LEGACY",u.ACCOUNT_VERSION_TAPROOT="ACCOUNT_VERSION_TAPROOT",u.ACCOUNT_VERSION_TAPROOT_V2="ACCOUNT_VERSION_TAPROOT_V2",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.AccountState||(o.AccountState={})).PENDING_OPEN="PENDING_OPEN",h.PENDING_UPDATE="PENDING_UPDATE",h.OPEN="OPEN",h.EXPIRED="EXPIRED",h.PENDING_CLOSED="PENDING_CLOSED",h.CLOSED="CLOSED",h.RECOVERY_FAILED="RECOVERY_FAILED",h.PENDING_BATCH="PENDING_BATCH",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.MatchState||(o.MatchState={})).PREPARE="PREPARE",d.ACCEPTED="ACCEPTED",d.REJECTED="REJECTED",d.SIGNED="SIGNED",d.FINALIZED="FINALIZED",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.MatchRejectReason||(o.MatchRejectReason={})).NONE="NONE",p.SERVER_MISBEHAVIOR="SERVER_MISBEHAVIOR",p.BATCH_VERSION_MISMATCH="BATCH_VERSION_MISMATCH",p.PARTIAL_REJECT_COLLATERAL="PARTIAL_REJECT_COLLATERAL",p.PARTIAL_REJECT_DUPLICATE_PEER="PARTIAL_REJECT_DUPLICATE_PEER",p.PARTIAL_REJECT_CHANNEL_FUNDING_FAILED="PARTIAL_REJECT_CHANNEL_FUNDING_FAILED",p.UNRECOGNIZED="UNRECOGNIZED"},2471(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(3029),o),h(p(4541),o),h(p(7521),o)},2162(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(9719),o)},4386(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(1380),o)},6534(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(7543),o)},2495(b,o){Object.defineProperty(o,"__esModule",{value:!0}),o.subscriptionMethods=o.serviceNames=void 0,o.serviceNames={frdrpc:{FaradayServer:"frdrpc.FaradayServer"},litrpc:{Firewall:"litrpc.Firewall",Autopilot:"litrpc.Autopilot",Sessions:"litrpc.Sessions",Status:"litrpc.Status"},autopilotrpc:{Autopilot:"autopilotrpc.Autopilot"},chainrpc:{ChainNotifier:"chainrpc.ChainNotifier"},invoicesrpc:{Invoices:"invoicesrpc.Invoices"},lnrpc:{Lightning:"lnrpc.Lightning",State:"lnrpc.State",WalletUnlocker:"lnrpc.WalletUnlocker"},peersrpc:{Peers:"peersrpc.Peers"},routerrpc:{Router:"routerrpc.Router"},signrpc:{Signer:"signrpc.Signer"},walletrpc:{WalletKit:"walletrpc.WalletKit"},watchtowerrpc:{Watchtower:"watchtowerrpc.Watchtower"},wtclientrpc:{WatchtowerClient:"wtclientrpc.WatchtowerClient"},looprpc:{SwapClient:"looprpc.SwapClient",Debug:"looprpc.Debug"},poolrpc:{ChannelAuctioneer:"poolrpc.ChannelAuctioneer",HashMail:"poolrpc.HashMail",Trader:"poolrpc.Trader"},assetwalletrpc:{AssetWallet:"assetwalletrpc.AssetWallet"},authmailboxrpc:{Mailbox:"authmailboxrpc.Mailbox"},mintrpc:{Mint:"mintrpc.Mint"},priceoraclerpc:{PriceOracle:"priceoraclerpc.PriceOracle"},rfqrpc:{Rfq:"rfqrpc.Rfq"},tapchannelrpc:{TaprootAssetChannels:"tapchannelrpc.TaprootAssetChannels"},tapdevrpc:{TapDev:"tapdevrpc.TapDev"},taprpc:{TaprootAssets:"taprpc.TaprootAssets"},universerpc:{Universe:"universerpc.Universe"}},o.subscriptionMethods=["chainrpc.ChainNotifier.RegisterConfirmationsNtfn","chainrpc.ChainNotifier.RegisterSpendNtfn","chainrpc.ChainNotifier.RegisterBlockEpochNtfn","invoicesrpc.Invoices.SubscribeSingleInvoice","invoicesrpc.Invoices.HtlcModifier","lnrpc.Lightning.SubscribeTransactions","lnrpc.Lightning.SubscribePeerEvents","lnrpc.Lightning.SubscribeChannelEvents","lnrpc.Lightning.OpenChannel","lnrpc.Lightning.ChannelAcceptor","lnrpc.Lightning.CloseChannel","lnrpc.Lightning.SendPayment","lnrpc.Lightning.SendToRoute","lnrpc.Lightning.SubscribeInvoices","lnrpc.Lightning.SubscribeChannelGraph","lnrpc.Lightning.SubscribeChannelBackups","lnrpc.Lightning.RegisterRPCMiddleware","lnrpc.Lightning.SubscribeCustomMessages","routerrpc.Router.SendPaymentV2","routerrpc.Router.TrackPaymentV2","routerrpc.Router.TrackPayments","routerrpc.Router.SubscribeHtlcEvents","routerrpc.Router.SendPayment","routerrpc.Router.TrackPayment","routerrpc.Router.HtlcInterceptor","lnrpc.State.SubscribeState","looprpc.SwapClient.Monitor","poolrpc.ChannelAuctioneer.SubscribeBatchAuction","poolrpc.ChannelAuctioneer.SubscribeSidecar","poolrpc.HashMail.RecvStream","authmailboxrpc.Mailbox.ReceiveMessages","lnrpc.Lightning.SubscribeTransactions","lnrpc.Lightning.SubscribePeerEvents","lnrpc.Lightning.SubscribeChannelEvents","lnrpc.Lightning.OpenChannel","lnrpc.Lightning.ChannelAcceptor","lnrpc.Lightning.CloseChannel","lnrpc.Lightning.SendPayment","lnrpc.Lightning.SendToRoute","lnrpc.Lightning.SubscribeInvoices","lnrpc.Lightning.SubscribeChannelGraph","lnrpc.Lightning.SubscribeChannelBackups","lnrpc.Lightning.RegisterRPCMiddleware","lnrpc.Lightning.SubscribeCustomMessages","mintrpc.Mint.SubscribeMintEvents","rfqrpc.Rfq.SubscribeRfqEventNtfns","routerrpc.Router.SendPaymentV2","routerrpc.Router.TrackPaymentV2","routerrpc.Router.TrackPayments","routerrpc.Router.SubscribeHtlcEvents","routerrpc.Router.SendPayment","routerrpc.Router.TrackPayment","routerrpc.Router.HtlcInterceptor","tapchannelrpc.TaprootAssetChannels.SendPayment","tapdevrpc.TapDev.SubscribeSendAssetEventNtfns","tapdevrpc.TapDev.SubscribeReceiveAssetEventNtfns","taprpc.TaprootAssets.SubscribeReceiveEvents","taprpc.TaprootAssets.SubscribeSendEvents"]},8054(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(5636),o)},8933(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(6190),o)},5712(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.CoinSelectType=void 0,(p=o.CoinSelectType||(o.CoinSelectType={})).COIN_SELECT_DEFAULT="COIN_SELECT_DEFAULT",p.COIN_SELECT_BIP86_ONLY="COIN_SELECT_BIP86_ONLY",p.COIN_SELECT_SCRIPT_TREES_ALLOWED="COIN_SELECT_SCRIPT_TREES_ALLOWED",p.UNRECOGNIZED="UNRECOGNIZED"},4376(b,o){Object.defineProperty(o,"__esModule",{value:!0})},5398(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.BatchState=void 0,(p=o.BatchState||(o.BatchState={})).BATCH_STATE_UNKNOWN="BATCH_STATE_UNKNOWN",p.BATCH_STATE_PENDING="BATCH_STATE_PENDING",p.BATCH_STATE_FROZEN="BATCH_STATE_FROZEN",p.BATCH_STATE_COMMITTED="BATCH_STATE_COMMITTED",p.BATCH_STATE_BROADCAST="BATCH_STATE_BROADCAST",p.BATCH_STATE_CONFIRMED="BATCH_STATE_CONFIRMED",p.BATCH_STATE_FINALIZED="BATCH_STATE_FINALIZED",p.BATCH_STATE_SEEDLING_CANCELLED="BATCH_STATE_SEEDLING_CANCELLED",p.BATCH_STATE_SPROUT_CANCELLED="BATCH_STATE_SPROUT_CANCELLED",p.UNRECOGNIZED="UNRECOGNIZED"},9719(b,o){var p,d;Object.defineProperty(o,"__esModule",{value:!0}),o.Intent=o.TransactionType=void 0,(d=o.TransactionType||(o.TransactionType={})).PURCHASE="PURCHASE",d.SALE="SALE",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.Intent||(o.Intent={})).INTENT_UNSPECIFIED="INTENT_UNSPECIFIED",p.INTENT_PAY_INVOICE_HINT="INTENT_PAY_INVOICE_HINT",p.INTENT_PAY_INVOICE="INTENT_PAY_INVOICE",p.INTENT_PAY_INVOICE_QUALIFY="INTENT_PAY_INVOICE_QUALIFY",p.INTENT_RECV_PAYMENT_HINT="INTENT_RECV_PAYMENT_HINT",p.INTENT_RECV_PAYMENT="INTENT_RECV_PAYMENT",p.INTENT_RECV_PAYMENT_QUALIFY="INTENT_RECV_PAYMENT_QUALIFY",p.UNRECOGNIZED="UNRECOGNIZED"},1380(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.QuoteRespStatus=void 0,(p=o.QuoteRespStatus||(o.QuoteRespStatus={})).INVALID_ASSET_RATES="INVALID_ASSET_RATES",p.INVALID_EXPIRY="INVALID_EXPIRY",p.PRICE_ORACLE_QUERY_ERR="PRICE_ORACLE_QUERY_ERR",p.UNRECOGNIZED="UNRECOGNIZED"},6190(b,o){Object.defineProperty(o,"__esModule",{value:!0})},3126(b,o){var p;Object.defineProperty(o,"__esModule",{value:!0}),o.ProofTransferType=void 0,(p=o.ProofTransferType||(o.ProofTransferType={})).PROOF_TRANSFER_TYPE_SEND="PROOF_TRANSFER_TYPE_SEND",p.PROOF_TRANSFER_TYPE_RECEIVE="PROOF_TRANSFER_TYPE_RECEIVE",p.UNRECOGNIZED="UNRECOGNIZED"},8960(b,o){var p,d,h,u,c,s,l,g,w,y;Object.defineProperty(o,"__esModule",{value:!0}),o.ParcelType=o.SendState=o.AddrEventStatus=o.ScriptKeyType=o.AddrVersion=o.ProofDeliveryStatus=o.OutputType=o.AssetVersion=o.AssetMetaType=o.AssetType=void 0,(y=o.AssetType||(o.AssetType={})).NORMAL="NORMAL",y.COLLECTIBLE="COLLECTIBLE",y.UNRECOGNIZED="UNRECOGNIZED",(w=o.AssetMetaType||(o.AssetMetaType={})).META_TYPE_OPAQUE="META_TYPE_OPAQUE",w.META_TYPE_JSON="META_TYPE_JSON",w.UNRECOGNIZED="UNRECOGNIZED",(g=o.AssetVersion||(o.AssetVersion={})).ASSET_VERSION_V0="ASSET_VERSION_V0",g.ASSET_VERSION_V1="ASSET_VERSION_V1",g.UNRECOGNIZED="UNRECOGNIZED",(l=o.OutputType||(o.OutputType={})).OUTPUT_TYPE_SIMPLE="OUTPUT_TYPE_SIMPLE",l.OUTPUT_TYPE_SPLIT_ROOT="OUTPUT_TYPE_SPLIT_ROOT",l.UNRECOGNIZED="UNRECOGNIZED",(s=o.ProofDeliveryStatus||(o.ProofDeliveryStatus={})).PROOF_DELIVERY_STATUS_NOT_APPLICABLE="PROOF_DELIVERY_STATUS_NOT_APPLICABLE",s.PROOF_DELIVERY_STATUS_COMPLETE="PROOF_DELIVERY_STATUS_COMPLETE",s.PROOF_DELIVERY_STATUS_PENDING="PROOF_DELIVERY_STATUS_PENDING",s.UNRECOGNIZED="UNRECOGNIZED",(c=o.AddrVersion||(o.AddrVersion={})).ADDR_VERSION_UNSPECIFIED="ADDR_VERSION_UNSPECIFIED",c.ADDR_VERSION_V0="ADDR_VERSION_V0",c.ADDR_VERSION_V1="ADDR_VERSION_V1",c.ADDR_VERSION_V2="ADDR_VERSION_V2",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.ScriptKeyType||(o.ScriptKeyType={})).SCRIPT_KEY_UNKNOWN="SCRIPT_KEY_UNKNOWN",u.SCRIPT_KEY_BIP86="SCRIPT_KEY_BIP86",u.SCRIPT_KEY_SCRIPT_PATH_EXTERNAL="SCRIPT_KEY_SCRIPT_PATH_EXTERNAL",u.SCRIPT_KEY_BURN="SCRIPT_KEY_BURN",u.SCRIPT_KEY_TOMBSTONE="SCRIPT_KEY_TOMBSTONE",u.SCRIPT_KEY_CHANNEL="SCRIPT_KEY_CHANNEL",u.SCRIPT_KEY_UNIQUE_PEDERSEN="SCRIPT_KEY_UNIQUE_PEDERSEN",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.AddrEventStatus||(o.AddrEventStatus={})).ADDR_EVENT_STATUS_UNKNOWN="ADDR_EVENT_STATUS_UNKNOWN",h.ADDR_EVENT_STATUS_TRANSACTION_DETECTED="ADDR_EVENT_STATUS_TRANSACTION_DETECTED",h.ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED="ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED",h.ADDR_EVENT_STATUS_PROOF_RECEIVED="ADDR_EVENT_STATUS_PROOF_RECEIVED",h.ADDR_EVENT_STATUS_COMPLETED="ADDR_EVENT_STATUS_COMPLETED",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.SendState||(o.SendState={})).SEND_STATE_VIRTUAL_INPUT_SELECT="SEND_STATE_VIRTUAL_INPUT_SELECT",d.SEND_STATE_VIRTUAL_SIGN="SEND_STATE_VIRTUAL_SIGN",d.SEND_STATE_ANCHOR_SIGN="SEND_STATE_ANCHOR_SIGN",d.SEND_STATE_LOG_COMMITMENT="SEND_STATE_LOG_COMMITMENT",d.SEND_STATE_BROADCAST="SEND_STATE_BROADCAST",d.SEND_STATE_WAIT_CONFIRMATION="SEND_STATE_WAIT_CONFIRMATION",d.SEND_STATE_STORE_PROOFS="SEND_STATE_STORE_PROOFS",d.SEND_STATE_TRANSFER_PROOFS="SEND_STATE_TRANSFER_PROOFS",d.SEND_STATE_COMPLETED="SEND_STATE_COMPLETED",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.ParcelType||(o.ParcelType={})).PARCEL_TYPE_ADDRESS="PARCEL_TYPE_ADDRESS",p.PARCEL_TYPE_PRE_SIGNED="PARCEL_TYPE_PRE_SIGNED",p.PARCEL_TYPE_PENDING="PARCEL_TYPE_PENDING",p.PARCEL_TYPE_PRE_ANCHORED="PARCEL_TYPE_PRE_ANCHORED",p.UNRECOGNIZED="UNRECOGNIZED"},5558(b,o){var p,d,h,u,c;Object.defineProperty(o,"__esModule",{value:!0}),o.AssetTypeFilter=o.SortDirection=o.AssetQuerySort=o.UniverseSyncMode=o.ProofType=void 0,(c=o.ProofType||(o.ProofType={})).PROOF_TYPE_UNSPECIFIED="PROOF_TYPE_UNSPECIFIED",c.PROOF_TYPE_ISSUANCE="PROOF_TYPE_ISSUANCE",c.PROOF_TYPE_TRANSFER="PROOF_TYPE_TRANSFER",c.UNRECOGNIZED="UNRECOGNIZED",(u=o.UniverseSyncMode||(o.UniverseSyncMode={})).SYNC_ISSUANCE_ONLY="SYNC_ISSUANCE_ONLY",u.SYNC_FULL="SYNC_FULL",u.UNRECOGNIZED="UNRECOGNIZED",(h=o.AssetQuerySort||(o.AssetQuerySort={})).SORT_BY_NONE="SORT_BY_NONE",h.SORT_BY_ASSET_NAME="SORT_BY_ASSET_NAME",h.SORT_BY_ASSET_ID="SORT_BY_ASSET_ID",h.SORT_BY_ASSET_TYPE="SORT_BY_ASSET_TYPE",h.SORT_BY_TOTAL_SYNCS="SORT_BY_TOTAL_SYNCS",h.SORT_BY_TOTAL_PROOFS="SORT_BY_TOTAL_PROOFS",h.SORT_BY_GENESIS_HEIGHT="SORT_BY_GENESIS_HEIGHT",h.SORT_BY_TOTAL_SUPPLY="SORT_BY_TOTAL_SUPPLY",h.UNRECOGNIZED="UNRECOGNIZED",(d=o.SortDirection||(o.SortDirection={})).SORT_DIRECTION_ASC="SORT_DIRECTION_ASC",d.SORT_DIRECTION_DESC="SORT_DIRECTION_DESC",d.UNRECOGNIZED="UNRECOGNIZED",(p=o.AssetTypeFilter||(o.AssetTypeFilter={})).FILTER_ASSET_NONE="FILTER_ASSET_NONE",p.FILTER_ASSET_NORMAL="FILTER_ASSET_NORMAL",p.FILTER_ASSET_COLLECTIBLE="FILTER_ASSET_COLLECTIBLE",p.UNRECOGNIZED="UNRECOGNIZED"},8753(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(3126),o)},5600(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(8960),o)},7164(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(5558),o)},718(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(5779),o)},5109(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(4899),o)},7685(b,o,p){var d=this&&this.__createBinding||(Object.create?function(u,c,s,l){l===void 0&&(l=s),Object.defineProperty(u,l,{enumerable:!0,get:function(){return c[s]}})}:function(u,c,s,l){l===void 0&&(l=s),u[l]=c[s]}),h=this&&this.__exportStar||function(u,c){for(var s in u)s==="default"||Object.prototype.hasOwnProperty.call(c,s)||d(c,u,s)};Object.defineProperty(o,"__esModule",{value:!0}),h(p(6035),o)},1022(b,o){Object.defineProperty(o,"__esModule",{value:!0}),o.camelKeysToSnake=o.snakeKeysToCamel=o.isObject=void 0;var p=function(d){return Array.isArray(d)};o.isObject=function(d){return d===Object(d)&&!p(d)&&typeof d!="function"},o.snakeKeysToCamel=function(d){if((0,o.isObject)(d)){var h={};return Object.keys(d).forEach(function(u){var c;h[c=u,c.replace(/([-_][a-z])/gi,function(s){return s.toUpperCase().replace("-","").replace("_","")})]=(0,o.snakeKeysToCamel)(d[u])}),h}return p(d)?d.map(function(u){return(0,o.snakeKeysToCamel)(u)}):d},o.camelKeysToSnake=function(d){if((0,o.isObject)(d)){var h={};return Object.keys(d).forEach(function(u){var c;h[c=u,c.replace(/[A-Z]/g,function(s){return"_".concat(s.toLowerCase())})]=(0,o.camelKeysToSnake)(d[u])}),h}return p(d)?d.map(function(u){return(0,o.camelKeysToSnake)(u)}):d}}},f={};return(function b(o){var p=f[o];if(p!==void 0)return p.exports;var d=f[o]={exports:{}};return a[o].call(d.exports,d,d.exports,b),d.exports})(4245)})(),n.exports=i()},4148(n,i,a){"use strict";var f=a(5606),b=a(6763);function o(k){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},o(k)}function p(k,j){for(var M=0;M<j.length;M++){var $=j[M];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(k,h($.key),$)}}function d(k,j,M){return j&&p(k.prototype,j),M&&p(k,M),Object.defineProperty(k,"prototype",{writable:!1}),k}function h(k){var j=(function(M){if(o(M)!=="object"||M===null)return M;var $=M[Symbol.toPrimitive];if($!==void 0){var W=$.call(M,"string");if(o(W)!=="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(k);return o(j)==="symbol"?j:String(j)}var u,c,s=a(9597).codes,l=s.ERR_AMBIGUOUS_ARGUMENT,g=s.ERR_INVALID_ARG_TYPE,w=s.ERR_INVALID_ARG_VALUE,y=s.ERR_INVALID_RETURN_VALUE,v=s.ERR_MISSING_ARGS,m=a(3918),C=a(537).inspect,E=a(537).types,O=E.isPromise,_=E.isRegExp,S=a(9133)(),R=a(9394)(),A=a(8075)("RegExp.prototype.test");function T(){var k=a(2299);u=k.isDeepEqual,c=k.isDeepStrictEqual}var N=!1,x=n.exports=Z,I={};function L(k){throw k.message instanceof Error?k.message:new m(k)}function H(k,j,M,$){if(!M){var W=!1;if(j===0)W=!0,$="No value argument passed to `assert.ok()`";else if($ instanceof Error)throw $;var Y=new m({actual:M,expected:!0,message:$,operator:"==",stackStartFn:k});throw Y.generatedMessage=W,Y}}function Z(){for(var k=arguments.length,j=new Array(k),M=0;M<k;M++)j[M]=arguments[M];H.apply(void 0,[Z,j.length].concat(j))}x.fail=function k(j,M,$,W,Y){var Q,q=arguments.length;if(q===0?Q="Failed":q===1?($=j,j=void 0):(N===!1&&(N=!0,(f.emitWarning?f.emitWarning:b.warn.bind(b))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),q===2&&(W="!=")),$ instanceof Error)throw $;var te={actual:j,expected:M,operator:W===void 0?"fail":W,stackStartFn:Y||k};$!==void 0&&(te.message=$);var ie=new m(te);throw Q&&(ie.message=Q,ie.generatedMessage=!0),ie},x.AssertionError=m,x.ok=Z,x.equal=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");j!=M&&L({actual:j,expected:M,message:$,operator:"==",stackStartFn:k})},x.notEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");j==M&&L({actual:j,expected:M,message:$,operator:"!=",stackStartFn:k})},x.deepEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");u===void 0&&T(),u(j,M)||L({actual:j,expected:M,message:$,operator:"deepEqual",stackStartFn:k})},x.notDeepEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");u===void 0&&T(),u(j,M)&&L({actual:j,expected:M,message:$,operator:"notDeepEqual",stackStartFn:k})},x.deepStrictEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");u===void 0&&T(),c(j,M)||L({actual:j,expected:M,message:$,operator:"deepStrictEqual",stackStartFn:k})},x.notDeepStrictEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");u===void 0&&T(),c(j,M)&&L({actual:j,expected:M,message:$,operator:"notDeepStrictEqual",stackStartFn:k})},x.strictEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");R(j,M)||L({actual:j,expected:M,message:$,operator:"strictEqual",stackStartFn:k})},x.notStrictEqual=function k(j,M,$){if(arguments.length<2)throw new v("actual","expected");R(j,M)&&L({actual:j,expected:M,message:$,operator:"notStrictEqual",stackStartFn:k})};var K=d(function k(j,M,$){var W=this;(function(Y,Q){if(!(Y instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,k),M.forEach(function(Y){Y in j&&($!==void 0&&typeof $[Y]=="string"&&_(j[Y])&&A(j[Y],$[Y])?W[Y]=$[Y]:W[Y]=j[Y])})});function P(k,j,M,$){if(typeof j!="function"){if(_(j))return A(j,k);if(arguments.length===2)throw new g("expected",["Function","RegExp"],j);if(o(k)!=="object"||k===null){var W=new m({actual:k,expected:j,message:M,operator:"deepStrictEqual",stackStartFn:$});throw W.operator=$.name,W}var Y=Object.keys(j);if(j instanceof Error)Y.push("name","message");else if(Y.length===0)throw new w("error",j,"may not be an empty object");return u===void 0&&T(),Y.forEach(function(Q){typeof k[Q]=="string"&&_(j[Q])&&A(j[Q],k[Q])||(function(q,te,ie,ae,ue,le){if(!(ie in q)||!c(q[ie],te[ie])){if(!ae){var me=new K(q,ue),Ae=new K(te,ue,q),fe=new m({actual:me,expected:Ae,operator:"deepStrictEqual",stackStartFn:le});throw fe.actual=q,fe.expected=te,fe.operator=le.name,fe}L({actual:q,expected:te,message:ae,operator:le.name,stackStartFn:le})}})(k,j,Q,M,Y,$)}),!0}return j.prototype!==void 0&&k instanceof j||!Error.isPrototypeOf(j)&&j.call({},k)===!0}function B(k){if(typeof k!="function")throw new g("fn","Function",k);try{k()}catch(j){return j}return I}function G(k){return O(k)||k!==null&&o(k)==="object"&&typeof k.then=="function"&&typeof k.catch=="function"}function V(k){return Promise.resolve().then(function(){var j;if(typeof k=="function"){if(!G(j=k()))throw new y("instance of Promise","promiseFn",j)}else{if(!G(k))throw new g("promiseFn",["Function","Promise"],k);j=k}return Promise.resolve().then(function(){return j}).then(function(){return I}).catch(function(M){return M})})}function z(k,j,M,$){if(typeof M=="string"){if(arguments.length===4)throw new g("error",["Object","Error","Function","RegExp"],M);if(o(j)==="object"&&j!==null){if(j.message===M)throw new l("error/message",'The error message "'.concat(j.message,'" is identical to the message.'))}else if(j===M)throw new l("error/message",'The error "'.concat(j,'" is identical to the message.'));$=M,M=void 0}else if(M!=null&&o(M)!=="object"&&typeof M!="function")throw new g("error",["Object","Error","Function","RegExp"],M);if(j===I){var W="";M&&M.name&&(W+=" (".concat(M.name,")")),W+=$?": ".concat($):".";var Y=k.name==="rejects"?"rejection":"exception";L({actual:void 0,expected:M,operator:k.name,message:"Missing expected ".concat(Y).concat(W),stackStartFn:k})}if(M&&!P(j,M,$,k))throw j}function U(k,j,M,$){if(j!==I){if(typeof M=="string"&&($=M,M=void 0),!M||P(j,M)){var W=$?": ".concat($):".",Y=k.name==="doesNotReject"?"rejection":"exception";L({actual:j,expected:M,operator:k.name,message:"Got unwanted ".concat(Y).concat(W,`
`)+'Actual message: "'.concat(j&&j.message,'"'),stackStartFn:k})}throw j}}function F(k,j,M,$,W){if(!_(j))throw new g("regexp","RegExp",j);var Y=W==="match";if(typeof k!="string"||A(j,k)!==Y){if(M instanceof Error)throw M;var Q=!M;M=M||(typeof k!="string"?'The "string" argument must be of type string. Received type '+"".concat(o(k)," (").concat(C(k),")"):(Y?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(C(j),`. Input:
`).concat(C(k),`
`));var q=new m({actual:k,expected:j,message:M,operator:W,stackStartFn:$});throw q.generatedMessage=Q,q}}function D(){for(var k=arguments.length,j=new Array(k),M=0;M<k;M++)j[M]=arguments[M];H.apply(void 0,[D,j.length].concat(j))}x.throws=function k(j){for(var M=arguments.length,$=new Array(M>1?M-1:0),W=1;W<M;W++)$[W-1]=arguments[W];z.apply(void 0,[k,B(j)].concat($))},x.rejects=function k(j){for(var M=arguments.length,$=new Array(M>1?M-1:0),W=1;W<M;W++)$[W-1]=arguments[W];return V(j).then(function(Y){return z.apply(void 0,[k,Y].concat($))})},x.doesNotThrow=function k(j){for(var M=arguments.length,$=new Array(M>1?M-1:0),W=1;W<M;W++)$[W-1]=arguments[W];U.apply(void 0,[k,B(j)].concat($))},x.doesNotReject=function k(j){for(var M=arguments.length,$=new Array(M>1?M-1:0),W=1;W<M;W++)$[W-1]=arguments[W];return V(j).then(function(Y){return U.apply(void 0,[k,Y].concat($))})},x.ifError=function k(j){if(j!=null){var M="ifError got unwanted exception: ";o(j)==="object"&&typeof j.message=="string"?j.message.length===0&&j.constructor?M+=j.constructor.name:M+=j.message:M+=C(j);var $=new m({actual:j,expected:null,operator:"ifError",message:M,stackStartFn:k}),W=j.stack;if(typeof W=="string"){var Y=W.split(`
`);Y.shift();for(var Q=$.stack.split(`
`),q=0;q<Y.length;q++){var te=Q.indexOf(Y[q]);if(te!==-1){Q=Q.slice(0,te);break}}$.stack="".concat(Q.join(`
`),`
`).concat(Y.join(`
`))}throw $}},x.match=function k(j,M,$){F(j,M,$,k,"match")},x.doesNotMatch=function k(j,M,$){F(j,M,$,k,"doesNotMatch")},x.strict=S(D,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict},3918(n,i,a){"use strict";var f=a(5606);function b(x,I){var L=Object.keys(x);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(x);I&&(H=H.filter(function(Z){return Object.getOwnPropertyDescriptor(x,Z).enumerable})),L.push.apply(L,H)}return L}function o(x){for(var I=1;I<arguments.length;I++){var L=arguments[I]!=null?arguments[I]:{};I%2?b(Object(L),!0).forEach(function(H){var Z,K,P;Z=x,K=H,P=L[H],(K=d(K))in Z?Object.defineProperty(Z,K,{value:P,enumerable:!0,configurable:!0,writable:!0}):Z[K]=P}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(L)):b(Object(L)).forEach(function(H){Object.defineProperty(x,H,Object.getOwnPropertyDescriptor(L,H))})}return x}function p(x,I){for(var L=0;L<I.length;L++){var H=I[L];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(x,d(H.key),H)}}function d(x){var I=(function(L){if(y(L)!=="object"||L===null)return L;var H=L[Symbol.toPrimitive];if(H!==void 0){var Z=H.call(L,"string");if(y(Z)!=="object")return Z;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(L)})(x);return y(I)==="symbol"?I:String(I)}function h(x,I){if(I&&(y(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(x)}function u(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function c(x){var I=typeof Map=="function"?new Map:void 0;return c=function(L){if(L===null||(H=L,Function.toString.call(H).indexOf("[native code]")===-1))return L;var H;if(typeof L!="function")throw new TypeError("Super expression must either be null or a function");if(I!==void 0){if(I.has(L))return I.get(L);I.set(L,Z)}function Z(){return s(L,arguments,w(this).constructor)}return Z.prototype=Object.create(L.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),g(Z,L)},c(x)}function s(x,I,L){return s=l()?Reflect.construct.bind():function(H,Z,K){var P=[null];P.push.apply(P,Z);var B=new(Function.bind.apply(H,P));return K&&g(B,K.prototype),B},s.apply(null,arguments)}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g(x,I){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,H){return L.__proto__=H,L},g(x,I)}function w(x){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(I){return I.__proto__||Object.getPrototypeOf(I)},w(x)}function y(x){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},y(x)}var v=a(537).inspect,m=a(9597).codes.ERR_INVALID_ARG_TYPE;function C(x,I,L){return(L===void 0||L>x.length)&&(L=x.length),x.substring(L-I.length,L)===I}var E="",O="",_="",S="",R={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(x){var I=Object.keys(x),L=Object.create(Object.getPrototypeOf(x));return I.forEach(function(H){L[H]=x[H]}),Object.defineProperty(L,"message",{value:x.message}),L}function T(x){return v(x,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var N=(function(x,I){(function(G,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(V&&V.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),Object.defineProperty(G,"prototype",{writable:!1}),V&&g(G,V)})(B,x);var L,H,Z,K,P=(L=B,H=l(),function(){var G,V=w(L);if(H){var z=w(this).constructor;G=Reflect.construct(V,arguments,z)}else G=V.apply(this,arguments);return h(this,G)});function B(G){var V;if((function(q,te){if(!(q instanceof te))throw new TypeError("Cannot call a class as a function")})(this,B),y(G)!=="object"||G===null)throw new m("options","Object",G);var z=G.message,U=G.operator,F=G.stackStartFn,D=G.actual,k=G.expected,j=Error.stackTraceLimit;if(Error.stackTraceLimit=0,z!=null)V=P.call(this,String(z));else if(f.stderr&&f.stderr.isTTY&&(f.stderr&&f.stderr.getColorDepth&&f.stderr.getColorDepth()!==1?(E="\x1B[34m",O="\x1B[32m",S="\x1B[39m",_="\x1B[31m"):(E="",O="",S="",_="")),y(D)==="object"&&D!==null&&y(k)==="object"&&k!==null&&"stack"in D&&D instanceof Error&&"stack"in k&&k instanceof Error&&(D=A(D),k=A(k)),U==="deepStrictEqual"||U==="strictEqual")V=P.call(this,(function(q,te,ie){var ae="",ue="",le=0,me="",Ae=!1,fe=T(q),se=fe.split(`
`),he=T(te).split(`
`),ce=0,Ie="";if(ie==="strictEqual"&&y(q)==="object"&&y(te)==="object"&&q!==null&&te!==null&&(ie="strictEqualObject"),se.length===1&&he.length===1&&se[0]!==he[0]){var Ze=se[0].length+he[0].length;if(Ze<=10){if(!(y(q)==="object"&&q!==null||y(te)==="object"&&te!==null||q===0&&te===0))return"".concat(R[ie],`
`)+"".concat(se[0]," !== ").concat(he[0],`
`)}else if(ie!=="strictEqualObject"&&Ze<(f.stderr&&f.stderr.isTTY?f.stderr.columns:80)){for(;se[0][ce]===he[0][ce];)ce++;ce>2&&(Ie=`
`.concat((function(ve,Ke){if(Ke=Math.floor(Ke),ve.length==0||Ke==0)return"";var ft=ve.length*Ke;for(Ke=Math.floor(Math.log(Ke)/Math.log(2));Ke;)ve+=ve,Ke--;return ve+ve.substring(0,ft-ve.length)})(" ",ce),"^"),ce=0)}}for(var De=se[se.length-1],Ge=he[he.length-1];De===Ge&&(ce++<2?me=`
`.concat(De).concat(me):ae=De,se.pop(),he.pop(),se.length!==0&&he.length!==0);)De=se[se.length-1],Ge=he[he.length-1];var at=Math.max(se.length,he.length);if(at===0){var Se=fe.split(`
`);if(Se.length>30)for(Se[26]="".concat(E,"...").concat(S);Se.length>27;)Se.pop();return"".concat(R.notIdentical,`
`).concat(Se.join(`
`),`
`)}ce>3&&(me=`
`.concat(E,"...").concat(S).concat(me),Ae=!0),ae!==""&&(me=`
`.concat(ae).concat(me),ae="");var ke=0,ze=R[ie]+`
`.concat(O,"+ actual").concat(S," ").concat(_,"- expected").concat(S),nt=" ".concat(E,"...").concat(S," Lines skipped");for(ce=0;ce<at;ce++){var Ne=ce-le;if(se.length<ce+1)Ne>1&&ce>2&&(Ne>4?(ue+=`
`.concat(E,"...").concat(S),Ae=!0):Ne>3&&(ue+=`
`.concat(he[ce-2]),ke++),ue+=`
`.concat(he[ce-1]),ke++),le=ce,ae+=`
`.concat(_,"-").concat(S," ").concat(he[ce]),ke++;else if(he.length<ce+1)Ne>1&&ce>2&&(Ne>4?(ue+=`
`.concat(E,"...").concat(S),Ae=!0):Ne>3&&(ue+=`
`.concat(se[ce-2]),ke++),ue+=`
`.concat(se[ce-1]),ke++),le=ce,ue+=`
`.concat(O,"+").concat(S," ").concat(se[ce]),ke++;else{var We=he[ce],Le=se[ce],Je=Le!==We&&(!C(Le,",")||Le.slice(0,-1)!==We);Je&&C(We,",")&&We.slice(0,-1)===Le&&(Je=!1,Le+=","),Je?(Ne>1&&ce>2&&(Ne>4?(ue+=`
`.concat(E,"...").concat(S),Ae=!0):Ne>3&&(ue+=`
`.concat(se[ce-2]),ke++),ue+=`
`.concat(se[ce-1]),ke++),le=ce,ue+=`
`.concat(O,"+").concat(S," ").concat(Le),ae+=`
`.concat(_,"-").concat(S," ").concat(We),ke+=2):(ue+=ae,ae="",Ne!==1&&ce!==0||(ue+=`
`.concat(Le),ke++))}if(ke>20&&ce<at-2)return"".concat(ze).concat(nt,`
`).concat(ue,`
`).concat(E,"...").concat(S).concat(ae,`
`)+"".concat(E,"...").concat(S)}return"".concat(ze).concat(Ae?nt:"",`
`).concat(ue).concat(ae).concat(me).concat(Ie)})(D,k,U));else if(U==="notDeepStrictEqual"||U==="notStrictEqual"){var M=R[U],$=T(D).split(`
`);if(U==="notStrictEqual"&&y(D)==="object"&&D!==null&&(M=R.notStrictEqualObject),$.length>30)for($[26]="".concat(E,"...").concat(S);$.length>27;)$.pop();V=$.length===1?P.call(this,"".concat(M," ").concat($[0])):P.call(this,"".concat(M,`
`).concat($.join(`
`),`
`))}else{var W=T(D),Y="",Q=R[U];U==="notDeepEqual"||U==="notEqual"?(W="".concat(R[U],`
`).concat(W)).length>1024&&(W="".concat(W.slice(0,1021),"...")):(Y="".concat(T(k)),W.length>512&&(W="".concat(W.slice(0,509),"...")),Y.length>512&&(Y="".concat(Y.slice(0,509),"...")),U==="deepEqual"||U==="equal"?W="".concat(Q,`
`).concat(W,`
should equal
`):Y=" ".concat(U," ").concat(Y)),V=P.call(this,"".concat(W).concat(Y))}return Error.stackTraceLimit=j,V.generatedMessage=!z,Object.defineProperty(u(V),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),V.code="ERR_ASSERTION",V.actual=D,V.expected=k,V.operator=U,Error.captureStackTrace&&Error.captureStackTrace(u(V),F),V.stack,V.name="AssertionError",h(V)}return Z=B,(K=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:I,value:function(G,V){return v(this,o(o({},V),{},{customInspect:!1,depth:0}))}}])&&p(Z.prototype,K),Object.defineProperty(Z,"prototype",{writable:!1}),B})(c(Error),v.custom);n.exports=N},9597(n,i,a){"use strict";function f(s){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(s)}function b(s,l){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,w){return g.__proto__=w,g},b(s,l)}function o(s){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},o(s)}var p,d,h={};function u(s,l,g){g||(g=Error);var w=(function(y){(function(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),S&&b(_,S)})(O,y);var v,m,C,E=(m=O,C=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}})(),function(){var _,S=o(m);if(C){var R=o(this).constructor;_=Reflect.construct(S,arguments,R)}else _=S.apply(this,arguments);return(function(A,T){if(T&&(f(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N})(A)})(this,_)});function O(_,S,R){var A;return(function(T,N){if(!(T instanceof N))throw new TypeError("Cannot call a class as a function")})(this,O),A=E.call(this,(function(T,N,x){return typeof l=="string"?l:l(T,N,x)})(_,S,R)),A.code=s,A}return v=O,Object.defineProperty(v,"prototype",{writable:!1}),v})(g);h[s]=w}function c(s,l){if(Array.isArray(s)){var g=s.length;return s=s.map(function(w){return String(w)}),g>2?"one of ".concat(l," ").concat(s.slice(0,g-1).join(", "),", or ")+s[g-1]:g===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}return"of ".concat(l," ").concat(String(s))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(s,l,g){var w,y,v,m,C;if(p===void 0&&(p=a(4148)),p(typeof s=="string","'name' must be a string"),typeof l=="string"&&(y="not ",l.substr(0,4)===y)?(w="must not be",l=l.replace(/^not /,"")):w="must be",(function(O,_,S){return(S===void 0||S>O.length)&&(S=O.length),O.substring(S-9,S)===_})(s," argument"))v="The ".concat(s," ").concat(w," ").concat(c(l,"type"));else{var E=(typeof C!="number"&&(C=0),C+1>(m=s).length||m.indexOf(".",C)===-1?"argument":"property");v='The "'.concat(s,'" ').concat(E," ").concat(w," ").concat(c(l,"type"))}return v+". Received type ".concat(f(g))},TypeError),u("ERR_INVALID_ARG_VALUE",function(s,l){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=a(537));var w=d.inspect(l);return w.length>128&&(w="".concat(w.slice(0,128),"...")),"The argument '".concat(s,"' ").concat(g,". Received ").concat(w)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(s,l,g){var w;return w=g&&g.constructor&&g.constructor.name?"instance of ".concat(g.constructor.name):"type ".concat(f(g)),"Expected ".concat(s,' to be returned from the "').concat(l,'"')+" function but got ".concat(w,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var s=arguments.length,l=new Array(s),g=0;g<s;g++)l[g]=arguments[g];p===void 0&&(p=a(4148)),p(l.length>0,"At least one arg needs to be specified");var w="The ",y=l.length;switch(l=l.map(function(v){return'"'.concat(v,'"')}),y){case 1:w+="".concat(l[0]," argument");break;case 2:w+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:w+=l.slice(0,y-1).join(", "),w+=", and ".concat(l[y-1]," arguments")}return"".concat(w," must be specified")},TypeError),n.exports.codes=h},2299(n,i,a){"use strict";function f(M,$){return(function(W){if(Array.isArray(W))return W})(M)||(function(W,Y){var Q=W==null?null:typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(Q!=null){var q,te,ie,ae,ue=[],le=!0,me=!1;try{if(ie=(Q=Q.call(W)).next,Y===0){if(Object(Q)!==Q)return;le=!1}else for(;!(le=(q=ie.call(Q)).done)&&(ue.push(q.value),ue.length!==Y);le=!0);}catch(Ae){me=!0,te=Ae}finally{try{if(!le&&Q.return!=null&&(ae=Q.return(),Object(ae)!==ae))return}finally{if(me)throw te}}return ue}})(M,$)||(function(W,Y){if(W){if(typeof W=="string")return b(W,Y);var Q=Object.prototype.toString.call(W).slice(8,-1);return Q==="Object"&&W.constructor&&(Q=W.constructor.name),Q==="Map"||Q==="Set"?Array.from(W):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?b(W,Y):void 0}})(M,$)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function b(M,$){($==null||$>M.length)&&($=M.length);for(var W=0,Y=new Array($);W<$;W++)Y[W]=M[W];return Y}function o(M){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},o(M)}var p=/a/g.flags!==void 0,d=function(M){var $=[];return M.forEach(function(W){return $.push(W)}),$},h=function(M){var $=[];return M.forEach(function(W,Y){return $.push([Y,W])}),$},u=Object.is?Object.is:a(7653),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:a(4133);function l(M){return M.call.bind(M)}var g=l(Object.prototype.hasOwnProperty),w=l(Object.prototype.propertyIsEnumerable),y=l(Object.prototype.toString),v=a(537).types,m=v.isAnyArrayBuffer,C=v.isArrayBufferView,E=v.isDate,O=v.isMap,_=v.isRegExp,S=v.isSet,R=v.isNativeError,A=v.isBoxedPrimitive,T=v.isNumberObject,N=v.isStringObject,x=v.isBooleanObject,I=v.isBigIntObject,L=v.isSymbolObject,H=v.isFloat32Array,Z=v.isFloat64Array;function K(M){if(M.length===0||M.length>10)return!0;for(var $=0;$<M.length;$++){var W=M.charCodeAt($);if(W<48||W>57)return!0}return M.length===10&&M>=Math.pow(2,32)}function P(M){return Object.keys(M).filter(K).concat(c(M).filter(Object.prototype.propertyIsEnumerable.bind(M)))}function B(M,$){if(M===$)return 0;for(var W=M.length,Y=$.length,Q=0,q=Math.min(W,Y);Q<q;++Q)if(M[Q]!==$[Q]){W=M[Q],Y=$[Q];break}return W<Y?-1:Y<W?1:0}function G(M,$,W,Y){if(M===$)return M!==0||!W||u(M,$);if(W){if(o(M)!=="object")return typeof M=="number"&&s(M)&&s($);if(o($)!=="object"||M===null||$===null||Object.getPrototypeOf(M)!==Object.getPrototypeOf($))return!1}else{if(M===null||o(M)!=="object")return($===null||o($)!=="object")&&M==$;if($===null||o($)!=="object")return!1}var Q,q,te,ie,ae=y(M);if(ae!==y($))return!1;if(Array.isArray(M)){if(M.length!==$.length)return!1;var ue=P(M),le=P($);return ue.length===le.length&&z(M,$,W,Y,1,ue)}if(ae==="[object Object]"&&(!O(M)&&O($)||!S(M)&&S($)))return!1;if(E(M)){if(!E($)||Date.prototype.getTime.call(M)!==Date.prototype.getTime.call($))return!1}else if(_(M)){if(!_($)||(te=M,ie=$,!(p?te.source===ie.source&&te.flags===ie.flags:RegExp.prototype.toString.call(te)===RegExp.prototype.toString.call(ie))))return!1}else if(R(M)||M instanceof Error){if(M.message!==$.message||M.name!==$.name)return!1}else{if(C(M)){if(W||!H(M)&&!Z(M)){if(!(function(fe,se){return fe.byteLength===se.byteLength&&B(new Uint8Array(fe.buffer,fe.byteOffset,fe.byteLength),new Uint8Array(se.buffer,se.byteOffset,se.byteLength))===0})(M,$))return!1}else if(!(function(fe,se){if(fe.byteLength!==se.byteLength)return!1;for(var he=0;he<fe.byteLength;he++)if(fe[he]!==se[he])return!1;return!0})(M,$))return!1;var me=P(M),Ae=P($);return me.length===Ae.length&&z(M,$,W,Y,0,me)}if(S(M))return!(!S($)||M.size!==$.size)&&z(M,$,W,Y,2);if(O(M))return!(!O($)||M.size!==$.size)&&z(M,$,W,Y,3);if(m(M)){if(q=$,(Q=M).byteLength!==q.byteLength||B(new Uint8Array(Q),new Uint8Array(q))!==0)return!1}else if(A(M)&&!(function(fe,se){return T(fe)?T(se)&&u(Number.prototype.valueOf.call(fe),Number.prototype.valueOf.call(se)):N(fe)?N(se)&&String.prototype.valueOf.call(fe)===String.prototype.valueOf.call(se):x(fe)?x(se)&&Boolean.prototype.valueOf.call(fe)===Boolean.prototype.valueOf.call(se):I(fe)?I(se)&&BigInt.prototype.valueOf.call(fe)===BigInt.prototype.valueOf.call(se):L(se)&&Symbol.prototype.valueOf.call(fe)===Symbol.prototype.valueOf.call(se)})(M,$))return!1}return z(M,$,W,Y,0)}function V(M,$){return $.filter(function(W){return w(M,W)})}function z(M,$,W,Y,Q,q){if(arguments.length===5){q=Object.keys(M);var te=Object.keys($);if(q.length!==te.length)return!1}for(var ie=0;ie<q.length;ie++)if(!g($,q[ie]))return!1;if(W&&arguments.length===5){var ae=c(M);if(ae.length!==0){var ue=0;for(ie=0;ie<ae.length;ie++){var le=ae[ie];if(w(M,le)){if(!w($,le))return!1;q.push(le),ue++}else if(w($,le))return!1}var me=c($);if(ae.length!==me.length&&V($,me).length!==ue)return!1}else{var Ae=c($);if(Ae.length!==0&&V($,Ae).length!==0)return!1}}if(q.length===0&&(Q===0||Q===1&&M.length===0||M.size===0))return!0;if(Y===void 0)Y={val1:new Map,val2:new Map,position:0};else{var fe=Y.val1.get(M);if(fe!==void 0){var se=Y.val2.get($);if(se!==void 0)return fe===se}Y.position++}Y.val1.set(M,Y.position),Y.val2.set($,Y.position);var he=(function(ce,Ie,Ze,De,Ge,at){var Se=0;if(at===2){if(!(function(Ne,We,Le,Je){for(var ve=null,Ke=d(Ne),ft=0;ft<Ke.length;ft++){var ct=Ke[ft];if(o(ct)==="object"&&ct!==null)ve===null&&(ve=new Set),ve.add(ct);else if(!We.has(ct)){if(Le||!D(Ne,We,ct))return!1;ve===null&&(ve=new Set),ve.add(ct)}}if(ve!==null){for(var Be=d(We),Pt=0;Pt<Be.length;Pt++){var dt=Be[Pt];if(o(dt)==="object"&&dt!==null){if(!U(ve,dt,Le,Je))return!1}else if(!Le&&!Ne.has(dt)&&!U(ve,dt,Le,Je))return!1}return ve.size===0}return!0})(ce,Ie,Ze,Ge))return!1}else if(at===3){if(!(function(Ne,We,Le,Je){for(var ve=null,Ke=h(Ne),ft=0;ft<Ke.length;ft++){var ct=f(Ke[ft],2),Be=ct[0],Pt=ct[1];if(o(Be)==="object"&&Be!==null)ve===null&&(ve=new Set),ve.add(Be);else{var dt=We.get(Be);if(dt===void 0&&!We.has(Be)||!G(Pt,dt,Le,Je)){if(Le||!k(Ne,We,Be,Pt,Je))return!1;ve===null&&(ve=new Set),ve.add(Be)}}}if(ve!==null){for(var vr=h(We),Bn=0;Bn<vr.length;Bn++){var Er=f(vr[Bn],2),St=Er[0],Fn=Er[1];if(o(St)==="object"&&St!==null){if(!j(ve,Ne,St,Fn,Le,Je))return!1}else if(!(Le||Ne.has(St)&&G(Ne.get(St),Fn,!1,Je)||j(ve,Ne,St,Fn,!1,Je)))return!1}return ve.size===0}return!0})(ce,Ie,Ze,Ge))return!1}else if(at===1)for(;Se<ce.length;Se++){if(!g(ce,Se)){if(g(Ie,Se))return!1;for(var ke=Object.keys(ce);Se<ke.length;Se++){var ze=ke[Se];if(!g(Ie,ze)||!G(ce[ze],Ie[ze],Ze,Ge))return!1}return ke.length===Object.keys(Ie).length}if(!g(Ie,Se)||!G(ce[Se],Ie[Se],Ze,Ge))return!1}for(Se=0;Se<De.length;Se++){var nt=De[Se];if(!G(ce[nt],Ie[nt],Ze,Ge))return!1}return!0})(M,$,W,q,Y,Q);return Y.val1.delete(M),Y.val2.delete($),he}function U(M,$,W,Y){for(var Q=d(M),q=0;q<Q.length;q++){var te=Q[q];if(G($,te,W,Y))return M.delete(te),!0}return!1}function F(M){switch(o(M)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":M=+M;case"number":if(s(M))return!1}return!0}function D(M,$,W){var Y=F(W);return Y??($.has(Y)&&!M.has(Y))}function k(M,$,W,Y,Q){var q=F(W);if(q!=null)return q;var te=$.get(q);return!(te===void 0&&!$.has(q)||!G(Y,te,!1,Q))&&!M.has(q)&&G(Y,te,!1,Q)}function j(M,$,W,Y,Q,q){for(var te=d(M),ie=0;ie<te.length;ie++){var ae=te[ie];if(G(W,ae,Q,q)&&G(Y,$.get(ae),Q,q))return M.delete(ae),!0}return!1}n.exports={isDeepEqual:function(M,$){return G(M,$,!1)},isDeepStrictEqual:function(M,$){return G(M,$,!0)}}},3144(n,i,a){"use strict";var f=a(6743),b=a(1002),o=a(76),p=a(7119);n.exports=p||f.call(o,b)},2205(n,i,a){"use strict";var f=a(6743),b=a(1002),o=a(3144);n.exports=function(){return o(f,b,arguments)}},1002(n){"use strict";n.exports=Function.prototype.apply},76(n){"use strict";n.exports=Function.prototype.call},3126(n,i,a){"use strict";var f=a(6743),b=a(9675),o=a(76),p=a(3144);n.exports=function(d){if(d.length<1||typeof d[0]!="function")throw new b("a function is required");return p(f,o,d)}},7119(n){"use strict";n.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},8075(n,i,a){"use strict";var f=a(453),b=a(487),o=b(f("String.prototype.indexOf"));n.exports=function(p,d){var h=f(p,!!d);return typeof h=="function"&&o(p,".prototype.")>-1?b(h):h}},487(n,i,a){"use strict";var f=a(6897),b=a(655),o=a(3126),p=a(2205);n.exports=function(d){var h=o(arguments),u=d.length-(arguments.length-1);return f(h,1+(u>0?u:0),!0)},b?b(n.exports,"apply",{value:p}):n.exports.apply=p},6556(n,i,a){"use strict";var f=a(453),b=a(3126),o=b([f("%String.prototype.indexOf%")]);n.exports=function(p,d){var h=f(p,!!d);return typeof h=="function"&&o(p,".prototype.")>-1?b([h]):h}},6763(n,i,a){var f=a(537),b=a(4148);function o(){return new Date().getTime()}var p,d=Array.prototype.slice,h={};p=a.g!==void 0&&a.g.console?a.g.console:typeof window<"u"&&window.console?window.console:{};for(var u=[[function(){},"log"],[function(){p.log.apply(p,arguments)},"info"],[function(){p.log.apply(p,arguments)},"warn"],[function(){p.warn.apply(p,arguments)},"error"],[function(w){h[w]=o()},"time"],[function(w){var y=h[w];if(!y)throw new Error("No such label: "+w);delete h[w];var v=o()-y;p.log(w+": "+v+"ms")},"timeEnd"],[function(){var w=new Error;w.name="Trace",w.message=f.format.apply(null,arguments),p.error(w.stack)},"trace"],[function(w){p.log(f.inspect(w)+`
`)},"dir"],[function(w){if(!w){var y=d.call(arguments,1);b.ok(!1,f.format.apply(null,y))}},"assert"]],c=0;c<u.length;c++){var s=u[c],l=s[0],g=s[1];p[g]||(p[g]=l)}n.exports=p},955(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib.BlockCipher,p=b.algo,d=[],h=[],u=[],c=[],s=[],l=[],g=[],w=[],y=[],v=[];(function(){for(var E=[],O=0;O<256;O++)E[O]=O<128?O<<1:O<<1^283;var _=0,S=0;for(O=0;O<256;O++){var R=S^S<<1^S<<2^S<<3^S<<4;R=R>>>8^255&R^99,d[_]=R,h[R]=_;var A=E[_],T=E[A],N=E[T],x=257*E[R]^16843008*R;u[_]=x<<24|x>>>8,c[_]=x<<16|x>>>16,s[_]=x<<8|x>>>24,l[_]=x,x=16843009*N^65537*T^257*A^16843008*_,g[R]=x<<24|x>>>8,w[R]=x<<16|x>>>16,y[R]=x<<8|x>>>24,v[R]=x,_?(_=A^E[E[E[N^A]]],S^=E[E[S]]):_=S=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],C=p.AES=o.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var E=this._keyPriorReset=this._key,O=E.words,_=E.sigBytes/4,S=4*((this._nRounds=_+6)+1),R=this._keySchedule=[],A=0;A<S;A++)A<_?R[A]=O[A]:(x=R[A-1],A%_?_>6&&A%_==4&&(x=d[x>>>24]<<24|d[x>>>16&255]<<16|d[x>>>8&255]<<8|d[255&x]):(x=d[(x=x<<8|x>>>24)>>>24]<<24|d[x>>>16&255]<<16|d[x>>>8&255]<<8|d[255&x],x^=m[A/_|0]<<24),R[A]=R[A-_]^x);for(var T=this._invKeySchedule=[],N=0;N<S;N++){if(A=S-N,N%4)var x=R[A];else x=R[A-4];T[N]=N<4||A<=4?x:g[d[x>>>24]]^w[d[x>>>16&255]]^y[d[x>>>8&255]]^v[d[255&x]]}}},encryptBlock:function(E,O){this._doCryptBlock(E,O,this._keySchedule,u,c,s,l,d)},decryptBlock:function(E,O){var _=E[O+1];E[O+1]=E[O+3],E[O+3]=_,this._doCryptBlock(E,O,this._invKeySchedule,g,w,y,v,h),_=E[O+1],E[O+1]=E[O+3],E[O+3]=_},_doCryptBlock:function(E,O,_,S,R,A,T,N){for(var x=this._nRounds,I=E[O]^_[0],L=E[O+1]^_[1],H=E[O+2]^_[2],Z=E[O+3]^_[3],K=4,P=1;P<x;P++){var B=S[I>>>24]^R[L>>>16&255]^A[H>>>8&255]^T[255&Z]^_[K++],G=S[L>>>24]^R[H>>>16&255]^A[Z>>>8&255]^T[255&I]^_[K++],V=S[H>>>24]^R[Z>>>16&255]^A[I>>>8&255]^T[255&L]^_[K++],z=S[Z>>>24]^R[I>>>16&255]^A[L>>>8&255]^T[255&H]^_[K++];I=B,L=G,H=V,Z=z}B=(N[I>>>24]<<24|N[L>>>16&255]<<16|N[H>>>8&255]<<8|N[255&Z])^_[K++],G=(N[L>>>24]<<24|N[H>>>16&255]<<16|N[Z>>>8&255]<<8|N[255&I])^_[K++],V=(N[H>>>24]<<24|N[Z>>>16&255]<<16|N[I>>>8&255]<<8|N[255&L])^_[K++],z=(N[Z>>>24]<<24|N[I>>>16&255]<<16|N[L>>>8&255]<<8|N[255&H])^_[K++],E[O]=B,E[O+1]=G,E[O+2]=V,E[O+3]=z},keySize:8});b.AES=o._createHelper(C)})(),f.AES)},3128(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib.BlockCipher,p=b.algo;let d=16,h=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function s(w,y){let v=y>>24&255,m=y>>16&255,C=y>>8&255,E=255&y,O=w.sbox[0][v]+w.sbox[1][m];return O^=w.sbox[2][C],O+=w.sbox[3][E],O}function l(w,y,v){let m,C=y,E=v;for(let O=0;O<d;++O)C^=w.pbox[O],E=s(w,C)^E,m=C,C=E,E=m;return m=C,C=E,E=m,E^=w.pbox[d],C^=w.pbox[17],{left:C,right:E}}var g=p.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var w=this._keyPriorReset=this._key,y=w.words,v=w.sigBytes/4;(function(m,C,E){for(let A=0;A<4;A++){m.sbox[A]=[];for(let T=0;T<256;T++)m.sbox[A][T]=u[A][T]}let O=0;for(let A=0;A<18;A++)m.pbox[A]=h[A]^C[O],O++,O>=E&&(O=0);let _=0,S=0,R=0;for(let A=0;A<18;A+=2)R=l(m,_,S),_=R.left,S=R.right,m.pbox[A]=_,m.pbox[A+1]=S;for(let A=0;A<4;A++)for(let T=0;T<256;T+=2)R=l(m,_,S),_=R.left,S=R.right,m.sbox[A][T]=_,m.sbox[A][T+1]=S})(c,y,v)}},encryptBlock:function(w,y){var v=l(c,w[y],w[y+1]);w[y]=v.left,w[y+1]=v.right},decryptBlock:function(w,y){var v=(function(m,C,E){let O,_=C,S=E;for(let R=17;R>1;--R)_^=m.pbox[R],S=s(m,_)^S,O=_,_=S,S=O;return O=_,_=S,S=O,S^=m.pbox[1],_^=m.pbox[0],{left:_,right:S}})(c,w[y],w[y+1]);w[y]=v.left,w[y+1]=v.right},blockSize:2,keySize:4,ivSize:2});b.Blowfish=o._createHelper(g)})(),f.Blowfish)},7165(n,i,a){var f,b,o,p,d,h,u,c,s,l,g,w,y,v,m,C,E,O,_;n.exports=(f=a(9021),a(9506),void(f.lib.Cipher||(b=f,o=b.lib,p=o.Base,d=o.WordArray,h=o.BufferedBlockAlgorithm,u=b.enc,u.Utf8,c=u.Base64,s=b.algo.EvpKDF,l=o.Cipher=h.extend({cfg:p.extend(),createEncryptor:function(S,R){return this.create(this._ENC_XFORM_MODE,S,R)},createDecryptor:function(S,R){return this.create(this._DEC_XFORM_MODE,S,R)},init:function(S,R,A){this.cfg=this.cfg.extend(A),this._xformMode=S,this._key=R,this.reset()},reset:function(){h.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){return S&&this._append(S),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function S(R){return typeof R=="string"?_:E}return function(R){return{encrypt:function(A,T,N){return S(T).encrypt(R,A,T,N)},decrypt:function(A,T,N){return S(T).decrypt(R,A,T,N)}}}})()}),o.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),g=b.mode={},w=o.BlockCipherMode=p.extend({createEncryptor:function(S,R){return this.Encryptor.create(S,R)},createDecryptor:function(S,R){return this.Decryptor.create(S,R)},init:function(S,R){this._cipher=S,this._iv=R}}),y=g.CBC=(function(){var S=w.extend();function R(A,T,N){var x,I=this._iv;I?(x=I,this._iv=void 0):x=this._prevBlock;for(var L=0;L<N;L++)A[T+L]^=x[L]}return S.Encryptor=S.extend({processBlock:function(A,T){var N=this._cipher,x=N.blockSize;R.call(this,A,T,x),N.encryptBlock(A,T),this._prevBlock=A.slice(T,T+x)}}),S.Decryptor=S.extend({processBlock:function(A,T){var N=this._cipher,x=N.blockSize,I=A.slice(T,T+x);N.decryptBlock(A,T),R.call(this,A,T,x),this._prevBlock=I}}),S})(),v=(b.pad={}).Pkcs7={pad:function(S,R){for(var A=4*R,T=A-S.sigBytes%A,N=T<<24|T<<16|T<<8|T,x=[],I=0;I<T;I+=4)x.push(N);var L=d.create(x,T);S.concat(L)},unpad:function(S){var R=255&S.words[S.sigBytes-1>>>2];S.sigBytes-=R}},o.BlockCipher=l.extend({cfg:l.cfg.extend({mode:y,padding:v}),reset:function(){var S;l.reset.call(this);var R=this.cfg,A=R.iv,T=R.mode;this._xformMode==this._ENC_XFORM_MODE?S=T.createEncryptor:(S=T.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,A&&A.words):(this._mode=S.call(T,this,A&&A.words),this._mode.__creator=S)},_doProcessBlock:function(S,R){this._mode.processBlock(S,R)},_doFinalize:function(){var S,R=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(R.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),R.unpad(S)),S},blockSize:4}),m=o.CipherParams=p.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),C=(b.format={}).OpenSSL={stringify:function(S){var R=S.ciphertext,A=S.salt;return(A?d.create([1398893684,1701076831]).concat(A).concat(R):R).toString(c)},parse:function(S){var R,A=c.parse(S),T=A.words;return T[0]==1398893684&&T[1]==1701076831&&(R=d.create(T.slice(2,4)),T.splice(0,4),A.sigBytes-=16),m.create({ciphertext:A,salt:R})}},E=o.SerializableCipher=p.extend({cfg:p.extend({format:C}),encrypt:function(S,R,A,T){T=this.cfg.extend(T);var N=S.createEncryptor(A,T),x=N.finalize(R),I=N.cfg;return m.create({ciphertext:x,key:A,iv:I.iv,algorithm:S,mode:I.mode,padding:I.padding,blockSize:S.blockSize,formatter:T.format})},decrypt:function(S,R,A,T){return T=this.cfg.extend(T),R=this._parse(R,T.format),S.createDecryptor(A,T).finalize(R.ciphertext)},_parse:function(S,R){return typeof S=="string"?R.parse(S,this):S}}),O=(b.kdf={}).OpenSSL={execute:function(S,R,A,T,N){if(T||(T=d.random(8)),N)x=s.create({keySize:R+A,hasher:N}).compute(S,T);else var x=s.create({keySize:R+A}).compute(S,T);var I=d.create(x.words.slice(R),4*A);return x.sigBytes=4*R,m.create({key:x,iv:I,salt:T})}},_=o.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:O}),encrypt:function(S,R,A,T){var N=(T=this.cfg.extend(T)).kdf.execute(A,S.keySize,S.ivSize,T.salt,T.hasher);T.iv=N.iv;var x=E.encrypt.call(this,S,R,N.key,T);return x.mixIn(N),x},decrypt:function(S,R,A,T){T=this.cfg.extend(T),R=this._parse(R,T.format);var N=T.kdf.execute(A,S.keySize,S.ivSize,R.salt,T.hasher);return T.iv=N.iv,E.decrypt.call(this,S,R,N.key,T)}}))))},9021(n,i,a){var f;n.exports=(f=f||(function(b){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&a.g!==void 0&&a.g.crypto&&(o=a.g.crypto),!o)try{o=a(477)}catch{}var p=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||(function(){function C(){}return function(E){var O;return C.prototype=E,O=new C,C.prototype=null,O}})(),h={},u=h.lib={},c=u.Base={extend:function(C){var E=d(this);return C&&E.mixIn(C),E.hasOwnProperty("init")&&this.init!==E.init||(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var E in C)C.hasOwnProperty(E)&&(this[E]=C[E]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}},s=u.WordArray=c.extend({init:function(C,E){C=this.words=C||[],this.sigBytes=E??4*C.length},toString:function(C){return(C||g).stringify(this)},concat:function(C){var E=this.words,O=C.words,_=this.sigBytes,S=C.sigBytes;if(this.clamp(),_%4)for(var R=0;R<S;R++){var A=O[R>>>2]>>>24-R%4*8&255;E[_+R>>>2]|=A<<24-(_+R)%4*8}else for(var T=0;T<S;T+=4)E[_+T>>>2]=O[T>>>2];return this.sigBytes+=S,this},clamp:function(){var C=this.words,E=this.sigBytes;C[E>>>2]&=4294967295<<32-E%4*8,C.length=b.ceil(E/4)},clone:function(){var C=c.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var E=[],O=0;O<C;O+=4)E.push(p());return new s.init(E,C)}}),l=h.enc={},g=l.Hex={stringify:function(C){for(var E=C.words,O=C.sigBytes,_=[],S=0;S<O;S++){var R=E[S>>>2]>>>24-S%4*8&255;_.push((R>>>4).toString(16)),_.push((15&R).toString(16))}return _.join("")},parse:function(C){for(var E=C.length,O=[],_=0;_<E;_+=2)O[_>>>3]|=parseInt(C.substr(_,2),16)<<24-_%8*4;return new s.init(O,E/2)}},w=l.Latin1={stringify:function(C){for(var E=C.words,O=C.sigBytes,_=[],S=0;S<O;S++){var R=E[S>>>2]>>>24-S%4*8&255;_.push(String.fromCharCode(R))}return _.join("")},parse:function(C){for(var E=C.length,O=[],_=0;_<E;_++)O[_>>>2]|=(255&C.charCodeAt(_))<<24-_%4*8;return new s.init(O,E)}},y=l.Utf8={stringify:function(C){try{return decodeURIComponent(escape(w.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return w.parse(unescape(encodeURIComponent(C)))}},v=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=y.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var E,O=this._data,_=O.words,S=O.sigBytes,R=this.blockSize,A=S/(4*R),T=(A=C?b.ceil(A):b.max((0|A)-this._minBufferSize,0))*R,N=b.min(4*T,S);if(T){for(var x=0;x<T;x+=R)this._doProcessBlock(_,x);E=_.splice(0,T),O.sigBytes-=N}return new s.init(E,N)},clone:function(){var C=c.clone.call(this);return C._data=this._data.clone(),C},_minBufferSize:0}),m=(u.Hasher=v.extend({cfg:c.extend(),init:function(C){this.cfg=this.cfg.extend(C),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(C){return this._append(C),this._process(),this},finalize:function(C){return C&&this._append(C),this._doFinalize()},blockSize:16,_createHelper:function(C){return function(E,O){return new C.init(O).finalize(E)}},_createHmacHelper:function(C){return function(E,O){return new m.HMAC.init(C,O).finalize(E)}}}),h.algo={});return h})(Math),f)},754(n,i,a){var f,b,o;n.exports=(f=a(9021),o=(b=f).lib.WordArray,b.enc.Base64={stringify:function(p){var d=p.words,h=p.sigBytes,u=this._map;p.clamp();for(var c=[],s=0;s<h;s+=3)for(var l=(d[s>>>2]>>>24-s%4*8&255)<<16|(d[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|d[s+2>>>2]>>>24-(s+2)%4*8&255,g=0;g<4&&s+.75*g<h;g++)c.push(u.charAt(l>>>6*(3-g)&63));var w=u.charAt(64);if(w)for(;c.length%4;)c.push(w);return c.join("")},parse:function(p){var d=p.length,h=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var c=0;c<h.length;c++)u[h.charCodeAt(c)]=c}var s=h.charAt(64);if(s){var l=p.indexOf(s);l!==-1&&(d=l)}return(function(g,w,y){for(var v=[],m=0,C=0;C<w;C++)if(C%4){var E=y[g.charCodeAt(C-1)]<<C%4*2|y[g.charCodeAt(C)]>>>6-C%4*2;v[m>>>2]|=E<<24-m%4*8,m++}return o.create(v,m)})(p,d,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},f.enc.Base64)},4725(n,i,a){var f,b,o;n.exports=(f=a(9021),o=(b=f).lib.WordArray,b.enc.Base64url={stringify:function(p,d){d===void 0&&(d=!0);var h=p.words,u=p.sigBytes,c=d?this._safe_map:this._map;p.clamp();for(var s=[],l=0;l<u;l+=3)for(var g=(h[l>>>2]>>>24-l%4*8&255)<<16|(h[l+1>>>2]>>>24-(l+1)%4*8&255)<<8|h[l+2>>>2]>>>24-(l+2)%4*8&255,w=0;w<4&&l+.75*w<u;w++)s.push(c.charAt(g>>>6*(3-w)&63));var y=c.charAt(64);if(y)for(;s.length%4;)s.push(y);return s.join("")},parse:function(p,d){d===void 0&&(d=!0);var h=p.length,u=d?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var s=0;s<u.length;s++)c[u.charCodeAt(s)]=s}var l=u.charAt(64);if(l){var g=p.indexOf(l);g!==-1&&(h=g)}return(function(w,y,v){for(var m=[],C=0,E=0;E<y;E++)if(E%4){var O=v[w.charCodeAt(E-1)]<<E%4*2|v[w.charCodeAt(E)]>>>6-E%4*2;m[C>>>2]|=O<<24-C%4*8,C++}return o.create(m,C)})(p,h,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},f.enc.Base64url)},5503(n,i,a){var f;n.exports=(f=a(9021),(function(){var b=f,o=b.lib.WordArray,p=b.enc;function d(h){return h<<8&4278255360|h>>>8&16711935}p.Utf16=p.Utf16BE={stringify:function(h){for(var u=h.words,c=h.sigBytes,s=[],l=0;l<c;l+=2){var g=u[l>>>2]>>>16-l%4*8&65535;s.push(String.fromCharCode(g))}return s.join("")},parse:function(h){for(var u=h.length,c=[],s=0;s<u;s++)c[s>>>1]|=h.charCodeAt(s)<<16-s%2*16;return o.create(c,2*u)}},p.Utf16LE={stringify:function(h){for(var u=h.words,c=h.sigBytes,s=[],l=0;l<c;l+=2){var g=d(u[l>>>2]>>>16-l%4*8&65535);s.push(String.fromCharCode(g))}return s.join("")},parse:function(h){for(var u=h.length,c=[],s=0;s<u;s++)c[s>>>1]|=d(h.charCodeAt(s)<<16-s%2*16);return o.create(c,2*u)}}})(),f.enc.Utf16)},9506(n,i,a){var f,b,o,p,d,h,u,c;n.exports=(c=a(9021),a(5471),a(1025),o=(b=(f=c).lib).Base,p=b.WordArray,h=(d=f.algo).MD5,u=d.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:h,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,l){for(var g,w=this.cfg,y=w.hasher.create(),v=p.create(),m=v.words,C=w.keySize,E=w.iterations;m.length<C;){g&&y.update(g),g=y.update(s).finalize(l),y.reset();for(var O=1;O<E;O++)g=y.finalize(g),y.reset();v.concat(g)}return v.sigBytes=4*C,v}}),f.EvpKDF=function(s,l,g){return u.create(g).compute(s,l)},c.EvpKDF)},25(n,i,a){var f,b,o,p;n.exports=(p=a(9021),a(7165),b=(f=p).lib.CipherParams,o=f.enc.Hex,f.format.Hex={stringify:function(d){return d.ciphertext.toString(o)},parse:function(d){var h=o.parse(d);return b.create({ciphertext:h})}},p.format.Hex)},1025(n,i,a){var f,b,o;n.exports=(b=(f=a(9021)).lib.Base,o=f.enc.Utf8,void(f.algo.HMAC=b.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=o.parse(d));var h=p.blockSize,u=4*h;d.sigBytes>u&&(d=p.finalize(d)),d.clamp();for(var c=this._oKey=d.clone(),s=this._iKey=d.clone(),l=c.words,g=s.words,w=0;w<h;w++)l[w]^=1549556828,g[w]^=909522486;c.sigBytes=s.sigBytes=u,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var d=this._hasher,h=d.finalize(p);return d.reset(),d.finalize(this._oKey.clone().concat(h))}})))},1396(n,i,a){var f;n.exports=(f=a(9021),a(3240),a(6440),a(5503),a(754),a(4725),a(4636),a(5471),a(3009),a(6308),a(1380),a(9557),a(5953),a(8056),a(1025),a(19),a(9506),a(7165),a(2169),a(6939),a(6372),a(3797),a(8454),a(2073),a(4905),a(482),a(2155),a(8124),a(25),a(955),a(7628),a(7193),a(6298),a(2696),a(3128),f)},6440(n,i,a){var f;n.exports=(f=a(9021),(function(){if(typeof ArrayBuffer=="function"){var b=f.lib.WordArray,o=b.init,p=b.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var h=d.byteLength,u=[],c=0;c<h;c++)u[c>>>2]|=d[c]<<24-c%4*8;o.call(this,u,h)}else o.apply(this,arguments)};p.prototype=b}})(),f.lib.WordArray)},4636(n,i,a){var f;n.exports=(f=a(9021),(function(b){var o=f,p=o.lib,d=p.WordArray,h=p.Hasher,u=o.algo,c=[];(function(){for(var v=0;v<64;v++)c[v]=4294967296*b.abs(b.sin(v+1))|0})();var s=u.MD5=h.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,m){for(var C=0;C<16;C++){var E=m+C,O=v[E];v[E]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8)}var _=this._hash.words,S=v[m+0],R=v[m+1],A=v[m+2],T=v[m+3],N=v[m+4],x=v[m+5],I=v[m+6],L=v[m+7],H=v[m+8],Z=v[m+9],K=v[m+10],P=v[m+11],B=v[m+12],G=v[m+13],V=v[m+14],z=v[m+15],U=_[0],F=_[1],D=_[2],k=_[3];U=l(U,F,D,k,S,7,c[0]),k=l(k,U,F,D,R,12,c[1]),D=l(D,k,U,F,A,17,c[2]),F=l(F,D,k,U,T,22,c[3]),U=l(U,F,D,k,N,7,c[4]),k=l(k,U,F,D,x,12,c[5]),D=l(D,k,U,F,I,17,c[6]),F=l(F,D,k,U,L,22,c[7]),U=l(U,F,D,k,H,7,c[8]),k=l(k,U,F,D,Z,12,c[9]),D=l(D,k,U,F,K,17,c[10]),F=l(F,D,k,U,P,22,c[11]),U=l(U,F,D,k,B,7,c[12]),k=l(k,U,F,D,G,12,c[13]),D=l(D,k,U,F,V,17,c[14]),U=g(U,F=l(F,D,k,U,z,22,c[15]),D,k,R,5,c[16]),k=g(k,U,F,D,I,9,c[17]),D=g(D,k,U,F,P,14,c[18]),F=g(F,D,k,U,S,20,c[19]),U=g(U,F,D,k,x,5,c[20]),k=g(k,U,F,D,K,9,c[21]),D=g(D,k,U,F,z,14,c[22]),F=g(F,D,k,U,N,20,c[23]),U=g(U,F,D,k,Z,5,c[24]),k=g(k,U,F,D,V,9,c[25]),D=g(D,k,U,F,T,14,c[26]),F=g(F,D,k,U,H,20,c[27]),U=g(U,F,D,k,G,5,c[28]),k=g(k,U,F,D,A,9,c[29]),D=g(D,k,U,F,L,14,c[30]),U=w(U,F=g(F,D,k,U,B,20,c[31]),D,k,x,4,c[32]),k=w(k,U,F,D,H,11,c[33]),D=w(D,k,U,F,P,16,c[34]),F=w(F,D,k,U,V,23,c[35]),U=w(U,F,D,k,R,4,c[36]),k=w(k,U,F,D,N,11,c[37]),D=w(D,k,U,F,L,16,c[38]),F=w(F,D,k,U,K,23,c[39]),U=w(U,F,D,k,G,4,c[40]),k=w(k,U,F,D,S,11,c[41]),D=w(D,k,U,F,T,16,c[42]),F=w(F,D,k,U,I,23,c[43]),U=w(U,F,D,k,Z,4,c[44]),k=w(k,U,F,D,B,11,c[45]),D=w(D,k,U,F,z,16,c[46]),U=y(U,F=w(F,D,k,U,A,23,c[47]),D,k,S,6,c[48]),k=y(k,U,F,D,L,10,c[49]),D=y(D,k,U,F,V,15,c[50]),F=y(F,D,k,U,x,21,c[51]),U=y(U,F,D,k,B,6,c[52]),k=y(k,U,F,D,T,10,c[53]),D=y(D,k,U,F,K,15,c[54]),F=y(F,D,k,U,R,21,c[55]),U=y(U,F,D,k,H,6,c[56]),k=y(k,U,F,D,z,10,c[57]),D=y(D,k,U,F,I,15,c[58]),F=y(F,D,k,U,G,21,c[59]),U=y(U,F,D,k,N,6,c[60]),k=y(k,U,F,D,P,10,c[61]),D=y(D,k,U,F,A,15,c[62]),F=y(F,D,k,U,Z,21,c[63]),_[0]=_[0]+U|0,_[1]=_[1]+F|0,_[2]=_[2]+D|0,_[3]=_[3]+k|0},_doFinalize:function(){var v=this._data,m=v.words,C=8*this._nDataBytes,E=8*v.sigBytes;m[E>>>5]|=128<<24-E%32;var O=b.floor(C/4294967296),_=C;m[15+(E+64>>>9<<4)]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),m[14+(E+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),v.sigBytes=4*(m.length+1),this._process();for(var S=this._hash,R=S.words,A=0;A<4;A++){var T=R[A];R[A]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8)}return S},clone:function(){var v=h.clone.call(this);return v._hash=this._hash.clone(),v}});function l(v,m,C,E,O,_,S){var R=v+(m&C|~m&E)+O+S;return(R<<_|R>>>32-_)+m}function g(v,m,C,E,O,_,S){var R=v+(m&E|C&~E)+O+S;return(R<<_|R>>>32-_)+m}function w(v,m,C,E,O,_,S){var R=v+(m^C^E)+O+S;return(R<<_|R>>>32-_)+m}function y(v,m,C,E,O,_,S){var R=v+(C^(m|~E))+O+S;return(R<<_|R>>>32-_)+m}o.MD5=h._createHelper(s),o.HmacMD5=h._createHmacHelper(s)})(Math),f.MD5)},2169(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.mode.CFB=(function(){var b=f.lib.BlockCipherMode.extend();function o(p,d,h,u){var c,s=this._iv;s?(c=s.slice(0),this._iv=void 0):c=this._prevBlock,u.encryptBlock(c,0);for(var l=0;l<h;l++)p[d+l]^=c[l]}return b.Encryptor=b.extend({processBlock:function(p,d){var h=this._cipher,u=h.blockSize;o.call(this,p,d,u,h),this._prevBlock=p.slice(d,d+u)}}),b.Decryptor=b.extend({processBlock:function(p,d){var h=this._cipher,u=h.blockSize,c=p.slice(d,d+u);o.call(this,p,d,u,h),this._prevBlock=c}}),b})(),f.mode.CFB)},6372(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.mode.CTRGladman=(function(){var b=f.lib.BlockCipherMode.extend();function o(d){if(255&~(d>>24))d+=16777216;else{var h=d>>16&255,u=d>>8&255,c=255&d;h===255?(h=0,u===255?(u=0,c===255?c=0:++c):++u):++h,d=0,d+=h<<16,d+=u<<8,d+=c}return d}var p=b.Encryptor=b.extend({processBlock:function(d,h){var u=this._cipher,c=u.blockSize,s=this._iv,l=this._counter;s&&(l=this._counter=s.slice(0),this._iv=void 0),(function(y){(y[0]=o(y[0]))===0&&(y[1]=o(y[1]))})(l);var g=l.slice(0);u.encryptBlock(g,0);for(var w=0;w<c;w++)d[h+w]^=g[w]}});return b.Decryptor=p,b})(),f.mode.CTRGladman)},6939(n,i,a){var f,b,o;n.exports=(o=a(9021),a(7165),o.mode.CTR=(b=(f=o.lib.BlockCipherMode.extend()).Encryptor=f.extend({processBlock:function(p,d){var h=this._cipher,u=h.blockSize,c=this._iv,s=this._counter;c&&(s=this._counter=c.slice(0),this._iv=void 0);var l=s.slice(0);h.encryptBlock(l,0),s[u-1]=s[u-1]+1|0;for(var g=0;g<u;g++)p[d+g]^=l[g]}}),f.Decryptor=b,f),o.mode.CTR)},8454(n,i,a){var f,b;n.exports=(b=a(9021),a(7165),b.mode.ECB=((f=b.lib.BlockCipherMode.extend()).Encryptor=f.extend({processBlock:function(o,p){this._cipher.encryptBlock(o,p)}}),f.Decryptor=f.extend({processBlock:function(o,p){this._cipher.decryptBlock(o,p)}}),f),b.mode.ECB)},3797(n,i,a){var f,b,o;n.exports=(o=a(9021),a(7165),o.mode.OFB=(b=(f=o.lib.BlockCipherMode.extend()).Encryptor=f.extend({processBlock:function(p,d){var h=this._cipher,u=h.blockSize,c=this._iv,s=this._keystream;c&&(s=this._keystream=c.slice(0),this._iv=void 0),h.encryptBlock(s,0);for(var l=0;l<u;l++)p[d+l]^=s[l]}}),f.Decryptor=b,f),o.mode.OFB)},2073(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.pad.AnsiX923={pad:function(b,o){var p=b.sigBytes,d=4*o,h=d-p%d,u=p+h-1;b.clamp(),b.words[u>>>2]|=h<<24-u%4*8,b.sigBytes+=h},unpad:function(b){var o=255&b.words[b.sigBytes-1>>>2];b.sigBytes-=o}},f.pad.Ansix923)},4905(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.pad.Iso10126={pad:function(b,o){var p=4*o,d=p-b.sigBytes%p;b.concat(f.lib.WordArray.random(d-1)).concat(f.lib.WordArray.create([d<<24],1))},unpad:function(b){var o=255&b.words[b.sigBytes-1>>>2];b.sigBytes-=o}},f.pad.Iso10126)},482(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.pad.Iso97971={pad:function(b,o){b.concat(f.lib.WordArray.create([2147483648],1)),f.pad.ZeroPadding.pad(b,o)},unpad:function(b){f.pad.ZeroPadding.unpad(b),b.sigBytes--}},f.pad.Iso97971)},8124(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.pad.NoPadding={pad:function(){},unpad:function(){}},f.pad.NoPadding)},2155(n,i,a){var f;n.exports=(f=a(9021),a(7165),f.pad.ZeroPadding={pad:function(b,o){var p=4*o;b.clamp(),b.sigBytes+=p-(b.sigBytes%p||p)},unpad:function(b){var o=b.words,p=b.sigBytes-1;for(p=b.sigBytes-1;p>=0;p--)if(o[p>>>2]>>>24-p%4*8&255){b.sigBytes=p+1;break}}},f.pad.ZeroPadding)},19(n,i,a){var f,b,o,p,d,h,u,c,s;n.exports=(s=a(9021),a(3009),a(1025),o=(b=(f=s).lib).Base,p=b.WordArray,h=(d=f.algo).SHA256,u=d.HMAC,c=d.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:h,iterations:25e4}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,g){for(var w=this.cfg,y=u.create(w.hasher,l),v=p.create(),m=p.create([1]),C=v.words,E=m.words,O=w.keySize,_=w.iterations;C.length<O;){var S=y.update(g).finalize(m);y.reset();for(var R=S.words,A=R.length,T=S,N=1;N<_;N++){T=y.finalize(T),y.reset();for(var x=T.words,I=0;I<A;I++)R[I]^=x[I]}v.concat(S),E[0]++}return v.sigBytes=4*O,v}}),f.PBKDF2=function(l,g,w){return c.create(w).compute(l,g)},s.PBKDF2)},2696(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib.StreamCipher,p=b.algo,d=[],h=[],u=[],c=p.RabbitLegacy=o.extend({_doReset:function(){var l=this._key.words,g=this.cfg.iv,w=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],y=this._C=[l[2]<<16|l[2]>>>16,4294901760&l[0]|65535&l[1],l[3]<<16|l[3]>>>16,4294901760&l[1]|65535&l[2],l[0]<<16|l[0]>>>16,4294901760&l[2]|65535&l[3],l[1]<<16|l[1]>>>16,4294901760&l[3]|65535&l[0]];this._b=0;for(var v=0;v<4;v++)s.call(this);for(v=0;v<8;v++)y[v]^=w[v+4&7];if(g){var m=g.words,C=m[0],E=m[1],O=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),_=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8),S=O>>>16|4294901760&_,R=_<<16|65535&O;for(y[0]^=O,y[1]^=S,y[2]^=_,y[3]^=R,y[4]^=O,y[5]^=S,y[6]^=_,y[7]^=R,v=0;v<4;v++)s.call(this)}},_doProcessBlock:function(l,g){var w=this._X;s.call(this),d[0]=w[0]^w[5]>>>16^w[3]<<16,d[1]=w[2]^w[7]>>>16^w[5]<<16,d[2]=w[4]^w[1]>>>16^w[7]<<16,d[3]=w[6]^w[3]>>>16^w[1]<<16;for(var y=0;y<4;y++)d[y]=16711935&(d[y]<<8|d[y]>>>24)|4278255360&(d[y]<<24|d[y]>>>8),l[g+y]^=d[y]},blockSize:4,ivSize:2});function s(){for(var l=this._X,g=this._C,w=0;w<8;w++)h[w]=g[w];for(g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<h[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<h[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<h[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<h[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<h[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<h[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<h[6]>>>0?1:0)|0,this._b=g[7]>>>0<h[7]>>>0?1:0,w=0;w<8;w++){var y=l[w]+g[w],v=65535&y,m=y>>>16,C=((v*v>>>17)+v*m>>>15)+m*m,E=((4294901760&y)*y|0)+((65535&y)*y|0);u[w]=C^E}l[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,l[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,l[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,l[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,l[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,l[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,l[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,l[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}b.RabbitLegacy=o._createHelper(c)})(),f.RabbitLegacy)},6298(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib.StreamCipher,p=b.algo,d=[],h=[],u=[],c=p.Rabbit=o.extend({_doReset:function(){for(var l=this._key.words,g=this.cfg.iv,w=0;w<4;w++)l[w]=16711935&(l[w]<<8|l[w]>>>24)|4278255360&(l[w]<<24|l[w]>>>8);var y=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],v=this._C=[l[2]<<16|l[2]>>>16,4294901760&l[0]|65535&l[1],l[3]<<16|l[3]>>>16,4294901760&l[1]|65535&l[2],l[0]<<16|l[0]>>>16,4294901760&l[2]|65535&l[3],l[1]<<16|l[1]>>>16,4294901760&l[3]|65535&l[0]];for(this._b=0,w=0;w<4;w++)s.call(this);for(w=0;w<8;w++)v[w]^=y[w+4&7];if(g){var m=g.words,C=m[0],E=m[1],O=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),_=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8),S=O>>>16|4294901760&_,R=_<<16|65535&O;for(v[0]^=O,v[1]^=S,v[2]^=_,v[3]^=R,v[4]^=O,v[5]^=S,v[6]^=_,v[7]^=R,w=0;w<4;w++)s.call(this)}},_doProcessBlock:function(l,g){var w=this._X;s.call(this),d[0]=w[0]^w[5]>>>16^w[3]<<16,d[1]=w[2]^w[7]>>>16^w[5]<<16,d[2]=w[4]^w[1]>>>16^w[7]<<16,d[3]=w[6]^w[3]>>>16^w[1]<<16;for(var y=0;y<4;y++)d[y]=16711935&(d[y]<<8|d[y]>>>24)|4278255360&(d[y]<<24|d[y]>>>8),l[g+y]^=d[y]},blockSize:4,ivSize:2});function s(){for(var l=this._X,g=this._C,w=0;w<8;w++)h[w]=g[w];for(g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<h[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<h[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<h[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<h[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<h[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<h[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<h[6]>>>0?1:0)|0,this._b=g[7]>>>0<h[7]>>>0?1:0,w=0;w<8;w++){var y=l[w]+g[w],v=65535&y,m=y>>>16,C=((v*v>>>17)+v*m>>>15)+m*m,E=((4294901760&y)*y|0)+((65535&y)*y|0);u[w]=C^E}l[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,l[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,l[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,l[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,l[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,l[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,l[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,l[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}b.Rabbit=o._createHelper(c)})(),f.Rabbit)},7193(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib.StreamCipher,p=b.algo,d=p.RC4=o.extend({_doReset:function(){for(var c=this._key,s=c.words,l=c.sigBytes,g=this._S=[],w=0;w<256;w++)g[w]=w;w=0;for(var y=0;w<256;w++){var v=w%l,m=s[v>>>2]>>>24-v%4*8&255;y=(y+g[w]+m)%256;var C=g[w];g[w]=g[y],g[y]=C}this._i=this._j=0},_doProcessBlock:function(c,s){c[s]^=h.call(this)},keySize:8,ivSize:0});function h(){for(var c=this._S,s=this._i,l=this._j,g=0,w=0;w<4;w++){l=(l+c[s=(s+1)%256])%256;var y=c[s];c[s]=c[l],c[l]=y,g|=c[(c[s]+c[l])%256]<<24-8*w}return this._i=s,this._j=l,g}b.RC4=o._createHelper(d);var u=p.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)h.call(this)}});b.RC4Drop=o._createHelper(u)})(),f.RC4)},8056(n,i,a){var f;n.exports=(f=a(9021),(function(){var b=f,o=b.lib,p=o.WordArray,d=o.Hasher,h=b.algo,u=p.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=p.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=p.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=p.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),g=p.create([0,1518500249,1859775393,2400959708,2840853838]),w=p.create([1352829926,1548603684,1836072691,2053994217,0]),y=h.RIPEMD160=d.extend({_doReset:function(){this._hash=p.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,R){for(var A=0;A<16;A++){var T=R+A,N=S[T];S[T]=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8)}var x,I,L,H,Z,K,P,B,G,V,z,U=this._hash.words,F=g.words,D=w.words,k=u.words,j=c.words,M=s.words,$=l.words;for(K=x=U[0],P=I=U[1],B=L=U[2],G=H=U[3],V=Z=U[4],A=0;A<80;A+=1)z=x+S[R+k[A]]|0,z+=A<16?v(I,L,H)+F[0]:A<32?m(I,L,H)+F[1]:A<48?C(I,L,H)+F[2]:A<64?E(I,L,H)+F[3]:O(I,L,H)+F[4],z=(z=_(z|=0,M[A]))+Z|0,x=Z,Z=H,H=_(L,10),L=I,I=z,z=K+S[R+j[A]]|0,z+=A<16?O(P,B,G)+D[0]:A<32?E(P,B,G)+D[1]:A<48?C(P,B,G)+D[2]:A<64?m(P,B,G)+D[3]:v(P,B,G)+D[4],z=(z=_(z|=0,$[A]))+V|0,K=V,V=G,G=_(B,10),B=P,P=z;z=U[1]+L+G|0,U[1]=U[2]+H+V|0,U[2]=U[3]+Z+K|0,U[3]=U[4]+x+P|0,U[4]=U[0]+I+B|0,U[0]=z},_doFinalize:function(){var S=this._data,R=S.words,A=8*this._nDataBytes,T=8*S.sigBytes;R[T>>>5]|=128<<24-T%32,R[14+(T+64>>>9<<4)]=16711935&(A<<8|A>>>24)|4278255360&(A<<24|A>>>8),S.sigBytes=4*(R.length+1),this._process();for(var N=this._hash,x=N.words,I=0;I<5;I++){var L=x[I];x[I]=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8)}return N},clone:function(){var S=d.clone.call(this);return S._hash=this._hash.clone(),S}});function v(S,R,A){return S^R^A}function m(S,R,A){return S&R|~S&A}function C(S,R,A){return(S|~R)^A}function E(S,R,A){return S&A|R&~A}function O(S,R,A){return S^(R|~A)}function _(S,R){return S<<R|S>>>32-R}b.RIPEMD160=d._createHelper(y),b.HmacRIPEMD160=d._createHmacHelper(y)})(Math),f.RIPEMD160)},5471(n,i,a){var f,b,o,p,d,h,u,c;n.exports=(b=(f=c=a(9021)).lib,o=b.WordArray,p=b.Hasher,d=f.algo,h=[],u=d.SHA1=p.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,l){for(var g=this._hash.words,w=g[0],y=g[1],v=g[2],m=g[3],C=g[4],E=0;E<80;E++){if(E<16)h[E]=0|s[l+E];else{var O=h[E-3]^h[E-8]^h[E-14]^h[E-16];h[E]=O<<1|O>>>31}var _=(w<<5|w>>>27)+C+h[E];_+=E<20?1518500249+(y&v|~y&m):E<40?1859775393+(y^v^m):E<60?(y&v|y&m|v&m)-1894007588:(y^v^m)-899497514,C=m,m=v,v=y<<30|y>>>2,y=w,w=_}g[0]=g[0]+w|0,g[1]=g[1]+y|0,g[2]=g[2]+v|0,g[3]=g[3]+m|0,g[4]=g[4]+C|0},_doFinalize:function(){var s=this._data,l=s.words,g=8*this._nDataBytes,w=8*s.sigBytes;return l[w>>>5]|=128<<24-w%32,l[14+(w+64>>>9<<4)]=Math.floor(g/4294967296),l[15+(w+64>>>9<<4)]=g,s.sigBytes=4*l.length,this._process(),this._hash},clone:function(){var s=p.clone.call(this);return s._hash=this._hash.clone(),s}}),f.SHA1=p._createHelper(u),f.HmacSHA1=p._createHmacHelper(u),c.SHA1)},6308(n,i,a){var f,b,o,p,d,h;n.exports=(h=a(9021),a(3009),b=(f=h).lib.WordArray,o=f.algo,p=o.SHA256,d=o.SHA224=p.extend({_doReset:function(){this._hash=new b.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=p._doFinalize.call(this);return u.sigBytes-=4,u}}),f.SHA224=p._createHelper(d),f.HmacSHA224=p._createHmacHelper(d),h.SHA224)},3009(n,i,a){var f;n.exports=(f=a(9021),(function(b){var o=f,p=o.lib,d=p.WordArray,h=p.Hasher,u=o.algo,c=[],s=[];(function(){function w(C){for(var E=b.sqrt(C),O=2;O<=E;O++)if(!(C%O))return!1;return!0}function y(C){return 4294967296*(C-(0|C))|0}for(var v=2,m=0;m<64;)w(v)&&(m<8&&(c[m]=y(b.pow(v,.5))),s[m]=y(b.pow(v,.3333333333333333)),m++),v++})();var l=[],g=u.SHA256=h.extend({_doReset:function(){this._hash=new d.init(c.slice(0))},_doProcessBlock:function(w,y){for(var v=this._hash.words,m=v[0],C=v[1],E=v[2],O=v[3],_=v[4],S=v[5],R=v[6],A=v[7],T=0;T<64;T++){if(T<16)l[T]=0|w[y+T];else{var N=l[T-15],x=(N<<25|N>>>7)^(N<<14|N>>>18)^N>>>3,I=l[T-2],L=(I<<15|I>>>17)^(I<<13|I>>>19)^I>>>10;l[T]=x+l[T-7]+L+l[T-16]}var H=m&C^m&E^C&E,Z=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),K=A+((_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25))+(_&S^~_&R)+s[T]+l[T];A=R,R=S,S=_,_=O+K|0,O=E,E=C,C=m,m=K+(Z+H)|0}v[0]=v[0]+m|0,v[1]=v[1]+C|0,v[2]=v[2]+E|0,v[3]=v[3]+O|0,v[4]=v[4]+_|0,v[5]=v[5]+S|0,v[6]=v[6]+R|0,v[7]=v[7]+A|0},_doFinalize:function(){var w=this._data,y=w.words,v=8*this._nDataBytes,m=8*w.sigBytes;return y[m>>>5]|=128<<24-m%32,y[14+(m+64>>>9<<4)]=b.floor(v/4294967296),y[15+(m+64>>>9<<4)]=v,w.sigBytes=4*y.length,this._process(),this._hash},clone:function(){var w=h.clone.call(this);return w._hash=this._hash.clone(),w}});o.SHA256=h._createHelper(g),o.HmacSHA256=h._createHmacHelper(g)})(Math),f.SHA256)},5953(n,i,a){var f;n.exports=(f=a(9021),a(3240),(function(b){var o=f,p=o.lib,d=p.WordArray,h=p.Hasher,u=o.x64.Word,c=o.algo,s=[],l=[],g=[];(function(){for(var v=1,m=0,C=0;C<24;C++){s[v+5*m]=(C+1)*(C+2)/2%64;var E=(2*v+3*m)%5;v=m%5,m=E}for(v=0;v<5;v++)for(m=0;m<5;m++)l[v+5*m]=m+(2*v+3*m)%5*5;for(var O=1,_=0;_<24;_++){for(var S=0,R=0,A=0;A<7;A++){if(1&O){var T=(1<<A)-1;T<32?R^=1<<T:S^=1<<T-32}128&O?O=O<<1^113:O<<=1}g[_]=u.create(S,R)}})();var w=[];(function(){for(var v=0;v<25;v++)w[v]=u.create()})();var y=c.SHA3=h.extend({cfg:h.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],m=0;m<25;m++)v[m]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,m){for(var C=this._state,E=this.blockSize/2,O=0;O<E;O++){var _=v[m+2*O],S=v[m+2*O+1];_=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),S=16711935&(S<<8|S>>>24)|4278255360&(S<<24|S>>>8),(D=C[O]).high^=S,D.low^=_}for(var R=0;R<24;R++){for(var A=0;A<5;A++){for(var T=0,N=0,x=0;x<5;x++)T^=(D=C[A+5*x]).high,N^=D.low;var I=w[A];I.high=T,I.low=N}for(A=0;A<5;A++){var L=w[(A+4)%5],H=w[(A+1)%5],Z=H.high,K=H.low;for(T=L.high^(Z<<1|K>>>31),N=L.low^(K<<1|Z>>>31),x=0;x<5;x++)(D=C[A+5*x]).high^=T,D.low^=N}for(var P=1;P<25;P++){var B=(D=C[P]).high,G=D.low,V=s[P];V<32?(T=B<<V|G>>>32-V,N=G<<V|B>>>32-V):(T=G<<V-32|B>>>64-V,N=B<<V-32|G>>>64-V);var z=w[l[P]];z.high=T,z.low=N}var U=w[0],F=C[0];for(U.high=F.high,U.low=F.low,A=0;A<5;A++)for(x=0;x<5;x++){var D=C[P=A+5*x],k=w[P],j=w[(A+1)%5+5*x],M=w[(A+2)%5+5*x];D.high=k.high^~j.high&M.high,D.low=k.low^~j.low&M.low}D=C[0];var $=g[R];D.high^=$.high,D.low^=$.low}},_doFinalize:function(){var v=this._data,m=v.words,C=(this._nDataBytes,8*v.sigBytes),E=32*this.blockSize;m[C>>>5]|=1<<24-C%32,m[(b.ceil((C+1)/E)*E>>>5)-1]|=128,v.sigBytes=4*m.length,this._process();for(var O=this._state,_=this.cfg.outputLength/8,S=_/8,R=[],A=0;A<S;A++){var T=O[A],N=T.high,x=T.low;N=16711935&(N<<8|N>>>24)|4278255360&(N<<24|N>>>8),x=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8),R.push(x),R.push(N)}return new d.init(R,_)},clone:function(){for(var v=h.clone.call(this),m=v._state=this._state.slice(0),C=0;C<25;C++)m[C]=m[C].clone();return v}});o.SHA3=h._createHelper(y),o.HmacSHA3=h._createHmacHelper(y)})(Math),f.SHA3)},9557(n,i,a){var f,b,o,p,d,h,u,c;n.exports=(c=a(9021),a(3240),a(1380),b=(f=c).x64,o=b.Word,p=b.WordArray,d=f.algo,h=d.SHA512,u=d.SHA384=h.extend({_doReset:function(){this._hash=new p.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var s=h._doFinalize.call(this);return s.sigBytes-=16,s}}),f.SHA384=h._createHelper(u),f.HmacSHA384=h._createHmacHelper(u),c.SHA384)},1380(n,i,a){var f;n.exports=(f=a(9021),a(3240),(function(){var b=f,o=b.lib.Hasher,p=b.x64,d=p.Word,h=p.WordArray,u=b.algo;function c(){return d.create.apply(d,arguments)}var s=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];(function(){for(var w=0;w<80;w++)l[w]=c()})();var g=u.SHA512=o.extend({_doReset:function(){this._hash=new h.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(w,y){for(var v=this._hash.words,m=v[0],C=v[1],E=v[2],O=v[3],_=v[4],S=v[5],R=v[6],A=v[7],T=m.high,N=m.low,x=C.high,I=C.low,L=E.high,H=E.low,Z=O.high,K=O.low,P=_.high,B=_.low,G=S.high,V=S.low,z=R.high,U=R.low,F=A.high,D=A.low,k=T,j=N,M=x,$=I,W=L,Y=H,Q=Z,q=K,te=P,ie=B,ae=G,ue=V,le=z,me=U,Ae=F,fe=D,se=0;se<80;se++){var he,ce,Ie=l[se];if(se<16)ce=Ie.high=0|w[y+2*se],he=Ie.low=0|w[y+2*se+1];else{var Ze=l[se-15],De=Ze.high,Ge=Ze.low,at=(De>>>1|Ge<<31)^(De>>>8|Ge<<24)^De>>>7,Se=(Ge>>>1|De<<31)^(Ge>>>8|De<<24)^(Ge>>>7|De<<25),ke=l[se-2],ze=ke.high,nt=ke.low,Ne=(ze>>>19|nt<<13)^(ze<<3|nt>>>29)^ze>>>6,We=(nt>>>19|ze<<13)^(nt<<3|ze>>>29)^(nt>>>6|ze<<26),Le=l[se-7],Je=Le.high,ve=Le.low,Ke=l[se-16],ft=Ke.high,ct=Ke.low;ce=(ce=(ce=at+Je+((he=Se+ve)>>>0<Se>>>0?1:0))+Ne+((he+=We)>>>0<We>>>0?1:0))+ft+((he+=ct)>>>0<ct>>>0?1:0),Ie.high=ce,Ie.low=he}var Be,Pt=te&ae^~te&le,dt=ie&ue^~ie&me,vr=k&M^k&W^M&W,Bn=j&$^j&Y^$&Y,Er=(k>>>28|j<<4)^(k<<30|j>>>2)^(k<<25|j>>>7),St=(j>>>28|k<<4)^(j<<30|k>>>2)^(j<<25|k>>>7),Fn=(te>>>14|ie<<18)^(te>>>18|ie<<14)^(te<<23|ie>>>9),Qh=(ie>>>14|te<<18)^(ie>>>18|te<<14)^(ie<<23|te>>>9),da=s[se],Jh=da.high,pa=da.low,jn=Ae+Fn+((Be=fe+Qh)>>>0<fe>>>0?1:0),ya=St+Bn;Ae=le,fe=me,le=ae,me=ue,ae=te,ue=ie,te=Q+(jn=(jn=(jn=jn+Pt+((Be+=dt)>>>0<dt>>>0?1:0))+Jh+((Be+=pa)>>>0<pa>>>0?1:0))+ce+((Be+=he)>>>0<he>>>0?1:0))+((ie=q+Be|0)>>>0<q>>>0?1:0)|0,Q=W,q=Y,W=M,Y=$,M=k,$=j,k=jn+(Er+vr+(ya>>>0<St>>>0?1:0))+((j=Be+ya|0)>>>0<Be>>>0?1:0)|0}N=m.low=N+j,m.high=T+k+(N>>>0<j>>>0?1:0),I=C.low=I+$,C.high=x+M+(I>>>0<$>>>0?1:0),H=E.low=H+Y,E.high=L+W+(H>>>0<Y>>>0?1:0),K=O.low=K+q,O.high=Z+Q+(K>>>0<q>>>0?1:0),B=_.low=B+ie,_.high=P+te+(B>>>0<ie>>>0?1:0),V=S.low=V+ue,S.high=G+ae+(V>>>0<ue>>>0?1:0),U=R.low=U+me,R.high=z+le+(U>>>0<me>>>0?1:0),D=A.low=D+fe,A.high=F+Ae+(D>>>0<fe>>>0?1:0)},_doFinalize:function(){var w=this._data,y=w.words,v=8*this._nDataBytes,m=8*w.sigBytes;return y[m>>>5]|=128<<24-m%32,y[30+(m+128>>>10<<5)]=Math.floor(v/4294967296),y[31+(m+128>>>10<<5)]=v,w.sigBytes=4*y.length,this._process(),this._hash.toX32()},clone:function(){var w=o.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:32});b.SHA512=o._createHelper(g),b.HmacSHA512=o._createHmacHelper(g)})(),f.SHA512)},7628(n,i,a){var f;n.exports=(f=a(9021),a(754),a(4636),a(9506),a(7165),(function(){var b=f,o=b.lib,p=o.WordArray,d=o.BlockCipher,h=b.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],g=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],w=h.DES=d.extend({_doReset:function(){for(var C=this._key.words,E=[],O=0;O<56;O++){var _=u[O]-1;E[O]=C[_>>>5]>>>31-_%32&1}for(var S=this._subKeys=[],R=0;R<16;R++){var A=S[R]=[],T=s[R];for(O=0;O<24;O++)A[O/6|0]|=E[(c[O]-1+T)%28]<<31-O%6,A[4+(O/6|0)]|=E[28+(c[O+24]-1+T)%28]<<31-O%6;for(A[0]=A[0]<<1|A[0]>>>31,O=1;O<7;O++)A[O]=A[O]>>>4*(O-1)+3;A[7]=A[7]<<5|A[7]>>>27}var N=this._invSubKeys=[];for(O=0;O<16;O++)N[O]=S[15-O]},encryptBlock:function(C,E){this._doCryptBlock(C,E,this._subKeys)},decryptBlock:function(C,E){this._doCryptBlock(C,E,this._invSubKeys)},_doCryptBlock:function(C,E,O){this._lBlock=C[E],this._rBlock=C[E+1],y.call(this,4,252645135),y.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),y.call(this,1,1431655765);for(var _=0;_<16;_++){for(var S=O[_],R=this._lBlock,A=this._rBlock,T=0,N=0;N<8;N++)T|=l[N][((A^S[N])&g[N])>>>0];this._lBlock=A,this._rBlock=R^T}var x=this._lBlock;this._lBlock=this._rBlock,this._rBlock=x,y.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),C[E]=this._lBlock,C[E+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function y(C,E){var O=(this._lBlock>>>C^this._rBlock)&E;this._rBlock^=O,this._lBlock^=O<<C}function v(C,E){var O=(this._rBlock>>>C^this._lBlock)&E;this._lBlock^=O,this._rBlock^=O<<C}b.DES=d._createHelper(w);var m=h.TripleDES=d.extend({_doReset:function(){var C=this._key.words;if(C.length!==2&&C.length!==4&&C.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var E=C.slice(0,2),O=C.length<4?C.slice(0,2):C.slice(2,4),_=C.length<6?C.slice(0,2):C.slice(4,6);this._des1=w.createEncryptor(p.create(E)),this._des2=w.createEncryptor(p.create(O)),this._des3=w.createEncryptor(p.create(_))},encryptBlock:function(C,E){this._des1.encryptBlock(C,E),this._des2.decryptBlock(C,E),this._des3.encryptBlock(C,E)},decryptBlock:function(C,E){this._des3.decryptBlock(C,E),this._des2.encryptBlock(C,E),this._des1.decryptBlock(C,E)},keySize:6,ivSize:2,blockSize:2});b.TripleDES=d._createHelper(m)})(),f.TripleDES)},3240(n,i,a){var f,b,o,p,d,h;n.exports=(f=a(9021),o=(b=f).lib,p=o.Base,d=o.WordArray,(h=b.x64={}).Word=p.extend({init:function(u,c){this.high=u,this.low=c}}),h.WordArray=p.extend({init:function(u,c){u=this.words=u||[],this.sigBytes=c??8*u.length},toX32:function(){for(var u=this.words,c=u.length,s=[],l=0;l<c;l++){var g=u[l];s.push(g.high),s.push(g.low)}return d.create(s,this.sigBytes)},clone:function(){for(var u=p.clone.call(this),c=u.words=this.words.slice(0),s=c.length,l=0;l<s;l++)c[l]=c[l].clone();return u}}),f)},7833(n,i,a){var f=a(6763),b=a(5606);i.formatArgs=function(p){if(p[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+p[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;let d="color: "+this.color;p.splice(1,0,d,"color: inherit");let h=0,u=0;p[0].replace(/%[a-zA-Z%]/g,c=>{c!=="%%"&&(h++,c==="%c"&&(u=h))}),p.splice(u,0,d)},i.save=function(p){try{p?i.storage.setItem("debug",p):i.storage.removeItem("debug")}catch{}},i.load=function(){let p;try{p=i.storage.getItem("debug")||i.storage.getItem("DEBUG")}catch{}return!p&&b!==void 0&&"env"in b&&(p=b.env.DEBUG),p},i.useColors=function(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let p;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(p=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(p[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},i.storage=(function(){try{return localStorage}catch{}})(),i.destroy=(()=>{let p=!1;return()=>{p||(p=!0,f.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],i.log=f.debug||f.log||(()=>{}),n.exports=a(736)(i);let{formatters:o}=n.exports;o.j=function(p){try{return JSON.stringify(p)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}},736(n,i,a){var f=a(6763);n.exports=function(b){function o(h){let u,c,s,l=null;function g(...w){if(!g.enabled)return;let y=g,v=Number(new Date),m=v-(u||v);y.diff=m,y.prev=u,y.curr=v,u=v,w[0]=o.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let C=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";C++;let _=o.formatters[O];if(typeof _=="function"){let S=w[C];E=_.call(y,S),w.splice(C,1),C--}return E}),o.formatArgs.call(y,w),(y.log||o.log).apply(y,w)}return g.namespace=h,g.useColors=o.useColors(),g.color=o.selectColor(h),g.extend=p,g.destroy=o.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(c!==o.namespaces&&(c=o.namespaces,s=o.enabled(h)),s),set:w=>{l=w}}),typeof o.init=="function"&&o.init(g),g}function p(h,u){let c=o(this.namespace+(u===void 0?":":u)+h);return c.log=this.log,c}function d(h,u){let c=0,s=0,l=-1,g=0;for(;c<h.length;)if(s<u.length&&(u[s]===h[c]||u[s]==="*"))u[s]==="*"?(l=s,g=c,s++):(c++,s++);else{if(l===-1)return!1;s=l+1,g++,c=g}for(;s<u.length&&u[s]==="*";)s++;return s===u.length}return o.debug=o,o.default=o,o.coerce=function(h){return h instanceof Error?h.stack||h.message:h},o.disable=function(){let h=[...o.names,...o.skips.map(u=>"-"+u)].join(",");return o.enable(""),h},o.enable=function(h){o.save(h),o.namespaces=h,o.names=[],o.skips=[];let u=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let c of u)c[0]==="-"?o.skips.push(c.slice(1)):o.names.push(c)},o.enabled=function(h){for(let u of o.skips)if(d(h,u))return!1;for(let u of o.names)if(d(h,u))return!0;return!1},o.humanize=a(6585),o.destroy=function(){f.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(b).forEach(h=>{o[h]=b[h]}),o.names=[],o.skips=[],o.formatters={},o.selectColor=function(h){let u=0;for(let c=0;c<h.length;c++)u=(u<<5)-u+h.charCodeAt(c),u|=0;return o.colors[Math.abs(u)%o.colors.length]},o.enable(o.load()),o}},41(n,i,a){"use strict";var f=a(655),b=a(8068),o=a(9675),p=a(5795);n.exports=function(d,h,u){if(!d||typeof d!="object"&&typeof d!="function")throw new o("`obj` must be an object or a function`");if(typeof h!="string"&&typeof h!="symbol")throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new o("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,g=arguments.length>6&&arguments[6],w=!!p&&p(d,h);if(f)f(d,h,{configurable:l===null&&w?w.configurable:!l,enumerable:c===null&&w?w.enumerable:!c,value:u,writable:s===null&&w?w.writable:!s});else{if(!g&&(c||s||l))throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");d[h]=u}}},8452(n,i,a){"use strict";var f=a(1189),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",o=Object.prototype.toString,p=Array.prototype.concat,d=a(41),h=a(592)(),u=function(s,l,g,w){if(l in s){if(w===!0){if(s[l]===g)return}else if(typeof(y=w)!="function"||o.call(y)!=="[object Function]"||!w())return}var y;h?d(s,l,g,!0):d(s,l,g)},c=function(s,l){var g=arguments.length>2?arguments[2]:{},w=f(l);b&&(w=p.call(w,Object.getOwnPropertySymbols(l)));for(var y=0;y<w.length;y+=1)u(s,w[y],l[w[y]],g[w[y]])};c.supportsDescriptors=!!h,n.exports=c},7176(n,i,a){"use strict";var f,b=a(3126),o=a(5795);try{f=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var p=!!f&&o&&o(Object.prototype,"__proto__"),d=Object,h=d.getPrototypeOf;n.exports=p&&typeof p.get=="function"?b([p.get]):typeof h=="function"&&function(u){return h(u==null?u:d(u))}},655(n){"use strict";var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}n.exports=i},1237(n){"use strict";n.exports=EvalError},9383(n){"use strict";n.exports=Error},9290(n){"use strict";n.exports=RangeError},9538(n){"use strict";n.exports=ReferenceError},8068(n){"use strict";n.exports=SyntaxError},9675(n){"use strict";n.exports=TypeError},5345(n){"use strict";n.exports=URIError},9612(n){"use strict";n.exports=Object},2682(n,i,a){"use strict";var f=a(9600),b=Object.prototype.toString,o=Object.prototype.hasOwnProperty;n.exports=function(p,d,h){if(!f(d))throw new TypeError("iterator must be a function");var u,c;arguments.length>=3&&(u=h),c=p,b.call(c)==="[object Array]"?(function(s,l,g){for(var w=0,y=s.length;w<y;w++)o.call(s,w)&&(g==null?l(s[w],w,s):l.call(g,s[w],w,s))})(p,d,u):typeof p=="string"?(function(s,l,g){for(var w=0,y=s.length;w<y;w++)g==null?l(s.charAt(w),w,s):l.call(g,s.charAt(w),w,s)})(p,d,u):(function(s,l,g){for(var w in s)o.call(s,w)&&(g==null?l(s[w],w,s):l.call(g,s[w],w,s))})(p,d,u)}},9353(n){"use strict";var i=Object.prototype.toString,a=Math.max,f=function(b,o){for(var p=[],d=0;d<b.length;d+=1)p[d]=b[d];for(var h=0;h<o.length;h+=1)p[h+b.length]=o[h];return p};n.exports=function(b){var o=this;if(typeof o!="function"||i.apply(o)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var p,d=(function(l){for(var g=[],w=1,y=0;w<l.length;w+=1,y+=1)g[y]=l[w];return g})(arguments),h=a(0,o.length-d.length),u=[],c=0;c<h;c++)u[c]="$"+c;if(p=Function("binder","return function ("+(function(l){for(var g="",w=0;w<l.length;w+=1)g+=l[w],w+1<l.length&&(g+=",");return g})(u)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof p){var l=o.apply(this,f(d,arguments));return Object(l)===l?l:this}return o.apply(b,f(d,arguments))}),o.prototype){var s=function(){};s.prototype=o.prototype,p.prototype=new s,s.prototype=null}return p}},6743(n,i,a){"use strict";var f=a(9353);n.exports=Function.prototype.bind||f},453(n,i,a){"use strict";var f,b=a(9612),o=a(9383),p=a(1237),d=a(9290),h=a(9538),u=a(8068),c=a(9675),s=a(5345),l=a(1514),g=a(8968),w=a(6188),y=a(8002),v=a(5880),m=a(414),C=a(3093),E=Function,O=function(Q){try{return E('"use strict"; return ('+Q+").constructor;")()}catch{}},_=a(5795),S=a(655),R=function(){throw new c},A=_?(function(){try{return R}catch{try{return _(arguments,"callee").get}catch{return R}}})():R,T=a(4039)(),N=a(3628),x=a(1064),I=a(8648),L=a(1002),H=a(76),Z={},K=typeof Uint8Array<"u"&&N?N(Uint8Array):f,P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?f:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?f:ArrayBuffer,"%ArrayIteratorPrototype%":T&&N?N([][Symbol.iterator]()):f,"%AsyncFromSyncIteratorPrototype%":f,"%AsyncFunction%":Z,"%AsyncGenerator%":Z,"%AsyncGeneratorFunction%":Z,"%AsyncIteratorPrototype%":Z,"%Atomics%":typeof Atomics>"u"?f:Atomics,"%BigInt%":typeof BigInt>"u"?f:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?f:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?f:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?f:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":p,"%Float16Array%":typeof Float16Array>"u"?f:Float16Array,"%Float32Array%":typeof Float32Array>"u"?f:Float32Array,"%Float64Array%":typeof Float64Array>"u"?f:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?f:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":Z,"%Int8Array%":typeof Int8Array>"u"?f:Int8Array,"%Int16Array%":typeof Int16Array>"u"?f:Int16Array,"%Int32Array%":typeof Int32Array>"u"?f:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&N?N(N([][Symbol.iterator]())):f,"%JSON%":typeof JSON=="object"?JSON:f,"%Map%":typeof Map>"u"?f:Map,"%MapIteratorPrototype%":typeof Map<"u"&&T&&N?N(new Map()[Symbol.iterator]()):f,"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?f:Promise,"%Proxy%":typeof Proxy>"u"?f:Proxy,"%RangeError%":d,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?f:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?f:Set,"%SetIteratorPrototype%":typeof Set<"u"&&T&&N?N(new Set()[Symbol.iterator]()):f,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?f:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&N?N(""[Symbol.iterator]()):f,"%Symbol%":T?Symbol:f,"%SyntaxError%":u,"%ThrowTypeError%":A,"%TypedArray%":K,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?f:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?f:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?f:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?f:Uint32Array,"%URIError%":s,"%WeakMap%":typeof WeakMap>"u"?f:WeakMap,"%WeakRef%":typeof WeakRef>"u"?f:WeakRef,"%WeakSet%":typeof WeakSet>"u"?f:WeakSet,"%Function.prototype.call%":H,"%Function.prototype.apply%":L,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":x,"%Math.abs%":l,"%Math.floor%":g,"%Math.max%":w,"%Math.min%":y,"%Math.pow%":v,"%Math.round%":m,"%Math.sign%":C,"%Reflect.getPrototypeOf%":I};if(N)try{null.error}catch(Q){var B=N(N(Q));P["%Error.prototype%"]=B}var G=function Q(q){var te;if(q==="%AsyncFunction%")te=O("async function () {}");else if(q==="%GeneratorFunction%")te=O("function* () {}");else if(q==="%AsyncGeneratorFunction%")te=O("async function* () {}");else if(q==="%AsyncGenerator%"){var ie=Q("%AsyncGeneratorFunction%");ie&&(te=ie.prototype)}else if(q==="%AsyncIteratorPrototype%"){var ae=Q("%AsyncGenerator%");ae&&N&&(te=N(ae.prototype))}return P[q]=te,te},V={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=a(6743),U=a(9957),F=z.call(H,Array.prototype.concat),D=z.call(L,Array.prototype.splice),k=z.call(H,String.prototype.replace),j=z.call(H,String.prototype.slice),M=z.call(H,RegExp.prototype.exec),$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,Y=function(Q,q){var te,ie=Q;if(U(V,ie)&&(ie="%"+(te=V[ie])[0]+"%"),U(P,ie)){var ae=P[ie];if(ae===Z&&(ae=G(ie)),ae===void 0&&!q)throw new c("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:te,name:ie,value:ae}}throw new u("intrinsic "+Q+" does not exist!")};n.exports=function(Q,q){if(typeof Q!="string"||Q.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new c('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,Q)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var te=(function(De){var Ge=j(De,0,1),at=j(De,-1);if(Ge==="%"&&at!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(at==="%"&&Ge!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var Se=[];return k(De,$,function(ke,ze,nt,Ne){Se[Se.length]=nt?k(Ne,W,"$1"):ze||ke}),Se})(Q),ie=te.length>0?te[0]:"",ae=Y("%"+ie+"%",q),ue=ae.name,le=ae.value,me=!1,Ae=ae.alias;Ae&&(ie=Ae[0],D(te,F([0,1],Ae)));for(var fe=1,se=!0;fe<te.length;fe+=1){var he=te[fe],ce=j(he,0,1),Ie=j(he,-1);if((ce==='"'||ce==="'"||ce==="`"||Ie==='"'||Ie==="'"||Ie==="`")&&ce!==Ie)throw new u("property names with quotes must have matching quotes");if(he!=="constructor"&&se||(me=!0),U(P,ue="%"+(ie+="."+he)+"%"))le=P[ue];else if(le!=null){if(!(he in le)){if(!q)throw new c("base intrinsic for "+Q+" exists, but the property is not available.");return}if(_&&fe+1>=te.length){var Ze=_(le,he);le=(se=!!Ze)&&"get"in Ze&&!("originalValue"in Ze.get)?Ze.get:le[he]}else se=U(le,he),le=le[he];se&&!me&&(P[ue]=le)}}return le}},1064(n,i,a){"use strict";var f=a(9612);n.exports=f.getPrototypeOf||null},8648(n){"use strict";n.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null},3628(n,i,a){"use strict";var f=a(8648),b=a(1064),o=a(7176);n.exports=f?function(p){return f(p)}:b?function(p){if(!p||typeof p!="object"&&typeof p!="function")throw new TypeError("getProto: not an object");return b(p)}:o?function(p){return o(p)}:null},6549(n){"use strict";n.exports=Object.getOwnPropertyDescriptor},5795(n,i,a){"use strict";var f=a(6549);if(f)try{f([],"length")}catch{f=null}n.exports=f},592(n,i,a){"use strict";var f=a(655),b=function(){return!!f};b.hasArrayLengthDefineBug=function(){if(!f)return null;try{return f([],"length",{value:1}).length!==1}catch{return!0}},n.exports=b},4039(n,i,a){"use strict";var f=typeof Symbol<"u"&&Symbol,b=a(1333);n.exports=function(){return typeof f=="function"&&typeof Symbol=="function"&&typeof f("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&b()}},1333(n){"use strict";n.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},a=Symbol("test"),f=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;for(var b in i[a]=42,i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var o=Object.getOwnPropertySymbols(i);if(o.length!==1||o[0]!==a||!Object.prototype.propertyIsEnumerable.call(i,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(i,a);if(p.value!==42||p.enumerable!==!0)return!1}return!0}},9092(n,i,a){"use strict";var f=a(1333);n.exports=function(){return f()&&!!Symbol.toStringTag}},9957(n,i,a){"use strict";var f=Function.prototype.call,b=Object.prototype.hasOwnProperty,o=a(6743);n.exports=o.call(f,b)},6698(n){typeof Object.create=="function"?n.exports=function(i,a){a&&(i.super_=a,i.prototype=Object.create(a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(i,a){if(a){i.super_=a;var f=function(){};f.prototype=a.prototype,i.prototype=new f,i.prototype.constructor=i}}},7244(n,i,a){"use strict";var f=a(9092)(),b=a(6556)("Object.prototype.toString"),o=function(h){return!(f&&h&&typeof h=="object"&&Symbol.toStringTag in h)&&b(h)==="[object Arguments]"},p=function(h){return!!o(h)||h!==null&&typeof h=="object"&&"length"in h&&typeof h.length=="number"&&h.length>=0&&b(h)!=="[object Array]"&&"callee"in h&&b(h.callee)==="[object Function]"},d=(function(){return o(arguments)})();o.isLegacyArguments=p,n.exports=d?o:p},9600(n){"use strict";var i,a,f=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},b(function(){throw 42},null,i)}catch(g){g!==a&&(b=null)}else b=null;var o=/^\s*class\b/,p=function(g){try{var w=f.call(g);return o.test(w)}catch{return!1}},d=function(g){try{return!p(g)&&(f.call(g),!0)}catch{return!1}},h=Object.prototype.toString,u=typeof Symbol=="function"&&!!Symbol.toStringTag,c=!(0 in[,]),s=function(){return!1};if(typeof document=="object"){var l=document.all;h.call(l)===h.call(document.all)&&(s=function(g){if((c||!g)&&(g===void 0||typeof g=="object"))try{var w=h.call(g);return(w==="[object HTMLAllCollection]"||w==="[object HTML document.all class]"||w==="[object HTMLCollection]"||w==="[object Object]")&&g("")==null}catch{}return!1})}n.exports=b?function(g){if(s(g))return!0;if(!g||typeof g!="function"&&typeof g!="object")return!1;try{b(g,null,i)}catch(w){if(w!==a)return!1}return!p(g)&&d(g)}:function(g){if(s(g))return!0;if(!g||typeof g!="function"&&typeof g!="object")return!1;if(u)return d(g);if(p(g))return!1;var w=h.call(g);return!(w!=="[object Function]"&&w!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(w))&&d(g)}},8184(n,i,a){"use strict";var f,b=a(6556),o=a(9721)(/^\s*(?:function)?\*/),p=a(9092)(),d=a(3628),h=b("Object.prototype.toString"),u=b("Function.prototype.toString");n.exports=function(c){if(typeof c!="function")return!1;if(o(u(c)))return!0;if(!p)return h(c)==="[object GeneratorFunction]";if(!d)return!1;if(f===void 0){var s=(function(){if(!p)return!1;try{return Function("return function*() {}")()}catch{}})();f=!!s&&d(s)}return d(c)===f}},3003(n){"use strict";n.exports=function(i){return i!=i}},4133(n,i,a){"use strict";var f=a(487),b=a(8452),o=a(3003),p=a(6642),d=a(2464),h=f(p(),Number);b(h,{getPolyfill:p,implementation:o,shim:d}),n.exports=h},6642(n,i,a){"use strict";var f=a(3003);n.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:f}},2464(n,i,a){"use strict";var f=a(8452),b=a(6642);n.exports=function(){var o=b();return f(Number,{isNaN:o},{isNaN:function(){return Number.isNaN!==o}}),o}},4035(n,i,a){"use strict";var f,b=a(6556),o=a(9092)(),p=a(9957),d=a(5795);if(o){var h=b("RegExp.prototype.exec"),u={},c=function(){throw u},s={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=c),f=function(g){if(!g||typeof g!="object")return!1;var w=d(g,"lastIndex");if(!w||!p(w,"value"))return!1;try{h(g,s)}catch(y){return y===u}}}else{var l=b("Object.prototype.toString");f=function(g){return!(!g||typeof g!="object"&&typeof g!="function")&&l(g)==="[object RegExp]"}}n.exports=f},5680(n,i,a){"use strict";var f=a(5767);n.exports=function(b){return!!f(b)}},1514(n){"use strict";n.exports=Math.abs},8968(n){"use strict";n.exports=Math.floor},4459(n){"use strict";n.exports=Number.isNaN||function(i){return i!=i}},6188(n){"use strict";n.exports=Math.max},8002(n){"use strict";n.exports=Math.min},5880(n){"use strict";n.exports=Math.pow},414(n){"use strict";n.exports=Math.round},3093(n,i,a){"use strict";var f=a(4459);n.exports=function(b){return f(b)||b===0?b:b<0?-1:1}},6585(n){var i=1e3,a=60*i,f=60*a,b=24*f,o=7*b;function p(d,h,u,c){var s=h>=1.5*u;return Math.round(d/u)+" "+c+(s?"s":"")}n.exports=function(d,h){h=h||{};var u,c,s=typeof d;if(s==="string"&&d.length>0)return(function(l){if(!((l=String(l)).length>100)){var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(g){var w=parseFloat(g[1]);switch((g[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*w;case"weeks":case"week":case"w":return w*o;case"days":case"day":case"d":return w*b;case"hours":case"hour":case"hrs":case"hr":case"h":return w*f;case"minutes":case"minute":case"mins":case"min":case"m":return w*a;case"seconds":case"second":case"secs":case"sec":case"s":return w*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return w;default:return}}}})(d);if(s==="number"&&isFinite(d))return h.long?(u=d,(c=Math.abs(u))>=b?p(u,c,b,"day"):c>=f?p(u,c,f,"hour"):c>=a?p(u,c,a,"minute"):c>=i?p(u,c,i,"second"):u+" ms"):(function(l){var g=Math.abs(l);return g>=b?Math.round(l/b)+"d":g>=f?Math.round(l/f)+"h":g>=a?Math.round(l/a)+"m":g>=i?Math.round(l/i)+"s":l+"ms"})(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},9211(n){"use strict";var i=function(a){return a!=a};n.exports=function(a,f){return a===0&&f===0?1/a==1/f:a===f||!(!i(a)||!i(f))}},7653(n,i,a){"use strict";var f=a(8452),b=a(487),o=a(9211),p=a(9394),d=a(6576),h=b(p(),Object);f(h,{getPolyfill:p,implementation:o,shim:d}),n.exports=h},9394(n,i,a){"use strict";var f=a(9211);n.exports=function(){return typeof Object.is=="function"?Object.is:f}},6576(n,i,a){"use strict";var f=a(9394),b=a(8452);n.exports=function(){var o=f();return b(Object,{is:o},{is:function(){return Object.is!==o}}),o}},8875(n,i,a){"use strict";var f;if(!Object.keys){var b=Object.prototype.hasOwnProperty,o=Object.prototype.toString,p=a(1093),d=Object.prototype.propertyIsEnumerable,h=!d.call({toString:null},"toString"),u=d.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(w){var y=w.constructor;return y&&y.prototype===w},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},g=(function(){if(typeof window>"u")return!1;for(var w in window)try{if(!l["$"+w]&&b.call(window,w)&&window[w]!==null&&typeof window[w]=="object")try{s(window[w])}catch{return!0}}catch{return!0}return!1})();f=function(w){var y=w!==null&&typeof w=="object",v=o.call(w)==="[object Function]",m=p(w),C=y&&o.call(w)==="[object String]",E=[];if(!y&&!v&&!m)throw new TypeError("Object.keys called on a non-object");var O=u&&v;if(C&&w.length>0&&!b.call(w,0))for(var _=0;_<w.length;++_)E.push(String(_));if(m&&w.length>0)for(var S=0;S<w.length;++S)E.push(String(S));else for(var R in w)O&&R==="prototype"||!b.call(w,R)||E.push(String(R));if(h)for(var A=(function(N){if(typeof window>"u"||!g)return s(N);try{return s(N)}catch{return!1}})(w),T=0;T<c.length;++T)A&&c[T]==="constructor"||!b.call(w,c[T])||E.push(c[T]);return E}}n.exports=f},1189(n,i,a){"use strict";var f=Array.prototype.slice,b=a(1093),o=Object.keys,p=o?function(h){return o(h)}:a(8875),d=Object.keys;p.shim=function(){if(Object.keys){var h=(function(){var u=Object.keys(arguments);return u&&u.length===arguments.length})(1,2);h||(Object.keys=function(u){return b(u)?d(f.call(u)):d(u)})}else Object.keys=p;return Object.keys||p},n.exports=p},1093(n){"use strict";var i=Object.prototype.toString;n.exports=function(a){var f=i.call(a),b=f==="[object Arguments]";return b||(b=f!=="[object Array]"&&a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&i.call(a.callee)==="[object Function]"),b}},8403(n,i,a){"use strict";var f=a(1189),b=a(1333)(),o=a(6556),p=a(9612),d=o("Array.prototype.push"),h=o("Object.prototype.propertyIsEnumerable"),u=b?p.getOwnPropertySymbols:null;n.exports=function(c,s){if(c==null)throw new TypeError("target must be an object");var l=p(c);if(arguments.length===1)return l;for(var g=1;g<arguments.length;++g){var w=p(arguments[g]),y=f(w),v=b&&(p.getOwnPropertySymbols||u);if(v)for(var m=v(w),C=0;C<m.length;++C){var E=m[C];h(w,E)&&d(y,E)}for(var O=0;O<y.length;++O){var _=y[O];if(h(w,_)){var S=w[_];l[_]=S}}}return l}},9133(n,i,a){"use strict";var f=a(8403);n.exports=function(){return Object.assign?(function(){if(!Object.assign)return!1;for(var b="abcdefghijklmnopqrst",o=b.split(""),p={},d=0;d<o.length;++d)p[o[d]]=o[d];var h=Object.assign({},p),u="";for(var c in h)u+=c;return b!==u})()||(function(){if(!Object.assign||!Object.preventExtensions)return!1;var b=Object.preventExtensions({1:2});try{Object.assign(b,"xy")}catch{return b[1]==="y"}return!1})()?f:Object.assign:f}},6578(n){"use strict";n.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606(n){var i,a,f=n.exports={};function b(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function p(y){if(i===setTimeout)return setTimeout(y,0);if((i===b||!i)&&setTimeout)return i=setTimeout,setTimeout(y,0);try{return i(y,0)}catch{try{return i.call(null,y,0)}catch{return i.call(this,y,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:b}catch{i=b}try{a=typeof clearTimeout=="function"?clearTimeout:o}catch{a=o}})();var d,h=[],u=!1,c=-1;function s(){u&&d&&(u=!1,d.length?h=d.concat(h):c=-1,h.length&&l())}function l(){if(!u){var y=p(s);u=!0;for(var v=h.length;v;){for(d=h,h=[];++c<v;)d&&d[c].run();c=-1,v=h.length}d=null,u=!1,(function(m){if(a===clearTimeout)return clearTimeout(m);if((a===o||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(m);try{return a(m)}catch{try{return a.call(null,m)}catch{return a.call(this,m)}}})(y)}}function g(y,v){this.fun=y,this.array=v}function w(){}f.nextTick=function(y){var v=new Array(arguments.length-1);if(arguments.length>1)for(var m=1;m<arguments.length;m++)v[m-1]=arguments[m];h.push(new g(y,v)),h.length!==1||u||p(l)},g.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=w,f.addListener=w,f.once=w,f.off=w,f.removeListener=w,f.removeAllListeners=w,f.emit=w,f.prependListener=w,f.prependOnceListener=w,f.listeners=function(y){return[]},f.binding=function(y){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(y){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},9721(n,i,a){"use strict";var f=a(6556),b=a(4035),o=f("RegExp.prototype.exec"),p=a(9675);n.exports=function(d){if(!b(d))throw new p("`regex` must be a RegExp");return function(h){return o(d,h)!==null}}},6897(n,i,a){"use strict";var f=a(453),b=a(41),o=a(592)(),p=a(5795),d=a(9675),h=f("%Math.floor%");n.exports=function(u,c){if(typeof u!="function")throw new d("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||h(c)!==c)throw new d("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],l=!0,g=!0;if("length"in u&&p){var w=p(u,"length");w&&!w.configurable&&(l=!1),w&&!w.writable&&(g=!1)}return(l||g||!s)&&(o?b(u,"length",c,!0,!0):b(u,"length",c)),u}},4717(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.createRpc=p;var o=a(3318);function p(d,h){return new Proxy({},{get:function(u,c){var s,l=this,g=(s=c.toString())&&s[0].toUpperCase()+s.slice(1),w="".concat(d,".").concat(g);return o.subscriptionMethods.includes(w)?function(y,v,m){h.subscribe(w,y,v,m)}:function(y){return f(l,void 0,void 0,function(){return b(this,function(v){switch(v.label){case 0:return[4,h.request(w,y)];case 1:return[2,v.sent()]}})})}}})}i.default=p},6315(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasskeyEncryptionService=void 0;var o=a(1389),p=(function(){function d(h,u){this.isUnlockedState=!1,this.namespace=h,this.displayName=u||"LNC User (".concat(h,")")}return Object.defineProperty(d.prototype,"method",{get:function(){return"passkey"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUnlocked",{get:function(){return this.isUnlockedState&&!!this.encryptionKey},enumerable:!1,configurable:!0}),d.prototype.encrypt=function(h){return f(this,void 0,void 0,function(){var u,c,s,l,g,w;return b(this,function(y){switch(y.label){case 0:if(!this.isUnlocked||!this.encryptionKey)throw new Error("Passkey encryption service is locked. Call unlock() first.");y.label=1;case 1:return y.trys.push([1,3,,4]),u=crypto.getRandomValues(new Uint8Array(12)),c=new TextEncoder,s=c.encode(h),[4,crypto.subtle.encrypt({name:"AES-GCM",iv:u},this.encryptionKey,s)];case 2:return l=y.sent(),(g=new Uint8Array(u.length+l.byteLength)).set(u),g.set(new Uint8Array(l),u.length),[2,(0,o.arrayBufferToBase64)(g.buffer)];case 3:throw w=y.sent(),new Error("Passkey encryption failed: ".concat(w.message));case 4:return[2]}})})},d.prototype.decrypt=function(h){return f(this,void 0,void 0,function(){var u,c,s,l,g;return b(this,function(w){switch(w.label){case 0:if(!this.isUnlocked||!this.encryptionKey)throw new Error("Passkey encryption service is locked. Call unlock() first.");w.label=1;case 1:return w.trys.push([1,3,,4]),u=(0,o.base64ToArrayBuffer)(h),c=u.slice(0,12),s=u.slice(12),[4,crypto.subtle.decrypt({name:"AES-GCM",iv:c},this.encryptionKey,s)];case 2:return l=w.sent(),[2,new TextDecoder().decode(l)];case 3:throw g=w.sent(),new Error("Passkey decryption failed: ".concat(g.message));case 4:return[2]}})})},d.prototype.unlock=function(h){return f(this,void 0,void 0,function(){var u;return b(this,function(c){switch(c.label){case 0:if(h.method!=="passkey")throw new Error("Passkey encryption service requires passkey unlock method");c.label=1;case 1:return c.trys.push([1,14,,15]),!h.credentialId||h.createIfMissing?[3,3]:[4,this.authenticateWithExistingPasskey(h.credentialId)];case 2:return c.sent(),[3,13];case 3:if(!h.createIfMissing)return[3,12];if(!h.credentialId)return[3,9];c.label=4;case 4:return c.trys.push([4,6,,8]),[4,this.authenticateWithExistingPasskey(h.credentialId)];case 5:return c.sent(),[3,8];case 6:return c.sent(),[4,this.createNewPasskey()];case 7:return c.sent(),[3,8];case 8:return[3,11];case 9:return[4,this.createNewPasskey()];case 10:c.sent(),c.label=11;case 11:return[3,13];case 12:throw new Error("No passkey credential available and createIfMissing is false");case 13:return this.isUnlockedState=!0,[3,15];case 14:throw u=c.sent(),new Error("Passkey unlock failed: ".concat(u.message));case 15:return[2]}})})},d.prototype.lock=function(){this.encryptionKey=void 0,this.credentialId=void 0,this.isUnlockedState=!1},d.prototype.canHandle=function(h){return h==="passkey"},d.prototype.getCredentialId=function(){if(!this.credentialId)throw new Error("No credential ID available - unlock first");return this.credentialId},d.isSupported=function(){return f(this,void 0,void 0,function(){var h,u;return b(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),window.PublicKeyCredential?[4,PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()]:[2,!1];case 1:return c.sent()?(h=PublicKeyCredential,(u=h.getClientExtensionResults)===null||u===void 0||u.call(h),[2,!0]):[2,!1];case 2:return c.sent(),[2,!1];case 3:return[2]}})})},d.prototype.createNewPasskey=function(){return f(this,void 0,void 0,function(){var h,u,c;return b(this,function(s){switch(s.label){case 0:return[4,this.generateDeterministicChallenge()];case 1:return h=s.sent(),u=crypto.getRandomValues(new Uint8Array(16)),[4,navigator.credentials.create({publicKey:{challenge:h.buffer,rp:{name:this.namespace,id:window.location.hostname},user:{id:u,name:this.displayName,displayName:this.displayName},pubKeyCredParams:[{alg:-7,type:"public-key"},{alg:-257,type:"public-key"}],authenticatorSelection:{authenticatorAttachment:"platform",userVerification:"required",residentKey:"required"},extensions:{prf:{eval:{first:h.buffer}}}}})];case 2:if(!(c=s.sent()))throw new Error("Failed to create passkey credential");return this.credentialId=c.id,[4,this.deriveEncryptionKey(c,h)];case 3:return s.sent(),[2]}})})},d.prototype.authenticateWithExistingPasskey=function(h){return f(this,void 0,void 0,function(){var u,c;return b(this,function(s){switch(s.label){case 0:return[4,this.generateDeterministicChallenge()];case 1:return u=s.sent(),[4,navigator.credentials.get({publicKey:{challenge:u.buffer,allowCredentials:[{type:"public-key",id:(0,o.base64ToArrayBuffer)(h)}],userVerification:"required",extensions:{prf:{eval:{first:u.buffer}}}}})];case 2:if(!(c=s.sent()))throw new Error("Failed to authenticate with passkey");return this.credentialId=h,[4,this.deriveEncryptionKey(c,u)];case 3:return s.sent(),[2]}})})},d.prototype.deriveEncryptionKey=function(h,u){return f(this,void 0,void 0,function(){var c,s,l,g,w,y,v;return b(this,function(m){switch(m.label){case 0:if(c=((w=h.getClientExtensionResults)===null||w===void 0?void 0:w.call(h))||{},!(!((v=(y=c.prf)===null||y===void 0?void 0:y.results)===null||v===void 0)&&v.first))throw new Error("PRF extension not supported or failed");return s=new Uint8Array(c.prf.results.first),[4,crypto.subtle.importKey("raw",s,"HKDF",!1,["deriveKey"])];case 1:return l=m.sent(),g=this,[4,crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(u),info:new TextEncoder().encode(this.namespace)},l,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])];case 2:return g.encryptionKey=m.sent(),[2]}})})},d.prototype.generateDeterministicChallenge=function(){return f(this,void 0,void 0,function(){var h,u,c;return b(this,function(s){switch(s.label){case 0:return h=new TextEncoder,u=h.encode(this.namespace),[4,crypto.subtle.digest("SHA-256",u)];case 1:return c=s.sent(),[2,new Uint8Array(c)]}})})},d})();i.PasskeyEncryptionService=p},6200(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasswordEncryptionService=void 0;var o=a(5105),p=(function(){function d(){this.isUnlockedState=!1}return Object.defineProperty(d.prototype,"method",{get:function(){return"password"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUnlocked",{get:function(){return this.isUnlockedState&&!!this.password&&!!this.salt},enumerable:!1,configurable:!0}),d.prototype.encrypt=function(h){return f(this,void 0,void 0,function(){return b(this,function(u){if(!this.isUnlocked||!this.password||!this.salt)throw new Error("Encryption service is locked. Call unlock() first.");return[2,(0,o.encrypt)(h,this.password,this.salt)]})})},d.prototype.decrypt=function(h){return f(this,void 0,void 0,function(){return b(this,function(u){if(!this.isUnlocked||!this.password||!this.salt)throw new Error("Encryption service is locked. Call unlock() first.");return[2,(0,o.decrypt)(h,this.password,this.salt)]})})},d.prototype.unlock=function(h){return f(this,void 0,void 0,function(){return b(this,function(u){if(h.method!=="password")throw new Error("Password encryption service requires password unlock method");if(!h.password)throw new Error("Password is required for password unlock");if(this.password=h.password,h.salt){if(this.salt=h.salt,h.cipher)try{if(!(0,o.verifyTestCipher)(h.cipher,this.password,this.salt))throw new Error("Invalid password")}catch{throw new Error("Invalid password")}}else this.salt=(0,o.generateSalt)();return this.isUnlockedState=!0,[2]})})},d.prototype.lock=function(){this.password=void 0,this.salt=void 0,this.isUnlockedState=!1},d.prototype.canHandle=function(h){return h==="password"},d.prototype.getSalt=function(){if(!this.salt)throw new Error("No salt available - unlock first");return this.salt},d.prototype.createTestCipher=function(){if(!this.password||!this.salt)throw new Error("No password/salt available - unlock first");return(0,o.createTestCipher)(this.password,this.salt)},d})();i.PasswordEncryptionService=p},4245(n,i,a){"use strict";var f=this&&this.__createBinding||(Object.create?function(s,l,g,w){w===void 0&&(w=g);var y=Object.getOwnPropertyDescriptor(l,g);y&&!("get"in y?!l.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return l[g]}}),Object.defineProperty(s,w,y)}:function(s,l,g,w){w===void 0&&(w=g),s[w]=l[g]}),b=this&&this.__exportStar||function(s,l){for(var g in s)g==="default"||Object.prototype.hasOwnProperty.call(l,g)||f(l,s,g)},o=this&&this.__awaiter||function(s,l,g,w){return new(g||(g=Promise))(function(y,v){function m(O){try{E(w.next(O))}catch(_){v(_)}}function C(O){try{E(w.throw(O))}catch(_){v(_)}}function E(O){var _;O.done?y(O.value):(_=O.value,_ instanceof g?_:new g(function(S){S(_)})).then(m,C)}E((w=w.apply(s,l||[])).next())})},p=this&&this.__generator||function(s,l){var g,w,y,v={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]},m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=C(0),m.throw=C(1),m.return=C(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function C(E){return function(O){return(function(_){if(g)throw new TypeError("Generator is already executing.");for(;m&&(m=0,_[0]&&(v=0)),v;)try{if(g=1,w&&(y=2&_[0]?w.return:_[0]?w.throw||((y=w.return)&&y.call(w),0):w.next)&&!(y=y.call(w,_[1])).done)return y;switch(w=0,y&&(_=[2&_[0],y.value]),_[0]){case 0:case 1:y=_;break;case 4:return v.label++,{value:_[1],done:!1};case 5:v.label++,w=_[1],_=[0];continue;case 7:_=v.ops.pop(),v.trys.pop();continue;default:if(!((y=(y=v.trys).length>0&&y[y.length-1])||_[0]!==6&&_[0]!==2)){v=0;continue}if(_[0]===3&&(!y||_[1]>y[0]&&_[1]<y[3])){v.label=_[1];break}if(_[0]===6&&v.label<y[1]){v.label=y[1],y=_;break}if(y&&v.label<y[2]){v.label=y[2],v.ops.push(_);break}y[2]&&v.ops.pop(),v.trys.pop();continue}_=l.call(s,v)}catch(S){_=[6,S],w=0}finally{g=y=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}})([E,O])}}},d=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0}),i.WasmManager=i.LightningNodeConnect=void 0,a(7289);var h=d(a(2293));i.LightningNodeConnect=h.default;var u=d(a(4038)),c=a(254);Object.defineProperty(i,"WasmManager",{enumerable:!0,get:function(){return c.WasmManager}}),WebAssembly.instantiateStreaming||(WebAssembly.instantiateStreaming=function(s,l){return o(void 0,void 0,void 0,function(){var g;return p(this,function(w){switch(w.label){case 0:return[4,s];case 1:return[4,w.sent().arrayBuffer()];case 2:return g=w.sent(),[4,WebAssembly.instantiate(g,l)];case 3:return[2,w.sent()]}})})}),b(a(3318),i),i.default=u.default},2293(n,i,a){"use strict";var f=this&&this.__assign||function(){return f=Object.assign||function(E){for(var O,_=1,S=arguments.length;_<S;_++)for(var R in O=arguments[_])Object.prototype.hasOwnProperty.call(O,R)&&(E[R]=O[R]);return E},f.apply(this,arguments)},b=this&&this.__awaiter||function(E,O,_,S){return new(_||(_=Promise))(function(R,A){function T(I){try{x(S.next(I))}catch(L){A(L)}}function N(I){try{x(S.throw(I))}catch(L){A(L)}}function x(I){var L;I.done?R(I.value):(L=I.value,L instanceof _?L:new _(function(H){H(L)})).then(T,N)}x((S=S.apply(E,O||[])).next())})},o=this&&this.__generator||function(E,O){var _,S,R,A={label:0,sent:function(){if(1&R[0])throw R[1];return R[1]},trys:[],ops:[]},T=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return T.next=N(0),T.throw=N(1),T.return=N(2),typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function N(x){return function(I){return(function(L){if(_)throw new TypeError("Generator is already executing.");for(;T&&(T=0,L[0]&&(A=0)),A;)try{if(_=1,S&&(R=2&L[0]?S.return:L[0]?S.throw||((R=S.return)&&R.call(S),0):S.next)&&!(R=R.call(S,L[1])).done)return R;switch(S=0,R&&(L=[2&L[0],R.value]),L[0]){case 0:case 1:R=L;break;case 4:return A.label++,{value:L[1],done:!1};case 5:A.label++,S=L[1],L=[0];continue;case 7:L=A.ops.pop(),A.trys.pop();continue;default:if(!((R=(R=A.trys).length>0&&R[R.length-1])||L[0]!==6&&L[0]!==2)){A=0;continue}if(L[0]===3&&(!R||L[1]>R[0]&&L[1]<R[3])){A.label=L[1];break}if(L[0]===6&&A.label<R[1]){A.label=R[1],R=L;break}if(R&&A.label<R[2]){A.label=R[2],A.ops.push(L);break}R[2]&&A.ops.pop(),A.trys.pop();continue}L=O.call(E,A)}catch(H){L=[6,H],S=0}finally{_=R=0}if(5&L[0])throw L[1];return{value:L[0]?L[1]:void 0,done:!0}})([x,I])}}},p=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CONFIG=void 0;var d=a(3318),h=a(4717),u=a(6315),c=p(a(9440)),s=a(3666),l=a(6041),g=a(9792),w=a(8348),y=a(9764),v=a(254),m=(0,y.createLogger)("LightningNodeConnect");i.DEFAULT_CONFIG={wasmClientCode:"https://lightning.engineering/lnc-v0.3.6-alpha.wasm",namespace:"default",serverHost:"mailbox.terminal.lightning.today:443",allowPasskeys:!0,enableSessions:!0};var C=(function(){function E(O){var _,S=this,R=Object.assign({},i.DEFAULT_CONFIG,{passkeyDisplayName:"LNC User (".concat(O?.namespace||"default",")")},O);this._config=R,this._credentialCache=new l.CredentialCache,R.enableSessions!==!1&&(_=new c.default(R.namespace,R.session)),this._strategyManager=new w.StrategyManager({namespace:R.namespace,allowPasskeys:R.allowPasskeys,passkeyDisplayName:R.passkeyDisplayName},_),this._sessionCoordinator=new g.SessionCoordinator(_),this._authCoordinator=new s.AuthenticationCoordinator(this._strategyManager,this._credentialCache,this._sessionCoordinator),this._wasmManager=new v.WasmManager(R.namespace,R.wasmClientCode,{onLocalKeyCreated:function(A){S._credentialCache.set("localKey",A)},onRemoteKeyReceived:function(A){S._credentialCache.set("remoteKey",A)}}),this.lnd=new d.LndApi(h.createRpc,this),this.loop=new d.LoopApi(h.createRpc,this),this.pool=new d.PoolApi(h.createRpc,this),this.faraday=new d.FaradayApi(h.createRpc,this),this.tapd=new d.TaprootAssetsApi(h.createRpc,this),this.lit=new d.LitApi(h.createRpc,this)}return Object.defineProperty(E.prototype,"isReady",{get:function(){return this._wasmManager.isReady},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isConnected",{get:function(){return this._wasmManager.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"status",{get:function(){return this._wasmManager.status},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"expiry",{get:function(){return this._wasmManager.expiry},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isReadOnly",{get:function(){return this._wasmManager.isReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"serverHost",{get:function(){return this._credentialCache.get("serverHost")||this._config.serverHost},set:function(O){this._credentialCache.set("serverHost",O)},enumerable:!1,configurable:!0}),E.prototype.hasPerms=function(O){return this._wasmManager.hasPerms(O)},E.prototype.preload=function(){return b(this,void 0,void 0,function(){return o(this,function(O){switch(O.label){case 0:return[4,this._wasmManager.preload()];case 1:return O.sent(),[2]}})})},E.prototype.connect=function(){return b(this,void 0,void 0,function(){var O,_,S,R;return o(this,function(A){switch(A.label){case 0:if(O=this._credentialCache.get("pairingPhrase")||"",_=this._credentialCache.get("localKey")||"",!O&&!_)throw new Error("No pairing phrase or local key available. Call pair() or unlock() first.");return S={pairingPhrase:O,serverHost:this._credentialCache.get("serverHost")||this._config.serverHost,localKey:_,remoteKey:this._credentialCache.get("remoteKey")||""},[4,this._wasmManager.connect(S)];case 1:if(A.sent(),this._config.enableSessions===!1)return[3,5];A.label=2;case 2:return A.trys.push([2,4,,5]),[4,this._authCoordinator.createSessionAfterConnection()];case 3:return A.sent(),[3,5];case 4:return R=A.sent(),m.error("Session creation failed after successful connection; session-based refresh will be unavailable:",R),[3,5];case 5:return[2]}})})},E.prototype.disconnect=function(){this._wasmManager.disconnect()},E.prototype.request=function(O,_){return this._wasmManager.request(O,_)},E.prototype.subscribe=function(O,_,S,R){this._wasmManager.subscribe(O,_,S,R)},E.prototype.pair=function(O,_){return b(this,void 0,void 0,function(){return o(this,function(S){switch(S.label){case 0:return[4,this._authCoordinator.waitForSessionRestoration()];case 1:return S.sent(),this._credentialCache.set("pairingPhrase",O),this._credentialCache.get("serverHost")||this._credentialCache.set("serverHost",this._config.serverHost),[4,this.run()];case 2:return S.sent(),[4,this.connect()];case 3:return S.sent(),_?_.method!=="password"?[3,5]:[4,this.persistWithPassword(_.password)]:[3,7];case 4:return S.sent(),[3,7];case 5:return[4,this.persistWithPasskey(_)];case 6:S.sent(),S.label=7;case 7:return[2]}})})},E.prototype.login=function(O){return b(this,void 0,void 0,function(){return o(this,function(_){switch(_.label){case 0:return[4,this.unlock(O)];case 1:if(!_.sent())throw new Error("Failed to unlock with method '".concat(O.method,"'"));return[4,this.connect()];case 2:return _.sent(),[2]}})})},E.prototype.unlock=function(O){return b(this,void 0,void 0,function(){return o(this,function(_){return[2,this._authCoordinator.unlock(O)]})})},E.prototype.persistWithPassword=function(O){return b(this,void 0,void 0,function(){var _;return o(this,function(S){switch(S.label){case 0:if(!this.isConnected)throw new Error("Must be connected before persisting credentials");if(!(_=this._strategyManager.getStrategy("password")))throw new Error("Password strategy not available");return[4,_.unlock({method:"password",password:O})];case 1:if(!S.sent())throw new Error("Failed to unlock password strategy");return[4,this._authCoordinator.persistCachedCredentials(_)];case 2:return S.sent(),[2]}})})},E.prototype.persistWithPasskey=function(O){return b(this,void 0,void 0,function(){var _;return o(this,function(S){switch(S.label){case 0:if(!this.isConnected)throw new Error("Must be connected before persisting credentials");if(!(_=this._strategyManager.getStrategy("passkey")))throw new Error("Passkey strategy not available");return[4,_.unlock(f({method:"passkey",createIfMissing:!0},O))];case 1:if(!S.sent())throw new Error("Failed to unlock passkey strategy");return[4,this._authCoordinator.persistCachedCredentials(_)];case 2:return S.sent(),[2]}})})},E.prototype.tryAutoRestore=function(){return b(this,void 0,void 0,function(){return o(this,function(O){return[2,this._authCoordinator.tryAutoRestore()]})})},E.prototype.getAuthenticationInfo=function(){return b(this,void 0,void 0,function(){return o(this,function(O){return[2,this._authCoordinator.getAuthenticationInfo()]})})},E.prototype.supportsPasskeys=function(){if(this._config.allowPasskeys===!1)return!1;var O=this._strategyManager.getStrategy("passkey");return!!O&&O.isSupported},E.isPasskeySupported=function(){return b(this,void 0,void 0,function(){return o(this,function(O){return[2,u.PasskeyEncryptionService.isSupported()]})})},E.prototype.clear=function(O){var _=O?.session!==!1,S=O?.persisted===!0;_&&this._authCoordinator.clearSession(),S&&this._strategyManager.clearAll()},E.prototype.run=function(){return b(this,void 0,void 0,function(){return o(this,function(O){switch(O.label){case 0:return[4,this._wasmManager.run()];case 1:return O.sent(),[4,this._wasmManager.waitTilReady()];case 2:return O.sent(),[2]}})})},E})();i.default=C},4038(n,i,a){"use strict";var f=this&&this.__awaiter||function(s,l,g,w){return new(g||(g=Promise))(function(y,v){function m(O){try{E(w.next(O))}catch(_){v(_)}}function C(O){try{E(w.throw(O))}catch(_){v(_)}}function E(O){var _;O.done?y(O.value):(_=O.value,_ instanceof g?_:new g(function(S){S(_)})).then(m,C)}E((w=w.apply(s,l||[])).next())})},b=this&&this.__generator||function(s,l){var g,w,y,v={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]},m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=C(0),m.throw=C(1),m.return=C(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function C(E){return function(O){return(function(_){if(g)throw new TypeError("Generator is already executing.");for(;m&&(m=0,_[0]&&(v=0)),v;)try{if(g=1,w&&(y=2&_[0]?w.return:_[0]?w.throw||((y=w.return)&&y.call(w),0):w.next)&&!(y=y.call(w,_[1])).done)return y;switch(w=0,y&&(_=[2&_[0],y.value]),_[0]){case 0:case 1:y=_;break;case 4:return v.label++,{value:_[1],done:!1};case 5:v.label++,w=_[1],_=[0];continue;case 7:_=v.ops.pop(),v.trys.pop();continue;default:if(!((y=(y=v.trys).length>0&&y[y.length-1])||_[0]!==6&&_[0]!==2)){v=0;continue}if(_[0]===3&&(!y||_[1]>y[0]&&_[1]<y[3])){v.label=_[1];break}if(_[0]===6&&v.label<y[1]){v.label=y[1],y=_;break}if(y&&v.label<y[2]){v.label=y[2],v.ops.push(_);break}y[2]&&v.ops.pop(),v.trys.pop();continue}_=l.call(s,v)}catch(S){_=[6,S],w=0}finally{g=y=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}})([E,O])}}},o=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CONFIG=void 0;var p=a(3318),d=a(4717),h=o(a(5820)),u=a(254);i.DEFAULT_CONFIG={wasmClientCode:"https://lightning.engineering/lnc-v0.3.6-alpha.wasm",namespace:"default",serverHost:"mailbox.terminal.lightning.today:443"};var c=(function(){function s(l){var g=this,w=Object.assign({},i.DEFAULT_CONFIG,l);w.credentialStore?this.credentials=w.credentialStore:this.credentials=new h.default(w.namespace,w.password),!this.credentials.isPaired&&w.serverHost&&(this.credentials.serverHost=w.serverHost),w.pairingPhrase&&(this.credentials.pairingPhrase=w.pairingPhrase),this.wasmManager=new u.WasmManager(w.namespace,w.wasmClientCode,{onLocalKeyCreated:function(y){g.credentials.localKey=y},onRemoteKeyReceived:function(y){g.credentials.remoteKey=y}}),this.lnd=new p.LndApi(d.createRpc,this),this.loop=new p.LoopApi(d.createRpc,this),this.pool=new p.PoolApi(d.createRpc,this),this.faraday=new p.FaradayApi(d.createRpc,this),this.tapd=new p.TaprootAssetsApi(d.createRpc,this),this.lit=new p.LitApi(d.createRpc,this)}return Object.defineProperty(s.prototype,"isReady",{get:function(){return this.wasmManager.isReady},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isConnected",{get:function(){return this.wasmManager.isConnected},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"status",{get:function(){return this.wasmManager.status},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"expiry",{get:function(){return this.wasmManager.expiry},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isReadOnly",{get:function(){return this.wasmManager.isReadOnly},enumerable:!1,configurable:!0}),s.prototype.hasPerms=function(l){return this.wasmManager.hasPerms(l)},s.prototype.preload=function(){return f(this,void 0,void 0,function(){return b(this,function(l){switch(l.label){case 0:return[4,this.wasmManager.preload()];case 1:return l.sent(),[2]}})})},s.prototype.run=function(){return f(this,void 0,void 0,function(){return b(this,function(l){switch(l.label){case 0:return[4,this.wasmManager.run()];case 1:return l.sent(),[2]}})})},s.prototype.connect=function(){return f(this,void 0,void 0,function(){var l;return b(this,function(g){switch(g.label){case 0:return l={pairingPhrase:this.credentials.pairingPhrase,serverHost:this.credentials.serverHost,localKey:this.credentials.localKey||"",remoteKey:this.credentials.remoteKey||""},[4,this.wasmManager.connect(l)];case 1:return g.sent(),this.credentials.password&&this.credentials.clear(!0),[2]}})})},s.prototype.disconnect=function(){this.wasmManager.disconnect()},s.prototype.waitTilReady=function(){return f(this,void 0,void 0,function(){return b(this,function(l){switch(l.label){case 0:return[4,this.wasmManager.waitTilReady()];case 1:return l.sent(),[2]}})})},s.prototype.request=function(l,g){return this.wasmManager.request(l,g)},s.prototype.subscribe=function(l,g,w,y){this.wasmManager.subscribe(l,g,w,y)},s})();i.default=c},2637(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.BaseCredentialRepository=void 0;var o=(0,a(9764).createLogger)("CredentialRepository"),p=(function(){function d(h){this.namespace=h,this.credentials=new Map}return Object.defineProperty(d.prototype,"hasAnyCredentials",{get:function(){return this.loadedCredentials.size>0},enumerable:!1,configurable:!0}),d.prototype.removeCredential=function(h){return f(this,void 0,void 0,function(){return b(this,function(u){return this.remove(h),[2]})})},d.prototype.hasCredential=function(h){return this.loadedCredentials.has(h)},d.prototype.clear=function(){this.credentials.clear(),this.save()},Object.defineProperty(d.prototype,"storageKey",{get:function(){return"".concat("lnc-web:").concat(this.namespace)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"loadedCredentials",{get:function(){return this.credentials.size===0&&this.load(),this.credentials},enumerable:!1,configurable:!0}),d.prototype.get=function(h){var u;return(u=this.loadedCredentials.get(h))!==null&&u!==void 0?u:void 0},d.prototype.set=function(h,u){this.credentials.set(h,u),this.save(h)},d.prototype.remove=function(h){this.credentials.delete(h),this.save()},d.prototype.save=function(h){if(globalThis.localStorage!==void 0)if(this.credentials.size!==0){var u=Object.fromEntries(this.credentials.entries()),c=h?" (".concat(h," updated)"):"";o.info("Saving credentials to localStorage".concat(c)),globalThis.localStorage.setItem(this.storageKey,JSON.stringify(u))}else globalThis.localStorage.removeItem(this.storageKey)},d.prototype.load=function(){if(globalThis.localStorage!==void 0){var h=globalThis.localStorage.getItem(this.storageKey);if(h)try{var u=JSON.parse(h);this.credentials=new Map(Object.entries(u)),o.info("loaded credentials from localStorage")}catch(c){o.error("Failed to parse cached credentials for ".concat(this.namespace,":"),c)}}},d})();i.BaseCredentialRepository=p},4279(n,i,a){"use strict";var f,b=this&&this.__extends||(f=function(s,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(g[y]=w[y])},f(s,l)},function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function g(){this.constructor=s}f(s,l),s.prototype=l===null?Object.create(l):(g.prototype=l.prototype,new g)}),o=this&&this.__awaiter||function(s,l,g,w){return new(g||(g=Promise))(function(y,v){function m(O){try{E(w.next(O))}catch(_){v(_)}}function C(O){try{E(w.throw(O))}catch(_){v(_)}}function E(O){var _;O.done?y(O.value):(_=O.value,_ instanceof g?_:new g(function(S){S(_)})).then(m,C)}E((w=w.apply(s,l||[])).next())})},p=this&&this.__generator||function(s,l){var g,w,y,v={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]},m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=C(0),m.throw=C(1),m.return=C(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function C(E){return function(O){return(function(_){if(g)throw new TypeError("Generator is already executing.");for(;m&&(m=0,_[0]&&(v=0)),v;)try{if(g=1,w&&(y=2&_[0]?w.return:_[0]?w.throw||((y=w.return)&&y.call(w),0):w.next)&&!(y=y.call(w,_[1])).done)return y;switch(w=0,y&&(_=[2&_[0],y.value]),_[0]){case 0:case 1:y=_;break;case 4:return v.label++,{value:_[1],done:!1};case 5:v.label++,w=_[1],_=[0];continue;case 7:_=v.ops.pop(),v.trys.pop();continue;default:if(!((y=(y=v.trys).length>0&&y[y.length-1])||_[0]!==6&&_[0]!==2)){v=0;continue}if(_[0]===3&&(!y||_[1]>y[0]&&_[1]<y[3])){v.label=_[1];break}if(_[0]===6&&v.label<y[1]){v.label=y[1],y=_;break}if(y&&v.label<y[2]){v.label=y[2],v.ops.push(_);break}y[2]&&v.ops.pop(),v.trys.pop();continue}_=l.call(s,v)}catch(S){_=[6,S],w=0}finally{g=y=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}})([E,O])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasskeyCredentialRepository=void 0;var d=a(9764),h=a(2637),u=(0,d.createLogger)("PasskeyCredentialRepository"),c=(function(s){function l(g,w){var y=s.call(this,g)||this;return y.encryption=w,y}return b(l,s),l.prototype.unlock=function(g){return o(this,void 0,void 0,function(){var w,y,v,m;return p(this,function(C){switch(C.label){case 0:if(g.method!=="passkey")throw new Error("Passkey repository requires passkey unlock method");return w=(v=this.get("passkeyCredentialId"))!==null&&v!==void 0?v:g.credentialId,[4,this.encryption.unlock({method:"passkey",credentialId:w,createIfMissing:(m=g.createIfMissing)!==null&&m!==void 0&&m})];case 1:return C.sent(),this.encryption.isUnlocked&&(y=this.encryption.getCredentialId(),this.set("passkeyCredentialId",y)),[2]}})})},l.prototype.getCredential=function(g){return o(this,void 0,void 0,function(){var w,y;return p(this,function(v){switch(v.label){case 0:if(!(w=this.get(g)))return[2,void 0];v.label=1;case 1:return v.trys.push([1,3,,4]),[4,this.encryption.decrypt(w)];case 2:return[2,v.sent()];case 3:return y=v.sent(),u.error("Failed to decrypt credential ".concat(g,":"),y),[2,void 0];case 4:return[2]}})})},l.prototype.setCredential=function(g,w){return o(this,void 0,void 0,function(){var y;return p(this,function(v){switch(v.label){case 0:if(!this.encryption.isUnlocked)throw new Error("Repository is locked. Call unlock() first.");return[4,this.encryption.encrypt(w)];case 1:return y=v.sent(),this.set(g,y),[2]}})})},Object.defineProperty(l.prototype,"isUnlocked",{get:function(){return this.encryption.isUnlocked},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasStoredAuthData",{get:function(){return this.hasCredential("passkeyCredentialId")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"storedCredentialId",{get:function(){return this.get("passkeyCredentialId")},enumerable:!1,configurable:!0}),l.prototype.lock=function(){this.encryption.lock()},l})(h.BaseCredentialRepository);i.PasskeyCredentialRepository=c},2672(n,i,a){"use strict";var f,b=this&&this.__extends||(f=function(s,l){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(g[y]=w[y])},f(s,l)},function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function g(){this.constructor=s}f(s,l),s.prototype=l===null?Object.create(l):(g.prototype=l.prototype,new g)}),o=this&&this.__awaiter||function(s,l,g,w){return new(g||(g=Promise))(function(y,v){function m(O){try{E(w.next(O))}catch(_){v(_)}}function C(O){try{E(w.throw(O))}catch(_){v(_)}}function E(O){var _;O.done?y(O.value):(_=O.value,_ instanceof g?_:new g(function(S){S(_)})).then(m,C)}E((w=w.apply(s,l||[])).next())})},p=this&&this.__generator||function(s,l){var g,w,y,v={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]},m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=C(0),m.throw=C(1),m.return=C(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function C(E){return function(O){return(function(_){if(g)throw new TypeError("Generator is already executing.");for(;m&&(m=0,_[0]&&(v=0)),v;)try{if(g=1,w&&(y=2&_[0]?w.return:_[0]?w.throw||((y=w.return)&&y.call(w),0):w.next)&&!(y=y.call(w,_[1])).done)return y;switch(w=0,y&&(_=[2&_[0],y.value]),_[0]){case 0:case 1:y=_;break;case 4:return v.label++,{value:_[1],done:!1};case 5:v.label++,w=_[1],_=[0];continue;case 7:_=v.ops.pop(),v.trys.pop();continue;default:if(!((y=(y=v.trys).length>0&&y[y.length-1])||_[0]!==6&&_[0]!==2)){v=0;continue}if(_[0]===3&&(!y||_[1]>y[0]&&_[1]<y[3])){v.label=_[1];break}if(_[0]===6&&v.label<y[1]){v.label=y[1],y=_;break}if(y&&v.label<y[2]){v.label=y[2],v.ops.push(_);break}y[2]&&v.ops.pop(),v.trys.pop();continue}_=l.call(s,v)}catch(S){_=[6,S],w=0}finally{g=y=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}})([E,O])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasswordCredentialRepository=void 0;var d=a(9764),h=a(2637),u=(0,d.createLogger)("PasswordCredentialRepository"),c=(function(s){function l(g,w){var y=s.call(this,g)||this;return y.encryption=w,y}return b(l,s),Object.defineProperty(l.prototype,"isUnlocked",{get:function(){return this.encryption.isUnlocked},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasStoredAuthData",{get:function(){return this.hasCredential("salt")&&this.hasCredential("cipher")},enumerable:!1,configurable:!0}),l.prototype.unlock=function(g){return o(this,void 0,void 0,function(){var w,y;return p(this,function(v){switch(v.label){case 0:if(g.method!=="password")throw new Error("Password repository requires password unlock method");return w=this.get("salt"),y=this.get("cipher"),[4,this.encryption.unlock({method:"password",password:g.password,salt:w,cipher:y})];case 1:return v.sent(),w||(this.set("salt",this.encryption.getSalt()),this.set("cipher",this.encryption.createTestCipher())),[2]}})})},l.prototype.getCredential=function(g){return o(this,void 0,void 0,function(){var w,y;return p(this,function(v){switch(v.label){case 0:if(!(w=this.get(g)))return u.debug("No encrypted credential found for ".concat(g," in ").concat(this.namespace)),[2,void 0];v.label=1;case 1:return v.trys.push([1,3,,4]),[4,this.encryption.decrypt(w)];case 2:return[2,v.sent()];case 3:return y=v.sent(),u.error("Failed to decrypt credential ".concat(g,":"),y),[2,void 0];case 4:return[2]}})})},l.prototype.setCredential=function(g,w){return o(this,void 0,void 0,function(){var y;return p(this,function(v){switch(v.label){case 0:if(!this.encryption.isUnlocked)throw new Error("Repository is locked. Call unlock() first.");return[4,this.encryption.encrypt(w)];case 1:return y=v.sent(),this.set(g,y),[2]}})})},l.prototype.lock=function(){this.encryption.lock()},l})(h.BaseCredentialRepository);i.PasswordCredentialRepository=c},1313(n,i){"use strict";var a=this&&this.__awaiter||function(o,p,d,h){return new(d||(d=Promise))(function(u,c){function s(w){try{g(h.next(w))}catch(y){c(y)}}function l(w){try{g(h.throw(w))}catch(y){c(y)}}function g(w){var y;w.done?u(w.value):(y=w.value,y instanceof d?y:new d(function(v){v(y)})).then(s,l)}g((h=h.apply(o,p||[])).next())})},f=this&&this.__generator||function(o,p){var d,h,u,c={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(g){return function(w){return(function(y){if(d)throw new TypeError("Generator is already executing.");for(;s&&(s=0,y[0]&&(c=0)),c;)try{if(d=1,h&&(u=2&y[0]?h.return:y[0]?h.throw||((u=h.return)&&u.call(h),0):h.next)&&!(u=u.call(h,y[1])).done)return u;switch(h=0,u&&(y=[2&y[0],u.value]),y[0]){case 0:case 1:u=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,h=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(!((u=(u=c.trys).length>0&&u[u.length-1])||y[0]!==6&&y[0]!==2)){c=0;continue}if(y[0]===3&&(!u||y[1]>u[0]&&y[1]<u[3])){c.label=y[1];break}if(y[0]===6&&c.label<u[1]){c.label=u[1],u=y;break}if(u&&c.label<u[2]){c.label=u[2],c.ops.push(y);break}u[2]&&c.ops.pop(),c.trys.pop();continue}y=p.call(o,c)}catch(v){y=[6,v],h=0}finally{d=u=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}})([g,w])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.CredentialsEncrypter=void 0;var b=(function(){function o(p){this.cryptoService=p}return o.prototype.encrypt=function(p){return a(this,void 0,void 0,function(){var d,h,u,c;return f(this,function(s){switch(s.label){case 0:return[4,this.cryptoService.generateRandomCredentialsKey()];case 1:return d=s.sent(),[4,this.cryptoService.encryptCredentials(d,JSON.stringify(p))];case 2:return h=s.sent(),u=h.ciphertextB64,c=h.ivB64,[2,{credentialsKey:d,ciphertextB64:u,ivB64:c}]}})})},o.prototype.decrypt=function(p){return a(this,void 0,void 0,function(){var d,h,u,c,s;return f(this,function(l){switch(l.label){case 0:return d=p.credentialsKey,h=p.ciphertextB64,u=p.ivB64,[4,this.cryptoService.decryptCredentials(d,h,u)];case 1:if(c=l.sent(),!((g=s=JSON.parse(c))&&typeof g=="object"&&"localKey"in g&&typeof g.localKey=="string"&&"remoteKey"in g&&typeof g.remoteKey=="string"&&"pairingPhrase"in g&&typeof g.pairingPhrase=="string"&&"serverHost"in g&&typeof g.serverHost=="string"))throw new Error("Decrypted credentials have an invalid shape");return[2,s]}var g})})},o})();i.CredentialsEncrypter=b},7027(n,i){"use strict";var a=this&&this.__awaiter||function(o,p,d,h){return new(d||(d=Promise))(function(u,c){function s(w){try{g(h.next(w))}catch(y){c(y)}}function l(w){try{g(h.throw(w))}catch(y){c(y)}}function g(w){var y;w.done?u(w.value):(y=w.value,y instanceof d?y:new d(function(v){v(y)})).then(s,l)}g((h=h.apply(o,p||[])).next())})},f=this&&this.__generator||function(o,p){var d,h,u,c={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=l(0),s.throw=l(1),s.return=l(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(g){return function(w){return(function(y){if(d)throw new TypeError("Generator is already executing.");for(;s&&(s=0,y[0]&&(c=0)),c;)try{if(d=1,h&&(u=2&y[0]?h.return:y[0]?h.throw||((u=h.return)&&u.call(h),0):h.next)&&!(u=u.call(h,y[1])).done)return u;switch(h=0,u&&(y=[2&y[0],u.value]),y[0]){case 0:case 1:u=y;break;case 4:return c.label++,{value:y[1],done:!1};case 5:c.label++,h=y[1],y=[0];continue;case 7:y=c.ops.pop(),c.trys.pop();continue;default:if(!((u=(u=c.trys).length>0&&u[u.length-1])||y[0]!==6&&y[0]!==2)){c=0;continue}if(y[0]===3&&(!u||y[1]>u[0]&&y[1]<u[3])){c.label=y[1];break}if(y[0]===6&&c.label<u[1]){c.label=u[1],u=y;break}if(u&&c.label<u[2]){c.label=u[2],c.ops.push(y);break}u[2]&&c.ops.pop(),c.trys.pop();continue}y=p.call(o,c)}catch(v){y=[6,v],h=0}finally{d=u=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}})([g,w])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.KeyWrapper=void 0;var b=(function(){function o(p){this.cryptoService=p}return o.prototype.wrapCredentialsKey=function(p,d,h){return a(this,void 0,void 0,function(){var u,c;return f(this,function(s){switch(s.label){case 0:return[4,this.cryptoService.wrapWithDeviceKey(p,d)];case 1:return u=s.sent(),[4,this.cryptoService.wrapWithOriginKey(p,h)];case 2:return c=s.sent(),[2,{deviceWrap:u,originWrap:c}]}})})},o.prototype.unwrapCredentialsKey=function(p,d,h){return a(this,void 0,void 0,function(){var u,c;return f(this,function(s){switch(s.label){case 0:return[4,this.cryptoService.unwrapWithDeviceKey(d,p.deviceWrap.keyB64,p.deviceWrap.ivB64)];case 1:return u=s.sent(),[4,this.cryptoService.unwrapWithOriginKey(h,p.originWrap.keyB64,p.originWrap.ivB64)];case 2:return c=s.sent(),[4,this.keysMatch(u,c)];case 3:if(!s.sent())throw new Error("Key unwrapping mismatch");return[2,u]}})})},o.prototype.keysMatch=function(p,d){return a(this,void 0,void 0,function(){var h,u,c,s;return f(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),h=new TextEncoder().encode("verification"),u=new Uint8Array(12),[4,crypto.subtle.encrypt({name:"AES-GCM",iv:u},p,h)];case 1:return c=l.sent(),[4,crypto.subtle.encrypt({name:"AES-GCM",iv:u},d,h)];case 2:return s=l.sent(),[2,this.arraysEqual(new Uint8Array(c),new Uint8Array(s))];case 3:return l.sent(),[2,!1];case 4:return[2]}})})},o.prototype.arraysEqual=function(p,d){if(p.length!==d.length)return!1;for(var h=!0,u=0;u<p.length;u++)p[u]!==d[u]&&(h=!1);return h},o})();i.KeyWrapper=b},9124(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0});var o=a(1389),p=(function(){function d(){}return d.prototype.generateRandomCredentialsKey=function(){return f(this,void 0,void 0,function(){var h;return b(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])];case 1:return[2,u.sent()];case 2:throw h=u.sent(),new Error("[CryptoService] Credentials key generation failed: ".concat(h.message));case 3:return[2]}})})},d.prototype.encryptCredentials=function(h,u){return f(this,void 0,void 0,function(){var c,s,l,g,w;return b(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),c=crypto.getRandomValues(new Uint8Array(12)),s=new TextEncoder,l=s.encode(u),[4,crypto.subtle.encrypt({name:"AES-GCM",iv:c},h,l)];case 1:return g=y.sent(),[2,{ciphertextB64:(0,o.arrayBufferToBase64)(g),ivB64:(0,o.arrayBufferToBase64)(c.buffer)}];case 2:throw w=y.sent(),new Error("[CryptoService] Credential encryption failed: ".concat(w.message));case 3:return[2]}})})},d.prototype.decryptCredentials=function(h,u,c){return f(this,void 0,void 0,function(){var s,l,g,w;return b(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),s=(0,o.base64ToArrayBuffer)(u),l=(0,o.base64ToArrayBuffer)(c),[4,crypto.subtle.decrypt({name:"AES-GCM",iv:l},h,s)];case 1:return g=y.sent(),[2,new TextDecoder().decode(g)];case 2:throw w=y.sent(),new Error("[CryptoService] Credential decryption failed: ".concat(w.message));case 3:return[2]}})})},d.prototype.wrapWithDeviceKey=function(h,u){return f(this,void 0,void 0,function(){var c,s,l;return b(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),c=crypto.getRandomValues(new Uint8Array(12)),[4,crypto.subtle.wrapKey("raw",h,u,{name:"AES-GCM",iv:c})];case 1:return s=g.sent(),[2,{keyB64:(0,o.arrayBufferToBase64)(s),ivB64:(0,o.arrayBufferToBase64)(c.buffer)}];case 2:throw l=g.sent(),new Error("[CryptoService] Device key wrapping failed: ".concat(l.message));case 3:return[2]}})})},d.prototype.unwrapWithDeviceKey=function(h,u,c){return f(this,void 0,void 0,function(){var s,l,g;return b(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),s=(0,o.base64ToArrayBuffer)(u),l=(0,o.base64ToArrayBuffer)(c),[4,crypto.subtle.unwrapKey("raw",s,h,{name:"AES-GCM",iv:l},{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])];case 1:return[2,w.sent()];case 2:throw g=w.sent(),new Error("[CryptoService] Device key unwrapping failed: ".concat(g.message));case 3:return[2]}})})},d.prototype.wrapWithOriginKey=function(h,u){return f(this,void 0,void 0,function(){var c,s,l;return b(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),c=crypto.getRandomValues(new Uint8Array(12)),[4,crypto.subtle.wrapKey("raw",h,u,{name:"AES-GCM",iv:c})];case 1:return s=g.sent(),[2,{keyB64:(0,o.arrayBufferToBase64)(s),ivB64:(0,o.arrayBufferToBase64)(c.buffer)}];case 2:throw l=g.sent(),new Error("[CryptoService] Origin key wrapping failed: ".concat(l.message));case 3:return[2]}})})},d.prototype.unwrapWithOriginKey=function(h,u,c){return f(this,void 0,void 0,function(){var s,l,g;return b(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),s=(0,o.base64ToArrayBuffer)(u),l=(0,o.base64ToArrayBuffer)(c),[4,crypto.subtle.unwrapKey("raw",s,h,{name:"AES-GCM",iv:l},{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])];case 1:return[2,w.sent()];case 2:throw g=w.sent(),new Error("[CryptoService] Origin key unwrapping failed: ".concat(g.message));case 3:return[2]}})})},d})();i.default=p},9242(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.DeviceBinder=void 0;var o=a(1389),p=(function(){function d(){}return d.prototype.generateFingerprint=function(){return f(this,void 0,void 0,function(){var h,u,c,s,l;return b(this,function(g){switch(g.label){case 0:if(!(!((s=globalThis.screen)===null||s===void 0)&&s.width)||!(!((l=globalThis.screen)===null||l===void 0)&&l.height))throw new Error("Device fingerprinting requires a browser environment with screen access");return h="".concat(globalThis.screen.width,"x").concat(globalThis.screen.height,"x").concat(globalThis.screen.colorDepth),u=Intl.DateTimeFormat().resolvedOptions().timeZone,[4,this.generateCanvasFingerprint()];case 1:return c=g.sent(),[2,this.hashFingerprint("".concat(h,"|").concat(u,"|").concat(c))]}})})},d.prototype.deriveSessionKey=function(h,u){return f(this,void 0,void 0,function(){var c,s;return b(this,function(l){switch(l.label){case 0:return c=new TextEncoder().encode(h),[4,crypto.subtle.importKey("raw",c,"HKDF",!1,["deriveKey"])];case 1:return s=l.sent(),[2,crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new TextEncoder().encode(u),info:new TextEncoder().encode("lnc-session-device-key")},s,{name:"AES-GCM",length:256},!1,["wrapKey","unwrapKey"])]}})})},d.prototype.generateCanvasFingerprint=function(){return f(this,void 0,void 0,function(){var h,u,c,s;return b(this,function(l){switch(l.label){case 0:if(l.trys.push([0,2,,3]),h=document.createElement("canvas"),!(u=h.getContext("2d")))throw new Error("Canvas 2D context unavailable");return u.textBaseline="top",u.font="14px Arial",u.fillText("Device fingerprint test",2,2),c=h.toDataURL(),[4,crypto.subtle.digest("SHA-256",new TextEncoder().encode(c))];case 1:return s=l.sent(),[2,(0,o.arrayBufferToHex)(s)];case 2:throw l.sent(),new Error("Canvas fingerprinting required for session security");case 3:return[2]}})})},d.prototype.hashFingerprint=function(h){return f(this,void 0,void 0,function(){var u;return b(this,function(c){switch(c.label){case 0:return[4,crypto.subtle.digest("SHA-256",new TextEncoder().encode(h))];case 1:return u=c.sent(),[2,(0,o.arrayBufferToHex)(u)]}})})},d})();i.DeviceBinder=p},1228(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.OriginKeyManager=void 0;var o=(0,a(9764).createLogger)("OriginKeyManager"),p=(function(){function d(h){this.dbName="lnc-origin-keys",this.dbVersion=1,this.storeName="keys",this.namespace=h}return d.prototype.isExpired=function(h){return Date.now()>h},d.prototype.getOrCreateOriginKey=function(){return f(this,void 0,void 0,function(){var h,u,c,s;return b(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),[4,this.loadOriginKey()];case 1:return(h=l.sent())&&!this.isExpired(h.expiresAt)?[2,h]:[4,crypto.subtle.generateKey({name:"AES-GCM",length:256},!1,["wrapKey","unwrapKey"])];case 2:return u=l.sent(),c=Date.now()+864e5,[4,this.saveOriginKey(u,c)];case 3:return l.sent(),[2,{originKey:u,expiresAt:c}];case 4:throw s=l.sent(),new Error("Failed to get or create origin key: ".concat(s.message));case 5:return[2]}})})},d.prototype.loadOriginKey=function(){return f(this,void 0,void 0,function(){var h,u=this;return b(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.withDB(function(s){return new Promise(function(l){var g=s.transaction([u.storeName],"readonly").objectStore(u.storeName).get(u.namespace);g.onsuccess=function(){var w=g.result;w&&w.originKey&&typeof w.originKey=="object"&&!Array.isArray(w.originKey)&&typeof w.expiresAt=="number"&&Number.isFinite(w.expiresAt)?l({originKey:w.originKey,expiresAt:w.expiresAt}):l(void 0)},g.onerror=function(){return l(void 0)}})})];case 1:return[2,c.sent()];case 2:return h=c.sent(),o.error("Failed to load origin key: ".concat(h.message)),[2,void 0];case 3:return[2]}})})},d.prototype.saveOriginKey=function(h,u){return f(this,void 0,void 0,function(){var c,s=this;return b(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,this.withDB(function(g){var w={namespace:s.namespace,originKey:h,expiresAt:u,createdAt:Date.now()};return new Promise(function(y,v){var m=g.transaction([s.storeName],"readwrite").objectStore(s.storeName).put(w);m.onsuccess=function(){return y()},m.onerror=function(){var C;v(new Error("Failed to save origin key: ".concat((C=m.error)===null||C===void 0?void 0:C.message)))}})})];case 1:return l.sent(),[3,3];case 2:throw c=l.sent(),o.error("Failed to save origin key: ".concat(c.message),c),new Error("Failed to save origin key: ".concat(c.message));case 3:return[2]}})})},d.prototype.clearOriginKey=function(){return f(this,void 0,void 0,function(){var h,u=this;return b(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.withDB(function(s){return new Promise(function(l,g){var w=s.transaction([u.storeName],"readwrite").objectStore(u.storeName).delete(u.namespace);w.onsuccess=function(){o.info("Origin key cleared",{namespace:u.namespace}),l()},w.onerror=function(){var y;return g(new Error("Failed to clear origin key: ".concat((y=w.error)===null||y===void 0?void 0:y.message)))}})})];case 1:return c.sent(),[3,3];case 2:return h=c.sent(),o.warn("Failed to clear origin key:",h),[3,3];case 3:return[2]}})})},d.prototype.withDB=function(h){return f(this,void 0,void 0,function(){var u;return b(this,function(c){switch(c.label){case 0:return[4,this.openDB()];case 1:u=c.sent(),c.label=2;case 2:return c.trys.push([2,,4,5]),[4,h(u)];case 3:return[2,c.sent()];case 4:return u.close(),[7];case 5:return[2]}})})},d.prototype.openDB=function(){return f(this,void 0,void 0,function(){var h=this;return b(this,function(u){return[2,new Promise(function(c,s){var l=indexedDB.open(h.dbName,h.dbVersion);l.onupgradeneeded=function(g){var w=g.target.result;w.objectStoreNames.contains(h.storeName)||w.createObjectStore(h.storeName,{keyPath:"namespace"}).createIndex("expiresAt","expiresAt",{unique:!1})},l.onsuccess=function(){return c(l.result)},l.onerror=function(){return s(new Error("Failed to open IndexedDB"))}})]})})},d})();i.OriginKeyManager=p},9440(n,i,a){"use strict";var f=this&&this.__awaiter||function(v,m,C,E){return new(C||(C=Promise))(function(O,_){function S(T){try{A(E.next(T))}catch(N){_(N)}}function R(T){try{A(E.throw(T))}catch(N){_(N)}}function A(T){var N;T.done?O(T.value):(N=T.value,N instanceof C?N:new C(function(x){x(N)})).then(S,R)}A((E=E.apply(v,m||[])).next())})},b=this&&this.__generator||function(v,m){var C,E,O,_={label:0,sent:function(){if(1&O[0])throw O[1];return O[1]},trys:[],ops:[]},S=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return S.next=R(0),S.throw=R(1),S.return=R(2),typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function R(A){return function(T){return(function(N){if(C)throw new TypeError("Generator is already executing.");for(;S&&(S=0,N[0]&&(_=0)),_;)try{if(C=1,E&&(O=2&N[0]?E.return:N[0]?E.throw||((O=E.return)&&O.call(E),0):E.next)&&!(O=O.call(E,N[1])).done)return O;switch(E=0,O&&(N=[2&N[0],O.value]),N[0]){case 0:case 1:O=N;break;case 4:return _.label++,{value:N[1],done:!1};case 5:_.label++,E=N[1],N=[0];continue;case 7:N=_.ops.pop(),_.trys.pop();continue;default:if(!((O=(O=_.trys).length>0&&O[O.length-1])||N[0]!==6&&N[0]!==2)){_=0;continue}if(N[0]===3&&(!O||N[1]>O[0]&&N[1]<O[3])){_.label=N[1];break}if(N[0]===6&&_.label<O[1]){_.label=O[1],O=N;break}if(O&&_.label<O[2]){_.label=O[2],_.ops.push(N);break}O[2]&&_.ops.pop(),_.trys.pop();continue}N=m.call(v,_)}catch(x){N=[6,x],E=0}finally{C=O=0}if(5&N[0])throw N[1];return{value:N[0]?N[1]:void 0,done:!0}})([A,T])}}},o=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(i,"__esModule",{value:!0});var p=a(9764),d=a(1313),h=a(7027),u=o(a(9124)),c=a(9242),s=a(1228),l=a(7424),g=(0,p.createLogger)("SessionManager"),w=Object.freeze({sessionDurationMs:864e5,enableActivityRefresh:!0,maxRefreshes:10,maxSessionAgeMs:6048e5}),y=(function(){function v(m,C){this.isRefreshing=!1,this.namespace=m;var E=new u.default;this.encrypter=new d.CredentialsEncrypter(E),this.keyWrapper=new h.KeyWrapper(E),this.deviceBinder=new c.DeviceBinder,this.originKeyManager=new s.OriginKeyManager(m),this.storage=new l.SessionStorage(m),this.config=this.validateConfig(C)}return Object.defineProperty(v.prototype,"canAutoRestore",{get:function(){return this.storage.hasData()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"sessionTimeRemaining",{get:function(){var m=this.storage.load();return m?Math.max(0,m.expiresAt-Date.now()):0},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"hasActiveSession",{get:function(){var m=this.storage.load();return m!=null&&Date.now()<m.expiresAt},enumerable:!1,configurable:!0}),v.prototype.getNamespace=function(){return this.namespace},v.prototype.clearSession=function(){this.storage.clear()},v.prototype.hasValidSession=function(){return f(this,void 0,void 0,function(){return b(this,function(m){switch(m.label){case 0:return this.hasActiveSession?[4,this.restoreSession()]:[2,!1];case 1:return[2,!!m.sent()]}})})},v.prototype.createSession=function(m){return f(this,void 0,void 0,function(){var C,E,O,_,S,R,A,T,N;return b(this,function(x){switch(x.label){case 0:return C=this.generateSecureSessionId(),E=Date.now(),O=E+this.config.sessionDurationMs,[4,this.deviceBinder.generateFingerprint()];case 1:return _=x.sent(),[4,this.encrypter.encrypt(m)];case 2:return S=x.sent(),[4,this.deviceBinder.deriveSessionKey(_,C)];case 3:return R=x.sent(),[4,this.originKeyManager.getOrCreateOriginKey()];case 4:return A=x.sent(),[4,this.keyWrapper.wrapCredentialsKey(S.credentialsKey,R,A.originKey)];case 5:return T=x.sent(),N={sessionId:C,createdAt:E,expiresAt:O,refreshCount:0,encryptedCredentials:S.ciphertextB64,credentialsIV:S.ivB64,device:T.deviceWrap,origin:T.originWrap},this.storage.save(N),g.info("Session created successfully"),[2]}})})},v.prototype.restoreSession=function(){return f(this,void 0,void 0,function(){var m,C;return b(this,function(E){switch(E.label){case 0:return E.trys.push([0,2,,3]),[4,this.restoreSessionOrThrow()];case 1:return(m=E.sent())||this.storage.clear(),[2,m];case 2:return C=E.sent(),g.error("Session restoration failed:",C),this.storage.clear(),[2,void 0];case 3:return[2]}})})},v.prototype.refreshSession=function(){return f(this,void 0,void 0,function(){return b(this,function(m){switch(m.label){case 0:if(this.isRefreshing&&this.refreshPromise)return g.warn("Refresh already in progress; waiting for result"),[2,this.refreshPromise];this.isRefreshing=!0,this.refreshPromise=this.refreshSessionInternal(),m.label=1;case 1:return m.trys.push([1,,3,4]),[4,this.refreshPromise];case 2:return[2,m.sent()];case 3:return this.isRefreshing=!1,this.refreshPromise=void 0,[7];case 4:return[2]}})})},v.prototype.refreshSessionInternal=function(){return f(this,void 0,void 0,function(){var m,C,E,O,_,S,R,A,T;return b(this,function(N){switch(N.label){case 0:return(m=this.storage.load())?m.refreshCount>=this.config.maxRefreshes?(g.warn("Maximum refresh count reached"),[2,!1]):Date.now()-m.createdAt>=this.config.maxSessionAgeMs?(g.warn("Maximum session age exceeded"),[2,!1]):[4,this.restoreSessionOrThrow()]:(g.warn("No session data available for refresh"),[2,!1]);case 1:return(C=N.sent())?[4,this.encrypter.encrypt(C)]:(g.warn("Refresh aborted: session could not be restored"),[2,!1]);case 2:return E=N.sent(),S=(_=this.deviceBinder).deriveSessionKey,[4,this.deviceBinder.generateFingerprint()];case 3:return[4,S.apply(_,[N.sent(),m.sessionId])];case 4:return O=N.sent(),[4,this.originKeyManager.getOrCreateOriginKey()];case 5:return R=N.sent(),[4,this.keyWrapper.wrapCredentialsKey(E.credentialsKey,O,R.originKey)];case 6:return A=N.sent(),T={sessionId:m.sessionId,createdAt:m.createdAt,expiresAt:Date.now()+this.config.sessionDurationMs,refreshCount:m.refreshCount+1,encryptedCredentials:E.ciphertextB64,credentialsIV:E.ivB64,device:A.deviceWrap,origin:A.originWrap},this.storage.save(T),[2,!0]}})})},v.prototype.restoreSessionOrThrow=function(){return f(this,void 0,void 0,function(){var m,C,E,O,_,S;return b(this,function(R){switch(R.label){case 0:return g.info("Starting session restoration..."),(m=this.storage.load())?Date.now()>m.expiresAt?(g.info("Session expired"),[2,void 0]):[4,this.deviceBinder.generateFingerprint()]:(g.info("No session data found"),[2,void 0]);case 1:return C=R.sent(),[4,this.deviceBinder.deriveSessionKey(C,m.sessionId)];case 2:return E=R.sent(),[4,this.originKeyManager.loadOriginKey()];case 3:if(!(O=R.sent()))throw new Error("Origin key missing");if(this.originKeyManager.isExpired(O.expiresAt))throw new Error("Origin key expired");return[4,this.keyWrapper.unwrapCredentialsKey({deviceWrap:m.device,originWrap:m.origin},E,O.originKey)];case 4:return _=R.sent(),[4,this.encrypter.decrypt({credentialsKey:_,ciphertextB64:m.encryptedCredentials,ivB64:m.credentialsIV})];case 5:return S=R.sent(),g.info("Session restoration successful!"),[2,S]}})})},v.prototype.generateSecureSessionId=function(){if(crypto.randomUUID)return crypto.randomUUID();var m=new Uint8Array(16);return crypto.getRandomValues(m),Array.from(m,function(C){return C.toString(16).padStart(2,"0")}).join("")},v.prototype.validateConfig=function(m){var C=m?Object.fromEntries(Object.entries(m).filter(function(O){return O[1]!==void 0})):{},E=Object.assign({},w,C);if(!Number.isFinite(E.sessionDurationMs)||E.sessionDurationMs<=0)throw new Error("sessionDurationMs must be a finite positive number");if(!Number.isInteger(E.maxRefreshes)||E.maxRefreshes<0)throw new Error("maxRefreshes must be a non-negative integer");if(typeof E.enableActivityRefresh!="boolean")throw new Error("enableActivityRefresh must be a boolean");if(!Number.isFinite(E.maxSessionAgeMs)||E.maxSessionAgeMs<=0)throw new Error("maxSessionAgeMs must be a finite positive number");if(E.maxSessionAgeMs<E.sessionDurationMs)throw new Error("maxSessionAgeMs must be >= sessionDurationMs");return Object.freeze(E)},v})();i.default=y},5673(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0});var o=(0,a(9764).createLogger)("SessionRefreshManager"),p=(function(){function d(h){this.sessionManager=h,this.lastActivity=Date.now(),this.activityListeners=[],this.isRunning=!1,this.hasVisibilityListener=!1,this.consecutiveErrors=0,this.isRefreshing=!1,this.config=h.config,this.visibilityHandler=this.handleVisibilityChange.bind(this),this.refreshTriggerMs=Math.min(144e5,.25*this.config.sessionDurationMs)}return d.prototype.start=function(){if(!this.isRunning&&this.config.enableActivityRefresh)if(typeof document<"u"){if(this.config.sessionDurationMs<12e5){var h=this.config.sessionDurationMs/6e4;o.warn("Session duration (".concat(h,"m) is less ")+"than the minimum recommended for auto-refresh (".concat(20,"m). ")+"The periodic check may not observe the session inside the refresh window before it expires.")}this.isRunning=!0,this.lastActivity=Date.now(),this.consecutiveErrors=0,this.setupActivityMonitoring(),this.resumeRefreshTimer(),this.visibilityHandler&&(document.addEventListener("visibilitychange",this.visibilityHandler),this.hasVisibilityListener=!0)}else o.warn("No document available; activity monitoring disabled")},d.prototype.stop=function(){this.isRunning&&(this.isRunning=!1,this.cleanupTimersAndListeners(),this.hasVisibilityListener&&this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.hasVisibilityListener=!1))},d.prototype.setupActivityMonitoring=function(){var h=this,u=this.createThrottledActivityUpdater();["click","keydown","mousemove","scroll","touchstart"].forEach(function(c){var s=function(){return u()};document.addEventListener(c,s,{passive:!0}),h.activityListeners.push({event:c,handler:s})})},d.prototype.createThrottledActivityUpdater=function(){var h=this,u=!1;return function(){u||(u=!0,h.lastActivity=Date.now(),h.activityThrottleTimer=setTimeout(function(){u=!1},3e4))}},d.prototype.resumeRefreshTimer=function(){var h=this;this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(function(){return f(h,void 0,void 0,function(){return b(this,function(u){switch(u.label){case 0:return[4,this.checkAndRefreshSession()];case 1:return u.sent(),this.isRunning&&this.resumeRefreshTimer(),[2]}})})},3e5)},d.prototype.pauseRefreshTimer=function(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)},d.prototype.checkAndRefreshSession=function(){return f(this,void 0,void 0,function(){var h,u,c;return b(this,function(s){switch(s.label){case 0:if(this.isRefreshing)return[2];this.isRefreshing=!0,s.label=1;case 1:return s.trys.push([1,4,5,6]),(h=Date.now()-this.lastActivity)>=18e5?(o.debug("Refresh suppressed: user inactive "+"for ".concat(Math.round(h/1e3),"s")),[2]):(u=this.sessionManager.sessionTimeRemaining)>0&&u<this.refreshTriggerMs?[4,this.sessionManager.refreshSession()]:[3,3];case 2:s.sent()?(this.consecutiveErrors=0,o.info("Session automatically refreshed")):(o.warn("Session refresh declined (max refreshes or max age reached). Stopping."),this.stop()),s.label=3;case 3:return[3,6];case 4:return c=s.sent(),this.consecutiveErrors++,o.error("Refresh check failed "+"(attempt ".concat(this.consecutiveErrors,"/").concat(3,"):"),c),this.consecutiveErrors>=3&&(o.error("Stopping after repeated failures"),this.stop()),[3,6];case 5:return this.isRefreshing=!1,[7];case 6:return[2]}})})},d.prototype.handleVisibilityChange=function(){this.isRunning&&(document.hidden?this.pauseRefreshTimer():(this.lastActivity=Date.now(),this.resumeRefreshTimer()))},d.prototype.cleanupTimersAndListeners=function(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0),this.activityThrottleTimer&&(clearTimeout(this.activityThrottleTimer),this.activityThrottleTimer=void 0),this.activityListeners.forEach(function(h){var u=h.event,c=h.handler;document.removeEventListener(u,c)}),this.activityListeners=[]},d.prototype.getLastActivity=function(){return this.lastActivity},d.prototype.isActive=function(){return this.isRunning},d.prototype.forceRefreshCheck=function(){return f(this,void 0,void 0,function(){return b(this,function(h){switch(h.label){case 0:return this.isRunning?[4,this.checkAndRefreshSession()]:(o.warn("forceRefreshCheck called while not running"),[2,!1]);case 1:return h.sent(),[2,this.isRunning]}})})},d})();i.default=p},7424(n,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.SessionStorage=void 0;var f=(0,a(9764).createLogger)("SessionStorage"),b="lnc-session:",o=function(d){if(!d||typeof d!="object")return!1;var h=d;return typeof h.keyB64=="string"&&typeof h.ivB64=="string"},p=(function(){function d(h){this._cache=void 0,this._namespace=h}return d.prototype.save=function(h){if(typeof sessionStorage<"u")try{var u="".concat(b).concat(this._namespace);sessionStorage.setItem(u,JSON.stringify(h)),this._cache=h,f.info("Session saved to sessionStorage",{namespace:this._namespace,sessionId:h.sessionId,createdAt:h.createdAt,expiresAt:h.expiresAt,refreshCount:h.refreshCount})}catch(c){throw f.error("Failed to save session data",{namespace:this._namespace,error:c}),c}},d.prototype.load=function(){var h;if(typeof sessionStorage<"u"){if(this._cache!==void 0)return(h=this._cache)!==null&&h!==void 0?h:void 0;try{var u="".concat(b).concat(this._namespace),c=sessionStorage.getItem(u);if(!c)return void(this._cache=null);var s=JSON.parse(c);if(!s||typeof s!="object"||!(g=s)||typeof g.sessionId!="string"||typeof g.createdAt!="number"||typeof g.expiresAt!="number"||typeof g.refreshCount!="number"||typeof g.encryptedCredentials!="string"||typeof g.credentialsIV!="string"||!Number.isFinite(g.createdAt)||!Number.isFinite(g.expiresAt)||g.createdAt<=0||g.expiresAt<=0||g.createdAt>g.expiresAt||!Number.isInteger(g.refreshCount)||g.refreshCount<0||g.sessionId.length===0||!o(g.device)||!o(g.origin))return f.error("Invalid session data",{namespace:this._namespace}),sessionStorage.removeItem(u),void(this._cache=null);var l=s;return this._cache=l,f.info("Session loaded from sessionStorage",{namespace:this._namespace,sessionId:l.sessionId,createdAt:l.createdAt,expiresAt:l.expiresAt,refreshCount:l.refreshCount}),l}catch(w){f.error("Failed to load session data",{namespace:this._namespace,error:w});try{u="".concat(b).concat(this._namespace),sessionStorage.removeItem(u)}catch(y){f.warn("Cleanup failed during error recovery",{namespace:this._namespace,cleanupError:y})}return void(this._cache=null)}var g}},d.prototype.clear=function(){if(typeof sessionStorage<"u")try{var h="".concat(b).concat(this._namespace);sessionStorage.removeItem(h),this._cache=null}catch(u){f.error("Failed to clear session data",{namespace:this._namespace,error:u})}},d.prototype.hasData=function(){return typeof sessionStorage<"u"&&(this._cache===void 0&&this.load(),this._cache!=null)},d})();i.SessionStorage=p},3666(n,i,a){"use strict";var f=this&&this.__awaiter||function(h,u,c,s){return new(c||(c=Promise))(function(l,g){function w(m){try{v(s.next(m))}catch(C){g(C)}}function y(m){try{v(s.throw(m))}catch(C){g(C)}}function v(m){var C;m.done?l(m.value):(C=m.value,C instanceof c?C:new c(function(E){E(C)})).then(w,y)}v((s=s.apply(h,u||[])).next())})},b=this&&this.__generator||function(h,u){var c,s,l,g={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},w=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return w.next=y(0),w.throw=y(1),w.return=y(2),typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function y(v){return function(m){return(function(C){if(c)throw new TypeError("Generator is already executing.");for(;w&&(w=0,C[0]&&(g=0)),g;)try{if(c=1,s&&(l=2&C[0]?s.return:C[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,C[1])).done)return l;switch(s=0,l&&(C=[2&C[0],l.value]),C[0]){case 0:case 1:l=C;break;case 4:return g.label++,{value:C[1],done:!1};case 5:g.label++,s=C[1],C=[0];continue;case 7:C=g.ops.pop(),g.trys.pop();continue;default:if(!((l=(l=g.trys).length>0&&l[l.length-1])||C[0]!==6&&C[0]!==2)){g=0;continue}if(C[0]===3&&(!l||C[1]>l[0]&&C[1]<l[3])){g.label=C[1];break}if(C[0]===6&&g.label<l[1]){g.label=l[1],l=C;break}if(l&&g.label<l[2]){g.label=l[2],g.ops.push(C);break}l[2]&&g.ops.pop(),g.trys.pop();continue}C=u.call(h,g)}catch(E){C=[6,E],s=0}finally{c=l=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}})([v,m])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.AuthenticationCoordinator=void 0;var o=(0,a(9764).createLogger)("AuthenticationCoordinator"),p=["localKey","remoteKey","pairingPhrase","serverHost"],d=(function(){function h(u,c,s){this.strategyManager=u,this.credentialCache=c,this.sessionCoordinator=s,this.sessionRestored=!1,this.initializeCachePromise=this.initializeCache()}return Object.defineProperty(h.prototype,"isUnlocked",{get:function(){return!!this.activeStrategy&&this.activeStrategy.isUnlocked},enumerable:!1,configurable:!0}),h.prototype.getActiveStrategy=function(){return this.activeStrategy},h.prototype.clearSession=function(){this.credentialCache.clear(),this.sessionCoordinator.clearSession(),this.sessionRestored=!1,this.activeStrategy=void 0,o.info("Cleared session state")},h.prototype.unlock=function(u){return f(this,void 0,void 0,function(){var c,s;return b(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),[4,this.waitForSessionRestoration()];case 1:return l.sent(),u.method==="session"&&this.sessionRestored?[2,!0]:(c=this.strategyManager.getStrategy(u.method))?[4,c.unlock(u)]:(o.error("Authentication method '".concat(u.method,"' not supported")),[2,!1]);case 2:return l.sent()?(this.activeStrategy=c,[4,this.loadCredentialsFromStrategy(c)]):(o.error("Failed to unlock with ".concat(u.method)),[2,!1]);case 3:return l.sent(),[2,!0];case 4:return s=l.sent(),o.error("Unlock failed:",s),this.credentialCache.clear(),this.activeStrategy=void 0,[2,!1];case 5:return[2]}})})},h.prototype.getAuthenticationInfo=function(){return f(this,void 0,void 0,function(){var u,c,s,l,g,w,y,v;return b(this,function(m){switch(m.label){case 0:return[4,this.waitForSessionRestoration()];case 1:return m.sent(),u=this.strategyManager.hasAnyCredentials,c=this.sessionCoordinator.hasActiveSession,[4,this.sessionCoordinator.getTimeRemaining()];case 2:return s=m.sent(),l=this.strategyManager.getStrategy("passkey"),g=!!l&&l.isSupported,w=g&&((y=l?.hasStoredAuthData)===null||y===void 0?void 0:y.call(l))===!0,[2,{isUnlocked:this.isUnlocked,hasStoredCredentials:u,hasActiveSession:c,sessionTimeRemaining:s,supportsPasskeys:g,hasPasskey:w,preferredUnlockMethod:this.strategyManager.preferredMethod,passkeyCredentialId:w?(v=l?.getCredentialId)===null||v===void 0?void 0:v.call(l):void 0}]}})})},h.prototype.tryAutoRestore=function(){return f(this,void 0,void 0,function(){var u,c,s;return b(this,function(l){switch(l.label){case 0:if(!this.sessionCoordinator.isSessionAvailable||this.sessionRestored)return[2,!1];if(!(u=this.strategyManager.getStrategy("session")))return[2,!1];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.sessionCoordinator.tryAutoRestore()];case 2:return(c=l.sent())?(this.credentialCache.hydrateFromSession(c),this.sessionRestored=!0,this.activeStrategy=u,[2,!0]):[2,!1];case 3:return s=l.sent(),o.error("Auto-restore failed:",s),[3,4];case 4:return[2,!1]}})})},h.prototype.createSessionAfterConnection=function(){return f(this,void 0,void 0,function(){return b(this,function(u){switch(u.label){case 0:return this.sessionCoordinator.isSessionAvailable?[4,this.sessionCoordinator.createSession({localKey:this.getCachedCredential("localKey"),remoteKey:this.getCachedCredential("remoteKey"),pairingPhrase:this.getCachedCredential("pairingPhrase"),serverHost:this.getCachedCredential("serverHost")})]:[3,2];case 1:u.sent(),u.label=2;case 2:return[2]}})})},h.prototype.getCachedCredential=function(u){return this.credentialCache.get(u)||""},h.prototype.initializeCache=function(){return f(this,void 0,void 0,function(){return b(this,function(u){switch(u.label){case 0:return[4,this.tryAutoRestore()];case 1:return u.sent(),this.sessionRestored||!this.activeStrategy?[3,3]:[4,this.loadCredentialsFromStrategy(this.activeStrategy)];case 2:u.sent(),u.label=3;case 3:return[2]}})})},h.prototype.waitForSessionRestoration=function(){return f(this,void 0,void 0,function(){return b(this,function(u){switch(u.label){case 0:return!this.sessionCoordinator.isSessionAvailable||this.sessionRestored?[2]:this.initializeCachePromise?[4,this.initializeCachePromise]:[3,2];case 1:return u.sent(),[3,4];case 2:return[4,this.tryAutoRestore()];case 3:u.sent(),u.label=4;case 4:return[2]}})})},h.prototype.persistCachedCredentials=function(u){return f(this,void 0,void 0,function(){var c,s,l,g,w,y;return b(this,function(v){switch(v.label){case 0:if(this.activeStrategy=u,u.method==="session")return[2];c=[],s=0,l=p,v.label=1;case 1:if(!(s<l.length))return[3,6];if(g=l[s],!(w=this.credentialCache.get(g)))return[3,5];v.label=2;case 2:return v.trys.push([2,4,,5]),[4,u.setCredential(g,w)];case 3:return v.sent(),[3,5];case 4:return y=v.sent(),o.error("Failed to persist ".concat(g,":"),y),c.push(g),[3,5];case 5:return s++,[3,1];case 6:if(c.length>0)throw new Error("Failed to persist credentials: ".concat(c.join(", ")));return[2]}})})},h.prototype.loadCredentialsFromStrategy=function(u){return f(this,void 0,void 0,function(){var c,s,l,g,w,y;return b(this,function(v){switch(v.label){case 0:c=[],s=0,l=p,v.label=1;case 1:if(!(s<l.length))return[3,6];g=l[s],v.label=2;case 2:return v.trys.push([2,4,,5]),[4,u.getCredential(g)];case 3:return(w=v.sent())&&this.credentialCache.set(g,w),[3,5];case 4:return y=v.sent(),o.error("Failed to load credential ".concat(g,":"),y),c.push(g),[3,5];case 5:return s++,[3,1];case 6:if(c.length>0)throw new Error("Failed to load credentials: ".concat(c.join(", ")));return[2]}})})},h})();i.AuthenticationCoordinator=d},6041(n,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CredentialCache=void 0;var f=(0,a(9764).createLogger)("CredentialCache"),b=(function(){function o(){this.cache=new Map}return Object.defineProperty(o.prototype,"size",{get:function(){return this.cache.size},enumerable:!1,configurable:!0}),o.prototype.get=function(p){return this.cache.get(p)},o.prototype.set=function(p,d){this.cache.set(p,d)},o.prototype.has=function(p){return this.cache.has(p)},o.prototype.hasAny=function(){return this.cache.size>0},o.prototype.clear=function(){this.cache.clear(),f.info("Cache cleared")},o.prototype.getAll=function(){return new Map(this.cache)},o.prototype.hydrate=function(p){for(var d=0,h=Object.entries(p);d<h.length;d++){var u=h[d],c=u[0],s=u[1];this.cache.set(c,s)}f.info("Hydrated with credentials:",{keys:Object.keys(p)})},o.prototype.hydrateFromSession=function(p){this.cache.set("localKey",p.localKey),this.cache.set("remoteKey",p.remoteKey),this.cache.set("pairingPhrase",p.pairingPhrase),this.cache.set("serverHost",p.serverHost),f.info("Hydrated from session:",{hasLocalKey:!!p.localKey,hasRemoteKey:!!p.remoteKey,hasPairingPhrase:!!p.pairingPhrase,serverHost:p.serverHost})},o.prototype.keys=function(){return Array.from(this.cache.keys())},o.prototype.values=function(){return Array.from(this.cache.values())},o.prototype.entries=function(){return Array.from(this.cache.entries())},o.prototype.snapshot=function(){return Object.fromEntries(this.cache.entries())},o})();i.CredentialCache=b},9389(n,i,a){"use strict";var f=this&&this.__awaiter||function(u,c,s,l){return new(s||(s=Promise))(function(g,w){function y(C){try{m(l.next(C))}catch(E){w(E)}}function v(C){try{m(l.throw(C))}catch(E){w(E)}}function m(C){var E;C.done?g(C.value):(E=C.value,E instanceof s?E:new s(function(O){O(E)})).then(y,v)}m((l=l.apply(u,c||[])).next())})},b=this&&this.__generator||function(u,c){var s,l,g,w={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]},y=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return y.next=v(0),y.throw=v(1),y.return=v(2),typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function v(m){return function(C){return(function(E){if(s)throw new TypeError("Generator is already executing.");for(;y&&(y=0,E[0]&&(w=0)),w;)try{if(s=1,l&&(g=2&E[0]?l.return:E[0]?l.throw||((g=l.return)&&g.call(l),0):l.next)&&!(g=g.call(l,E[1])).done)return g;switch(l=0,g&&(E=[2&E[0],g.value]),E[0]){case 0:case 1:g=E;break;case 4:return w.label++,{value:E[1],done:!1};case 5:w.label++,l=E[1],E=[0];continue;case 7:E=w.ops.pop(),w.trys.pop();continue;default:if(!((g=(g=w.trys).length>0&&g[g.length-1])||E[0]!==6&&E[0]!==2)){w=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){w.label=E[1];break}if(E[0]===6&&w.label<g[1]){w.label=g[1],g=E;break}if(g&&w.label<g[2]){w.label=g[2],w.ops.push(E);break}g[2]&&w.ops.pop(),w.trys.pop();continue}E=c.call(u,w)}catch(O){E=[6,O],l=0}finally{s=g=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}})([m,C])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasskeyStrategy=void 0;var o=a(6315),p=a(4279),d=(0,a(9764).createLogger)("PasskeyStrategy"),h=(function(){function u(c,s){this.method="passkey";var l=new o.PasskeyEncryptionService(c,s);this.repository=new p.PasskeyCredentialRepository(c,l)}return Object.defineProperty(u.prototype,"isSupported",{get:function(){return typeof window<"u"&&!(!window.PublicKeyCredential||!window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isUnlocked",{get:function(){return this.repository.isUnlocked},enumerable:!1,configurable:!0}),u.prototype.unlock=function(c){return f(this,void 0,void 0,function(){var s;return b(this,function(l){switch(l.label){case 0:if(c.method!=="passkey")return[2,!1];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.repository.unlock(c)];case 2:return l.sent(),[2,!0];case 3:return s=l.sent(),d.error("Unlock failed:",s),[2,!1];case 4:return[2]}})})},Object.defineProperty(u.prototype,"hasAnyCredentials",{get:function(){return this.repository.hasAnyCredentials},enumerable:!1,configurable:!0}),u.prototype.hasStoredAuthData=function(){return this.repository.hasStoredAuthData},u.prototype.getCredentialId=function(){return this.repository.storedCredentialId},u.prototype.getCredential=function(c){return f(this,void 0,void 0,function(){var s;return b(this,function(l){switch(l.label){case 0:if(!this.isUnlocked)return d.warn("Cannot get credential - not unlocked"),[2,void 0];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.repository.getCredential(c)];case 2:return[2,l.sent()];case 3:return s=l.sent(),d.error("Failed to get credential ".concat(c,":"),s),[2,void 0];case 4:return[2]}})})},u.prototype.setCredential=function(c,s){return f(this,void 0,void 0,function(){var l;return b(this,function(g){switch(g.label){case 0:if(!this.isUnlocked)return d.warn("Cannot set credential - not unlocked"),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,this.repository.setCredential(c,s)];case 2:return g.sent(),[3,4];case 3:throw l=g.sent(),d.error("Failed to set credential ".concat(c,":"),l),l;case 4:return[2]}})})},u.prototype.clear=function(){this.repository.clear()},u})();i.PasskeyStrategy=h},8562(n,i,a){"use strict";var f=this&&this.__awaiter||function(u,c,s,l){return new(s||(s=Promise))(function(g,w){function y(C){try{m(l.next(C))}catch(E){w(E)}}function v(C){try{m(l.throw(C))}catch(E){w(E)}}function m(C){var E;C.done?g(C.value):(E=C.value,E instanceof s?E:new s(function(O){O(E)})).then(y,v)}m((l=l.apply(u,c||[])).next())})},b=this&&this.__generator||function(u,c){var s,l,g,w={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]},y=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return y.next=v(0),y.throw=v(1),y.return=v(2),typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function v(m){return function(C){return(function(E){if(s)throw new TypeError("Generator is already executing.");for(;y&&(y=0,E[0]&&(w=0)),w;)try{if(s=1,l&&(g=2&E[0]?l.return:E[0]?l.throw||((g=l.return)&&g.call(l),0):l.next)&&!(g=g.call(l,E[1])).done)return g;switch(l=0,g&&(E=[2&E[0],g.value]),E[0]){case 0:case 1:g=E;break;case 4:return w.label++,{value:E[1],done:!1};case 5:w.label++,l=E[1],E=[0];continue;case 7:E=w.ops.pop(),w.trys.pop();continue;default:if(!((g=(g=w.trys).length>0&&g[g.length-1])||E[0]!==6&&E[0]!==2)){w=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){w.label=E[1];break}if(E[0]===6&&w.label<g[1]){w.label=g[1],g=E;break}if(g&&w.label<g[2]){w.label=g[2],w.ops.push(E);break}g[2]&&w.ops.pop(),w.trys.pop();continue}E=c.call(u,w)}catch(O){E=[6,O],l=0}finally{s=g=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}})([m,C])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.PasswordStrategy=void 0;var o=a(6200),p=a(2672),d=(0,a(9764).createLogger)("PasswordStrategy"),h=(function(){function u(c){this.method="password";var s=new o.PasswordEncryptionService;this.repository=new p.PasswordCredentialRepository(c,s)}return Object.defineProperty(u.prototype,"isSupported",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isUnlocked",{get:function(){return this.repository.isUnlocked},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasAnyCredentials",{get:function(){return this.repository.hasAnyCredentials},enumerable:!1,configurable:!0}),u.prototype.unlock=function(c){return f(this,void 0,void 0,function(){var s;return b(this,function(l){switch(l.label){case 0:if(c.method!=="password")return[2,!1];if(!c.password)return d.error("Password required for unlock"),[2,!1];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.repository.unlock(c)];case 2:return l.sent(),[2,!0];case 3:return s=l.sent(),d.error("Unlock failed:",s),[2,!1];case 4:return[2]}})})},u.prototype.getCredential=function(c){return f(this,void 0,void 0,function(){var s;return b(this,function(l){switch(l.label){case 0:if(!this.isUnlocked)return d.warn("Cannot get credential - not unlocked"),[2,void 0];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.repository.getCredential(c)];case 2:return[2,l.sent()];case 3:return s=l.sent(),d.error("Failed to get credential ".concat(c,":"),s),[2,void 0];case 4:return[2]}})})},u.prototype.setCredential=function(c,s){return f(this,void 0,void 0,function(){var l;return b(this,function(g){switch(g.label){case 0:if(!this.isUnlocked)return d.warn("Cannot set credential - not unlocked"),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,this.repository.setCredential(c,s)];case 2:return g.sent(),[3,4];case 3:throw l=g.sent(),d.error("Failed to set credential ".concat(c,":"),l),l;case 4:return[2]}})})},u.prototype.clear=function(){this.repository.clear()},u})();i.PasswordStrategy=h},9792(n,i,a){"use strict";var f=this&&this.__awaiter||function(u,c,s,l){return new(s||(s=Promise))(function(g,w){function y(C){try{m(l.next(C))}catch(E){w(E)}}function v(C){try{m(l.throw(C))}catch(E){w(E)}}function m(C){var E;C.done?g(C.value):(E=C.value,E instanceof s?E:new s(function(O){O(E)})).then(y,v)}m((l=l.apply(u,c||[])).next())})},b=this&&this.__generator||function(u,c){var s,l,g,w={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]},y=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return y.next=v(0),y.throw=v(1),y.return=v(2),typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function v(m){return function(C){return(function(E){if(s)throw new TypeError("Generator is already executing.");for(;y&&(y=0,E[0]&&(w=0)),w;)try{if(s=1,l&&(g=2&E[0]?l.return:E[0]?l.throw||((g=l.return)&&g.call(l),0):l.next)&&!(g=g.call(l,E[1])).done)return g;switch(l=0,g&&(E=[2&E[0],g.value]),E[0]){case 0:case 1:g=E;break;case 4:return w.label++,{value:E[1],done:!1};case 5:w.label++,l=E[1],E=[0];continue;case 7:E=w.ops.pop(),w.trys.pop();continue;default:if(!((g=(g=w.trys).length>0&&g[g.length-1])||E[0]!==6&&E[0]!==2)){w=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){w.label=E[1];break}if(E[0]===6&&w.label<g[1]){w.label=g[1],g=E;break}if(g&&w.label<g[2]){w.label=g[2],w.ops.push(E);break}g[2]&&w.ops.pop(),w.trys.pop();continue}E=c.call(u,w)}catch(O){E=[6,O],l=0}finally{s=g=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}})([m,C])}}},o=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(i,"__esModule",{value:!0}),i.SessionCoordinator=void 0;var p=o(a(5673)),d=(0,a(9764).createLogger)("SessionCoordinator"),h=(function(){function u(c){c&&(this.sessionManager=c,this.refreshManager=new p.default(c))}return Object.defineProperty(u.prototype,"hasActiveSession",{get:function(){return!!this.sessionManager&&this.sessionManager.hasActiveSession},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSessionAvailable",{get:function(){return!!this.sessionManager},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"sessionExpiry",{get:function(){if(this.sessionManager){var c=this.sessionManager.sessionTimeRemaining;return c>0?new Date(Date.now()+c):void 0}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isAutoRefreshActive",{get:function(){var c,s;return(s=(c=this.refreshManager)===null||c===void 0?void 0:c.isActive())!==null&&s!==void 0&&s},enumerable:!1,configurable:!0}),u.prototype.getSessionManager=function(){return this.sessionManager},u.prototype.clearSession=function(){this.sessionManager&&(this.stopRefreshManager(),this.sessionManager.clearSession(),d.info("Session cleared"))},u.prototype.canAutoRestore=function(){return f(this,void 0,void 0,function(){return b(this,function(c){return this.sessionManager&&this.sessionManager.canAutoRestore?[2,this.sessionManager.hasValidSession()]:[2,!1]})})},u.prototype.tryAutoRestore=function(){return f(this,void 0,void 0,function(){var c,s;return b(this,function(l){switch(l.label){case 0:if(!this.sessionManager)return[2,void 0];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.sessionManager.restoreSession()];case 2:return(c=l.sent())&&this.startRefreshManager(),[2,c];case 3:return s=l.sent(),d.error("Session auto-restoration error:",s),[2,void 0];case 4:return[2]}})})},u.prototype.createSession=function(c){return f(this,void 0,void 0,function(){var s;return b(this,function(l){switch(l.label){case 0:if(!this.sessionManager)return d.warn("No session manager available - skipping session creation"),[2];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.sessionManager.createSession(c)];case 2:return l.sent(),this.startRefreshManager(),[3,4];case 3:throw s=l.sent(),d.error("Failed to create session:",s),s;case 4:return[2]}})})},u.prototype.refreshSession=function(){return f(this,void 0,void 0,function(){return b(this,function(c){return this.sessionManager?[2,this.sessionManager.refreshSession()]:[2,!1]})})},u.prototype.getTimeRemaining=function(){return f(this,void 0,void 0,function(){return b(this,function(c){return this.sessionManager?[2,this.sessionManager.sessionTimeRemaining]:[2,0]})})},u.prototype.startRefreshManager=function(){var c;!((c=this.sessionManager)===null||c===void 0)&&c.config.enableActivityRefresh&&this.refreshManager&&!this.refreshManager.isActive()&&(this.refreshManager.start(),d.info("Automatic session refresh started"))},u.prototype.stopRefreshManager=function(){this.refreshManager&&this.refreshManager.isActive()&&(this.refreshManager.stop(),d.info("Automatic session refresh stopped"))},u})();i.SessionCoordinator=h},3581(n,i,a){"use strict";var f=this&&this.__awaiter||function(d,h,u,c){return new(u||(u=Promise))(function(s,l){function g(v){try{y(c.next(v))}catch(m){l(m)}}function w(v){try{y(c.throw(v))}catch(m){l(m)}}function y(v){var m;v.done?s(v.value):(m=v.value,m instanceof u?m:new u(function(C){C(m)})).then(g,w)}y((c=c.apply(d,h||[])).next())})},b=this&&this.__generator||function(d,h){var u,c,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},g=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return g.next=w(0),g.throw=w(1),g.return=w(2),typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function w(y){return function(v){return(function(m){if(u)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(l=0)),l;)try{if(u=1,c&&(s=2&m[0]?c.return:m[0]?c.throw||((s=c.return)&&s.call(c),0):c.next)&&!(s=s.call(c,m[1])).done)return s;switch(c=0,s&&(m=[2&m[0],s.value]),m[0]){case 0:case 1:s=m;break;case 4:return l.label++,{value:m[1],done:!1};case 5:l.label++,c=m[1],m=[0];continue;case 7:m=l.ops.pop(),l.trys.pop();continue;default:if(!((s=(s=l.trys).length>0&&s[s.length-1])||m[0]!==6&&m[0]!==2)){l=0;continue}if(m[0]===3&&(!s||m[1]>s[0]&&m[1]<s[3])){l.label=m[1];break}if(m[0]===6&&l.label<s[1]){l.label=s[1],s=m;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(m);break}s[2]&&l.ops.pop(),l.trys.pop();continue}m=h.call(d,l)}catch(C){m=[6,C],c=0}finally{u=s=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([y,v])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.SessionStrategy=void 0;var o=(0,a(9764).createLogger)("SessionStrategy"),p=(function(){function d(h){this.sessionManager=h,this.method="session"}return Object.defineProperty(d.prototype,"isSupported",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUnlocked",{get:function(){return this.sessionManager.hasActiveSession},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hasAnyCredentials",{get:function(){return this.sessionManager.hasActiveSession},enumerable:!1,configurable:!0}),d.prototype.clear=function(){this.sessionManager.clearSession()},d.prototype.unlock=function(h){return f(this,void 0,void 0,function(){var u;return b(this,function(c){switch(c.label){case 0:if(h.method!=="session")return[2,!1];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.sessionManager.restoreSession()];case 2:return[2,!!c.sent()];case 3:return u=c.sent(),o.error("Session restore failed:",u),[2,!1];case 4:return[2]}})})},d.prototype.canAutoRestore=function(){return f(this,void 0,void 0,function(){return b(this,function(h){switch(h.label){case 0:return this.sessionManager.canAutoRestore?[4,this.sessionManager.hasValidSession()]:[2,!1];case 1:return[2,h.sent()]}})})},d.prototype.getCredential=function(h){return f(this,void 0,void 0,function(){var u,c;return b(this,function(s){switch(s.label){case 0:if(!this.isUnlocked)return o.warn("Cannot get credential - no active session"),[2,void 0];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.sessionManager.restoreSession()];case 2:return(u=s.sent())&&h in u?[2,u[h].toString()]:[2,void 0];case 3:return c=s.sent(),o.error("Failed to get credential ".concat(h,":"),c),[2,void 0];case 4:return[2]}})})},d.prototype.setCredential=function(h,u){return f(this,void 0,void 0,function(){return b(this,function(c){throw o.warn("setCredential(".concat(h,") not supported - use createSession() instead")),new Error("SessionStrategy does not support direct credential storage")})})},d})();i.SessionStrategy=p},8348(n,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.StrategyManager=void 0;var f=a(9764),b=a(9389),o=a(8562),p=a(3581),d=(0,f.createLogger)("StrategyManager"),h=(function(){function u(c,s){this.strategies=new Map,this.registerStrategies(c,s)}return Object.defineProperty(u.prototype,"hasAnyCredentials",{get:function(){return Array.from(this.strategies.entries()).some(function(c){var s=c[0],l=c[1];return s!=="session"&&l.hasAnyCredentials})},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"preferredMethod",{get:function(){var c,s=this.strategies.get("session");if(s?.hasAnyCredentials||s?.isUnlocked)return"session";var l=this.strategies.get("passkey");if(l?.isSupported&&(!((c=l.hasStoredAuthData)===null||c===void 0)&&c.call(l)))return"passkey";var g=this.strategies.get("password");return g?.hasAnyCredentials,"password"},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"supportedMethods",{get:function(){var c=[];return Array.from(this.strategies.entries()).forEach(function(s){var l=s[0];s[1].isSupported&&c.push(l)}),c},enumerable:!1,configurable:!0}),u.prototype.getStrategy=function(c){return this.strategies.get(c)},u.prototype.clearAll=function(){this.strategies.forEach(function(c){return c.clear()}),d.info("Cleared all strategies")},u.prototype.registerStrategies=function(c,s){var l=c.namespace||"default";if(this.strategies.set("password",new o.PasswordStrategy(l)),c.allowPasskeys){var g=c.passkeyDisplayName||"LNC User (".concat(l,")");this.strategies.set("passkey",new b.PasskeyStrategy(l,g))}s&&this.strategies.set("session",new p.SessionStrategy(s)),d.info("Registered strategies: ".concat(Array.from(this.strategies.keys()).join(", ")))},u})();i.StrategyManager=h},6482(n,i){"use strict";var a=this&&this.__awaiter||function(b,o,p,d){return new(p||(p=Promise))(function(h,u){function c(g){try{l(d.next(g))}catch(w){u(w)}}function s(g){try{l(d.throw(g))}catch(w){u(w)}}function l(g){var w;g.done?h(g.value):(w=g.value,w instanceof p?w:new p(function(y){y(w)})).then(c,s)}l((d=d.apply(b,o||[])).next())})},f=this&&this.__generator||function(b,o){var p,d,h,u={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]},c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=s(0),c.throw=s(1),c.return=s(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(l){return function(g){return(function(w){if(p)throw new TypeError("Generator is already executing.");for(;c&&(c=0,w[0]&&(u=0)),u;)try{if(p=1,d&&(h=2&w[0]?d.return:w[0]?d.throw||((h=d.return)&&h.call(d),0):d.next)&&!(h=h.call(d,w[1])).done)return h;switch(d=0,h&&(w=[2&w[0],h.value]),w[0]){case 0:case 1:h=w;break;case 4:return u.label++,{value:w[1],done:!1};case 5:u.label++,d=w[1],w=[0];continue;case 7:w=u.ops.pop(),u.trys.pop();continue;default:if(!((h=(h=u.trys).length>0&&h[h.length-1])||w[0]!==6&&w[0]!==2)){u=0;continue}if(w[0]===3&&(!h||w[1]>h[0]&&w[1]<h[3])){u.label=w[1];break}if(w[0]===6&&u.label<h[1]){u.label=h[1],h=w;break}if(h&&u.label<h[2]){u.label=h[2],u.ops.push(w);break}h[2]&&u.ops.pop(),u.trys.pop();continue}w=o.call(b,u)}catch(y){w=[6,y],d=0}finally{p=h=0}if(5&w[0])throw w[1];return{value:w[0]?w[1]:void 0,done:!0}})([l,g])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.waitFor=function(b,o){return a(this,void 0,void 0,function(){return f(this,function(p){return[2,new Promise(function(d,h){var u=0,c=setInterval(function(){u++,b()?(clearInterval(c),d()):u>20&&(clearInterval(c),h(new Error(o)))},500)})]})})}},5820(n,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var f=a(5105),b="lnc-web",o=(function(){function p(d,h){this.persisted={salt:"",cipher:"",serverHost:"",localKey:"",remoteKey:"",pairingPhrase:""},this._localKey="",this._remoteKey="",this._pairingPhrase="",this.namespace="default",d&&(this.namespace=d),this._load(),h&&(this.password=h)}return Object.defineProperty(p.prototype,"password",{get:function(){return this._password||""},set:function(d){if(this.persisted.cipher){var h=this.persisted,u=h.cipher,c=h.salt;if(!(0,f.verifyTestCipher)(u,d,c))throw new Error("The password provided is not valid");this._password=d,this._pairingPhrase=this._decrypt(this.persisted.pairingPhrase),this._localKey=this._decrypt(this.persisted.localKey),this._remoteKey=this._decrypt(this.persisted.remoteKey)}else this._password=d,this.persisted.salt=(0,f.generateSalt)(),this.persisted.cipher=(0,f.createTestCipher)(d,this.persisted.salt),this.pairingPhrase&&(this.persisted.pairingPhrase=this._encrypt(this.pairingPhrase)),this.localKey&&(this.persisted.localKey=this._encrypt(this.localKey)),this.remoteKey&&(this.persisted.remoteKey=this._encrypt(this.remoteKey)),this._save(),this.clear(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"serverHost",{get:function(){return this.persisted.serverHost},set:function(d){this.persisted.serverHost=d,this._save()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"pairingPhrase",{get:function(){return this._pairingPhrase},set:function(d){this._pairingPhrase=d,this._password&&(this.persisted.pairingPhrase=this._encrypt(d),this._save())},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"localKey",{get:function(){return this._localKey},set:function(d){this._localKey=d,this._password&&(this.persisted.localKey=this._encrypt(d),this._save())},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"remoteKey",{get:function(){return this._remoteKey},set:function(d){this._remoteKey=d,this._password&&(this.persisted.remoteKey=this._encrypt(d),this._save())},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isPaired",{get:function(){return!!this.persisted.remoteKey||!!this.persisted.pairingPhrase},enumerable:!1,configurable:!0}),p.prototype.clear=function(d){if(!d){var h="".concat(b,":").concat(this.namespace);localStorage.removeItem(h),this.persisted={salt:"",cipher:"",serverHost:this.persisted.serverHost,localKey:"",remoteKey:"",pairingPhrase:""}}this._localKey="",this._remoteKey="",this._pairingPhrase="",this._password=void 0},p.prototype._load=function(){if(typeof localStorage<"u")try{var d="".concat(b,":").concat(this.namespace),h=localStorage.getItem(d);if(!h)return;this.persisted=JSON.parse(h)}catch(c){var u=c.message;throw new Error("Failed to load secure data: ".concat(u))}},p.prototype._save=function(){if(typeof localStorage<"u"){var d="".concat(b,":").concat(this.namespace);localStorage.setItem(d,JSON.stringify(this.persisted))}},p.prototype._encrypt=function(d){return d&&this._password?(0,f.encrypt)(d,this._password,this.persisted.salt):""},p.prototype._decrypt=function(d){return d&&this._password?(0,f.decrypt)(d,this._password,this.persisted.salt):""},p})();i.default=o},1389(n,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.arrayBufferToBase64=function(a){for(var f=new Uint8Array(a),b="",o=0;o<f.byteLength;o++)b+=String.fromCharCode(f[o]);return btoa(b)},i.base64ToArrayBuffer=function(a){for(var f=a.replace(/-/g,"+").replace(/_/g,"/"),b=f.padEnd(f.length+(4-f.length%4)%4,"="),o=atob(b),p=new Uint8Array(o.length),d=0;d<o.length;d++)p[d]=o.charCodeAt(d);return p.buffer},i.arrayBufferToHex=function(a){return Array.from(new Uint8Array(a)).map(function(f){return f.toString(16).padStart(2,"0")}).join("")}},5105(n,i,a){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.verifyTestCipher=i.createTestCipher=i.decrypt=i.encrypt=i.generateSalt=void 0;var f=a(1396),b="Irrelevant data for password verification";i.generateSalt=function(){var o=new Uint8Array(32);globalThis.crypto.getRandomValues(o);var p=Array.from(o,function(d){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charCodeAt(d%62)});return String.fromCharCode.apply(String,p)},i.encrypt=function(o,p,d){return f.AES.encrypt(JSON.stringify(o),p+d).toString()},i.decrypt=function(o,p,d){var h=f.AES.decrypt(o,p+d);return JSON.parse(h.toString(f.enc.Utf8))},i.createTestCipher=function(o,p){return(0,i.encrypt)(b,o,p)},i.verifyTestCipher=function(o,p,d){try{return(0,i.decrypt)(o,p,d)===b}catch{return!1}}},9764(n,i,a){"use strict";var f=this&&this.__spreadArray||function(h,u,c){if(c||arguments.length===2)for(var s,l=0,g=u.length;l<g;l++)!s&&l in u||(s||(s=Array.prototype.slice.call(u,0,l)),s[l]=u[l]);return h.concat(s||Array.prototype.slice.call(u))},b=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(i,"__esModule",{value:!0}),i.wasmLog=i.log=i.Logger=i.LogLevel=void 0,i.createLogger=function(h){return d.fromEnv(h)};var o,p=b(a(7833));(function(h){h[h.debug=1]="debug",h[h.info=2]="info",h[h.warn=3]="warn",h[h.error=4]="error",h[h.none=5]="none"})(o||(i.LogLevel=o={}));var d=(function(){function h(u,c){var s=this;this.debug=function(l){for(var g=[],w=1;w<arguments.length;w++)g[w-1]=arguments[w];return s._log(o.debug,l,g)},this.info=function(l){for(var g=[],w=1;w<arguments.length;w++)g[w-1]=arguments[w];return s._log(o.info,l,g)},this.warn=function(l){for(var g=[],w=1;w<arguments.length;w++)g[w-1]=arguments[w];return s._log(o.warn,l,g)},this.error=function(l){for(var g=[],w=1;w<arguments.length;w++)g[w-1]=arguments[w];return s._log(o.error,l,g)},this._levelToOutput=u,this._logger=(0,p.default)(c)}return Object.defineProperty(h.prototype,"level",{get:function(){return this._levelToOutput},enumerable:!1,configurable:!0}),h.fromEnv=function(u){var c=o.none;if(globalThis.localStorage&&globalThis.localStorage.getItem("debug")){var s=globalThis.localStorage.getItem("debug-level")||"debug";c=o[s]}return new h(c,u)},h.prototype._log=function(u,c,s){if(!(this._levelToOutput>u)){var l=Object.keys(o).reduce(function(g,w){return u===o[w]?w:g},"??");this._logger.apply(this,f(["[".concat(l,"] ").concat(c)],s,!1))}},h})();i.Logger=d,i.log=d.fromEnv("main"),i.wasmLog=d.fromEnv("wasm")},254(n,i,a){"use strict";var f=this&&this.__assign||function(){return f=Object.assign||function(s){for(var l,g=1,w=arguments.length;g<w;g++)for(var y in l=arguments[g])Object.prototype.hasOwnProperty.call(l,y)&&(s[y]=l[y]);return s},f.apply(this,arguments)},b=this&&this.__awaiter||function(s,l,g,w){return new(g||(g=Promise))(function(y,v){function m(O){try{E(w.next(O))}catch(_){v(_)}}function C(O){try{E(w.throw(O))}catch(_){v(_)}}function E(O){var _;O.done?y(O.value):(_=O.value,_ instanceof g?_:new g(function(S){S(_)})).then(m,C)}E((w=w.apply(s,l||[])).next())})},o=this&&this.__generator||function(s,l){var g,w,y,v={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]},m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=C(0),m.throw=C(1),m.return=C(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function C(E){return function(O){return(function(_){if(g)throw new TypeError("Generator is already executing.");for(;m&&(m=0,_[0]&&(v=0)),v;)try{if(g=1,w&&(y=2&_[0]?w.return:_[0]?w.throw||((y=w.return)&&y.call(w),0):w.next)&&!(y=y.call(w,_[1])).done)return y;switch(w=0,y&&(_=[2&_[0],y.value]),_[0]){case 0:case 1:y=_;break;case 4:return v.label++,{value:_[1],done:!1};case 5:v.label++,w=_[1],_=[0];continue;case 7:_=v.ops.pop(),v.trys.pop();continue;default:if(!((y=(y=v.trys).length>0&&y[y.length-1])||_[0]!==6&&_[0]!==2)){v=0;continue}if(_[0]===3&&(!y||_[1]>y[0]&&_[1]<y[3])){v.label=_[1];break}if(_[0]===6&&v.label<y[1]){v.label=y[1],y=_;break}if(y&&v.label<y[2]){v.label=y[2],v.ops.push(_);break}y[2]&&v.ops.pop(),v.trys.pop();continue}_=l.call(s,v)}catch(S){_=[6,S],w=0}finally{g=y=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}})([E,O])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.WasmManager=i.lncGlobal=void 0;var p=a(3318),d=a(6482),h=a(9764);i.lncGlobal=globalThis;var u={wasmClientIsReady:function(){return!1},wasmClientIsConnected:function(){return!1},wasmClientConnectServer:function(){throw new Error("WASM client not initialized")},wasmClientDisconnect:function(){throw new Error("WASM client not initialized")},wasmClientInvokeRPC:function(){throw new Error("WASM client not initialized")},wasmClientHasPerms:function(){return!1},wasmClientIsReadOnly:function(){return!1},wasmClientStatus:function(){return"uninitialized"},wasmClientGetExpiry:function(){return 0}},c=(function(){function s(l,g,w){this._namespace=l,this._wasmClientCode=g,this._callbacks=w,this.go=new i.lncGlobal.Go}return Object.defineProperty(s.prototype,"wasm",{get:function(){return i.lncGlobal[this._namespace]},set:function(l){i.lncGlobal[this._namespace]=l},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isReady",{get:function(){return this.wasm&&this.wasm.wasmClientIsReady&&this.wasm.wasmClientIsReady()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isConnected",{get:function(){return this.wasm&&this.wasm.wasmClientIsConnected&&this.wasm.wasmClientIsConnected()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"status",{get:function(){return this.wasm&&this.wasm.wasmClientStatus&&this.wasm.wasmClientStatus()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"expiry",{get:function(){return this.wasm&&this.wasm.wasmClientGetExpiry&&new Date(1e3*this.wasm.wasmClientGetExpiry())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isReadOnly",{get:function(){return this.wasm&&this.wasm.wasmClientIsReadOnly&&this.wasm.wasmClientIsReadOnly()},enumerable:!1,configurable:!0}),s.prototype.hasPerms=function(l){return this.wasm&&this.wasm.wasmClientHasPerms&&this.wasm.wasmClientHasPerms(l)},s.prototype.preload=function(){return b(this,void 0,void 0,function(){var l;return o(this,function(g){switch(g.label){case 0:return this._preloadPromise?[4,this._preloadPromise]:[3,2];case 1:return g.sent(),[2];case 2:return this._preloadPromise=WebAssembly.instantiateStreaming(fetch(this._wasmClientCode),this.go.importObject),l=this,[4,this._preloadPromise];case 3:return l.result=g.sent(),h.wasmLog.info("downloaded WASM file"),[2]}})})},s.prototype.run=function(){return b(this,void 0,void 0,function(){return o(this,function(l){switch(l.label){case 0:return this.isReady?[3,2]:[4,this.preload()];case 1:l.sent(),l.label=2;case 2:return typeof this.wasm!="object"&&(this.wasm=f({},u)),this.setupWasmCallbacks(),this.go.argv=["wasm-client","--debuglevel=debug,GOBN=info,GRPC=info","--namespace="+this._namespace,"--onlocalprivcreate=".concat(this._namespace,".onLocalPrivCreate"),"--onremotekeyreceive=".concat(this._namespace,".onRemoteKeyReceive"),"--onauthdata=".concat(this._namespace,".onAuthData")],this.result?(this.go.run(this.result.instance),[4,WebAssembly.instantiate(this.result.module,this.go.importObject)]):[3,4];case 3:return l.sent(),[3,5];case 4:throw new Error("Can't find WASM instance.");case 5:return[2]}})})},s.prototype.waitTilReady=function(){return b(this,void 0,void 0,function(){var l=this;return o(this,function(g){switch(g.label){case 0:return[4,(0,d.waitFor)(function(){return l.isReady},"Failed to load the WASM client")];case 1:return g.sent(),h.wasmLog.info("The WASM client is ready"),[2]}})})},s.prototype.connect=function(l){return b(this,void 0,void 0,function(){var g,w,y,v;return o(this,function(m){switch(m.label){case 0:return this.isConnected?[2]:this.isReady?[3,3]:[4,this.run()];case 1:return m.sent(),[4,this.waitTilReady()];case 2:m.sent(),m.label=3;case 3:return g=l.pairingPhrase,w=l.localKey,y=l.remoteKey,v=l.serverHost,this.wasm.wasmClientConnectServer(v,!1,g,w??"",y??""),typeof window<"u"?window.addEventListener("unload",this.wasm.wasmClientDisconnect):h.wasmLog.info("No unload event listener added. window is not available"),[4,this.waitForConnection()];case 4:return m.sent(),[2]}})})},s.prototype.disconnect=function(){typeof window<"u"&&window.removeEventListener("unload",this.wasm.wasmClientDisconnect),this.wasm.wasmClientDisconnect()},s.prototype.request=function(l,g){var w=this;return new Promise(function(y,v){h.wasmLog.debug("".concat(l," request"),g);var m=JSON.stringify(g||{});w.wasm.wasmClientInvokeRPC(l,m,function(C){try{var E=JSON.parse(C),O=(0,p.snakeKeysToCamel)(E);h.wasmLog.debug("".concat(l," response"),O),y(O)}catch(_){h.wasmLog.debug("".concat(l," parser error"),{response:C,error:_}),v(new Error(C))}})})},s.prototype.subscribe=function(l,g,w,y){h.wasmLog.debug("".concat(l," request"),g);var v=JSON.stringify(g||{});this.wasm.wasmClientInvokeRPC(l,v,function(m){try{var C=JSON.parse(m),E=(0,p.snakeKeysToCamel)(C);h.wasmLog.debug("".concat(l," response"),E),w&&w(E)}catch(_){h.wasmLog.debug("".concat(l," error"),_);var O=new Error(m);y&&y(O)}})},s.prototype.setupWasmCallbacks=function(){var l=this;this.wasm.onLocalPrivCreate||(this.wasm.onLocalPrivCreate=function(g){l._callbacks.onLocalKeyCreated(g)}),this.wasm.onRemoteKeyReceive||(this.wasm.onRemoteKeyReceive=function(g){l._callbacks.onRemoteKeyReceived(g)}),this.wasm.onAuthData||(this.wasm.onAuthData=function(g){h.wasmLog.debug("auth data received: "+g)})},s.prototype.waitForConnection=function(){return b(this,void 0,void 0,function(){var l=this;return o(this,function(g){switch(g.label){case 0:return[4,(0,d.waitFor)(function(){return l.isConnected},"Failed to connect the WASM client to the proxy server")];case 1:return g.sent(),h.wasmLog.info("The WASM client is connected to the server"),[2]}})})},s})();i.WasmManager=c},1135(n){n.exports=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}},9032(n,i,a){"use strict";var f=a(7244),b=a(8184),o=a(5767),p=a(5680);function d(P){return P.call.bind(P)}var h=typeof BigInt<"u",u=typeof Symbol<"u",c=d(Object.prototype.toString),s=d(Number.prototype.valueOf),l=d(String.prototype.valueOf),g=d(Boolean.prototype.valueOf);if(h)var w=d(BigInt.prototype.valueOf);if(u)var y=d(Symbol.prototype.valueOf);function v(P,B){if(typeof P!="object")return!1;try{return B(P),!0}catch{return!1}}function m(P){return c(P)==="[object Map]"}function C(P){return c(P)==="[object Set]"}function E(P){return c(P)==="[object WeakMap]"}function O(P){return c(P)==="[object WeakSet]"}function _(P){return c(P)==="[object ArrayBuffer]"}function S(P){return typeof ArrayBuffer<"u"&&(_.working?_(P):P instanceof ArrayBuffer)}function R(P){return c(P)==="[object DataView]"}function A(P){return typeof DataView<"u"&&(R.working?R(P):P instanceof DataView)}i.isArgumentsObject=f,i.isGeneratorFunction=b,i.isTypedArray=p,i.isPromise=function(P){return typeof Promise<"u"&&P instanceof Promise||P!==null&&typeof P=="object"&&typeof P.then=="function"&&typeof P.catch=="function"},i.isArrayBufferView=function(P){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(P):p(P)||A(P)},i.isUint8Array=function(P){return o(P)==="Uint8Array"},i.isUint8ClampedArray=function(P){return o(P)==="Uint8ClampedArray"},i.isUint16Array=function(P){return o(P)==="Uint16Array"},i.isUint32Array=function(P){return o(P)==="Uint32Array"},i.isInt8Array=function(P){return o(P)==="Int8Array"},i.isInt16Array=function(P){return o(P)==="Int16Array"},i.isInt32Array=function(P){return o(P)==="Int32Array"},i.isFloat32Array=function(P){return o(P)==="Float32Array"},i.isFloat64Array=function(P){return o(P)==="Float64Array"},i.isBigInt64Array=function(P){return o(P)==="BigInt64Array"},i.isBigUint64Array=function(P){return o(P)==="BigUint64Array"},m.working=typeof Map<"u"&&m(new Map),i.isMap=function(P){return typeof Map<"u"&&(m.working?m(P):P instanceof Map)},C.working=typeof Set<"u"&&C(new Set),i.isSet=function(P){return typeof Set<"u"&&(C.working?C(P):P instanceof Set)},E.working=typeof WeakMap<"u"&&E(new WeakMap),i.isWeakMap=function(P){return typeof WeakMap<"u"&&(E.working?E(P):P instanceof WeakMap)},O.working=typeof WeakSet<"u"&&O(new WeakSet),i.isWeakSet=function(P){return O(P)},_.working=typeof ArrayBuffer<"u"&&_(new ArrayBuffer),i.isArrayBuffer=S,R.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&R(new DataView(new ArrayBuffer(1),0,1)),i.isDataView=A;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function N(P){return c(P)==="[object SharedArrayBuffer]"}function x(P){return T!==void 0&&(N.working===void 0&&(N.working=N(new T)),N.working?N(P):P instanceof T)}function I(P){return v(P,s)}function L(P){return v(P,l)}function H(P){return v(P,g)}function Z(P){return h&&v(P,w)}function K(P){return u&&v(P,y)}i.isSharedArrayBuffer=x,i.isAsyncFunction=function(P){return c(P)==="[object AsyncFunction]"},i.isMapIterator=function(P){return c(P)==="[object Map Iterator]"},i.isSetIterator=function(P){return c(P)==="[object Set Iterator]"},i.isGeneratorObject=function(P){return c(P)==="[object Generator]"},i.isWebAssemblyCompiledModule=function(P){return c(P)==="[object WebAssembly.Module]"},i.isNumberObject=I,i.isStringObject=L,i.isBooleanObject=H,i.isBigIntObject=Z,i.isSymbolObject=K,i.isBoxedPrimitive=function(P){return I(P)||L(P)||H(P)||Z(P)||K(P)},i.isAnyArrayBuffer=function(P){return typeof Uint8Array<"u"&&(S(P)||x(P))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(P){Object.defineProperty(i,P,{enumerable:!1,value:function(){throw new Error(P+" is not supported in userland")}})})},537(n,i,a){var f=a(5606),b=a(6763),o=Object.getOwnPropertyDescriptors||function(P){for(var B=Object.keys(P),G={},V=0;V<B.length;V++)G[B[V]]=Object.getOwnPropertyDescriptor(P,B[V]);return G},p=/%[sdj%]/g;i.format=function(P){if(!O(P)){for(var B=[],G=0;G<arguments.length;G++)B.push(c(arguments[G]));return B.join(" ")}G=1;for(var V=arguments,z=V.length,U=String(P).replace(p,function(D){if(D==="%%")return"%";if(G>=z)return D;switch(D){case"%s":return String(V[G++]);case"%d":return Number(V[G++]);case"%j":try{return JSON.stringify(V[G++])}catch{return"[Circular]"}default:return D}}),F=V[G];G<z;F=V[++G])C(F)||!R(F)?U+=" "+F:U+=" "+c(F);return U},i.deprecate=function(P,B){if(f!==void 0&&f.noDeprecation===!0)return P;if(f===void 0)return function(){return i.deprecate(P,B).apply(this,arguments)};var G=!1;return function(){if(!G){if(f.throwDeprecation)throw new Error(B);f.traceDeprecation?b.trace(B):b.error(B),G=!0}return P.apply(this,arguments)}};var d={},h=/^$/;if(f.env.NODE_DEBUG){var u=f.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),h=new RegExp("^"+u+"$","i")}function c(P,B){var G={seen:[],stylize:l};return arguments.length>=3&&(G.depth=arguments[2]),arguments.length>=4&&(G.colors=arguments[3]),m(B)?G.showHidden=B:B&&i._extend(G,B),_(G.showHidden)&&(G.showHidden=!1),_(G.depth)&&(G.depth=2),_(G.colors)&&(G.colors=!1),_(G.customInspect)&&(G.customInspect=!0),G.colors&&(G.stylize=s),g(G,P,G.depth)}function s(P,B){var G=c.styles[B];return G?"\x1B["+c.colors[G][0]+"m"+P+"\x1B["+c.colors[G][1]+"m":P}function l(P,B){return P}function g(P,B,G){if(P.customInspect&&B&&N(B.inspect)&&B.inspect!==i.inspect&&(!B.constructor||B.constructor.prototype!==B)){var V=B.inspect(G,P);return O(V)||(V=g(P,V,G)),V}var z=(function(W,Y){if(_(Y))return W.stylize("undefined","undefined");if(O(Y)){var Q="'"+JSON.stringify(Y).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(Q,"string")}return E(Y)?W.stylize(""+Y,"number"):m(Y)?W.stylize(""+Y,"boolean"):C(Y)?W.stylize("null","null"):void 0})(P,B);if(z)return z;var U=Object.keys(B),F=(function(W){var Y={};return W.forEach(function(Q,q){Y[Q]=!0}),Y})(U);if(P.showHidden&&(U=Object.getOwnPropertyNames(B)),T(B)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return w(B);if(U.length===0){if(N(B)){var D=B.name?": "+B.name:"";return P.stylize("[Function"+D+"]","special")}if(S(B))return P.stylize(RegExp.prototype.toString.call(B),"regexp");if(A(B))return P.stylize(Date.prototype.toString.call(B),"date");if(T(B))return w(B)}var k,j="",M=!1,$=["{","}"];return v(B)&&(M=!0,$=["[","]"]),N(B)&&(j=" [Function"+(B.name?": "+B.name:"")+"]"),S(B)&&(j=" "+RegExp.prototype.toString.call(B)),A(B)&&(j=" "+Date.prototype.toUTCString.call(B)),T(B)&&(j=" "+w(B)),U.length!==0||M&&B.length!=0?G<0?S(B)?P.stylize(RegExp.prototype.toString.call(B),"regexp"):P.stylize("[Object]","special"):(P.seen.push(B),k=M?(function(W,Y,Q,q,te){for(var ie=[],ae=0,ue=Y.length;ae<ue;++ae)H(Y,String(ae))?ie.push(y(W,Y,Q,q,String(ae),!0)):ie.push("");return te.forEach(function(le){le.match(/^\d+$/)||ie.push(y(W,Y,Q,q,le,!0))}),ie})(P,B,G,F,U):U.map(function(W){return y(P,B,G,F,W,M)}),P.seen.pop(),(function(W,Y,Q){return W.reduce(function(q,te){return te.indexOf(`
`),q+te.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Q[0]+(Y===""?"":Y+`
`)+" "+W.join(`,
`)+" "+Q[1]:Q[0]+Y+" "+W.join(", ")+" "+Q[1]})(k,j,$)):$[0]+j+$[1]}function w(P){return"["+Error.prototype.toString.call(P)+"]"}function y(P,B,G,V,z,U){var F,D,k;if((k=Object.getOwnPropertyDescriptor(B,z)||{value:B[z]}).get?D=k.set?P.stylize("[Getter/Setter]","special"):P.stylize("[Getter]","special"):k.set&&(D=P.stylize("[Setter]","special")),H(V,z)||(F="["+z+"]"),D||(P.seen.indexOf(k.value)<0?(D=C(G)?g(P,k.value,null):g(P,k.value,G-1)).indexOf(`
`)>-1&&(D=U?D.split(`
`).map(function(j){return" "+j}).join(`
`).slice(2):`
`+D.split(`
`).map(function(j){return" "+j}).join(`
`)):D=P.stylize("[Circular]","special")),_(F)){if(U&&z.match(/^\d+$/))return D;(F=JSON.stringify(""+z)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(F=F.slice(1,-1),F=P.stylize(F,"name")):(F=F.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),F=P.stylize(F,"string"))}return F+": "+D}function v(P){return Array.isArray(P)}function m(P){return typeof P=="boolean"}function C(P){return P===null}function E(P){return typeof P=="number"}function O(P){return typeof P=="string"}function _(P){return P===void 0}function S(P){return R(P)&&x(P)==="[object RegExp]"}function R(P){return typeof P=="object"&&P!==null}function A(P){return R(P)&&x(P)==="[object Date]"}function T(P){return R(P)&&(x(P)==="[object Error]"||P instanceof Error)}function N(P){return typeof P=="function"}function x(P){return Object.prototype.toString.call(P)}function I(P){return P<10?"0"+P.toString(10):P.toString(10)}i.debuglog=function(P){if(P=P.toUpperCase(),!d[P])if(h.test(P)){var B=f.pid;d[P]=function(){var G=i.format.apply(i,arguments);b.error("%s %d: %s",P,B,G)}}else d[P]=function(){};return d[P]},i.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},i.types=a(9032),i.isArray=v,i.isBoolean=m,i.isNull=C,i.isNullOrUndefined=function(P){return P==null},i.isNumber=E,i.isString=O,i.isSymbol=function(P){return typeof P=="symbol"},i.isUndefined=_,i.isRegExp=S,i.types.isRegExp=S,i.isObject=R,i.isDate=A,i.types.isDate=A,i.isError=T,i.types.isNativeError=T,i.isFunction=N,i.isPrimitive=function(P){return P===null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||typeof P=="symbol"||P===void 0},i.isBuffer=a(1135);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function H(P,B){return Object.prototype.hasOwnProperty.call(P,B)}i.log=function(){var P,B;b.log("%s - %s",(B=[I((P=new Date).getHours()),I(P.getMinutes()),I(P.getSeconds())].join(":"),[P.getDate(),L[P.getMonth()],B].join(" ")),i.format.apply(i,arguments))},i.inherits=a(6698),i._extend=function(P,B){if(!B||!R(B))return P;for(var G=Object.keys(B),V=G.length;V--;)P[G[V]]=B[G[V]];return P};var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function K(P,B){if(!P){var G=new Error("Promise was rejected with a falsy value");G.reason=P,P=G}return B(P)}i.promisify=function(P){if(typeof P!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&P[Z]){var B;if(typeof(B=P[Z])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,Z,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var G,V,z=new Promise(function(D,k){G=D,V=k}),U=[],F=0;F<arguments.length;F++)U.push(arguments[F]);U.push(function(D,k){D?V(D):G(k)});try{P.apply(this,U)}catch(D){V(D)}return z}return Object.setPrototypeOf(B,Object.getPrototypeOf(P)),Z&&Object.defineProperty(B,Z,{value:B,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(B,o(P))},i.promisify.custom=Z,i.callbackify=function(P){if(typeof P!="function")throw new TypeError('The "original" argument must be of type Function');function B(){for(var G=[],V=0;V<arguments.length;V++)G.push(arguments[V]);var z=G.pop();if(typeof z!="function")throw new TypeError("The last argument must be of type Function");var U=this,F=function(){return z.apply(U,arguments)};P.apply(this,G).then(function(D){f.nextTick(F.bind(null,null,D))},function(D){f.nextTick(K.bind(null,D,F))})}return Object.setPrototypeOf(B,Object.getPrototypeOf(P)),Object.defineProperties(B,o(P)),B}},5767(n,i,a){"use strict";var f=a(2682),b=a(9209),o=a(487),p=a(6556),d=a(5795),h=a(3628),u=p("Object.prototype.toString"),c=a(9092)(),s=typeof globalThis>"u"?a.g:globalThis,l=b(),g=p("String.prototype.slice"),w=p("Array.prototype.indexOf",!0)||function(v,m){for(var C=0;C<v.length;C+=1)if(v[C]===m)return C;return-1},y={__proto__:null};f(l,c&&d&&h?function(v){var m=new s[v];if(Symbol.toStringTag in m&&h){var C=h(m),E=d(C,Symbol.toStringTag);if(!E&&C){var O=h(C);E=d(O,Symbol.toStringTag)}y["$"+v]=o(E.get)}}:function(v){var m=new s[v],C=m.slice||m.set;C&&(y["$"+v]=o(C))}),n.exports=function(v){if(!v||typeof v!="object")return!1;if(!c){var m=g(u(v),8,-1);return w(l,m)>-1?m:m==="Object"&&(function(C){var E=!1;return f(y,function(O,_){if(!E)try{O(C),E=g(_,1)}catch{}}),E})(v)}return d?(function(C){var E=!1;return f(y,function(O,_){if(!E)try{"$"+O(C)===_&&(E=g(_,1))}catch{}}),E})(v):null}},477(){},9209(n,i,a){"use strict";var f=a(6578),b=typeof globalThis>"u"?a.g:globalThis;n.exports=function(){for(var o=[],p=0;p<f.length;p++)typeof b[f[p]]=="function"&&(o[o.length]=f[p]);return o}}},t={};function r(n){var i=t[n];if(i!==void 0)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}return r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),r(4245)})())});var $a={debug(){}};var af=e=>e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),"");function ui(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Bt(e,t=""){if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new Error(`${r}expected integer >= 0, got ${e}`)}}function Te(e,t,r=""){let n=ui(e),i=e?.length,a=t!==void 0;if(!n||a&&i!==t){let f=r&&`"${r}" `,b=a?` of length ${t}`:"",o=n?`length=${i}`:`type=${typeof e}`;throw new Error(f+"expected Uint8Array"+b+", got "+o)}return e}function Zr(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash must wrapped by utils.createHasher");Bt(e.outputLen),Bt(e.blockLen)}function Rr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function cf(e,t){Te(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function Zn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ro(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function wt(e,t){return e<<32-t|e>>>t}var Ga=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",lf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Oe(e){if(Te(e),Ga)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=lf[e[r]];return t}var Tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function wa(e){if(e>=Tt._0&&e<=Tt._9)return e-Tt._0;if(e>=Tt.A&&e<=Tt.F)return e-(Tt.A-10);if(e>=Tt.a&&e<=Tt.f)return e-(Tt.a-10)}function _e(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ga)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,a=0;i<r;i++,a+=2){let f=wa(e.charCodeAt(a)),b=wa(e.charCodeAt(a+1));if(f===void 0||b===void 0){let o=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+o+'" at index '+a)}n[i]=f*16+b}return n}function et(...e){let t=0;for(let n=0;n<e.length;n++){let i=e[n];Te(i),t+=i.length}let r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){let a=e[n];r.set(a,i),i+=a.length}return r}function uf(e,t={}){let r=(i,a)=>e(a).update(i).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>e(i),Object.assign(r,t),Object.freeze(r)}function Nn(e=32){let t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");return t.getRandomValues(new Uint8Array(e))}var hf=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function ff(e,t,r){return e&t^~e&r}function df(e,t,r){return e&t^e&r^t&r}var Wo=class{constructor(t,r,n,i){J(this,"blockLen");J(this,"outputLen");J(this,"padOffset");J(this,"isLE");J(this,"buffer");J(this,"view");J(this,"finished",!1);J(this,"length",0);J(this,"pos",0);J(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(t),this.view=Ro(this.buffer)}update(t){Rr(this),Te(t);let{view:r,buffer:n,blockLen:i}=this,a=t.length;for(let f=0;f<a;){let b=Math.min(i-this.pos,a-f);if(b===i){let o=Ro(t);for(;i<=a-f;f+=i)this.process(o,f);continue}n.set(t.subarray(f,f+b),this.pos),this.pos+=b,f+=b,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Rr(this),cf(t,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:a}=this,{pos:f}=this;r[f++]=128,Zn(this.buffer.subarray(f)),this.padOffset>i-f&&(this.process(n,0),f=0);for(let h=f;h<i;h++)r[h]=0;n.setBigUint64(i-8,BigInt(this.length*8),a),this.process(n,0);let b=Ro(t),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let p=o/4,d=this.get();if(p>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<p;h++)b.setUint32(4*h,d[h],a)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:a,destroyed:f,pos:b}=this;return t.destroyed=f,t.finished=a,t.length=i,t.pos=b,i%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}},kt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pf=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Lt=new Uint32Array(64),Ko=class extends Wo{constructor(t){super(64,t,8,!1)}get(){let{A:t,B:r,C:n,D:i,E:a,F:f,G:b,H:o}=this;return[t,r,n,i,a,f,b,o]}set(t,r,n,i,a,f,b,o){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=f|0,this.G=b|0,this.H=o|0}process(t,r){for(let h=0;h<16;h++,r+=4)Lt[h]=t.getUint32(r,!1);for(let h=16;h<64;h++){let u=Lt[h-15],c=Lt[h-2],s=wt(u,7)^wt(u,18)^u>>>3,l=wt(c,17)^wt(c,19)^c>>>10;Lt[h]=l+Lt[h-7]+s+Lt[h-16]|0}let{A:n,B:i,C:a,D:f,E:b,F:o,G:p,H:d}=this;for(let h=0;h<64;h++){let u=wt(b,6)^wt(b,11)^wt(b,25),c=d+u+ff(b,o,p)+pf[h]+Lt[h]|0,l=(wt(n,2)^wt(n,13)^wt(n,22))+df(n,i,a)|0;d=p,p=o,o=b,b=f+c|0,f=a,a=i,i=n,n=c+l|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,f=f+this.D|0,b=b+this.E|0,o=o+this.F|0,p=p+this.G|0,d=d+this.H|0,this.set(n,i,a,f,b,o,p,d)}roundClean(){Zn(Lt)}destroy(){this.set(0,0,0,0,0,0,0,0),Zn(this.buffer)}},Vo=class extends Ko{constructor(){super(32);J(this,"A",kt[0]|0);J(this,"B",kt[1]|0);J(this,"C",kt[2]|0);J(this,"D",kt[3]|0);J(this,"E",kt[4]|0);J(this,"F",kt[5]|0);J(this,"G",kt[6]|0);J(this,"H",kt[7]|0)}},vt=uf(()=>new Vo,hf(1));var hi=BigInt(0),Zo=BigInt(1);function Ir(e,t=""){if(typeof e!="boolean"){let r=t&&`"${t}" `;throw new Error(r+"expected boolean, got type="+typeof e)}return e}function Wa(e){if(typeof e=="bigint"){if(!Or(e))throw new Error("positive bigint expected, got "+e)}else Bt(e);return e}function _r(e){let t=Wa(e).toString(16);return t.length&1?"0"+t:t}function Ka(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?hi:BigInt("0x"+e)}function qn(e){return Ka(Oe(e))}function Va(e){return Ka(Oe(yf(Te(e)).reverse()))}function fi(e,t){Bt(t),e=Wa(e);let r=_e(e.toString(16).padStart(t*2,"0"));if(r.length!==t)throw new Error("number too large");return r}function Za(e,t){return fi(e,t).reverse()}function yf(e){return Uint8Array.from(e)}function gf(e){return Uint8Array.from(e,(t,r)=>{let n=t.charCodeAt(0);if(t.length!==1||n>127)throw new Error(`string contains non-ASCII character "${e[r]}" with code ${n} at position ${r}`);return n})}var Or=e=>typeof e=="bigint"&&hi<=e;function bf(e,t,r){return Or(e)&&Or(t)&&Or(r)&&t<=e&&e<r}function wf(e,t,r,n){if(!bf(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function mf(e){let t;for(t=0;e>hi;e>>=Zo,t+=1);return t}var di=e=>(Zo<<BigInt(e))-Zo;function vf(e,t,r){if(Bt(e,"hashLen"),Bt(t,"qByteLen"),typeof r!="function")throw new Error("hmacFn must be a function");let n=g=>new Uint8Array(g),i=Uint8Array.of(),a=Uint8Array.of(0),f=Uint8Array.of(1),b=1e3,o=n(e),p=n(e),d=0,h=()=>{o.fill(1),p.fill(0),d=0},u=(...g)=>r(p,et(o,...g)),c=(g=i)=>{p=u(a,g),o=u(),g.length!==0&&(p=u(f,g),o=u())},s=()=>{if(d++>=b)throw new Error("drbg: tried max amount of iterations");let g=0,w=[];for(;g<t;){o=u();let y=o.slice();w.push(y),g+=o.length}return et(...w)};return(g,w)=>{h(),c(g);let y;for(;!(y=w(s()));)c();return h(),y}}function pi(e,t={},r={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function n(a,f,b){let o=e[a];if(b&&o===void 0)return;let p=typeof o;if(p!==f||o===null)throw new Error(`param "${a}" is invalid: expected ${f}, got ${p}`)}let i=(a,f)=>Object.entries(a).forEach(([b,o])=>n(b,o,f));i(t,!1),i(r,!0)}function ma(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(i!==void 0)return i;let a=e(r,...n);return t.set(r,a),a}}var tt=BigInt(0),Qe=BigInt(1),tn=BigInt(2),Ya=BigInt(3),qa=BigInt(4),za=BigInt(5),Ef=BigInt(7),Qa=BigInt(8),_f=BigInt(9),Ja=BigInt(16);function pt(e,t){let r=e%t;return r>=tt?r:t+r}function lt(e,t,r){let n=e;for(;t-- >tt;)n*=n,n%=r;return n}function va(e,t){if(e===tt)throw new Error("invert: expected non-zero number");if(t<=tt)throw new Error("invert: expected positive modulus, got "+t);let r=pt(e,t),n=t,i=tt,a=Qe;for(;r!==tt;){let b=n/r,o=n%r,p=i-a*b;n=r,r=o,i=a,a=p}if(n!==Qe)throw new Error("invert: does not exist");return pt(i,t)}function yi(e,t,r){if(!e.eql(e.sqr(t),r))throw new Error("Cannot find square root")}function Xa(e,t){let r=(e.ORDER+Qe)/qa,n=e.pow(t,r);return yi(e,n,t),n}function Cf(e,t){let r=(e.ORDER-za)/Qa,n=e.mul(t,tn),i=e.pow(n,r),a=e.mul(t,i),f=e.mul(e.mul(a,tn),i),b=e.mul(a,e.sub(f,e.ONE));return yi(e,b,t),b}function Af(e){let t=Yr(e),r=ec(e),n=r(t,t.neg(t.ONE)),i=r(t,n),a=r(t,t.neg(n)),f=(e+Ef)/Ja;return(b,o)=>{let p=b.pow(o,f),d=b.mul(p,n),h=b.mul(p,i),u=b.mul(p,a),c=b.eql(b.sqr(d),o),s=b.eql(b.sqr(h),o);p=b.cmov(p,d,c),d=b.cmov(u,h,s);let l=b.eql(b.sqr(d),o),g=b.cmov(p,d,l);return yi(b,g,o),g}}function ec(e){if(e<Ya)throw new Error("sqrt is not defined for small field");let t=e-Qe,r=0;for(;t%tn===tt;)t/=tn,r++;let n=tn,i=Yr(e);for(;Ea(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Xa;let a=i.pow(n,t),f=(t+Qe)/tn;return function(o,p){if(o.is0(p))return p;if(Ea(o,p)!==1)throw new Error("Cannot find square root");let d=r,h=o.mul(o.ONE,a),u=o.pow(p,t),c=o.pow(p,f);for(;!o.eql(u,o.ONE);){if(o.is0(u))return o.ZERO;let s=1,l=o.sqr(u);for(;!o.eql(l,o.ONE);)if(s++,l=o.sqr(l),s===d)throw new Error("Cannot find square root");let g=Qe<<BigInt(d-s-1),w=o.pow(h,g);d=s,h=o.sqr(w),u=o.mul(u,h),c=o.mul(c,w)}return c}}function Sf(e){return e%qa===Ya?Xa:e%Qa===za?Cf:e%Ja===_f?Af(e):ec(e)}var Tf=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Of(e){let t={ORDER:"bigint",BYTES:"number",BITS:"number"},r=Tf.reduce((n,i)=>(n[i]="function",n),t);return pi(e,r),e}function Nf(e,t,r){if(r<tt)throw new Error("invalid exponent, negatives unsupported");if(r===tt)return e.ONE;if(r===Qe)return t;let n=e.ONE,i=t;for(;r>tt;)r&Qe&&(n=e.mul(n,i)),i=e.sqr(i),r>>=Qe;return n}function tc(e,t,r=!1){let n=new Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((f,b,o)=>e.is0(b)?f:(n[o]=f,e.mul(f,b)),e.ONE),a=e.inv(i);return t.reduceRight((f,b,o)=>e.is0(b)?f:(n[o]=e.mul(f,n[o]),e.mul(f,b)),a),n}function Ea(e,t){let r=(e.ORDER-Qe)/tn,n=e.pow(t,r),i=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),f=e.eql(n,e.neg(e.ONE));if(!i&&!a&&!f)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function xf(e,t){t!==void 0&&Bt(t);let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}var Yo=class{constructor(t,r={}){J(this,"ORDER");J(this,"BITS");J(this,"BYTES");J(this,"isLE");J(this,"ZERO",tt);J(this,"ONE",Qe);J(this,"_lengths");J(this,"_sqrt");J(this,"_mod");if(t<=tt)throw new Error("invalid field: expected ORDER > 0, got "+t);let n;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(n=r.BITS),typeof r.sqrt=="function"&&(this.sqrt=r.sqrt),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=r.allowedLengths?.slice()),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:i,nByteLength:a}=xf(t,n);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=i,this.BYTES=a,this._sqrt=void 0,Object.preventExtensions(this)}create(t){return pt(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof t);return tt<=t&&t<this.ORDER}is0(t){return t===tt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&Qe)===Qe}neg(t){return pt(-t,this.ORDER)}eql(t,r){return t===r}sqr(t){return pt(t*t,this.ORDER)}add(t,r){return pt(t+r,this.ORDER)}sub(t,r){return pt(t-r,this.ORDER)}mul(t,r){return pt(t*r,this.ORDER)}pow(t,r){return Nf(this,t,r)}div(t,r){return pt(t*va(r,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,r){return t+r}subN(t,r){return t-r}mulN(t,r){return t*r}inv(t){return va(t,this.ORDER)}sqrt(t){return this._sqrt||(this._sqrt=Sf(this.ORDER)),this._sqrt(this,t)}toBytes(t){return this.isLE?Za(t,this.BYTES):fi(t,this.BYTES)}fromBytes(t,r=!1){Te(t);let{_lengths:n,BYTES:i,isLE:a,ORDER:f,_mod:b}=this;if(n){if(!n.includes(t.length)||t.length>i)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+t.length);let p=new Uint8Array(i);p.set(t,a?0:p.length-t.length),t=p}if(t.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+t.length);let o=a?Va(t):qn(t);if(b&&(o=pt(o,f)),!r&&!this.isValid(o))throw new Error("invalid field element: outside of range 0..ORDER");return o}invertBatch(t){return tc(this,t)}cmov(t,r,n){return n?r:t}};function Yr(e,t={}){return new Yo(e,t)}function nc(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function rc(e){let t=nc(e);return t+Math.ceil(t/2)}function oc(e,t,r=!1){Te(e);let n=e.length,i=nc(t),a=rc(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);let f=r?Va(e):qn(e),b=pt(f,t-Qe)+Qe;return r?Za(b,i):fi(b,i)}var An=BigInt(0),nn=BigInt(1);function Pr(e,t){let r=t.negate();return e?r:t}function _a(e,t){let r=tc(e.Fp,t.map(n=>n.Z));return t.map((n,i)=>e.fromAffine(n.toAffine(r[i])))}function ic(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Io(e,t){ic(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e,a=di(e),f=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:i,shiftBy:f}}function Ca(e,t,r){let{windowSize:n,mask:i,maxNumber:a,shiftBy:f}=r,b=Number(e&i),o=e>>f;b>n&&(b-=a,o+=nn);let p=t*n,d=p+Math.abs(b)-1,h=b===0,u=b<0,c=t%2!==0;return{nextN:o,offset:d,isZero:h,isNeg:u,isNegF:c,offsetF:p}}var Po=new WeakMap,sc=new WeakMap;function ko(e){return sc.get(e)||1}function Aa(e){if(e!==An)throw new Error("invalid wNAF")}var qo=class{constructor(t,r){J(this,"BASE");J(this,"ZERO");J(this,"Fn");J(this,"bits");this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,n=this.ZERO){let i=t;for(;r>An;)r&nn&&(n=n.add(i)),i=i.double(),r>>=nn;return n}precomputeWindow(t,r){let{windows:n,windowSize:i}=Io(r,this.bits),a=[],f=t,b=f;for(let o=0;o<n;o++){b=f,a.push(b);for(let p=1;p<i;p++)b=b.add(f),a.push(b);f=b.double()}return a}wNAF(t,r,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let i=this.ZERO,a=this.BASE,f=Io(t,this.bits);for(let b=0;b<f.windows;b++){let{nextN:o,offset:p,isZero:d,isNeg:h,isNegF:u,offsetF:c}=Ca(n,b,f);n=o,d?a=a.add(Pr(u,r[c])):i=i.add(Pr(h,r[p]))}return Aa(n),{p:i,f:a}}wNAFUnsafe(t,r,n,i=this.ZERO){let a=Io(t,this.bits);for(let f=0;f<a.windows&&n!==An;f++){let{nextN:b,offset:o,isZero:p,isNeg:d}=Ca(n,f,a);if(n=b,!p){let h=r[o];i=i.add(d?h.negate():h)}}return Aa(n),i}getPrecomputes(t,r,n){let i=Po.get(r);return i||(i=this.precomputeWindow(r,t),t!==1&&(typeof n=="function"&&(i=n(i)),Po.set(r,i))),i}cached(t,r,n){let i=ko(t);return this.wNAF(i,this.getPrecomputes(i,t,n),r)}unsafe(t,r,n,i){let a=ko(t);return a===1?this._unsafeLadder(t,r,i):this.wNAFUnsafe(a,this.getPrecomputes(a,t,n),r,i)}createCache(t,r){ic(r,this.bits),sc.set(t,r),Po.delete(t)}hasCache(t){return ko(t)!==1}};function Rf(e,t,r,n){let i=t,a=e.ZERO,f=e.ZERO;for(;r>An||n>An;)r&nn&&(a=a.add(i)),n&nn&&(f=f.add(i)),i=i.double(),r>>=nn,n>>=nn;return{p1:a,p2:f}}function Sa(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Of(t),t}else return Yr(e,{isLE:r})}function If(e,t,r={},n){if(n===void 0&&(n=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(let o of["p","n","h"]){let p=t[o];if(!(typeof p=="bigint"&&p>An))throw new Error(`CURVE.${o} must be positive bigint`)}let i=Sa(t.p,r.Fp,n),a=Sa(t.n,r.Fn,n),b=["Gx","Gy","a","b"];for(let o of b)if(!i.isValid(t[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}function ac(e,t){return function(n){let i=e(n);return{secretKey:i,publicKey:t(i)}}}var kr=class{constructor(t,r){J(this,"oHash");J(this,"iHash");J(this,"blockLen");J(this,"outputLen");J(this,"finished",!1);J(this,"destroyed",!1);if(Zr(t),Te(r,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let a=0;a<i.length;a++)i[a]^=54;this.iHash.update(i),this.oHash=t.create();for(let a=0;a<i.length;a++)i[a]^=106;this.oHash.update(i),Zn(i)}update(t){return Rr(this),this.iHash.update(t),this}digestInto(t){Rr(this),Te(t,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:n,finished:i,destroyed:a,blockLen:f,outputLen:b}=this;return t=t,t.finished=i,t.destroyed=a,t.blockLen=f,t.outputLen=b,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},zn=(e,t,r)=>new kr(e,t).update(r).digest();zn.create=(e,t)=>new kr(e,t);var Ta=(e,t)=>(e+(e>=0?t:-t)/cc)/t;function Pf(e,t,r){let[[n,i],[a,f]]=t,b=Ta(f*e,r),o=Ta(-i*e,r),p=e-b*n-o*a,d=-b*i-o*f,h=p<xt,u=d<xt;h&&(p=-p),u&&(d=-d);let c=di(Math.ceil(mf(r)/2))+En;if(p<xt||p>=c||d<xt||d>=c)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:h,k1:p,k2neg:u,k2:d}}function zo(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function Lo(e,t){let r={};for(let n of Object.keys(t))r[n]=e[n]===void 0?t[n]:e[n];return Ir(r.lowS,"lowS"),Ir(r.prehash,"prehash"),r.format!==void 0&&zo(r.format),r}var Qo=class extends Error{constructor(t=""){super(t)}},Ut={Err:Qo,_tlv:{encode:(e,t)=>{let{Err:r}=Ut;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=_r(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let a=n>127?_r(i.length/2|128):"";return _r(e)+a+i+t},decode(e,t){let{Err:r}=Ut,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],a=!!(i&128),f=0;if(!a)f=i;else{let o=i&127;if(!o)throw new r("tlv.decode(long): indefinite length not supported");if(o>4)throw new r("tlv.decode(long): byte length is too big");let p=t.subarray(n,n+o);if(p.length!==o)throw new r("tlv.decode: length bytes not complete");if(p[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let d of p)f=f<<8|d;if(n+=o,f<128)throw new r("tlv.decode(long): not minimal encoding")}let b=t.subarray(n,n+f);if(b.length!==f)throw new r("tlv.decode: wrong value length");return{v:b,l:t.subarray(n+f)}}},_int:{encode(e){let{Err:t}=Ut;if(e<xt)throw new t("integer: negative integers are not allowed");let r=_r(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=Ut;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return qn(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=Ut,i=Te(e,void 0,"signature"),{v:a,l:f}=n.decode(48,i);if(f.length)throw new t("invalid signature: left bytes after parsing");let{v:b,l:o}=n.decode(2,a),{v:p,l:d}=n.decode(2,o);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(b),s:r.decode(p)}},hexFromSig(e){let{_tlv:t,_int:r}=Ut,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s)),a=n+i;return t.encode(48,a)}},xt=BigInt(0),En=BigInt(1),cc=BigInt(2),Cr=BigInt(3),kf=BigInt(4);function Lf(e,t={}){let r=If("weierstrass",e,t),{Fp:n,Fn:i}=r,a=r.CURVE,{h:f,n:b}=a;pi(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:o}=t;if(o&&(!n.is0(a.a)||typeof o.beta!="bigint"||!Array.isArray(o.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');let p=uc(n,i);function d(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function h(N,x,I){let{x:L,y:H}=x.toAffine(),Z=n.toBytes(L);if(Ir(I,"isCompressed"),I){d();let K=!n.isOdd(H);return et(lc(K),Z)}else return et(Uint8Array.of(4),Z,n.toBytes(H))}function u(N){Te(N,void 0,"Point");let{publicKey:x,publicKeyUncompressed:I}=p,L=N.length,H=N[0],Z=N.subarray(1);if(L===x&&(H===2||H===3)){let K=n.fromBytes(Z);if(!n.isValid(K))throw new Error("bad point: is not on curve, wrong x");let P=l(K),B;try{B=n.sqrt(P)}catch(z){let U=z instanceof Error?": "+z.message:"";throw new Error("bad point: is not on curve, sqrt error"+U)}d();let G=n.isOdd(B);return(H&1)===1!==G&&(B=n.neg(B)),{x:K,y:B}}else if(L===I&&H===4){let K=n.BYTES,P=n.fromBytes(Z.subarray(0,K)),B=n.fromBytes(Z.subarray(K,K*2));if(!g(P,B))throw new Error("bad point: is not on curve");return{x:P,y:B}}else throw new Error(`bad point: got length ${L}, expected compressed=${x} or uncompressed=${I}`)}let c=t.toBytes||h,s=t.fromBytes||u;function l(N){let x=n.sqr(N),I=n.mul(x,N);return n.add(n.add(I,n.mul(N,a.a)),a.b)}function g(N,x){let I=n.sqr(x),L=l(N);return n.eql(I,L)}if(!g(a.Gx,a.Gy))throw new Error("bad curve params: generator point");let w=n.mul(n.pow(a.a,Cr),kf),y=n.mul(n.sqr(a.b),BigInt(27));if(n.is0(n.add(w,y)))throw new Error("bad curve params: a or b");function v(N,x,I=!1){if(!n.isValid(x)||I&&n.is0(x))throw new Error(`bad point coordinate ${N}`);return x}function m(N){if(!(N instanceof S))throw new Error("Weierstrass Point expected")}function C(N){if(!o||!o.basises)throw new Error("no endo");return Pf(N,o.basises,i.ORDER)}let E=ma((N,x)=>{let{X:I,Y:L,Z:H}=N;if(n.eql(H,n.ONE))return{x:I,y:L};let Z=N.is0();x==null&&(x=Z?n.ONE:n.inv(H));let K=n.mul(I,x),P=n.mul(L,x),B=n.mul(H,x);if(Z)return{x:n.ZERO,y:n.ZERO};if(!n.eql(B,n.ONE))throw new Error("invZ was invalid");return{x:K,y:P}}),O=ma(N=>{if(N.is0()){if(t.allowInfinityPoint&&!n.is0(N.Y))return;throw new Error("bad point: ZERO")}let{x,y:I}=N.toAffine();if(!n.isValid(x)||!n.isValid(I))throw new Error("bad point: x or y not field elements");if(!g(x,I))throw new Error("bad point: equation left != right");if(!N.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function _(N,x,I,L,H){return I=new S(n.mul(I.X,N),I.Y,I.Z),x=Pr(L,x),I=Pr(H,I),x.add(I)}let T=class T{constructor(x,I,L){J(this,"X");J(this,"Y");J(this,"Z");this.X=v("x",x),this.Y=v("y",I,!0),this.Z=v("z",L),Object.freeze(this)}static CURVE(){return a}static fromAffine(x){let{x:I,y:L}=x||{};if(!x||!n.isValid(I)||!n.isValid(L))throw new Error("invalid affine point");if(x instanceof T)throw new Error("projective point not allowed");return n.is0(I)&&n.is0(L)?T.ZERO:new T(I,L,n.ONE)}static fromBytes(x){let I=T.fromAffine(s(Te(x,void 0,"point")));return I.assertValidity(),I}static fromHex(x){return T.fromBytes(_e(x))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(x=8,I=!0){return A.createCache(this,x),I||this.multiply(Cr),this}assertValidity(){O(this)}hasEvenY(){let{y:x}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(x)}equals(x){m(x);let{X:I,Y:L,Z:H}=this,{X:Z,Y:K,Z:P}=x,B=n.eql(n.mul(I,P),n.mul(Z,H)),G=n.eql(n.mul(L,P),n.mul(K,H));return B&&G}negate(){return new T(this.X,n.neg(this.Y),this.Z)}double(){let{a:x,b:I}=a,L=n.mul(I,Cr),{X:H,Y:Z,Z:K}=this,P=n.ZERO,B=n.ZERO,G=n.ZERO,V=n.mul(H,H),z=n.mul(Z,Z),U=n.mul(K,K),F=n.mul(H,Z);return F=n.add(F,F),G=n.mul(H,K),G=n.add(G,G),P=n.mul(x,G),B=n.mul(L,U),B=n.add(P,B),P=n.sub(z,B),B=n.add(z,B),B=n.mul(P,B),P=n.mul(F,P),G=n.mul(L,G),U=n.mul(x,U),F=n.sub(V,U),F=n.mul(x,F),F=n.add(F,G),G=n.add(V,V),V=n.add(G,V),V=n.add(V,U),V=n.mul(V,F),B=n.add(B,V),U=n.mul(Z,K),U=n.add(U,U),V=n.mul(U,F),P=n.sub(P,V),G=n.mul(U,z),G=n.add(G,G),G=n.add(G,G),new T(P,B,G)}add(x){m(x);let{X:I,Y:L,Z:H}=this,{X:Z,Y:K,Z:P}=x,B=n.ZERO,G=n.ZERO,V=n.ZERO,z=a.a,U=n.mul(a.b,Cr),F=n.mul(I,Z),D=n.mul(L,K),k=n.mul(H,P),j=n.add(I,L),M=n.add(Z,K);j=n.mul(j,M),M=n.add(F,D),j=n.sub(j,M),M=n.add(I,H);let $=n.add(Z,P);return M=n.mul(M,$),$=n.add(F,k),M=n.sub(M,$),$=n.add(L,H),B=n.add(K,P),$=n.mul($,B),B=n.add(D,k),$=n.sub($,B),V=n.mul(z,M),B=n.mul(U,k),V=n.add(B,V),B=n.sub(D,V),V=n.add(D,V),G=n.mul(B,V),D=n.add(F,F),D=n.add(D,F),k=n.mul(z,k),M=n.mul(U,M),D=n.add(D,k),k=n.sub(F,k),k=n.mul(z,k),M=n.add(M,k),F=n.mul(D,M),G=n.add(G,F),F=n.mul($,M),B=n.mul(j,B),B=n.sub(B,F),F=n.mul(j,D),V=n.mul($,V),V=n.add(V,F),new T(B,G,V)}subtract(x){return this.add(x.negate())}is0(){return this.equals(T.ZERO)}multiply(x){let{endo:I}=t;if(!i.isValidNot0(x))throw new Error("invalid scalar: out of range");let L,H,Z=K=>A.cached(this,K,P=>_a(T,P));if(I){let{k1neg:K,k1:P,k2neg:B,k2:G}=C(x),{p:V,f:z}=Z(P),{p:U,f:F}=Z(G);H=z.add(F),L=_(I.beta,V,U,K,B)}else{let{p:K,f:P}=Z(x);L=K,H=P}return _a(T,[L,H])[0]}multiplyUnsafe(x){let{endo:I}=t,L=this;if(!i.isValid(x))throw new Error("invalid scalar: out of range");if(x===xt||L.is0())return T.ZERO;if(x===En)return L;if(A.hasCache(this))return this.multiply(x);if(I){let{k1neg:H,k1:Z,k2neg:K,k2:P}=C(x),{p1:B,p2:G}=Rf(T,L,Z,P);return _(I.beta,B,G,H,K)}else return A.unsafe(L,x)}toAffine(x){return E(this,x)}isTorsionFree(){let{isTorsionFree:x}=t;return f===En?!0:x?x(T,this):A.unsafe(this,b).is0()}clearCofactor(){let{clearCofactor:x}=t;return f===En?this:x?x(T,this):this.multiplyUnsafe(f)}isSmallOrder(){return this.multiplyUnsafe(f).is0()}toBytes(x=!0){return Ir(x,"isCompressed"),this.assertValidity(),c(T,this,x)}toHex(x=!0){return Oe(this.toBytes(x))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};J(T,"BASE",new T(a.Gx,a.Gy,n.ONE)),J(T,"ZERO",new T(n.ZERO,n.ONE,n.ZERO)),J(T,"Fp",n),J(T,"Fn",i);let S=T,R=i.BITS,A=new qo(S,t.endo?Math.ceil(R/2):R);return S.BASE.precompute(8),S}function lc(e){return Uint8Array.of(e?2:3)}function uc(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Uf(e,t={}){let{Fn:r}=e,n=t.randomBytes||Nn,i=Object.assign(uc(e.Fp,r),{seed:rc(r.ORDER)});function a(c){try{let s=r.fromBytes(c);return r.isValidNot0(s)}catch{return!1}}function f(c,s){let{publicKey:l,publicKeyUncompressed:g}=i;try{let w=c.length;return s===!0&&w!==l||s===!1&&w!==g?!1:!!e.fromBytes(c)}catch{return!1}}function b(c=n(i.seed)){return oc(Te(c,i.seed,"seed"),r.ORDER)}function o(c,s=!0){return e.BASE.multiply(r.fromBytes(c)).toBytes(s)}function p(c){let{secretKey:s,publicKey:l,publicKeyUncompressed:g}=i;if(!ui(c)||"_lengths"in r&&r._lengths||s===l)return;let w=Te(c,void 0,"key").length;return w===l||w===g}function d(c,s,l=!0){if(p(c)===!0)throw new Error("first arg must be private key");if(p(s)===!1)throw new Error("second arg must be public key");let g=r.fromBytes(c);return e.fromBytes(s).multiply(g).toBytes(l)}let h={isValidSecretKey:a,isValidPublicKey:f,randomSecretKey:b},u=ac(b,o);return Object.freeze({getPublicKey:o,getSharedSecret:d,keygen:u,Point:e,utils:h,lengths:i})}function Mf(e,t,r={}){Zr(t),pi(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),r=Object.assign({},r);let n=r.randomBytes||Nn,i=r.hmac||((x,I)=>zn(t,x,I)),{Fp:a,Fn:f}=e,{ORDER:b,BITS:o}=f,{keygen:p,getPublicKey:d,getSharedSecret:h,utils:u,lengths:c}=Uf(e,r),s={prehash:!0,lowS:typeof r.lowS=="boolean"?r.lowS:!0,format:"compact",extraEntropy:!1},l=b*cc<a.ORDER;function g(x){let I=b>>En;return x>I}function w(x,I){if(!f.isValidNot0(I))throw new Error(`invalid signature ${x}: out of range 1..Point.Fn.ORDER`);return I}function y(){if(l)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function v(x,I){zo(I);let L=c.signature,H=I==="compact"?L:I==="recovered"?L+1:void 0;return Te(x,H)}class m{constructor(I,L,H){J(this,"r");J(this,"s");J(this,"recovery");if(this.r=w("r",I),this.s=w("s",L),H!=null){if(y(),![0,1,2,3].includes(H))throw new Error("invalid recovery id");this.recovery=H}Object.freeze(this)}static fromBytes(I,L=s.format){v(I,L);let H;if(L==="der"){let{r:B,s:G}=Ut.toSig(Te(I));return new m(B,G)}L==="recovered"&&(H=I[0],L="compact",I=I.subarray(1));let Z=c.signature/2,K=I.subarray(0,Z),P=I.subarray(Z,Z*2);return new m(f.fromBytes(K),f.fromBytes(P),H)}static fromHex(I,L){return this.fromBytes(_e(I),L)}assertRecovery(){let{recovery:I}=this;if(I==null)throw new Error("invalid recovery id: must be present");return I}addRecoveryBit(I){return new m(this.r,this.s,I)}recoverPublicKey(I){let{r:L,s:H}=this,Z=this.assertRecovery(),K=Z===2||Z===3?L+b:L;if(!a.isValid(K))throw new Error("invalid recovery id: sig.r+curve.n != R.x");let P=a.toBytes(K),B=e.fromBytes(et(lc((Z&1)===0),P)),G=f.inv(K),V=E(Te(I,void 0,"msgHash")),z=f.create(-V*G),U=f.create(H*G),F=e.BASE.multiplyUnsafe(z).add(B.multiplyUnsafe(U));if(F.is0())throw new Error("invalid recovery: point at infinify");return F.assertValidity(),F}hasHighS(){return g(this.s)}toBytes(I=s.format){if(zo(I),I==="der")return _e(Ut.hexFromSig(this));let{r:L,s:H}=this,Z=f.toBytes(L),K=f.toBytes(H);return I==="recovered"?(y(),et(Uint8Array.of(this.assertRecovery()),Z,K)):et(Z,K)}toHex(I){return Oe(this.toBytes(I))}}let C=r.bits2int||function(I){if(I.length>8192)throw new Error("input is too large");let L=qn(I),H=I.length*8-o;return H>0?L>>BigInt(H):L},E=r.bits2int_modN||function(I){return f.create(C(I))},O=di(o);function _(x){return wf("num < 2^"+o,x,xt,O),f.toBytes(x)}function S(x,I){return Te(x,void 0,"message"),I?Te(t(x),void 0,"prehashed message"):x}function R(x,I,L){let{lowS:H,prehash:Z,extraEntropy:K}=Lo(L,s);x=S(x,Z);let P=E(x),B=f.fromBytes(I);if(!f.isValidNot0(B))throw new Error("invalid private key");let G=[_(B),_(P)];if(K!=null&&K!==!1){let F=K===!0?n(c.secretKey):K;G.push(Te(F,void 0,"extraEntropy"))}let V=et(...G),z=P;function U(F){let D=C(F);if(!f.isValidNot0(D))return;let k=f.inv(D),j=e.BASE.multiply(D).toAffine(),M=f.create(j.x);if(M===xt)return;let $=f.create(k*f.create(z+M*B));if($===xt)return;let W=(j.x===M?0:2)|Number(j.y&En),Y=$;return H&&g($)&&(Y=f.neg($),W^=1),new m(M,Y,l?void 0:W)}return{seed:V,k2sig:U}}function A(x,I,L={}){let{seed:H,k2sig:Z}=R(x,I,L);return vf(t.outputLen,f.BYTES,i)(H,Z).toBytes(L.format)}function T(x,I,L,H={}){let{lowS:Z,prehash:K,format:P}=Lo(H,s);if(L=Te(L,void 0,"publicKey"),I=S(I,K),!ui(x)){let B=x instanceof m?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+B)}v(x,P);try{let B=m.fromBytes(x,P),G=e.fromBytes(L);if(Z&&B.hasHighS())return!1;let{r:V,s:z}=B,U=E(I),F=f.inv(z),D=f.create(U*F),k=f.create(V*F),j=e.BASE.multiplyUnsafe(D).add(G.multiplyUnsafe(k));return j.is0()?!1:f.create(j.x)===V}catch{return!1}}function N(x,I,L={}){let{prehash:H}=Lo(L,s);return I=S(I,H),m.fromBytes(x,"recovered").recoverPublicKey(I).toBytes()}return Object.freeze({keygen:p,getPublicKey:d,getSharedSecret:h,utils:u,lengths:c,Point:e,sign:A,verify:T,recoverPublicKey:N,Signature:m,hash:t})}var qr={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Df={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Bf=BigInt(0),Jo=BigInt(2);function Ff(e){let t=qr.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),f=BigInt(23),b=BigInt(44),o=BigInt(88),p=e*e*e%t,d=p*p*e%t,h=lt(d,r,t)*d%t,u=lt(h,r,t)*d%t,c=lt(u,Jo,t)*p%t,s=lt(c,i,t)*c%t,l=lt(s,a,t)*s%t,g=lt(l,b,t)*l%t,w=lt(g,o,t)*g%t,y=lt(w,b,t)*l%t,v=lt(y,r,t)*d%t,m=lt(v,f,t)*s%t,C=lt(m,n,t)*p%t,E=lt(C,Jo,t);if(!Lr.eql(Lr.sqr(E),e))throw new Error("Cannot find square root");return E}var Lr=Yr(qr.p,{sqrt:Ff}),sn=Lf(qr,{Fp:Lr,endo:Df}),gi=Mf(sn,vt),Oa={};function Ur(e,...t){let r=Oa[e];if(r===void 0){let n=vt(gf(e));r=et(n,n),Oa[e]=r}return vt(et(r,...t))}var bi=e=>e.toBytes(!0).slice(1),wi=e=>e%Jo===Bf;function Xo(e){let{Fn:t,BASE:r}=sn,n=t.fromBytes(e),i=r.multiply(n);return{scalar:wi(i.y)?n:t.neg(n),bytes:bi(i)}}function hc(e){let t=Lr;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x \u2265 p");let r=t.create(e*e),n=t.create(r*e+BigInt(7)),i=t.sqrt(n);wi(i)||(i=t.neg(i));let a=sn.fromAffine({x:e,y:i});return a.assertValidity(),a}var Wn=qn;function fc(...e){return sn.Fn.create(Wn(Ur("BIP0340/challenge",...e)))}function Na(e){return Xo(e).bytes}function jf(e,t,r=Nn(32)){let{Fn:n}=sn,i=Te(e,void 0,"message"),{bytes:a,scalar:f}=Xo(t),b=Te(r,32,"auxRand"),o=n.toBytes(f^Wn(Ur("BIP0340/aux",b))),p=Ur("BIP0340/nonce",o,a,i),{bytes:d,scalar:h}=Xo(p),u=fc(d,a,i),c=new Uint8Array(64);if(c.set(d,0),c.set(n.toBytes(n.create(h+u*f)),32),!dc(c,i,a))throw new Error("sign: Invalid signature produced");return c}function dc(e,t,r){let{Fp:n,Fn:i,BASE:a}=sn,f=Te(e,64,"signature"),b=Te(t,void 0,"message"),o=Te(r,32,"publicKey");try{let p=hc(Wn(o)),d=Wn(f.subarray(0,32));if(!n.isValidNot0(d))return!1;let h=Wn(f.subarray(32,64));if(!i.isValidNot0(h))return!1;let u=fc(i.toBytes(d),bi(p),b),c=a.multiplyUnsafe(h).add(p.multiplyUnsafe(i.neg(u))),{x:s,y:l}=c.toAffine();return!(c.is0()||!wi(l)||s!==d)}catch{return!1}}var Hn=(()=>{let r=(n=Nn(48))=>oc(n,qr.n);return{keygen:ac(r,Na),getPublicKey:Na,sign:jf,verify:dc,Point:sn,utils:{randomSecretKey:r,taggedHash:Ur,lift_x:hc,pointToBytes:bi},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();function mi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Hf(e){if(!mi(e))throw new Error("Uint8Array expected")}function pc(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(r=>typeof r=="string"):t.every(r=>Number.isSafeInteger(r)):!1}function $f(e){if(typeof e!="function")throw new Error("function expected");return!0}function on(e,t){if(typeof t!="string")throw new Error(`${e}: string expected`);return!0}function vi(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function ei(e){if(!Array.isArray(e))throw new Error("array expected")}function Mr(e,t){if(!pc(!0,t))throw new Error(`${e}: array of strings expected`)}function yc(e,t){if(!pc(!1,t))throw new Error(`${e}: array of numbers expected`)}function gc(...e){let t=a=>a,r=(a,f)=>b=>a(f(b)),n=e.map(a=>a.encode).reduceRight(r,t),i=e.map(a=>a.decode).reduce(r,t);return{encode:n,decode:i}}function bc(e){let t=typeof e=="string"?e.split(""):e,r=t.length;Mr("alphabet",t);let n=new Map(t.map((i,a)=>[i,a]));return{encode:i=>(ei(i),i.map(a=>{if(!Number.isSafeInteger(a)||a<0||a>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${a}". Allowed: ${e}`);return t[a]})),decode:i=>(ei(i),i.map(a=>{on("alphabet.decode",a);let f=n.get(a);if(f===void 0)throw new Error(`Unknown letter: "${a}". Allowed: ${e}`);return f}))}}function wc(e=""){return on("join",e),{encode:t=>(Mr("join.decode",t),t.join(e)),decode:t=>(on("join.decode",t),t.split(e))}}function Gf(e,t="="){return vi(e),on("padding",t),{encode(r){for(Mr("padding.encode",r);r.length*e%8;)r.push(t);return r},decode(r){Mr("padding.decode",r);let n=r.length;if(n*e%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if((n-1)*e%8===0)throw new Error("padding: invalid, string has too much padding");return r.slice(0,n)}}}var mc=(e,t)=>t===0?e:mc(t,e%t),Dr=(e,t)=>e+(t-mc(e,t)),Nr=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function ti(e,t,r,n){if(ei(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Dr(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Dr(t,r)}`);let i=0,a=0,f=Nr[t],b=Nr[r]-1,o=[];for(let p of e){if(vi(p),p>=f)throw new Error(`convertRadix2: invalid data word=${p} from=${t}`);if(i=i<<t|p,a+t>32)throw new Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=r;a-=r)o.push((i>>a-r&b)>>>0);let d=Nr[a];if(d===void 0)throw new Error("invalid carry");i&=d-1}if(i=i<<r-a&b,!n&&a>=t)throw new Error("Excess padding");if(!n&&i>0)throw new Error(`Non-zero padding: ${i}`);return n&&a>0&&o.push(i>>>0),o}function vc(e,t=!1){if(vi(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Dr(8,e)>32||Dr(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!mi(r))throw new Error("radix2.encode input should be Uint8Array");return ti(Array.from(r),8,e,!t)},decode:r=>(yc("radix2.decode",r),Uint8Array.from(ti(r,e,8,t)))}}function xa(e){return $f(e),function(...t){try{return e.apply(null,t)}catch{}}}var Wf=typeof Uint8Array.from([]).toBase64=="function"&&typeof Uint8Array.fromBase64=="function",Kf=(e,t)=>{on("base64",e);let r=/^[A-Za-z0-9=+/]+$/,n="base64";if(e.length>0&&!r.test(e))throw new Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:n,lastChunkHandling:"strict"})},Ft=Wf?{encode(e){return Hf(e),e.toBase64()},decode(e){return Kf(e)}}:gc(vc(6),bc("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Gf(6),wc("")),ni=gc(bc("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),wc("")),Ra=[996825010,642813549,513874426,1027748829,705979059];function $n(e){let t=e>>25,r=(e&33554431)<<5;for(let n=0;n<Ra.length;n++)(t>>n&1)===1&&(r^=Ra[n]);return r}function Ia(e,t,r=1){let n=e.length,i=1;for(let a=0;a<n;a++){let f=e.charCodeAt(a);if(f<33||f>126)throw new Error(`Invalid prefix (${e})`);i=$n(i)^f>>5}i=$n(i);for(let a=0;a<n;a++)i=$n(i)^e.charCodeAt(a)&31;for(let a of t)i=$n(i)^a;for(let a=0;a<6;a++)i=$n(i);return i^=r,ni.encode(ti([i%Nr[30]],30,5,!1))}function Vf(e){let t=e==="bech32"?1:734539939,r=vc(5),n=r.decode,i=r.encode,a=xa(n);function f(h,u,c=90){on("bech32.encode prefix",h),mi(u)&&(u=Array.from(u)),yc("bech32.encode",u);let s=h.length;if(s===0)throw new TypeError(`Invalid prefix length ${s}`);let l=s+7+u.length;if(c!==!1&&l>c)throw new TypeError(`Length ${l} exceeds limit ${c}`);let g=h.toLowerCase(),w=Ia(g,u,t);return`${g}1${ni.encode(u)}${w}`}function b(h,u=90){on("bech32.decode input",h);let c=h.length;if(c<8||u!==!1&&c>u)throw new TypeError(`invalid string length: ${c} (${h}). Expected (8..${u})`);let s=h.toLowerCase();if(h!==s&&h!==h.toUpperCase())throw new Error("String must be lowercase or uppercase");let l=s.lastIndexOf("1");if(l===0||l===-1)throw new Error('Letter "1" must be present between prefix and data only');let g=s.slice(0,l),w=s.slice(l+1);if(w.length<6)throw new Error("Data must be at least 6 characters long");let y=ni.decode(w).slice(0,-6),v=Ia(g,y,t);if(!w.endsWith(v))throw new Error(`Invalid checksum in ${h}: expected "${v}"`);return{prefix:g,words:y}}let o=xa(b);function p(h){let{prefix:u,words:c}=b(h,!1);return{prefix:u,words:c,bytes:n(c)}}function d(h,u){return f(h,i(u))}return{encode:f,decode:b,encodeFromBytes:d,decodeToBytes:p,decodeUnsafe:o,fromWords:n,fromWordsUnsafe:a,toWords:i}}var Sn=Vf("bech32");function Zf(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Pa(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Uo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Xe(e,t,r=""){let n=Zf(e),i=e?.length,a=t!==void 0;if(!n||a&&i!==t){let f=r&&`"${r}" `,b=a?` of length ${t}`:"",o=n?`length=${i}`:`type=${typeof e}`;throw new Error(f+"expected Uint8Array"+b+", got "+o)}return e}function Ye(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Tn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var Yf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function qf(e,t){return e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function Ec(e,t){if(qf(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function zf(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Qf(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return r===0}var Jf=(e,t)=>{function r(n,...i){if(Xe(n,void 0,"key"),!Yf)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){let d=i[0];Xe(d,e.varSizeNonce?void 0:e.nonceLength,"nonce")}let a=e.tagLength;a&&i[1]!==void 0&&Xe(i[1],void 0,"AAD");let f=t(n,...i),b=(d,h)=>{if(h!==void 0){if(d!==2)throw new Error("cipher output not supported");Xe(h,void 0,"output")}},o=!1;return{encrypt(d,h){if(o)throw new Error("cannot encrypt() twice with same key + nonce");return o=!0,Xe(d),b(f.encrypt.length,h),f.encrypt(d,h)},decrypt(d,h){if(Xe(d),a&&d.length<a)throw new Error('"ciphertext" expected length bigger than tagLength='+a);return b(f.decrypt.length,h),f.decrypt(d,h)}}}return Object.assign(r,e),r};function _c(e,t,r=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error('"output" expected Uint8Array of length '+e+", got: "+t.length);if(r&&!_n(t))throw new Error("invalid output, must be aligned");return t}function _n(e){return e.byteOffset%4===0}function rn(e){return Uint8Array.from(e)}var Dt=16,Xf=283;function e2(e){if(![16,24,32].includes(e.length))throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length='+e.length)}function Ei(e){return e<<1^Xf&-(e>>7)}function vn(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(t&1),e=Ei(e);return r}var ri=(()=>{let e=new Uint8Array(256);for(let r=0,n=1;r<256;r++,n^=Ei(n))e[r]=n;let t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let n=e[255-r];n|=n<<8,t[e[r]]=(n^n>>4^n>>5^n>>6^n>>7^99)&255}return Tn(e),t})(),t2=ri.map((e,t)=>ri.indexOf(t)),n2=e=>e<<24|e>>>8,Mo=e=>e<<8|e>>>24;function Cc(e,t){if(e.length!==256)throw new Error("Wrong sbox length");let r=new Uint32Array(256).map((p,d)=>t(e[d])),n=r.map(Mo),i=n.map(Mo),a=i.map(Mo),f=new Uint32Array(256*256),b=new Uint32Array(256*256),o=new Uint16Array(256*256);for(let p=0;p<256;p++)for(let d=0;d<256;d++){let h=p*256+d;f[h]=r[p]^n[d],b[h]=i[p]^a[d],o[h]=e[p]<<8|e[d]}return{sbox:e,sbox2:o,T0:r,T1:n,T2:i,T3:a,T01:f,T23:b}}var _i=Cc(ri,e=>vn(e,3)<<24|e<<16|e<<8|vn(e,2)),Ac=Cc(t2,e=>vn(e,11)<<24|vn(e,13)<<16|vn(e,9)<<8|vn(e,14)),r2=(()=>{let e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=Ei(r))e[t]=r;return e})();function Sc(e){Xe(e);let t=e.length;e2(e);let{sbox2:r}=_i,n=[];_n(e)||n.push(e=rn(e));let i=Ye(e),a=i.length,f=o=>mt(r,o,o,o,o),b=new Uint32Array(t+28);b.set(i);for(let o=a;o<b.length;o++){let p=b[o-1];o%a===0?p=f(n2(p))^r2[o/a-1]:a>6&&o%a===4&&(p=f(p)),b[o]=b[o-a]^p}return Tn(...n),b}function o2(e){let t=Sc(e),r=t.slice(),n=t.length,{sbox2:i}=_i,{T0:a,T1:f,T2:b,T3:o}=Ac;for(let p=0;p<n;p+=4)for(let d=0;d<4;d++)r[p+d]=t[n-p-4+d];Tn(t);for(let p=4;p<n-4;p++){let d=r[p],h=mt(i,d,d,d,d);r[p]=a[h&255]^f[h>>>8&255]^b[h>>>16&255]^o[h>>>24]}return r}function Mt(e,t,r,n,i,a){return e[r<<8&65280|n>>>8&255]^t[i>>>8&65280|a>>>24&255]}function mt(e,t,r,n,i){return e[t&255|r&65280]|e[n>>>16&255|i>>>16&65280]<<16}function ka(e,t,r,n,i){let{sbox2:a,T01:f,T23:b}=_i,o=0;t^=e[o++],r^=e[o++],n^=e[o++],i^=e[o++];let p=e.length/4-2;for(let s=0;s<p;s++){let l=e[o++]^Mt(f,b,t,r,n,i),g=e[o++]^Mt(f,b,r,n,i,t),w=e[o++]^Mt(f,b,n,i,t,r),y=e[o++]^Mt(f,b,i,t,r,n);t=l,r=g,n=w,i=y}let d=e[o++]^mt(a,t,r,n,i),h=e[o++]^mt(a,r,n,i,t),u=e[o++]^mt(a,n,i,t,r),c=e[o++]^mt(a,i,t,r,n);return{s0:d,s1:h,s2:u,s3:c}}function i2(e,t,r,n,i){let{sbox2:a,T01:f,T23:b}=Ac,o=0;t^=e[o++],r^=e[o++],n^=e[o++],i^=e[o++];let p=e.length/4-2;for(let s=0;s<p;s++){let l=e[o++]^Mt(f,b,t,i,n,r),g=e[o++]^Mt(f,b,r,t,i,n),w=e[o++]^Mt(f,b,n,r,t,i),y=e[o++]^Mt(f,b,i,n,r,t);t=l,r=g,n=w,i=y}let d=e[o++]^mt(a,t,i,n,r),h=e[o++]^mt(a,r,t,i,n),u=e[o++]^mt(a,n,r,t,i),c=e[o++]^mt(a,i,n,r,t);return{s0:d,s1:h,s2:u,s3:c}}function s2(e){if(Xe(e),e.length%Dt!==0)throw new Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+Dt)}function a2(e,t,r){Xe(e);let n=e.length,i=n%Dt;if(!t&&i!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");_n(e)||(e=rn(e));let a=Ye(e);if(t){let b=Dt-i;b||(b=Dt),n=n+b}r=_c(n,r),Ec(e,r);let f=Ye(r);return{b:a,o:f,out:r}}function c2(e,t){if(!t)return e;let r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");let n=e[r-1];if(n<=0||n>16)throw new Error("aes/pcks5: wrong padding");let i=e.subarray(0,-n);for(let a=0;a<n;a++)if(e[r-a-1]!==n)throw new Error("aes/pcks5: wrong padding");return i}function l2(e){let t=new Uint8Array(16),r=Ye(t);t.set(e);let n=Dt-e.length;for(let i=Dt-n;i<Dt;i++)t[i]=n;return r}var Tc=Jf({blockSize:16,nonceLength:16},function(t,r,n={}){let i=!n.disablePadding;return{encrypt(a,f){let b=Sc(t),{b:o,o:p,out:d}=a2(a,i,f),h=r,u=[b];_n(h)||u.push(h=rn(h));let c=Ye(h),s=c[0],l=c[1],g=c[2],w=c[3],y=0;for(;y+4<=o.length;)s^=o[y+0],l^=o[y+1],g^=o[y+2],w^=o[y+3],{s0:s,s1:l,s2:g,s3:w}=ka(b,s,l,g,w),p[y++]=s,p[y++]=l,p[y++]=g,p[y++]=w;if(i){let v=l2(a.subarray(y*4));s^=v[0],l^=v[1],g^=v[2],w^=v[3],{s0:s,s1:l,s2:g,s3:w}=ka(b,s,l,g,w),p[y++]=s,p[y++]=l,p[y++]=g,p[y++]=w}return Tn(...u),d},decrypt(a,f){s2(a);let b=o2(t),o=r,p=[b];_n(o)||p.push(o=rn(o));let d=Ye(o);f=_c(a.length,f),_n(a)||p.push(a=rn(a)),Ec(a,f);let h=Ye(a),u=Ye(f),c=d[0],s=d[1],l=d[2],g=d[3];for(let w=0;w+4<=h.length;){let y=c,v=s,m=l,C=g;c=h[w+0],s=h[w+1],l=h[w+2],g=h[w+3];let{s0:E,s1:O,s2:_,s3:S}=i2(b,c,s,l,g);u[w++]=E^y,u[w++]=O^v,u[w++]=_^m,u[w++]=S^C}return Tn(...p),c2(f,i)}}}),Oc=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),u2=Oc("expand 16-byte k"),h2=Oc("expand 32-byte k"),f2=Ye(u2),d2=Ye(h2);function we(e,t){return e<<t|e>>>32-t}function oi(e){return e.byteOffset%4===0}var Ar=64,p2=16,Nc=2**32-1,La=Uint32Array.of();function y2(e,t,r,n,i,a,f,b){let o=i.length,p=new Uint8Array(Ar),d=Ye(p),h=oi(i)&&oi(a),u=h?Ye(i):La,c=h?Ye(a):La;for(let s=0;s<o;f++){if(e(t,r,n,d,f,b),f>=Nc)throw new Error("arx: counter overflow");let l=Math.min(Ar,o-s);if(h&&l===Ar){let g=s/4;if(s%4!==0)throw new Error("arx: invalid block position");for(let w=0,y;w<p2;w++)y=g+w,c[y]=u[y]^d[w];s+=Ar;continue}for(let g=0,w;g<l;g++)w=s+g,a[w]=i[w]^p[g];s+=l}}function g2(e,t){let{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:a,rounds:f}=zf({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Uo(i),Uo(f),Pa(a),Pa(r),(b,o,p,d,h=0)=>{Xe(b,void 0,"key"),Xe(o,void 0,"nonce"),Xe(p,void 0,"data");let u=p.length;if(d===void 0&&(d=new Uint8Array(u)),Xe(d,void 0,"output"),Uo(h),h<0||h>=Nc)throw new Error("arx: counter overflow");if(d.length<u)throw new Error(`arx: output (${d.length}) is shorter than data (${u})`);let c=[],s=b.length,l,g;if(s===32)c.push(l=rn(b)),g=d2;else if(s===16&&r)l=new Uint8Array(32),l.set(b),l.set(b,16),g=f2,c.push(l);else throw Xe(b,32,"arx key"),new Error("invalid key size");oi(o)||c.push(o=rn(o));let w=Ye(l);if(n){if(o.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(g,w,Ye(o.subarray(0,16)),w),o=o.subarray(16)}let y=16-i;if(y!==o.length)throw new Error(`arx: nonce must be ${y} or 16 bytes`);if(y!==12){let m=new Uint8Array(12);m.set(o,a?0:12-o.length),o=m,c.push(o)}let v=Ye(o);return y2(e,g,w,v,p,d,h,f),Tn(...c),d}}function b2(e,t,r,n,i,a=20){let f=e[0],b=e[1],o=e[2],p=e[3],d=t[0],h=t[1],u=t[2],c=t[3],s=t[4],l=t[5],g=t[6],w=t[7],y=i,v=r[0],m=r[1],C=r[2],E=f,O=b,_=o,S=p,R=d,A=h,T=u,N=c,x=s,I=l,L=g,H=w,Z=y,K=v,P=m,B=C;for(let V=0;V<a;V+=2)E=E+R|0,Z=we(Z^E,16),x=x+Z|0,R=we(R^x,12),E=E+R|0,Z=we(Z^E,8),x=x+Z|0,R=we(R^x,7),O=O+A|0,K=we(K^O,16),I=I+K|0,A=we(A^I,12),O=O+A|0,K=we(K^O,8),I=I+K|0,A=we(A^I,7),_=_+T|0,P=we(P^_,16),L=L+P|0,T=we(T^L,12),_=_+T|0,P=we(P^_,8),L=L+P|0,T=we(T^L,7),S=S+N|0,B=we(B^S,16),H=H+B|0,N=we(N^H,12),S=S+N|0,B=we(B^S,8),H=H+B|0,N=we(N^H,7),E=E+A|0,B=we(B^E,16),L=L+B|0,A=we(A^L,12),E=E+A|0,B=we(B^E,8),L=L+B|0,A=we(A^L,7),O=O+T|0,Z=we(Z^O,16),H=H+Z|0,T=we(T^H,12),O=O+T|0,Z=we(Z^O,8),H=H+Z|0,T=we(T^H,7),_=_+N|0,K=we(K^_,16),x=x+K|0,N=we(N^x,12),_=_+N|0,K=we(K^_,8),x=x+K|0,N=we(N^x,7),S=S+R|0,P=we(P^S,16),I=I+P|0,R=we(R^I,12),S=S+R|0,P=we(P^S,8),I=I+P|0,R=we(R^I,7);let G=0;n[G++]=f+E|0,n[G++]=b+O|0,n[G++]=o+_|0,n[G++]=p+S|0,n[G++]=d+R|0,n[G++]=h+A|0,n[G++]=u+T|0,n[G++]=c+N|0,n[G++]=s+x|0,n[G++]=l+I|0,n[G++]=g+L|0,n[G++]=w+H|0,n[G++]=y+Z|0,n[G++]=v+K|0,n[G++]=m+P|0,n[G++]=C+B|0}var xc=g2(b2,{counterRight:!1,counterLength:4,allowShortKeys:!1});function w2(e,t,r){return Zr(e),r===void 0&&(r=new Uint8Array(e.outputLen)),zn(e,r,t)}var Do=Uint8Array.of(0),Ua=Uint8Array.of();function m2(e,t,r,n=32){Zr(e),Bt(n,"length");let i=e.outputLen;if(n>255*i)throw new Error("Length must be <= 255*HashLen");let a=Math.ceil(n/i);r===void 0?r=Ua:Te(r,void 0,"info");let f=new Uint8Array(a*i),b=zn.create(e,t),o=b._cloneInto(),p=new Uint8Array(b.outputLen);for(let d=0;d<a;d++)Do[0]=d+1,o.update(d===0?Ua:p).update(r).update(Do).digestInto(p),f.set(p,i*d),b._cloneInto(o);return b.destroy(),o.destroy(),Zn(p,Do),f.slice(0,n)}var v2=Object.defineProperty,xe=(e,t)=>{for(var r in t)v2(e,r,{get:t[r],enumerable:!0})},mn=Symbol("verified"),E2=e=>e instanceof Object;function Ci(e){if(!E2(e)||typeof e.kind!="number"||typeof e.content!="string"||typeof e.created_at!="number"||typeof e.pubkey!="string"||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;t<e.tags.length;t++){let r=e.tags[t];if(!Array.isArray(r))return!1;for(let n=0;n<r.length;n++)if(typeof r[n]!="string")return!1}return!0}var _2={};xe(_2,{binarySearch:()=>Ai,bytesToHex:()=>Oe,hexToBytes:()=>_e,insertEventIntoAscendingList:()=>A2,insertEventIntoDescendingList:()=>C2,mergeReverseSortedLists:()=>S2,normalizeURL:()=>Rc,utf8Decoder:()=>Rt,utf8Encoder:()=>ut});var Rt=new TextDecoder("utf-8"),ut=new TextEncoder;function Rc(e){try{e.indexOf("://")===-1&&(e="wss://"+e);let t=new URL(e);return t.protocol==="http:"?t.protocol="ws:":t.protocol==="https:"&&(t.protocol="wss:"),t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),(t.port==="80"&&t.protocol==="ws:"||t.port==="443"&&t.protocol==="wss:")&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}catch{throw new Error(`Invalid URL: ${e}`)}}function C2(e,t){let[r,n]=Ai(e,i=>t.id===i.id?0:t.created_at===i.created_at?-1:i.created_at-t.created_at);return n||e.splice(r,0,t),e}function A2(e,t){let[r,n]=Ai(e,i=>t.id===i.id?0:t.created_at===i.created_at?-1:t.created_at-i.created_at);return n||e.splice(r,0,t),e}function Ai(e,t){let r=0,n=e.length-1;for(;r<=n;){let i=Math.floor((r+n)/2),a=t(e[i]);if(a===0)return[i,!0];a<0?n=i-1:r=i+1}return[r,!1]}function S2(e,t){let r=new Array(e.length+t.length);r.length=0;let n=0,i=0,a=[];for(;n<e.length&&i<t.length;){let f;if(e[n]?.created_at>t[i]?.created_at?(f=e[n],n++):(f=t[i],i++),r.length>0&&r[r.length-1].created_at===f.created_at){if(a.includes(f.id))continue}else a.length=0;r.push(f),a.push(f.id)}for(;n<e.length;){let f=e[n];if(n++,r.length>0&&r[r.length-1].created_at===f.created_at){if(a.includes(f.id))continue}else a.length=0;r.push(f),a.push(f.id)}for(;i<t.length;){let f=t[i];if(i++,r.length>0&&r[r.length-1].created_at===f.created_at){if(a.includes(f.id))continue}else a.length=0;r.push(f),a.push(f.id)}return r}var T2=class{generateSecretKey(){return Hn.utils.randomSecretKey()}getPublicKey(e){return Oe(Hn.getPublicKey(e))}finalizeEvent(e,t){let r=e;return r.pubkey=Oe(Hn.getPublicKey(t)),r.id=Kn(r),r.sig=Oe(Hn.sign(_e(Kn(r)),t)),r[mn]=!0,r}verifyEvent(e){if(typeof e[mn]=="boolean")return e[mn];try{let t=Kn(e);if(t!==e.id)return e[mn]=!1,!1;let r=Hn.verify(_e(e.sig),_e(t),_e(e.pubkey));return e[mn]=r,r}catch{return e[mn]=!1,!1}}};function O2(e){if(!Ci(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function Kn(e){let t=vt(ut.encode(O2(e)));return Oe(t)}var zr=new T2,Si=zr.generateSecretKey,On=zr.getPublicKey,yt=zr.finalizeEvent,Qr=zr.verifyEvent,N2={};xe(N2,{Application:()=>jd,BadgeAward:()=>M2,BadgeDefinition:()=>kd,BlockedRelaysList:()=>yd,BlossomServerList:()=>_d,BookmarkList:()=>fd,Bookmarksets:()=>Rd,Calendar:()=>Zd,CalendarEventRSVP:()=>Yd,ChannelCreation:()=>Mc,ChannelHideMessage:()=>Fc,ChannelMessage:()=>Bc,ChannelMetadata:()=>Dc,ChannelMuteUser:()=>jc,ChatMessage:()=>D2,ClassifiedListing:()=>Gd,ClientAuth:()=>$c,Comment:()=>V2,CommunitiesList:()=>dd,CommunityDefinition:()=>Jd,CommunityPostApproval:()=>ed,Contacts:()=>k2,CreateOrUpdateProduct:()=>Md,CreateOrUpdateStall:()=>Ud,Curationsets:()=>Id,Date:()=>Kd,DirectMessageRelaysList:()=>vd,DraftClassifiedListing:()=>Wd,DraftLong:()=>Bd,Emojisets:()=>Fd,EncryptedDirectMessage:()=>L2,EventDeletion:()=>U2,FavoriteRelays:()=>bd,FileMessage:()=>F2,FileMetadata:()=>K2,FileServerPreference:()=>Ed,Followsets:()=>Od,ForumThread:()=>B2,GenericRepost:()=>Ri,Genericlists:()=>Nd,GiftWrap:()=>Hc,GroupMetadata:()=>Xd,HTTPAuth:()=>Ii,Handlerinformation:()=>Qd,Handlerrecommendation:()=>zd,Highlights:()=>ad,InterestsList:()=>wd,Interestsets:()=>Ld,JobFeedback:()=>rd,JobRequest:()=>td,JobResult:()=>nd,Label:()=>X2,LightningPubRPC:()=>Ad,LiveChatMessage:()=>Z2,LiveEvent:()=>Hd,LongFormArticle:()=>Dd,Metadata:()=>I2,Mutelist:()=>ld,NWCWalletInfo:()=>Cd,NWCWalletRequest:()=>Gc,NWCWalletResponse:()=>Sd,NormalVideo:()=>H2,NostrConnect:()=>Td,OpenTimestamps:()=>G2,Photo:()=>j2,Pinlist:()=>ud,Poll:()=>W2,PollResponse:()=>cd,PrivateDirectMessage:()=>Uc,ProblemTracker:()=>z2,ProfileBadges:()=>Pd,PublicChatsList:()=>pd,Reaction:()=>xi,RecommendRelay:()=>P2,RelayList:()=>hd,RelayReview:()=>qd,Relaysets:()=>xd,Report:()=>Q2,Reporting:()=>J2,Repost:()=>Ni,Seal:()=>Lc,SearchRelaysList:()=>gd,ShortTextNote:()=>kc,ShortVideo:()=>$2,Time:()=>Vd,UserEmojiList:()=>md,UserStatuses:()=>$d,Voice:()=>Y2,VoiceComment:()=>q2,Zap:()=>sd,ZapGoal:()=>od,ZapRequest:()=>id,classifyKind:()=>x2,isAddressableKind:()=>Oi,isEphemeralKind:()=>Pc,isKind:()=>R2,isRegularKind:()=>Ic,isReplaceableKind:()=>Ti});function Ic(e){return e<1e4&&e!==0&&e!==3}function Ti(e){return e===0||e===3||1e4<=e&&e<2e4}function Pc(e){return 2e4<=e&&e<3e4}function Oi(e){return 3e4<=e&&e<4e4}function x2(e){return Ic(e)?"regular":Ti(e)?"replaceable":Pc(e)?"ephemeral":Oi(e)?"parameterized":"unknown"}function R2(e,t){let r=t instanceof Array?t:[t];return Ci(e)&&r.includes(e.kind)||!1}var I2=0,kc=1,P2=2,k2=3,L2=4,U2=5,Ni=6,xi=7,M2=8,D2=9,B2=11,Lc=13,Uc=14,F2=15,Ri=16,j2=20,H2=21,$2=22,Mc=40,Dc=41,Bc=42,Fc=43,jc=44,G2=1040,Hc=1059,W2=1068,K2=1063,V2=1111,Z2=1311,Y2=1222,q2=1244,z2=1971,Q2=1984,J2=1984,X2=1985,ed=4550,td=5999,nd=6999,rd=7e3,od=9041,id=9734,sd=9735,ad=9802,cd=1018,ld=1e4,ud=10001,hd=10002,fd=10003,dd=10004,pd=10005,yd=10006,gd=10007,bd=10012,wd=10015,md=10030,vd=10050,Ed=10096,_d=10063,Cd=13194,Ad=21e3,$c=22242,Gc=23194,Sd=23195,Td=24133,Ii=27235,Od=3e4,Nd=30001,xd=30002,Rd=30003,Id=30004,Pd=30008,kd=30009,Ld=30015,Ud=30017,Md=30018,Dd=30023,Bd=30024,Fd=30030,jd=30078,Hd=30311,$d=30315,Gd=30402,Wd=30403,Kd=31922,Vd=31923,Zd=31924,Yd=31925,qd=31987,zd=31989,Qd=31990,Jd=34550,Xd=39e3;function ep(e,t){if(e.ids&&e.ids.indexOf(t.id)===-1||e.kinds&&e.kinds.indexOf(t.kind)===-1||e.authors&&e.authors.indexOf(t.pubkey)===-1)return!1;for(let r in e)if(r[0]==="#"){let n=r.slice(1),i=e[`#${n}`];if(i&&!t.tags.find(([a,f])=>a===r.slice(1)&&i.indexOf(f)!==-1))return!1}return!(e.since&&t.created_at<e.since||e.until&&t.created_at>e.until)}function tp(e,t){for(let r=0;r<e.length;r++)if(ep(e[r],t))return!0;return!1}var np={};xe(np,{getHex64:()=>Jr,getInt:()=>Wc,getSubscriptionId:()=>Kc,matchEventId:()=>rp,matchEventKind:()=>ip,matchEventPubkey:()=>op});function Jr(e,t){let r=t.length+3,n=e.indexOf(`"${t}":`)+r,i=e.slice(n).indexOf('"')+n+1;return e.slice(i,i+64)}function Wc(e,t){let r=t.length,n=e.indexOf(`"${t}":`)+r+3,i=e.slice(n),a=Math.min(i.indexOf(","),i.indexOf("}"));return parseInt(i.slice(0,a),10)}function Kc(e){let t=e.slice(0,22).indexOf('"EVENT"');if(t===-1)return null;let r=e.slice(t+7+1).indexOf('"');if(r===-1)return null;let n=t+7+1+r,i=e.slice(n+1,80).indexOf('"');if(i===-1)return null;let a=n+1+i;return e.slice(n+1,a)}function rp(e,t){return t===Jr(e,"id")}function op(e,t){return t===Jr(e,"pubkey")}function ip(e,t){return t===Wc(e,"kind")}var sp={};xe(sp,{makeAuthEvent:()=>Vc});function Vc(e,t){return{kind:$c,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}var Zc=class extends Error{constructor(e,t){super(`Tried to send message '${e} on a closed connection to ${t}.`),this.name="SendingOnClosedConnection"}},Yc=class{constructor(e,t){J(this,"url");J(this,"_connected",!1);J(this,"onclose",null);J(this,"onnotice",e=>console.debug(`NOTICE from ${this.url}: ${e}`));J(this,"onauth");J(this,"baseEoseTimeout",4400);J(this,"publishTimeout",4400);J(this,"pingFrequency",29e3);J(this,"pingTimeout",2e4);J(this,"resubscribeBackoff",[1e4,1e4,1e4,2e4,2e4,3e4,6e4]);J(this,"openSubs",new Map);J(this,"enablePing");J(this,"enableReconnect");J(this,"idleSince",Date.now());J(this,"ongoingOperations",0);J(this,"reconnectTimeoutHandle");J(this,"pingIntervalHandle");J(this,"reconnectAttempts",0);J(this,"skipReconnection",!1);J(this,"connectionPromise");J(this,"openCountRequests",new Map);J(this,"openEventPublishes",new Map);J(this,"ws");J(this,"challenge");J(this,"authPromise");J(this,"serial",0);J(this,"verifyEvent");J(this,"_WebSocket");this.url=Rc(e),this.verifyEvent=t.verifyEvent,this._WebSocket=t.websocketImplementation||WebSocket,this.enablePing=t.enablePing,this.enableReconnect=t.enableReconnect||!1}static async connect(e,t){let r=new Yc(e,t);return await r.connect(t),r}closeAllSubscriptions(e){for(let[t,r]of this.openSubs)r.close(e);this.openSubs.clear();for(let[t,r]of this.openEventPublishes)r.reject(new Error(e));this.openEventPublishes.clear();for(let[t,r]of this.openCountRequests)r.reject(new Error(e));this.openCountRequests.clear()}get connected(){return this._connected}async reconnect(){let e=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch{}},e)}handleHardClose(e){this.pingIntervalHandle&&(clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.enableReconnect&&!this.skipReconnection?this.reconnect():(this.onclose?.(),this.closeAllSubscriptions(e))}async connect(e){let t;return this.connectionPromise?this.connectionPromise:(this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((r,n)=>{e?.timeout&&(t=setTimeout(()=>{n("connection timed out"),this.connectionPromise=void 0,this.skipReconnection=!0,this.onclose?.(),this.handleHardClose("relay connection timed out")},e.timeout)),e?.abort&&(e.abort.onabort=n);try{this.ws=new this._WebSocket(this.url)}catch(i){clearTimeout(t),n(i);return}this.ws.onopen=()=>{this.reconnectTimeoutHandle&&(clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0),clearTimeout(t),this._connected=!0;let i=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let a of this.openSubs.values()){if(a.eosed=!1,i)for(let f=0;f<a.filters.length;f++)a.lastEmitted&&(a.filters[f].since=a.lastEmitted+1);a.fire()}this.enablePing&&(this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency)),r()},this.ws.onerror=()=>{clearTimeout(t),n("connection failed"),this.connectionPromise=void 0,this.skipReconnection=!0,this.onclose?.(),this.handleHardClose("relay connection failed")},this.ws.onclose=i=>{clearTimeout(t),n(i.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise)}waitForPingPong(){return new Promise(e=>{this.ws.once("pong",()=>e(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((e,t)=>{if(!this.connectionPromise)return t(new Error(`no connection to ${this.url}, can't ping`));try{let r=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{e(!0),r.close()},onclose(){e(!0)},eoseTimeout:this.pingTimeout+1e3})}catch(r){t(r)}})}async pingpong(){this.ws?.readyState===1&&(await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(t=>setTimeout(()=>t(!1),this.pingTimeout))])||this.ws?.readyState===this._WebSocket.OPEN&&this.ws?.close())}async send(e){if(!this.connectionPromise)throw new Zc(e,this.url);this.connectionPromise.then(()=>{this.ws?.send(e)})}async auth(e){let t=this.challenge;if(!t)throw new Error("can't perform auth, no challenge was received");return this.authPromise?this.authPromise:(this.authPromise=new Promise(async(r,n)=>{try{let i=await e(Vc(this.url,t)),a=setTimeout(()=>{let f=this.openEventPublishes.get(i.id);f&&(f.reject(new Error("auth timed out")),this.openEventPublishes.delete(i.id))},this.publishTimeout);this.openEventPublishes.set(i.id,{resolve:r,reject:n,timeout:a}),this.send('["AUTH",'+JSON.stringify(i)+"]")}catch(i){console.warn("subscribe auth function failed:",i)}}),this.authPromise)}async publish(e){this.idleSince=void 0,this.ongoingOperations++;let t=new Promise((r,n)=>{let i=setTimeout(()=>{let a=this.openEventPublishes.get(e.id);a&&(a.reject(new Error("publish timed out")),this.openEventPublishes.delete(e.id))},this.publishTimeout);this.openEventPublishes.set(e.id,{resolve:r,reject:n,timeout:i})});return this.send('["EVENT",'+JSON.stringify(e)+"]"),this.ongoingOperations--,this.ongoingOperations===0&&(this.idleSince=Date.now()),t}async count(e,t){this.serial++;let r=t?.id||"count:"+this.serial,n=new Promise((i,a)=>{this.openCountRequests.set(r,{resolve:i,reject:a})});return this.send('["COUNT","'+r+'",'+JSON.stringify(e).substring(1)),n}subscribe(e,t){t.label!=="<forced-ping>"&&(this.idleSince=void 0,this.ongoingOperations++);let r=this.prepareSubscription(e,t);return r.fire(),t.abort&&(t.abort.onabort=()=>r.close(String(t.abort.reason||"<aborted>"))),r}prepareSubscription(e,t){this.serial++;let r=t.id||(t.label?t.label+":":"sub:")+this.serial,n=new ap(this,r,e,t);return this.openSubs.set(r,n),n}close(){this.skipReconnection=!0,this.reconnectTimeoutHandle&&(clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0),this.pingIntervalHandle&&(clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0),this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.idleSince=void 0,this.onclose?.(),this.ws?.readyState===this._WebSocket.OPEN&&this.ws?.close()}_onmessage(e){let t=e.data;if(!t)return;let r=Kc(t);if(r){let n=this.openSubs.get(r);if(!n)return;let i=Jr(t,"id"),a=n.alreadyHaveEvent?.(i);if(n.receivedEvent?.(this,i),a)return}try{let n=JSON.parse(t);switch(n[0]){case"EVENT":{let i=this.openSubs.get(n[1]),a=n[2];this.verifyEvent(a)&&tp(i.filters,a)?i.onevent(a):i.oninvalidevent?.(a),(!i.lastEmitted||i.lastEmitted<a.created_at)&&(i.lastEmitted=a.created_at);return}case"COUNT":{let i=n[1],a=n[2],f=this.openCountRequests.get(i);f&&(f.resolve(a.count),this.openCountRequests.delete(i));return}case"EOSE":{let i=this.openSubs.get(n[1]);if(!i)return;i.receivedEose();return}case"OK":{let i=n[1],a=n[2],f=n[3],b=this.openEventPublishes.get(i);b&&(clearTimeout(b.timeout),a?b.resolve(f):b.reject(new Error(f)),this.openEventPublishes.delete(i));return}case"CLOSED":{let i=n[1],a=this.openSubs.get(i);if(!a)return;a.closed=!0,a.close(n[2]);return}case"NOTICE":{this.onnotice(n[1]);return}case"AUTH":{this.challenge=n[1],this.onauth&&this.auth(this.onauth);return}default:{this.openSubs.get(n[1])?.oncustom?.(n);return}}}catch(n){try{let[i,a,f]=JSON.parse(t);console.warn(`[nostr] relay ${this.url} error processing message:`,n,f)}catch{console.warn(`[nostr] relay ${this.url} error processing message:`,n)}return}}},ap=class{constructor(e,t,r,n){J(this,"relay");J(this,"id");J(this,"lastEmitted");J(this,"closed",!1);J(this,"eosed",!1);J(this,"filters");J(this,"alreadyHaveEvent");J(this,"receivedEvent");J(this,"onevent");J(this,"oninvalidevent");J(this,"oneose");J(this,"onclose");J(this,"oncustom");J(this,"eoseTimeout");J(this,"eoseTimeoutHandle");if(r.length===0)throw new Error("subscription can't be created with zero filters");this.relay=e,this.filters=r,this.id=t,this.alreadyHaveEvent=n.alreadyHaveEvent,this.receivedEvent=n.receivedEvent,this.eoseTimeout=n.eoseTimeout||e.baseEoseTimeout,this.oneose=n.oneose,this.onclose=n.onclose,this.oninvalidevent=n.oninvalidevent,this.onevent=n.onevent||(i=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,i)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){this.eosed||(clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.())}close(e="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch(t){if(!(t instanceof Zc))throw t}this.closed=!0}this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0&&(this.relay.idleSince=Date.now()),this.onclose?.(e)}},qc;try{qc=WebSocket}catch{}var zc=class extends Yc{constructor(e,t){super(e,{verifyEvent:Qr,websocketImplementation:qc,...t})}static async connect(e,t){let r=new zc(e,t);return await r.connect(),r}},cp;try{cp=WebSocket}catch{}var ii={};xe(ii,{BECH32_REGEX:()=>Qc,Bech32MaxSize:()=>Pi,NostrTypeGuard:()=>lp,decode:()=>Xr,decodeNostrURI:()=>hp,encodeBytes:()=>to,naddrEncode:()=>bp,neventEncode:()=>gp,noteEncode:()=>pp,nprofileEncode:()=>yp,npubEncode:()=>dp,nsecEncode:()=>fp});var lp={isNProfile:e=>/^nprofile1[a-z\d]+$/.test(e||""),isNEvent:e=>/^nevent1[a-z\d]+$/.test(e||""),isNAddr:e=>/^naddr1[a-z\d]+$/.test(e||""),isNSec:e=>/^nsec1[a-z\d]{58}$/.test(e||""),isNPub:e=>/^npub1[a-z\d]{58}$/.test(e||""),isNote:e=>/^note1[a-z\d]+$/.test(e||""),isNcryptsec:e=>/^ncryptsec1[a-z\d]+$/.test(e||"")},Pi=5e3,Qc=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function up(e){let t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t}function hp(e){try{return e.startsWith("nostr:")&&(e=e.substring(6)),Xr(e)}catch{return{type:"invalid",data:null}}}function Xr(e){let{prefix:t,words:r}=Sn.decode(e,Pi),n=new Uint8Array(Sn.fromWords(r));switch(t){case"nprofile":{let i=Bo(n);if(!i[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(i[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Oe(i[0][0]),relays:i[1]?i[1].map(a=>Rt.decode(a)):[]}}}case"nevent":{let i=Bo(n);if(!i[0]?.[0])throw new Error("missing TLV 0 for nevent");if(i[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(i[2]&&i[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(i[3]&&i[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Oe(i[0][0]),relays:i[1]?i[1].map(a=>Rt.decode(a)):[],author:i[2]?.[0]?Oe(i[2][0]):void 0,kind:i[3]?.[0]?parseInt(Oe(i[3][0]),16):void 0}}}case"naddr":{let i=Bo(n);if(!i[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!i[2]?.[0])throw new Error("missing TLV 2 for naddr");if(i[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!i[3]?.[0])throw new Error("missing TLV 3 for naddr");if(i[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Rt.decode(i[0][0]),pubkey:Oe(i[2][0]),kind:parseInt(Oe(i[3][0]),16),relays:i[1]?i[1].map(a=>Rt.decode(a)):[]}}}case"nsec":return{type:t,data:n};case"npub":case"note":return{type:t,data:Oe(n)};default:throw new Error(`unknown prefix ${t}`)}}function Bo(e){let t={},r=e;for(;r.length>0;){let n=r[0],i=r[1],a=r.slice(2,2+i);if(r=r.slice(2+i),a.length<i)throw new Error(`not enough data to read on TLV ${n}`);t[n]=t[n]||[],t[n].push(a)}return t}function fp(e){return to("nsec",e)}function dp(e){return to("npub",_e(e))}function pp(e){return to("note",_e(e))}function eo(e,t){let r=Sn.toWords(t);return Sn.encode(e,r,Pi)}function to(e,t){return eo(e,t)}function yp(e){let t=ki({0:[_e(e.pubkey)],1:(e.relays||[]).map(r=>ut.encode(r))});return eo("nprofile",t)}function gp(e){let t;e.kind!==void 0&&(t=up(e.kind));let r=ki({0:[_e(e.id)],1:(e.relays||[]).map(n=>ut.encode(n)),2:e.author?[_e(e.author)]:[],3:t?[new Uint8Array(t)]:[]});return eo("nevent",r)}function bp(e){let t=new ArrayBuffer(4);new DataView(t).setUint32(0,e.kind,!1);let r=ki({0:[ut.encode(e.identifier)],1:(e.relays||[]).map(n=>ut.encode(n)),2:[_e(e.pubkey)],3:[new Uint8Array(t)]});return eo("naddr",r)}function ki(e){let t=[];return Object.entries(e).reverse().forEach(([r,n])=>{n.forEach(i=>{let a=new Uint8Array(i.length+2);a.set([parseInt(r)],0),a.set([i.length],1),a.set(i,2),t.push(a)})}),et(...t)}var si={};xe(si,{decrypt:()=>wp,encrypt:()=>Jc});function Jc(e,t,r){let n=e instanceof Uint8Array?e:_e(e),i=gi.getSharedSecret(n,_e("02"+t)),a=Xc(i),f=Uint8Array.from(Nn(16)),b=ut.encode(r),o=Tc(a,f).encrypt(b),p=Ft.encode(new Uint8Array(o)),d=Ft.encode(new Uint8Array(f.buffer));return`${p}?iv=${d}`}function wp(e,t,r){let n=e instanceof Uint8Array?e:_e(e),[i,a]=r.split("?iv="),f=gi.getSharedSecret(n,_e("02"+t)),b=Xc(f),o=Ft.decode(a),p=Ft.decode(i),d=Tc(b,o).decrypt(p);return Rt.decode(d)}function Xc(e){return e.slice(1,33)}var mp={};xe(mp,{NIP05_REGEX:()=>Li,isNip05:()=>vp,isValid:()=>Cp,queryProfile:()=>el,searchDomain:()=>_p,useFetchImplementation:()=>Ep});var Li=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,vp=e=>Li.test(e||""),no;try{no=fetch}catch{}function Ep(e){no=e}async function _p(e,t=""){try{let r=`https://${e}/.well-known/nostr.json?name=${t}`,n=await no(r,{redirect:"manual"});if(n.status!==200)throw Error("Wrong response code");return(await n.json()).names}catch{return{}}}async function el(e){let t=e.match(Li);if(!t)return null;let[,r="_",n]=t;try{let i=`https://${n}/.well-known/nostr.json?name=${r}`,a=await no(i,{redirect:"manual"});if(a.status!==200)throw Error("Wrong response code");let f=await a.json(),b=f.names[r];return b?{pubkey:b,relays:f.relays?.[b]}:null}catch{return null}}async function Cp(e,t){let r=await el(t);return r?r.pubkey===e:!1}var Ap={};xe(Ap,{parse:()=>Sp});function Sp(e){let t={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},r,n;for(let i=e.tags.length-1;i>=0;i--){let a=e.tags[i];if(a[0]==="e"&&a[1]){let[f,b,o,p,d]=a,h={id:b,relays:o?[o]:[],author:d};if(p==="root"){t.root=h;continue}if(p==="reply"){t.reply=h;continue}if(p==="mention"){t.mentions.push(h);continue}r?n=h:r=h,t.mentions.push(h);continue}if(a[0]==="q"&&a[1]){let[f,b,o]=a;t.quotes.push({id:b,relays:o?[o]:[]})}if(a[0]==="p"&&a[1]){t.profiles.push({pubkey:a[1],relays:a[2]?[a[2]]:[]});continue}}return t.root||(t.root=n||r||t.reply),t.reply||(t.reply=r||t.root),[t.reply,t.root].forEach(i=>{if(!i)return;let a=t.mentions.indexOf(i);if(a!==-1&&t.mentions.splice(a,1),i.author){let f=t.profiles.find(b=>b.pubkey===i.author);f&&f.relays&&(i.relays||(i.relays=[]),f.relays.forEach(b=>{i.relays?.indexOf(b)===-1&&i.relays.push(b)}),f.relays=i.relays)}}),t.mentions.forEach(i=>{if(i.author){let a=t.profiles.find(f=>f.pubkey===i.author);a&&a.relays&&(i.relays||(i.relays=[]),a.relays.forEach(f=>{i.relays.indexOf(f)===-1&&i.relays.push(f)}),a.relays=i.relays)}}),t}var Tp={};xe(Tp,{fetchRelayInformation:()=>Np,useFetchImplementation:()=>Op});var tl;try{tl=fetch}catch{}function Op(e){tl=e}async function Np(e){return await(await fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var xp={};xe(xp,{getPow:()=>Rp,minePow:()=>Pp});function Rp(e){let t=0;for(let r=0;r<64;r+=8){let n=parseInt(e.substring(r,r+8),16);if(n===0)t+=32;else{t+=Math.clz32(n);break}}return t}function Ip(e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];if(n===0)t+=8;else{t+=Math.clz32(n)-24;break}}return t}function Pp(e,t){let r=0,n=e,i=["nonce",r.toString(),t.toString()];for(n.tags.push(i);;){let a=Math.floor(new Date().getTime()/1e3);a!==n.created_at&&(r=0,n.created_at=a),i[1]=(++r).toString();let f=vt(ut.encode(JSON.stringify([0,n.pubkey,n.created_at,n.kind,n.tags,n.content])));if(Ip(f)>=t){n.id=Oe(f);break}}return n}var kp={};xe(kp,{unwrapEvent:()=>Wp,unwrapManyEvents:()=>Kp,wrapEvent:()=>pl,wrapManyEvents:()=>Gp});var Lp={};xe(Lp,{createRumor:()=>ul,createSeal:()=>hl,createWrap:()=>fl,unwrapEvent:()=>Fi,unwrapManyEvents:()=>dl,wrapEvent:()=>Br,wrapManyEvents:()=>Hp});var Gn={};xe(Gn,{decrypt:()=>Bi,encrypt:()=>Di,getConversationKey:()=>Ui,v2:()=>Fp});var nl=1,rl=65535;function Ui(e,t){let r=gi.getSharedSecret(e,_e("02"+t)).subarray(1,33);return w2(vt,r,ut.encode("nip44-v2"))}function ol(e,t){let r=m2(vt,e,t,76);return{chacha_key:r.subarray(0,32),chacha_nonce:r.subarray(32,44),hmac_key:r.subarray(44,76)}}function Mi(e){if(!Number.isSafeInteger(e)||e<1)throw new Error("expected positive integer");if(e<=32)return 32;let t=1<<Math.floor(Math.log2(e-1))+1,r=t<=256?32:t/8;return r*(Math.floor((e-1)/r)+1)}function Up(e){if(!Number.isSafeInteger(e)||e<nl||e>rl)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}function Mp(e){let t=ut.encode(e),r=t.length,n=Up(r),i=new Uint8Array(Mi(r)-r);return et(n,t,i)}function Dp(e){let t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(t<nl||t>rl||r.length!==t||e.length!==2+Mi(t))throw new Error("invalid padding");return Rt.decode(r)}function il(e,t,r){if(r.length!==32)throw new Error("AAD associated data must be 32 bytes");let n=et(r,t);return zn(vt,e,n)}function Bp(e){if(typeof e!="string")throw new Error("payload must be a valid string");let t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if(e[0]==="#")throw new Error("unknown encryption version");let r;try{r=Ft.decode(e)}catch(a){throw new Error("invalid base64: "+a.message)}let n=r.length;if(n<99||n>65603)throw new Error("invalid data length: "+n);let i=r[0];if(i!==2)throw new Error("unknown encryption version "+i);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}function Di(e,t,r=Nn(32)){let{chacha_key:n,chacha_nonce:i,hmac_key:a}=ol(t,r),f=Mp(e),b=xc(n,i,f),o=il(a,b,r);return Ft.encode(et(new Uint8Array([2]),r,b,o))}function Bi(e,t){let{nonce:r,ciphertext:n,mac:i}=Bp(e),{chacha_key:a,chacha_nonce:f,hmac_key:b}=ol(t,r),o=il(b,n,r);if(!Qf(o,i))throw new Error("invalid MAC");let p=xc(a,f,n);return Dp(p)}var Fp={utils:{getConversationKey:Ui,calcPaddedLen:Mi},encrypt:Di,decrypt:Bi},jp=2880*60,sl=()=>Math.round(Date.now()/1e3),al=()=>Math.round(sl()-Math.random()*jp),cl=(e,t)=>Ui(e,t),ll=(e,t,r)=>Di(JSON.stringify(e),cl(t,r)),Ma=(e,t)=>JSON.parse(Bi(e.content,cl(t,e.pubkey)));function ul(e,t){let r={created_at:sl(),content:"",tags:[],...e,pubkey:On(t)};return r.id=Kn(r),r}function hl(e,t,r){return yt({kind:Lc,content:ll(e,t,r),created_at:al(),tags:[]},t)}function fl(e,t){let r=Si();return yt({kind:Hc,content:ll(e,r,t),created_at:al(),tags:[["p",t]]},r)}function Br(e,t,r){let n=ul(e,t),i=hl(n,t,r);return fl(i,r)}function Hp(e,t,r){if(!r||r.length===0)throw new Error("At least one recipient is required.");let n=On(t),i=[Br(e,t,n)];return r.forEach(a=>{i.push(Br(e,t,a))}),i}function Fi(e,t){let r=Ma(e,t);return Ma(r,t)}function dl(e,t){let r=[];return e.forEach(n=>{r.push(Fi(n,t))}),r.sort((n,i)=>n.created_at-i.created_at),r}function $p(e,t,r,n){let i={created_at:Math.ceil(Date.now()/1e3),kind:Uc,tags:[],content:t};return(Array.isArray(e)?e:[e]).forEach(({publicKey:f,relayUrl:b})=>{i.tags.push(b?["p",f,b]:["p",f])}),n&&i.tags.push(["e",n.eventId,n.relayUrl||"","reply"]),r&&i.tags.push(["subject",r]),i}function pl(e,t,r,n,i){let a=$p(t,r,n,i);return Br(a,e,t.publicKey)}function Gp(e,t,r,n,i){if(!t||t.length===0)throw new Error("At least one recipient is required.");return[{publicKey:On(e)},...t].map(f=>pl(e,f,r,n,i))}var Wp=Fi,Kp=dl,Vp={};xe(Vp,{finishRepostEvent:()=>Zp,getRepostedEvent:()=>Yp,getRepostedEventPointer:()=>yl});function Zp(e,t,r,n){let i,a=[...e.tags??[],["e",t.id,r],["p",t.pubkey]];return t.kind===kc?i=Ni:(i=Ri,a.push(["k",String(t.kind)])),yt({kind:i,tags:a,content:e.content===""||t.tags?.find(f=>f[0]==="-")?"":JSON.stringify(t),created_at:e.created_at},n)}function yl(e){if(![Ni,Ri].includes(e.kind))return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let i=e.tags[n];i.length>=2&&(i[0]==="e"&&t===void 0?t=i:i[0]==="p"&&r===void 0&&(r=i))}if(t!==void 0)return{id:t[1],relays:[t[2],r?.[2]].filter(n=>typeof n=="string"),author:r?.[1]}}function Yp(e,{skipVerification:t}={}){let r=yl(e);if(r===void 0||e.content==="")return;let n;try{n=JSON.parse(e.content)}catch{return}if(n.id===r.id&&!(!t&&!Qr(n)))return n}var qp={};xe(qp,{NOSTR_URI_REGEX:()=>ji,parse:()=>Qp,test:()=>zp});var ji=new RegExp(`nostr:(${Qc.source})`);function zp(e){return typeof e=="string"&&new RegExp(`^${ji.source}$`).test(e)}function Qp(e){let t=e.match(new RegExp(`^${ji.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:Xr(t[1])}}var Jp={};xe(Jp,{finishReactionEvent:()=>Xp,getReactedEventPointer:()=>e4});function Xp(e,t,r){let n=t.tags.filter(i=>i.length>=2&&(i[0]==="e"||i[0]==="p"));return yt({...e,kind:xi,tags:[...e.tags??[],...n,["e",t.id],["p",t.pubkey]],content:e.content??"+"},r)}function e4(e){if(e.kind!==xi)return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let i=e.tags[n];i.length>=2&&(i[0]==="e"&&t===void 0?t=i:i[0]==="p"&&r===void 0&&(r=i))}if(!(t===void 0||r===void 0))return{id:t[1],relays:[t[2],r[2]].filter(n=>n!==void 0),author:r[1]}}var t4={};xe(t4,{parse:()=>r4});var Fo=/\W/m,Da=/[^\w\/] |[^\w\/]$|$|,| /m,n4=42;function*r4(e){let t=[];if(typeof e!="string"){for(let a=0;a<e.tags.length;a++){let f=e.tags[a];f[0]==="emoji"&&f.length>=3&&t.push({type:"emoji",shortcode:f[1],url:f[2]})}e=e.content}let r=e.length,n=0,i=0;e:for(;i<r;){let a=e.indexOf(":",i),f=e.indexOf("#",i);if(a===-1&&f===-1)break e;if(a===-1||f>=0&&f<a){if(f===0||e[f-1].match(Fo)){let b=e.slice(f+1,f+n4).match(Fo),o=b?f+1+b.index:r;yield{type:"text",text:e.slice(n,f)},yield{type:"hashtag",value:e.slice(f+1,o)},i=o,n=i;continue e}i=f+1;continue e}if(e.slice(a-5,a)==="nostr"){let b=e.slice(a+60).match(Fo),o=b?a+60+b.index:r;try{let p,{data:d,type:h}=Xr(e.slice(a+1,o));switch(h){case"npub":p={pubkey:d};break;case"note":p={id:d};break;case"nsec":i=o+1;continue;default:p=d}n!==a-5&&(yield{type:"text",text:e.slice(n,a-5)}),yield{type:"reference",pointer:p},i=o,n=i;continue e}catch{i=a+1;continue e}}else if(e.slice(a-5,a)==="https"||e.slice(a-4,a)==="http"){let b=e.slice(a+4).match(Da),o=b?a+4+b.index:r,p=e[a-1]==="s"?5:4;try{let d=new URL(e.slice(a-p,o));if(d.hostname.indexOf(".")===-1)throw new Error("invalid url");if(n!==a-p&&(yield{type:"text",text:e.slice(n,a-p)}),/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(d.pathname)){yield{type:"image",url:d.toString()},i=o,n=i;continue e}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(d.pathname)){yield{type:"video",url:d.toString()},i=o,n=i;continue e}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(d.pathname)){yield{type:"audio",url:d.toString()},i=o,n=i;continue e}yield{type:"url",url:d.toString()},i=o,n=i;continue e}catch{i=o+1;continue e}}else if(e.slice(a-3,a)==="wss"||e.slice(a-2,a)==="ws"){let b=e.slice(a+4).match(Da),o=b?a+4+b.index:r,p=e[a-1]==="s"?3:2;try{let d=new URL(e.slice(a-p,o));if(d.hostname.indexOf(".")===-1)throw new Error("invalid ws url");n!==a-p&&(yield{type:"text",text:e.slice(n,a-p)}),yield{type:"relay",url:d.toString()},i=o,n=i;continue e}catch{i=o+1;continue e}}else{for(let b=0;b<t.length;b++){let o=t[b];if(e[a+o.shortcode.length+1]===":"&&e.slice(a+1,a+o.shortcode.length+1)===o.shortcode){n!==a&&(yield{type:"text",text:e.slice(n,a)}),yield o,i=a+o.shortcode.length+2,n=i;continue e}}i=a+1;continue e}}n!==r&&(yield{type:"text",text:e.slice(n)})}var o4={};xe(o4,{channelCreateEvent:()=>i4,channelHideMessageEvent:()=>c4,channelMessageEvent:()=>a4,channelMetadataEvent:()=>s4,channelMuteUserEvent:()=>l4});var i4=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return yt({kind:Mc,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},s4=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return yt({kind:Dc,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},a4=(e,t)=>{let r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),yt({kind:Bc,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},c4=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return yt({kind:Fc,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},l4=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return yt({kind:jc,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)},u4={};xe(u4,{EMOJI_SHORTCODE_REGEX:()=>gl,matchAll:()=>h4,regex:()=>Hi,replaceAll:()=>f4});var gl=/:(\w+):/,Hi=()=>new RegExp(`\\B${gl.source}\\B`,"g");function*h4(e){let t=e.matchAll(Hi());for(let r of t)try{let[n,i]=r;yield{shortcode:n,name:i,start:r.index,end:r.index+n.length}}catch{}}function f4(e,t){return e.replaceAll(Hi(),(r,n)=>t({shortcode:r,name:n}))}var d4={};xe(d4,{useFetchImplementation:()=>p4,validateGithub:()=>y4});var $i;try{$i=fetch}catch{}function p4(e){$i=e}async function y4(e,t,r){try{return await(await $i(`https://gist.github.com/${t}/${r}/raw`)).text()===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}}var g4={};xe(g4,{makeNwcRequestEvent:()=>w4,parseConnectionString:()=>b4});function b4(e){let{host:t,pathname:r,searchParams:n}=new URL(e),i=r||t,a=n.get("relay"),f=n.get("secret");if(!i||!a||!f)throw new Error("invalid connection string");return{pubkey:i,relay:a,secret:f}}async function w4(e,t,r){let i=Jc(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:r}})),a={kind:Gc,created_at:Math.round(Date.now()/1e3),content:i,tags:[["p",e]]};return yt(a,t)}var m4={};xe(m4,{normalizeIdentifier:()=>v4});function v4(e){return e=e.trim().toLowerCase(),e=e.normalize("NFKC"),Array.from(e).map(t=>/\p{Letter}/u.test(t)||/\p{Number}/u.test(t)?t:"-").join("")}var E4={};xe(E4,{getSatoshisAmountFromBolt11:()=>O4,getZapEndpoint:()=>C4,makeZapReceipt:()=>T4,makeZapRequest:()=>A4,useFetchImplementation:()=>_4,validateZapRequest:()=>S4});var Gi;try{Gi=fetch}catch{}function _4(e){Gi=e}async function C4(e){try{let t="",{lud06:r,lud16:n}=JSON.parse(e.content);if(n){let[f,b]=n.split("@");t=new URL(`/.well-known/lnurlp/${f}`,`https://${b}`).toString()}else if(r){let{words:f}=Sn.decode(r,1e3),b=Sn.fromWords(f);t=Rt.decode(b)}else return null;let a=await(await Gi(t)).json();if(a.allowsNostr&&a.nostrPubkey)return a.callback}catch{}return null}function A4(e){let t={kind:9734,created_at:Math.round(Date.now()/1e3),content:e.comment||"",tags:[["p","pubkey"in e?e.pubkey:e.event.pubkey],["amount",e.amount.toString()],["relays",...e.relays]]};if("event"in e){if(t.tags.push(["e",e.event.id]),Ti(e.event.kind)){let r=["a",`${e.event.kind}:${e.event.pubkey}:`];t.tags.push(r)}else if(Oi(e.event.kind)){let r=e.event.tags.find(([i,a])=>i==="d"&&a);if(!r)throw new Error("d tag not found or is empty");let n=["a",`${e.event.kind}:${e.event.pubkey}:${r[1]}`];t.tags.push(n)}t.tags.push(["k",e.event.kind.toString()])}return t}function S4(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!Ci(t))return"Zap request is not a valid Nostr event.";if(!Qr(t))return"Invalid signature on zap request.";let r=t.tags.find(([a,f])=>a==="p"&&f);if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let n=t.tags.find(([a,f])=>a==="e"&&f);return n&&!n[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([a,f])=>a==="relays"&&f)?null:"Zap request doesn't have a 'relays' tag."}function T4({zapRequest:e,preimage:t,bolt11:r,paidAt:n}){let i=JSON.parse(e),a=i.tags.filter(([b])=>b==="e"||b==="p"||b==="a"),f={kind:9735,created_at:Math.round(n.getTime()/1e3),content:"",tags:[...a,["P",i.pubkey],["bolt11",r],["description",e]]};return t&&f.tags.push(["preimage",t]),f}function O4(e){if(e.length<50)return 0;e=e.substring(0,50);let t=e.lastIndexOf("1");if(t===-1)return 0;let r=e.substring(0,t);if(!r.startsWith("lnbc"))return 0;let n=r.substring(4);if(n.length<1)return 0;let i=n[n.length-1],a=i.charCodeAt(0)-48,f=a>=0&&a<=9,b=n.length-1;if(f&&b++,b<1)return 0;let o=parseInt(n.substring(0,b));switch(i){case"m":return o*1e5;case"u":return o*100;case"n":return o/10;case"p":return o/1e4;default:return o*1e8}}var N4={};xe(N4,{Negentropy:()=>wl,NegentropyStorageVector:()=>I4,NegentropySync:()=>P4});var jo=97,Cn=32,bl=16,en={Skip:0,Fingerprint:1,IdList:2},Nt=class{constructor(e){J(this,"_raw");J(this,"length");typeof e=="number"?(this._raw=new Uint8Array(e),this.length=0):e instanceof Uint8Array?(this._raw=new Uint8Array(e),this.length=e.length):(this._raw=new Uint8Array(512),this.length=0)}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(e){if(e instanceof Nt&&(e=e.unwrap()),typeof e.length!="number")throw Error("bad length");let t=e.length+this.length;if(this.capacity<t){let r=this._raw,n=Math.max(this.capacity*2,t);this._raw=new Uint8Array(n),this._raw.set(r)}this._raw.set(e,this.length),this.length+=e.length}shift(){let e=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,e}shiftN(e=1){let t=this._raw.subarray(0,e);return this._raw=this._raw.subarray(e),this.length-=e,t}};function Sr(e){let t=0;for(;;){if(e.length===0)throw Error("parse ends prematurely");let r=e.shift();if(t=t<<7|r&127,(r&128)===0)break}return t}function Ot(e){if(e===0)return new Nt(new Uint8Array([0]));let t=[];for(;e!==0;)t.push(e&127),e>>>=7;t.reverse();for(let r=0;r<t.length-1;r++)t[r]|=128;return new Nt(new Uint8Array(t))}function x4(e){return xr(e,1)[0]}function xr(e,t){if(e.length<t)throw Error("parse ends prematurely");return e.shiftN(t)}var R4=class{constructor(){J(this,"buf");this.setToZero()}setToZero(){this.buf=new Uint8Array(Cn)}add(e){let t=0,r=0,n=new DataView(this.buf.buffer),i=new DataView(e.buffer);for(let a=0;a<8;a++){let f=a*4,b=n.getUint32(f,!0),o=i.getUint32(f,!0),p=b;p+=t,p+=o,p>4294967295&&(r=1),n.setUint32(f,p&4294967295,!0),t=r,r=0}}negate(){let e=new DataView(this.buf.buffer);for(let r=0;r<8;r++){let n=r*4;e.setUint32(n,~e.getUint32(n,!0))}let t=new Uint8Array(Cn);t[0]=1,this.add(t)}getFingerprint(e){let t=new Nt;return t.extend(this.buf),t.extend(Ot(e)),vt(t.unwrap()).subarray(0,bl)}},I4=class{constructor(){J(this,"items");J(this,"sealed");this.items=[],this.sealed=!1}insert(e,t){if(this.sealed)throw Error("already sealed");let r=_e(t);if(r.byteLength!==Cn)throw Error("bad id size for added item");this.items.push({timestamp:e,id:r})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Ho);for(let e=1;e<this.items.length;e++)if(Ho(this.items[e-1],this.items[e])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(e){if(this._checkSealed(),e>=this.items.length)throw Error("out of range");return this.items[e]}iterate(e,t,r){this._checkSealed(),this._checkBounds(e,t);for(let n=e;n<t&&r(this.items[n],n);++n);}findLowerBound(e,t,r){return this._checkSealed(),this._checkBounds(e,t),this._binarySearch(this.items,e,t,n=>Ho(n,r)<0)}fingerprint(e,t){let r=new R4;return r.setToZero(),this.iterate(e,t,n=>(r.add(n.id),!0)),r.getFingerprint(t-e)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(e,t){if(e>t||t>this.items.length)throw Error("bad range")}_binarySearch(e,t,r,n){let i=r-t;for(;i>0;){let a=t,f=Math.floor(i/2);a+=f,n(e[a])?(t=++a,i-=f+1):i=f}return t}},wl=class{constructor(e,t=6e4){J(this,"storage");J(this,"frameSizeLimit");J(this,"lastTimestampIn");J(this,"lastTimestampOut");if(t<4096)throw Error("frameSizeLimit too small");this.storage=e,this.frameSizeLimit=t,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(e,t){return{timestamp:e,id:t||new Uint8Array(0)}}initiate(){let e=new Nt;return e.extend(new Uint8Array([jo])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),e),Oe(e.unwrap())}reconcile(e,t,r){let n=new Nt(_e(e));this.lastTimestampIn=this.lastTimestampOut=0;let i=new Nt;i.extend(new Uint8Array([jo]));let a=x4(n);if(a<96||a>111)throw Error("invalid negentropy protocol version byte");if(a!==jo)throw Error("unsupported negentropy protocol version requested: "+(a-96));let f=this.storage.size(),b=this._bound(0),o=0,p=!1;for(;n.length!==0;){let d=new Nt,h=()=>{p&&(p=!1,d.extend(this.encodeBound(b)),d.extend(Ot(en.Skip)))},u=this.decodeBound(n),c=Sr(n),s=o,l=this.storage.findLowerBound(o,f,u);if(c===en.Skip)p=!0;else if(c===en.Fingerprint){let g=xr(n,bl),w=this.storage.fingerprint(s,l);ml(g,w)!==0?(h(),this.splitRange(s,l,u,d)):p=!0}else if(c===en.IdList){let g=Sr(n),w={};for(let y=0;y<g;y++){let v=xr(n,Cn);w[Oe(v)]=v}if(p=!0,this.storage.iterate(s,l,y=>{let v=y.id,m=Oe(v);return w[m]?delete w[Oe(v)]:t?.(m),!0}),r)for(let y of Object.values(w))r(Oe(y))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(i.length+d.length)){let g=this.storage.fingerprint(l,f);i.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),i.extend(Ot(en.Fingerprint)),i.extend(g);break}else i.extend(d);o=l,b=u}return i.length===1?null:Oe(i.unwrap())}splitRange(e,t,r,n){let i=t-e,a=16;if(i<a*2)n.extend(this.encodeBound(r)),n.extend(Ot(en.IdList)),n.extend(Ot(i)),this.storage.iterate(e,t,f=>(n.extend(f.id),!0));else{let f=Math.floor(i/a),b=i%a,o=e;for(let p=0;p<a;p++){let d=f+(p<b?1:0),h=this.storage.fingerprint(o,o+d);o+=d;let u;if(o===t)u=r;else{let c,s;this.storage.iterate(o-1,o+1,(l,g)=>(g===o-1?c=l:s=l,!0)),u=this.getMinimalBound(c,s)}n.extend(this.encodeBound(u)),n.extend(Ot(en.Fingerprint)),n.extend(h)}}}exceededFrameSizeLimit(e){return e>this.frameSizeLimit-200}decodeTimestampIn(e){let t=Sr(e);return t=t===0?Number.MAX_VALUE:t-1,this.lastTimestampIn===Number.MAX_VALUE||t===Number.MAX_VALUE?(this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE):(t+=this.lastTimestampIn,this.lastTimestampIn=t,t)}decodeBound(e){let t=this.decodeTimestampIn(e),r=Sr(e);if(r>Cn)throw Error("bound key too long");let n=xr(e,r);return{timestamp:t,id:n}}encodeTimestampOut(e){if(e===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,Ot(0);let t=e;return e-=this.lastTimestampOut,this.lastTimestampOut=t,Ot(e+1)}encodeBound(e){let t=new Nt;return t.extend(this.encodeTimestampOut(e.timestamp)),t.extend(Ot(e.id.length)),t.extend(e.id),t}getMinimalBound(e,t){if(t.timestamp!==e.timestamp)return this._bound(t.timestamp);{let r=0,n=t.id,i=e.id;for(let a=0;a<Cn&&n[a]===i[a];a++)r++;return this._bound(t.timestamp,t.id.subarray(0,r+1))}}};function ml(e,t){for(let r=0;r<e.byteLength;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return e.byteLength>t.byteLength?1:e.byteLength<t.byteLength?-1:0}function Ho(e,t){return e.timestamp===t.timestamp?ml(e.id,t.id):e.timestamp-t.timestamp}var P4=class{constructor(e,t,r,n={}){J(this,"relay");J(this,"storage");J(this,"neg");J(this,"filter");J(this,"subscription");J(this,"onhave");J(this,"onneed");this.relay=e,this.storage=t,this.neg=new wl(t),this.onhave=n.onhave,this.onneed=n.onneed,this.filter=r,this.subscription=this.relay.prepareSubscription([{}],{label:n.label||"negentropy"}),this.subscription.oncustom=i=>{switch(i[0]){case"NEG-MSG":{i.length<3&&console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${i}`);try{let a=this.neg.reconcile(i[2],this.onhave,this.onneed);a?this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${a}"]`):(this.close(),n.onclose?.())}catch(a){console.error("negentropy reconcile error:",a),n?.onclose?.(`reconcile error: ${a}`)}break}case"NEG-CLOSE":{let a=i[2];console.warn("negentropy error:",a),n.onclose?.(a);break}case"NEG-ERR":n.onclose?.()}}}async start(){let e=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${e}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},k4={};xe(k4,{getToken:()=>L4,hashPayload:()=>Wi,unpackEventFromToken:()=>El,validateEvent:()=>Ol,validateEventKind:()=>Cl,validateEventMethodTag:()=>Sl,validateEventPayloadTag:()=>Tl,validateEventTimestamp:()=>_l,validateEventUrlTag:()=>Al,validateToken:()=>U4});var vl="Nostr ";async function L4(e,t,r,n=!1,i){let a={kind:Ii,tags:[["u",e],["method",t]],created_at:Math.round(new Date().getTime()/1e3),content:""};i&&a.tags.push(["payload",Wi(i)]);let f=await r(a);return(n?vl:"")+Ft.encode(ut.encode(JSON.stringify(f)))}async function U4(e,t,r){let n=await El(e).catch(a=>{throw a});return await Ol(n,t,r).catch(a=>{throw a})}async function El(e){if(!e)throw new Error("Missing token");e=e.replace(vl,"");let t=Rt.decode(Ft.decode(e));if(!t||t.length===0||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)}function _l(e){return e.created_at?Math.round(new Date().getTime()/1e3)-e.created_at<60:!1}function Cl(e){return e.kind===Ii}function Al(e,t){let r=e.tags.find(n=>n[0]==="u");return r?r.length>0&&r[1]===t:!1}function Sl(e,t){let r=e.tags.find(n=>n[0]==="method");return r?r.length>0&&r[1].toLowerCase()===t.toLowerCase():!1}function Wi(e){let t=vt(ut.encode(JSON.stringify(e)));return Oe(t)}function Tl(e,t){let r=e.tags.find(i=>i[0]==="payload");if(!r)return!1;let n=Wi(t);return r.length>0&&r[1]===n}async function Ol(e,t,r,n){if(!Qr(e))throw new Error("Invalid nostr event, signature invalid");if(!Cl(e))throw new Error("Invalid nostr event, kind invalid");if(!_l(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!Al(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!Sl(e,r))throw new Error("Invalid nostr event, method tag invalid");if(n&&typeof n=="object"&&Object.keys(n).length>0&&!Tl(e,n))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0}var Et=class extends Error{constructor(t,r){super(t),this.code=r}},Fr=class extends Et{},ai=class extends Et{},jr=class extends Et{},Hr=class extends jr{},$r=class extends jr{},Gr=class extends Et{},Wr=class extends Et{},Vn=class extends Et{},ci=class extends Et{},li=class extends Et{};function Tr(e){try{e.indexOf("://")===-1&&(e="wss://"+e);let t=new URL(e);return t.protocol==="http:"?t.protocol="ws:":t.protocol==="https:"&&(t.protocol="wss:"),t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),(t.port==="80"&&t.protocol==="ws:"||t.port==="443"&&t.protocol==="wss:")&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}catch{throw new Error(`Invalid URL: ${e}`)}}var M4=1e3,D4=300*1e3,B4=1e3,Kr=class{constructor(){this.relays=new Map,this.enablePing=!1,this.maxWaitForConnection=3e3}async ensureRelay(t,r){t=Tr(t);let n=this.relays.get(t);n||(n=new zc(t,{enablePing:this.enablePing,enableReconnect:!1}),n.onclose=()=>{this.relays.delete(t)},this.relays.set(t,n));try{await n.connect({timeout:r?.connectionTimeout,abort:r?.abort})}catch(i){throw this.relays.delete(t),i}return n}close(t){t.map(Tr).forEach(r=>{this.relays.get(r)?.close(),this.relays.delete(r)})}subscribe(t,r,n){let i=[],a=new Set;for(let c of t){let s=Tr(c);a.has(s)||(a.add(s),i.push(s))}let f=!1,b=new Map,o=new Set,p=new Set,d=c=>{if(p.has(c))return!0;if(p.add(c),p.size>B4){let s=p.values().next().value;s!==void 0&&p.delete(s)}return!1},h=c=>{if(f)return Promise.resolve();let s=Math.min(M4*2**c,D4);return new Promise(l=>{let g=setTimeout(()=>{o.delete(w),l()},s),w=()=>{clearTimeout(g),o.delete(w),l()};o.add(w)})},u=async c=>{let s=0;for(;!f;){let l;try{l=await this.ensureRelay(c,{connectionTimeout:this.maxWaitForConnection,abort:n.abort})}catch(w){if(f)return;let y=w?.message||String(w);n.ondisconnect?.(c,y),await h(s++);continue}if(f)return;n.onconnect?.(c),s=0;let g=await new Promise(w=>{let y=l.subscribe([r],{eoseTimeout:1,onevent:n.onevent,onclose:w,abort:n.abort,alreadyHaveEvent:d});b.set(c,y)});if(b.delete(c),f)return;n.ondisconnect?.(c,g),await h(s++)}};return i.forEach(c=>{u(c)}),{close(c){f||(f=!0,o.forEach(s=>s()),o.clear(),b.forEach(s=>s.close(c)),b.clear())}}}publish(t,r,n){return t.map(Tr).map(async(i,a,f)=>{if(f.indexOf(i)!==a)return Promise.reject("duplicate url");let b;try{b=await this.ensureRelay(i,{connectionTimeout:this.maxWaitForConnection,abort:n?.abort})}catch(o){return"connection failure: "+String(o)}return b.publish(r)})}listConnectionStatus(){let t=new Map;return this.relays.forEach((r,n)=>t.set(n,r.connected)),t}destroy(){this.relays.forEach(t=>t.close()),this.relays=new Map}},Ba=/^[0-9a-f]{64}$/,jt=class e{static parseWalletConnectUrl(t,r=!1){t=t.replace("nostrwalletconnect://","http://").replace("nostr+walletconnect://","http://").replace("nostrwalletconnect:","http://").replace("nostr+walletconnect:","http://");let n=new URL(t),i=n.searchParams.getAll("relay"),a={walletPubkey:n.host,relayUrls:i},f=n.searchParams.get("secret");f&&(a.secret=f);let b=n.searchParams.get("lud16");if(b&&(a.lud16=b),!a.walletPubkey)throw new Error("Invalid NWC URL: missing wallet pubkey");if(!Ba.test(a.walletPubkey))throw new Error("Invalid NWC URL: invalid wallet pubkey");if(!a.relayUrls?.length)throw new Error("Invalid NWC URL: no relay URLs provided");for(let o of a.relayUrls)try{new URL(o)}catch{throw new Error(`Invalid relay URL: ${o}`)}if(r&&!a.secret)throw new Error("Invalid NWC URL: missing secret parameter");if(a.secret&&!Ba.test(a.secret))throw new Error("Invalid NWC URL: invalid secret");return a}constructor(t){t&&t.nostrWalletConnectUrl&&(t={...e.parseWalletConnectUrl(t.nostrWalletConnectUrl,t.requireSecret),...t}),this.options={...t||{}},this.relayUrls=this.options.relayUrls,this.logger=t?.logger||$a,this.pool=new Kr,this.options.secret&&(this.secret=this.options.secret.toLowerCase().startsWith("nsec")?ii.decode(this.options.secret).data:this.options.secret),this.lud16=this.options.lud16,this.walletPubkey=this.options.walletPubkey.toLowerCase().startsWith("npub")?ii.decode(this.options.walletPubkey).data:this.options.walletPubkey}get nostrWalletConnectUrl(){return this.getNostrWalletConnectUrl()}getNostrWalletConnectUrl(t=!0){let r=`nostr+walletconnect://${this.walletPubkey}?relay=${this.relayUrls.join("&relay=")}&pubkey=${this.publicKey}`;return t&&(r=`${r}&secret=${this.secret}`),this.lud16&&(r=`${r}&lud16=${this.lud16}`),r}get connected(){let t=Array.from(this.pool.listConnectionStatus().values());return!!t.length&&t.includes(!0)}get publicKey(){if(!this.secret)throw new Error("Missing secret key");return On(_e(this.secret))}get encryptionType(){if(!this._encryptionType)throw new Error("Missing encryption or version");return this._encryptionType}getPublicKey(){return Promise.resolve(this.publicKey)}signEvent(t){if(!this.secret)throw new Error("Missing secret key");return Promise.resolve(yt(t,_e(this.secret)))}getEventHash(t){return Kn(t)}close(){return this.pool.close(this.relayUrls)}async encrypt(t,r){if(!this.secret)throw new Error("Missing secret");let n;if(this.encryptionType==="nip04")n=await si.encrypt(this.secret,t,r);else{let i=Gn.getConversationKey(_e(this.secret),t);n=Gn.encrypt(r,i)}return n}async decrypt(t,r){if(!this.secret)throw new Error("Missing secret");let n;if(this.encryptionType==="nip04")n=await si.decrypt(this.secret,t,r);else{let i=Gn.getConversationKey(_e(this.secret),t);n=Gn.decrypt(r,i)}return n}static getAuthorizationUrl(t,r={},n){if(t.indexOf("/#/")>-1)throw new Error("hash router paths not supported");let i=new URL(t);return r.name&&i.searchParams.set("name",r.name),i.searchParams.set("pubkey",n),r.returnTo&&i.searchParams.set("return_to",r.returnTo),r.budgetRenewal&&i.searchParams.set("budget_renewal",r.budgetRenewal),r.expiresAt&&i.searchParams.set("expires_at",Math.floor(r.expiresAt.getTime()/1e3).toString()),r.maxAmount&&i.searchParams.set("max_amount",r.maxAmount.toString()),r.requestMethods&&i.searchParams.set("request_methods",r.requestMethods.join(" ")),r.notificationTypes&&i.searchParams.set("notification_types",r.notificationTypes.join(" ")),r.isolated&&i.searchParams.set("isolated","true"),r.metadata&&i.searchParams.set("metadata",JSON.stringify(r.metadata)),i}static fromAuthorizationUrl(t,r={},n){n=n||Oe(Si()),r.name||(r.name=document.location.host);let i=this.getAuthorizationUrl(t,r,On(_e(n))),a=600,f=400,b=window.outerHeight/2+window.screenY-a/2,o=window.outerWidth/2+window.screenX-f/2;return new Promise((p,d)=>{let h=window.open(i.toString(),`${document.title} - Wallet Connect`,`height=${a},width=${f},top=${b},left=${o}`);if(!h){d(new Error("failed to execute window.open"));return}let u=()=>{h&&h.closed&&(clearInterval(s),window.removeEventListener("message",c),d(new Error("Popup closed")))},c=l=>{let g=l.data;if(g&&g.type==="nwc:success"&&l.origin===`${i.protocol}//${i.host}`){if(!g.relayUrls&&g.relayUrl&&(g.relayUrls=[g.relayUrl]),!g.relayUrls){d(new Error("no relayUrls or relayUrl in response"));return}if(!g.walletPubkey){d(new Error("no walletPubkey in response"));return}p(new e({relayUrls:g.relayUrls,walletPubkey:g.walletPubkey,secret:n,lud16:g.lud16})),clearInterval(s),window.removeEventListener("message",c),h&&h.close()}},s=setInterval(u,500);window.addEventListener("message",c)})}async getWalletServiceInfo(){await this._checkConnected();let t=await new Promise((b,o)=>{let p=!1,d=setTimeout(()=>{p||(p=!0,h.close(),o(new Error("no info event (kind 13194) returned from relay")))},1e4),h=this.pool.subscribe(this.relayUrls,{kinds:[13194],limit:1,authors:[this.walletPubkey]},{onevent:u=>{p||(p=!0,clearTimeout(d),h.close(),b(u))}})}),r=t.content,n=t.tags.find(b=>b[0]==="notifications"),i=t.tags.find(b=>b[0]==="v"),a=t.tags.find(b=>b[0]==="encryption"),f=["nip04"];return i&&i[1].includes("1.0")&&f.push("nip44_v2"),a&&(f=a[1].split(" ")),{encryptions:f,capabilities:r.split(/[ |,]/g),notifications:n?.[1]?.split(" ")||[]}}async getInfo(){try{return await this.executeNip47Request("get_info",{},r=>!!r.methods,{replyTimeout:1e4})}catch(t){throw console.error("Failed to request get_info",t),t}}async getBudget(){try{return await this.executeNip47Request("get_budget",{},r=>r!==void 0,{replyTimeout:1e4})}catch(t){throw console.error("Failed to request get_budget",t),t}}async getBalance(){try{return await this.executeNip47Request("get_balance",{},r=>r.balance!==void 0,{replyTimeout:1e4})}catch(t){throw console.error("Failed to request get_balance",t),t}}async payInvoice(t){try{return await this.executeNip47Request("pay_invoice",t,n=>!!n)}catch(r){throw console.error("Failed to request pay_invoice",r),r}}async payKeysend(t){try{return await this.executeNip47Request("pay_keysend",t,n=>!!n.preimage)}catch(r){throw console.error("Failed to request pay_keysend",r),r}}async signMessage(t){try{return await this.executeNip47Request("sign_message",t,n=>n.message===t.message&&!!n.signature)}catch(r){throw console.error("Failed to request sign_message",r),r}}async createConnection(t){try{return await this.executeNip47Request("create_connection",t,n=>!!n.wallet_pubkey)}catch(r){throw console.error("Failed to request create_connection",r),r}}async multiPayInvoice(t){try{return{invoices:await this.executeMultiNip47Request("multi_pay_invoice",t,t.invoices.length,n=>!!n.preimage),errors:[]}}catch(r){throw console.error("Failed to request multi_pay_invoice",r),r}}async multiPayKeysend(t){try{return{keysends:await this.executeMultiNip47Request("multi_pay_keysend",t,t.keysends.length,n=>!!n.preimage),errors:[]}}catch(r){throw console.error("Failed to request multi_pay_keysend",r),r}}async makeInvoice(t){try{if(!t.amount)throw new Error("No amount specified");return await this.executeNip47Request("make_invoice",t,n=>!!n.invoice)}catch(r){throw console.error("Failed to request make_invoice",r),r}}async makeHoldInvoice(t){try{if(!t.amount)throw new Error("No amount specified");if(!t.payment_hash)throw new Error("No payment hash specified");return await this.executeNip47Request("make_hold_invoice",t,n=>!!n.invoice)}catch(r){throw console.error("Failed to request make_hold_invoice",r),r}}async settleHoldInvoice(t){try{return await this.executeNip47Request("settle_hold_invoice",t,n=>!!n)}catch(r){throw console.error("Failed to request settle_hold_invoice",r),r}}async cancelHoldInvoice(t){try{return await this.executeNip47Request("cancel_hold_invoice",t,n=>!!n)}catch(r){throw console.error("Failed to request cancel_hold_invoice",r),r}}async lookupInvoice(t){try{return await this.executeNip47Request("lookup_invoice",t,n=>!!n.invoice)}catch(r){throw console.error("Failed to request lookup_invoice",r),r}}async listTransactions(t){try{return await this.executeNip47Request("list_transactions",t,n=>!!n.transactions,{replyTimeout:1e4})}catch(r){throw console.error("Failed to request list_transactions",r),r}}async subscribeNotifications(t,r){this.logger.debug("checking connection to relays"),await this._checkConnected(),await this._selectEncryptionType(),this.logger.debug("subscribing to relays");let n=this.pool.subscribe(this.relayUrls,{kinds:[...this.encryptionType==="nip04"?[23196]:[23197]],authors:[this.walletPubkey],"#p":[this.publicKey]},{onevent:async i=>{let a;try{a=await this.decrypt(this.walletPubkey,i.content)}catch(b){console.error("failed to decrypt request event content",b);return}let f;try{f=JSON.parse(a)}catch(b){console.error("Failed to parse decrypted event content",b);return}f.notification?(!r||r.indexOf(f.notification_type)>-1)&&t(f):console.error("No notification in response",f)},onconnect:i=>{this.logger.debug("relay connected",i)},ondisconnect:(i,a)=>{this.logger.debug("relay disconnected",i,a)}});return this.logger.debug("subscribed to relays"),()=>{n?.close()}}async executeNip47Request(t,r,n,i){return await this._checkConnected(),await this._selectEncryptionType(),new Promise((a,f)=>{(async()=>{let b={method:t,params:r},o=await this.encrypt(this.walletPubkey,JSON.stringify(b)),p={kind:23194,created_at:Math.floor(Date.now()/1e3),tags:[["p",this.walletPubkey],["v",this.encryptionType==="nip44_v2"?"1.0":"0.0"],["encryption",this.encryptionType]],content:o},d=await this.signEvent(p),h=this.pool.subscribe(this.relayUrls,{kinds:[23195],authors:[this.walletPubkey],"#e":[d.id]},{onevent:async g=>{clearTimeout(c),h.close();let w=await this.decrypt(this.walletPubkey,g.content),y;try{y=JSON.parse(w)}catch{clearTimeout(c),h.close(),f(new Wr("failed to deserialize response","INTERNAL"));return}y.result?n(y.result)?a(y.result):(clearTimeout(c),h.close(),f(new Vn("response from NWC failed validation: "+JSON.stringify(y.result),"INTERNAL"))):(clearTimeout(c),h.close(),f(new ai(y.error?.message||"unknown Error",y.error?.code||"INTERNAL")))}});function u(){h.close(),f(new $r(`reply timeout: event ${d.id}`,"INTERNAL"))}let c=setTimeout(u,i?.replyTimeout||6e4);function s(){h.close(),f(new Hr(`publish timeout: ${d.id}`,"INTERNAL"))}let l=setTimeout(s,i?.publishTimeout||5e3);try{await Promise.any(this.pool.publish(this.relayUrls,d)),clearTimeout(l)}catch(g){clearTimeout(l),f(new Gr(`failed to publish: ${g}`,"INTERNAL"))}})()})}async executeMultiNip47Request(t,r,n,i,a){await this._checkConnected(),await this._selectEncryptionType();let f=[];return new Promise((b,o)=>{(async()=>{let p={method:t,params:r},d=await this.encrypt(this.walletPubkey,JSON.stringify(p)),h={kind:23194,created_at:Math.floor(Date.now()/1e3),tags:[["p",this.walletPubkey],["v",this.encryptionType==="nip44_v2"?"1.0":"0.0"],["encryption",this.encryptionType]],content:d},u=await this.signEvent(h),c=this.pool.subscribe(this.relayUrls,{kinds:[23195],authors:[this.walletPubkey],"#e":[u.id]},{onevent:async y=>{let v=await this.decrypt(this.walletPubkey,y.content),m;try{m=JSON.parse(v)}catch{clearTimeout(l),c.close(),o(new Wr("failed to deserialize response","INTERNAL"))}if(m.result){if(!i(m.result)){clearTimeout(l),c.close(),o(new Vn("Response from NWC failed validation: "+JSON.stringify(m.result),"INTERNAL"));return}let C=y.tags.find(E=>E[0]==="d")?.[1];if(C===void 0){clearTimeout(l),c.close(),o(new Vn("No d tag found in response event","INTERNAL"));return}f.push({...m.result,dTag:C}),f.length===n&&(clearTimeout(l),c.close(),b(f))}else clearTimeout(l),c.close(),o(new ci(m.error?.message,m.error?.code))}});function s(){c.close(),o(new $r(`reply timeout: event ${u.id}`,"INTERNAL"))}let l=setTimeout(s,a?.replyTimeout||6e4);function g(){c.close(),o(new Hr(`Publish timeout: ${u.id}`,"INTERNAL"))}let w=setTimeout(g,a?.publishTimeout||5e3);try{await Promise.any(this.pool.publish(this.relayUrls,u)),clearTimeout(w)}catch(y){clearTimeout(w),o(new Gr(`Failed to publish: ${y}`,"INTERNAL"))}})()})}async _checkConnected(){if(!this.secret)throw new Error("Missing secret key");if(!this.relayUrls)throw new Error("Missing relay url");try{await Promise.any(this.relayUrls.map(t=>this.pool.ensureRelay(t)))}catch(t){throw console.error("failed to connect to any relay",t),new Fr("Failed to connect to "+this.relayUrls.join(","),"OTHER")}}async _selectEncryptionType(){if(!this._encryptionType){let t=await this.getWalletServiceInfo(),r=this._findPreferredEncryptionType(t.encryptions);if(!r)throw new li("no compatible encryption or version found between wallet and client","UNSUPPORTED_ENCRYPTION");r==="nip04"&&console.warn("NIP-04 encryption is about to be deprecated. Please upgrade your wallet service to use NIP-44 instead."),this._encryptionType=r}}_findPreferredEncryptionType(t){return t.includes("nip44_v2")?"nip44_v2":t.includes("nip04")?"nip04":null}},F4={get_info:"getInfo",get_balance:"getBalance",make_invoice:"makeInvoice",pay_invoice:"sendPayment",pay_keysend:"payKeysend",lookup_invoice:"lookupInvoice",list_transactions:"listTransactions",multi_pay_invoice:"sendMultiPayment",multi_pay_keysend:"multiKeysend",sign_message:"signMessage"},Vr=class e{get options(){return this.client.options}static async fromAuthorizationUrl(t,r={},n){let i=await jt.fromAuthorizationUrl(t,r,n);return new e({client:i})}constructor(t){this._enabled=!1,this.client=t?.client||new jt(t),this.subscribers={}}on(t,r){this.subscribers[t]=r}notify(t,r){let n=this.subscribers[t];n&&n(r)}getPublicKey(){return this.client.getPublicKey()}signEvent(t){return this.client.signEvent(t)}async enable(){this._enabled=!0}close(){return this.client.close()}async getInfo(){await this.checkEnabled();let t=["lightning","nostr"],r="Alby JS SDK";try{let n=await this.client.getInfo(),i={methods:n.methods.map(a=>F4[a]),node:{alias:n.alias,pubkey:n.pubkey,color:n.color},supports:t,version:r};return this.notify("getInfo",i),i}catch(n){return console.error("Using minimal getInfo",n),{methods:["sendPayment"],node:{},supports:t,version:r}}}async getBalance(){await this.checkEnabled();let t=await this.client.getBalance(),r={balance:Math.floor(t.balance/1e3),currency:"sats"};return this.notify("getBalance",r),r}async sendPayment(t){await this.checkEnabled();let n={preimage:(await this.client.payInvoice({invoice:t})).preimage};return this.notify("sendPayment",n),n}async sendPaymentAsync(t){return await this.checkEnabled(),this.client.payInvoice({invoice:t}),this.notify("sendPaymentAsync",{}),{}}async keysend(t){await this.checkEnabled();let n={preimage:(await this.client.payKeysend(Fa(t))).preimage};return this.notify("keysend",n),n}async signMessage(t){await this.checkEnabled();let r=await this.client.signMessage({message:t}),n={message:r.message,signature:r.signature};return this.notify("keysend",n),n}async makeInvoice(t){await this.checkEnabled();let r=typeof t=="object"?t:void 0,n=+(r?.amount??t);if(!n)throw new Error("No amount specified");let a={paymentRequest:(await this.client.makeInvoice({amount:n*1e3,description:r?.defaultMemo})).invoice};return this.notify("makeInvoice",a),a}async lookupInvoice(t){await this.checkEnabled();let r=await this.client.lookupInvoice({invoice:t.paymentRequest,payment_hash:t.paymentHash}),n={preimage:r.preimage,paymentRequest:r.invoice,paid:!!r.settled_at};return this.notify("lookupInvoice",n),n}async listTransactions(t){await this.checkEnabled();let n={transactions:(await this.client.listTransactions(t)).transactions.map(j4)};return this.notify("listTransactions",n),n}async sendMultiPayment(t){await this.checkEnabled();let n={payments:(await this.client.multiPayInvoice({invoices:t.map((i,a)=>({invoice:i,id:a.toString()}))})).invoices.map(i=>{let a=t[parseInt(i.dTag)];if(!a)throw new Error("Could not find paymentRequest matching response d tag");return{paymentRequest:a,preimage:i.preimage}}),errors:[]};return this.notify("sendMultiPayment",n),n}async multiKeysend(t){await this.checkEnabled();let n={keysends:(await this.client.multiPayKeysend({keysends:t.map((i,a)=>({...Fa(i),id:a.toString()}))})).keysends.map(i=>{let a=t[parseInt(i.dTag)];if(!a)throw new Error("Could not find keysend matching response d tag");return{keysend:a,preimage:i.preimage}}),errors:[]};return this.notify("multiKeysend",n),n}lnurl(t){throw new Error("Method not implemented.")}request(t,r){throw new Error("Method not implemented.")}verifyMessage(t,r){throw new Error("Method not implemented.")}async checkEnabled(){if(!this._enabled)throw new Error("please call enable() and await the promise before calling this function")}};function j4(e){return{...e,amount:Math.floor(e.amount/1e3),fees_paid:e.fees_paid?Math.floor(e.fees_paid/1e3):0}}function Fa(e){return{amount:+e.amount*1e3,pubkey:e.destination,tlv_records:e.customRecords?Object.entries(e.customRecords).map(t=>({type:parseInt(t[0]),value:af(new TextEncoder().encode(t[1]))})):[]}}var Yn=class{constructor(t){if(this.appSecretKey=t.appSecretKey||Oe(Si()),this.options={...t,appPubkey:On(_e(this.appSecretKey))},!this.options.relayUrls)throw new Error("Missing relay urls");if(!this.options.requestMethods)throw new Error("Missing request methods");this.pool=new Kr,this.logger=t.logger||$a}get connectionUri(){return this.getConnectionUri()}getConnectionUri(t=""){let r=new URLSearchParams({request_methods:this.options.requestMethods.join(" "),...this.options.name?{name:this.options.name}:{},...this.options.icon?{icon:this.options.icon}:{},...this.options.returnTo?{return_to:this.options.returnTo}:{},...this.options.notificationTypes?{notification_types:this.options.notificationTypes.join(" ")}:{},...this.options.maxAmount?{max_amount:this.options.maxAmount.toString()}:{},...this.options.budgetRenewal?{budget_renewal:this.options.budgetRenewal}:{},...this.options.expiresAt?{expires_at:this.options.expiresAt.toString()}:{},...this.options.isolated?{isolated:this.options.isolated.toString()}:{},...this.options.metadata?{metadata:JSON.stringify(this.options.metadata)}:{}});for(let n of this.options.relayUrls)r.append("relay",n);return`nostr+walletauth${t?`+${t}`:""}://${this.options.appPubkey}?${r.toString().replace(/\+/g,"%20")}`}static parseWalletAuthUrl(t){if(!t.startsWith("nostr+walletauth"))throw new Error("Unexpected scheme. Should be nostr+walletauth:// or nostr+walletauth+specificapp://");let r=t.indexOf(":");t=t.substring(r+1),t.startsWith("//")&&(t=t.substring(2)),t="http://"+t;let n=new URL(t),i=n.host;if(i?.length!==64)throw new Error("Incorrect app pubkey found in auth string");let a=n.searchParams.getAll("relay");if(!a)throw new Error("No relay URL found in auth string");let f=n.searchParams.get("request_methods")?.split(" ");if(!f?.length)throw new Error("No request methods found in auth string");let b=n.searchParams.get("notification_types")?.split(" "),o=n.searchParams.get("max_amount"),p=n.searchParams.get("expires_at"),d=n.searchParams.get("metadata");return{name:n.searchParams.get("name")||void 0,icon:n.searchParams.get("icon")||void 0,returnTo:n.searchParams.get("return_to")||void 0,relayUrls:a,appPubkey:i,requestMethods:f,notificationTypes:b,budgetRenewal:n.searchParams.get("budget_renewal"),expiresAt:p?parseInt(p):void 0,maxAmount:o?parseInt(o):void 0,isolated:n.searchParams.get("isolated")==="true",metadata:d?JSON.parse(d):void 0}}async subscribe(t){this.logger.debug("checking connection to relays"),await this._checkConnected(),this.logger.debug("subscribing to info event");let r=this.pool.subscribe(this.options.relayUrls,{kinds:[13194],"#p":[this.options.appPubkey]},{onevent:async n=>{let i=new jt({relayUrls:this.options.relayUrls,secret:this.appSecretKey,walletPubkey:n.pubkey});try{let a=await i.getInfo();i.options.lud16=a.lud16,i.lud16=a.lud16}catch(a){console.error("failed to fetch get_info",a)}t.onSuccess(i),r?.close()},onconnect:n=>{this.logger.debug("relay connected",n)},ondisconnect:(n,i)=>{this.logger.debug("relay disconnected",n,i)}});return{unsub:()=>{r?.close()}}}close(){return this.pool.close(this.options.relayUrls)}async _checkConnected(){if(!this.appSecretKey)throw new Error("Missing secret key");if(!this.options.relayUrls)throw new Error("Missing relay urls");try{await Promise.any(this.options.relayUrls.map(t=>this.pool.ensureRelay(t)))}catch(t){throw console.error("failed to connect to any relay",t),new Fr("Failed to connect to "+this.options.relayUrls.join(","),"OTHER")}}};var H4=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!H4)throw new Error("Non little-endian hardware is not supported");var $o={},ja;function $4(){return ja||(ja=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64url=e.base64=e.base32crockford=e.base32hex=e.base32=e.base16=e.utils=e.assertNumber=void 0;function t(A){if(!Number.isSafeInteger(A))throw new Error(`Wrong integer: ${A}`)}e.assertNumber=t;function r(...A){let T=(I,L)=>H=>I(L(H)),N=Array.from(A).reverse().reduce((I,L)=>I?T(I,L.encode):L.encode,void 0),x=A.reduce((I,L)=>I?T(I,L.decode):L.decode,void 0);return{encode:N,decode:x}}function n(A){return{encode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return T.map(N=>{if(t(N),N<0||N>=A.length)throw new Error(`Digit index outside alphabet: ${N} (alphabet: ${A.length})`);return A[N]})},decode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="string")throw new Error("alphabet.decode input should be array of strings");return T.map(N=>{if(typeof N!="string")throw new Error(`alphabet.decode: not string element=${N}`);let x=A.indexOf(N);if(x===-1)throw new Error(`Unknown letter: "${N}". Allowed: ${A}`);return x})}}}function i(A=""){if(typeof A!="string")throw new Error("join separator should be string");return{encode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="string")throw new Error("join.encode input should be array of strings");for(let N of T)if(typeof N!="string")throw new Error(`join.encode: non-string input=${N}`);return T.join(A)},decode:T=>{if(typeof T!="string")throw new Error("join.decode input should be string");return T.split(A)}}}function a(A,T="="){if(t(A),typeof T!="string")throw new Error("padding chr should be string");return{encode(N){if(!Array.isArray(N)||N.length&&typeof N[0]!="string")throw new Error("padding.encode input should be array of strings");for(let x of N)if(typeof x!="string")throw new Error(`padding.encode: non-string input=${x}`);for(;N.length*A%8;)N.push(T);return N},decode(N){if(!Array.isArray(N)||N.length&&typeof N[0]!="string")throw new Error("padding.encode input should be array of strings");for(let I of N)if(typeof I!="string")throw new Error(`padding.decode: non-string input=${I}`);let x=N.length;if(x*A%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;x>0&&N[x-1]===T;x--)if(!((x-1)*A%8))throw new Error("Invalid padding: string has too much padding");return N.slice(0,x)}}}function f(A){if(typeof A!="function")throw new Error("normalize fn should be function");return{encode:T=>T,decode:T=>A(T)}}function b(A,T,N){if(T<2)throw new Error(`convertRadix: wrong from=${T}, base cannot be less than 2`);if(N<2)throw new Error(`convertRadix: wrong to=${N}, base cannot be less than 2`);if(!Array.isArray(A))throw new Error("convertRadix: data should be array");if(!A.length)return[];let x=0,I=[],L=Array.from(A);for(L.forEach(H=>{if(t(H),H<0||H>=T)throw new Error(`Wrong integer: ${H}`)});;){let H=0,Z=!0;for(let K=x;K<L.length;K++){let P=L[K],B=T*H+P;if(!Number.isSafeInteger(B)||T*H/T!==H||B-P!==T*H)throw new Error("convertRadix: carry overflow");if(H=B%N,L[K]=Math.floor(B/N),!Number.isSafeInteger(L[K])||L[K]*N+H!==B)throw new Error("convertRadix: carry overflow");if(Z)L[K]?Z=!1:x=K;else continue}if(I.push(H),Z)break}for(let H=0;H<A.length-1&&A[H]===0;H++)I.push(0);return I.reverse()}let o=(A,T)=>T?o(T,A%T):A,p=(A,T)=>A+(T-o(A,T));function d(A,T,N,x){if(!Array.isArray(A))throw new Error("convertRadix2: data should be array");if(T<=0||T>32)throw new Error(`convertRadix2: wrong from=${T}`);if(N<=0||N>32)throw new Error(`convertRadix2: wrong to=${N}`);if(p(T,N)>32)throw new Error(`convertRadix2: carry overflow from=${T} to=${N} carryBits=${p(T,N)}`);let I=0,L=0,H=2**N-1,Z=[];for(let K of A){if(t(K),K>=2**T)throw new Error(`convertRadix2: invalid data word=${K} from=${T}`);if(I=I<<T|K,L+T>32)throw new Error(`convertRadix2: carry overflow pos=${L} from=${T}`);for(L+=T;L>=N;L-=N)Z.push((I>>L-N&H)>>>0);I&=2**L-1}if(I=I<<N-L&H,!x&&L>=T)throw new Error("Excess padding");if(!x&&I)throw new Error(`Non-zero padding: ${I}`);return x&&L>0&&Z.push(I>>>0),Z}function h(A){return t(A),{encode:T=>{if(!(T instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return b(Array.from(T),2**8,A)},decode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(b(T,A,2**8))}}}function u(A,T=!1){if(t(A),A<=0||A>32)throw new Error("radix2: bits should be in (0..32]");if(p(8,A)>32||p(A,8)>32)throw new Error("radix2: carry overflow");return{encode:N=>{if(!(N instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return d(Array.from(N),8,A,!T)},decode:N=>{if(!Array.isArray(N)||N.length&&typeof N[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(d(N,A,8,T))}}}function c(A){if(typeof A!="function")throw new Error("unsafeWrapper fn should be function");return function(...T){try{return A.apply(null,T)}catch{}}}function s(A,T){if(t(A),typeof T!="function")throw new Error("checksum fn should be function");return{encode(N){if(!(N instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");let x=T(N).slice(0,A),I=new Uint8Array(N.length+A);return I.set(N),I.set(x,N.length),I},decode(N){if(!(N instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");let x=N.slice(0,-A),I=T(x).slice(0,A),L=N.slice(-A);for(let H=0;H<A;H++)if(I[H]!==L[H])throw new Error("Invalid checksum");return x}}}e.utils={alphabet:n,chain:r,checksum:s,radix:h,radix2:u,join:i,padding:a},e.base16=r(u(4),n("0123456789ABCDEF"),i("")),e.base32=r(u(5),n("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),i("")),e.base32hex=r(u(5),n("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),i("")),e.base32crockford=r(u(5),n("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),i(""),f(A=>A.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),e.base64=r(u(6),n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),i("")),e.base64url=r(u(6),n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),i(""));let l=A=>r(h(58),n(A),i(""));e.base58=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=l("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=l("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");let g=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(A){let T="";for(let N=0;N<A.length;N+=8){let x=A.subarray(N,N+8);T+=e.base58.encode(x).padStart(g[x.length],"1")}return T},decode(A){let T=[];for(let N=0;N<A.length;N+=11){let x=A.slice(N,N+11),I=g.indexOf(x.length),L=e.base58.decode(x);for(let H=0;H<L.length-I;H++)if(L[H]!==0)throw new Error("base58xmr: wrong padding");T=T.concat(Array.from(L.slice(L.length-I)))}return Uint8Array.from(T)}};let w=A=>r(s(4,T=>A(A(T))),e.base58);e.base58check=w;let y=r(n("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),i("")),v=[996825010,642813549,513874426,1027748829,705979059];function m(A){let T=A>>25,N=(A&33554431)<<5;for(let x=0;x<v.length;x++)(T>>x&1)===1&&(N^=v[x]);return N}function C(A,T,N=1){let x=A.length,I=1;for(let L=0;L<x;L++){let H=A.charCodeAt(L);if(H<33||H>126)throw new Error(`Invalid prefix (${A})`);I=m(I)^H>>5}I=m(I);for(let L=0;L<x;L++)I=m(I)^A.charCodeAt(L)&31;for(let L of T)I=m(I)^L;for(let L=0;L<6;L++)I=m(I);return I^=N,y.encode(d([I%2**30],30,5,!1))}function E(A){let T=A==="bech32"?1:734539939,N=u(5),x=N.decode,I=N.encode,L=c(x);function H(B,G,V=90){if(typeof B!="string")throw new Error(`bech32.encode prefix should be string, not ${typeof B}`);if(!Array.isArray(G)||G.length&&typeof G[0]!="number")throw new Error(`bech32.encode words should be array of numbers, not ${typeof G}`);let z=B.length+7+G.length;if(V!==!1&&z>V)throw new TypeError(`Length ${z} exceeds limit ${V}`);return B=B.toLowerCase(),`${B}1${y.encode(G)}${C(B,G,T)}`}function Z(B,G=90){if(typeof B!="string")throw new Error(`bech32.decode input should be string, not ${typeof B}`);if(B.length<8||G!==!1&&B.length>G)throw new TypeError(`Wrong string length: ${B.length} (${B}). Expected (8..${G})`);let V=B.toLowerCase();if(B!==V&&B!==B.toUpperCase())throw new Error("String must be lowercase or uppercase");B=V;let z=B.lastIndexOf("1");if(z===0||z===-1)throw new Error('Letter "1" must be present between prefix and data only');let U=B.slice(0,z),F=B.slice(z+1);if(F.length<6)throw new Error("Data must be at least 6 characters long");let D=y.decode(F).slice(0,-6),k=C(U,D,T);if(!F.endsWith(k))throw new Error(`Invalid checksum in ${B}: expected "${k}"`);return{prefix:U,words:D}}let K=c(Z);function P(B){let{prefix:G,words:V}=Z(B,!1);return{prefix:G,words:V,bytes:x(V)}}return{encode:H,decode:Z,decodeToBytes:P,decodeUnsafe:K,fromWords:x,fromWordsUnsafe:L,toWords:I}}e.bech32=E("bech32"),e.bech32m=E("bech32m"),e.utf8={encode:A=>new TextDecoder().decode(A),decode:A=>new TextEncoder().encode(A)},e.hex=r(u(4),n("0123456789abcdef"),i(""),f(A=>{if(typeof A!="string"||A.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof A} with length ${A.length}`);return A.toLowerCase()}));let O={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},_=`Invalid encoding type. Available types: ${Object.keys(O).join(", ")}`,S=(A,T)=>{if(typeof A!="string"||!O.hasOwnProperty(A))throw new TypeError(_);if(!(T instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return O[A].encode(T)};e.bytesToString=S,e.str=e.bytesToString;let R=(A,T)=>{if(!O.hasOwnProperty(A))throw new TypeError(_);if(typeof T!="string")throw new TypeError("stringToBytes() expects string");return O[A].decode(T)};e.stringToBytes=R,e.bytes=e.stringToBytes})($o)),$o}var Go,Ha;function G4(){if(Ha)return Go;Ha=1;let{bech32:e,hex:t,utf8:r}=$4(),n={bech32:"bc",pubKeyHash:0,scriptHash:5,validWitnessVersions:[0]},i={bech32:"tb",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},a={bech32:"tbs",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},f={bech32:"bcrt",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},b={bech32:"sb",pubKeyHash:63,scriptHash:123,validWitnessVersions:[0]},o=["option_data_loss_protect","initial_routing_sync","option_upfront_shutdown_script","gossip_queries","var_onion_optin","gossip_queries_ex","option_static_remotekey","payment_secret","basic_mpp","option_support_large_channel"],p={m:BigInt(1e3),u:BigInt(1e6),n:BigInt(1e9),p:BigInt(1e12)},d=BigInt("2100000000000000000"),h=BigInt(1e11),u={payment_hash:1,payment_secret:16,description:13,payee:19,description_hash:23,expiry:6,min_final_cltv_expiry:24,fallback_address:9,route_hint:3,feature_bits:5,metadata:27},c={};for(let C=0,E=Object.keys(u);C<E.length;C++){let O=E[C],_=u[E[C]].toString();c[_]=O}let s={1:C=>t.encode(e.fromWordsUnsafe(C)),16:C=>t.encode(e.fromWordsUnsafe(C)),13:C=>r.encode(e.fromWordsUnsafe(C)),19:C=>t.encode(e.fromWordsUnsafe(C)),23:C=>t.encode(e.fromWordsUnsafe(C)),27:C=>t.encode(e.fromWordsUnsafe(C)),6:g,24:g,3:w,5:y};function l(C){return E=>({tagCode:parseInt(C),words:e.encode("unknown",E,Number.MAX_SAFE_INTEGER)})}function g(C){return C.reverse().reduce((E,O,_)=>E+O*Math.pow(32,_),0)}function w(C){let E=[],O,_,S,R,A,T=e.fromWordsUnsafe(C);for(;T.length>0;)O=t.encode(T.slice(0,33)),_=t.encode(T.slice(33,41)),S=parseInt(t.encode(T.slice(41,45)),16),R=parseInt(t.encode(T.slice(45,49)),16),A=parseInt(t.encode(T.slice(49,51)),16),T=T.slice(51),E.push({pubkey:O,short_channel_id:_,fee_base_msat:S,fee_proportional_millionths:R,cltv_expiry_delta:A});return E}function y(C){let E=C.slice().reverse().map(S=>[!!(S&1),!!(S&2),!!(S&4),!!(S&8),!!(S&16)]).reduce((S,R)=>S.concat(R),[]);for(;E.length<o.length*2;)E.push(!1);let O={};o.forEach((S,R)=>{let A;E[R*2]?A="required":E[R*2+1]?A="supported":A="unsupported",O[S]=A});let _=E.slice(o.length*2);return O.extra_bits={start_bit:o.length*2,bits:_,has_required:_.reduce((S,R,A)=>A%2!==0?S||!1:S||R,!1)},O}function v(C,E){let O,_;if(C.slice(-1).match(/^[munp]$/))O=C.slice(-1),_=C.slice(0,-1);else{if(C.slice(-1).match(/^[^munp0-9]$/))throw new Error("Not a valid multiplier for the amount");_=C}if(!_.match(/^\d+$/))throw new Error("Not a valid human readable amount");let S=BigInt(_),R=O?S*h/p[O]:S*h;if(O==="p"&&S%BigInt(10)!==BigInt(0)||R>d)throw new Error("Amount is outside of valid range");return E?R.toString():R}function m(C,E){if(typeof C!="string")throw new Error("Lightning Payment Request must be string");if(C.slice(0,2).toLowerCase()!=="ln")throw new Error("Not a proper lightning payment request");let O=[],_=e.decode(C,Number.MAX_SAFE_INTEGER);C=C.toLowerCase();let S=_.prefix,R=_.words,A=C.slice(S.length+1),T=R.slice(-104);R=R.slice(0,-104);let N=S.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/);if(N&&!N[2]&&(N=S.match(/^ln(\S+)$/)),!N)throw new Error("Not a proper lightning payment request");O.push({name:"lightning_network",letters:"ln"});let x=N[1],I;if(E){if(E.bech32===void 0||E.pubKeyHash===void 0||E.scriptHash===void 0||!Array.isArray(E.validWitnessVersions))throw new Error("Invalid network");I=E}else switch(x){case n.bech32:I=n;break;case i.bech32:I=i;break;case a.bech32:I=a;break;case f.bech32:I=f;break;case b.bech32:I=b;break}if(!I||I.bech32!==x)throw new Error("Unknown coin bech32 prefix");O.push({name:"coin_network",letters:x,value:I});let L=N[2],H;if(L){let U=N[3];H=v(L+U,!0),O.push({name:"amount",letters:N[2]+N[3],value:H})}else H=null;O.push({name:"separator",letters:"1"});let Z=g(R.slice(0,7));R=R.slice(7),O.push({name:"timestamp",letters:A.slice(0,7),value:Z}),A=A.slice(7);let K,P,B,G;for(;R.length>0;){let U=R[0].toString();K=c[U]||"unknown_tag",P=s[U]||l(U),R=R.slice(1),B=g(R.slice(0,2)),R=R.slice(2),G=R.slice(0,B),R=R.slice(B),O.push({name:K,tag:A[0],letters:A.slice(0,3+B),value:P(G)}),A=A.slice(3+B)}O.push({name:"signature",letters:A.slice(0,104),value:t.encode(e.fromWordsUnsafe(T))}),A=A.slice(104),O.push({name:"checksum",letters:A});let V={paymentRequest:C,sections:O,get expiry(){let U=O.find(F=>F.name==="expiry");if(U)return z("timestamp")+U.value},get route_hints(){return O.filter(U=>U.name==="route_hint").map(U=>U.value)}};for(let U in u)U!=="route_hint"&&Object.defineProperty(V,U,{get(){return z(U)}});return V;function z(U){let F=O.find(D=>D.name===U);return F?F.value:void 0}}return Go={decode:m,hrpToMillisat:v},Go}var X5=G4();var Nl=e=>{let t,r=new Set,n=(p,d)=>{let h=typeof p=="function"?p(t):p;if(!Object.is(h,t)){let u=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(c=>c(t,u))}},i=()=>t,b={setState:n,getState:i,getInitialState:()=>o,subscribe:p=>(r.add(p),()=>r.delete(p))},o=t=e(n,i,b);return b},xl=(e=>e?Nl(e):Nl);function W4(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Rl(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function K4(e,t){W4(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var kl=e=>e instanceof Uint8Array,Ki=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),_t=(e,t)=>e<<32-t|e>>>t,V4=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!V4)throw new Error("Non little-endian hardware is not supported");var Z4=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Y4(e){if(!kl(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=Z4[e[r]];return t}function q4(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Ll(e){if(typeof e=="string"&&(e=q4(e)),!kl(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var Yi=class{clone(){return this._cloneInto()}};function z4(e){let t=n=>e().update(Ll(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Q4(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(4294967295),f=Number(r>>i&a),b=Number(r&a),o=n?4:0,p=n?0:4;e.setUint32(t+o,f,n),e.setUint32(t+p,b,n)}var qi=class extends Yi{constructor(t,r,n,i){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ki(this.buffer)}update(t){Rl(this);let{view:r,buffer:n,blockLen:i}=this;t=Ll(t);let a=t.length;for(let f=0;f<a;){let b=Math.min(i-this.pos,a-f);if(b===i){let o=Ki(t);for(;i<=a-f;f+=i)this.process(o,f);continue}n.set(t.subarray(f,f+b),this.pos),this.pos+=b,f+=b,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Rl(this),K4(t,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:a}=this,{pos:f}=this;r[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>i-f&&(this.process(n,0),f=0);for(let h=f;h<i;h++)r[h]=0;Q4(n,i-8,BigInt(this.length*8),a),this.process(n,0);let b=Ki(t),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let p=o/4,d=this.get();if(p>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<p;h++)b.setUint32(4*h,d[h],a)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:a,destroyed:f,pos:b}=this;return t.length=i,t.pos=b,t.finished=a,t.destroyed=f,i%r&&t.buffer.set(n),t}},J4=(e,t,r)=>e&t^~e&r,X4=(e,t,r)=>e&t^e&r^t&r,e3=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ht=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$t=new Uint32Array(64),zi=class extends qi{constructor(){super(64,32,8,!1),this.A=Ht[0]|0,this.B=Ht[1]|0,this.C=Ht[2]|0,this.D=Ht[3]|0,this.E=Ht[4]|0,this.F=Ht[5]|0,this.G=Ht[6]|0,this.H=Ht[7]|0}get(){let{A:t,B:r,C:n,D:i,E:a,F:f,G:b,H:o}=this;return[t,r,n,i,a,f,b,o]}set(t,r,n,i,a,f,b,o){this.A=t|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=f|0,this.G=b|0,this.H=o|0}process(t,r){for(let h=0;h<16;h++,r+=4)$t[h]=t.getUint32(r,!1);for(let h=16;h<64;h++){let u=$t[h-15],c=$t[h-2],s=_t(u,7)^_t(u,18)^u>>>3,l=_t(c,17)^_t(c,19)^c>>>10;$t[h]=l+$t[h-7]+s+$t[h-16]|0}let{A:n,B:i,C:a,D:f,E:b,F:o,G:p,H:d}=this;for(let h=0;h<64;h++){let u=_t(b,6)^_t(b,11)^_t(b,25),c=d+u+J4(b,o,p)+e3[h]+$t[h]|0,l=(_t(n,2)^_t(n,13)^_t(n,22))+X4(n,i,a)|0;d=p,p=o,o=b,b=f+c|0,f=a,a=i,i=n,n=c+l|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,f=f+this.D|0,b=b+this.E|0,o=o+this.F|0,p=p+this.G|0,d=d+this.H|0,this.set(n,i,a,f,b,o,p,d)}roundClean(){$t.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},t3=z4(()=>new zi),Vi={},Il;function n3(){return Il||(Il=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64url=e.base64=e.base32crockford=e.base32hex=e.base32=e.base16=e.utils=e.assertNumber=void 0;function t(A){if(!Number.isSafeInteger(A))throw new Error(`Wrong integer: ${A}`)}e.assertNumber=t;function r(...A){let T=(I,L)=>H=>I(L(H)),N=Array.from(A).reverse().reduce((I,L)=>I?T(I,L.encode):L.encode,void 0),x=A.reduce((I,L)=>I?T(I,L.decode):L.decode,void 0);return{encode:N,decode:x}}function n(A){return{encode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return T.map(N=>{if(t(N),N<0||N>=A.length)throw new Error(`Digit index outside alphabet: ${N} (alphabet: ${A.length})`);return A[N]})},decode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="string")throw new Error("alphabet.decode input should be array of strings");return T.map(N=>{if(typeof N!="string")throw new Error(`alphabet.decode: not string element=${N}`);let x=A.indexOf(N);if(x===-1)throw new Error(`Unknown letter: "${N}". Allowed: ${A}`);return x})}}}function i(A=""){if(typeof A!="string")throw new Error("join separator should be string");return{encode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="string")throw new Error("join.encode input should be array of strings");for(let N of T)if(typeof N!="string")throw new Error(`join.encode: non-string input=${N}`);return T.join(A)},decode:T=>{if(typeof T!="string")throw new Error("join.decode input should be string");return T.split(A)}}}function a(A,T="="){if(t(A),typeof T!="string")throw new Error("padding chr should be string");return{encode(N){if(!Array.isArray(N)||N.length&&typeof N[0]!="string")throw new Error("padding.encode input should be array of strings");for(let x of N)if(typeof x!="string")throw new Error(`padding.encode: non-string input=${x}`);for(;N.length*A%8;)N.push(T);return N},decode(N){if(!Array.isArray(N)||N.length&&typeof N[0]!="string")throw new Error("padding.encode input should be array of strings");for(let I of N)if(typeof I!="string")throw new Error(`padding.decode: non-string input=${I}`);let x=N.length;if(x*A%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;x>0&&N[x-1]===T;x--)if(!((x-1)*A%8))throw new Error("Invalid padding: string has too much padding");return N.slice(0,x)}}}function f(A){if(typeof A!="function")throw new Error("normalize fn should be function");return{encode:T=>T,decode:T=>A(T)}}function b(A,T,N){if(T<2)throw new Error(`convertRadix: wrong from=${T}, base cannot be less than 2`);if(N<2)throw new Error(`convertRadix: wrong to=${N}, base cannot be less than 2`);if(!Array.isArray(A))throw new Error("convertRadix: data should be array");if(!A.length)return[];let x=0,I=[],L=Array.from(A);for(L.forEach(H=>{if(t(H),H<0||H>=T)throw new Error(`Wrong integer: ${H}`)});;){let H=0,Z=!0;for(let K=x;K<L.length;K++){let P=L[K],B=T*H+P;if(!Number.isSafeInteger(B)||T*H/T!==H||B-P!==T*H)throw new Error("convertRadix: carry overflow");if(H=B%N,L[K]=Math.floor(B/N),!Number.isSafeInteger(L[K])||L[K]*N+H!==B)throw new Error("convertRadix: carry overflow");if(Z)L[K]?Z=!1:x=K;else continue}if(I.push(H),Z)break}for(let H=0;H<A.length-1&&A[H]===0;H++)I.push(0);return I.reverse()}let o=(A,T)=>T?o(T,A%T):A,p=(A,T)=>A+(T-o(A,T));function d(A,T,N,x){if(!Array.isArray(A))throw new Error("convertRadix2: data should be array");if(T<=0||T>32)throw new Error(`convertRadix2: wrong from=${T}`);if(N<=0||N>32)throw new Error(`convertRadix2: wrong to=${N}`);if(p(T,N)>32)throw new Error(`convertRadix2: carry overflow from=${T} to=${N} carryBits=${p(T,N)}`);let I=0,L=0,H=2**N-1,Z=[];for(let K of A){if(t(K),K>=2**T)throw new Error(`convertRadix2: invalid data word=${K} from=${T}`);if(I=I<<T|K,L+T>32)throw new Error(`convertRadix2: carry overflow pos=${L} from=${T}`);for(L+=T;L>=N;L-=N)Z.push((I>>L-N&H)>>>0);I&=2**L-1}if(I=I<<N-L&H,!x&&L>=T)throw new Error("Excess padding");if(!x&&I)throw new Error(`Non-zero padding: ${I}`);return x&&L>0&&Z.push(I>>>0),Z}function h(A){return t(A),{encode:T=>{if(!(T instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return b(Array.from(T),2**8,A)},decode:T=>{if(!Array.isArray(T)||T.length&&typeof T[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(b(T,A,2**8))}}}function u(A,T=!1){if(t(A),A<=0||A>32)throw new Error("radix2: bits should be in (0..32]");if(p(8,A)>32||p(A,8)>32)throw new Error("radix2: carry overflow");return{encode:N=>{if(!(N instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return d(Array.from(N),8,A,!T)},decode:N=>{if(!Array.isArray(N)||N.length&&typeof N[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(d(N,A,8,T))}}}function c(A){if(typeof A!="function")throw new Error("unsafeWrapper fn should be function");return function(...T){try{return A.apply(null,T)}catch{}}}function s(A,T){if(t(A),typeof T!="function")throw new Error("checksum fn should be function");return{encode(N){if(!(N instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");let x=T(N).slice(0,A),I=new Uint8Array(N.length+A);return I.set(N),I.set(x,N.length),I},decode(N){if(!(N instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");let x=N.slice(0,-A),I=T(x).slice(0,A),L=N.slice(-A);for(let H=0;H<A;H++)if(I[H]!==L[H])throw new Error("Invalid checksum");return x}}}e.utils={alphabet:n,chain:r,checksum:s,radix:h,radix2:u,join:i,padding:a},e.base16=r(u(4),n("0123456789ABCDEF"),i("")),e.base32=r(u(5),n("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),i("")),e.base32hex=r(u(5),n("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),i("")),e.base32crockford=r(u(5),n("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),i(""),f(A=>A.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),e.base64=r(u(6),n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),i("")),e.base64url=r(u(6),n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),i(""));let l=A=>r(h(58),n(A),i(""));e.base58=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base58flickr=l("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),e.base58xrp=l("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");let g=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(A){let T="";for(let N=0;N<A.length;N+=8){let x=A.subarray(N,N+8);T+=e.base58.encode(x).padStart(g[x.length],"1")}return T},decode(A){let T=[];for(let N=0;N<A.length;N+=11){let x=A.slice(N,N+11),I=g.indexOf(x.length),L=e.base58.decode(x);for(let H=0;H<L.length-I;H++)if(L[H]!==0)throw new Error("base58xmr: wrong padding");T=T.concat(Array.from(L.slice(L.length-I)))}return Uint8Array.from(T)}};let w=A=>r(s(4,T=>A(A(T))),e.base58);e.base58check=w;let y=r(n("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),i("")),v=[996825010,642813549,513874426,1027748829,705979059];function m(A){let T=A>>25,N=(A&33554431)<<5;for(let x=0;x<v.length;x++)(T>>x&1)===1&&(N^=v[x]);return N}function C(A,T,N=1){let x=A.length,I=1;for(let L=0;L<x;L++){let H=A.charCodeAt(L);if(H<33||H>126)throw new Error(`Invalid prefix (${A})`);I=m(I)^H>>5}I=m(I);for(let L=0;L<x;L++)I=m(I)^A.charCodeAt(L)&31;for(let L of T)I=m(I)^L;for(let L=0;L<6;L++)I=m(I);return I^=N,y.encode(d([I%2**30],30,5,!1))}function E(A){let T=A==="bech32"?1:734539939,N=u(5),x=N.decode,I=N.encode,L=c(x);function H(B,G,V=90){if(typeof B!="string")throw new Error(`bech32.encode prefix should be string, not ${typeof B}`);if(!Array.isArray(G)||G.length&&typeof G[0]!="number")throw new Error(`bech32.encode words should be array of numbers, not ${typeof G}`);let z=B.length+7+G.length;if(V!==!1&&z>V)throw new TypeError(`Length ${z} exceeds limit ${V}`);return B=B.toLowerCase(),`${B}1${y.encode(G)}${C(B,G,T)}`}function Z(B,G=90){if(typeof B!="string")throw new Error(`bech32.decode input should be string, not ${typeof B}`);if(B.length<8||G!==!1&&B.length>G)throw new TypeError(`Wrong string length: ${B.length} (${B}). Expected (8..${G})`);let V=B.toLowerCase();if(B!==V&&B!==B.toUpperCase())throw new Error("String must be lowercase or uppercase");B=V;let z=B.lastIndexOf("1");if(z===0||z===-1)throw new Error('Letter "1" must be present between prefix and data only');let U=B.slice(0,z),F=B.slice(z+1);if(F.length<6)throw new Error("Data must be at least 6 characters long");let D=y.decode(F).slice(0,-6),k=C(U,D,T);if(!F.endsWith(k))throw new Error(`Invalid checksum in ${B}: expected "${k}"`);return{prefix:U,words:D}}let K=c(Z);function P(B){let{prefix:G,words:V}=Z(B,!1);return{prefix:G,words:V,bytes:x(V)}}return{encode:H,decode:Z,decodeToBytes:P,decodeUnsafe:K,fromWords:x,fromWordsUnsafe:L,toWords:I}}e.bech32=E("bech32"),e.bech32m=E("bech32m"),e.utf8={encode:A=>new TextDecoder().decode(A),decode:A=>new TextEncoder().encode(A)},e.hex=r(u(4),n("0123456789abcdef"),i(""),f(A=>{if(typeof A!="string"||A.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof A} with length ${A.length}`);return A.toLowerCase()}));let O={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},_=`Invalid encoding type. Available types: ${Object.keys(O).join(", ")}`,S=(A,T)=>{if(typeof A!="string"||!O.hasOwnProperty(A))throw new TypeError(_);if(!(T instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return O[A].encode(T)};e.bytesToString=S,e.str=e.bytesToString;let R=(A,T)=>{if(!O.hasOwnProperty(A))throw new TypeError(_);if(typeof T!="string")throw new TypeError("stringToBytes() expects string");return O[A].decode(T)};e.stringToBytes=R,e.bytes=e.stringToBytes})(Vi)),Vi}var Zi,Pl;function r3(){if(Pl)return Zi;Pl=1;let{bech32:e,hex:t,utf8:r}=n3(),n={bech32:"bc",pubKeyHash:0,scriptHash:5,validWitnessVersions:[0]},i={bech32:"tb",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},a={bech32:"tbs",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},f={bech32:"bcrt",pubKeyHash:111,scriptHash:196,validWitnessVersions:[0]},b={bech32:"sb",pubKeyHash:63,scriptHash:123,validWitnessVersions:[0]},o=["option_data_loss_protect","initial_routing_sync","option_upfront_shutdown_script","gossip_queries","var_onion_optin","gossip_queries_ex","option_static_remotekey","payment_secret","basic_mpp","option_support_large_channel"],p={m:BigInt(1e3),u:BigInt(1e6),n:BigInt(1e9),p:BigInt(1e12)},d=BigInt("2100000000000000000"),h=BigInt(1e11),u={payment_hash:1,payment_secret:16,description:13,payee:19,description_hash:23,expiry:6,min_final_cltv_expiry:24,fallback_address:9,route_hint:3,feature_bits:5,metadata:27},c={};for(let C=0,E=Object.keys(u);C<E.length;C++){let O=E[C],_=u[E[C]].toString();c[_]=O}let s={1:C=>t.encode(e.fromWordsUnsafe(C)),16:C=>t.encode(e.fromWordsUnsafe(C)),13:C=>r.encode(e.fromWordsUnsafe(C)),19:C=>t.encode(e.fromWordsUnsafe(C)),23:C=>t.encode(e.fromWordsUnsafe(C)),27:C=>t.encode(e.fromWordsUnsafe(C)),6:g,24:g,3:w,5:y};function l(C){return E=>({tagCode:parseInt(C),words:e.encode("unknown",E,Number.MAX_SAFE_INTEGER)})}function g(C){return C.reverse().reduce((E,O,_)=>E+O*Math.pow(32,_),0)}function w(C){let E=[],O,_,S,R,A,T=e.fromWordsUnsafe(C);for(;T.length>0;)O=t.encode(T.slice(0,33)),_=t.encode(T.slice(33,41)),S=parseInt(t.encode(T.slice(41,45)),16),R=parseInt(t.encode(T.slice(45,49)),16),A=parseInt(t.encode(T.slice(49,51)),16),T=T.slice(51),E.push({pubkey:O,short_channel_id:_,fee_base_msat:S,fee_proportional_millionths:R,cltv_expiry_delta:A});return E}function y(C){let E=C.slice().reverse().map(S=>[!!(S&1),!!(S&2),!!(S&4),!!(S&8),!!(S&16)]).reduce((S,R)=>S.concat(R),[]);for(;E.length<o.length*2;)E.push(!1);let O={};o.forEach((S,R)=>{let A;E[R*2]?A="required":E[R*2+1]?A="supported":A="unsupported",O[S]=A});let _=E.slice(o.length*2);return O.extra_bits={start_bit:o.length*2,bits:_,has_required:_.reduce((S,R,A)=>A%2!==0?S||!1:S||R,!1)},O}function v(C,E){let O,_;if(C.slice(-1).match(/^[munp]$/))O=C.slice(-1),_=C.slice(0,-1);else{if(C.slice(-1).match(/^[^munp0-9]$/))throw new Error("Not a valid multiplier for the amount");_=C}if(!_.match(/^\d+$/))throw new Error("Not a valid human readable amount");let S=BigInt(_),R=O?S*h/p[O]:S*h;if(O==="p"&&S%BigInt(10)!==BigInt(0)||R>d)throw new Error("Amount is outside of valid range");return E?R.toString():R}function m(C,E){if(typeof C!="string")throw new Error("Lightning Payment Request must be string");if(C.slice(0,2).toLowerCase()!=="ln")throw new Error("Not a proper lightning payment request");let O=[],_=e.decode(C,Number.MAX_SAFE_INTEGER);C=C.toLowerCase();let S=_.prefix,R=_.words,A=C.slice(S.length+1),T=R.slice(-104);R=R.slice(0,-104);let N=S.match(/^ln(\S+?)(\d*)([a-zA-Z]?)$/);if(N&&!N[2]&&(N=S.match(/^ln(\S+)$/)),!N)throw new Error("Not a proper lightning payment request");O.push({name:"lightning_network",letters:"ln"});let x=N[1],I;if(E){if(E.bech32===void 0||E.pubKeyHash===void 0||E.scriptHash===void 0||!Array.isArray(E.validWitnessVersions))throw new Error("Invalid network");I=E}else switch(x){case n.bech32:I=n;break;case i.bech32:I=i;break;case a.bech32:I=a;break;case f.bech32:I=f;break;case b.bech32:I=b;break}if(!I||I.bech32!==x)throw new Error("Unknown coin bech32 prefix");O.push({name:"coin_network",letters:x,value:I});let L=N[2],H;if(L){let U=N[3];H=v(L+U,!0),O.push({name:"amount",letters:N[2]+N[3],value:H})}else H=null;O.push({name:"separator",letters:"1"});let Z=g(R.slice(0,7));R=R.slice(7),O.push({name:"timestamp",letters:A.slice(0,7),value:Z}),A=A.slice(7);let K,P,B,G;for(;R.length>0;){let U=R[0].toString();K=c[U]||"unknown_tag",P=s[U]||l(U),R=R.slice(1),B=g(R.slice(0,2)),R=R.slice(2),G=R.slice(0,B),R=R.slice(B),O.push({name:K,tag:A[0],letters:A.slice(0,3+B),value:P(G)}),A=A.slice(3+B)}O.push({name:"signature",letters:A.slice(0,104),value:t.encode(e.fromWordsUnsafe(T))}),A=A.slice(104),O.push({name:"checksum",letters:A});let V={paymentRequest:C,sections:O,get expiry(){let U=O.find(F=>F.name==="expiry");if(U)return z("timestamp")+U.value},get route_hints(){return O.filter(U=>U.name==="route_hint").map(U=>U.value)}};for(let U in u)U!=="route_hint"&&Object.defineProperty(V,U,{get(){return z(U)}});return V;function z(U){let F=O.find(D=>D.name===U);return F?F.value:void 0}}return Zi={decode:m,hrpToMillisat:v},Zi}var o3=r3(),i3=e=>Uint8Array.from(e.match(/.{1,2}/g).map(t=>parseInt(t,16))),s3=e=>{if(!e)return null;try{let t=o3.decode(e);if(!t||!t.sections)return null;let r=t.sections.find(s=>s.name==="payment_hash");if(r?.name!=="payment_hash"||!r.value)return null;let n=r.value,i=0,a=0,f="0",b=t.sections.find(s=>s.name==="amount");b?.name==="amount"&&b.value&&(f=b.value,a=parseInt(b.value),i=parseInt(b.value)/1e3);let o=t.sections.find(s=>s.name==="timestamp");if(o?.name!=="timestamp"||!o.value)return null;let p=o.value,d,h=t.sections.find(s=>s.name==="expiry");h?.name==="expiry"&&(d=h.value);let u=t.sections.find(s=>s.name==="description"),c=u?.name==="description"?u?.value:void 0;return{paymentHash:n,satoshi:i,millisatoshi:a,amountRaw:f,timestamp:p,expiry:d,description:c}}catch{return null}};function a3(e,t){try{if(!/^[0-9a-fA-F]{64}$/.test(e)||!/^[0-9a-fA-F]{64}$/.test(t))return!1;let r=Y4(t3(i3(e)));return t===r}catch{return!1}}var ro=class{constructor(t){if(this.paymentRequest=t.pr,!this.paymentRequest)throw new Error("Invalid payment request");let r=s3(this.paymentRequest);if(!r)throw new Error("Failed to decode payment request");this.paymentHash=r.paymentHash,this.satoshi=r.satoshi,this.millisatoshi=r.millisatoshi,this.amountRaw=r.amountRaw,this.timestamp=r.timestamp,this.expiry=r.expiry,this.createdDate=new Date(this.timestamp*1e3),this.expiryDate=this.expiry?new Date((this.timestamp+this.expiry)*1e3):void 0,this.description=r.description??null,this.verify=t.verify??null,this.preimage=t.preimage??null,this.successAction=t.successAction??null}async isPaid(){if(this.preimage)return this.validatePreimage(this.preimage);if(this.verify)return await this.verifyPayment();throw new Error("Could not verify payment")}validatePreimage(t){return!t||!this.paymentHash?!1:a3(t,this.paymentHash)}async verifyPayment(){try{if(!this.verify)throw new Error("LNURL verify not available");let t=await fetch(this.verify);if(!t.ok)throw new Error(`Verification request failed: ${t.status} ${t.statusText}`);let r=await t.json();return r.preimage&&(this.preimage=r.preimage),r.settled}catch(t){return console.error("Failed to check LNURL-verify",t),!1}}hasExpired(){let{expiryDate:t}=this;return t?t.getTime()<Date.now():!1}};var c3=1e8;var l3=async e=>{let t="https://getalby.com/api/rates/"+e.toLowerCase()+".json",r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch rate: ${r.status} ${r.statusText}`);return(await r.json()).rate_float/c3},Ul=async({satoshi:e,currency:t})=>{let r=await l3(t);return Number(e)*r};var To=ba(Fl(),1),Pn=class{constructor(t){this._config=t}async unload(){}},u3=e=>{let t=[];for(let r=0,n=atob(e.replace(/[ \r\n]+$/,""));r<n.length;++r){let i=n.charCodeAt(r).toString(16);i.length===1&&(i="0"+i),t[t.length]=i}return t.join("")},Ve;async function Ah(){try{if(Ve)return Ve;let e=(await Promise.resolve().then(()=>ba(jl(),1))).default;return Ve=new e,Ve}catch(e){throw console.error(e),new Error("LNC is not available")}}var Hl="ONLY CONNECT TO TRUSTED WEBSITES",_s=class{constructor(t){this.lnc=t}enable(){return Promise.resolve()}async getInfo(){let t=await Ve.lnd.lightning.getInfo();return{methods:["enable","getBalance","getInfo","sendPayment"],version:"1.0",node:{alias:t.alias,pubkey:t.identityPubkey,color:t.color},supports:["lightning"]}}makeInvoice(t){throw new Error("Method not implemented.")}async sendPayment(t){let r=await Ve.lnd.lightning.sendPaymentSync({paymentRequest:t});if(r.paymentError)throw new Error(r.paymentError);if(!r.paymentPreimage)throw new Error("No preimage in response");if(typeof r.paymentPreimage!="string")throw new Error("expected preimage as string");return{preimage:u3(r.paymentPreimage)}}async getBalance(){var t;let r=await Ve.lnd.lightning.channelBalance();return{balance:parseInt(((t=r.localBalance)==null?void 0:t.sat)||"0")}}keysend(t){throw new Error("Method not implemented.")}lnurl(t){throw new Error("Method not implemented.")}lookupInvoice(t){throw new Error("Method not implemented.")}signMessage(t){throw new Error("Method not implemented.")}verifyMessage(t,r){throw new Error("Method not implemented.")}},Cs=class{constructor(t,r){this._instanceUrl=t,this._adminKey=r}enable(){return Promise.resolve()}async getInfo(){return{node:{alias:(await this.requestLnbits("GET","/api/v1/wallet")).name,pubkey:""},methods:["getInfo","getBalance","sendPayment"],version:"1.0",supports:["lightning"]}}async makeInvoice(t){return{paymentRequest:(await this.requestLnbits("POST","/api/v1/payments",{amount:t.amount||t.defaultAmount||+t,memo:t.defaultMemo,out:!1})).payment_request}}async sendPayment(t){let r=await this.requestLnbits("POST","/api/v1/payments",{bolt11:t,out:!0}),n=await this.requestLnbits("GET",`/api/v1/payments/${r.payment_hash}`);if(!n.preimage)throw new Error("No preimage");return{preimage:n.preimage}}async getBalance(){let t=await this.requestLnbits("GET","/api/v1/wallet");return{balance:Math.floor(t.balance/1e3)}}keysend(t){throw new Error("Method not implemented.")}lnurl(t){throw new Error("Method not implemented.")}lookupInvoice(t){throw new Error("Method not implemented.")}signMessage(t){throw new Error("Method not implemented.")}verifyMessage(t,r){throw new Error("Method not implemented.")}async requestLnbits(t,r,n){let i=null,a=new Headers;if(a.append("Accept","application/json"),a.append("Content-Type","application/json"),a.append("X-Api-Key",this._adminKey),t==="POST")i=JSON.stringify(n);else if(n!==void 0)throw new Error("TODO: support args in GET");let f=await fetch(this._instanceUrl+r+"",{method:t,headers:a,body:i});if(!f.ok){let b=await f.json();throw console.error("errBody",b),new Error(b.detail)}return await f.json()}};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ct.apply(this,arguments)}var bt=class extends Pn{constructor(t){super(t)}async init(){if(!this._config.nwcUrl)throw new Error("no nwc URL provided");return new Vr({nostrWalletConnectUrl:this._config.nwcUrl})}},h3={"extension.generic":class extends Pn{constructor(e){super(e)}init(){if(!window.webln)throw new Error("No WebLN provider available");return Promise.resolve(window.webln)}},"nwc.alby":bt,"nwc.albyhub":bt,"nwc.generic":bt,"nwc.lnfi":bt,"nwc.coinos":bt,"nwc.flash":bt,"nwc.cashume":bt,"nwc.lnbits":bt,"nwc.rizful":bt,lnbits:class extends Pn{constructor(e){super(e)}async init(){if(!this._config.lnbitsInstanceUrl)throw new Error("no lnbits URL provided");if(!this._config.lnbitsAdminKey)throw new Error("no lnbits admin key provided");return new Cs(this._config.lnbitsInstanceUrl,this._config.lnbitsAdminKey)}},lnc:class extends Pn{constructor(e){super(e)}async init(){await Ah();let e=new _s(Ve);try{let t=!Ve.credentials.pairingPhrase;for(t?(console.log("Pairing phrase does not exist"),Ve.credentials.password=Hl):console.log("Pairing phrase set"),await Ve.connect(),t||(Ve.credentials.password=Hl);!Ve.isConnected;)console.log("Waiting to connect..."),await new Promise(r=>{setTimeout(r,100)})}catch(t){throw console.error(t),Ve.disconnect(),Ve.credentials.clear(),t}return e}async unload(){Ve.disconnect(),Ve.credentials.clear(),await super.unload()}}},As={showBalance:!0,appName:"Bitcoin Connect",persistConnection:!0},ne=xl((e,t)=>({route:"/start",routeHistory:[],modalOpen:!1,currency:void 0,connected:!1,connecting:!1,error:void 0,alias:void 0,balance:void 0,connectorName:void 0,invoice:void 0,provider:void 0,connector:void 0,connectorConfig:void 0,bitcoinConnectConfig:As,info:void 0,connectNWC:r=>t().connect({connectorName:"NWC",connectorType:"nwc.generic",nwcUrl:r}),connect:async(r,n={redirectTo:"/connected"})=>{e({connecting:!0,error:void 0});try{let i=new h3[r.connectorType](r),a=await i.init(),f;await a.enable();try{f=await a.getInfo()}catch{console.error("Failed to request wallet info")}if(!t().connecting)return;e({connectorConfig:r,connector:i,connected:!0,connecting:!1,info:f,provider:a,connectorName:r.connectorName,route:n.redirectTo});let{bitcoinConnectConfig:b}=t();b.persistConnection!==!1&&window.localStorage.setItem("bc:config",JSON.stringify(r))}catch(i){console.error(i),e({error:i.toString(),connecting:!1}),t().disconnect()}},disconnect:()=>{var r;(r=t().connector)==null||r.unload(),e({connectorConfig:void 0,connector:void 0,connected:!1,connecting:!1,connectorName:void 0,provider:void 0,modalOpen:!1}),window.localStorage.removeItem("bc:config")},pushRoute:r=>{t().route!==r&&e({route:r,routeHistory:[...t().routeHistory,t().route]})},popRoute(){let r=t().routeHistory,n=r.pop()||"/start";e({route:n,routeHistory:r})},clearRouteHistory(){e({route:"/start",routeHistory:[]})},setModalOpen:r=>{e({modalOpen:r})},setBitcoinConnectConfig:r=>{e({bitcoinConnectConfig:Ct({},As,r)});let n=t();n.bitcoinConnectConfig.autoConnect===!1||n.connected||n.connecting||(function(){try{let{hash:i}=window.location;if(i){let a=i.indexOf("?"),f=i.slice(a>0?a:1),b=new URLSearchParams(f),o=b.get("nwc");if(o&&o.startsWith("nostr+walletconnect://")){let{searchParams:p}=new URL(o);p.get("relay")&&p.get("secret")&&(b.delete("nwc"),window.location.hash=i.slice(0,a>0?a+1:1)+b.toString(),ne.getState().connectNWC(o))}}}catch(i){console.error(i)}})()},setError:r=>{e({error:r})},setCurrency:r=>{r?window.localStorage.setItem("bc:currency",r):window.localStorage.removeItem("bc:currency"),e({currency:r})},supports:r=>{let{info:n,provider:i}=t();return!(n==null||!n.methods)&&n.methods.indexOf(r)>-1&&!(i==null||!i.getBalance)}}));function ee(e,t,r,n){var i,a=arguments.length,f=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(e,t,r,n);else for(var b=e.length-1;b>=0;b--)(i=e[b])&&(f=(a<3?i(f):a>3?i(t,r,f):i(t,r))||f);return a>3&&f&&Object.defineProperty(t,r,f),f}globalThis.window&&((function(){let e=window.localStorage.getItem("bc:config");if(e){let r=JSON.parse(e);ne.getState().connect(r,{redirectTo:"/start"})}let t=window.localStorage.getItem("bc:currency");t&&ne.getState().setCurrency(t)})(),window.addEventListener("webln:enabled",()=>{ne.getState().connecting||ne.getState().connect({connectorName:"Extension",connectorType:"extension.generic"},{redirectTo:"/start"})})),typeof SuppressedError=="function"&&SuppressedError;var po=globalThis,Xs=po.ShadowRoot&&(po.ShadyCSS===void 0||po.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Sh=Symbol(),$l=new WeakMap,Ss=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==Sh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(Xs&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=$l.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&$l.set(r,t))}return t}toString(){return this.cssText}},Gl=Xs?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return(n=>new Ss(typeof n=="string"?n:n+"",void 0,Sh))(r)})(e):e,{is:f3,defineProperty:d3,getOwnPropertyDescriptor:p3,getOwnPropertyNames:y3,getOwnPropertySymbols:g3,getPrototypeOf:b3}=Object,Qt=globalThis,Wl=Qt.trustedTypes,w3=Wl?Wl.emptyScript:"",m3=Qt.reactiveElementPolyfillSupport,or=(e,t)=>e,bo={toAttribute(e,t){switch(t){case Boolean:e=e?w3:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},ea=(e,t)=>!f3(e,t),Kl={attribute:!0,type:String,converter:bo,reflect:!1,useDefault:!1,hasChanged:ea};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Qt.litPropertyMetadata??(Qt.litPropertyMetadata=new WeakMap);var hn=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Kl){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(t,n,r);i!==void 0&&d3(this.prototype,t,i)}}static getPropertyDescriptor(t,r,n){let{get:i,set:a}=p3(this.prototype,t)??{get(){return this[r]},set(f){this[r]=f}};return{get:i,set(f){let b=i?.call(this);a?.call(this,f),this.requestUpdate(t,b,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Kl}static _$Ei(){if(this.hasOwnProperty(or("elementProperties")))return;let t=b3(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(or("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(or("properties"))){let r=this.properties,n=[...y3(r),...g3(r)];for(let i of n)this.createProperty(i,r[i])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let i of n)r.unshift(Gl(i))}else t!==void 0&&r.push(Gl(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((r,n)=>{if(Xs)r.adoptedStyleSheets=n.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of n){let a=document.createElement("style"),f=po.litNonce;f!==void 0&&a.setAttribute("nonce",f),a.textContent=i.cssText,r.appendChild(a)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){let a=(n.converter?.toAttribute!==void 0?n.converter:bo).toAttribute(r,n.type);this._$Em=t,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(t,r){let n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let a=n.getPropertyOptions(i),f=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:bo;this._$Em=i,this[i]=f.fromAttribute(r,a.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let i=this.constructor,a=this[t];if(n??(n=i.getPropertyOptions(t)),!((n.hasChanged??ea)(a,r)||n.useDefault&&n.reflect&&a===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:i,wrapped:a},f){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,f??r??this[t]),a!==!0||f!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,a]of this._$Ep)this[i]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,a]of n){let{wrapped:f}=a,b=this[i];f!==!0||this._$AL.has(i)||b===void 0||this.C(i,void 0,a,b)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};hn.elementStyles=[],hn.shadowRootOptions={mode:"open"},hn[or("elementProperties")]=new Map,hn[or("finalized")]=new Map,m3?.({ReactiveElement:hn}),(Qt.reactiveElementVersions??(Qt.reactiveElementVersions=[])).push("2.1.0");var ir=globalThis,wo=ir.trustedTypes,Vl=wo?wo.createPolicy("lit-html",{createHTML:e=>e}):void 0,Zl="$lit$",Kt=`lit$${Math.random().toFixed(9).slice(2)}$`,Th="?"+Kt,v3=`<${Th}>`,yn=document,mo=()=>yn.createComment(""),ur=e=>e===null||typeof e!="object"&&typeof e!="function",Ts=Array.isArray,Ji=`[
\f\r]`,Jn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yl=/-->/g,ql=/>/g,an=RegExp(`>|${Ji}(?:([^\\s"'>=/]+)(${Ji}*=${Ji}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),zl=/'/g,Ql=/"/g,Jl=/^(?:script|style|textarea|title)$/i,hr=Symbol.for("lit-noChange"),He=Symbol.for("lit-nothing"),Xl=new WeakMap,dn=yn.createTreeWalker(yn,129);function Oh(e,t){if(!Ts(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vl!==void 0?Vl.createHTML(t):t}var fr=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let a=0,f=0,b=t.length-1,o=this.parts,[p,d]=((h,u)=>{let c=h.length-1,s=[],l,g=u===2?"<svg>":u===3?"<math>":"",w=Jn;for(let y=0;y<c;y++){let v=h[y],m,C,E=-1,O=0;for(;O<v.length&&(w.lastIndex=O,C=w.exec(v),C!==null);)O=w.lastIndex,w===Jn?C[1]==="!--"?w=Yl:C[1]!==void 0?w=ql:C[2]!==void 0?(Jl.test(C[2])&&(l=RegExp("</"+C[2],"g")),w=an):C[3]!==void 0&&(w=an):w===an?C[0]===">"?(w=l??Jn,E=-1):C[1]===void 0?E=-2:(E=w.lastIndex-C[2].length,m=C[1],w=C[3]===void 0?an:C[3]==='"'?Ql:zl):w===Ql||w===zl?w=an:w===Yl||w===ql?w=Jn:(w=an,l=void 0);let _=w===an&&h[y+1].startsWith("/>")?" ":"";g+=w===Jn?v+v3:E>=0?(s.push(m),v.slice(0,E)+Zl+v.slice(E)+Kt+_):v+Kt+(E===-2?y:_)}return[Oh(h,g+(h[c]||"<?>")+(u===2?"</svg>":u===3?"</math>":"")),s]})(t,r);if(this.el=e.createElement(p,n),dn.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=dn.nextNode())!==null&&o.length<b;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(Zl)){let u=d[f++],c=i.getAttribute(h).split(Kt),s=/([.?@])?(.*)/.exec(u);o.push({type:1,index:a,name:s[2],strings:c,ctor:s[1]==="."?Ns:s[1]==="?"?xs:s[1]==="@"?Rs:Ln}),i.removeAttribute(h)}else h.startsWith(Kt)&&(o.push({type:6,index:a}),i.removeAttribute(h));if(Jl.test(i.tagName)){let h=i.textContent.split(Kt),u=h.length-1;if(u>0){i.textContent=wo?wo.emptyScript:"";for(let c=0;c<u;c++)i.append(h[c],mo()),dn.nextNode(),o.push({type:2,index:++a});i.append(h[u],mo())}}}else if(i.nodeType===8)if(i.data===Th)o.push({type:2,index:a});else{let h=-1;for(;(h=i.data.indexOf(Kt,h+1))!==-1;)o.push({type:7,index:a}),h+=Kt.length-1}a++}}static createElement(t,r){let n=yn.createElement("template");return n.innerHTML=t,n}};function kn(e,t,r=e,n){if(t===hr)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,a=ur(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(t=kn(e,i._$AS(e,t.values),i,n)),t}var Os=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??yn).importNode(r,!0);dn.currentNode=i;let a=dn.nextNode(),f=0,b=0,o=n[0];for(;o!==void 0;){if(f===o.index){let p;o.type===2?p=new vo(a,a.nextSibling,this,t):o.type===1?p=new o.ctor(a,o.name,o.strings,this,t):o.type===6&&(p=new Is(a,this,t)),this._$AV.push(p),o=n[++b]}f!==o?.index&&(a=dn.nextNode(),f++)}return dn.currentNode=yn,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},vo=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=He,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=kn(this,t,r),ur(t)?t===He||t==null||t===""?(this._$AH!==He&&this._$AR(),this._$AH=He):t!==this._$AH&&t!==hr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):(n=>Ts(n)||typeof n?.[Symbol.iterator]=="function")(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==He&&ur(this._$AH)?this._$AA.nextSibling.data=t:this.T(yn.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=fr.createElement(Oh(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let a=new Os(i,this),f=a.u(this.options);a.p(r),this.T(f),this._$AH=a}}_$AC(t){let r=Xl.get(t.strings);return r===void 0&&Xl.set(t.strings,r=new fr(t)),r}k(t){Ts(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let a of t)i===r.length?r.push(n=new e(this.O(mo()),this.O(mo()),this,this.options)):n=r[i],n._$AI(a),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t&&t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ln=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,a){this.type=1,this._$AH=He,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=a,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=He}_$AI(t,r=this,n,i){let a=this.strings,f=!1;if(a===void 0)t=kn(this,t,r,0),f=!ur(t)||t!==this._$AH&&t!==hr,f&&(this._$AH=t);else{let b=t,o,p;for(t=a[0],o=0;o<a.length-1;o++)p=kn(this,b[n+o],r,o),p===hr&&(p=this._$AH[o]),f||(f=!ur(p)||p!==this._$AH[o]),p===He?t=He:t!==He&&(t+=(p??"")+a[o+1]),this._$AH[o]=p}f&&!i&&this.j(t)}j(t){t===He?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ns=class extends Ln{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===He?void 0:t}},xs=class extends Ln{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==He)}},Rs=class extends Ln{constructor(t,r,n,i,a){super(t,r,n,i,a),this.type=5}_$AI(t,r=this){if((t=kn(this,t,r,0)??He)===hr)return;let n=this._$AH,i=t===He&&n!==He||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,a=t!==He&&(n===He||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Is=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){kn(this,t)}},E3=ir.litHtmlPolyfillSupport;E3?.(fr,vo),(ir.litHtmlVersions??(ir.litHtmlVersions=[])).push("3.3.0");var yo=globalThis,ta=yo.ShadowRoot&&(yo.ShadyCSS===void 0||yo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,na=Symbol(),e1=new WeakMap,Eo=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==na)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(ta&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=e1.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&e1.set(r,t))}return t}toString(){return this.cssText}},Oo=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((n,i,a)=>n+(f=>{if(f._$cssResult$===!0)return f.cssText;if(typeof f=="number")return f;throw Error("Value passed to 'css' function must be a 'css' function result: "+f+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[a+1],e[0]);return new Eo(r,e,na)},t1=ta?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return(n=>new Eo(typeof n=="string"?n:n+"",void 0,na))(r)})(e):e,{is:_3,defineProperty:C3,getOwnPropertyDescriptor:A3,getOwnPropertyNames:S3,getOwnPropertySymbols:T3,getPrototypeOf:O3}=Object,Jt=globalThis,n1=Jt.trustedTypes,N3=n1?n1.emptyScript:"",x3=Jt.reactiveElementPolyfillSupport,sr=(e,t)=>e,Ps={toAttribute(e,t){switch(t){case Boolean:e=e?N3:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Nh=(e,t)=>!_3(e,t),r1={attribute:!0,type:String,converter:Ps,reflect:!1,useDefault:!1,hasChanged:Nh};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Jt.litPropertyMetadata??(Jt.litPropertyMetadata=new WeakMap);var Zt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=r1){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(t,n,r);i!==void 0&&C3(this.prototype,t,i)}}static getPropertyDescriptor(t,r,n){let{get:i,set:a}=A3(this.prototype,t)??{get(){return this[r]},set(f){this[r]=f}};return{get:i,set(f){let b=i?.call(this);a?.call(this,f),this.requestUpdate(t,b,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??r1}static _$Ei(){if(this.hasOwnProperty(sr("elementProperties")))return;let t=O3(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(sr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(sr("properties"))){let r=this.properties,n=[...S3(r),...T3(r)];for(let i of n)this.createProperty(i,r[i])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let i of n)r.unshift(t1(i))}else t!==void 0&&r.push(t1(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((r,n)=>{if(ta)r.adoptedStyleSheets=n.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of n){let a=document.createElement("style"),f=yo.litNonce;f!==void 0&&a.setAttribute("nonce",f),a.textContent=i.cssText,r.appendChild(a)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){let a=(n.converter?.toAttribute!==void 0?n.converter:Ps).toAttribute(r,n.type);this._$Em=t,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(t,r){let n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let a=n.getPropertyOptions(i),f=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:Ps;this._$Em=i,this[i]=f.fromAttribute(r,a.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let i=this.constructor,a=this[t];if(n??(n=i.getPropertyOptions(t)),!((n.hasChanged??Nh)(a,r)||n.useDefault&&n.reflect&&a===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:i,wrapped:a},f){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,f??r??this[t]),a!==!0||f!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,a]of this._$Ep)this[i]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,a]of n){let{wrapped:f}=a,b=this[i];f!==!0||this._$AL.has(i)||b===void 0||this.C(i,void 0,a,b)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},Zt[sr("elementProperties")]=new Map,Zt[sr("finalized")]=new Map,x3?.({ReactiveElement:Zt}),(Jt.reactiveElementVersions??(Jt.reactiveElementVersions=[])).push("2.1.0");var ar=globalThis,_o=ar.trustedTypes,o1=_o?_o.createPolicy("lit-html",{createHTML:e=>e}):void 0,xh="$lit$",Yt=`lit$${Math.random().toFixed(9).slice(2)}$`,Rh="?"+Yt,R3=`<${Rh}>`,gn=document,dr=()=>gn.createComment(""),pr=e=>e===null||typeof e!="object"&&typeof e!="function",ks=Array.isArray,Xi=`[
\f\r]`,Xn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,i1=/-->/g,s1=/>/g,cn=RegExp(`>|${Xi}(?:([^\\s"'>=/]+)(${Xi}*=${Xi}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),a1=/'/g,c1=/"/g,Ih=/^(?:script|style|textarea|title)$/i,Ph=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),X=Ph(1),Ee=Ph(2),Un=Symbol.for("lit-noChange"),$e=Symbol.for("lit-nothing"),l1=new WeakMap,pn=gn.createTreeWalker(gn,129);function kh(e,t){if(!ks(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return o1!==void 0?o1.createHTML(t):t}var I3=(e,t)=>{let r=e.length-1,n=[],i,a=t===2?"<svg>":t===3?"<math>":"",f=Xn;for(let b=0;b<r;b++){let o=e[b],p,d,h=-1,u=0;for(;u<o.length&&(f.lastIndex=u,d=f.exec(o),d!==null);)u=f.lastIndex,f===Xn?d[1]==="!--"?f=i1:d[1]!==void 0?f=s1:d[2]!==void 0?(Ih.test(d[2])&&(i=RegExp("</"+d[2],"g")),f=cn):d[3]!==void 0&&(f=cn):f===cn?d[0]===">"?(f=i??Xn,h=-1):d[1]===void 0?h=-2:(h=f.lastIndex-d[2].length,p=d[1],f=d[3]===void 0?cn:d[3]==='"'?c1:a1):f===c1||f===a1?f=cn:f===i1||f===s1?f=Xn:(f=cn,i=void 0);let c=f===cn&&e[b+1].startsWith("/>")?" ":"";a+=f===Xn?o+R3:h>=0?(n.push(p),o.slice(0,h)+xh+o.slice(h)+Yt+c):o+Yt+(h===-2?b:c)}return[kh(e,a+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},yr=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let a=0,f=0,b=t.length-1,o=this.parts,[p,d]=I3(t,r);if(this.el=e.createElement(p,n),pn.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=pn.nextNode())!==null&&o.length<b;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(xh)){let u=d[f++],c=i.getAttribute(h).split(Yt),s=/([.?@])?(.*)/.exec(u);o.push({type:1,index:a,name:s[2],strings:c,ctor:s[1]==="."?Us:s[1]==="?"?Ms:s[1]==="@"?Ds:Dn}),i.removeAttribute(h)}else h.startsWith(Yt)&&(o.push({type:6,index:a}),i.removeAttribute(h));if(Ih.test(i.tagName)){let h=i.textContent.split(Yt),u=h.length-1;if(u>0){i.textContent=_o?_o.emptyScript:"";for(let c=0;c<u;c++)i.append(h[c],dr()),pn.nextNode(),o.push({type:2,index:++a});i.append(h[u],dr())}}}else if(i.nodeType===8)if(i.data===Rh)o.push({type:2,index:a});else{let h=-1;for(;(h=i.data.indexOf(Yt,h+1))!==-1;)o.push({type:7,index:a}),h+=Yt.length-1}a++}}static createElement(t,r){let n=gn.createElement("template");return n.innerHTML=t,n}};function Mn(e,t,r=e,n){if(t===Un)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,a=pr(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(t=Mn(e,i._$AS(e,t.values),i,n)),t}var Ls=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??gn).importNode(r,!0);pn.currentNode=i;let a=pn.nextNode(),f=0,b=0,o=n[0];for(;o!==void 0;){if(f===o.index){let p;o.type===2?p=new gr(a,a.nextSibling,this,t):o.type===1?p=new o.ctor(a,o.name,o.strings,this,t):o.type===6&&(p=new Bs(a,this,t)),this._$AV.push(p),o=n[++b]}f!==o?.index&&(a=pn.nextNode(),f++)}return pn.currentNode=gn,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},gr=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=$e,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Mn(this,t,r),pr(t)?t===$e||t==null||t===""?(this._$AH!==$e&&this._$AR(),this._$AH=$e):t!==this._$AH&&t!==Un&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):(n=>ks(n)||typeof n?.[Symbol.iterator]=="function")(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==$e&&pr(this._$AH)?this._$AA.nextSibling.data=t:this.T(gn.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=yr.createElement(kh(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let a=new Ls(i,this),f=a.u(this.options);a.p(r),this.T(f),this._$AH=a}}_$AC(t){let r=l1.get(t.strings);return r===void 0&&l1.set(t.strings,r=new yr(t)),r}k(t){ks(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let a of t)i===r.length?r.push(n=new e(this.O(dr()),this.O(dr()),this,this.options)):n=r[i],n._$AI(a),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t&&t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Dn=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,a){this.type=1,this._$AH=$e,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=a,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=$e}_$AI(t,r=this,n,i){let a=this.strings,f=!1;if(a===void 0)t=Mn(this,t,r,0),f=!pr(t)||t!==this._$AH&&t!==Un,f&&(this._$AH=t);else{let b=t,o,p;for(t=a[0],o=0;o<a.length-1;o++)p=Mn(this,b[n+o],r,o),p===Un&&(p=this._$AH[o]),f||(f=!pr(p)||p!==this._$AH[o]),p===$e?t=$e:t!==$e&&(t+=(p??"")+a[o+1]),this._$AH[o]=p}f&&!i&&this.j(t)}j(t){t===$e?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Us=class extends Dn{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===$e?void 0:t}},Ms=class extends Dn{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==$e)}},Ds=class extends Dn{constructor(t,r,n,i,a){super(t,r,n,i,a),this.type=5}_$AI(t,r=this){if((t=Mn(this,t,r,0)??$e)===Un)return;let n=this._$AH,i=t===$e&&n!==$e||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,a=t!==$e&&(n===$e||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Bs=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Mn(this,t)}},P3=ar.litHtmlPolyfillSupport;P3?.(yr,gr),(ar.litHtmlVersions??(ar.litHtmlVersions=[])).push("3.3.0");var cr=globalThis,Xt=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((n,i,a)=>{let f=a?.renderBefore??i,b=f._$litPart$;if(b===void 0){let o=a?.renderBefore??null;f._$litPart$=b=new gr(i.insertBefore(dr(),o),o,void 0,a??{})}return b._$AI(n),b})(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Un}};Xt._$litElement$=!0,Xt.finalized=!0,cr.litElementHydrateSupport?.({LitElement:Xt});var k3=cr.litElementPolyfillSupport;k3?.({LitElement:Xt}),(cr.litElementVersions??(cr.litElementVersions=[])).push("4.2.0");var pe=e=>(t,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},L3={attribute:!0,type:String,converter:bo,reflect:!1,hasChanged:ea},U3=(e=L3,t,r)=>{let{kind:n,metadata:i}=r,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),a.set(r.name,e),n==="accessor"){let{name:f}=r;return{set(b){let o=t.get.call(this);t.set.call(this,b),this.requestUpdate(f,o,e)},init(b){return b!==void 0&&this.C(f,void 0,e,b),b}}}if(n==="setter"){let{name:f}=r;return function(b){let o=this[f];t.call(this,b),this.requestUpdate(f,o,e)}}throw Error("Unsupported decorator location: "+n)};function Ue(e){return(t,r)=>typeof r=="object"?U3(e,t,r):((n,i,a)=>{let f=i.hasOwnProperty(a);return i.constructor.createProperty(a,n),f?Object.getOwnPropertyDescriptor(i,a):void 0})(e,t,r)}function ge(e){return Ue({...e,state:!0,attribute:!1})}var u1,h1,br=class extends Xt{updated(t){var r;if(super.updated(t),globalThis.document&&globalThis.document.documentElement.classList.contains("dark")&&(r=this.shadowRoot)!=null&&(r=r.children)!=null&&r.length)for(let n of this.shadowRoot.children)n.classList.contains("dark")||n.classList.add("dark")}_getBrandColorLuminance(){if(!globalThis.window)return 0;let t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,r=window.getComputedStyle(this).getPropertyValue(t?"--bc-color-brand-dark":"--bc-color-brand")||window.getComputedStyle(this).getPropertyValue("--bc-color-brand")||"#196CE7";if(!r.match(/^#[0-9A-F]{6}$/i)){let n=document.createElement("div");n.style.color=r,n.style.display="none",document.body.appendChild(n),r=window.getComputedStyle(n).color,n.remove()}return(function(n){if(n.startsWith("#"))return n=n.slice(1),(.299*parseInt(n.slice(0,2),16)+.587*parseInt(n.slice(2,4),16)+.114*parseInt(n.slice(4,6),16))/255;if(n.startsWith("rgb")||n.startsWith("rgba")){let i=n.match(/\d+(\.\d+)?/g);return(.299*parseFloat(i[0])+.587*parseFloat(i[1])+.114*parseFloat(i[2]))/255}throw new Error("Unsupported luminance: "+n)})(r)}};br.styles=[Oo(u1||(u1=(e=>e)`
:host {
// global css reset in shadow DOM
all: initial;
font-variant-numeric: slashed-zero;
}
// TODO: move to individual components - only needed by a couple of icons
.hover-animation:hover .hover-right-up {
transform: translateX(2px) translateY(-2px);
transition: all 0.3s;
}
.hover-animation:hover .hover-right {
transform: translateX(3px);
transition: all 0.3s;
}
`))];var ye=class extends br{constructor(){super(),this._modalOpen=!1,this._connected=!1,this._connecting=!1,this._connectorName=void 0,this._appName=void 0,this._appIcon=void 0,this._filters=void 0,this._error=void 0,this._connected=ne.getState().connected,this._connecting=ne.getState().connecting,this._connectorName=ne.getState().connectorName,this._appName=ne.getState().bitcoinConnectConfig.appName,this._appIcon=ne.getState().bitcoinConnectConfig.appIcon,this._filters=ne.getState().bitcoinConnectConfig.filters,this._error=ne.getState().error,this._route=ne.getState().route,this._modalOpen=ne.getState().modalOpen,ne.subscribe(t=>{this._connected=t.connected,this._connecting=t.connecting,this._connectorName=t.connectorName,this._appName=t.bitcoinConnectConfig.appName,this._appIcon=t.bitcoinConnectConfig.appIcon,this._filters=t.bitcoinConnectConfig.filters,this._error=t.error,this._route=t.route,this._modalOpen=t.modalOpen})}};ee([ge()],ye.prototype,"_modalOpen",void 0),ee([ge()],ye.prototype,"_connected",void 0),ee([ge()],ye.prototype,"_connecting",void 0),ee([ge()],ye.prototype,"_connectorName",void 0),ee([ge()],ye.prototype,"_appName",void 0),ee([ge()],ye.prototype,"_appIcon",void 0),ee([ge()],ye.prototype,"_filters",void 0),ee([ge()],ye.prototype,"_error",void 0),ee([ge()],ye.prototype,"_route",void 0);var lr=Ee(h1||(h1=(e=>e)`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4635 6.0794C17.4325 6.83684 18.8238 7.94315 18.5058 9.88813C18.3285 10.984 17.8283 11.6586 17.1374 12.0334C16.8767 12.1748 16.8191 12.6131 17.0507 12.7984C18.0431 13.592 18.4393 14.7164 17.8152 16.4238C16.9057 18.9138 14.8635 19.177 12.1521 18.6697C11.9858 18.6385 11.8223 18.7396 11.7792 18.9032L11.4563 20.1009C11.3343 20.5633 10.8605 20.8392 10.3981 20.7173C9.93541 20.5953 9.65932 20.1212 9.78149 19.6586L10.0909 18.5121C10.1354 18.3439 10.0349 18.1715 9.86676 18.1266C9.62998 18.0632 9.39019 17.9976 9.14679 17.9294C8.97646 17.8817 8.79964 17.9822 8.75452 18.1532L8.44373 19.3067C8.32182 19.7688 7.8483 20.0446 7.38616 19.9226C6.92422 19.8007 6.64851 19.3274 6.77026 18.8655L7.08988 17.677C7.13458 17.5073 7.03399 17.3333 6.86481 17.2869C6.81003 17.2718 6.75512 17.2567 6.70008 17.2415L6.69828 17.241C6.4604 17.1755 6.22001 17.1094 5.97667 17.0449L5.42127 16.8919C4.80739 16.7299 4.48576 16.0556 4.74625 15.4767C4.95488 15.013 5.47104 14.7734 5.96239 14.9043C5.97132 14.9067 5.98016 14.909 5.98891 14.9113C6.1066 14.9426 6.10094 14.9199 6.21958 14.8924C6.46112 14.8366 6.58893 14.6373 6.65055 14.4901L7.80952 10.0986L7.81254 10.0867L8.63176 6.98069C8.63683 6.96147 8.64021 6.94184 8.64116 6.92198C8.65547 6.62155 8.78957 6.31876 8.35166 6.11178C8.25682 6.06695 8.16354 6.02432 8.06217 5.99736C8.04539 5.9929 8.02808 5.98833 8.01032 5.98367C7.51444 5.85341 7.21198 5.34932 7.34263 4.85356C7.47162 4.36411 7.9731 4.07202 8.46248 4.2013L9.43668 4.47448C9.68634 4.54012 9.94146 4.60362 10.2006 4.66691C10.3681 4.70784 10.5375 4.60681 10.5815 4.44006L10.8668 3.39102C10.9889 2.9288 11.4625 2.65299 11.9247 2.77495C12.3871 2.89693 12.663 3.37062 12.541 3.83294L12.2715 4.82295C12.2273 4.99041 12.3292 5.16145 12.4975 5.20248C12.7444 5.26269 12.9911 5.32354 13.2353 5.38588C13.4 5.42795 13.5684 5.32988 13.6118 5.16547L13.8783 4.18608C14.0003 3.72357 14.4741 3.44751 14.9366 3.56948C15.3992 3.69145 15.6753 4.16533 15.5533 4.62789L15.2637 5.69461C15.2215 5.85461 15.3091 6.01999 15.4635 6.0794ZM11.2479 8.6805L11.4769 7.81121C11.5836 7.40644 11.9982 7.16477 12.403 7.27142C12.8077 7.37807 13.0494 7.79266 12.9428 8.19743L12.7137 9.06672L13.5829 9.29575C13.9877 9.4024 14.2294 9.81699 14.1227 10.2218C14.0161 10.6265 13.6015 10.8682 13.1967 10.7615L12.3275 10.5325L12.0984 11.4018C11.9918 11.8066 11.5772 12.0483 11.1724 11.9416C10.7676 11.835 10.5259 11.4204 10.6326 11.0156L10.8617 10.1463L9.99225 9.91722C9.58747 9.81056 9.34579 9.39598 9.45245 8.99121C9.5591 8.58644 9.9737 8.34477 10.3785 8.45142L11.2479 8.6805ZM13.2927 12.7001L13.0636 13.5693L12.1942 13.3403C11.7895 13.2336 11.3749 13.4753 11.2682 13.8801C11.1615 14.2848 11.4032 14.6994 11.808 14.8061L12.6774 15.0351L12.4484 15.9045C12.3417 16.3092 12.5834 16.7238 12.9882 16.8305C13.3929 16.9371 13.8075 16.6954 13.9142 16.2907L14.1432 15.4214L15.0125 15.6504C15.4172 15.757 15.8318 15.5154 15.9385 15.1106C16.0451 14.7058 15.8035 14.2912 15.3987 14.1846L14.5295 13.9556L14.7585 13.0863C14.8652 12.6815 14.6235 12.2669 14.2187 12.1603C13.8139 12.0536 13.3994 12.2953 13.2927 12.7001Z" fill="currentColor"/>
</svg>`));function ra(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function M3(e,t=","){return e.map(ra).join(t)}var Lh=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Co(e){for(var t=9,r=e.length;r--;)t=Math.imul(t^e.charCodeAt(r),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function oa(e,t="@media "){return t+Re(e).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function Re(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function f1(e){return e}function Fs(){}var Me={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Uh(e){return e.match(/[-=:;]/g)?.length||0}function js(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Uh(e),15)<<18}var D3=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function ia({n:e,i:t,v:r=[]},n,i,a){e&&(e=ra({n:e,i:t,v:r})),a=[...Re(a)];for(let f of r){let b=n.theme("screens",f);for(let o of Re(b&&oa(b)||n.v(f)))a.push(o),i|=b?67108864|js(o):f=="dark"?1073741824:o[0]=="@"?js(o):1<<~(/:([a-z-]+)/.test(o)&&~D3.indexOf(RegExp.$1.slice(2,7))||-18)}return{n:e,p:i,r:a,i:t}}var Mh=new Map;function Hs(e){if(e.d){let t=[],r=es(e.r.reduce((n,i)=>i[0]=="@"?(t.push(i),n):i?es(n,a=>es(i,f=>{let b=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(f);if(b){let o=a.indexOf(b[1]);return~o?a.slice(0,o)+b[0]+a.slice(o+b[1].length):ts(a,f)}return ts(f,a)})):n,"&"),n=>ts(n,e.n?"."+Lh(e.n):""));return r&&t.push(r.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((n,i)=>i+"{"+n+"}",e.d)}}function es(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>t(n)+i)}function ts(e,t){return e.replace(/&/g,t)}var d1=new Intl.Collator("en",{numeric:!0});function Dh(e,t){for(var r=0,n=e.length;r<n;){let i=n+r>>1;0>=Bh(e[i],t)?r=i+1:n=i}return n}function Bh(e,t){let r=e.p&Me.o;return r!=(t.p&Me.o)||r!=Me.b&&r!=Me.o?e.p-t.p||e.o-t.o||d1.compare(p1(e.n),p1(t.n))||d1.compare(y1(e.n),y1(t.n)):0}function p1(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function y1(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function ns(e,t){return Math.round(parseInt(e,16)*t)}function qt(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:r="1",opacityVariable:n}=t,i=n?`var(${n})`:r;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if(e[0]=="#"&&(e.length==4||e.length==7)){let a=(e.length-1)/3,f=[17,1,.062272][a-1];return`rgba(${[ns(e.substr(1,a),f),ns(e.substr(1+a,a),f),ns(e.substr(1+2*a,a),f),i]})`}return i=="1"?e:i=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function Fh(e,t,r,n,i=[]){return(function a(f,{n:b,p:o,r:p=[],i:d},h){let u=[],c="",s=0,l=0;for(let y in f||{}){var g,w;let v=f[y];if(y[0]=="@"){if(!v)continue;if(y[1]=="a"){u.push(...aa(b,o,So(""+v),h,o,p,d,!0));continue}if(y[1]=="l"){for(let m of Re(v))u.push(...a(m,{n:b,p:(g=Me[y[7]],o&~Me.o|g),r:y[7]=="d"?[]:p,i:d},h));continue}if(y[1]=="i"){u.push(...Re(v).map(m=>({p:-1,o:0,r:[],d:y+" "+m})));continue}if(y[1]=="k"){u.push({p:Me.d,o:0,r:[y],d:a(v,{p:Me.d},h).map(Hs).join("")});continue}if(y[1]=="f"){u.push(...Re(v).map(m=>({p:Me.d,o:0,r:[y],d:a(m,{p:Me.d},h).map(Hs).join("")})));continue}}if(typeof v!="object"||Array.isArray(v))y=="label"&&v?b=v+Co(JSON.stringify([o,d,f])):(v||v===0)&&(y=y.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),l+=1,s=Math.max(s,(w=y)[0]=="-"?0:Uh(w)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(w)?+!!RegExp.$1||-!!RegExp.$2:0)+1),c+=(c?";":"")+Re(v).map(m=>h.s(y,sa(""+m,h.theme)+(d?" !important":""))).join(";"));else if(y[0]=="@"||y.includes("&")){let m=o;y[0]=="@"&&(y=y.replace(/\bscreen\(([^)]+)\)/g,(C,E)=>{let O=h.theme("screens",E);return O?(m|=67108864,oa(O,"")):C}),m|=js(y)),u.push(...a(v,{n:b,p:m,r:[...p,y],i:d},h))}else u.push(...a(v,{p:o,r:[...p,y]},h))}return u.unshift({n:b,p:o,o:Math.max(0,15-l)+1.5*Math.min(s||15,15),r:p,d:c}),u.sort(Bh)})(e,ia(t,r,n,i),r)}function sa(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,a,f="")=>{let b=t(i,f);return typeof b=="function"&&/color|fill|stroke/i.test(i)?qt(b):""+Re(b).filter(o=>Object(o)!==o)})}function jh(e,t){let r,n=[];for(let i of e)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&t}):n.push({...i,n:i.n&&t});return n}function Ao(e,t,r=Me.u,n,i){let a=[];for(let f of e)for(let b of(function(o,p,d,h,u){let c=(function(s,l){let g=Mh.get(s.n);return g?g(s,l):l.r(s.n,s.v[0]=="dark")})(o={...o,i:o.i||u},p);return c?typeof c=="string"?({r:h,p:d}=ia(o,p,d,h),jh(Ao(So(c),p,d,h,o.i),o.n)):Array.isArray(c)?c.map(s=>{var l,g;return{o:0,...s,r:[...Re(h),...Re(s.r)],p:(l=d,g=s.p??d,l&~Me.o|g)}}):Fh(c,o,p,d,h):[{c:ra(o),p:0,o:0,r:[]}]})(f,t,r,n,i))a.splice(Dh(a,b),0,b);return a}function aa(e,t,r,n,i,a,f,b){return jh((b?r.flatMap(o=>Ao([o],n,i,a,f)):Ao(r,n,i,a,f)).map(o=>o.p&Me.o&&(o.n||t==Me.b)?{...o,p:o.p&~Me.o|t,o:0}:o),e)}function B3(e,t,r,n){return Mh.set(e,(i,a)=>{let{n:f,p:b,r:o,i:p}=ia(i,a,t);return r&&aa(f,t,r,a,b,o,p,n)}),e}function rs(e,t,r){if(e[e.length-1]!="("){let n=[],i=!1,a=!1,f="";for(let b of e)if(b!="("&&!/[~@]$/.test(b)){if(b[0]=="!"&&(b=b.slice(1),i=!i),b.endsWith(":")){n[b=="dark:"?"unshift":"push"](b.slice(0,-1));continue}b[0]=="-"&&(b=b.slice(1),a=!a),b.endsWith("-")&&(b=b.slice(0,-1)),b&&b!="&"&&(f+=(f&&"-")+b)}f&&(a&&(f="-"+f),t[0].push({n:f,v:n.filter(F3),i}))}}function F3(e,t,r){return r.indexOf(e)==t}var g1=new Map;function So(e){let t=g1.get(e);if(!t){let r=[],n=[[]],i=0,a=0,f=null,b=0,o=(p,d=0)=>{i!=b&&(r.push(e.slice(i,b+d)),p&&rs(r,n)),i=b+1};for(;b<e.length;b++){let p=e[b];if(a)e[b-1]!="\\"&&(a+=+(p=="[")||-(p=="]"));else if(p=="[")a+=1;else if(f)e[b-1]!="\\"&&f.test(e.slice(b))&&(f=null,i=b+RegExp.lastMatch.length);else if(p!="/"||e[b-1]=="\\"||e[b+1]!="*"&&e[b+1]!="/")if(p=="(")o(),r.push(p);else if(p==":")e[b+1]!=":"&&o(!1,1);else if(/[\s,)]/.test(p)){o(!0);let d=r.lastIndexOf("(");if(p==")"){let h=r[d-1];if(/[~@]$/.test(h)){let u=n.shift();r.length=d,rs([...r,"#"],n);let{v:c}=n[0].pop();for(let s of u)s.v.splice(+(s.v[0]=="dark")-+(c[0]=="dark"),c.length);rs([...r,B3(h.length>1?h.slice(0,-1)+Co(JSON.stringify([h,u])):h+"("+M3(u)+")",Me.a,u,/@$/.test(h))],n)}d=r.lastIndexOf("(",d-1)}r.length=d+1}else/[~@]/.test(p)&&e[b+1]=="("&&n.unshift([]);else f=e[b+1]=="*"?/^\*\//:/^[\r\n]/}o(!0),g1.set(e,t=n[0])}return t}function re(e,t,r){return[e,$s(t,r)]}function $s(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(r,n)=>({[e]:t?t(r,n):Gs(r,1)}):r=>e||{[r[1]]:Gs(r,2)}}function Gs(e,t,r=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${r} * -1)`:r}function oe(e,t,r,n){return[e,j3(t,r,n)]}function j3(e,t,r){let n=typeof t=="string"?(i,a)=>({[t]:r?r(i,a):i._}):t||(({1:i,_:a},f,b)=>({[i||b]:a}));return(i,a)=>{let f=Hh(e||i[1]),b=a.theme(f,i.$$)??zt(i.$$,f,a);if(b!=null)return i._=Gs(i,0,b),n(i,a,f)}}function Fe(e,t={},r){return[e,H3(t,r)]}function H3(e={},t){return(r,n)=>{let{section:i=Hh(r[0]).replace("-","")+"Color"}=e,[a,f]=(r.$$.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1);if(!a)return;let b=n.theme(i,a)||zt(a,i,n);if(!b||typeof b=="object")return;let{opacityVariable:o=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:p=i.replace("Color","Opacity"),property:d=i,selector:h}=e,u=n.theme(p,f||"DEFAULT")||f&&zt(f,p,n),c=t||(({_:l})=>{let g=go(d,l);return h?{[h]:g}:g});r._={value:qt(b,{opacityVariable:o||void 0,opacityValue:u||void 0}),color:l=>qt(b,l),opacityVariable:o||void 0,opacityValue:u||void 0};let s=c(r,n);if(!r.dark){let l=n.d(i,a,b);l&&l!==b&&(r._={value:qt(l,{opacityVariable:o||void 0,opacityValue:u||"1"}),color:g=>qt(l,g),opacityVariable:o||void 0,opacityValue:u||void 0},s={"&":s,[n.v("dark")]:c(r,n)})}return s}}function go(e,t){let r={};return typeof t=="string"?r[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(r[t.opacityVariable]=t.opacityValue||"1"),r[e]=t.value),r}function zt(e,t,r){if(e[0]=="["&&e.slice(-1)=="]"){if(e=wr(sa(e.slice(1,-1),r.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!/^color:/.test(e)&&!/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e)||/image/i.test(t)&&!/^image:/.test(e)&&!/^[a-z-]+\(/.test(e)||/weight/i.test(t)&&!/^(number|any):/.test(e)&&!/^\d+$/.test(e)||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function Hh(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function wr(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,r="",n,i="")=>wr(r)+n+wr(i)):e.replace(/(^|[^\\])_+/g,(t,r)=>r+" ".repeat(t.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function b1({presets:e=[],...t}){let r={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:Re(t.variants),rules:Re(t.rules),ignorelist:Re(t.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of Re([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&Re(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:i,darkMode:a=r.darkMode,darkColor:f=r.darkColor,theme:b,variants:o,rules:p,ignorelist:d,hash:h=r.hash,stringify:u=r.stringify,finalize:c}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...Re(i)],darkMode:a,darkColor:f,theme:{...r.theme,...b,extend:{...r.theme.extend,...b?.extend}},variants:[...r.variants,...Re(o)],rules:[...r.rules,...Re(p)],ignorelist:[...r.ignorelist,...Re(d)],hash:h,stringify:u,finalize:[...r.finalize,...Re(c)]}}return r}function w1(e,t,r,n,i,a){for(let f of t){let b=r.get(f);b||r.set(f,b=n(f));let o=b(e,i,a);if(o)return o}}function $3(e){var t;return Ws(e[0],typeof(t=e[1])=="function"?t:()=>t)}function G3(e){return Array.isArray(e)?Ws(e[0],$s(e[1],e[2])):Ws(e,$s(void 0,void 0))}function Ws(e,t){return $h(e,(r,n,i,a)=>{let f=n.exec(r);if(f)return f.$$=r.slice(f[0].length),f.dark=a,t(f,i)})}function $h(e,t){let r=Re(e).map(W3);return(n,i,a)=>{for(let f of r){let b=t(n,f,i,a);if(b)return b}}}function W3(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function os(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:(function(r){let n=document.querySelector(r||'style[data-twind=""]');return n&&n.tagName=="STYLE"||(n=document.createElement("style"),document.head.prepend(n)),n.dataset.twind="claimed",n})(e)).sheet;return{target:t,snapshot(){let r=Array.from(t.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=t.cssRules.length;r--;)t.deleteRule(r)},destroy(){t.ownerNode?.remove()},insert(r,n){try{t.insertRule(r,n)}catch{t.insertRule(":root{}",n)}},resume:Fs}}var Ks={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...rt(4,"rem",4,.5,.5),...rt(12,"rem",4,5),14:"3.5rem",...rt(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:be("blur"),backdropBrightness:be("brightness"),backdropContrast:be("contrast"),backdropGrayscale:be("grayscale"),backdropHueRotate:be("hueRotate"),backdropInvert:be("invert"),backdropOpacity:be("opacity"),backdropSaturate:be("saturate"),backdropSepia:be("sepia"),backgroundColor:be("colors"),backgroundImage:{none:"none"},backgroundOpacity:be("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...rt(200,"",100,0,50),...rt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:be("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:be("spacing"),borderWidth:{DEFAULT:"1px",...ht(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:be("colors"),caretColor:be("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...rt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:be("borderColor"),divideOpacity:be("borderOpacity"),divideWidth:be("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...er(2,6),...er(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:be("spacing"),gradientColorStops:be("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...er(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...er(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...rt(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...rt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:be("spacing"),placeholderColor:be("colors"),placeholderOpacity:be("opacity"),outlineColor:be("colors"),outlineOffset:ht(8,"px"),outlineWidth:ht(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:be("colors"),ringOffsetWidth:ht(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...ht(8,"px")},rotate:{...ht(2,"deg"),...ht(12,"deg",3),...ht(180,"deg",45)},saturate:rt(200,"",100,0,50),scale:{...rt(150,"",100,0,50),...rt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:be("spacing"),scrollPadding:be("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...ht(2,"deg"),...ht(12,"deg",3)},space:be("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:rt(2),textColor:be("colors"),textDecorationColor:be("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...ht(8,"px")},textUnderlineOffset:{auto:"auto",...ht(8,"px")},textIndent:be("spacing"),textOpacity:be("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:be("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...er(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...rt(50,"",1,0,10),auto:"auto"}};function er(e,t){let r={};do for(var n=1;n<e;n++)r[`${n}/${e}`]=Number((n/e*100).toFixed(6))+"%";while(++e<=t);return r}function ht(e,t,r=0){let n={};for(;r<=e;r=2*r||1)n[r]=r+t;return n}function rt(e,t="",r=1,n=0,i=1,a={}){for(;n<=e;n+=i)a[n]=n/r+t;return a}function be(e){return({theme:t})=>t(e)}var K3={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Ks.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Ks.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},V3=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},r)=>({"@layer overrides":{"&":{[e]:zt(`[${t}]`,"",r)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),oe("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:r=t("screens"),center:n,padding:i}=t("container"),a={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...f("xs")};for(let b in r){let o=r[b];typeof o=="string"&&(a[oa(o)]={"&":{maxWidth:o,...f(b)}})}return a;function f(b){let o=i&&(typeof i=="string"?i:i[b]||i.DEFAULT);if(o)return{paddingRight:o,paddingLeft:o}}}),oe("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),oe("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",oo),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),oe("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),oe("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),oe("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",m1),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),oe("(flex-(?:grow|shrink))(?:$|-)"),oe("(flex)-"),oe("grow(?:$|-)","flexGrow"),oe("shrink(?:$|-)","flexShrink"),oe("basis-","flexBasis"),oe("-?(order)-"),"-?(order)-(\\d+)",oe("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",C1),oe("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",_1),oe("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),oe("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),oe("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",C1),oe("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",_1),oe("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),oe("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>oo(m1(e))),re("grid-flow-(dense)","gridAutoFlow"),oe("auto-cols-","gridAutoColumns"),oe("auto-rows-","gridAutoRows"),oe("gap-x(?:$|-)","gap","columnGap"),oe("gap-y(?:$|-)","gap","rowGap"),oe("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",v1),re("(content|items|self)-",e=>({["align-"+e[1]]:v1(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),oe("p([xytrbl])?(?:$|-)","padding",xn("padding")),oe("-?m([xytrbl])?(?:$|-)","margin",xn("margin")),oe("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),oe("w-","width"),oe("min-w-","minWidth"),oe("max-w-","maxWidth"),oe("h-","height"),oe("min-h-","minHeight"),oe("max-h-","maxHeight"),oe("font-","fontWeight"),oe("font-","fontFamily",({_:e})=>typeof(e=Re(e))[1]=="string"?{fontFamily:gt(e)}:{fontFamily:gt(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:r})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Vt({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),oe("tracking-","letterSpacing"),oe("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),oe("list-","listStyleType"),re("list-","listStyleType"),oe("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Fe("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),oe("text-opacity-","textOpacity","--tw-text-opacity"),Fe("text-",{property:"color"}),oe("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),oe("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),oe("underline-offset-","textUnderlineOffset"),Fe("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),oe("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),Fe("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Fe("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${fn(e," ")},var(--tw-gradient-stops))`),Fe("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Fe("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Fe("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),oe("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Fe("bg-",{section:"backgroundColor"}),oe("bg-","backgroundImage"),oe("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",oo),oe("bg-","backgroundSize"),oe("rounded(?:$|-)","borderRadius"),oe("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${fn(r[0])}-radius`]:t,[`border-${fn(r[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),oe("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),oe("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...Vt({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Fe("border-([xytrbl])-",{section:"borderColor"},xn("border","Color")),Fe("border-"),oe("border-([xytrbl])(?:$|-)","borderWidth",xn("border","Width")),oe("border(?:$|-)","borderWidth"),oe("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),oe("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let r={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${fn(r[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${fn(r[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Fe("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),oe("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Fe("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),oe("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),Fe("ring-",{property:"--tw-ring-color"}),oe("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...Vt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":qt(t("ringOffsetColor","","#fff")),"--tw-ring-color":qt(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Fe("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),oe("shadow(?:$|-)","boxShadow",({_:e})=>({...Vt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":gt(e),"--tw-shadow-colored":gt(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),oe("(opacity)-"),re("mix-blend-","mixBlendMode"),...E1(),...E1("backdrop-"),oe("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:gt(e),transitionTimingFunction:e._=="none"?void 0:gt(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:gt(t("transitionDuration",""))})),oe("duration(?:$|-)","transitionDuration","transitionDuration",gt),oe("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",gt),oe("delay(?:$|-)","transitionDelay","transitionDelay",gt),oe("animate(?:$|-)","animation",(e,{theme:t,h:r,e:n})=>{let i=gt(e),a=i.split(" "),f=t("keyframes",a[0]);return f?{["@keyframes "+(a[0]=n(r(a[0])))]:f,animation:a.join(" ")}:{animation:i}}),"(transform)-(none)",re("transform",Vs),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":Gh(e=="gpu")})),oe("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Vs()})),oe("-?(rotate)-","rotate",is),oe("-?(translate-[xy])-","translate",is),oe("-?(skew-[xy])-","skew",is),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",oo),"(appearance)-",oe("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",oe("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...Vt({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),oe("scroll-p([xytrbl])?(?:$|-)","padding",xn("scroll-padding")),oe("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",xn("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:r})=>({...Vt({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":r?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),oe("-?(outline-offset)-"),Fe("outline-",{opacityVariable:!1,opacitySection:"opacity"}),oe("outline-","outlineWidth"),"(pointer-events)-",oe("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),Fe("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Fe("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),oe("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function oo(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function m1(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function fn(e,t="-"){let r=[];for(let n of e)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(t)}function gt(e){return e&&""+(e._||e)}function v1({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function xn(e,t=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...go(e+"-"+fn(i[0])+t,n),...go(e+"-"+fn(i[1])+t,n)}:go(e+t,n)}}function E1(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),r={};for(let n of t)r[`--tw-${e}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...Vt(r),[`${e}filter`]:t.map(n=>`var(--tw-${e}${n})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,r),...t.map(n=>oe(`${n[0]=="h"?"-?":""}(${e}${n})(?:$|-)`,n,({1:i,_:a})=>({[`--tw-${i}`]:Re(a).map(f=>`${n}(${f})`).join(" "),...r})))]}function is({1:e,_:t}){return{["--tw-"+e]:t,...Vs()}}function Vs(){return{...Vt({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Gh()}),transform:"var(--tw-transform)"}}function Gh(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function _1({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function C1({1:e}){return`repeat(${e},minmax(0,1fr))`}function Vt(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var Z3=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},r)=>t&&`&[${e}-${r.theme(e,t)||zt(t,"",r)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:r,5:n="",6:i=t},{e:a,h:f,v:b})=>{let o=wr(n)||(r[0]=="["?r:b(r.slice(1)));return`${(o.includes("&")?o:"&"+o).replace(/&/g,`:merge(.${a(f(e+i))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||zt(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||zt(e,"",t)),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=zt(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&wr(e).replace(/[}]+$/,"").split("{")]],Y3={__proto__:null,slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"}};function q3({disablePreflight:e}={}){return(function({colors:t,disablePreflight:r}={}){return{preflight:r?void 0:K3,theme:{...Ks,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:Z3,rules:V3,finalize:n=>n.n&&n.d&&n.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}})({colors:Y3,disablePreflight:e})}var z3=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ss(e){return e.shadowRoot||e.attachShadow({mode:"open"})}var as={"brand-light":"var(--bc-color-brand, #196CE7)","brand-dark":"var(--bc-color-brand-dark, var(--bc-color-brand, #3994FF))","brand-button-text-light":"var(--bc-color-brand-button-text)","brand-button-text-dark":"var(--bc-color-brand-button-text-dark, var(--bc-color-brand-button-text))","brand-mixed-light":"color-mix(in srgb, var(--bc-color-brand, #196CE7) var(--bc-brand-mix, 100%), black)","brand-mixed-dark":"color-mix(in srgb, var(--bc-color-brand-dark, var(--bc-color-brand, #3994FF)) var(--bc-brand-mix, 100%), white)","foreground-light":"#000","foreground-dark":"#fff","background-light":"#fff","background-dark":"#000","neutral-primary-light":"#262626","neutral-primary-dark":"#E4E4E4","neutral-secondary-light":"#525252","neutral-secondary-dark":"#A2A2A2","neutral-tertiary-light":"#A2A2A2","neutral-tertiary-dark":"#525252"},Q3={"glass-light":"linear-gradient(180deg, rgba(211, 211, 211, 0.20) 0%, rgba(255, 255, 255, 0.20) 50%);","glass-dark":"linear-gradient(180deg, rgba(211, 211, 211, 0.10) 0%, rgba(0, 0, 0, 0.20) 50%)"},Ce=()=>globalThis.window?(function(e,t=!0){let r=(function(){if(z3)try{let o=os(new CSSStyleSheet);return o.connect=p=>{let d=ss(p);d.adoptedStyleSheets=[...d.adoptedStyleSheets,o.target]},o.disconnect=Fs,o}catch{}let a=document.createElement("style");a.media="not all",document.head.prepend(a);let f=[os(a)],b=new WeakMap;return{get target(){return f[0].target},snapshot(){let o=f.map(p=>p.snapshot());return()=>o.forEach(p=>p())},clear(){f.forEach(o=>o.clear())},destroy(){f.forEach(o=>o.destroy())},insert(o,p,d){f[0].insert(o,p,d);let h=this.target.cssRules[p];f.forEach((u,c)=>c&&u.target.insertRule(h.cssText,p))},resume:(o,p)=>f[0].resume(o,p),connect(o){let p=document.createElement("style");ss(o).appendChild(p);let d=os(p),{cssRules:h}=this.target;for(let u=0;u<h.length;u++)d.target.insertRule(h[u].cssText,u);f.push(d),b.set(o,d)},disconnect(o){let p=f.indexOf(b.get(o));p>=0&&f.splice(p,1)}}})(),n=(function(a,f){let b=b1(a),o=(function({theme:c,darkMode:s,darkColor:l=Fs,variants:g,rules:w,hash:y,stringify:v,ignorelist:m,finalize:C}){let E=new Map,O=new Map,_=new Map,S=new Map,R=$h(m,(N,x)=>x.test(N));g.push(["dark",Array.isArray(s)||s=="class"?`${Re(s)[1]||".dark"} &`:typeof s=="string"&&s!="media"?s:"@media (prefers-color-scheme:dark)"]);let A=typeof y=="function"?N=>y(N,Co):y?Co:f1;A!==f1&&C.push(N=>({...N,n:N.n&&A(N.n),d:N.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(x,I)=>"--"+A(I).replace("#",""))}));let T={theme:(function({extend:N={},...x}){let I={},L={get colors(){return H("colors")},theme:H,negative:()=>({}),breakpoints(K){let P={};for(let B in K)typeof K[B]=="string"&&(P["screen-"+B]=K[B]);return P}};return H;function H(K,P,B,G){if(K){if({1:K,2:G}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(K)||[,K],/[.[]/.test(K)){let F=[];K.replace(/\[([^\]]+)\]|([^.[]+)/g,(D,k,j=k)=>F.push(j)),K=F.shift(),B=P,P=F.join("-")}let z=I[K]||Object.assign(Object.assign(I[K]={},Z(x,K)),Z(N,K));if(P==null)return z;P||(P="DEFAULT");let U=z[P]??P.split("-").reduce((F,D)=>F?.[D],z)??B;return G?qt(U,{opacityValue:sa(G,H)}):U}let V={};for(let z of[...Object.keys(x),...Object.keys(N)])V[z]=H(z);return V}function Z(K,P){let B=K[P];return typeof B=="function"&&(B=B(L)),B&&/color|fill|stroke/i.test(P)?(function G(V,z=[]){let U={};for(let F in V){let D=V[F],k=[...z,F];U[k.join("-")]=D,F=="DEFAULT"&&(k=z,U[z.join("-")]=D),typeof D=="object"&&Object.assign(U,G(D,k))}return U})(B):B}})(c),e:Lh,h:A,s:(N,x)=>v(N,x,T),d:(N,x,I)=>l(N,x,T,I),v:N=>(E.has(N)||E.set(N,w1(N,g,O,$3,T)||"&:"+N),E.get(N)),r(N,x){let I=JSON.stringify([N,x]);return _.has(I)||_.set(I,!R(N,T)&&w1(N,w,S,G3,T,x)),_.get(I)},f:N=>C.reduce((x,I)=>I(x,T),N)};return T})(b),p=new Map,d=[],h=new Set;function u(c){let s=o.f(c),l=Hs(s);if(l&&!h.has(l)){h.add(l);let g=Dh(d,c);f.insert(l,g,c),d.splice(g,0,c)}return s.n}return f.resume(c=>p.set(c,c),(c,s)=>{f.insert(c,d.length,s),d.push(s),h.add(c)}),Object.defineProperties(function(c){if(!p.size)for(let l of Re(b.preflight))typeof l=="function"&&(l=l(o)),l&&(typeof l=="string"?aa("",Me.b,So(l),o,Me.b,[],!1,!0):Fh(l,{},o,Me.b)).forEach(u);let s=p.get(c=""+c);if(!s){let l=new Set;for(let g of Ao(So(c),o))l.add(g.c).add(u(g));s=[...l].filter(Boolean).join(" "),p.set(c,s).set(s,s)}return s},Object.getOwnPropertyDescriptors({get target(){return f.target},theme:o.theme,config:b,snapshot(){let c=f.snapshot(),s=new Set(h),l=new Map(p),g=[...d];return()=>{c(),h=s,p=l,d=g}},clear(){f.clear(),h=new Set,p=new Map,d=[]},destroy(){this.clear(),f.destroy()}}))})({...e,hash:e.hash??t},r),i=(function(a){let f=new MutationObserver(b);return{observe(p){f.observe(p,{attributeFilter:["class"],subtree:!0,childList:!0}),o(p),b([{target:p,type:""}])},disconnect(){f.disconnect()}};function b(p){for(let{type:d,target:h}of p)if(d[0]=="a")o(h);else for(let u of h.querySelectorAll("[class]"))o(u);f.takeRecords()}function o(p){let d,h=p.getAttribute?.("class");h&&(function(u,c){return u!=c&&""+u.split(" ").sort()!=""+c.split(" ").sort()})(h,d=a(h))&&p.setAttribute("class",d)}})(n);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ss(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...f){super(...f),this.tw=n}}}})(b1({darkMode:globalThis.bcDarkMode,theme:{fontFamily:{sans:["Inter","sans-serif"],mono:["Roboto Mono","monospace"]},extend:{borderColor:Ct({},as),backgroundColor:Ct({},as),textColor:Ct({},as),backgroundImage:Ct({},Q3),animation:{darken:"darken 0.2s ease-out forwards","fade-in":"fade-in 0.2s ease-out forwards","slide-up":"slideUp 0.3s ease-out forwards"},keyframes:{darken:{"0%":{opacity:0},"100%":{opacity:.5}},lighten:{"0%":{opacity:.5},"100%":{opacity:0}},"fade-in":{"0%":{opacity:0},"100%":{opacity:1}},"fade-out":{"0%":{opacity:1},"100%":{opacity:0}},slideUp:{from:{transform:"translateY(100%)"},to:{transform:"translateY(0)"}}}}},presets:[q3({})],hash:!1})):J3;function J3(e){return e}var qe="transition-all hover:brightness-90 dark:hover:brightness-110 active:scale-95 cursor-pointer",Zs="hover-animation",Pe="text-brand-mixed-light dark:text-brand-mixed-dark",It="text-foreground-light dark:text-foreground-dark",mr="text-neutral-primary-light dark:text-neutral-primary-dark",de="text-neutral-secondary-light dark:text-neutral-secondary-dark",At="text-neutral-tertiary-light dark:text-neutral-tertiary-dark",bn="border-neutral-secondary-light dark:border-neutral-secondary-dark",ca="border-neutral-tertiary-light dark:border-neutral-tertiary-dark",A1,S1,T1,Ys=e=>e;function Wh(){return X(A1||(A1=Ys`<div
class="absolute top-0 left-0 w-full h-full rounded-lg border-2 pointer-events-none ${0} opacity-5"
></div>`),ca)}function X3(e){ne.getState().connected&&e(ne.getState().provider);let t=ne.subscribe(async(r,n)=>{if(r.connected&&!n.connected){if(!r.provider)throw new Error("No provider available");e(r.provider)}});return()=>{t()}}function e5(e){let t=ne.subscribe(async(r,n)=>{!r.connected&&n.connected&&e()});return()=>{t()}}function t5(e){let t=ne.subscribe(async(r,n)=>{!r.modalOpen&&n.modalOpen&&e()});return()=>{t()}}function n5(){return console.warn("Bitcoin Connect: isConnected is deprecated and will be removed in the next major version"),ne.getState().connected}function r5(e={}){ne.getState().setBitcoinConnectConfig(e)}function Kh(){let e=document.createElement("bc-modal"),t=document.createElement("bc-connect");t.setAttribute("closable","closable"),e.appendChild(t),document.body.appendChild(e),ne.getState().setModalOpen(!0)}function o5({invoice:e,paymentMethods:t,onPaid:r,onCancelled:n}){if(document.querySelector("bc-modal"))throw new Error("bc-modal already in DOM");let i=document.createElement("bc-modal"),a=document.createElement("bc-payment");a.setAttribute("closable","closable"),a.setAttribute("invoice",e),t&&a.setAttribute("payment-methods",t),i.appendChild(a);let f=!1,b=p=>{f=!0,r?.(p.detail)};window.addEventListener("bc:onpaid",b);let o=t5(()=>{o(),window.removeEventListener("bc:onpaid",b),f||n==null||n()});return document.body.appendChild(i),ne.getState().setModalOpen(!0),{setPaid:p=>{a.setAttribute("paid","paid"),a.dispatchEvent(new CustomEvent("bc:onpaid",{bubbles:!0,composed:!0,detail:p}))}}}function No(){let e=document.querySelector("bc-modal");e&&document.body.removeChild(e),ne.getState().setModalOpen(!1),ne.getState().clearRouteHistory(),ne.getState().setError(void 0)}function i5(){ne.getState().disconnect()}function s5(){return ne.getState().connectorConfig}var O1,a5=e=>e,Rn=class extends Ce()(ye){constructor(){super(),this._loading=!1,this._loadBalance(),window.addEventListener("bc:balancerefresh",()=>{this._loadBalance()}),this._selectedCurrency=ne.getState().currency,ne.subscribe((e,t)=>{this._selectedCurrency=e.currency,e.currency!==t.currency&&this._convertBalance(),e.connected!==t.connected&&e.connected&&this._loadBalance()})}render(){return X(O1||(O1=a5` <span
class="font-medium font-sans mr-2 flex justify-center items-center gap-0.5 ${0}"
>
<span class="font-mono">${0} </span></span
>`),Pe,this._balance||"Loading...")}async _convertBalance(){if(this._loading||this._balanceSats===void 0)return;let e=this._selectedCurrency||"sats";if(e==="BTC")this._balance=(this._balanceSats/1e8).toLocaleString(void 0,{minimumFractionDigits:8,useGrouping:!0})+" BTC";else if(e!=="sats"){try{this._loading=!0;let t=await Ul({satoshi:this._balanceSats,currency:e}),r=parseFloat(t.toFixed(2));this._balance=new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(r)}catch(t){console.error(t)}this._loading=!1}else this._balance=this._balanceSats.toLocaleString(void 0,{useGrouping:!0})+" sats"}_loadBalance(){var e=this;(async function(){try{let t=ne.getState().provider;if(t==null||!t.getBalance)return;let r=await t.getBalance();r&&(e._balanceSats=r.balance,e._convertBalance())}catch(t){e._balance="\u26A0\uFE0F",console.error(t)}})()}};ee([ge()],Rn.prototype,"_balance",void 0),ee([ge()],Rn.prototype,"_balanceSats",void 0),ee([ge()],Rn.prototype,"_loading",void 0),ee([ge()],Rn.prototype,"_selectedCurrency",void 0),Rn=ee([pe("bc-balance")],Rn);var N1,c5=e=>e,wn=e=>Ee(N1||(N1=c5`
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100px" height="100px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class=${0}>
<g transform="rotate(0 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(30 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(60 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(90 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(120 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(150 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(180 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(210 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(240 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(270 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(300 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(330 50 50)">
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="currentColor">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
</rect>
</g>
</svg>`),e||"w-7 h-7"),x1,R1,I1,P1,k1,L1,U1,M1,ln=e=>e,io=class extends Ce()(ye){constructor(){super(),this.title="Connect Wallet",this._showBalance=void 0,this._showBalance=ne.getState().bitcoinConnectConfig.showBalance&&ne.getState().supports("getBalance"),ne.subscribe(e=>{this._showBalance=e.bitcoinConnectConfig.showBalance&&e.supports("getBalance")})}render(){let e=this._connecting||!this._connected&&this._modalOpen;return X(x1||(x1=ln`<div>
<div
class="relative inline-flex ${0} cursor-pointer
rounded-lg gap-2 justify-center items-center"
@click=${0}
>
<div
class="absolute top-0 left-0 w-full h-full rounded-lg pointer-events-none ${0}"
></div>
${0}
<bci-button variant="primary">
${0}
<span class="font-semibold">
${0}
</span>
</bci-button>
${0}
</div>
</div>`),qe,this._onClick,this._connected?"bg-glass-light dark:bg-glass-dark":"",this._connected?Wh():"",e?X(R1||(R1=ln` ${0} `),wn("w-11 h-11 -mr-2 mr-1 -ml-2.5")):this._connected?null:X(I1||(I1=ln`<span class="-ml-0.5">${0}</span>`),lr),e?X(P1||(P1=ln`Connecting...`)):this._connected?X(k1||(k1=ln`Connected`)):X(L1||(L1=ln`${0}`),this.title),this._connected&&this._showBalance?X(U1||(U1=ln`<bc-balance class="select-none cursor-pointer"></bc-balance> `)):null)}_onClick(){Kh()}};ee([Ue()],io.prototype,"title",void 0),ee([ge()],io.prototype,"_showBalance",void 0),io=ee([pe("bc-button")],io);var l5=Ee(M1||(M1=(e=>e)`
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-6 h-6">
<path d="M7 16.5106L13.5511 22L23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`)),D1,B1,F1,j1,H1,$1,In=e=>e,Gt=class extends Ce()(ye){constructor(){super(...arguments),this.title="Pay Now",this.paymentMethods="all",this._waitingForInvoice=!1,this._paid=!1}updated(e){var t;super.updated(e),e.has("invoice")&&this.invoice&&this._waitingForInvoice&&this._launchModal(),e.has("invoice")&&!this.invoice&&(this._waitingForInvoice=!1,this._paid=!1),e.has("preimage")&&this.preimage&&((t=this._setPaid)==null||t.call(this,{preimage:this.preimage}))}render(){let e=!this._paid&&(this._waitingForInvoice||this._modalOpen);return X(D1||(D1=In` <div class="inline-flex" @click=${0}>
<bci-button variant="primary">
${0}
<span class="font-semibold">
${0}
</span>
</bci-button>
</div>`),this._onClick,e?X(B1||(B1=In`${0}`),wn("w-11 h-11 -mr-2 -ml-2.5 ")):this._paid?X(F1||(F1=In`<span class="-ml-0.5">${0}</span>`),l5):X(j1||(j1=In`<span class="-ml-0.5">${0}</span>`),lr),e?X(H1||(H1=In`Loading...`)):X($1||($1=In`${0}`),this._paid?"Paid":this.title))}_onClick(){this._paid||(this._waitingForInvoice=!0,this.invoice&&this._launchModal())}_launchModal(){if(this._waitingForInvoice=!1,!this.invoice)throw new Error("No invoice available");let{setPaid:e}=o5({onPaid:()=>{this._paid=!0},invoice:this.invoice,paymentMethods:this.paymentMethods});this._setPaid=e}};ee([Ue()],Gt.prototype,"title",void 0),ee([Ue()],Gt.prototype,"invoice",void 0),ee([Ue({type:String,attribute:"payment-methods"})],Gt.prototype,"paymentMethods",void 0),ee([Ue({})],Gt.prototype,"preimage",void 0),ee([ge()],Gt.prototype,"_waitingForInvoice",void 0),ee([ge()],Gt.prototype,"_paid",void 0),Gt=ee([pe("bc-pay-button")],Gt);var G1,W1,u5=e=>e,tr=class extends Ce()(br){constructor(){super(...arguments),this.variant="secondary",this.ghost=!1,this.block=!1}render(){let e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,t=window.getComputedStyle(this).getPropertyValue(e?"--bc-color-brand-button-text-dark":"--bc-color-brand-button-text")||window.getComputedStyle(this).getPropertyValue("--bc-color-brand-button-text");return X(G1||(G1=u5`<button
class="w-full relative h-10 px-4 font-sans font-semibold rounded-lg flex justify-center items-center
${0} rounded-lg w-full ${0}
${0}
${0}
"
>
${0}
<!-- TODO: why can the inner border not be conditionally rendered? -->
<div
class="flex gap-2 ${0} justify-center items-center"
>
<slot></slot>
</div>
</button>`),this.ghost?"":"shadow",qe,this.variant==="primary"?"bg-brand-light dark:bg-brand-dark":"",this.variant==="primary"?t?"text-brand-button-text-light dark:text-brand-button-text-dark":this._getBrandColorLuminance()>.5?"text-black":"text-white":this.variant==="secondary"?`${Pe}`:`${At}`,this.ghost?null:this.variant==="primary"?Wh():this.variant==="secondary"?X(S1||(S1=Ys`<div
class="absolute -z-10 top-0 left-0 w-full h-full border-2 rounded-lg ${0}"
></div>`),"border-brand-mixed-light dark:border-brand-mixed-dark"):X(T1||(T1=Ys`<div
class="absolute -z-10 top-0 left-0 w-full h-full border-2 rounded-lg ${0}"
></div>`),ca),this.block?"w-full":"")}};ee([Ue()],tr.prototype,"variant",void 0),ee([Ue({type:Boolean})],tr.prototype,"ghost",void 0),ee([Ue({type:Boolean})],tr.prototype,"block",void 0),tr=ee([pe("bci-button")],tr);var h5=Ee(W1||(W1=(e=>e)`
<svg width="55" height="55" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="34" y="6" width="24" height="24" rx="5.99998" fill="#34D14A"/>
<path d="M43.3358 10H47.2816V16.3676H44.8352V12.0498H42.6436L43.3358 10Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M46 26C48.4853 26 50.5 24.027 50.5 21.5932C50.5 19.1594 48.4853 17.1865 46 17.1865C43.5147 17.1865 41.5 19.1594 41.5 21.5932C41.5 24.027 43.5147 26 46 26ZM48.457 21.5932C48.457 22.9221 47.357 23.9994 46 23.9994C44.643 23.9994 43.5429 22.9221 43.5429 21.5932C43.5429 20.2643 44.643 19.187 46 19.187C47.357 19.187 48.457 20.2643 48.457 21.5932Z" fill="white"/>
<rect x="6" y="6" width="24" height="24" rx="5.99998" fill="white"/>
<g clip-path="url(#clip0_1455_976)">
<path d="M16.0072 25.2004C16.3321 25.2668 16.6642 25.3073 16.9979 25.3213C16.3121 25.5485 15.6308 25.7902 14.952 26.0365H14.9515C14.3197 26.2633 13.69 26.4964 13.0496 26.6985C12.5337 26.8585 12.0072 26.9977 11.469 27.0079C10.4279 27.0337 9.63614 26.4775 9.51127 25.4086C9.40844 24.4379 9.79297 23.4781 10.0985 22.5688C10.4263 21.645 10.7661 20.725 11.0811 19.7966C11.102 19.9872 11.1317 20.1764 11.17 20.3632C11.2516 20.7628 11.3738 21.1556 11.5327 21.5314C11.6886 21.8999 11.8814 22.2552 12.1057 22.5875C12.3278 22.9162 12.583 23.2256 12.864 23.5064C13.1448 23.7874 13.4542 24.0424 13.7829 24.2647C14.1152 24.4892 14.4705 24.682 14.839 24.8377C15.2146 24.9966 15.6076 25.1185 16.0072 25.2004Z" fill="#FFC802"/>
<path d="M12.8642 14.7179C12.6606 14.9216 12.4707 15.14 12.2968 15.37C12.5044 14.3843 12.6856 13.3925 12.8728 12.4029C13.1169 11.225 13.39 9.50918 14.6962 9.08685C15.397 8.87198 16.1159 9.1935 16.6638 9.6336C17.2983 10.1455 17.8194 10.791 18.3533 11.4048C18.7768 11.9048 19.2011 12.4045 19.6324 12.8979H17.2582C16.8373 12.8979 16.4163 12.9404 16.007 13.0241C15.6074 13.1058 15.2146 13.228 14.8388 13.3866C14.4703 13.5425 14.115 13.7354 13.7827 13.9599C13.4537 14.182 13.1446 14.4371 12.8638 14.7182L12.8642 14.7179Z" fill="#FFC802"/>
<path d="M26.9836 22.5092C26.4926 23.0008 25.812 23.2299 25.1456 23.4C24.9876 23.4398 24.829 23.476 24.6699 23.5105C23.3451 23.7868 22.0079 24.0064 20.6863 24.2964C20.702 24.2858 20.718 24.2752 20.7338 24.2647C21.0625 24.0426 21.3716 23.7874 21.6527 23.5064C21.9337 23.2254 22.1886 22.9162 22.4109 22.5875C22.6355 22.2552 22.8283 21.8999 22.9842 21.5314C23.1431 21.1558 23.265 20.7628 23.3469 20.3632C23.4306 19.9539 23.4731 19.5329 23.4731 19.1119V16.7548C24.2683 17.449 25.0814 18.1231 25.8723 18.8226C26.0525 18.9841 26.2303 19.1486 26.4013 19.3198C26.8373 19.7586 27.241 20.2498 27.4109 20.8453C27.5859 21.4506 27.4318 22.063 26.984 22.5092H26.9836Z" fill="#FFC802"/>
<path d="M21.2 19.2375C21.2 21.4121 19.4371 23.175 17.2625 23.175C15.0878 23.175 13.325 21.4121 13.325 19.2375C13.325 17.0628 15.0878 15.3 17.2625 15.3H21.2V19.2375Z" fill="#202020"/>
</g>
<g clip-path="url(#clip1_1455_976)">
<rect x="6" y="34.0806" width="24" height="24" rx="5.99998" fill="url(#paint0_linear_1455_976)"/>
<path d="M22.1146 53.6518C24.2167 53.6518 25.1736 48.9971 25.1736 47.2322C25.1736 45.8565 24.2243 45.0228 22.9764 45.0228C21.7363 45.0228 20.7296 45.5561 20.7171 46.2165C20.717 47.9592 20.4103 53.6518 22.1146 53.6518Z" fill="white" stroke="black" stroke-width="0.626014"/>
<path d="M14.4364 53.6518C12.3343 53.6518 11.3775 48.9971 11.3775 47.2322C11.3775 45.8565 12.3267 45.0228 13.5746 45.0228C14.8147 45.0228 15.8215 45.5561 15.834 46.2165C15.834 47.9592 16.1407 53.6518 14.4364 53.6518Z" fill="white" stroke="black" stroke-width="0.626014"/>
<path d="M23.5442 46.5772C23.5893 46.5504 23.6381 46.5536 23.6731 46.5733C23.6898 46.5827 23.7 46.5939 23.7053 46.6035C23.7098 46.6117 23.7142 46.6242 23.7122 46.6455C23.4691 49.0543 22.1626 51.0462 20.4065 51.9629C19.8161 52.2711 19.4127 52.8105 19.0579 53.2783C18.7734 53.6536 18.5149 53.9885 18.2004 54.2363C17.8861 53.9886 17.6273 53.6534 17.343 53.2783C16.9882 52.8105 16.5856 52.2711 15.9954 51.9629C14.2459 51.0498 12.943 49.07 12.6926 46.6729C12.6904 46.6517 12.6941 46.639 12.6985 46.6309C12.7038 46.6213 12.7139 46.6092 12.7307 46.5996C12.7654 46.5799 12.8143 46.5763 12.8596 46.6026C14.4209 47.5178 16.222 48.0429 18.1799 48.043C20.1382 48.043 21.9728 47.5083 23.5442 46.5772Z" fill="#FFDF6F" stroke="black" stroke-width="0.622835"/>
<ellipse cx="18.2128" cy="46.625" rx="5.50893" ry="1.83631" fill="black" stroke="black" stroke-width="0.626014"/>
<path d="M13.7889 49.7133C13.7889 49.7133 16.5062 50.6315 18.2545 50.6315C20.0028 50.6315 22.7201 49.7133 22.7201 49.7133" stroke="black" stroke-width="0.626014" stroke-linecap="round"/>
<circle cx="1.24567" cy="1.24567" r="1.24567" transform="matrix(-1 0 0 1 14.2769 37.5268)" fill="black"/>
<path d="M12.8236 38.5856L15.1488 40.9109" stroke="black" stroke-width="0.622835"/>
<circle cx="23.2044" cy="38.7725" r="1.24567" fill="black"/>
<path d="M23.4328 38.5856L21.1075 40.9109" stroke="black" stroke-width="0.622835"/>
<path d="M18.1597 38.9386C20.9689 38.9388 23.3127 41.3062 23.8669 44.4589C23.9959 45.1923 23.6018 45.9098 22.928 46.2269C21.4872 46.9049 19.8781 47.2843 18.1802 47.2843C16.4643 47.2843 14.8396 46.8963 13.3872 46.2045C12.7157 45.8847 12.3249 45.1667 12.456 44.4346C13.0181 41.2939 15.3575 38.9386 18.1597 38.9386Z" fill="#FFDF6F"/>
<path d="M18.1597 38.9386L18.1597 38.6272H18.1597V38.9386ZM18.1802 47.2843V47.5957H18.1802L18.1802 47.2843ZM13.3872 46.2045L13.2533 46.4857L13.3872 46.2045ZM23.8669 44.4589L24.1736 44.405L23.8669 44.4589ZM22.928 46.2269L22.7954 45.9451L22.928 46.2269ZM18.1597 38.9386L18.1596 39.25C20.7781 39.2502 23.0246 41.4662 23.5602 44.5128L23.8669 44.4589L24.1736 44.405C23.6007 41.1462 21.1598 38.6274 18.1597 38.6272L18.1597 38.9386ZM22.928 46.2269L22.7954 45.9451C21.3951 46.6041 19.8313 46.9729 18.1802 46.9729L18.1802 47.2843L18.1802 47.5957C19.925 47.5957 21.5792 47.2058 23.0606 46.5087L22.928 46.2269ZM18.1802 47.2843V46.9729C16.5117 46.9729 14.9327 46.5957 13.5211 45.9234L13.3872 46.2045L13.2533 46.4857C14.7465 47.1969 16.4169 47.5957 18.1802 47.5957V47.2843ZM12.456 44.4346L12.7625 44.4894C13.3056 41.4547 15.5478 39.25 18.1597 39.25V38.9386V38.6272C15.1672 38.6272 12.7305 41.1332 12.1494 44.3797L12.456 44.4346ZM13.3872 46.2045L13.5211 45.9234C12.9697 45.6607 12.6575 45.0764 12.7625 44.4894L12.456 44.4346L12.1494 44.3797C11.9924 45.257 12.4618 46.1086 13.2533 46.4857L13.3872 46.2045ZM23.8669 44.4589L23.5602 44.5128C23.6636 45.1008 23.3487 45.6848 22.7954 45.9451L22.928 46.2269L23.0606 46.5087C23.855 46.1349 24.3281 45.2838 24.1736 44.405L23.8669 44.4589Z" fill="black"/>
<path d="M18.1598 41.1393C20.1469 41.1394 21.8292 42.3718 22.4069 44.0749C22.5945 44.6277 22.2738 45.2031 21.7332 45.4235C20.6303 45.873 19.4243 46.1216 18.1598 46.1217C16.8951 46.1217 15.6886 45.8731 14.5854 45.4234C14.0448 45.2031 13.7241 44.6277 13.9117 44.0749C14.4896 42.3717 16.1725 41.1393 18.1598 41.1393Z" fill="black"/>
<ellipse cx="19.5919" cy="43.7967" rx="1.03806" ry="0.830447" fill="white"/>
<ellipse cx="16.6202" cy="43.7972" rx="1.03806" ry="0.830447" fill="white"/>
<g clip-path="url(#clip2_1455_976)">
<rect x="5" y="32.8384" width="26" height="26" fill="url(#pattern0_1455_976)"/>
</g>
</g>
<path d="M54.5 44.9997H53V40.9997C53 40.4693 52.7893 39.9606 52.4142 39.5855C52.0391 39.2104 51.5304 38.9997 51 38.9997H47V37.4997C47 36.8367 46.7366 36.2008 46.2678 35.732C45.7989 35.2631 45.163 34.9997 44.5 34.9997C43.837 34.9997 43.2011 35.2631 42.7322 35.732C42.2634 36.2008 42 36.8367 42 37.4997V38.9997H38C37.4696 38.9997 36.9609 39.2104 36.5858 39.5855C36.2107 39.9606 36 40.4693 36 40.9997V44.7997H37.5C39 44.7997 40.2 45.9997 40.2 47.4997C40.2 48.9997 39 50.1997 37.5 50.1997H36V53.9997C36 54.5302 36.2107 55.0389 36.5858 55.4139C36.9609 55.789 37.4696 55.9997 38 55.9997H41.8V54.4997C41.8 52.9997 43 51.7997 44.5 51.7997C46 51.7997 47.2 52.9997 47.2 54.4997V55.9997H51C51.5304 55.9997 52.0391 55.789 52.4142 55.4139C52.7893 55.0389 53 54.5302 53 53.9997V49.9997H54.5C55.163 49.9997 55.7989 49.7363 56.2678 49.2675C56.7366 48.7987 57 48.1628 57 47.4997C57 46.8367 56.7366 46.2008 56.2678 45.732C55.7989 45.2631 55.163 44.9997 54.5 44.9997Z" fill="#A2A2A2"/>
<defs>
<pattern id="pattern0_1455_976" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_1455_976" transform="scale(0.0078125)"/>
</pattern>
<linearGradient id="paint0_linear_1455_976" x1="18" y1="34.0806" x2="18" y2="56.9377" gradientUnits="userSpaceOnUse">
<stop offset="0.669102" stop-color="#FFDE6E"/>
<stop offset="1" stop-color="#F8C455"/>
</linearGradient>
<clipPath id="clip0_1455_976">
<rect width="18" height="18" fill="white" transform="translate(9.5 9)"/>
</clipPath>
<clipPath id="clip1_1455_976">
<rect x="6" y="34.0806" width="24" height="24" rx="5.99998" fill="white"/>
</clipPath>
<clipPath id="clip2_1455_976">
<rect width="26" height="26" fill="white" transform="translate(5 32.4443)"/>
</clipPath>
<image id="image0_1455_976" width="128" height="128" preserveAspectRatio="none" xlink:href="data:image/png;base64,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"/>
</defs>
</svg>
`)),K1,f5=e=>e,st=class extends Ce()(ye){constructor(t,r,n,i){super(),this._connectorType=t,this._title=r,this._background=n,this._icon=i}render(){return X(K1||(K1=f5`<button
class="flex flex-col justify-between items-center w-32 -mx-4 cursor-pointer ${0}"
aria-label="Connect with ${0}"
@click=${0}
>
<div
class="w-16 h-16 drop-shadow-[0_10px_15px_rgba(0,0,0,0.25)] dark:drop-shadow-[0_10px_15px_rgba(255,255,255,0.15)] rounded-2xl flex justify-center items-center overflow-hidden"
style="background: ${0};"
>
${0}
</div>
<span
class="text-sm mt-3 font-sans font-medium text-center w-28 h-7 flex justify-center items-center ${0}"
>
${0}
</span>
</button>`),qe,this._title,this._onClick,this._background,this._icon,de,this._title)}_connect(t){ne.getState().connect(Ct({},t,{connectorName:this._title,connectorType:this._connectorType}))}},V1,Z1=class extends st{constructor(){super("extension.generic","Browser Extensions","#F4F4F4",h5)}_onClick(){this._connect({})}};Z1=ee([pe("bc-extension-connector")],Z1);var Vh=Ee(V1||(V1=(e=>e)`<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8000 8000" width="40" height="40">
<path d="M1404.94034,2404.75143c.19948.39893.416.79745.63896,1.19934-.21965-.3998-.4293-.7996-.63896-1.19934ZM1398.36987,2392.55825c.01.02001.01999.03996.01999.04996.01999.02001.03998.04996.04998.06997-.01999-.03996-.04998-.07997-.06997-.11993ZM7957.22848,6407.80899c-75.3022-453.82005-341.31246-1051.68618-631.76608-1536.83905-217.58172,280.41299-443.70125,543.12568-695.66263,796.78364,151.96083,272.22676,381.52012,831.33939,371.78586,1131.07073-3.34955,103.13742-84.59871,186.38404-187.48323,193.03587-323.69068,20.92769-761.15088-169.80941-1126.96417-352.01125-274.08918,250.36976-539.73074,478.97192-815.02811,690.20321,570.85548,338.56749,1305.54247,669.74202,1904.46573,668.08293,872.77622,46.26671,1378.68446-776.20339,1180.65263-1590.32607ZM5249.15884,5683.56479c1101.91285-1101.01171,2353.03599-2527.31198,2708.11113-4090.5697,253.93721-1273.80049-760.34667-1869.98142-1895.16006-1469.66567,211.65045,278.23428,364.22738,589.33979,457.73054,914.98744,86.80988-20.20216,196.93112-34.80914,289.99476-31.50156,103.33929,3.67279,186.93541,86.38156,191.60732,189.77353,13.96581,309.07109-235.73659,902.8025-402.1382,1193.8406,0,.01-.01.02001-.01.03001l-.04998.07991c-624.44753,1143.09071-1591.89389,2208.42396-2600.29743,3077.06633l-.22964-.19984c-263.64443,226.46298-526.16056,433.98687-804.2439,626.56893.39938.34966.79882.69956,1.19826,1.04946-509.31622,353.04862-1419.46673,925.33606-2012.13405,893.44541-103.82534-5.58671-186.23795-90.1864-188.67838-194.22674-6.97909-297.53161,215.6413-843.71786,363.83869-1111.11806-237.05325-259.94423-464.71032-529.69327-686.31643-814.38364-1228.33988,1900.32534-772.83666,3911.20697,1772.96127,2814.86279,1004.95316-454.63593,1968.00538-1208.05697,2803.81609-2000.0392ZM2528.2177,4000.38756c-468.17105-551.20508-806.89093-1020.88409-1125.16461-1599.13417h-.01c-.00197-.02709-.02111-.04517-.02999-.07997h-.01c-.00225-.03154-.04191-.05163-.03986-.08992,0,0-.01,0-.01-.01-1.46642-2.7001-3.08021-5.72568-4.5634-8.46529.01999.02001.03998.04996.04998.06997-165.01013-287.23702-415.64692-882.63022-403.53149-1193.46936,4.07951-104.66591,88.1281-188.31126,192.71288-192.04153,92.1143-3.28547,200.69379,10.46969,286.62767,30.61985,93.58312-325.69743,246.26999-636.85321,458.06014-915.09749C797.66386-275.84563-214.1867,319.25478,39.32792,1592.99819c208.75964,1126.24494,1140.55524,2354.14531,1865.30175,3206.20191-1.24817,1.76903,1.23818-1.76903,0,0,177.91975,202.67638,363.17881,406.52227,558.17368,604.08153,267.29912-191.50259,530.82373-396.10806,795.10723-617.7438-259.10108-257.46588-503.73334-520.6384-729.69288-785.15026ZM1420.59738,2433.86513c.84886,1.56913,1.71746,3.17821,2.5963,4.82725-.85885-1.58908-1.72745-3.19816-2.5963-4.82725ZM1457.40366,2502.26682c.92857,1.699,1.83716,3.39806,2.73599,5.07711-.89883-1.64904-1.80742-3.3481-2.73599-5.07711ZM1403.01311,2401.17342c-.01-.01-.01987-.02995-.02986-.03996.01.01.01987.02995.01987.03996.01999.03001.02999.04996.03998.06997-.01-.02001-.01999-.03996-.02999-.06997ZM1404.94034,2404.75143c.19948.39893.416.79745.63896,1.19934-.21965-.3998-.4293-.7996-.63896-1.19934Z" fill="#ffe480"/>
<path d="M2762.56314,2987.43935c-683.41752-683.42045-683.41752-1791.46134,0-2474.87781,683.41752-683.41755,1791.45841-683.41755,2474.87885,0,683.41068,683.41648,683.41068,1791.45737,0,2474.87781l-1237.44089,1237.44089-1237.43796-1237.44089Z" fill="#fff"/>
</svg>`)),Zh="Alby Hub",Y1,q1=class extends st{constructor(){super("nwc.albyhub",Zh,"#000000",Vh)}async _onClick(){ne.getState().pushRoute("/alby-hub")}};q1=ee([pe("bc-alby-hub-connector")],q1);var d5=Ee(Y1||(Y1=(e=>e)`<svg width="393" height="392" viewBox="0 0 393 392" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M179.272 99.0639C169.038 88.8691 152.419 88.9782 142.221 99.2091L76.2474 165.414C66.0488 175.646 66.1786 191.974 76.4095 202.17L184.58 310.34C194.813 320.534 211.4 320.449 221.597 310.218L253.749 278.066C244.372 287.443 236.656 280.701 227.512 271.595L209.578 253.662C195.964 259.051 180.052 256.374 169.022 245.365L155.356 231.699C154.896 231.243 154.542 230.767 154.292 230.17C154.043 229.572 153.914 228.931 153.914 228.284C153.913 227.637 154.041 226.995 154.289 226.398C154.537 225.8 154.926 225.293 155.385 224.837L163.119 217.103L146.284 200.268C143.648 197.638 143.218 193.391 145.575 190.522C148.269 187.228 153.153 187.053 156.108 190.002L173.171 207.051L184.728 195.494L167.853 178.661C165.216 176.03 164.787 171.784 167.164 168.895C167.794 168.128 168.578 167.501 169.465 167.054C170.353 166.608 171.323 166.352 172.315 166.303C173.307 166.254 174.298 166.413 175.225 166.77C176.152 167.127 176.994 167.673 177.697 168.375L194.829 185.393L202.089 178.132C202.545 177.673 202.994 177.259 203.592 177.01C204.189 176.761 204.83 176.632 205.478 176.632C206.125 176.631 206.766 176.758 207.364 177.006C207.962 177.254 208.505 177.618 208.962 178.077L222.65 191.738C233.542 202.609 236.39 218.431 231.298 231.943L249.235 249.88C258.379 258.985 266.03 265.785 275.408 256.408L315.979 215.836C306.227 225.588 298.215 218.075 288.578 208.446L179.272 99.0639Z" fill="url(#paint0_linear_1_280)"/>
<path d="M255.975 81.0273L221.487 115.487L298.115 192.116C305.45 199.419 311.825 205.239 318.899 202.417C322.988 200.787 325.795 196.351 324.228 192.238C287.561 96.0253 287.546 96.0238 282.682 85.507C277.818 74.9901 264.138 72.7602 255.975 81.0273Z" fill="#897FFF"/>
<path d="M255.975 81.0273L221.487 115.487L298.115 192.116C305.45 199.419 311.825 205.239 318.899 202.417C322.988 200.787 325.795 196.351 324.228 192.238C287.561 96.0253 287.546 96.0238 282.682 85.507C277.818 74.9901 264.138 72.7602 255.975 81.0273Z" fill="#897FFF"/>
<path d="M255.975 81.0273L221.487 115.487L298.115 192.116C305.45 199.419 311.825 205.239 318.899 202.417C322.988 200.787 325.795 196.351 324.228 192.238C287.561 96.0253 287.546 96.0238 282.682 85.507C277.818 74.9901 264.138 72.7602 255.975 81.0273Z" fill="#897FFF"/>
<path d="M255.975 81.0273L221.487 115.487L298.115 192.116C305.45 199.419 311.825 205.239 318.899 202.417C322.988 200.787 325.795 196.351 324.228 192.238C287.561 96.0253 287.546 96.0238 282.682 85.507C277.818 74.9901 264.138 72.7602 255.975 81.0273Z" fill="#897FFF"/>
<path d="M255.975 81.0273L221.487 115.487L298.115 192.116C305.45 199.419 311.825 205.239 318.899 202.417C322.988 200.787 325.795 196.351 324.228 192.238C287.561 96.0253 287.546 96.0238 282.682 85.507C277.818 74.9901 264.138 72.7602 255.975 81.0273Z" fill="#897FFF"/>
<defs>
<linearGradient id="paint0_linear_1_280" x1="192.323" y1="78.4384" x2="192.323" y2="317.939" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCA4A"/>
<stop offset="1" stop-color="#F7931A"/>
</linearGradient>
</defs>
</svg>`)),la="NWC",z1,Q1=class extends st{constructor(){super("nwc.generic",la,"#ffffff",d5)}async _onClick(){ne.getState().pushRoute("/nwc")}};Q1=ee([pe("bc-nwc-connector")],Q1);var p5=Ee(z1||(z1=(e=>e)`<svg class="w-10 h-10" width="28" height="55" viewBox="0 0 28 55" xmlns="http://www.w3.org/2000/svg"><g fill="#ffffff" fill-rule="nonzero"><path d="M27.25 30.506L11.354 53.692a.84.84 0 11-1.385-.954l15.896-23.185a.84.84 0 111.385.953zM25.16 26.374L9.629 49.082a.84.84 0 01-1.385-.954L23.776 25.42a.84.84 0 011.385.954zM20.438 1.576L2.43 27.895h16.895l-1.136 1.68H.363a.84.84 0 01-.227-1.158L19.006.622a.84.84 0 011.159-.227c.398.253.52.78.273 1.181z"></path><path d="M22.118 6.617L10.24 23.99h11.763l-1.158 1.68H7.062l1.136-1.68L20.733 5.686a.84.84 0 011.385.931z"></path></g></svg>`)),J1,X1=class extends st{constructor(){super("lnc","Lightning Node Connect","#101727",p5)}async _onClick(){let e=window.prompt("Enter pairing phrase");if(!e)return;let t=await Ah();if(!t)throw new Error("LNC not supported");t.credentials.pairingPhrase=e,this._connect({})}};X1=ee([pe("bc-lnc-connector")],X1);var Yh=Ee(J1||(J1=(e=>e)`<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M256 0H0V256H256V0Z" fill="#673AB7"/>
<path d="M165 53H91V134.785H113.31V202L165 112.224H135.934L165 53Z" fill="white"/>
</svg>`)),qs="LNbits",eu=class extends st{constructor(){super("lnbits",qs,"#673ab7",Yh)}async _onClick(){ne.getState().pushRoute("/lnbits")}};eu=ee([pe("bc-lnbits-connector")],eu);var zs="LNbits NWC Plugin",tu,nu=class extends st{constructor(){super("lnbits",zs,"#673ab7",Yh)}async _onClick(){ne.getState().pushRoute("/lnbits-nwc")}};nu=ee([pe("bc-lnbits-nwc-connector")],nu);var y5=Ee(tu||(tu=(e=>e)`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M40 17.5H34.4V23.1H40V17.5Z" fill="#041011"/>
<path d="M16.7 0V5.6L27.8 8.9L22.2 0H16.7Z" fill="#041011"/>
<path d="M29.4 35H35L36.7 25L29.4 29.4V35Z" fill="#041011"/>
<path d="M35 5H29.4V10.6L36.1 16.1L35 5Z" fill="#041011"/>
<path d="M16.7 40H22.2L27.8 29.4L16.7 34.4V40Z" fill="#041011"/>
<path d="M5 29.4V35H10.6L22.2 26.7L5 29.4Z" fill="#041011"/>
<path d="M18.9 18.6L5.6 17.5H0V23.1H5.6L18.9 18.6Z" fill="#041011"/>
<path d="M10.6 5H5V10.6L21.1 12.8L10.6 5Z" fill="#041011"/>
</svg>
`)),g5="LN Link",ru,ou=class extends st{constructor(){super("nwc.generic",g5,"#ffffff",y5)}async _onClick(){ne.getState().pushRoute("/lnfi")}};ou=ee([pe("bc-lnfi-nwc-connector")],ou);var b5=Ee(ru||(ru=(e=>e)`<svg width="48" height="48" viewBox="0 0 19.05 19.05" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#ffffff"/><g transform="translate(46.987939,-145.34756)"><path fill-rule="evenodd" clip-rule="evenodd" d="m -37.462939,146.46815 c -4.641638,0 -8.404413,3.76277 -8.404413,8.40441 0,4.64164 3.762775,8.40441 8.404413,8.40441 4.641638,0 8.40441,-3.76277 8.40441,-8.40441 0,-4.64164 -3.762772,-8.40441 -8.40441,-8.40441 z m -9.525,8.40441 c 0,-5.26053 4.264475,-9.525 9.525,-9.525 5.260525,0 9.525,4.26447 9.525,9.525 0,5.26053 -4.264475,9.525 -9.525,9.525 -5.260525,0 -9.525,-4.26447 -9.525,-9.525 z" fill="#000000"/><path fill-rule="evenodd" clip-rule="evenodd" d="m -37.462939,160.84902 c 3.300703,0 5.976461,-2.67576 5.976461,-5.97646 0,-3.30073 -2.675758,-5.97649 -5.976461,-5.97649 -3.300704,0 -5.976461,2.67576 -5.976461,5.97649 0,3.3007 2.675757,5.97646 5.976461,5.97646 z m 0,-1.21396 c 2.630249,0 4.7625,-2.13225 4.7625,-4.7625 0,-2.63025 -2.132251,-4.7625 -4.7625,-4.7625 -2.630249,0 -4.7625,2.13225 -4.7625,4.7625 0,2.63025 2.132251,4.7625 4.7625,4.7625 z" fill="#000000"/><path fill-rule="evenodd" clip-rule="evenodd" d="m -37.462913,151.4062 c 0,0 -2.6e-5,0 -2.6e-5,0 -1.914419,0 -3.466359,1.55194 -3.466359,3.46636 0,1.91442 1.55194,3.46636 3.466359,3.46636 0,0 2.6e-5,0 2.6e-5,0 z" fill="#000000"/></g></svg>`)),w5="Coinos",iu,su=class extends st{constructor(){super("nwc.coinos",w5,"#ffffff",b5)}async _onClick(){try{var e;let t=ne.getState().bitcoinConnectConfig.providerConfig,r=await jt.fromAuthorizationUrl("https://coinos.io/apps/new",Ct({},(t==null||(e=t.nwc)==null?void 0:e.authorizationUrlOptions)||{},{name:this._appName}));r.close(),await ne.getState().connect({nwcUrl:r.nostrWalletConnectUrl,connectorName:"Coinos",connectorType:"nwc.coinos"})}catch(t){console.error(t),alert(""+t)}}};su=ee([pe("bc-coinos-connector")],su);var m5=Ee(iu||(iu=(e=>e)`<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20630 20630" preserveAspectRatio="xMidYMid meet"><g transform="translate(0.000000,20630.000000) scale(1.000000,-1.000000)"><path fill="black" d="M5645 20623 c-856 -42 -1650 -251 -2395 -629 -502 -254 -897 -527 -1325 -915 -1015 -920 -1688 -2201 -1869 -3559 -54 -403 -51 -132 -51 -5210 0 -4938 -1 -4788 41 -5125 189 -1512 946 -2882 2129 -3850 353 -290 711 -519 1140 -730 714 -352 1468 -548 2295 -595 239 -13 9171 -13 9410 0 1083 62 2073 388 2960 975 885 585 1587 1388 2056 2350 323 662 507 1339 576 2115 19 216 19 9504 0 9730 -67 784 -266 1498 -606 2179 -566 1130 -1469 2042 -2591 2617 -701 359 -1348 545 -2205 636 -88 9 -1206 12 -4810 13 -2582 1 -4722 0 -4755 -2z"/><path fill="white" d="M13504 11628 l2333 -3 -3181 -3813 -3181 -3813 -3 2540 -2 2541 -2336 0 c-1285 0 -2334 4 -2332 8 2 4 1434 1723 3183 3820 l3180 3811 3 -2544 2 -2545 2334 -2z"/></g></svg>`)),v5="Flash Wallet",au,cu=class extends st{constructor(){super("nwc.flash",v5,"#000000",m5)}async _onClick(){ne.getState().pushRoute("/flash-wallet")}};cu=ee([pe("bc-flash-connector")],cu);var E5=Ee(au||(au=(e=>e)`<svg class="w-12 h-12" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="17.2816" height="20" fill="url(#pattern0_6321_527)"/>
<defs>
<pattern id="pattern0_6321_527" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_6321_527" transform="matrix(0.00248348 0 0 0.00214592 0.08 0.05)"/>
</pattern>
<image id="image0_6321_527" width="404" height="404" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAdnJLH8AAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAH5QTFRFIyMjSkdG////6+rqsq6uhYGBeHR0a2dnNzU1VFJRLCwsop6eQD49wb6/k4+P1tTUYFxcIyMkLCorKScnLSorKigoQ0FCJSUlLSssKCUlLCkqrKmqWFZXKykpy8rLbmxsFRUXHBsbODY3Y2FhoJ2e3Nvb7e3ukpCQTkxMKCUnmJ5JnAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+kHEQgcCEGliNcAAAoMSURBVHja7Z2LkqI6EIajiDKOiEghVQdHq5SLvv8LHpDEEfxHoNZ0JKS3dtdldIUvt86fpJsxY8aMGTNmzJgxY8aMGTNmzJgxY8Ze22KtwuabnRN+BgB3qsqs1I3tlT9eAJWl7nw5agCFZa69HTWAsjnEu3EDKKvBZdwACgTxSR2AdEVpu8t+nieuZzUbgu0rA6Ck9gU7201rCA67UQEoLdrHjwys+dgAFBbODw8IEn90AArbPPTFs58RAmDs6N0JuMsxAmBhkt27wuUYARTt4N4butdRAmDOvSeIxwmARbEgsB4nAOZ/C794oxCA78i0bdSJQLpUB2Aldcpj3ZSg3V8Y/JlwBzQF0KoEhcItPOsNoPT7Z3t0Rzs+SfSuugMoB3zU1835D+0RACiauvOnSJP+jAHA1Do+3dPJIqwCfwOY5TIsmT0pQfnTBDjhvUCkFIA8ZyzYrd3sgUDcJLDkiI6aArg9o+01CPhBEEVR+UcQ5LyPjHxWXrv6ESsv+wErXkaRX/6DsWv1wq8+4w8LQPHADxJAUk4EwmsQRlFYMnCqCpKdIhaUV6KAhVFY/HX7cfn7GkQsLF6Ul4sPBteIDQ1AUYL5vSHMCwD/hSWA4lHDIOD+4LoCUPz6CVlJJ7wBKN5QvLV4Y/EJFgbVtQECeJAArBUrS7540mtRzCzYc2mkKvSfEksJoCr9SAAoS3/INaB0+0QzcJlftuhbey4a/k9FJnOu9z6ARX7xlsC/dQG3PoC/GGofwL9M1IFGjx9TjQOqAbA97wcO9RI8U0lDygEwG1aBn8oVOIwAgM/nv41nra5agf4A2IZLJSvUCaw+BECc/rN5bmyfXtzDzRt6ahnzDwHwpm0E2cEGc9wFagMTPlPSC0D5Vc+bAK5i0K9NFjKaYYAcAFr7i0F1jyzuIOkHYOo1e7Zjdf27djGlGQdVAJh6jTrAq7sLxsHPApC5/2CPQlBT9E/B+hTRmlUvAP92N8ElvjM4oruwQr0BFOaIdZ+G3Md7QUd7AMzneud0UbvMJbCd/gCY705Bh8cBXEYAgO0yMMuZg2qhKwAxol6AMzwOAHPw348KwAm4faMCEAAnf1QA/HTkAJgBYAAYAAaAAWAAGAAGgAFgABgABoABYAAYAAaAAWAAGAAGgAFgABgABoABYAAYAAaAAWAAGAAGgAFgABgABoDOAPyxb5MLxw5gBU4JjgqADULEjAoAPyo8GSsAflLYuoJasRkBgK2Hzo3loFboCWDrwlhxCTgqriWAjQgZ0ogXwY8lLnUG4Icr+zeC9AJ1jFb06QCm/xA+wHqMINY4E35F8TIqKN5nAXiTHRpRj3boKJ3Gh6cPzRiCOQiW4Ot7fD4Ou/hG24wmtio5gMPi6R5O1bOmV3AXmoXQsGZnEPEqQb7RkSiqZEcAufvvltgTGBUIh09E56kVApBp/FHTENyY9aM/AH6auhFBhJ8ulO4GqAcQ8SEgOyHXYKY/gG/sHK6JAkkpB7AW44ODXIPM0RyAn09xHG0eVVV+ND21AJZ398L14ciQaA3An9+zqqSNqu57RF6AQgDR4lcdsL4aPzxPqVqAIgD+LnkILG3t8V2RRFd/AcCXYcFytcjrOebS/V/K8VYpAEuOZU/Tw6eomSLKKEEXqD6/QJY8Z9KYY9dASwDu1/MtORZhBVALwIWZZGakmYbUAUi/J/CObNIcK2oAZKmbX/4IB3/OsG9ID8B7gwgkxrvD75U4t7+cvx/uwjsAiyr9qmRH6NhzWj9Jp1TzYBoAkYfUjr/LPyVPOCjbFV73GdI2YvnMDbQBwCXfTuKmLbxEz2HaABDxUtsHteXsPkCumEYAVlWxem2j2q844JHm35Y/HXa7pA/8+l168miT0MsHcJ62LvPu3amitMsUALi8lf1VsZcPG0emWU6cepxCEbJfDO2OXUu7lp4Z+0wAPXWf2leEVfdm1et24Oxz16vLI/GSfSqAuJfqk9YXehO01D973jmwYexjAfTcH1CXc/kqRxoB2ef3I0ef6QOgHjdalHatXgTpJzy+NAD16d8Xqhf5b9cXT5gykwSgsarJB7o9aBjTeB8xph2ARo8HZYGYeOb/BgCdcoxU07+0NqGNUCahCdkK8NsAdNq4m6CChau9LjgloAEAuLQPZYFF+yxhiADEoLdvlQXELGGlGYA96vF2SBaw0f6w4QMQ+3tOrbIATytpLTUDMEcFC2WBhHhPJhEAnj6v3uNBWYB3mF6kFwAx6NntssCMLss6JYAl6vFgg/+aqnaG5Byail+cjctbZwkaAJigBIInJAv0XTwcCAAxd9i1Nviei4eDAbBAPd4eNfhei4fDAcALtuHi8Ab/1TpLGD4AMeitkYc0a50laACAF2zdxYEJhrsuHg4MgCjYY2dZYKEZgBUaCXm9qJ+P2iiVBeSdHkeJFXGDP6B3Dh/AGfV4E9Tg5yqdIXkAxPTPaZUFgpTqgBApADES5qxVB8wVOkMSAfDpX/1MNNQB+ewxDfUCgAVyKAsodIZkAoAC+RbJAhN1zpDUICpQIP9GTnKnnVTDAwAF8hPSAc/KnCG5YXSgQI5kgbadVEMFMEfj2wbJAjb1JmkaAFAgh66vsjUSyZGkoEAOXd+EKGgKMQAHjW/Q9XVQKJnhAxA93rnd9Z2p2TAiG8AFjW8Ocn0VrZFIjybnoj0AsLQPSjaMSAdwROPbBUUVPCpxhqQDwAI52h4UKdkwIj+g4hr5/lAWWKvYMCIfABTIYWkvVThDBCE1YyR7Q9f3W8GGEQIAuxcCeb20Vwo2jFAEVeUj4aSzLHDUDMAZVXdY2ht6Z4gCgJjsL9tLm37DCElcYSiQwxUx+jUSEgBYIEeygFg/PukFQPR48/bSJl8joQFwQgI5lAXIN4wQxRaHAjkUgajXSIgAQIFcyAK1wyXUayRU0eVhhEgoCxBvGKECAAVyKAsQr5FQAeA9XmMBGIlAIpjiRS8AWCCHIpBN6gyRAYACOZQFQtINI3Q5RqBADkUg0jUSOgBQIIeygEO5YYQwy8wBaZ7Q76FcIyEEcETVfYdkAV5ZSJwhQgAvBfIFGh7PegHAIyH0ewjXSCgBQIEc+j0R3YYR0lRbrwTyGboYawYACuThK1lgqRcALJBDv+ebyhkCT7Zd3+wiAQAUyJ3q++ry8Ipqw0jHJ3sTAN/rXLOpnCFaAFggf6UhHTQDsLU612yiDSPEALBA/kpDcjUDcOocO0eskaz0AiB8/w6rfznJhhFyAJvOgheNM0QOwO+eQimm2DBCDgAL5K88Z7kbRugBYIH8VX9xJADQFiT0nUmAxVmq9tCkFOmG3G4pZbI3AuCaZ9YhOOlU/oaRXoEC35QGetY3OOFMMwBfvVNynPQCwA59CSSaATj2Ttf7oxeAKO1LQN6GkV4Jhd+mUdp9s9WQn6UyZsyYMWPGjBkzNjD7H9D+hIrLgzibAAAAAElFTkSuQmCC"/>
</defs>
</svg>
`)),Qs="Rizful",lu=class extends st{constructor(){super("nwc.rizful",Qs,"#000000",E5)}async _onClick(){ne.getState().pushRoute("/rizful")}};lu=ee([pe("bc-rizful-connector")],lu);var uu,hu,fu,du,pu,yu,gu,bu,wu,mu,vu,Eu,_u,Cu,ot=e=>e,cs=class extends Ce()(ye){constructor(){super(...arguments),this._showAll=!1}render(){let e=[];return e.push({order:0,result:X(uu||(uu=ot`<bc-alby-hub-connector></bc-alby-hub-connector>`))}),e.push({order:0,result:X(hu||(hu=ot`<bc-coinos-connector></bc-coinos-connector>`))}),e.push({order:0,result:X(fu||(fu=ot`<bc-flash-connector></bc-flash-connector>`))}),e.push({order:0,result:X(du||(du=ot`<bc-cashu-me-connector></bc-cashu-me-connector>`))}),this._filters&&this._filters.indexOf("nwc")>-1&&e.push({order:0,result:X(pu||(pu=ot`<bc-lnbits-nwc-connector></bc-lnbits-nwc-connector>`))}),e.push({order:0,result:X(yu||(yu=ot`<bc-rizful-connector></bc-rizful-connector>`))}),e.push({order:0,result:X(gu||(gu=ot`<bc-nwc-connector></bc-nwc-connector>`))}),e.push({order:10,result:X(bu||(bu=ot`<bc-lnfi-nwc-connector></bc-lnfi-nwc-connector>`))}),this._filters&&this._filters.indexOf("nwc")!==-1||(window.webln&&e.push({order:0,result:X(wu||(wu=ot`<bc-extension-connector></bc-extension-connector>`))}),e.push({order:7,result:X(mu||(mu=ot`<bc-lnbits-connector></bc-lnbits-connector>`))}),e.push({order:9,result:X(vu||(vu=ot`<bc-lnc-connector></bc-lnc-connector>`))})),e.sort((t,r)=>t.order-r.order),X(Eu||(Eu=ot`
<div>
<div
class="flex justify-center items-start flex-wrap gap-5 ${0}"
>
${0}
</div>
${0}
</div>
`),this._showAll?"max-h-96 overflow-y-auto":"",(this._showAll?e:e.slice(0,9)).map(t=>t.result),!this._showAll&&e.length>9?X(_u||(_u=ot`<div class="text-center">
<button
class="${0} text-xs font-medium mt-8 ${0}"
aria-label="Show all ${0} wallet connectors"
@click=${0}
>
show all (${0})
</button>
</div> `),qe,de,e.length,this._toggleShowAll,e.length):null)}_toggleShowAll(){this._showAll=!0}};ee([ge()],cs.prototype,"_showAll",void 0),cs=ee([pe("bc-connector-list")],cs);var _5=Ee(Cu||(Cu=(e=>e)`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-6 h-6">
<path d="M11.25 20.25H4.75C4.19772 20.25 3.75 19.8023 3.75 19.25L3.75 4.75C3.75 4.19772 4.19772 3.75 4.75 3.75L11.25 3.75" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M20.25 12L9 12M20.25 12L15.75 16.5M20.25 12L15.75 7.5" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="hover-right"/>
</svg>`)),Au,Su,Tu=e=>e;function ua(e){return X(Au||(Au=Tu`<div class="mt-12">
${0}
<bci-button
@click=${0}
ghost
variant="neutral"
class=${0}
>
${0}
<span class="text-sm ${0}"
>Disconnect</span
>
</bci-button>
</div>`),e?X(Su||(Su=Tu`<span class="text-xs mb-1 ${0}"
>Connected through
<span class="font-bold">${0}</span></span
>`),de,e):null,C5,Zs,_5,At)}function C5(){ne.getState().setModalOpen(!1),setTimeout(()=>{ne.getState().disconnect()},200)}var Ou=e=>String.fromCodePoint(...e.split("").map(t=>127397+t.toUpperCase().charCodeAt(0))),Nu,ls,xu,Ru,Iu,Pu,so=e=>e,ao=(ls=class extends(Nu=Ce()(ye)){constructor(){super(),this._isSwitchingCurrency=!1,this._selectedCurrency=ne.getState().currency,ne.subscribe(e=>{this._selectedCurrency=e.currency})}render(){if(!this._isSwitchingCurrency)return X(xu||(xu=so`<div class="flex justify-center items-center gap-2">
<button
class="${0}"
aria-label="Switch currency (current: ${0})"
@click=${0}
>
<slot></slot>
</button>
</div>`),qe,this._selectedCurrency||"sats",this._showSelectVisibility);let e=(()=>{let r=[{name:"SATS",value:"sats",flag:"\u20BF"},{name:"BTC",value:"BTC",flag:"\u20BF"},{name:"USD",value:"USD",flag:Ou("US")},{name:"EUR",value:"EUR",flag:"\u{1F1EA}\u{1F1FA}"}];return r.push(...Object.entries({JP:"JPY",CN:"CNY",GB:"GBP",CH:"CHF",IN:"INR",AE:"AED",AF:"AFN",AL:"ALL",DZ:"DZD",AO:"AOA",AR:"ARS",AM:"AMD",AW:"AWG",AU:"AUD",AZ:"AZN",BS:"BSD",BH:"BHD",BD:"BDT",BB:"BBD",BY:"BYN",BZ:"BZD",BM:"BMD",BT:"BTN",BO:"BOB",BA:"BAM",BW:"BWP",BR:"BRL",BN:"BND",BG:"BGN",BI:"BIF",CV:"CVE",KH:"KHR",CA:"CAD",KY:"KYD",CF:"XAF",CL:"CLP",CO:"COU",KM:"KMF",CD:"CDF",CR:"CRC",CU:"CUC",CW:"ANG",CZ:"CZK",DK:"DKK",DJ:"DJF",DM:"XCD",DO:"DOP",EG:"EGP",ER:"ERN",ET:"ETB",FJ:"FJD",PF:"XPF",GM:"GMD",GE:"GEL",GH:"GHS",GI:"GIP",GT:"GTQ",GN:"GNF",GY:"GYD",HN:"HNL",HK:"HKD",HU:"HUF",IS:"ISK",ID:"IDR",IR:"XDR",IQ:"IQD",IL:"ILS",JM:"JMD",JO:"JOD",KZ:"KZT",KE:"KES",KR:"KRW",KW:"KWD",KG:"KGS",LA:"LAK",LB:"LBP",LR:"LRD",LY:"LYD",MO:"MOP",MG:"MGA",MW:"MWK",MY:"MYR",MV:"MVR",MR:"MRU",MU:"MUR",MX:"MXN",MD:"MDL",MN:"MNT",MA:"MAD",MZ:"MZN",MM:"MMK",NP:"NPR",NZ:"NZD",NI:"NIO",NE:"XOF",NG:"NGN",MK:"MKD",NO:"NOK",OM:"OMR",PK:"PKR",PG:"PGK",PY:"PYG",PE:"PEN",PH:"PHP",PL:"PLN",QA:"QAR",RO:"RON",RU:"RUB",RW:"RWF",SH:"SHP",WS:"WST",ST:"STN",SA:"SAR",RS:"RSD",SC:"SCR",SL:"SLL",SG:"SGD",SB:"SBD",SO:"SOS",ZA:"ZAR",SS:"SSP",LK:"LKR",SD:"SDG",SR:"SRD",SE:"SEK",SY:"SYP",TW:"TWD",TJ:"TJS",TZ:"TZS",TH:"THB",TO:"TOP",TT:"TTD",TN:"TND",TR:"TRY",TM:"TMT",UG:"UGX",UA:"UAH",UY:"UYU",UZ:"UZS",VU:"VUV",VN:"VND",YE:"YER",ZM:"ZMW",ZW:"ZWL"}).map(([n,i])=>({name:n,value:i,flag:Ou(n)}))),r})(),t=this._selectedCurrency||"sats";return X(Ru||(Ru=so`<div
class="h-48 overflow-y-scroll px-4 grid grid-cols-2 gap-3 currencies-list -mb-10"
role="list"
aria-label="Available currencies"
>
${0}
</div>`),e.map(r=>X(Iu||(Iu=so`
<button
class="${0} flex items-center justify-center py-2 px-4 hover:text-white hover:bg-blue-500 rounded-lg hover:border-blue-500 cursor-pointer"
aria-label="Select ${0} currency"
aria-pressed="${0}"
@click=${0}
>
<span class="text-orange-400 inline-block mr-2 text-xl"
>${0}</span
><span class="text-xl">${0}</span>
</button>
`),t===r.value?"bg-blue-500 text-white":"",r.value,t===r.value,()=>this._selectCurrency(r.value),r.flag,r.value)))}_showSelectVisibility(){this._isSwitchingCurrency=!0}_selectCurrency(e){ne.getState().setCurrency(e),this._isSwitchingCurrency=!1}},ls.styles=[...Nu.styles,Oo(Pu||(Pu=so`
.currencies-list {
mask-image: linear-gradient(
to bottom,
black calc(100% - 96px),
transparent 100%
);
}
/* width */
::-webkit-scrollbar {
width: 6px;
height: 18px;
}
/* Track */
::-webkit-scrollbar-track {
background: #66666666;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
`))],ls);ee([ge()],ao.prototype,"_isSwitchingCurrency",void 0),ee([ge()],ao.prototype,"_selectedCurrency",void 0),ao=ee([pe("bc-currency-switcher")],ao);var ku,Lu,Uu,Mu,Du,Bu,nr=e=>e,us=class extends Ce()(ye){constructor(){super(),this._showBalance=void 0,this._showBalance=ne.getState().bitcoinConnectConfig.showBalance&&ne.getState().supports("getBalance"),ne.subscribe(e=>{this._showBalance=e.bitcoinConnectConfig.showBalance&&e.supports("getBalance")})}render(){return X(ku||(ku=nr`<div
class="flex flex-col justify-center items-center w-full font-sans"
>
${0}
</div>`),this._connected?X(Lu||(Lu=nr`
${0}
${0}
`),X(this._showBalance?Uu||(Uu=nr`<span
class="text-xs font-medium mb-2 ${0}"
>Balance</span
>
<bc-currency-switcher>
<bc-balance class="text-2xl"></bc-balance>
</bc-currency-switcher>`):Mu||(Mu=nr` <span
class="text-lg font-medium mt-4 -mb-4 ${0}"
>Wallet Connected</span
>`),de),ua(this._connectorName)):X(Du||(Du=nr`
<h1
class="my-8 ${0} w-64 max-w-full text-center"
role="heading"
aria-level="1"
>
How would you like to
connect${0}?
</h1>
<bc-connector-list></bc-connector-list>
<div class="flex flex-col items-center w-full font-sans text-sm">
<p class="mt-8 ${0} text-center">
Don't have a bitcoin lightning wallet?
<button
class="font-bold ${0} ${0}"
aria-label="Get a bitcoin lightning wallet"
@click=${0}
>
Get one here
</button>
</p>
</div>
`),mr,this._appName&&this._appName!==As.appName?`
to ${this._appName}`:"",mr,qe,Pe,()=>ne.getState().pushRoute("/new-wallet")))}};ee([ge()],us.prototype,"_showBalance",void 0),us=ee([pe("bc-start")],us);var A5=Ee(Bu||(Bu=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-7 h-7">
<path d="M14.2929 16L10.6464 12.3536C10.4512 12.1583 10.4512 11.8417 10.6464 11.6464L14.2929 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`)),Fu,ju,S5=e=>e,hs=class extends Ce()(ye){constructor(){super(...arguments),this._goBack=()=>{ne.getState().popRoute(),ne.getState().setError(void 0)}}render(){return X(Fu||(Fu=S5`<div
class="flex justify-center items-center gap-2 w-full relative pb-4"
>
<div class="absolute left-8 h-full flex items-center justify-center">
<button
class="${0} ${0}"
@click=${0}
aria-label="Go back"
title="Go back"
>
${0}
</button>
</div>
<div class="font-sans font-medium ${0}">
${0}
</div>
</div>`),qe,At,this._goBack,A5,mr,this.heading)}};ee([Ue()],hs.prototype,"heading",void 0),hs=ee([pe("bc-navbar")],hs);var Hu=Ee(ju||(ju=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.5 6H6.1C5.53995 6 5.25992 6 5.04601 6.10899C4.85785 6.20487 4.70487 6.35785 4.60899 6.54601C4.5 6.75992 4.5 7.03995 4.5 7.6V18.4C4.5 18.9601 4.5 19.2401 4.60899 19.454C4.70487 19.6422 4.85785 19.7951 5.04601 19.891C5.25992 20 5.53995 20 6.1 20H16.9C17.4601 20 17.7401 20 17.954 19.891C18.1422 19.7951 18.2951 19.6422 18.391 19.454C18.5 19.2401 18.5 18.9601 18.5 18.4V15" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14.5 4H20.5M20.5 4V10M20.5 4L11.5 13" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="hover-right-up"/>
</svg>`)),$u,Gu,Wu,Ku=e=>e;function qh(e){let t=`border-t ${ca} ${e?"w-24":"w-full"}`;return X($u||($u=Ku`<div
class="w-full px-8 flex gap-4 justify-center items-center opacity-60 dark:opacity-60"
>
<hr class=${0} />
${0}
</div>`),t,e?X(Gu||(Gu=Ku`
<span class=${0}>${0}</span>
<hr class=${0} />
`),At,e,t):null)}var T5=Ee(Wu||(Wu=(e=>e)`<svg width="49" height="24" viewBox="0 0 49 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-16 h-16 -my-4">
<ellipse opacity="0.1" cx="7.70773" cy="21.5226" rx="3.4509" ry="0.637088" fill="black"/>
<path d="M11.0342 18.4211C12.817 18.4211 13.6285 14.4735 13.6285 12.9767C13.6285 11.8101 12.8235 11.103 11.7652 11.103C10.7135 11.103 9.85965 11.5553 9.84905 12.1153C9.84902 13.5933 9.5889 18.4211 11.0342 18.4211Z" fill="white" stroke="currentColor" stroke-width="0.530907"/>
<path d="M4.52264 18.4211C2.73985 18.4211 1.9284 14.4735 1.9284 12.9767C1.9284 11.8101 2.7334 11.103 3.79171 11.103C4.84341 11.103 5.69723 11.5553 5.70784 12.1153C5.70786 13.5933 5.96799 18.4211 4.52264 18.4211Z" fill="white" stroke="currentColor" stroke-width="0.530907"/>
<mask id="path-4-inside-1_362_874" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6445 12.5235C12.6735 12.2374 12.352 12.0646 12.1046 12.2113C10.8114 12.9776 9.30208 13.4175 7.68997 13.4175C6.09291 13.4175 4.59668 12.9858 3.31165 12.2326C3.06376 12.0873 2.74334 12.2612 2.77318 12.547C2.9933 14.6548 4.14156 16.4192 5.71508 17.2405C6.15438 17.4698 6.46173 17.8751 6.77033 18.282C7.0197 18.6108 7.26988 18.9407 7.59116 19.1797C7.62857 19.2075 7.66755 19.2222 7.70759 19.2222C7.74762 19.2222 7.78658 19.2075 7.82397 19.1797C8.14538 18.9407 8.39562 18.6108 8.64504 18.2819C8.9536 17.875 9.26091 17.4698 9.70016 17.2405C11.2796 16.4162 12.4305 14.6418 12.6445 12.5235Z"/>
</mask>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6445 12.5235C12.6735 12.2374 12.352 12.0646 12.1046 12.2113C10.8114 12.9776 9.30208 13.4175 7.68997 13.4175C6.09291 13.4175 4.59668 12.9858 3.31165 12.2326C3.06376 12.0873 2.74334 12.2612 2.77318 12.547C2.9933 14.6548 4.14156 16.4192 5.71508 17.2405C6.15438 17.4698 6.46173 17.8751 6.77033 18.282C7.0197 18.6108 7.26988 18.9407 7.59116 19.1797C7.62857 19.2075 7.66755 19.2222 7.70759 19.2222C7.74762 19.2222 7.78658 19.2075 7.82397 19.1797C8.14538 18.9407 8.39562 18.6108 8.64504 18.2819C8.9536 17.875 9.26091 17.4698 9.70016 17.2405C11.2796 16.4162 12.4305 14.6418 12.6445 12.5235Z" fill="#FFDF6F"/>
<path d="M5.71508 17.2405L5.96074 16.7698L5.71508 17.2405ZM6.77033 18.282L6.34731 18.6028H6.34731L6.77033 18.282ZM7.59116 19.1797L7.27429 19.6057L7.27429 19.6057L7.59116 19.1797ZM7.82397 19.1797L8.14076 19.6058L8.14076 19.6058L7.82397 19.1797ZM8.64504 18.2819L8.22202 17.9611L8.22202 17.9611L8.64504 18.2819ZM9.70016 17.2405L9.94582 17.7112H9.94582L9.70016 17.2405ZM12.1046 12.2113L12.3752 12.668L12.1046 12.2113ZM12.6445 12.5235L12.1163 12.4702L12.6445 12.5235ZM11.8339 11.7545C10.6205 12.4737 9.20424 12.8866 7.68997 12.8866V13.9484C9.39992 13.9484 11.0024 13.4815 12.3752 12.668L11.8339 11.7545ZM7.68997 12.8866C6.18981 12.8866 4.78593 12.4813 3.5801 11.7746L3.0432 12.6907C4.40743 13.4902 5.996 13.9484 7.68997 13.9484V12.8866ZM2.24515 12.6022C2.48098 14.8605 3.71574 16.7958 5.46941 17.7111L5.96074 16.7698C4.56738 16.0426 3.50562 14.4492 3.30122 12.4919L2.24515 12.6022ZM5.46941 17.7111C5.78479 17.8758 6.0236 18.1759 6.34731 18.6028L7.19335 17.9612C6.89987 17.5742 6.52397 17.0638 5.96074 16.7698L5.46941 17.7111ZM6.34731 18.6028C6.58755 18.9196 6.88185 19.3137 7.27429 19.6057L7.90804 18.7537C7.65791 18.5676 7.45184 18.302 7.19335 17.9612L6.34731 18.6028ZM7.27429 19.6057C7.38246 19.6861 7.5299 19.7531 7.70759 19.7531V18.6913C7.80519 18.6913 7.87468 18.7289 7.90803 18.7537L7.27429 19.6057ZM7.70759 19.7531C7.8852 19.7531 8.03259 19.6862 8.14076 19.6058L7.50719 18.7537C7.54057 18.7289 7.61005 18.6913 7.70759 18.6913V19.7531ZM8.14076 19.6058C8.53339 19.3138 8.82778 18.9195 9.06806 18.6027L8.22202 17.9611C7.96346 18.302 7.75738 18.5677 7.50719 18.7537L8.14076 19.6058ZM9.06806 18.6027C9.39174 18.1759 9.6305 17.8758 9.94582 17.7112L9.45451 16.7699C8.89133 17.0638 8.51547 17.5741 8.22202 17.9611L9.06806 18.6027ZM9.94582 17.7112C11.706 16.7925 12.9435 14.8462 13.1728 12.5769L12.1163 12.4702C11.9176 14.4373 10.8531 16.0399 9.45451 16.7699L9.94582 17.7112ZM3.5801 11.7746C3.28427 11.6012 2.93961 11.6167 2.67587 11.7666C2.40507 11.9206 2.20605 12.2278 2.24515 12.6022L3.30122 12.4919C3.30493 12.5275 3.29778 12.5713 3.27544 12.6121C3.25447 12.6503 3.22616 12.6752 3.20065 12.6897C3.15164 12.7176 3.09113 12.7188 3.0432 12.6907L3.5801 11.7746ZM12.3752 12.668C12.3274 12.6963 12.2669 12.6954 12.2177 12.6677C12.1921 12.6533 12.1637 12.6286 12.1426 12.5903C12.12 12.5496 12.1127 12.5057 12.1163 12.4702L13.1728 12.5769C13.2106 12.2021 13.0103 11.8954 12.7386 11.7425C12.4741 11.5936 12.1291 11.5796 11.8339 11.7545L12.3752 12.668Z" fill="black" mask="url(#path-4-inside-1_362_874)"/>
<ellipse cx="7.72545" cy="12.4621" rx="4.67198" ry="1.55733" fill="black" stroke="black" stroke-width="0.530907"/>
<path d="M3.97363 15.0811C3.97363 15.0811 6.27807 15.8597 7.76077 15.8597C9.24347 15.8597 11.5479 15.0811 11.5479 15.0811" stroke="black" stroke-width="0.530907" stroke-linecap="round"/>
<circle cx="1.05642" cy="1.05642" r="1.05642" transform="matrix(-1 0 0 1 4.38745 4.74609)" fill="black"/>
<path d="M3.15497 5.64404L5.12695 7.61603" stroke="black" stroke-width="0.528211"/>
<circle cx="11.9585" cy="5.80252" r="1.05642" fill="black"/>
<path d="M12.1522 5.64404L10.1802 7.61603" stroke="black" stroke-width="0.528211"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.63088 12.1065C3.0615 11.8354 2.73014 11.2267 2.84114 10.606C3.31755 7.94167 5.303 5.94336 7.67995 5.94336C10.0627 5.94336 12.052 7.95136 12.5222 10.6253C12.6316 11.2472 12.2975 11.8556 11.7262 12.1245C10.5037 12.6998 9.13817 13.0214 7.69756 13.0214C6.24199 13.0214 4.86309 12.6931 3.63088 12.1065Z" fill="#FFDF6F"/>
<path d="M12.5222 10.6253L12.7823 10.5796L12.5222 10.6253ZM11.7262 12.1245L11.8386 12.3635L11.7262 12.1245ZM2.84114 10.606L3.10112 10.6525L2.84114 10.606ZM3.63088 12.1065L3.7444 11.868L3.63088 12.1065ZM3.10112 10.6525C3.56146 8.07803 5.46436 6.20746 7.67995 6.20746V5.67925C5.14164 5.67925 3.07364 7.8053 2.58115 10.5595L3.10112 10.6525ZM7.67995 6.20746C9.90088 6.20746 11.8077 8.08716 12.2621 10.6711L12.7823 10.5796C12.2962 7.81556 10.2244 5.67925 7.67995 5.67925V6.20746ZM11.6137 11.8855C10.4257 12.4446 9.09849 12.7573 7.69756 12.7573V13.2855C9.17785 13.2855 10.5817 12.955 11.8386 12.3635L11.6137 11.8855ZM7.69756 12.7573C6.28209 12.7573 4.9419 12.4381 3.7444 11.868L3.51736 12.3449C4.78428 12.9481 6.20189 13.2855 7.69756 13.2855V12.7573ZM12.2621 10.6711C12.3498 11.1697 12.0828 11.6648 11.6137 11.8855L11.8386 12.3635C12.5122 12.0465 12.9134 11.3248 12.7823 10.5796L12.2621 10.6711ZM2.58115 10.5595C2.44814 11.3033 2.84611 12.0254 3.51736 12.3449L3.7444 11.868C3.2769 11.6455 3.01213 11.1501 3.10112 10.6525L2.58115 10.5595Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.64674 11.4442C4.18843 11.2575 3.91656 10.7699 4.07537 10.3012C4.56513 8.8558 5.99378 7.80981 7.67991 7.80981C9.36604 7.80981 10.7947 8.8558 11.2845 10.3012C11.4433 10.7699 11.1714 11.2575 10.7131 11.4442C9.777 11.8254 8.75299 12.0355 7.67991 12.0355C6.60684 12.0355 5.58282 11.8254 4.64674 11.4442Z" fill="black"/>
<ellipse cx="8.895" cy="10.0634" rx="0.880351" ry="0.704281" fill="white"/>
<ellipse cx="6.37474" cy="10.0639" rx="0.880351" ry="0.704281" fill="white"/>
<path d="M25.3078 11.6284L24.3574 9.04272L23.4489 11.6284H25.3078ZM23.1274 5.99577H25.6712L29.2213 15.3882L26.7195 15.6398L26.0346 13.6271H22.75L22.0931 15.5H19.5633L23.1274 5.99577ZM32.463 15.5H29.9193V5.78612L32.463 5.63238V15.5ZM35.1432 15.5H33.8573V5.78612L36.4011 5.63238V14.2281L35.1432 15.5ZM35.5765 11.3629L34.8637 9.72758C35.0314 9.52259 35.2457 9.32691 35.5066 9.14055C35.7768 8.94488 36.075 8.78647 36.4011 8.66534C36.7272 8.54421 37.0627 8.48364 37.4074 8.48364C38.0783 8.48364 38.6747 8.60943 39.1965 8.86102C39.7183 9.1126 40.1283 9.49929 40.4264 10.0211C40.7339 10.5429 40.8877 11.2091 40.8877 12.0198C40.8877 12.8211 40.7339 13.492 40.4264 14.0324C40.1283 14.5729 39.709 14.9782 39.1685 15.2484C38.6374 15.5186 38.0131 15.6537 37.2956 15.6537C37.0161 15.6537 36.7366 15.6118 36.457 15.528C36.1868 15.4441 35.9166 15.3136 35.6464 15.1366C35.3855 14.9502 35.1246 14.708 34.8637 14.4098L35.5765 12.9143C35.8467 13.1659 36.1123 13.3615 36.3732 13.5013C36.6341 13.6318 36.8856 13.697 37.1279 13.697C37.3422 13.697 37.5332 13.6318 37.701 13.5013C37.8687 13.3709 38.0038 13.1799 38.1063 12.9283C38.2088 12.6767 38.26 12.3785 38.26 12.0338C38.26 11.689 38.2088 11.4001 38.1063 11.1672C38.0131 10.9249 37.8733 10.7432 37.687 10.6221C37.5099 10.501 37.2863 10.4404 37.0161 10.4404C36.7925 10.4404 36.5642 10.5243 36.3312 10.692C36.0983 10.8597 35.8467 11.0833 35.5765 11.3629ZM43.4036 15.528L43.4595 15.3742L41.0275 9.14055L43.3757 8.46967L44.7594 12.5509L46.0592 8.72125H48.589L45.6119 16.2967C45.4722 16.6601 45.2439 16.9955 44.9271 17.303C44.6103 17.6105 44.2422 17.8714 43.8229 18.0857C43.4036 18.3 42.9703 18.4584 42.5231 18.5609L41.6705 16.5902C41.8941 16.497 42.1271 16.3945 42.3693 16.2827C42.6209 16.1709 42.8445 16.0498 43.0402 15.9193C43.2359 15.7889 43.357 15.6584 43.4036 15.528Z" fill="currentColor"/>
</svg>
`)),Vu,O5=e=>e,Zu=class extends Ce()(ye){render(){return X(Vu||(Vu=O5`<div>
<bc-navbar class="flex w-full" heading="About"></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8">
<div class="font-bold mb-1 ${0}">
How does it work?
</div>
<p class="mb-2 ${0}">
Bitcoin Connect is a way to connect to your lightning wallet from
any browser.
</p>
<div class="flex flex-col gap-3 ${0}">
<p>
💾 Your connection is saved in local storage, so next time you
visit the site will connect automatically.
</p>
<p>
💸 Make sure to set budgets and permissions for sites you do not
trust.
</p>
</div>
</div>
<div class="flex gap-4 w-full my-6 px-8">
<a
href="https://bitcoin-connect.com"
target="_blank"
class="${0} flex-1"
aria-label="Learn more about Bitcoin Connect (opens in new tab)"
>
<bci-button tabindex="-1">
<span class="${0}">Learn more</span>
${0}
</bci-button>
</a>
<a
href="https://github.com/getAlby/bitcoin-connect"
target="_blank"
class="${0} flex-1"
aria-label="Use Bitcoin Connect on GitHub (opens in new tab)"
>
<bci-button tabindex="-1">
<span class="${0}">Use it</span>
${0}
</bci-button>
</a>
</div>
${0}
<div
class="flex w-full justify-center items-center mt-4 gap-1 font-sans"
>
<span class="block ${0}"
>Made with love by</span
>
<span class="${0}"> ${0} </span>
</div>
</div>
</div>`),Pe,de,de,Zs,Pe,Hu,Zs,Pe,Hu,qh(),At,It,T5)}};Zu=ee([pe("bc-help")],Zu);var Yu,qu,N5=e=>e,ds=class extends Ce()(ye){constructor(){super(...arguments),this._nwcUrl=""}render(){return X(Yu||(Yu=N5`<div class="w-full">
<bc-navbar class="flex w-full" heading="Nostr Wallet Connect"></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-1 ${0}">
Enter your
<a
href="https://nwc.getalby.com/about"
target="_blank"
class="font-bold"
>Connection Secret
</a>
below
</div>
<input
value=${0}
@change=${0}
placeholder="nostr+walletconnect://..."
type="password"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>`),de,this._nwcUrl,this.nwcUrlChanged,bn,It,this.onConnect)}nwcUrlChanged(e){this._nwcUrl=e.target.value}async onConnect(){this._nwcUrl?await ne.getState().connect({nwcUrl:this._nwcUrl,connectorName:la,connectorType:"nwc.generic"}):ne.getState().setError("Please enter a URL")}};ee([ge()],ds.prototype,"_nwcUrl",void 0),ds=ee([pe("bc-nwc")],ds);var x5=Ee(qu||(qu=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 19C4.73858 19 2.5 16.7614 2.5 14C2.5 11.4673 4.38316 9.37436 6.82568 9.04508C7.63649 6.69118 9.87075 5 12.5 5C15.8137 5 18.5 7.68629 18.5 11C20.7091 11 22.5 12.7909 22.5 15C22.5 17.2091 20.7091 19 18.5 19H7.5Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>`)),zu,R5=Ee(zu||(zu=(e=>e)`<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" fill="none"><path fill="currentColor" d="M18.048 15.842a4.588 4.588 0 0 0-1.202-4.359l-1.35-1.356c-.25-.251-.582-.39-.936-.39h-.003c-.352 0-.683.136-.932.383l-.534.529a.126.126 0 0 1-.178 0l-1.519-1.516a.834.834 0 0 0-1.42.588c0 .222.086.431.243.588l1.514 1.511c.05.05.05.13 0 .18l-.97.963a.127.127 0 0 1-.178 0l-1.52-1.517a.834.834 0 0 0-1.42.588c0 .222.086.431.244.588L9.4 14.134c.05.05.05.13 0 .18l-.442.437c-.251.25-.39.58-.391.933-.001.353.135.685.385.935l1.35 1.357a4.597 4.597 0 0 0 2.247 1.245 4.64 4.64 0 0 0 2.17-.031l2.266 2.262c.367.367.856.568 1.377.568.52 0 1.007-.2 1.373-.565l.59-.586c.369-.366.572-.855.572-1.374.001-.52-.201-1.008-.57-1.376l-2.28-2.277Zm-1.405.948 2.508 2.505a.279.279 0 0 1 0 .397l-.59.585a.283.283 0 0 1-.398 0l-2.495-2.492a1.109 1.109 0 0 0-.79-.326c-.123 0-.246.02-.365.06-.514.172-1.065.2-1.595.08a2.934 2.934 0 0 1-1.434-.794l-.885-.89a.316.316 0 0 1 .002-.448l.655-.65.42-.418 1.576-1.565.334-.334.745-.737a.316.316 0 0 1 .447.001l.886.891a2.93 2.93 0 0 1 .709 2.992c-.133.406-.03.844.27 1.143Z"/><path fill="currentColor" d="M14.96 21.397a.759.759 0 0 0-1.07-.001 1.829 1.829 0 0 1-2.584-.006L2.73 12.772a1.829 1.829 0 0 1 .006-2.583l6.295-6.271a1.814 1.814 0 0 1 1.288-.532h.004c.488 0 .946.192 1.29.538l7.538 7.544a.821.821 0 0 0 .585.242.827.827 0 0 0 .587-1.407l-7.658-7.72-.011-.011a3.51 3.51 0 0 0-2.432-.883 3.511 3.511 0 0 0-2.39 1.026L1.538 8.986A3.5 3.5 0 0 0 .5 11.476a3.501 3.501 0 0 0 1.026 2.493l8.576 8.618a3.502 3.502 0 0 0 2.49 1.038h.01c.938 0 1.82-.365 2.486-1.027a.752.752 0 0 0 .223-.535.752.752 0 0 0-.222-.537l-.13-.13Z"/><path fill="currentColor" d="m24.286 10.688-2.928-8.631-.006-.019-.023-.05A2.731 2.731 0 0 0 20.482.93a2.79 2.79 0 0 0-2.469-.442c-.44.132-.832.368-1.162.7l-1.224 1.23a.844.844 0 0 0-.248.593.844.844 0 0 0 .24.596c.16.165.375.256.605.258h.005a.843.843 0 0 0 .602-.25l1.224-1.23c.25-.252.595-.361.945-.298.345.061.627.276.777.59l2.912 8.588.003.01.004.01c.07.183.105.375.105.571 0 .427-.166.828-.469 1.13l-2.006 1.997a.843.843 0 0 0-.25.6.847.847 0 0 0 1.449.602l2.006-1.997a3.276 3.276 0 0 0 .969-2.332c0-.4-.072-.794-.214-1.168Z"/></svg>`)),Qu,I5=Ee(Qu||(Qu=(e=>e)`<svg width="25" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 0h.136c1.702 0 3.074 0 4.153.143 1.12.15 2.063.468 2.812 1.209.75.74 1.071 1.673 1.222 2.781.145 1.067.145 2.424.145 4.107v7.52c0 1.683 0 3.04-.145 4.107-.15 1.107-.473 2.04-1.222 2.781-.749.74-1.692 1.06-2.812 1.209-1.08.143-2.45.143-4.153.143h-.136c-1.702 0-3.074 0-4.153-.143-1.12-.15-2.063-.468-2.812-1.209-.75-.74-1.071-1.674-1.222-2.781C4.1 18.8 4.1 17.443 4.1 15.76V8.24c0-1.683 0-3.04.145-4.107.15-1.108.473-2.04 1.222-2.781C6.216.612 7.159.292 8.279.143 9.358 0 10.73 0 12.432 0ZM6.787 2.657c.344-.34.828-.562 1.74-.684.94-.125 2.187-.127 3.973-.127s3.032.002 3.972.127c.913.122 1.397.344 1.741.684.345.34.57.82.692 1.722.126.93.128 2.162.128 3.929v7.384c0 1.767-.002 3-.128 3.929-.123.903-.347 1.381-.692 1.722-.344.34-.828.562-1.74.684-.94.125-2.187.127-3.973.127s-3.032-.002-3.972-.127c-.913-.122-1.397-.344-1.741-.684-.345-.34-.57-.82-.692-1.722-.126-.93-.128-2.162-.128-3.929V8.308c0-1.767.002-3 .128-3.929.123-.903.347-1.381.692-1.722Z" fill="currentColor"/><path d="M9.078 19.361c0-.497.418-.9.933-.9h4.978c.515 0 .933.403.933.9s-.418.9-.933.9H10.01c-.515 0-.933-.403-.933-.9Z" fill="currentColor"/></svg>`)),Ju,Xu,P5=e=>e,e0=class extends Ce()(ye){render(){return X(Ju||(Ju=P5`<div class="w-full">
<bc-navbar
class="flex w-full"
heading=${0}
></bc-navbar>
<div class="font-sans text-sm w-full">
<div
class="px-8 pt-4 w-full flex flex-col items-center justify-center gap-4"
>
<div class="mb-2 ${0}">
Choose how to connect
</div>
<bci-button @click=${0} class="w-full">
${0}
<span class="${0}">Alby Cloud</span>
</bci-button>
<bci-button @click=${0} class="w-full">
${0}
<span class="${0}">Alby Go</span>
</bci-button>
<bci-button @click=${0} class="w-full">
${0}
<span class="${0}"
>Connection Secret</span
>
</bci-button>
</div>
</div>
</div>`),"Connect "+Zh,de,this.onClickAlbyCloud,x5,Pe,this.onClickAlbyGo,I5,Pe,this.onClickConnectionSecret,R5,Pe)}async onClickAlbyCloud(){try{var e;let t=ne.getState().bitcoinConnectConfig.providerConfig,r=await jt.fromAuthorizationUrl("https://my.albyhub.com/apps/new",Ct({},(t==null||(e=t.nwc)==null?void 0:e.authorizationUrlOptions)||{},{name:this._appName}));r.close(),await ne.getState().connect({nwcUrl:r.nostrWalletConnectUrl,connectorName:"Alby Hub",connectorType:"nwc.albyhub"})}catch(t){console.error(t),alert(""+t)}}async onClickConnectionSecret(){ne.getState().pushRoute("/nwc")}async onClickAlbyGo(){ne.getState().pushRoute("/alby-go")}};e0=ee([pe("bc-alby-hub")],e0);var ha=Ee(Xu||(Xu=(e=>e)`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.4962 11.2367C11.7716 11.1782 12.0214 11.0339 12.2098 10.8247C12.424 10.5868 12.5206 10.2261 12.7139 9.50486L13.6802 5.89873C13.8734 5.17744 13.9701 4.81679 13.9035 4.50368C13.845 4.22827 13.7007 3.97845 13.4915 3.79004C13.2536 3.57585 12.893 3.47921 12.1717 3.28594L8.56554 2.31969C7.84425 2.12642 7.4836 2.02978 7.17049 2.09633C6.89507 2.15488 6.64525 2.29911 6.45684 2.50836C6.24265 2.74624 6.14602 3.10689 5.95275 3.82818L5.5 5.50024" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
<path d="M11.0135 10.1009L10.0473 6.49473C9.85398 5.77344 9.75735 5.41279 9.54316 5.17491C9.35475 4.96566 9.10493 4.82142 8.82951 4.76288C8.5164 4.69633 8.15576 4.79296 7.43447 4.98623L3.82834 5.95249C3.10705 6.14576 2.7464 6.2424 2.50852 6.45659C2.29927 6.645 2.15504 6.89481 2.0965 7.17023C2.02994 7.48334 2.12658 7.84399 2.31985 8.56528L3.28611 12.1714C3.47938 12.8927 3.57601 13.2533 3.7902 13.4912C3.97861 13.7005 4.22843 13.8447 4.50385 13.9032C4.81696 13.9698 5.1776 13.8732 5.89889 13.6799L9.50502 12.7136C10.2263 12.5204 10.587 12.4237 10.8248 12.2095C11.0341 12.0211 11.1783 11.7713 11.2369 11.4959C11.3034 11.1828 11.2068 10.8221 11.0135 10.1009Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
</svg>`)),t0,fa=Ee(t0||(t0=(e=>e)`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.33341 5.33341V4.80008C5.33341 4.05334 5.33341 3.67998 5.47874 3.39476C5.60657 3.14388 5.81054 2.9399 6.06143 2.81207C6.34664 2.66675 6.72001 2.66675 7.46675 2.66675H11.2001C11.9468 2.66675 12.3202 2.66675 12.6054 2.81207C12.8563 2.9399 13.0603 3.14388 13.1881 3.39476C13.3334 3.67998 13.3334 4.05334 13.3334 4.80008V8.53342C13.3334 9.28015 13.3334 9.65352 13.1881 9.93874C13.0603 10.1896 12.8563 10.3936 12.6054 10.5214C12.3202 10.6667 11.9468 10.6667 11.2001 10.6667H10.6667M10.6667 7.46675V11.2001C10.6667 11.9468 10.6667 12.3202 10.5214 12.6054C10.3936 12.8563 10.1896 13.0603 9.93874 13.1881C9.65352 13.3334 9.28015 13.3334 8.53342 13.3334H4.80008C4.05334 13.3334 3.67998 13.3334 3.39476 13.1881C3.14388 13.0603 2.9399 12.8563 2.81207 12.6054C2.66675 12.3202 2.66675 11.9468 2.66675 11.2001V7.46675C2.66675 6.72001 2.66675 6.34664 2.81207 6.06143C2.9399 5.81054 3.14388 5.60657 3.39476 5.47874C3.67998 5.33341 4.05334 5.33341 4.80008 5.33341H8.53342C9.28015 5.33341 9.65352 5.33341 9.93874 5.47874C10.1896 5.60657 10.3936 5.81054 10.5214 6.06143C10.6667 6.34664 10.6667 6.72001 10.6667 7.46675Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
</svg>`)),n0,r0,o0=e=>e,co=class extends Ce()(ye){constructor(){super(),this._hasCopiedAuthString=!1,this.initAlbyGo()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._unsub)==null||e.call(this)}render(){return X(n0||(n0=o0`<div class="w-full">
<bc-navbar class="flex w-full" heading="Connect Alby Hub with Alby Go"></bc-navbar>
<div class="font-sans text-sm w-full">
<div
class="px-8 pt-4 w-full flex flex-col items-center justify-center gap-4"
>
<div class="mb-2 text-center ${0}">
Scan with your camera, QR code scanner app, or from Alby Go -> Send
</div>
<div class="flex justify-center items-center">
${0}
<p class="${0}">Waiting for connection</p>
</div>
${0}
<bci-button
@click=${0}
class="
flex gap-1 w-full
mt-4
${0} ${0} font-semibold text-xs"
>
${0}
${0}
</bci-button>
</div>
</div>
</div>
</div>`),de,wn(`w-7 h-7 ${de}`),de,this.renderQR(),this._copyAuthString,Pe,qe,this._hasCopiedAuthString?ha:fa,this._hasCopiedAuthString?"Copied!":"Copy")}renderQR(){if(!this._authString)return null;let e=this._authString;return setTimeout(()=>{var t;let r=(t=this.shadowRoot)==null?void 0:t.getElementById("qr");if(!r)return void console.error("qr canvas not found");let n=r.getContext("2d");if(!n)return void console.error("could not get context for qr canvas");let i=(0,To.default)(0,"L");i.addData(e),i.make();let a=i.getModuleCount();r.width=4*a,r.height=4*a,i.renderTo2dContext(n,4)},100),X(r0||(r0=o0`
<!-- add margin only on dark mode because on dark mode the qr has a white border -->
<canvas id="qr" class="dark:bg-white dark:p-4"></canvas>
`))}_copyAuthString(){this._authString&&(navigator.clipboard.writeText(this._authString),this._hasCopiedAuthString=!0,setTimeout(()=>{this._hasCopiedAuthString=!1},2e3))}async initAlbyGo(){try{var e;let t=(e=ne.getState().bitcoinConnectConfig.providerConfig)==null||(e=e.nwc)==null?void 0:e.authorizationUrlOptions,r=t?.expiresAt,n=t?.requestMethods;n||(n=["get_info","get_balance","get_budget","pay_invoice","list_transactions","lookup_invoice","make_invoice"]);let i=new Yn({name:this._appName,icon:this._appIcon,relayUrls:["wss://relay.getalby.com/v1"],requestMethods:n,notificationTypes:t?.notificationTypes,maxAmount:t?.maxAmount,budgetRenewal:t?.budgetRenewal,expiresAt:r?Math.floor(r.getTime()/1e3):void 0,isolated:t?.isolated,metadata:t?.metadata,returnTo:t?.returnTo});this._authString=i.getConnectionUri("alby"),window.location.href=this._authString;let{unsub:a}=await i.subscribe({onSuccess:async function(f){f.close(),ne.getState().connect({nwcUrl:f.nostrWalletConnectUrl,connectorName:"Alby Hub",connectorType:"nwc.albyhub"})}});this._unsub=a}catch(t){console.error(t),alert(""+t)}}};ee([ge()],co.prototype,"_authString",void 0),ee([ge()],co.prototype,"_hasCopiedAuthString",void 0),co=ee([pe("bc-alby-go")],co);var i0,s0,k5=e=>e,lo=class extends Ce()(ye){constructor(){super(...arguments),this._lnbitsAdminKey="",this._lnbitsUrl=""}render(){return X(i0||(i0=k5`<div class="w-full">
<bc-navbar
class="flex w-full"
heading=${0}
></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-4 ${0}">
In LNbits, choose the wallet you want to connect, open it, click on
API docs and copy the Admin Key. Paste it below:
</div>
<div class="mb-1 ${0}">
LNbits Admin Key
</div>
<input
value=${0}
@change=${0}
type="password"
placeholder="Your 32 digit admin key"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<div class="mb-1 ${0}">
LNbits URL
</div>
<input
value=${0}
@change=${0}
placeholder="https://legend.lnbits.com"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>`),qs,mr,de,this._lnbitsAdminKey,this._lnbitsAdminKeyChanged,bn,It,de,this._lnbitsUrl,this._lnbitsUrlChanged,bn,It,this.onConnect)}_lnbitsAdminKeyChanged(e){this._lnbitsAdminKey=e.target.value}_lnbitsUrlChanged(e){this._lnbitsUrl=e.target.value}async onConnect(){if(!this._lnbitsAdminKey)return void ne.getState().setError("Please enter your admin key");if(!this._lnbitsUrl)return void ne.getState().setError("Please enter your LNbits instance URL");let e=this._lnbitsUrl;e.endsWith("/")&&(e=e.substring(0,e.length-1)),await ne.getState().connect({lnbitsAdminKey:this._lnbitsAdminKey,lnbitsInstanceUrl:e,connectorName:qs,connectorType:"lnbits"})}};ee([ge()],lo.prototype,"_lnbitsAdminKey",void 0),ee([ge()],lo.prototype,"_lnbitsUrl",void 0),lo=ee([pe("bc-lnbits")],lo);var zh=Ee(s0||(s0=(e=>e)`
<svg width="150" height="150" viewBox="0 0 150 150" version="1.1" xml:space="preserve"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
class="w-32 h-32 mt-4"
>
<circle id="ring" cx="75" cy="75" r="48.5" fill="none" stroke="currentColor" stroke-width="5" transform="rotate(-90 75 75)" stroke-dasharray="400 400" stroke-dashoffset="400">
<animate attributeName="stroke-dashoffset" begin="0.1s" dur="1.5s" values="500; 80; 0" fill="freeze" calcMode="spline" keyTimes="0; 0.99; 1" keySplines="0.28 0.4 0.38 1; 0 0 1 1"/>
<animate attributeName="r" begin="1.8s" dur=".8s" values="47; 65" fill="freeze"/>
<animate attributeName="stroke-width" begin="1.8s" dur=".8s" values="6; 0" fill="freeze"/>
</circle>
<circle id="circle" cx="75" cy="75" r="0" fill="currentColor" stroke="none">
<animate attributeName="r" begin="1.4s" dur=".5s" fill="freeze" calcMode="spline" values="0; 60; 50" keyTimes="0; 0.75; 1" keySplines="0.25 0.1 0.25 1; 0.25 0.1 0.25 1"/>
</circle>
<path id="check" d="M 51.749354,79.542286 63.437424,91.567026 98.46891,58.494402" fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-dasharray="65 65" stroke-dashoffset="65">
<animate attributeName="stroke-dashoffset" begin="1.8s" dur=".5s" values="65; 0" fill="freeze" calcMode="spline" keyTimes="0; 1" keySplines="0.42 0 0.58 1"/>
</path>
</svg>
`)),a0,L5=Ee(a0||(a0=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.5 6.5V17C4.5 18.6569 5.84315 20 7.5 20H17.5C19.1569 20 20.5 18.6569 20.5 17V12C20.5 10.3431 19.1569 9 17.5 9H16.5M4.5 6.5C4.5 7.88071 5.61929 9 7 9H16.5M4.5 6.5C4.5 5.11929 5.61929 4 7 4H14.5C15.6046 4 16.5 4.89543 16.5 6V9" stroke="currentColor" stroke-width="2" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M16 15.375C16.4832 15.375 16.875 14.9832 16.875 14.5C16.875 14.0168 16.4832 13.625 16 13.625C15.5168 13.625 15.125 14.0168 15.125 14.5C15.125 14.9832 15.5168 15.375 16 15.375Z" fill="white" stroke="currentColor" stroke-width="0.75"/>
</svg>`)),c0,U5=Ee(c0||(c0=(e=>e)`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 6C3 4.34315 4.34315 3 6 3H8C9.65685 3 11 4.34315 11 6V8C11 9.65685 9.65685 11 8 11H6C4.34315 11 3 9.65685 3 8V6ZM6 5C5.44772 5 5 5.44772 5 6V8C5 8.55228 5.44772 9 6 9H8C8.55228 9 9 8.55228 9 8V6C9 5.44772 8.55228 5 8 5H6ZM13 6C13 4.34315 14.3431 3 16 3H18C19.6569 3 21 4.34315 21 6V8C21 9.65685 19.6569 11 18 11H16C14.3431 11 13 9.65685 13 8V6ZM16 5C15.4477 5 15 5.44772 15 6V8C15 8.55228 15.4477 9 16 9H18C18.5523 9 19 8.55228 19 8V6C19 5.44772 18.5523 5 18 5H16ZM3 16C3 14.3431 4.34315 13 6 13H8C9.65685 13 11 14.3431 11 16V18C11 19.6569 9.65685 21 8 21H6C4.34315 21 3 19.6569 3 18V16ZM6 15C5.44772 15 5 15.4477 5 16V18C5 18.5523 5.44772 19 6 19H8C8.55228 19 9 18.5523 9 18V16C9 15.4477 8.55228 15 8 15H6ZM14 13C14.5523 13 15 13.4477 15 14V15H16C16.5523 15 17 15.4477 17 16C17 16.5523 16.5523 17 16 17H14C13.4477 17 13 16.5523 13 16V14C13 13.4477 13.4477 13 14 13ZM17 14C17 13.4477 17.4477 13 18 13H20C20.5523 13 21 13.4477 21 14C21 14.5523 20.5523 15 20 15H18C17.4477 15 17 14.5523 17 14ZM17 18C17 17.4477 17.4477 17 18 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H19V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V18Z" fill="currentColor"/>
<path d="M15 20C15 20.5523 14.5523 21 14 21C13.4477 21 13 20.5523 13 20C13 19.4477 13.4477 19 14 19C14.5523 19 15 19.4477 15 20Z" fill="currentColor"/>
<path d="M8 17C8 17.5523 7.55228 18 7 18C6.44772 18 6 17.5523 6 17C6 16.4477 6.44772 16 7 16C7.55228 16 8 16.4477 8 17Z" fill="currentColor"/>
<path d="M8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7C6 6.44772 6.44772 6 7 6C7.55228 6 8 6.44772 8 7Z" fill="currentColor"/>
<path d="M18 7C18 7.55228 17.5523 8 17 8C16.4477 8 16 7.55228 16 7C16 6.44772 16.4477 6 17 6C17.5523 6 18 6.44772 18 7Z" fill="currentColor"/>
</svg>`)),l0,u0,h0,f0,d0,p0,y0,g0,b0,w0,m0,v0,E0,_0,C0,A0,S0,T0,O0,je=e=>e,Wt=class extends Ce()(ye){constructor(){super(...arguments),this._hasCopiedInvoice=!1,this._isPaying=!1,this._showQR=!1,this.paymentMethods="all"}updated(e){super.updated(e),e.has("paid")&&this.paid&&setTimeout(()=>{No()},3e3)}renderHeading(e){return X(l0||(l0=je`
<h2 class="text-2xl mb-6 ${0}">
<span
class="font-bold font-mono text-4xl align-bottom ${0}"
>${0}</span
>&nbsp;sats
</h2>
`),de,Pe,e.satoshi.toLocaleString(void 0,{useGrouping:!0}))}renderPaidState(){return X(u0||(u0=je`
<div
class="flex flex-col justify-center items-center ${0}"
>
<p class="font-bold">Paid!</p>
${0}
</div>
`),Pe,zh)}renderPayingState(){return X(h0||(h0=je`
<div class="flex flex-col justify-center items-center">
<p class="${0} mb-5">Paying...</p>
${0}
</div>
`),de,wn(`w-48 h-48 ${Pe}`))}renderPaymentConfirmation(){return X(f0||(f0=je`
<bci-button variant="primary" @click=${0}>
<span class="-ml-0.5">${0}</span>
Confirm Payment
</bci-button>
${0}
`),this._payInvoice,lr,ua(this._connectorName))}renderWaitingForPayment(){return X(d0||(d0=je`
<div class="flex justify-center items-center">
${0}
<p class="${0}">Waiting for payment</p>
</div>
`),wn(`w-7 h-7 ${Pe}`),de)}renderConnectWalletMobile(){let e=null,t=null,r=null;return this.paymentMethods!=="all"&&this.paymentMethods!=="internal"||(e=X(p0||(p0=je`
<bci-button block @click=${0}>
<span class="-ml-0.5">${0}</span>Connect Wallet
</bci-button>
`),this._onClickConnectWallet,lr)),this.paymentMethods!=="all"&&this.paymentMethods!=="external"||(this._showQR||(t=X(y0||(y0=je`
<bci-button block @click=${0}>
${0} Copy & Display Invoice
</bci-button>
`),this._copyAndDisplayInvoice,U5)),this._showQR&&(r=this.renderQR())),X(g0||(g0=je`
<div class="mt-8 w-full flex flex-col gap-4">
${0}
${0} ${0}
</div>
${0}
`),this.paymentMethods==="all"||this.paymentMethods==="external"?X(b0||(b0=je`<a href="lightning:${0}">
<bci-button variant="primary" block>
${0} Open in a Bitcoin Wallet
</bci-button>
</a>`),this.invoice,L5):null,e,t,r?X(w0||(w0=je`<div class="mt-4 flex flex-col items-center">${0}</div>`),r):null)}renderConnectWalletDesktop(){let e=null;this.paymentMethods!=="all"&&this.paymentMethods!=="internal"||(e=X(m0||(m0=je`
<div class="${0}">
<bci-button variant="primary" @click=${0}>
<span class="-ml-0.5">${0}</span>
Connect Wallet to Pay
</bci-button>
</div>
`),this.paymentMethods!=="internal"?"mt-8":"",this._onClickConnectWallet,lr));let t=null;this.paymentMethods==="all"&&(t=X(v0||(v0=je` <div class="w-full py-8">${0}</div> `),qh("or")));let r=null;return this.paymentMethods!=="all"&&this.paymentMethods!=="external"||(r=X(E0||(E0=je`
<div
class="flex flex-col items-center ${0}"
>
<p class="font-medium ${0}">
Scan to Pay
</p>
${0}
</div>
`),this.paymentMethods==="external"?"mt-8":"",de,this.renderQR())),X(_0||(_0=je` ${0} ${0} ${0} `),e,t,r)}renderQR(){if(!this._showQR||!this.invoice)return null;let e=this.invoice;return setTimeout(()=>{var t;let r=(t=this.shadowRoot)==null?void 0:t.getElementById("qr");if(!r)return void console.error("qr canvas not found");let n=r.getContext("2d");if(!n)return void console.error("could not get context for qr canvas");let i=(0,To.default)(0,"L");i.addData(e),i.make();let a=i.getModuleCount();r.width=2*a,r.height=2*a,i.renderTo2dContext(n,2)},100),X(C0||(C0=je`
<!-- add margin only on dark mode because on dark mode the qr has a white border -->
<a href="lightning:${0}" class="dark:mt-2">
<canvas id="qr" class="dark:bg-white dark:p-4"></canvas>
</a>
<button
@click=${0}
class="
flex gap-1
mt-4
${0} ${0}"
aria-label="${0}"
>
${0}
${0}
</button>
`),this.invoice,this._copyInvoice,Pe,qe,this._hasCopiedInvoice?"Invoice copied to clipboard":"Copy invoice to clipboard",this._hasCopiedInvoice?ha:fa,this._hasCopiedInvoice?"Copied!":"Copy Invoice")}renderMemo(e){return e.description?X(A0||(A0=je`
<p class="text-center mb-6 ${0}">
${0}
</p>
`),At,e.description):null}render(){if(!this.invoice)return null;let e;try{e=new ro({pr:this.invoice})}catch(n){return console.error(n),ne.getState().setError(n.message),null}let t=window.innerWidth<600,r;return t||(this._showQR=!0),r=this.paid?this.renderPaidState():this._isPaying?this.renderPayingState():this._connected?this.renderPaymentConfirmation():X(S0||(S0=je`
${0}
${0}
`),this.paymentMethods!=="internal"?this.renderWaitingForPayment():null,t?this.renderConnectWalletMobile():this.renderConnectWalletDesktop()),X(T0||(T0=je`
<div class="flex flex-col justify-center items-center font-sans w-full">
${0} ${0}
${0}
</div>
`),this.renderHeading(e),this.renderMemo(e),r)}_onClickConnectWallet(){this.dispatchEvent(new Event("onclickconnectwallet",{bubbles:!0,composed:!0}))}_copyAndDisplayInvoice(){this._copyInvoice(),this._showQR=!0}_copyInvoice(){this.invoice&&(navigator.clipboard.writeText(this.invoice),this._hasCopiedInvoice=!0,setTimeout(()=>{this._hasCopiedInvoice=!1},2e3))}async _payInvoice(){this._isPaying=!0;try{let e=ne.getState().provider;if(!e)throw new Error("No WebLN provider available");if(!this.invoice)throw new Error("No invoice to pay");let t=await e.sendPayment(this.invoice);if(!t.preimage)throw new Error("No preimage in result");this.dispatchEvent(new CustomEvent("bc:onpaid",{bubbles:!0,composed:!0,detail:t})),this.paid=!0}catch(e){console.error(e),ne.getState().setError(e.message)}this._isPaying=!1}};ee([ge()],Wt.prototype,"_hasCopiedInvoice",void 0),ee([ge()],Wt.prototype,"_isPaying",void 0),ee([ge()],Wt.prototype,"_showQR",void 0),ee([Ue({type:String})],Wt.prototype,"invoice",void 0),ee([Ue({type:Boolean})],Wt.prototype,"paid",void 0),ee([Ue({type:String,attribute:"payment-methods"})],Wt.prototype,"paymentMethods",void 0),Wt=ee([pe("bc-send-payment")],Wt);var M5=Ee(O0||(O0=(e=>e)`<svg class="w-full h-full" width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M177.882 96.0013C177.882 114.714 162.712 129.884 144 129.884C125.287 129.884 110.117 114.714 110.117 96.0013C110.117 77.2886 125.287 62.1189 144 62.1189C162.712 62.1189 177.882 77.2886 177.882 96.0013Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M144 64.2353C126.457 64.2353 112.235 78.4568 112.235 96C112.235 113.543 126.457 127.765 144 127.765C161.543 127.765 175.765 113.543 175.765 96C175.765 78.4568 161.543 64.2353 144 64.2353ZM108 96C108 76.1177 124.118 60 144 60C163.882 60 180 76.1177 180 96C180 115.882 163.882 132 144 132C124.118 132 108 115.882 108 96Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M144 118.589C156.475 118.589 166.588 108.476 166.588 96.0011C166.588 83.5259 156.475 73.4128 144 73.4128C131.524 73.4128 121.411 83.5259 121.411 96.0011C121.411 108.476 131.524 118.589 144 118.589ZM144 114.001C153.941 114.001 162 105.942 162 96.0011C162 86.06 153.941 78.0011 144 78.0011C134.058 78.0011 126 86.06 126 96.0011C126 105.942 134.058 114.001 144 114.001Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M144 82.8984C136.765 82.8984 130.899 88.764 130.899 95.9996C130.899 103.235 136.765 109.101 144 109.101L144 82.8984Z" fill="black"/>
<path d="M55.7364 131.166C53.2442 131.712 50.6554 132 47.9994 132C40.7095 132 33.9257 129.833 28.2569 126.108C26.8497 124.095 26.2183 122.987 25.7577 122.179C25.5295 121.778 25.3433 121.452 25.1253 121.125C22.9779 117.671 21.8543 113.235 21.6093 108.023C20.8504 91.8729 30.6653 81.56 40.6919 79.8672C47.0478 78.7942 52.0988 79.8809 55.9729 81.9526C52.5479 81 48.465 80.9425 43.8103 82.275C32.5268 85.912 28.7654 96.9708 30.3776 109.217C33.1913 124.562 48.2372 130.062 55.7364 131.166Z" fill="url(#paint0_linear_1428_3405)"/>
<path d="M23.5983 122.469C21.4995 118.742 19.5989 113.182 19.3614 108.129C18.5557 90.9843 29.0332 79.5543 40.317 77.6493C55.698 75.0526 64.2491 84.1583 67.197 90.9166C67.3202 90.8336 67.3704 90.669 67.3053 90.5274C62.4584 79.9882 52.4338 72.7507 40.854 72.7507C27.7055 72.7507 15.9732 82.1827 12 96.2003C12.0564 106.587 16.512 115.933 23.5983 122.469Z" fill="url(#paint1_linear_1428_3405)"/>
<path d="M68.2493 125.768C65.6525 127.538 62.8124 128.977 59.7892 130.025C58.3376 129.772 56.7293 129.457 55.597 129.235C55.0604 129.13 54.6305 129.046 54.3751 128.999C47.5271 127.749 35.2831 123.336 32.6008 108.867C31.8428 103.049 32.3857 97.6932 34.3078 93.4449C36.2015 89.2598 39.4695 86.0514 44.4537 84.4316C50.2465 82.8534 55.0469 83.6356 58.6125 85.5507C57.7348 85.3655 56.8276 85.2684 55.8993 85.2684C48.1838 85.2684 41.9291 91.9698 41.9291 100.236C41.9291 103.537 42.9263 106.588 44.6156 109.063C44.6156 109.063 49.4514 118.198 62.6156 117.381C74.3533 116.653 80.4488 106.125 81.1752 102.236C81.5528 100.215 81.7502 98.1303 81.7502 95.9997C81.7502 77.3603 66.6399 62.25 48.0004 62.25C33.896 62.25 21.8122 70.9021 16.7672 83.1884C15.0631 85.4082 13.5958 87.8694 12.4135 90.5306C15.0482 73.244 29.9777 60 48.0004 60C67.8826 60 84.0001 76.1176 84.0001 95.9997C84.0001 108.374 77.7573 119.289 68.2493 125.768Z" fill="url(#paint2_linear_1428_3405)"/>
<defs>
<linearGradient id="paint0_linear_1428_3405" x1="34.4824" y1="89.8251" x2="34.4273" y2="121.82" gradientUnits="userSpaceOnUse">
<stop offset="0.0297309" stop-color="#FA3C3C"/>
<stop offset="1" stop-color="#BC1870"/>
</linearGradient>
<linearGradient id="paint1_linear_1428_3405" x1="29.5809" y1="74.6307" x2="27.7982" y2="106.635" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF9F2F"/>
<stop offset="1" stop-color="#FA3C3C"/>
</linearGradient>
<linearGradient id="paint2_linear_1428_3405" x1="54.75" y1="131.25" x2="54.8489" y2="94.125" gradientUnits="userSpaceOnUse">
<stop stop-color="#5B09AD"/>
<stop offset="1" stop-color="#BC1870"/>
</linearGradient>
</defs>
</svg>`)),N0,D5=e=>e,x0=class extends Ce()(ye){render(){return X(N0||(N0=D5`<div>
<bc-navbar
class="flex w-full"
heading="Get a bitcoin lightning wallet"
></bc-navbar>
<div class="flex flex-col gap-5 w-full my-6 px-8 font-sans text-sm">
<div class="flex flex-row justify-center items-center space-x-4">
<div class="w-20 h-20 flex items-center justify-center">
<div
class="p-2 bg-black drop-shadow rounded-xl flex items-center justify-center"
>
${0}
</div>
</div>
<p class="flex-1 text-sm ${0}">
To get the best self-custodial bitcoin lightning wallet that can
connect to apps, try
<a
href="https://albyhub.com"
target="_blank"
class="no-underline font-bold ${0} ${0}"
>Alby Hub</a
>.
</p>
</div>
<div class="flex flex-row items-center space-x-4">
<div class="w-20 h-20">${0}</div>
<p class="flex-1 text-sm ${0}">
For a quick setup of a custodial wallet, you can choose between
<a
href="https://rizful.com"
target="_blank"
class="no-underline font-bold ${0} ${0}"
>Rizful</a
>
and
<a
href="https://coinos.io"
target="_blank"
class="no-underline font-bold ${0} ${0}"
>Coinos</a
>.
</p>
</div>
</div>
</div>`),Vh,de,qe,Pe,M5,de,qe,Pe,qe,Pe)}};x0=ee([pe("bc-new-wallet")],x0);var R0,B5=e=>e,ps=class extends Ce()(ye){constructor(){super(...arguments),this._nwcUrl=""}render(){return X(R0||(R0=B5`<div class="w-full">
<bc-navbar class="flex w-full" heading="LN Link"> </bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-2 ${0}">
1. Add a new
<a
href="https://github.com/lnfi-network/ln-node/tree/main/LNLink"
target="_blank"
class="font-bold"
>Wallet Connection
</a>
from
<span class="${0}"
>LN Node => Generate NWC</span
>
and copy the Connection Secret.
</div>
<div class="mb-1 ${0}">
2. Paste the Connection Secret below:
</div>
<input
value=${0}
@change=${0}
placeholder="nostr+walletconnect://..."
type="password"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>`),de,At,de,this._nwcUrl,this.nwcUrlChanged,bn,It,this.onConnect)}nwcUrlChanged(e){this._nwcUrl=e.target.value}async onConnect(){this._nwcUrl?await ne.getState().connect({nwcUrl:this._nwcUrl,connectorName:la,connectorType:"nwc.generic"}):ne.getState().setError("Please enter a URL")}};ee([ge()],ps.prototype,"_nwcUrl",void 0),ps=ee([pe("bc-lnfi")],ps);var I0,F5=e=>e,P0=class extends Ce()(ye){connectedCallback(){super.connectedCallback(),this._timeout=setTimeout(()=>{No(),ne.setState({route:"/start"})},3e3)}disconnectedCallback(){super.disconnectedCallback(),this._timeout&&clearTimeout(this._timeout)}render(){return X(I0||(I0=F5`<div
class="flex flex-col justify-center items-center w-full mt-8 ${0}"
>
<p class="font-bold">Connected!</p>
${0}
</div>`),Pe,zh)}};P0=ee([pe("bc-connected")],P0);var k0,L0,U0=e=>e,uo=class extends Ce()(ye){constructor(){super(),this._hasCopiedAuthString=!1,this.initAlbyGo()}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._unsub)==null||e.call(this)}render(){return X(k0||(k0=U0`<div class="w-full">
<bc-navbar class="flex w-full" heading="Connect Flash Wallet"></bc-navbar>
<div class="font-sans text-sm w-full">
<div
class="px-8 pt-4 w-full flex flex-col items-center justify-center gap-4"
>
<div class="mb-2 text-center ${0}">
Scan with your camera, or by clicking "Send" in the Flash Wallet
</div>
<div class="flex justify-center items-center">
${0}
<p class="${0}">Waiting for connection</p>
</div>
${0}
<bci-button
@click=${0}
class="
flex gap-1 w-full
mt-4
${0} ${0} font-semibold text-xs"
>
${0}
${0}
</bci-button>
</div>
<div class="flex flex-col items-center w-full font-sans text-sm">
<h1 class="mt-8 ${0} text-center">
Don't have the Flash Wallet app?
<a
class="no-underline font-bold ${0} ${0}"
href="https://paywithflash.com/wallet" target="_blank"
>Download one here</a>
</h1>
</div>
</div>
</div>
</div>`),de,wn(`w-7 h-7 ${de}`),de,this.renderQR(),this._copyAuthString,Pe,qe,this._hasCopiedAuthString?ha:fa,this._hasCopiedAuthString?"Copied!":"Copy",mr,qe,Pe)}renderQR(){if(!this._authString)return null;let e=this._authString;return setTimeout(()=>{var t;let r=(t=this.shadowRoot)==null?void 0:t.getElementById("qr");if(!r)return void console.error("qr canvas not found");let n=r.getContext("2d");if(!n)return void console.error("could not get context for qr canvas");let i=(0,To.default)(0,"L");i.addData(e),i.make();let a=i.getModuleCount();r.width=4*a,r.height=4*a,i.renderTo2dContext(n,4)},100),X(L0||(L0=U0`
<!-- add margin only on dark mode because on dark mode the qr has a white border -->
<canvas id="qr" class="dark:bg-white dark:p-4"></canvas>
`))}_copyAuthString(){this._authString&&(navigator.clipboard.writeText(this._authString),this._hasCopiedAuthString=!0,setTimeout(()=>{this._hasCopiedAuthString=!1},2e3))}async initAlbyGo(){try{var e;let t=(e=ne.getState().bitcoinConnectConfig.providerConfig)==null||(e=e.nwc)==null?void 0:e.authorizationUrlOptions,r=t?.expiresAt,n=t?.requestMethods;n||(n=["get_info","get_balance","get_budget","pay_invoice","list_transactions","lookup_invoice","make_invoice"]);let i=new Yn({name:this._appName,icon:this._appIcon,relayUrls:["wss://nwclay.paywithflash.com"],requestMethods:n,notificationTypes:t?.notificationTypes,maxAmount:t?.maxAmount,budgetRenewal:t?.budgetRenewal,expiresAt:r?Math.floor(r.getTime()/1e3):void 0,isolated:t?.isolated,metadata:t?.metadata,returnTo:t?.returnTo});this._authString=i.connectionUri,window.location.href=this._authString;let{unsub:a}=await i.subscribe({onSuccess:async function(f){f.close(),ne.getState().connect({nwcUrl:f.nostrWalletConnectUrl,connectorName:"Flash Wallet",connectorType:"nwc.flash"})}});this._unsub=a}catch(t){console.error(t),alert(""+t)}}};ee([ge()],uo.prototype,"_authString",void 0),ee([ge()],uo.prototype,"_hasCopiedAuthString",void 0),uo=ee([pe("bc-flash-wallet")],uo);var M0,D0,j5=e=>e,ys=class extends Ce()(ye){constructor(){super(...arguments),this._nwcUrl=""}render(){return X(M0||(M0=j5`<div class="w-full">
<bc-navbar
class="flex w-full"
heading=${0}
></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-2 ${0}">
1. In LNBits, go to Plugins and enable the NWC plugin.
</div>
<div class="mb-1 ${0}">
2. Create a new connection and update the relay from "nostrclient"
to <span class="font-semibold">wss://relay.getalby.com/v1</span>,
then copy the connection secret.
</div>
<div class="mb-1 ${0}">
3. Paste the Connection Secret below.
</div>
<div class="px-8 pt-4 w-full">
<div class="mb-1 ${0}">
Enter your
<a
href="https://nwc.getalby.com/about"
target="_blank"
class="font-bold"
>Connection Secret
</a>
below
</div>
<input
value=${0}
@change=${0}
placeholder="nostr+walletconnect://..."
type="password"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>
</div>`),zs,de,de,de,de,this._nwcUrl,this.nwcUrlChanged,bn,It,this.onConnect)}nwcUrlChanged(e){this._nwcUrl=e.target.value}async onConnect(){this._nwcUrl?await ne.getState().connect({nwcUrl:this._nwcUrl,connectorName:zs,connectorType:"nwc.lnbits"}):ne.getState().setError("Please enter a URL")}};ee([ge()],ys.prototype,"_nwcUrl",void 0),ys=ee([pe("bc-lnbits-nwc")],ys);var H5=Ee(D0||(D0=(e=>e)`<svg class="w-20 h-20" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="17.2816" height="20" fill="url(#pattern0_6321_527)"/>
<defs>
<pattern id="pattern0_6321_527" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_6321_527" transform="matrix(0.00248348 0 0 0.00214592 0.1 0.05)"/>
</pattern>
<image id="image0_6321_527" width="404" height="404" xlink:href="data:image/png;base64,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"/>
</defs>
</svg>
`)),Js="Cashu.me",B0=class extends st{constructor(){super("nwc.cashume",Js,"#7f38ca",H5)}async _onClick(){ne.getState().pushRoute("/cashu-me")}};B0=ee([pe("bc-cashu-me-connector")],B0);var F0,$5=e=>e,gs=class extends Ce()(ye){constructor(){super(...arguments),this._nwcUrl=""}render(){return X(F0||(F0=$5`<div class="w-full">
<bc-navbar
class="flex w-full"
heading=${0}
></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-2 ${0}">
1. Open
<a href="https://wallet.cashu.me" target="_blank" class="font-bold"
>Cashu.me
</a>
, click on the <span class="font-semibold">hamburger menu</span> on
the top left, then click
<span class="font-semibold">Settings</span>. Scroll down to
<span class="font-semibold">Nostr Wallet Connect</span>
and enable NWC, and then press the copy button.
</div>
<div class="mb-1 ${0}">
2. Keep the Cashu.me browser tab open while using Bitcoin Connect.
</div>
<div class="mb-1 ${0}">
3. Paste the Connection Secret below:
</div>
<div class="px-8 pt-4 w-full">
<div class="mb-1 ${0}">
Enter your
<a
href="https://nwc.getalby.com/about"
target="_blank"
class="font-bold"
>Connection Secret
</a>
below
</div>
<input
value=${0}
@change=${0}
placeholder="nostr+walletconnect://..."
type="password"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>
</div>`),Js,de,de,de,de,this._nwcUrl,this.nwcUrlChanged,bn,It,this.onConnect)}nwcUrlChanged(e){this._nwcUrl=e.target.value}async onConnect(){this._nwcUrl?await ne.getState().connect({nwcUrl:this._nwcUrl,connectorName:Js,connectorType:"nwc.cashume"}):ne.getState().setError("Please enter a URL")}};ee([ge()],gs.prototype,"_nwcUrl",void 0),gs=ee([pe("bc-cashu-me")],gs);var j0,G5=e=>e,bs=class extends Ce()(ye){constructor(){super(...arguments),this._nwcUrl=""}render(){return X(j0||(j0=G5`<div class="w-full">
<bc-navbar
class="flex w-full"
heading=${0}
></bc-navbar>
<div class="font-sans text-sm w-full">
<div class="px-8 pt-4 w-full">
<div class="mb-2 ${0}">
1. Open
<a href="https://rizful.com/w" target="_blank" class="font-bold"
>Rizful Wallet
</a>
</div>
<div class="mb-2 ${0}">
2. Click on
<span class="semibold"
>Hamburger Menu -> NWC -> Get NWC codes -> New Connection</span
>. Then click <span class="semibold">Get Connection Code</span> and
click
<span class="semibold">Copy Connection Code</span>
</div>
<div class="mb-1 ${0}">
3. Paste the Connection Secret below:
</div>
<div class="px-8 pt-4 w-full">
<div class="mb-1 ${0}">
Enter your
<a
href="https://nwc.getalby.com/about"
target="_blank"
class="font-bold"
>Connection Secret
</a>
below
</div>
<input
value=${0}
@change=${0}
placeholder="nostr+walletconnect://..."
type="password"
class="w-full mb-8 rounded-lg p-2 border-1 bg-transparent ${0} ${0}"
/>
<bci-button variant="primary" @click=${0}>
Connect
</bci-button>
</div>
</div>
</div>
</div>`),Qs,de,de,de,de,this._nwcUrl,this.nwcUrlChanged,bn,It,this.onConnect)}nwcUrlChanged(e){this._nwcUrl=e.target.value}async onConnect(){this._nwcUrl?await ne.getState().connect({nwcUrl:this._nwcUrl,connectorName:Qs,connectorType:"nwc.rizful"}):ne.getState().setError("Please enter a URL")}};ee([ge()],bs.prototype,"_nwcUrl",void 0),bs=ee([pe("bc-rizful")],bs);var H0,$0,G0,W0,K0,V0,Z0,Y0,q0,z0,Q0,J0,X0,it=e=>e,W5={"/start":X(H0||(H0=it`<bc-start class="flex w-full"></bc-start>`)),"/help":X($0||($0=it`<bc-help class="flex w-full"></bc-help>`)),"/nwc":X(G0||(G0=it`<bc-nwc class="flex w-full"></bc-nwc>`)),"/lnfi":X(W0||(W0=it`<bc-lnfi class="flex w-full"></bc-lnfi>`)),"/alby-hub":X(K0||(K0=it`<bc-alby-hub class="flex w-full"></bc-alby-hub>`)),"/alby-go":X(V0||(V0=it`<bc-alby-go class="flex w-full"></bc-alby-go>`)),"/lnbits":X(Z0||(Z0=it`<bc-lnbits class="flex w-full"></bc-lnbits>`)),"/lnbits-nwc":X(Y0||(Y0=it`<bc-lnbits-nwc class="flex w-full"></bc-lnbits-nwc>`)),"/flash-wallet":X(q0||(q0=it`<bc-flash-wallet
class="flex w-full"
></bc-flash-wallet>`)),"/cashu-me":X(z0||(z0=it`<bc-cashu-me class="flex w-full"></bc-cashu-me>`)),"/rizful":X(Q0||(Q0=it`<bc-rizful class="flex w-full"></bc-rizful>`)),"/new-wallet":X(J0||(J0=it`<bc-new-wallet class="flex w-full"></bc-new-wallet>`)),"/connected":X(X0||(X0=it`<bc-connected class="flex w-full"></bc-connected>`))},eh,th,K5=e=>e,nh=class extends Ce()(ye){render(){return X(eh||(eh=K5`<div class="flex flex-col w-full">${0}</div>`),W5[this._route])}};nh=ee([pe("bc-router-outlet")],nh);var V5=Ee(th||(th=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.6665 7.16699L12.4998 12.0003M12.4998 12.0003L17.3332 16.8337M12.4998 12.0003L17.3332 7.16699M12.4998 12.0003L7.6665 16.8337" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
</svg>`)),rh,Z5=Ee(rh||(rh=(e=>e)`<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.665 18.33C13.5404 18.3311 14.4074 18.1592 15.2162 17.8242C16.025 17.4892 16.7596 16.9977 17.3778 16.3778C17.9977 15.7596 18.4892 15.025 18.8242 14.2162C19.1592 13.4074 19.3311 12.5404 19.33 11.665C19.3311 10.7896 19.1592 9.92256 18.8242 9.11378C18.4892 8.305 17.9976 7.5704 17.3778 6.95218C16.7596 6.33235 16.025 5.84079 15.2162 5.50577C14.4074 5.17075 13.5404 4.99887 12.665 5.00001C11.7896 4.99889 10.9226 5.17078 10.1138 5.5058C9.305 5.84082 8.5704 6.33236 7.95218 6.95218C7.33236 7.5704 6.84082 8.305 6.5058 9.11378C6.17078 9.92256 5.99889 10.7896 6.00001 11.665C5.99887 12.5404 6.17075 13.4074 6.50577 14.2162C6.84079 15.025 7.33235 15.7596 7.95218 16.3778C8.5704 16.9976 9.305 17.4892 10.1138 17.8242C10.9226 18.1592 11.7896 18.3311 12.665 18.33Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/>
<path d="M12.6649 12.9149V11.9152C12.9615 11.9152 13.2515 11.8272 13.4981 11.6625C13.7447 11.4977 13.9369 11.2635 14.0504 10.9895C14.1639 10.7155 14.1936 10.4139 14.1357 10.123C14.0779 9.83215 13.935 9.56495 13.7253 9.35523C13.5156 9.14551 13.2484 9.00269 12.9575 8.94483C12.6666 8.88697 12.3651 8.91667 12.091 9.03017C11.817 9.14366 11.5828 9.33587 11.418 9.58247C11.2532 9.82908 11.1653 10.119 11.1653 10.4156" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6653 15.7497C12.8642 15.7497 13.055 15.6707 13.1956 15.5301C13.3363 15.3895 13.4153 15.1987 13.4153 14.9999C13.4153 14.801 13.3363 14.6103 13.1956 14.4696C13.055 14.329 12.8642 14.25 12.6653 14.25C12.4664 14.25 12.2756 14.329 12.135 14.4696C11.9943 14.6103 11.9153 14.801 11.9153 14.9999C11.9153 15.1987 11.9943 15.3895 12.135 15.5301C12.2756 15.6707 12.4664 15.7497 12.6653 15.7497Z" fill="currentColor"/>
</svg>
`)),oh,ih,sh,ws=e=>e,ho=class extends Ce()(ye){render(){return X(oh||(oh=ws`<div
class="flex justify-center items-center gap-2 w-full relative"
>
<div
class="absolute right-0 h-full flex items-center justify-center gap-2"
>
${0}
${0}
</div>
<div class="flex items-center justify-center">
<slot></slot>
</div>
</div>`),this.showHelp?X(ih||(ih=ws`<button
class="${0} ${0}"
aria-label="Show help"
@click=${0}
>
${0}
</button>`),qe,At,()=>ne.getState().pushRoute("/help"),Z5):null,this.closable?X(sh||(sh=ws`<button
class="${0} ${0}"
aria-label="Close modal"
@click=${0}
>
${0}
</button>`),qe,At,this._handleClose,V5):null)}_handleClose(){this.dispatchEvent(new Event("onclose",{bubbles:!0,composed:!0}))}};ee([Ue({type:Boolean})],ho.prototype,"closable",void 0),ee([Ue({type:Boolean,attribute:"show-help"})],ho.prototype,"showHelp",void 0),ho=ee([pe("bc-modal-header")],ho);var ah,Y5=e=>e,ch=class extends Ce()(ye){constructor(){super(...arguments),this._handleClose=()=>{No()}}render(){return X(ah||(ah=Y5` <div
class="fixed top-0 left-0 w-full h-full flex justify-center items-end sm:items-center z-[21000]"
>
<div
class="absolute top-0 left-0 w-full h-full -z-10 bg-black animate-darken"
@click=${0}
></div>
<div
class="transition-all p-4 pt-6 pb-8 rounded-2xl shadow-2xl flex flex-col w-full bg-white dark:bg-black max-w-md max-sm:rounded-b-none
animate-fade-in max-sm:animate-slide-up max-h-[90vh] overflow-y-auto"
>
<slot @onclose=${0}></slot>
</div>
</div>`),this._handleClose,this._handleClose)}};ch=ee([pe("bc-modal")],ch);var lh,uh,q5=e=>e,hh=class extends Ce()(Xt){render(){return X(lh||(lh=q5`
<div class="flex flex-col items-center justify-center w-full">
${0}
<p class="text-center font-sans ${0}">
Connecting to wallet...
</p>
${0}
</div>
`),wn(`w-20 h-20 ${At} mb-4`),de,ua(void 0))}};hh=ee([pe("bci-connecting")],hh);var z5=Ee(uh||(uh=(e=>e)`<svg width="116" height="14" viewBox="0 0 116 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.88623 4.23009C7.4526 4.23009 7.94227 4.33038 8.35525 4.53097C8.76823 4.73156 9.11041 5.00295 9.3818 5.34513C9.65319 5.68732 9.85378 6.0885 9.98357 6.54867C10.1134 7.00885 10.1783 7.50443 10.1783 8.0354C10.1783 8.84956 10.0249 9.62242 9.71809 10.354C9.4231 11.0737 9.01602 11.705 8.49685 12.2478C7.97767 12.7788 7.3641 13.2035 6.65614 13.5221C5.94817 13.8289 5.18121 13.9823 4.35525 13.9823C4.24905 13.9823 4.06026 13.9764 3.78888 13.9646C3.52929 13.9646 3.2284 13.941 2.88622 13.8938C2.54404 13.8466 2.17826 13.7758 1.78888 13.6814C1.41129 13.587 1.05141 13.4572 0.709229 13.292L3.77118 0.424778L6.51454 0L5.4172 4.56637C5.65318 4.46018 5.88917 4.37758 6.12516 4.31858C6.36115 4.25959 6.61484 4.23009 6.88623 4.23009ZM4.58534 11.8053C4.99832 11.8053 5.3877 11.705 5.75348 11.5044C6.11926 11.3038 6.43195 11.0384 6.69153 10.708C6.96292 10.3658 7.17531 9.9823 7.3287 9.55752C7.4821 9.13274 7.55879 8.69027 7.55879 8.23009C7.55879 7.66372 7.4644 7.22124 7.27561 6.90266C7.08681 6.58407 6.73873 6.42478 6.23136 6.42478C6.06616 6.42478 5.84788 6.45428 5.57649 6.51328C5.3169 6.57227 5.08091 6.69617 4.86852 6.88496L3.70038 11.7345C3.77118 11.7463 3.83018 11.7581 3.87737 11.7699C3.93637 11.7817 3.99537 11.7935 4.05436 11.8053C4.11336 11.8053 4.18416 11.8053 4.26675 11.8053C4.34935 11.8053 4.45554 11.8053 4.58534 11.8053Z" fill="currentColor"/>
<path d="M13.1552 13.7345H10.5357L12.7481 4.42478H15.3853L13.1552 13.7345ZM14.4295 3.29204C14.0637 3.29204 13.7333 3.18584 13.4384 2.97345C13.1434 2.74926 12.9959 2.41298 12.9959 1.9646C12.9959 1.71681 13.0431 1.48673 13.1375 1.27434C13.2437 1.05015 13.3794 0.861357 13.5446 0.707964C13.7097 0.542772 13.8985 0.412979 14.1109 0.318584C14.3351 0.224189 14.5711 0.176991 14.8189 0.176991C15.1847 0.176991 15.5151 0.289086 15.81 0.513274C16.105 0.725664 16.2525 1.05605 16.2525 1.50442C16.2525 1.75221 16.1994 1.9882 16.0932 2.21239C15.9988 2.42478 15.869 2.61357 15.7038 2.77876C15.5387 2.93215 15.344 3.05605 15.1198 3.15044C14.9074 3.24484 14.6773 3.29204 14.4295 3.29204Z" fill="currentColor"/>
<path d="M17.7251 2.1062L20.4685 1.68142L19.7959 4.42478H22.734L22.203 6.58407H19.2827L18.5039 9.84071C18.4331 10.1121 18.3859 10.3658 18.3623 10.6018C18.3505 10.8378 18.38 11.0443 18.4508 11.2212C18.5334 11.3864 18.6691 11.5162 18.8579 11.6106C19.0467 11.705 19.3063 11.7522 19.6367 11.7522C19.9198 11.7522 20.1912 11.7286 20.4508 11.6814C20.7222 11.6224 20.9936 11.5457 21.265 11.4513L21.4597 13.469C21.1057 13.5988 20.7222 13.7109 20.3092 13.8053C19.8962 13.8997 19.4066 13.9469 18.8402 13.9469C18.026 13.9469 17.3948 13.8289 16.9464 13.5929C16.498 13.3451 16.1794 13.0148 15.9906 12.6018C15.8018 12.177 15.7192 11.6932 15.7428 11.1504C15.7664 10.6077 15.849 10.0354 15.9906 9.43363L17.7251 2.1062Z" fill="currentColor"/>
<path d="M22.475 10.0177C22.475 9.21534 22.6048 8.46018 22.8644 7.75221C23.124 7.04425 23.4957 6.42478 23.9794 5.89381C24.4632 5.36283 25.0473 4.94395 25.7316 4.63717C26.4278 4.33038 27.2007 4.17699 28.0502 4.17699C28.5812 4.17699 29.0532 4.23009 29.4662 4.33628C29.8909 4.43068 30.2744 4.56047 30.6166 4.72567L29.7139 6.77876C29.478 6.68437 29.2302 6.60177 28.9706 6.53097C28.7228 6.44838 28.416 6.40708 28.0502 6.40708C27.1653 6.40708 26.4691 6.70797 25.9617 7.30974C25.4544 7.89971 25.2007 8.70797 25.2007 9.73452C25.2007 10.3363 25.3305 10.826 25.5901 11.2035C25.8496 11.5693 26.3275 11.7522 27.0237 11.7522C27.3659 11.7522 27.6963 11.7168 28.0148 11.646C28.3334 11.5752 28.6166 11.4867 28.8644 11.3805L29.0591 13.4867C28.7287 13.6165 28.3629 13.7286 27.9617 13.823C27.5724 13.9292 27.0945 13.9823 26.5281 13.9823C25.7965 13.9823 25.1771 13.8761 24.6697 13.6637C24.1623 13.4513 23.7434 13.1681 23.4131 12.8142C23.0827 12.4484 22.8408 12.0236 22.6874 11.5398C22.5458 11.0561 22.475 10.5487 22.475 10.0177Z" fill="currentColor"/>
<path d="M33.8569 13.9823C33.2316 13.9823 32.6888 13.8879 32.2286 13.6991C31.7684 13.5103 31.385 13.2448 31.0782 12.9027C30.7832 12.5605 30.559 12.1593 30.4056 11.6991C30.2522 11.2271 30.1755 10.708 30.1755 10.1416C30.1755 9.43363 30.2876 8.72567 30.5118 8.0177C30.7478 7.30974 31.09 6.67257 31.5383 6.1062C31.9867 5.53982 32.5354 5.07965 33.1844 4.72567C33.8333 4.35988 34.5767 4.17699 35.4145 4.17699C36.028 4.17699 36.5649 4.27139 37.0251 4.46018C37.4971 4.64897 37.8805 4.91445 38.1755 5.25664C38.4823 5.59882 38.7124 6.0059 38.8658 6.47788C39.0192 6.93805 39.0959 7.45133 39.0959 8.0177C39.0959 8.72567 38.9838 9.43363 38.7596 10.1416C38.5354 10.8496 38.205 11.4867 37.7684 12.0531C37.3319 12.6195 36.7832 13.0855 36.1224 13.4513C35.4735 13.8053 34.7183 13.9823 33.8569 13.9823ZM35.1667 6.40708C34.7773 6.40708 34.4351 6.51918 34.1401 6.74336C33.8451 6.96755 33.5973 7.25074 33.3968 7.59292C33.1962 7.9351 33.0428 8.31269 32.9366 8.72567C32.8422 9.12685 32.795 9.51033 32.795 9.87611C32.795 10.4779 32.8894 10.944 33.0782 11.2743C33.267 11.5929 33.6091 11.7522 34.1047 11.7522C34.4941 11.7522 34.8363 11.6401 35.1313 11.4159C35.4263 11.1917 35.674 10.9086 35.8746 10.5664C36.0752 10.2242 36.2227 9.85251 36.3171 9.45133C36.4233 9.03835 36.4764 8.64897 36.4764 8.28319C36.4764 7.68142 36.382 7.22124 36.1932 6.90266C36.0044 6.57227 35.6622 6.40708 35.1667 6.40708Z" fill="currentColor"/>
<path d="M42.0732 13.7345H39.4537L41.6661 4.42478H44.3033L42.0732 13.7345ZM43.3475 3.29204C42.9818 3.29204 42.6514 3.18584 42.3564 2.97345C42.0614 2.74926 41.9139 2.41298 41.9139 1.9646C41.9139 1.71681 41.9611 1.48673 42.0555 1.27434C42.1617 1.05015 42.2974 0.861357 42.4626 0.707964C42.6278 0.542772 42.8166 0.412979 43.0289 0.318584C43.2531 0.224189 43.4891 0.176991 43.7369 0.176991C44.1027 0.176991 44.4331 0.289086 44.7281 0.513274C45.0231 0.725664 45.1705 1.05605 45.1705 1.50442C45.1705 1.75221 45.1174 1.9882 45.0113 2.21239C44.9169 2.42478 44.7871 2.61357 44.6219 2.77876C44.4567 2.93215 44.262 3.05605 44.0378 3.15044C43.8254 3.24484 43.5953 3.29204 43.3475 3.29204Z" fill="currentColor"/>
<path d="M46.2538 4.84956C46.4544 4.79056 46.6727 4.72566 46.9087 4.65487C47.1564 4.57227 47.4278 4.50148 47.7228 4.44248C48.0296 4.37168 48.3659 4.31859 48.7317 4.28319C49.1092 4.23599 49.534 4.21239 50.006 4.21239C51.3983 4.21239 52.3541 4.61357 52.8733 5.41593C53.3924 6.21829 53.4809 7.31564 53.1387 8.70797L51.9352 13.7345H49.298L50.4662 8.81416C50.537 8.50738 50.5901 8.21239 50.6255 7.92921C50.6727 7.63422 50.6727 7.38053 50.6255 7.16814C50.5783 6.94395 50.4662 6.76696 50.2892 6.63717C50.124 6.49558 49.8644 6.42478 49.5104 6.42478C49.1682 6.42478 48.8202 6.46018 48.4662 6.53097L46.7494 13.7345H44.1122L46.2538 4.84956Z" fill="currentColor"/>
<path d="M59.411 14C58.6441 14 57.9656 13.8879 57.3756 13.6637C56.7974 13.4395 56.3137 13.1209 55.9243 12.708C55.5349 12.295 55.2399 11.7994 55.0393 11.2212C54.8505 10.6313 54.7561 9.9705 54.7561 9.23894C54.7561 8.17699 54.9213 7.16224 55.2517 6.19469C55.5939 5.22714 56.0718 4.37168 56.6853 3.62832C57.3107 2.88496 58.06 2.29499 58.9331 1.85841C59.8063 1.41003 60.7798 1.18584 61.8535 1.18584C62.7739 1.18584 63.5054 1.28024 64.0482 1.46903C64.6028 1.65782 64.998 1.83481 65.234 2L64.5261 3.41593C64.2547 3.23894 63.883 3.07375 63.411 2.92035C62.9508 2.75516 62.4022 2.67257 61.765 2.67257C60.9508 2.67257 60.2193 2.86726 59.5703 3.25664C58.9213 3.63422 58.3727 4.1298 57.9243 4.74336C57.4759 5.34513 57.1337 6.0295 56.8977 6.79646C56.6617 7.55162 56.5438 8.30089 56.5438 9.04425C56.5438 11.3451 57.5408 12.4956 59.5349 12.4956C59.9597 12.4956 60.3373 12.4661 60.6677 12.4071C61.0098 12.3481 61.3107 12.2832 61.5703 12.2124C61.8299 12.1298 62.06 12.0413 62.2606 11.9469C62.4612 11.8525 62.6382 11.7699 62.7915 11.6991L63.0039 13.1858C62.8623 13.2684 62.6736 13.3569 62.4376 13.4513C62.2134 13.5457 61.9479 13.6342 61.6411 13.7168C61.3343 13.7994 60.9921 13.8643 60.6146 13.9115C60.237 13.9705 59.8358 14 59.411 14Z" fill="currentColor"/>
<path d="M67.2379 13.9646C66.2703 13.9646 65.5093 13.6814 64.9547 13.115C64.4119 12.5369 64.1406 11.7463 64.1406 10.7434C64.1406 10.059 64.235 9.33924 64.4237 8.58407C64.6243 7.82891 64.937 7.13274 65.3618 6.49558C65.7866 5.85841 66.3352 5.33333 67.0078 4.92035C67.6804 4.50737 68.4945 4.30089 69.4503 4.30089C70.4178 4.30089 71.173 4.58997 71.7158 5.16814C72.2704 5.73451 72.5476 6.51918 72.5476 7.52213C72.5476 8.20649 72.4473 8.92626 72.2468 9.68142C72.058 10.4366 71.7512 11.1327 71.3264 11.7699C70.9016 12.4071 70.353 12.9322 69.6804 13.3451C69.0078 13.7581 68.1937 13.9646 67.2379 13.9646ZM67.5211 12.5664C68.0521 12.5664 68.524 12.413 68.937 12.1062C69.3618 11.7994 69.7158 11.41 69.999 10.9381C70.294 10.4543 70.5181 9.92331 70.6715 9.34513C70.8249 8.76696 70.9016 8.20649 70.9016 7.66372C70.9016 7.06195 70.7718 6.58407 70.5122 6.23009C70.2527 5.87611 69.8043 5.69912 69.1671 5.69912C68.6361 5.69912 68.1583 5.85251 67.7335 6.15929C67.3205 6.46608 66.9665 6.86136 66.6715 7.34513C66.3883 7.81711 66.1701 8.34219 66.0167 8.92036C65.8633 9.49853 65.7866 10.059 65.7866 10.6018C65.7866 11.2035 65.9164 11.6814 66.176 12.0354C66.4355 12.3894 66.8839 12.5664 67.5211 12.5664Z" fill="currentColor"/>
<path d="M74.8253 13.7345H73.1793L75.3032 4.88496C75.8459 4.71977 76.43 4.58997 77.0554 4.49558C77.6926 4.38938 78.2589 4.33628 78.7545 4.33628C79.2855 4.33628 79.7398 4.41298 80.1173 4.56637C80.5067 4.70796 80.8194 4.90856 81.0554 5.16814C81.2914 5.41593 81.4625 5.72271 81.5687 6.0885C81.6867 6.44248 81.7457 6.83186 81.7457 7.25664C81.7457 7.52803 81.7221 7.81711 81.6749 8.1239C81.6277 8.41888 81.5687 8.71977 81.4979 9.02655L80.3651 13.7345H78.7191L79.7634 9.38053C79.8459 9.05015 79.9226 8.71387 79.9934 8.37168C80.076 8.0295 80.1173 7.70502 80.1173 7.39823C80.1173 6.92626 79.9875 6.53687 79.728 6.23009C79.4684 5.91151 78.9846 5.75221 78.2766 5.75221C77.9816 5.75221 77.6926 5.76991 77.4094 5.80531C77.1262 5.84071 76.8902 5.88791 76.7014 5.9469L74.8253 13.7345Z" fill="currentColor"/>
<path d="M84.2197 13.7345H82.5736L84.6975 4.88496C85.2403 4.71977 85.8244 4.58997 86.4498 4.49558C87.0869 4.38938 87.6533 4.33628 88.1489 4.33628C88.6798 4.33628 89.1341 4.41298 89.5117 4.56637C89.9011 4.70796 90.2138 4.90856 90.4498 5.16814C90.6857 5.41593 90.8568 5.72271 90.963 6.0885C91.081 6.44248 91.14 6.83186 91.14 7.25664C91.14 7.52803 91.1164 7.81711 91.0692 8.1239C91.022 8.41888 90.963 8.71977 90.8922 9.02655L89.7595 13.7345H88.1135L89.1577 9.38053C89.2403 9.05015 89.317 8.71387 89.3878 8.37168C89.4704 8.0295 89.5117 7.70502 89.5117 7.39823C89.5117 6.92626 89.3819 6.53687 89.1223 6.23009C88.8627 5.91151 88.379 5.75221 87.671 5.75221C87.376 5.75221 87.0869 5.76991 86.8037 5.80531C86.5206 5.84071 86.2846 5.88791 86.0958 5.9469L84.2197 13.7345Z" fill="currentColor"/>
<path d="M94.2335 8.90266C94.9179 8.87906 95.5432 8.83776 96.1096 8.77876C96.676 8.70797 97.1656 8.59587 97.5786 8.44248C97.9916 8.27729 98.3102 8.059 98.5344 7.78761C98.7704 7.51623 98.8884 7.16224 98.8884 6.72567C98.8884 6.61947 98.8648 6.50738 98.8176 6.38938C98.7822 6.27139 98.7114 6.16519 98.6052 6.0708C98.5108 5.9646 98.3751 5.88201 98.1981 5.82301C98.0211 5.75221 97.8028 5.71682 97.5432 5.71682C97.1302 5.71682 96.7409 5.80531 96.3751 5.9823C96.0211 6.15929 95.7025 6.39528 95.4193 6.69027C95.1361 6.97345 94.8943 7.30974 94.6937 7.69912C94.4931 8.0767 94.3397 8.47788 94.2335 8.90266ZM95.9149 13.9646C95.3131 13.9646 94.794 13.882 94.3574 13.7168C93.9208 13.5398 93.555 13.3038 93.26 13.0089C92.9651 12.7021 92.7468 12.3481 92.6052 11.9469C92.4636 11.5457 92.3928 11.1209 92.3928 10.6726C92.3928 9.84661 92.5167 9.05015 92.7645 8.28319C93.0123 7.51623 93.3662 6.83776 93.8264 6.24779C94.2866 5.65782 94.8471 5.19174 95.5078 4.84956C96.1686 4.49558 96.9179 4.31858 97.7556 4.31858C98.2394 4.31858 98.6524 4.38348 98.9946 4.51328C99.3485 4.63127 99.6317 4.79646 99.8441 5.00885C100.068 5.22124 100.234 5.46903 100.34 5.75221C100.446 6.0236 100.499 6.30679 100.499 6.60177C100.499 7.15634 100.399 7.62832 100.198 8.0177C99.9975 8.39528 99.732 8.71387 99.4016 8.97345C99.0713 9.23304 98.6819 9.43363 98.2335 9.57522C97.7969 9.71682 97.3367 9.82891 96.853 9.91151C96.381 9.9941 95.8972 10.0531 95.4016 10.0885C94.9179 10.1121 94.4577 10.1357 94.0211 10.1593C94.0093 10.2537 94.0034 10.3304 94.0034 10.3894C94.0034 10.4484 94.0034 10.4956 94.0034 10.531C94.0034 10.8024 94.0329 11.0619 94.0919 11.3097C94.1627 11.5457 94.2866 11.7581 94.4636 11.9469C94.6406 12.1239 94.8825 12.2655 95.1892 12.3717C95.5078 12.4779 95.9208 12.531 96.4282 12.531C96.6524 12.531 96.8825 12.5133 97.1185 12.4779C97.3662 12.4307 97.5963 12.3776 97.8087 12.3186C98.0329 12.2478 98.2276 12.1829 98.3928 12.1239C98.5698 12.0531 98.6937 11.9882 98.7645 11.9292L98.9061 13.3274C98.6701 13.4572 98.2866 13.5929 97.7556 13.7345C97.2364 13.8879 96.6229 13.9646 95.9149 13.9646Z" fill="currentColor"/>
<path d="M101.199 10.4425C101.199 9.64012 101.317 8.86726 101.553 8.1239C101.801 7.38053 102.161 6.72567 102.633 6.15929C103.105 5.59292 103.683 5.14454 104.368 4.81416C105.052 4.47198 105.837 4.30089 106.722 4.30089C107.111 4.30089 107.483 4.33038 107.837 4.38938C108.191 4.43658 108.527 4.53687 108.846 4.69027L108.226 6.0708C108.037 5.9646 107.813 5.88201 107.553 5.82301C107.306 5.76401 106.981 5.73451 106.58 5.73451C106.002 5.73451 105.483 5.86431 105.022 6.1239C104.562 6.37168 104.167 6.70797 103.837 7.13274C103.518 7.54572 103.27 8.0295 103.093 8.58407C102.928 9.12685 102.846 9.69322 102.846 10.2832C102.846 10.59 102.875 10.8791 102.934 11.1504C103.005 11.4218 103.123 11.6637 103.288 11.8761C103.453 12.0767 103.671 12.236 103.943 12.354C104.226 12.472 104.58 12.531 105.005 12.531C105.217 12.531 105.441 12.5133 105.677 12.4779C105.913 12.4307 106.132 12.3776 106.332 12.3186C106.533 12.2596 106.71 12.2006 106.863 12.1416C107.028 12.0708 107.146 12.0059 107.217 11.9469L107.359 13.3451C107.135 13.4867 106.787 13.6224 106.315 13.7522C105.843 13.8938 105.306 13.9646 104.704 13.9646C104.138 13.9646 103.636 13.882 103.199 13.7168C102.763 13.5398 102.397 13.2979 102.102 12.9912C101.807 12.6726 101.583 12.3009 101.43 11.8761C101.276 11.4395 101.199 10.9617 101.199 10.4425Z" fill="currentColor"/>
<path d="M111.557 13.9823C110.672 13.9823 110.023 13.7876 109.61 13.3982C109.197 13.0089 108.99 12.4425 108.99 11.6991C108.99 11.2153 109.073 10.5959 109.238 9.84071L111.132 1.9646L112.849 1.68142L112.158 4.53097H115.291L114.955 5.91151H111.822L110.849 9.9823C110.707 10.5369 110.636 11.0207 110.636 11.4336C110.636 11.823 110.742 12.1062 110.955 12.2832C111.167 12.4484 111.521 12.531 112.017 12.531C112.359 12.531 112.695 12.4779 113.026 12.3717C113.356 12.2537 113.61 12.1475 113.787 12.0531L113.91 13.4513C113.734 13.5575 113.433 13.6696 113.008 13.7876C112.583 13.9174 112.099 13.9823 111.557 13.9823Z" fill="currentColor"/>
</svg>
`)),fh,Q5=Ee(fh||(fh=(e=>e)`<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.4996 8.6934C13.5646 12.4434 9.76602 14.7256 6.01514 13.7905C2.26579 12.8555 -0.0166852 9.05718 0.918793 5.30739C1.8534 1.55695 5.65197 -0.725474 9.40176 0.209458C13.1524 1.14439 15.4347 4.94318 14.4996 8.6934Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.52902 4.06707C10.5141 4.44605 11.2102 4.99957 11.0511 5.97269C10.9624 6.52101 10.7122 6.8585 10.3665 7.04603C10.236 7.1168 10.2072 7.33609 10.3231 7.42878C10.8196 7.82585 11.0179 8.38842 10.7056 9.24266C10.2505 10.4885 9.22882 10.6202 7.87222 10.3663C7.78904 10.3508 7.70726 10.4014 7.68566 10.4832L7.52414 11.0824C7.46306 11.3138 7.22603 11.4518 6.99467 11.3908C6.76319 11.3298 6.62506 11.0926 6.68618 10.8612L6.84101 10.2875C6.86324 10.2033 6.81295 10.1171 6.72884 10.0946C6.61038 10.0629 6.49041 10.0301 6.36863 9.99598C6.28341 9.9721 6.19494 10.0224 6.17237 10.108L6.01688 10.6851C5.95588 10.9163 5.71897 11.0543 5.48775 10.9932C5.25664 10.9322 5.11869 10.6955 5.17961 10.4643L5.33952 9.86967C5.36188 9.78479 5.31155 9.69775 5.22691 9.67449C5.1995 9.66696 5.17203 9.6594 5.1445 9.65182L5.1436 9.65157C5.02458 9.6188 4.90431 9.58569 4.78256 9.55341L4.50468 9.47686C4.19755 9.39585 4.03663 9.05848 4.16696 8.76881C4.27134 8.53681 4.52958 8.41694 4.77541 8.48242C4.77988 8.48361 4.7843 8.48479 4.78868 8.48595C4.84757 8.50157 4.84473 8.49023 4.90409 8.4765C5.02494 8.44855 5.08888 8.34885 5.11971 8.2752L5.69957 6.078L5.70108 6.07204L6.11095 4.51802C6.11349 4.5084 6.11518 4.49858 6.11565 4.48865C6.12282 4.33833 6.18991 4.18684 5.97081 4.08327C5.92336 4.06085 5.87669 4.03952 5.82597 4.02603C5.81758 4.0238 5.80892 4.02151 5.80003 4.01918C5.55193 3.954 5.40061 3.7018 5.46597 3.45375C5.53051 3.20887 5.78141 3.06273 6.02626 3.12741L6.51367 3.26409C6.63858 3.29693 6.76622 3.3287 6.89587 3.36037C6.97969 3.38084 7.06441 3.3303 7.08644 3.24687L7.22919 2.722C7.29025 2.49074 7.52721 2.35275 7.75848 2.41376C7.9898 2.47479 8.12784 2.71179 8.0668 2.94311L7.93196 3.43844C7.90985 3.52223 7.96087 3.6078 8.04506 3.62833C8.16859 3.65845 8.29203 3.6889 8.41417 3.72009C8.4966 3.74114 8.58086 3.69207 8.60256 3.60981L8.73588 3.11979C8.79692 2.88839 9.03398 2.75027 9.26539 2.81129C9.49683 2.87232 9.63496 3.10941 9.57392 3.34084L9.42905 3.87456C9.40794 3.95461 9.45175 4.03735 9.52902 4.06707ZM7.41985 5.36848L7.53445 4.93355C7.58781 4.73103 7.79524 4.61012 7.99776 4.66348C8.20028 4.71684 8.32119 4.92427 8.26783 5.12679L8.15323 5.56172L8.58812 5.67631C8.79064 5.72967 8.91155 5.9371 8.85819 6.13962C8.80483 6.34214 8.5974 6.46305 8.39488 6.40969L7.95999 6.2951L7.84539 6.73004C7.79203 6.93256 7.5846 7.05348 7.38208 7.00012C7.17956 6.94675 7.05865 6.73932 7.11201 6.53681L7.22661 6.10186L6.79163 5.98725C6.58911 5.93389 6.4682 5.72646 6.52156 5.52394C6.57492 5.32142 6.78235 5.20051 6.98487 5.25387L7.41985 5.36848ZM8.44291 7.37958L8.32831 7.81451L7.89332 7.6999C7.6908 7.64654 7.48337 7.76745 7.43001 7.96997C7.37665 8.17249 7.49757 8.37992 7.70008 8.43328L8.13507 8.54789L8.02046 8.98284C7.9671 9.18536 8.08802 9.39279 8.29054 9.44615C8.49305 9.49951 8.70048 9.37859 8.75385 9.17608L8.86845 8.74113L9.30334 8.85572C9.50585 8.90908 9.71328 8.78817 9.76665 8.58565C9.82001 8.38313 9.69909 8.1757 9.49658 8.12234L9.06169 8.00775L9.17629 7.57282C9.22965 7.3703 9.10873 7.16287 8.90621 7.10951C8.7037 7.05615 8.49627 7.17707 8.44291 7.37958Z" fill="white"/>
</svg>`)),dh,ms,ph,yh,gh,bh,wh,rr=e=>e,vs=(ms=class extends(dh=Ce()(ye)){render(){return X(ph||(ph=rr`<div class="w-full flex-col justify-center items-center">
<bc-modal-header class="flex w-full" show-help ?closable=${0}>
<div class="${0} mr-[2px]">
${0}
</div>
<div class="${0}">${0}</div>
</bc-modal-header>
<div class="flex w-full pt-8">
${0}
</div>
${0}
</div>`),this.closable,Pe,Q5,It,z5,X(this._connecting?yh||(yh=rr`<bci-connecting class="flex w-full"></bci-connecting>`):gh||(gh=rr` <bc-router-outlet class="flex w-full"></bc-router-outlet>`)),this._error?X(bh||(bh=rr`<p class="mt-4 text-center font-sans text-red-500">
${0}
</p>`),this._error):null)}},ms.styles=[...dh.styles,Oo(wh||(wh=rr`
:host {
display: flex;
justify-content: center;
width: 100%;
}
`))],ms);ee([Ue({type:Boolean})],vs.prototype,"closable",void 0),vs=ee([pe("bc-connect")],vs);var mh,Es,vh,Eh,_h,Ch,fo=e=>e,un=(Es=class extends(mh=Ce()(ye)){constructor(){super(),this.paymentMethods="all",this._showConnect=!1,ne.subscribe((e,t)=>{e.connected!==t.connected&&e.connected&&(this._showConnect=!1)})}render(){return this._showConnect&&!this.paid?X(vh||(vh=fo` <bc-connect ?closable=${0}></bc-connect>`),!0):X(Eh||(Eh=fo`<div class="w-full flex-col justify-center items-center">
<bc-modal-header class="flex w-full" ?closable=${0}>
<p
class="font-sans font-medium ${0}"
>
Payment Request
</p>
</bc-modal-header>
<div class="flex flex-col justify-center items-center w-full pt-8">
<bc-send-payment
.invoice=${0}
.paymentMethods=${0}
?paid=${0}
@onclickconnectwallet=${0}
></bc-send-payment>
</div>
${0}
</div>`),this.closable,de,this.invoice,this.paymentMethods,this.paid,this._onClickConnectWallet,this._error?X(_h||(_h=fo`<p class="mt-4 text-center font-sans text-red-500">
${0}
</p>`),this._error):null)}_onClickConnectWallet(){this._showConnect=!0}},Es.styles=[...mh.styles,Oo(Ch||(Ch=fo`
:host {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
`))],Es);ee([Ue({type:Boolean})],un.prototype,"closable",void 0),ee([Ue({type:String})],un.prototype,"invoice",void 0),ee([Ue({type:String,attribute:"payment-methods"})],un.prototype,"paymentMethods",void 0),ee([Ue({type:Boolean})],un.prototype,"paid",void 0),ee([ge()],un.prototype,"_showConnect",void 0),un=ee([pe("bc-payment")],un);export{No as closeModal,i5 as disconnect,s5 as getConnectorConfig,r5 as init,n5 as isConnected,Kh as launchModal,X3 as onConnected,e5 as onDisconnected};
/*! Bundled license information:
@lightninglabs/lnc-web/dist/index.js:
(*! For license information please see index.js.LICENSE.txt *)
@getalby/sdk/dist/esm/index.js:
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
(*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) *)
@getalby/sdk/dist/esm/index.js:
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
@getalby/sdk/dist/esm/index.js:
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
@getalby/lightning-tools/dist/esm/index.js:
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
*/