(self.webpackChunknft_puzzle=self.webpackChunknft_puzzle||[]).push([[179],{255:at=>{function ce(ee){return Promise.resolve().then(()=>{var j=new Error("Cannot find module '"+ee+"'");throw j.code="MODULE_NOT_FOUND",j})}ce.keys=()=>[],ce.resolve=ce,ce.id=255,at.exports=ce},434:(at,ce)=>{"use strict";ce.byteLength=function(De){var $=de(De),le=$[1];return 3*($[0]+le)/4-le},ce.toByteArray=function(De){var $,ke,ne=de(De),le=ne[0],Ae=ne[1],pe=new Pe(function(De,$,ne){return 3*($+ne)/4-ne}(0,le,Ae)),Ee=0,Ue=Ae>0?le-4:le;for(ke=0;ke>16&255,pe[Ee++]=$>>8&255,pe[Ee++]=255&$;return 2===Ae&&($=j[De.charCodeAt(ke)]<<2|j[De.charCodeAt(ke+1)]>>4,pe[Ee++]=255&$),1===Ae&&($=j[De.charCodeAt(ke)]<<10|j[De.charCodeAt(ke+1)]<<4|j[De.charCodeAt(ke+2)]>>2,pe[Ee++]=$>>8&255,pe[Ee++]=255&$),pe},ce.fromByteArray=function(De){for(var $,ne=De.length,le=ne%3,Ae=[],Ee=0,Ue=ne-le;EeUe?Ue:Ee+16383));return 1===le?Ae.push(ee[($=De[ne-1])>>2]+ee[$<<4&63]+"=="):2===le&&Ae.push(ee[($=(De[ne-2]<<8)+De[ne-1])>>10]+ee[$>>4&63]+ee[$<<2&63]+"="),Ae.join("")};for(var ee=[],j=[],Pe="undefined"!=typeof Uint8Array?Uint8Array:Array,B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye=0,M=B.length;ye0)throw new Error("Invalid string. Length must be a multiple of 4");var ne=De.indexOf("=");return-1===ne&&(ne=$),[ne,ne===$?0:4-ne%4]}function he(De){return ee[De>>18&63]+ee[De>>12&63]+ee[De>>6&63]+ee[63&De]}function ve(De,$,ne){for(var Ae=[],pe=$;pe{"use strict";for(var ce="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ee={},j=0;j>25;return(33554431&$)<<5^996825010&-(ne>>0&1)^642813549&-(ne>>1&1)^513874426&-(ne>>2&1)^1027748829&-(ne>>3&1)^705979059&-(ne>>4&1)}function ye($){for(var ne=1,le=0;le<$.length;++le){var Ae=$.charCodeAt(le);if(Ae<33||Ae>126)return"Invalid prefix ("+$+")";ne=B(ne)^Ae>>5}for(ne=B(ne),le=0;le<$.length;++le){var pe=$.charCodeAt(le);ne=B(ne)^31&pe}return ne}function de($,ne){if($.length<8)return $+" too short";if($.length>(ne=ne||90))return"Exceeds length limit";var le=$.toLowerCase(),Ae=$.toUpperCase();if($!==le&&$!==Ae)return"Mixed-case string "+$;var pe=($=le).lastIndexOf("1");if(-1===pe)return"No separator character for "+$;if(0===pe)return"Missing prefix for "+$;var Ee=$.slice(0,pe),Ue=$.slice(pe+1);if(Ue.length<6)return"Data too short";var ke=ye(Ee);if("string"==typeof ke)return ke;for(var Se=[],Bt=0;Bt=Ue.length)&&Se.push(nt)}return 1!==ke?"Invalid checksum for "+$:{prefix:Ee,words:Se}}function Le($,ne,le,Ae){for(var pe=0,Ee=0,Ue=(1<=le;)ke.push(pe>>(Ee-=le)&Ue);if(Ae)Ee>0&&ke.push(pe<=ne)return"Excess padding";if(pe<(le=le||90))throw new TypeError("Exceeds length limit");var Ae=ye($=$.toLowerCase());if("string"==typeof Ae)throw new Error(Ae);for(var pe=$+"1",Ee=0;Ee>5!=0)throw new Error("Non 5-bit word");Ae=B(Ae)^Ue,pe+=ce.charAt(Ue)}for(Ee=0;Ee<6;++Ee)Ae=B(Ae);for(Ae^=1,Ee=0;Ee<6;++Ee)pe+=ce.charAt(Ae>>5*(5-Ee)&31);return pe},toWordsUnsafe:function($){var ne=Le($,8,5,!0);if(Array.isArray(ne))return ne},toWords:function($){var ne=Le($,8,5,!0);if(Array.isArray(ne))return ne;throw new Error(ne)},fromWordsUnsafe:function($){var ne=Le($,5,8,!1);if(Array.isArray(ne))return ne},fromWords:function($){var ne=Le($,5,8,!1);if(Array.isArray(ne))return ne;throw new Error(ne)}}},630:function(at,ce,ee){!function(j,Pe){"use strict";function B(k,f){if(!k)throw new Error(f||"Assertion failed")}function ye(k,f){k.super_=f;var h=function(){};h.prototype=f.prototype,k.prototype=new h,k.prototype.constructor=k}function M(k,f,h){if(M.isBN(k))return k;this.negative=0,this.words=null,this.length=0,this.red=null,null!==k&&(("le"===f||"be"===f)&&(h=f,f=10),this._init(k||0,f||10,h||"be"))}var de;"object"==typeof j?j.exports=M:Pe.BN=M,M.BN=M,M.wordSize=26;try{de="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ee(601).Buffer}catch(k){}function Ze(k,f){var h=k.charCodeAt(f);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function O(k,f,h){var v=Ze(k,h);return h-1>=f&&(v|=Ze(k,h-1)<<4),v}function Le(k,f,h,v){for(var b=0,E=Math.min(k.length,h),A=f;A=49?S-49+10:S>=17?S-17+10:S}return b}M.isBN=function(f){return f instanceof M||null!==f&&"object"==typeof f&&f.constructor.wordSize===M.wordSize&&Array.isArray(f.words)},M.max=function(f,h){return f.cmp(h)>0?f:h},M.min=function(f,h){return f.cmp(h)<0?f:h},M.prototype._init=function(f,h,v){if("number"==typeof f)return this._initNumber(f,h,v);if("object"==typeof f)return this._initArray(f,h,v);"hex"===h&&(h=16),B(h===(0|h)&&h>=2&&h<=36);var b=0;"-"===(f=f.toString().replace(/\s+/g,""))[0]&&(b++,this.negative=1),b=0;b-=3)this.words[E]|=(A=f[b]|f[b-1]<<8|f[b-2]<<16)<>>26-S&67108863,(S+=24)>=26&&(S-=26,E++);else if("le"===v)for(b=0,E=0;b>>26-S&67108863,(S+=24)>=26&&(S-=26,E++);return this.strip()},M.prototype._parseHex=function(f,h,v){this.length=Math.ceil((f.length-h)/6),this.words=new Array(this.length);for(var b=0;b=h;b-=2)S=O(f,h,b)<=18?(E-=18,this.words[A+=1]|=S>>>26):E+=8;else for(b=(f.length-h)%2==0?h+1:h;b=18?(E-=18,this.words[A+=1]|=S>>>26):E+=8;this.strip()},M.prototype._parseBase=function(f,h,v){this.words=[0],this.length=1;for(var b=0,E=1;E<=67108863;E*=h)b++;b--,E=E/h|0;for(var A=f.length-v,S=A%b,C=Math.min(A,A-S)+v,p=0,N=v;N1&&0===this.words[this.length-1];)this.length--;return this._normSign()},M.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},M.prototype.inspect=function(){return(this.red?""};var he=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],ve=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],lt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function $(k,f,h){h.negative=f.negative^k.negative;var v=k.length+f.length|0;h.length=v,v=v-1|0;var b=0|k.words[0],E=0|f.words[0],A=b*E,C=A/67108864|0;h.words[0]=67108863&A;for(var p=1;p>>26,Q=67108863&C,ae=Math.min(p,f.length-1),ie=Math.max(0,p-k.length+1);ie<=ae;ie++)N+=(A=(b=0|k.words[p-ie|0])*(E=0|f.words[ie])+Q)/67108864|0,Q=67108863&A;h.words[p]=0|Q,C=0|N}return 0!==C?h.words[p]=0|C:h.length--,h.strip()}M.prototype.toString=function(f,h){var v;if(h=0|h||1,16===(f=f||10)||"hex"===f){v="";for(var b=0,E=0,A=0;A>>24-b&16777215)||A!==this.length-1?he[6-C.length]+C+v:C+v,(b+=2)>=26&&(b-=26,A--)}for(0!==E&&(v=E.toString(16)+v);v.length%h!=0;)v="0"+v;return 0!==this.negative&&(v="-"+v),v}if(f===(0|f)&&f>=2&&f<=36){var p=ve[f],N=lt[f];v="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var ae=Q.modn(N).toString(f);v=(Q=Q.idivn(N)).isZero()?ae+v:he[p-ae.length]+ae+v}for(this.isZero()&&(v="0"+v);v.length%h!=0;)v="0"+v;return 0!==this.negative&&(v="-"+v),v}B(!1,"Base should be between 2 and 36")},M.prototype.toNumber=function(){var f=this.words[0];return 2===this.length?f+=67108864*this.words[1]:3===this.length&&1===this.words[2]?f+=4503599627370496+67108864*this.words[1]:this.length>2&&B(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-f:f},M.prototype.toJSON=function(){return this.toString(16)},M.prototype.toBuffer=function(f,h){return B(void 0!==de),this.toArrayLike(de,f,h)},M.prototype.toArray=function(f,h){return this.toArrayLike(Array,f,h)},M.prototype.toArrayLike=function(f,h,v){var b=this.byteLength(),E=v||Math.max(1,b);B(b<=E,"byte array longer than desired length"),B(E>0,"Requested array length <= 0"),this.strip();var C,p,A="le"===h,S=new f(E),N=this.clone();if(A){for(p=0;!N.isZero();p++)C=N.andln(255),N.iushrn(8),S[p]=C;for(;p=4096&&(v+=13,h>>>=13),h>=64&&(v+=7,h>>>=7),h>=8&&(v+=4,h>>>=4),h>=2&&(v+=2,h>>>=2),v+h},M.prototype._zeroBits=function(f){if(0===f)return 26;var h=f,v=0;return 0==(8191&h)&&(v+=13,h>>>=13),0==(127&h)&&(v+=7,h>>>=7),0==(15&h)&&(v+=4,h>>>=4),0==(3&h)&&(v+=2,h>>>=2),0==(1&h)&&v++,v},M.prototype.bitLength=function(){var h=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+h},M.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,h=0;hf.length?this.clone().ior(f):f.clone().ior(this)},M.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},M.prototype.iuand=function(f){var h;h=this.length>f.length?f:this;for(var v=0;vf.length?this.clone().iand(f):f.clone().iand(this)},M.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},M.prototype.iuxor=function(f){var h,v;this.length>f.length?(h=this,v=f):(h=f,v=this);for(var b=0;bf.length?this.clone().ixor(f):f.clone().ixor(this)},M.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},M.prototype.inotn=function(f){B("number"==typeof f&&f>=0);var h=0|Math.ceil(f/26),v=f%26;this._expand(h),v>0&&h--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-v),this.strip()},M.prototype.notn=function(f){return this.clone().inotn(f)},M.prototype.setn=function(f,h){B("number"==typeof f&&f>=0);var v=f/26|0,b=f%26;return this._expand(v+1),this.words[v]=h?this.words[v]|1<f.length?(v=this,b=f):(v=f,b=this);for(var E=0,A=0;A>>26;for(;0!==E&&A>>26;if(this.length=v.length,0!==E)this.words[this.length]=E,this.length++;else if(v!==this)for(;Af.length?this.clone().iadd(f):f.clone().iadd(this)},M.prototype.isub=function(f){if(0!==f.negative){f.negative=0;var h=this.iadd(f);return f.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var b,E,v=this.cmp(f);if(0===v)return this.negative=0,this.length=1,this.words[0]=0,this;v>0?(b=this,E=f):(b=f,E=this);for(var A=0,S=0;S>26,this.words[S]=67108863&h;for(;0!==A&&S>26,this.words[S]=67108863&h;if(0===A&&S>>13,Ge=0|b[1],Xe=8191&Ge,w=Ge>>>13,Y=0|b[2],G=8191&Y,q=Y>>>13,xe=0|b[3],me=8191&xe,we=xe>>>13,Ce=0|b[4],Re=8191&Ce,be=Ce>>>13,x=0|b[5],m=8191&x,_=x>>>13,I=0|b[6],F=8191&I,z=I>>>13,oe=0|b[7],je=8191&oe,Be=oe>>>13,pt=0|b[8],rt=8191&pt,Ye=pt>>>13,Wr=0|b[9],$t=8191&Wr,Ut=Wr>>>13,Fo=0|E[0],an=8191&Fo,gn=Fo>>>13,Oo=0|E[1],ln=8191&Oo,un=Oo>>>13,Lo=0|E[2],rn=8191&Lo,Ke=Lo>>>13,Oi=0|E[3],Fe=8191&Oi,Zt=Oi>>>13,Vo=0|E[4],Ve=8191&Vo,ge=Vo>>>13,lo=0|E[5],mn=8191&lo,Ft=lo>>>13,ds=0|E[6],Xt=8191&ds,Ie=ds>>>13,An=0|E[7],cn=8191&An,_n=An>>>13,fs=0|E[8],Gt=8191&fs,Dt=fs>>>13,hs=0|E[9],dn=8191&hs,yn=hs>>>13;v.negative=f.negative^h.negative,v.length=19;var or=(S+(C=Math.imul(ae,an))|0)+((8191&(p=(p=Math.imul(ae,gn))+Math.imul(ie,an)|0))<<13)|0;S=((N=Math.imul(ie,gn))+(p>>>13)|0)+(or>>>26)|0,or&=67108863,C=Math.imul(Xe,an),p=(p=Math.imul(Xe,gn))+Math.imul(w,an)|0,N=Math.imul(w,gn);var Bo=(S+(C=C+Math.imul(ae,ln)|0)|0)+((8191&(p=(p=p+Math.imul(ae,un)|0)+Math.imul(ie,ln)|0))<<13)|0;S=((N=N+Math.imul(ie,un)|0)+(p>>>13)|0)+(Bo>>>26)|0,Bo&=67108863,C=Math.imul(G,an),p=(p=Math.imul(G,gn))+Math.imul(q,an)|0,N=Math.imul(q,gn),C=C+Math.imul(Xe,ln)|0,p=(p=p+Math.imul(Xe,un)|0)+Math.imul(w,ln)|0,N=N+Math.imul(w,un)|0;var Ho=(S+(C=C+Math.imul(ae,rn)|0)|0)+((8191&(p=(p=p+Math.imul(ae,Ke)|0)+Math.imul(ie,rn)|0))<<13)|0;S=((N=N+Math.imul(ie,Ke)|0)+(p>>>13)|0)+(Ho>>>26)|0,Ho&=67108863,C=Math.imul(me,an),p=(p=Math.imul(me,gn))+Math.imul(we,an)|0,N=Math.imul(we,gn),C=C+Math.imul(G,ln)|0,p=(p=p+Math.imul(G,un)|0)+Math.imul(q,ln)|0,N=N+Math.imul(q,un)|0,C=C+Math.imul(Xe,rn)|0,p=(p=p+Math.imul(Xe,Ke)|0)+Math.imul(w,rn)|0,N=N+Math.imul(w,Ke)|0;var Uo=(S+(C=C+Math.imul(ae,Fe)|0)|0)+((8191&(p=(p=p+Math.imul(ae,Zt)|0)+Math.imul(ie,Fe)|0))<<13)|0;S=((N=N+Math.imul(ie,Zt)|0)+(p>>>13)|0)+(Uo>>>26)|0,Uo&=67108863,C=Math.imul(Re,an),p=(p=Math.imul(Re,gn))+Math.imul(be,an)|0,N=Math.imul(be,gn),C=C+Math.imul(me,ln)|0,p=(p=p+Math.imul(me,un)|0)+Math.imul(we,ln)|0,N=N+Math.imul(we,un)|0,C=C+Math.imul(G,rn)|0,p=(p=p+Math.imul(G,Ke)|0)+Math.imul(q,rn)|0,N=N+Math.imul(q,Ke)|0,C=C+Math.imul(Xe,Fe)|0,p=(p=p+Math.imul(Xe,Zt)|0)+Math.imul(w,Fe)|0,N=N+Math.imul(w,Zt)|0;var jo=(S+(C=C+Math.imul(ae,Ve)|0)|0)+((8191&(p=(p=p+Math.imul(ae,ge)|0)+Math.imul(ie,Ve)|0))<<13)|0;S=((N=N+Math.imul(ie,ge)|0)+(p>>>13)|0)+(jo>>>26)|0,jo&=67108863,C=Math.imul(m,an),p=(p=Math.imul(m,gn))+Math.imul(_,an)|0,N=Math.imul(_,gn),C=C+Math.imul(Re,ln)|0,p=(p=p+Math.imul(Re,un)|0)+Math.imul(be,ln)|0,N=N+Math.imul(be,un)|0,C=C+Math.imul(me,rn)|0,p=(p=p+Math.imul(me,Ke)|0)+Math.imul(we,rn)|0,N=N+Math.imul(we,Ke)|0,C=C+Math.imul(G,Fe)|0,p=(p=p+Math.imul(G,Zt)|0)+Math.imul(q,Fe)|0,N=N+Math.imul(q,Zt)|0,C=C+Math.imul(Xe,Ve)|0,p=(p=p+Math.imul(Xe,ge)|0)+Math.imul(w,Ve)|0,N=N+Math.imul(w,ge)|0;var uo=(S+(C=C+Math.imul(ae,mn)|0)|0)+((8191&(p=(p=p+Math.imul(ae,Ft)|0)+Math.imul(ie,mn)|0))<<13)|0;S=((N=N+Math.imul(ie,Ft)|0)+(p>>>13)|0)+(uo>>>26)|0,uo&=67108863,C=Math.imul(F,an),p=(p=Math.imul(F,gn))+Math.imul(z,an)|0,N=Math.imul(z,gn),C=C+Math.imul(m,ln)|0,p=(p=p+Math.imul(m,un)|0)+Math.imul(_,ln)|0,N=N+Math.imul(_,un)|0,C=C+Math.imul(Re,rn)|0,p=(p=p+Math.imul(Re,Ke)|0)+Math.imul(be,rn)|0,N=N+Math.imul(be,Ke)|0,C=C+Math.imul(me,Fe)|0,p=(p=p+Math.imul(me,Zt)|0)+Math.imul(we,Fe)|0,N=N+Math.imul(we,Zt)|0,C=C+Math.imul(G,Ve)|0,p=(p=p+Math.imul(G,ge)|0)+Math.imul(q,Ve)|0,N=N+Math.imul(q,ge)|0,C=C+Math.imul(Xe,mn)|0,p=(p=p+Math.imul(Xe,Ft)|0)+Math.imul(w,mn)|0,N=N+Math.imul(w,Ft)|0;var $o=(S+(C=C+Math.imul(ae,Xt)|0)|0)+((8191&(p=(p=p+Math.imul(ae,Ie)|0)+Math.imul(ie,Xt)|0))<<13)|0;S=((N=N+Math.imul(ie,Ie)|0)+(p>>>13)|0)+($o>>>26)|0,$o&=67108863,C=Math.imul(je,an),p=(p=Math.imul(je,gn))+Math.imul(Be,an)|0,N=Math.imul(Be,gn),C=C+Math.imul(F,ln)|0,p=(p=p+Math.imul(F,un)|0)+Math.imul(z,ln)|0,N=N+Math.imul(z,un)|0,C=C+Math.imul(m,rn)|0,p=(p=p+Math.imul(m,Ke)|0)+Math.imul(_,rn)|0,N=N+Math.imul(_,Ke)|0,C=C+Math.imul(Re,Fe)|0,p=(p=p+Math.imul(Re,Zt)|0)+Math.imul(be,Fe)|0,N=N+Math.imul(be,Zt)|0,C=C+Math.imul(me,Ve)|0,p=(p=p+Math.imul(me,ge)|0)+Math.imul(we,Ve)|0,N=N+Math.imul(we,ge)|0,C=C+Math.imul(G,mn)|0,p=(p=p+Math.imul(G,Ft)|0)+Math.imul(q,mn)|0,N=N+Math.imul(q,Ft)|0,C=C+Math.imul(Xe,Xt)|0,p=(p=p+Math.imul(Xe,Ie)|0)+Math.imul(w,Xt)|0,N=N+Math.imul(w,Ie)|0;var co=(S+(C=C+Math.imul(ae,cn)|0)|0)+((8191&(p=(p=p+Math.imul(ae,_n)|0)+Math.imul(ie,cn)|0))<<13)|0;S=((N=N+Math.imul(ie,_n)|0)+(p>>>13)|0)+(co>>>26)|0,co&=67108863,C=Math.imul(rt,an),p=(p=Math.imul(rt,gn))+Math.imul(Ye,an)|0,N=Math.imul(Ye,gn),C=C+Math.imul(je,ln)|0,p=(p=p+Math.imul(je,un)|0)+Math.imul(Be,ln)|0,N=N+Math.imul(Be,un)|0,C=C+Math.imul(F,rn)|0,p=(p=p+Math.imul(F,Ke)|0)+Math.imul(z,rn)|0,N=N+Math.imul(z,Ke)|0,C=C+Math.imul(m,Fe)|0,p=(p=p+Math.imul(m,Zt)|0)+Math.imul(_,Fe)|0,N=N+Math.imul(_,Zt)|0,C=C+Math.imul(Re,Ve)|0,p=(p=p+Math.imul(Re,ge)|0)+Math.imul(be,Ve)|0,N=N+Math.imul(be,ge)|0,C=C+Math.imul(me,mn)|0,p=(p=p+Math.imul(me,Ft)|0)+Math.imul(we,mn)|0,N=N+Math.imul(we,Ft)|0,C=C+Math.imul(G,Xt)|0,p=(p=p+Math.imul(G,Ie)|0)+Math.imul(q,Xt)|0,N=N+Math.imul(q,Ie)|0,C=C+Math.imul(Xe,cn)|0,p=(p=p+Math.imul(Xe,_n)|0)+Math.imul(w,cn)|0,N=N+Math.imul(w,_n)|0;var Go=(S+(C=C+Math.imul(ae,Gt)|0)|0)+((8191&(p=(p=p+Math.imul(ae,Dt)|0)+Math.imul(ie,Gt)|0))<<13)|0;S=((N=N+Math.imul(ie,Dt)|0)+(p>>>13)|0)+(Go>>>26)|0,Go&=67108863,C=Math.imul($t,an),p=(p=Math.imul($t,gn))+Math.imul(Ut,an)|0,N=Math.imul(Ut,gn),C=C+Math.imul(rt,ln)|0,p=(p=p+Math.imul(rt,un)|0)+Math.imul(Ye,ln)|0,N=N+Math.imul(Ye,un)|0,C=C+Math.imul(je,rn)|0,p=(p=p+Math.imul(je,Ke)|0)+Math.imul(Be,rn)|0,N=N+Math.imul(Be,Ke)|0,C=C+Math.imul(F,Fe)|0,p=(p=p+Math.imul(F,Zt)|0)+Math.imul(z,Fe)|0,N=N+Math.imul(z,Zt)|0,C=C+Math.imul(m,Ve)|0,p=(p=p+Math.imul(m,ge)|0)+Math.imul(_,Ve)|0,N=N+Math.imul(_,ge)|0,C=C+Math.imul(Re,mn)|0,p=(p=p+Math.imul(Re,Ft)|0)+Math.imul(be,mn)|0,N=N+Math.imul(be,Ft)|0,C=C+Math.imul(me,Xt)|0,p=(p=p+Math.imul(me,Ie)|0)+Math.imul(we,Xt)|0,N=N+Math.imul(we,Ie)|0,C=C+Math.imul(G,cn)|0,p=(p=p+Math.imul(G,_n)|0)+Math.imul(q,cn)|0,N=N+Math.imul(q,_n)|0,C=C+Math.imul(Xe,Gt)|0,p=(p=p+Math.imul(Xe,Dt)|0)+Math.imul(w,Gt)|0,N=N+Math.imul(w,Dt)|0;var hr=(S+(C=C+Math.imul(ae,dn)|0)|0)+((8191&(p=(p=p+Math.imul(ae,yn)|0)+Math.imul(ie,dn)|0))<<13)|0;S=((N=N+Math.imul(ie,yn)|0)+(p>>>13)|0)+(hr>>>26)|0,hr&=67108863,C=Math.imul($t,ln),p=(p=Math.imul($t,un))+Math.imul(Ut,ln)|0,N=Math.imul(Ut,un),C=C+Math.imul(rt,rn)|0,p=(p=p+Math.imul(rt,Ke)|0)+Math.imul(Ye,rn)|0,N=N+Math.imul(Ye,Ke)|0,C=C+Math.imul(je,Fe)|0,p=(p=p+Math.imul(je,Zt)|0)+Math.imul(Be,Fe)|0,N=N+Math.imul(Be,Zt)|0,C=C+Math.imul(F,Ve)|0,p=(p=p+Math.imul(F,ge)|0)+Math.imul(z,Ve)|0,N=N+Math.imul(z,ge)|0,C=C+Math.imul(m,mn)|0,p=(p=p+Math.imul(m,Ft)|0)+Math.imul(_,mn)|0,N=N+Math.imul(_,Ft)|0,C=C+Math.imul(Re,Xt)|0,p=(p=p+Math.imul(Re,Ie)|0)+Math.imul(be,Xt)|0,N=N+Math.imul(be,Ie)|0,C=C+Math.imul(me,cn)|0,p=(p=p+Math.imul(me,_n)|0)+Math.imul(we,cn)|0,N=N+Math.imul(we,_n)|0,C=C+Math.imul(G,Gt)|0,p=(p=p+Math.imul(G,Dt)|0)+Math.imul(q,Gt)|0,N=N+Math.imul(q,Dt)|0;var en=(S+(C=C+Math.imul(Xe,dn)|0)|0)+((8191&(p=(p=p+Math.imul(Xe,yn)|0)+Math.imul(w,dn)|0))<<13)|0;S=((N=N+Math.imul(w,yn)|0)+(p>>>13)|0)+(en>>>26)|0,en&=67108863,C=Math.imul($t,rn),p=(p=Math.imul($t,Ke))+Math.imul(Ut,rn)|0,N=Math.imul(Ut,Ke),C=C+Math.imul(rt,Fe)|0,p=(p=p+Math.imul(rt,Zt)|0)+Math.imul(Ye,Fe)|0,N=N+Math.imul(Ye,Zt)|0,C=C+Math.imul(je,Ve)|0,p=(p=p+Math.imul(je,ge)|0)+Math.imul(Be,Ve)|0,N=N+Math.imul(Be,ge)|0,C=C+Math.imul(F,mn)|0,p=(p=p+Math.imul(F,Ft)|0)+Math.imul(z,mn)|0,N=N+Math.imul(z,Ft)|0,C=C+Math.imul(m,Xt)|0,p=(p=p+Math.imul(m,Ie)|0)+Math.imul(_,Xt)|0,N=N+Math.imul(_,Ie)|0,C=C+Math.imul(Re,cn)|0,p=(p=p+Math.imul(Re,_n)|0)+Math.imul(be,cn)|0,N=N+Math.imul(be,_n)|0,C=C+Math.imul(me,Gt)|0,p=(p=p+Math.imul(me,Dt)|0)+Math.imul(we,Gt)|0,N=N+Math.imul(we,Dt)|0;var Xc=(S+(C=C+Math.imul(G,dn)|0)|0)+((8191&(p=(p=p+Math.imul(G,yn)|0)+Math.imul(q,dn)|0))<<13)|0;S=((N=N+Math.imul(q,yn)|0)+(p>>>13)|0)+(Xc>>>26)|0,Xc&=67108863,C=Math.imul($t,Fe),p=(p=Math.imul($t,Zt))+Math.imul(Ut,Fe)|0,N=Math.imul(Ut,Zt),C=C+Math.imul(rt,Ve)|0,p=(p=p+Math.imul(rt,ge)|0)+Math.imul(Ye,Ve)|0,N=N+Math.imul(Ye,ge)|0,C=C+Math.imul(je,mn)|0,p=(p=p+Math.imul(je,Ft)|0)+Math.imul(Be,mn)|0,N=N+Math.imul(Be,Ft)|0,C=C+Math.imul(F,Xt)|0,p=(p=p+Math.imul(F,Ie)|0)+Math.imul(z,Xt)|0,N=N+Math.imul(z,Ie)|0,C=C+Math.imul(m,cn)|0,p=(p=p+Math.imul(m,_n)|0)+Math.imul(_,cn)|0,N=N+Math.imul(_,_n)|0,C=C+Math.imul(Re,Gt)|0,p=(p=p+Math.imul(Re,Dt)|0)+Math.imul(be,Gt)|0,N=N+Math.imul(be,Dt)|0;var ed=(S+(C=C+Math.imul(me,dn)|0)|0)+((8191&(p=(p=p+Math.imul(me,yn)|0)+Math.imul(we,dn)|0))<<13)|0;S=((N=N+Math.imul(we,yn)|0)+(p>>>13)|0)+(ed>>>26)|0,ed&=67108863,C=Math.imul($t,Ve),p=(p=Math.imul($t,ge))+Math.imul(Ut,Ve)|0,N=Math.imul(Ut,ge),C=C+Math.imul(rt,mn)|0,p=(p=p+Math.imul(rt,Ft)|0)+Math.imul(Ye,mn)|0,N=N+Math.imul(Ye,Ft)|0,C=C+Math.imul(je,Xt)|0,p=(p=p+Math.imul(je,Ie)|0)+Math.imul(Be,Xt)|0,N=N+Math.imul(Be,Ie)|0,C=C+Math.imul(F,cn)|0,p=(p=p+Math.imul(F,_n)|0)+Math.imul(z,cn)|0,N=N+Math.imul(z,_n)|0,C=C+Math.imul(m,Gt)|0,p=(p=p+Math.imul(m,Dt)|0)+Math.imul(_,Gt)|0,N=N+Math.imul(_,Dt)|0;var td=(S+(C=C+Math.imul(Re,dn)|0)|0)+((8191&(p=(p=p+Math.imul(Re,yn)|0)+Math.imul(be,dn)|0))<<13)|0;S=((N=N+Math.imul(be,yn)|0)+(p>>>13)|0)+(td>>>26)|0,td&=67108863,C=Math.imul($t,mn),p=(p=Math.imul($t,Ft))+Math.imul(Ut,mn)|0,N=Math.imul(Ut,Ft),C=C+Math.imul(rt,Xt)|0,p=(p=p+Math.imul(rt,Ie)|0)+Math.imul(Ye,Xt)|0,N=N+Math.imul(Ye,Ie)|0,C=C+Math.imul(je,cn)|0,p=(p=p+Math.imul(je,_n)|0)+Math.imul(Be,cn)|0,N=N+Math.imul(Be,_n)|0,C=C+Math.imul(F,Gt)|0,p=(p=p+Math.imul(F,Dt)|0)+Math.imul(z,Gt)|0,N=N+Math.imul(z,Dt)|0;var _e=(S+(C=C+Math.imul(m,dn)|0)|0)+((8191&(p=(p=p+Math.imul(m,yn)|0)+Math.imul(_,dn)|0))<<13)|0;S=((N=N+Math.imul(_,yn)|0)+(p>>>13)|0)+(_e>>>26)|0,_e&=67108863,C=Math.imul($t,Xt),p=(p=Math.imul($t,Ie))+Math.imul(Ut,Xt)|0,N=Math.imul(Ut,Ie),C=C+Math.imul(rt,cn)|0,p=(p=p+Math.imul(rt,_n)|0)+Math.imul(Ye,cn)|0,N=N+Math.imul(Ye,_n)|0,C=C+Math.imul(je,Gt)|0,p=(p=p+Math.imul(je,Dt)|0)+Math.imul(Be,Gt)|0,N=N+Math.imul(Be,Dt)|0;var nd=(S+(C=C+Math.imul(F,dn)|0)|0)+((8191&(p=(p=p+Math.imul(F,yn)|0)+Math.imul(z,dn)|0))<<13)|0;S=((N=N+Math.imul(z,yn)|0)+(p>>>13)|0)+(nd>>>26)|0,nd&=67108863,C=Math.imul($t,cn),p=(p=Math.imul($t,_n))+Math.imul(Ut,cn)|0,N=Math.imul(Ut,_n),C=C+Math.imul(rt,Gt)|0,p=(p=p+Math.imul(rt,Dt)|0)+Math.imul(Ye,Gt)|0,N=N+Math.imul(Ye,Dt)|0;var St=(S+(C=C+Math.imul(je,dn)|0)|0)+((8191&(p=(p=p+Math.imul(je,yn)|0)+Math.imul(Be,dn)|0))<<13)|0;S=((N=N+Math.imul(Be,yn)|0)+(p>>>13)|0)+(St>>>26)|0,St&=67108863,C=Math.imul($t,Gt),p=(p=Math.imul($t,Dt))+Math.imul(Ut,Gt)|0,N=Math.imul(Ut,Dt);var ti=(S+(C=C+Math.imul(rt,dn)|0)|0)+((8191&(p=(p=p+Math.imul(rt,yn)|0)+Math.imul(Ye,dn)|0))<<13)|0;S=((N=N+Math.imul(Ye,yn)|0)+(p>>>13)|0)+(ti>>>26)|0,ti&=67108863;var Aa=(S+(C=Math.imul($t,dn))|0)+((8191&(p=(p=Math.imul($t,yn))+Math.imul(Ut,dn)|0))<<13)|0;return S=((N=Math.imul(Ut,yn))+(p>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,A[0]=or,A[1]=Bo,A[2]=Ho,A[3]=Uo,A[4]=jo,A[5]=uo,A[6]=$o,A[7]=co,A[8]=Go,A[9]=hr,A[10]=en,A[11]=Xc,A[12]=ed,A[13]=td,A[14]=_e,A[15]=nd,A[16]=St,A[17]=ti,A[18]=Aa,0!==S&&(A[19]=S,v.length++),v};function Ae(k,f,h){return(new pe).mulp(k,f,h)}function pe(k,f){this.x=k,this.y=f}Math.imul||(ne=$),M.prototype.mulTo=function(f,h){var b=this.length+f.length;return 10===this.length&&10===f.length?ne(this,f,h):b<63?$(this,f,h):b<1024?function(k,f,h){h.negative=f.negative^k.negative,h.length=k.length+f.length;for(var v=0,b=0,E=0;E>>26)|0)>>>26,A&=67108863}h.words[E]=S,v=A,A=b}return 0!==v?h.words[E]=v:h.length--,h.strip()}(this,f,h):Ae(this,f,h)},pe.prototype.makeRBT=function(f){for(var h=new Array(f),v=M.prototype._countBits(f)-1,b=0;b>=1;return b},pe.prototype.permute=function(f,h,v,b,E,A){for(var S=0;S>>=1)E++;return 1<>>=13),E>>>=13;for(A=2*h;A>=26,h+=b/67108864|0,h+=E>>>26,this.words[v]=67108863&E}return 0!==h&&(this.words[v]=h,this.length++),this},M.prototype.muln=function(f){return this.clone().imuln(f)},M.prototype.sqr=function(){return this.mul(this)},M.prototype.isqr=function(){return this.imul(this.clone())},M.prototype.pow=function(f){var h=function(k){for(var f=new Array(k.bitLength()),h=0;h>>b}return f}(f);if(0===h.length)return new M(1);for(var v=this,b=0;b=0);var E,h=f%26,v=(f-h)/26,b=67108863>>>26-h<<26-h;if(0!==h){var A=0;for(E=0;E>>26-h}A&&(this.words[E]=A,this.length++)}if(0!==v){for(E=this.length-1;E>=0;E--)this.words[E+v]=this.words[E];for(E=0;E=0),b=h?(h-h%26)/26:0;var E=f%26,A=Math.min((f-E)/26,this.length),S=67108863^67108863>>>E<A)for(this.length-=A,p=0;p=0&&(0!==N||p>=b);p--){var Q=0|this.words[p];this.words[p]=N<<26-E|Q>>>E,N=Q&S}return C&&0!==N&&(C.words[C.length++]=N),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},M.prototype.ishrn=function(f,h,v){return B(0===this.negative),this.iushrn(f,h,v)},M.prototype.shln=function(f){return this.clone().ishln(f)},M.prototype.ushln=function(f){return this.clone().iushln(f)},M.prototype.shrn=function(f){return this.clone().ishrn(f)},M.prototype.ushrn=function(f){return this.clone().iushrn(f)},M.prototype.testn=function(f){B("number"==typeof f&&f>=0);var h=f%26,v=(f-h)/26;return!(this.length<=v||!(this.words[v]&1<=0);var h=f%26,v=(f-h)/26;return B(0===this.negative,"imaskn works only with positive numbers"),this.length<=v?this:(0!==h&&v++,this.length=Math.min(v,this.length),0!==h&&(this.words[this.length-1]&=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},M.prototype.isubn=function(f){if(B("number"==typeof f),B(f<67108864),f<0)return this.iaddn(-f);if(0!==this.negative)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(C/67108864|0),this.words[E+v]=67108863&A}for(;E>26,this.words[E+v]=67108863&A;if(0===S)return this.strip();for(B(-1===S),S=0,E=0;E>26,this.words[E]=67108863&A;return this.negative=1,this.strip()},M.prototype._wordDiv=function(f,h){var v,b=this.clone(),E=f,A=0|E.words[E.length-1];0!=(v=26-this._countBits(A))&&(E=E.ushln(v),b.iushln(v),A=0|E.words[E.length-1]);var p,C=b.length-E.length;if("mod"!==h){(p=new M(null)).length=C+1,p.words=new Array(p.length);for(var N=0;N=0;ae--){var ie=67108864*(0|b.words[E.length+ae])+(0|b.words[E.length+ae-1]);for(ie=Math.min(ie/A|0,67108863),b._ishlnsubmul(E,ie,ae);0!==b.negative;)ie--,b.negative=0,b._ishlnsubmul(E,1,ae),b.isZero()||(b.negative^=1);p&&(p.words[ae]=ie)}return p&&p.strip(),b.strip(),"div"!==h&&0!==v&&b.iushrn(v),{div:p||null,mod:b}},M.prototype.divmod=function(f,h,v){return B(!f.isZero()),this.isZero()?{div:new M(0),mod:new M(0)}:0!==this.negative&&0===f.negative?(A=this.neg().divmod(f,h),"mod"!==h&&(b=A.div.neg()),"div"!==h&&(E=A.mod.neg(),v&&0!==E.negative&&E.iadd(f)),{div:b,mod:E}):0===this.negative&&0!==f.negative?(A=this.divmod(f.neg(),h),"mod"!==h&&(b=A.div.neg()),{div:b,mod:A.mod}):0!=(this.negative&f.negative)?(A=this.neg().divmod(f.neg(),h),"div"!==h&&(E=A.mod.neg(),v&&0!==E.negative&&E.isub(f)),{div:A.div,mod:E}):f.length>this.length||this.cmp(f)<0?{div:new M(0),mod:this}:1===f.length?"div"===h?{div:this.divn(f.words[0]),mod:null}:"mod"===h?{div:null,mod:new M(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new M(this.modn(f.words[0]))}:this._wordDiv(f,h);var b,E,A},M.prototype.div=function(f){return this.divmod(f,"div",!1).div},M.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},M.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},M.prototype.divRound=function(f){var h=this.divmod(f);if(h.mod.isZero())return h.div;var v=0!==h.div.negative?h.mod.isub(f):h.mod,b=f.ushrn(1),E=f.andln(1),A=v.cmp(b);return A<0||1===E&&0===A?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},M.prototype.modn=function(f){B(f<=67108863);for(var h=(1<<26)%f,v=0,b=this.length-1;b>=0;b--)v=(h*v+(0|this.words[b]))%f;return v},M.prototype.idivn=function(f){B(f<=67108863);for(var h=0,v=this.length-1;v>=0;v--){var b=(0|this.words[v])+67108864*h;this.words[v]=b/f|0,h=b%f}return this.strip()},M.prototype.divn=function(f){return this.clone().idivn(f)},M.prototype.egcd=function(f){B(0===f.negative),B(!f.isZero());var h=this,v=f.clone();h=0!==h.negative?h.umod(f):h.clone();for(var b=new M(1),E=new M(0),A=new M(0),S=new M(1),C=0;h.isEven()&&v.isEven();)h.iushrn(1),v.iushrn(1),++C;for(var p=v.clone(),N=h.clone();!h.isZero();){for(var Q=0,ae=1;0==(h.words[0]&ae)&&Q<26;++Q,ae<<=1);if(Q>0)for(h.iushrn(Q);Q-- >0;)(b.isOdd()||E.isOdd())&&(b.iadd(p),E.isub(N)),b.iushrn(1),E.iushrn(1);for(var ie=0,Ge=1;0==(v.words[0]&Ge)&&ie<26;++ie,Ge<<=1);if(ie>0)for(v.iushrn(ie);ie-- >0;)(A.isOdd()||S.isOdd())&&(A.iadd(p),S.isub(N)),A.iushrn(1),S.iushrn(1);h.cmp(v)>=0?(h.isub(v),b.isub(A),E.isub(S)):(v.isub(h),A.isub(b),S.isub(E))}return{a:A,b:S,gcd:v.iushln(C)}},M.prototype._invmp=function(f){B(0===f.negative),B(!f.isZero());var Q,h=this,v=f.clone();h=0!==h.negative?h.umod(f):h.clone();for(var b=new M(1),E=new M(0),A=v.clone();h.cmpn(1)>0&&v.cmpn(1)>0;){for(var S=0,C=1;0==(h.words[0]&C)&&S<26;++S,C<<=1);if(S>0)for(h.iushrn(S);S-- >0;)b.isOdd()&&b.iadd(A),b.iushrn(1);for(var p=0,N=1;0==(v.words[0]&N)&&p<26;++p,N<<=1);if(p>0)for(v.iushrn(p);p-- >0;)E.isOdd()&&E.iadd(A),E.iushrn(1);h.cmp(v)>=0?(h.isub(v),b.isub(E)):(v.isub(h),E.isub(b))}return(Q=0===h.cmpn(1)?b:E).cmpn(0)<0&&Q.iadd(f),Q},M.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var h=this.clone(),v=f.clone();h.negative=0,v.negative=0;for(var b=0;h.isEven()&&v.isEven();b++)h.iushrn(1),v.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;v.isEven();)v.iushrn(1);var E=h.cmp(v);if(E<0){var A=h;h=v,v=A}else if(0===E||0===v.cmpn(1))break;h.isub(v)}return v.iushln(b)},M.prototype.invm=function(f){return this.egcd(f).a.umod(f)},M.prototype.isEven=function(){return 0==(1&this.words[0])},M.prototype.isOdd=function(){return 1==(1&this.words[0])},M.prototype.andln=function(f){return this.words[0]&f},M.prototype.bincn=function(f){B("number"==typeof f);var h=f%26,v=(f-h)/26,b=1<>>26,this.words[A]=S&=67108863}return 0!==E&&(this.words[A]=E,this.length++),this},M.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},M.prototype.cmpn=function(f){var v,h=f<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)v=1;else{h&&(f=-f),B(f<=67108863,"Number is too big");var b=0|this.words[0];v=b===f?0:bf.length)return 1;if(this.length=0;v--){var b=0|this.words[v],E=0|f.words[v];if(b!==E){bE&&(h=1);break}}return h},M.prototype.gtn=function(f){return 1===this.cmpn(f)},M.prototype.gt=function(f){return 1===this.cmp(f)},M.prototype.gten=function(f){return this.cmpn(f)>=0},M.prototype.gte=function(f){return this.cmp(f)>=0},M.prototype.ltn=function(f){return-1===this.cmpn(f)},M.prototype.lt=function(f){return-1===this.cmp(f)},M.prototype.lten=function(f){return this.cmpn(f)<=0},M.prototype.lte=function(f){return this.cmp(f)<=0},M.prototype.eqn=function(f){return 0===this.cmpn(f)},M.prototype.eq=function(f){return 0===this.cmp(f)},M.red=function(f){return new nt(f)},M.prototype.toRed=function(f){return B(!this.red,"Already a number in reduction context"),B(0===this.negative,"red works only with positives"),f.convertTo(this)._forceRed(f)},M.prototype.fromRed=function(){return B(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},M.prototype._forceRed=function(f){return this.red=f,this},M.prototype.forceRed=function(f){return B(!this.red,"Already a number in reduction context"),this._forceRed(f)},M.prototype.redAdd=function(f){return B(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},M.prototype.redIAdd=function(f){return B(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},M.prototype.redSub=function(f){return B(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},M.prototype.redISub=function(f){return B(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},M.prototype.redShl=function(f){return B(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},M.prototype.redMul=function(f){return B(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},M.prototype.redIMul=function(f){return B(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},M.prototype.redSqr=function(){return B(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},M.prototype.redISqr=function(){return B(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},M.prototype.redSqrt=function(){return B(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},M.prototype.redInvm=function(){return B(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},M.prototype.redNeg=function(){return B(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},M.prototype.redPow=function(f){return B(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var Ee={k256:null,p224:null,p192:null,p25519:null};function Ue(k,f){this.name=k,this.p=new M(f,16),this.n=this.p.bitLength(),this.k=new M(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function ke(){Ue.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Se(){Ue.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Bt(){Ue.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function pn(){Ue.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function nt(k){if("string"==typeof k){var f=M._prime(k);this.m=f.p,this.prime=f}else B(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null}function Ht(k){nt.call(this,k),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new M(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Ue.prototype._tmp=function(){var f=new M(null);return f.words=new Array(Math.ceil(this.n/13)),f},Ue.prototype.ireduce=function(f){var v,h=f;do{this.split(h,this.tmp),v=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(v>this.n);var b=v0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},Ue.prototype.split=function(f,h){f.iushrn(this.n,0,h)},Ue.prototype.imulK=function(f){return f.imul(this.k)},ye(ke,Ue),ke.prototype.split=function(f,h){for(var v=4194303,b=Math.min(f.length,9),E=0;E>>22,A=S}f.words[E-10]=A>>>=22,f.length-=0===A&&f.length>10?10:9},ke.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var h=0,v=0;v>>=26,f.words[v]=E,h=b}return 0!==h&&(f.words[f.length++]=h),f},M._prime=function(f){if(Ee[f])return Ee[f];var h;if("k256"===f)h=new ke;else if("p224"===f)h=new Se;else if("p192"===f)h=new Bt;else{if("p25519"!==f)throw new Error("Unknown prime "+f);h=new pn}return Ee[f]=h,h},nt.prototype._verify1=function(f){B(0===f.negative,"red works only with positives"),B(f.red,"red works only with red numbers")},nt.prototype._verify2=function(f,h){B(0==(f.negative|h.negative),"red works only with positives"),B(f.red&&f.red===h.red,"red works only with red numbers")},nt.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},nt.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},nt.prototype.add=function(f,h){this._verify2(f,h);var v=f.add(h);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},nt.prototype.iadd=function(f,h){this._verify2(f,h);var v=f.iadd(h);return v.cmp(this.m)>=0&&v.isub(this.m),v},nt.prototype.sub=function(f,h){this._verify2(f,h);var v=f.sub(h);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},nt.prototype.isub=function(f,h){this._verify2(f,h);var v=f.isub(h);return v.cmpn(0)<0&&v.iadd(this.m),v},nt.prototype.shl=function(f,h){return this._verify1(f),this.imod(f.ushln(h))},nt.prototype.imul=function(f,h){return this._verify2(f,h),this.imod(f.imul(h))},nt.prototype.mul=function(f,h){return this._verify2(f,h),this.imod(f.mul(h))},nt.prototype.isqr=function(f){return this.imul(f,f.clone())},nt.prototype.sqr=function(f){return this.mul(f,f)},nt.prototype.sqrt=function(f){if(f.isZero())return f.clone();var h=this.m.andln(3);if(B(h%2==1),3===h){var v=this.m.add(new M(1)).iushrn(2);return this.pow(f,v)}for(var b=this.m.subn(1),E=0;!b.isZero()&&0===b.andln(1);)E++,b.iushrn(1);B(!b.isZero());var A=new M(1).toRed(this),S=A.redNeg(),C=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new M(2*p*p).toRed(this);0!==this.pow(p,C).cmp(S);)p.redIAdd(S);for(var N=this.pow(p,b),Q=this.pow(f,b.addn(1).iushrn(1)),ae=this.pow(f,b),ie=E;0!==ae.cmp(A);){for(var Ge=ae,Xe=0;0!==Ge.cmp(A);Xe++)Ge=Ge.redSqr();B(Xe=0;E--){for(var N=h.words[E],Q=p-1;Q>=0;Q--){var ae=N>>Q&1;A!==b[0]&&(A=this.sqr(A)),0!==ae||0!==S?(S<<=1,S|=ae,(4==++C||0===E&&0===Q)&&(A=this.mul(A,b[S]),C=0,S=0)):C=0}p=26}return A},nt.prototype.convertTo=function(f){var h=f.umod(this.m);return h===f?h.clone():h},nt.prototype.convertFrom=function(f){var h=f.clone();return h.red=null,h},M.mont=function(f){return new Ht(f)},ye(Ht,nt),Ht.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},Ht.prototype.convertFrom=function(f){var h=this.imod(f.mul(this.rinv));return h.red=null,h},Ht.prototype.imul=function(f,h){if(f.isZero()||h.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(h),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(b).iushrn(this.shift),A=E;return E.cmp(this.m)>=0?A=E.isub(this.m):E.cmpn(0)<0&&(A=E.iadd(this.m)),A._forceRed(this)},Ht.prototype.mul=function(f,h){if(f.isZero()||h.isZero())return new M(0)._forceRed(this);var v=f.mul(h),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(b).iushrn(this.shift),A=E;return E.cmp(this.m)>=0?A=E.isub(this.m):E.cmpn(0)<0&&(A=E.iadd(this.m)),A._forceRed(this)},Ht.prototype.invm=function(f){return this.imod(f._invmp(this.m).mul(this.r2))._forceRed(this)}}(at=ee.nmd(at),this)},875:(at,ce,ee)=>{"use strict";var Pe=ee(434),B=ee(658),ye="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;ce.lW=O,ce.h2=50;var M=2147483647;function Ze(x){if(x>M)throw new RangeError('The value "'+x+'" is invalid for option "size"');var m=new Uint8Array(x);return Object.setPrototypeOf(m,O.prototype),m}function O(x,m,_){if("number"==typeof x){if("string"==typeof m)throw new TypeError('The "string" argument must be of type string. Received type number');return lt(x)}return Le(x,m,_)}function Le(x,m,_){if("string"==typeof x)return function(x,m){if(("string"!=typeof m||""===m)&&(m="utf8"),!O.isEncoding(m))throw new TypeError("Unknown encoding: "+m);var _=0|Ue(x,m),I=Ze(_),F=I.write(x,m);return F!==_&&(I=I.slice(0,F)),I}(x,m);if(ArrayBuffer.isView(x))return function(x){if(Ce(x,Uint8Array)){var m=new Uint8Array(x);return le(m.buffer,m.byteOffset,m.byteLength)}return $(x)}(x);if(null==x)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(Ce(x,ArrayBuffer)||x&&Ce(x.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(Ce(x,SharedArrayBuffer)||x&&Ce(x.buffer,SharedArrayBuffer)))return le(x,m,_);if("number"==typeof x)throw new TypeError('The "value" argument must not be of type number. Received type number');var I=x.valueOf&&x.valueOf();if(null!=I&&I!==x)return O.from(I,m,_);var F=function(x){if(O.isBuffer(x)){var m=0|pe(x.length),_=Ze(m);return 0===_.length||x.copy(_,0,0,m),_}return void 0!==x.length?"number"!=typeof x.length||Re(x.length)?Ze(0):$(x):"Buffer"===x.type&&Array.isArray(x.data)?$(x.data):void 0}(x);if(F)return F;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof x[Symbol.toPrimitive])return O.from(x[Symbol.toPrimitive]("string"),m,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}function he(x){if("number"!=typeof x)throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function lt(x){return he(x),Ze(x<0?0:0|pe(x))}function $(x){for(var m=x.length<0?0:0|pe(x.length),_=Ze(m),I=0;I=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|x}function Ue(x,m){if(O.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||Ce(x,ArrayBuffer))return x.byteLength;if("string"!=typeof x)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);var _=x.length,I=arguments.length>2&&!0===arguments[2];if(!I&&0===_)return 0;for(var F=!1;;)switch(m){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return G(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*_;case"hex":return _>>>1;case"base64":return me(x).length;default:if(F)return I?-1:G(x).length;m=(""+m).toLowerCase(),F=!0}}function ke(x,m,_){var I=!1;if((void 0===m||m<0)&&(m=0),m>this.length||((void 0===_||_>this.length)&&(_=this.length),_<=0)||(_>>>=0)<=(m>>>=0))return"";for(x||(x="utf8");;)switch(x){case"hex":return p(this,m,_);case"utf8":case"utf-8":return b(this,m,_);case"ascii":return S(this,m,_);case"latin1":case"binary":return C(this,m,_);case"base64":return v(this,m,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,m,_);default:if(I)throw new TypeError("Unknown encoding: "+x);x=(x+"").toLowerCase(),I=!0}}function Se(x,m,_){var I=x[m];x[m]=x[_],x[_]=I}function Bt(x,m,_,I,F){if(0===x.length)return-1;if("string"==typeof _?(I=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),Re(_=+_)&&(_=F?0:x.length-1),_<0&&(_=x.length+_),_>=x.length){if(F)return-1;_=x.length-1}else if(_<0){if(!F)return-1;_=0}if("string"==typeof m&&(m=O.from(m,I)),O.isBuffer(m))return 0===m.length?-1:pn(x,m,_,I,F);if("number"==typeof m)return m&=255,"function"==typeof Uint8Array.prototype.indexOf?F?Uint8Array.prototype.indexOf.call(x,m,_):Uint8Array.prototype.lastIndexOf.call(x,m,_):pn(x,[m],_,I,F);throw new TypeError("val must be string, number or Buffer")}function pn(x,m,_,I,F){var pt,z=1,oe=x.length,je=m.length;if(void 0!==I&&("ucs2"===(I=String(I).toLowerCase())||"ucs-2"===I||"utf16le"===I||"utf-16le"===I)){if(x.length<2||m.length<2)return-1;z=2,oe/=2,je/=2,_/=2}function Be($t,Ut){return 1===z?$t[Ut]:$t.readUInt16BE(Ut*z)}if(F){var rt=-1;for(pt=_;ptoe&&(_=oe-je),pt=_;pt>=0;pt--){for(var Ye=!0,Wr=0;WrF&&(I=F):I=F;var z=m.length;I>z/2&&(I=z/2);for(var oe=0;oe>8,z.push(_%256),z.push(I);return z}(m,x.length-_),x,_,I)}function v(x,m,_){return Pe.fromByteArray(0===m&&_===x.length?x:x.slice(m,_))}function b(x,m,_){_=Math.min(x.length,_);for(var I=[],F=m;F<_;){var Be,pt,rt,Ye,z=x[F],oe=null,je=z>239?4:z>223?3:z>191?2:1;if(F+je<=_)switch(je){case 1:z<128&&(oe=z);break;case 2:128==(192&(Be=x[F+1]))&&(Ye=(31&z)<<6|63&Be)>127&&(oe=Ye);break;case 3:pt=x[F+2],128==(192&(Be=x[F+1]))&&128==(192&pt)&&(Ye=(15&z)<<12|(63&Be)<<6|63&pt)>2047&&(Ye<55296||Ye>57343)&&(oe=Ye);break;case 4:pt=x[F+2],rt=x[F+3],128==(192&(Be=x[F+1]))&&128==(192&pt)&&128==(192&rt)&&(Ye=(15&z)<<18|(63&Be)<<12|(63&pt)<<6|63&rt)>65535&&Ye<1114112&&(oe=Ye)}null===oe?(oe=65533,je=1):oe>65535&&(I.push((oe-=65536)>>>10&1023|55296),oe=56320|1023&oe),I.push(oe),F+=je}return function(x){var m=x.length;if(m<=E)return String.fromCharCode.apply(String,x);for(var _="",I=0;IF.length?O.from(oe).copy(F,z):Uint8Array.prototype.set.call(F,oe,z);else{if(!O.isBuffer(oe))throw new TypeError('"list" argument must be an Array of Buffers');oe.copy(F,z)}z+=oe.length}return F},O.byteLength=Ue,O.prototype._isBuffer=!0,O.prototype.swap16=function(){var m=this.length;if(m%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var _=0;__&&(m+=" ... "),""},ye&&(O.prototype[ye]=O.prototype.inspect),O.prototype.compare=function(m,_,I,F,z){if(Ce(m,Uint8Array)&&(m=O.from(m,m.offset,m.byteLength)),!O.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(void 0===_&&(_=0),void 0===I&&(I=m?m.length:0),void 0===F&&(F=0),void 0===z&&(z=this.length),_<0||I>m.length||F<0||z>this.length)throw new RangeError("out of range index");if(F>=z&&_>=I)return 0;if(F>=z)return-1;if(_>=I)return 1;if(this===m)return 0;for(var oe=(z>>>=0)-(F>>>=0),je=(I>>>=0)-(_>>>=0),Be=Math.min(oe,je),pt=this.slice(F,z),rt=m.slice(_,I),Ye=0;Ye>>=0,isFinite(I)?(I>>>=0,void 0===F&&(F="utf8")):(F=I,I=void 0)}var z=this.length-_;if((void 0===I||I>z)&&(I=z),m.length>0&&(I<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");for(var oe=!1;;)switch(F){case"hex":return nt(this,m,_,I);case"utf8":case"utf-8":return Ht(this,m,_,I);case"ascii":case"latin1":case"binary":return k(this,m,_,I);case"base64":return f(this,m,_,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,m,_,I);default:if(oe)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),oe=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function S(x,m,_){var I="";_=Math.min(x.length,_);for(var F=m;F<_;++F)I+=String.fromCharCode(127&x[F]);return I}function C(x,m,_){var I="";_=Math.min(x.length,_);for(var F=m;F<_;++F)I+=String.fromCharCode(x[F]);return I}function p(x,m,_){var I=x.length;(!m||m<0)&&(m=0),(!_||_<0||_>I)&&(_=I);for(var F="",z=m;z<_;++z)F+=be[x[z]];return F}function N(x,m,_){for(var I=x.slice(m,_),F="",z=0;z_)throw new RangeError("Trying to access beyond buffer length")}function ae(x,m,_,I,F,z){if(!O.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>F||mx.length)throw new RangeError("Index out of range")}function ie(x,m,_,I,F,z){if(_+I>x.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Ge(x,m,_,I,F){return m=+m,_>>>=0,F||ie(x,0,_,4),B.write(x,m,_,I,23,4),_+4}function Xe(x,m,_,I,F){return m=+m,_>>>=0,F||ie(x,0,_,8),B.write(x,m,_,I,52,8),_+8}O.prototype.slice=function(m,_){var I=this.length;(m=~~m)<0?(m+=I)<0&&(m=0):m>I&&(m=I),(_=void 0===_?I:~~_)<0?(_+=I)<0&&(_=0):_>I&&(_=I),_>>=0,_>>>=0,I||Q(m,_,this.length);for(var F=this[m],z=1,oe=0;++oe<_&&(z*=256);)F+=this[m+oe]*z;return F},O.prototype.readUintBE=O.prototype.readUIntBE=function(m,_,I){m>>>=0,_>>>=0,I||Q(m,_,this.length);for(var F=this[m+--_],z=1;_>0&&(z*=256);)F+=this[m+--_]*z;return F},O.prototype.readUint8=O.prototype.readUInt8=function(m,_){return m>>>=0,_||Q(m,1,this.length),this[m]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(m,_){return m>>>=0,_||Q(m,2,this.length),this[m]|this[m+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(m,_){return m>>>=0,_||Q(m,2,this.length),this[m]<<8|this[m+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(m,_){return m>>>=0,_||Q(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+16777216*this[m+3]},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(m,_){return m>>>=0,_||Q(m,4,this.length),16777216*this[m]+(this[m+1]<<16|this[m+2]<<8|this[m+3])},O.prototype.readIntLE=function(m,_,I){m>>>=0,_>>>=0,I||Q(m,_,this.length);for(var F=this[m],z=1,oe=0;++oe<_&&(z*=256);)F+=this[m+oe]*z;return F>=(z*=128)&&(F-=Math.pow(2,8*_)),F},O.prototype.readIntBE=function(m,_,I){m>>>=0,_>>>=0,I||Q(m,_,this.length);for(var F=_,z=1,oe=this[m+--F];F>0&&(z*=256);)oe+=this[m+--F]*z;return oe>=(z*=128)&&(oe-=Math.pow(2,8*_)),oe},O.prototype.readInt8=function(m,_){return m>>>=0,_||Q(m,1,this.length),128&this[m]?-1*(255-this[m]+1):this[m]},O.prototype.readInt16LE=function(m,_){m>>>=0,_||Q(m,2,this.length);var I=this[m]|this[m+1]<<8;return 32768&I?4294901760|I:I},O.prototype.readInt16BE=function(m,_){m>>>=0,_||Q(m,2,this.length);var I=this[m+1]|this[m]<<8;return 32768&I?4294901760|I:I},O.prototype.readInt32LE=function(m,_){return m>>>=0,_||Q(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},O.prototype.readInt32BE=function(m,_){return m>>>=0,_||Q(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},O.prototype.readFloatLE=function(m,_){return m>>>=0,_||Q(m,4,this.length),B.read(this,m,!0,23,4)},O.prototype.readFloatBE=function(m,_){return m>>>=0,_||Q(m,4,this.length),B.read(this,m,!1,23,4)},O.prototype.readDoubleLE=function(m,_){return m>>>=0,_||Q(m,8,this.length),B.read(this,m,!0,52,8)},O.prototype.readDoubleBE=function(m,_){return m>>>=0,_||Q(m,8,this.length),B.read(this,m,!1,52,8)},O.prototype.writeUintLE=O.prototype.writeUIntLE=function(m,_,I,F){m=+m,_>>>=0,I>>>=0,F||ae(this,m,_,I,Math.pow(2,8*I)-1,0);var oe=1,je=0;for(this[_]=255&m;++je>>=0,I>>>=0,F||ae(this,m,_,I,Math.pow(2,8*I)-1,0);var oe=I-1,je=1;for(this[_+oe]=255&m;--oe>=0&&(je*=256);)this[_+oe]=m/je&255;return _+I},O.prototype.writeUint8=O.prototype.writeUInt8=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,1,255,0),this[_]=255&m,_+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,2,65535,0),this[_]=255&m,this[_+1]=m>>>8,_+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,2,65535,0),this[_]=m>>>8,this[_+1]=255&m,_+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,4,4294967295,0),this[_+3]=m>>>24,this[_+2]=m>>>16,this[_+1]=m>>>8,this[_]=255&m,_+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,4,4294967295,0),this[_]=m>>>24,this[_+1]=m>>>16,this[_+2]=m>>>8,this[_+3]=255&m,_+4},O.prototype.writeIntLE=function(m,_,I,F){if(m=+m,_>>>=0,!F){var z=Math.pow(2,8*I-1);ae(this,m,_,I,z-1,-z)}var oe=0,je=1,Be=0;for(this[_]=255&m;++oe>0)-Be&255;return _+I},O.prototype.writeIntBE=function(m,_,I,F){if(m=+m,_>>>=0,!F){var z=Math.pow(2,8*I-1);ae(this,m,_,I,z-1,-z)}var oe=I-1,je=1,Be=0;for(this[_+oe]=255&m;--oe>=0&&(je*=256);)m<0&&0===Be&&0!==this[_+oe+1]&&(Be=1),this[_+oe]=(m/je>>0)-Be&255;return _+I},O.prototype.writeInt8=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,1,127,-128),m<0&&(m=255+m+1),this[_]=255&m,_+1},O.prototype.writeInt16LE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,2,32767,-32768),this[_]=255&m,this[_+1]=m>>>8,_+2},O.prototype.writeInt16BE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,2,32767,-32768),this[_]=m>>>8,this[_+1]=255&m,_+2},O.prototype.writeInt32LE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,4,2147483647,-2147483648),this[_]=255&m,this[_+1]=m>>>8,this[_+2]=m>>>16,this[_+3]=m>>>24,_+4},O.prototype.writeInt32BE=function(m,_,I){return m=+m,_>>>=0,I||ae(this,m,_,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[_]=m>>>24,this[_+1]=m>>>16,this[_+2]=m>>>8,this[_+3]=255&m,_+4},O.prototype.writeFloatLE=function(m,_,I){return Ge(this,m,_,!0,I)},O.prototype.writeFloatBE=function(m,_,I){return Ge(this,m,_,!1,I)},O.prototype.writeDoubleLE=function(m,_,I){return Xe(this,m,_,!0,I)},O.prototype.writeDoubleBE=function(m,_,I){return Xe(this,m,_,!1,I)},O.prototype.copy=function(m,_,I,F){if(!O.isBuffer(m))throw new TypeError("argument should be a Buffer");if(I||(I=0),!F&&0!==F&&(F=this.length),_>=m.length&&(_=m.length),_||(_=0),F>0&&F=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),m.length-_>>=0,I=void 0===I?this.length:I>>>0,m||(m=0),"number"==typeof m)for(oe=_;oe55295&&_<57344){if(!F){if(_>56319){(m-=3)>-1&&z.push(239,191,189);continue}if(oe+1===I){(m-=3)>-1&&z.push(239,191,189);continue}F=_;continue}if(_<56320){(m-=3)>-1&&z.push(239,191,189),F=_;continue}_=65536+(F-55296<<10|_-56320)}else F&&(m-=3)>-1&&z.push(239,191,189);if(F=null,_<128){if((m-=1)<0)break;z.push(_)}else if(_<2048){if((m-=2)<0)break;z.push(_>>6|192,63&_|128)}else if(_<65536){if((m-=3)<0)break;z.push(_>>12|224,_>>6&63|128,63&_|128)}else{if(!(_<1114112))throw new Error("Invalid code point");if((m-=4)<0)break;z.push(_>>18|240,_>>12&63|128,_>>6&63|128,63&_|128)}}return z}function me(x){return Pe.toByteArray(function(x){if((x=(x=x.split("=")[0]).trim().replace(w,"")).length<2)return"";for(;x.length%4!=0;)x+="=";return x}(x))}function we(x,m,_,I){for(var F=0;F=m.length||F>=x.length);++F)m[F+_]=x[F];return F}function Ce(x,m){return x instanceof m||null!=x&&null!=x.constructor&&null!=x.constructor.name&&x.constructor.name===m.name}function Re(x){return x!=x}var be=function(){for(var x="0123456789abcdef",m=new Array(256),_=0;_<16;++_)for(var I=16*_,F=0;F<16;++F)m[I+F]=x[_]+x[F];return m}()},909:(at,ce,ee)=>{var j=ce;j.utils=ee(291),j.common=ee(393),j.sha=ee(221),j.ripemd=ee(960),j.hmac=ee(905),j.sha1=j.sha.sha1,j.sha256=j.sha.sha256,j.sha224=j.sha.sha224,j.sha384=j.sha.sha384,j.sha512=j.sha.sha512,j.ripemd160=j.ripemd.ripemd160},393:(at,ce,ee)=>{"use strict";var j=ee(291),Pe=ee(55);function B(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}ce.BlockHash=B,B.prototype.update=function(M,de){if(M=j.toArray(M,de),this.pending=this.pending?this.pending.concat(M):M,this.pendingTotal+=M.length,this.pending.length>=this._delta8){var Ze=(M=this.pending).length%this._delta8;this.pending=M.slice(M.length-Ze,M.length),0===this.pending.length&&(this.pending=null),M=j.join32(M,0,M.length-Ze,this.endian);for(var O=0;O>>24&255,O[Le++]=M>>>16&255,O[Le++]=M>>>8&255,O[Le++]=255&M}else for(O[Le++]=255&M,O[Le++]=M>>>8&255,O[Le++]=M>>>16&255,O[Le++]=M>>>24&255,O[Le++]=0,O[Le++]=0,O[Le++]=0,O[Le++]=0,he=8;he{"use strict";var j=ee(291),Pe=ee(55);function B(ye,M,de){if(!(this instanceof B))return new B(ye,M,de);this.Hash=ye,this.blockSize=ye.blockSize/8,this.outSize=ye.outSize/8,this.inner=null,this.outer=null,this._init(j.toArray(M,de))}at.exports=B,B.prototype._init=function(M){M.length>this.blockSize&&(M=(new this.Hash).update(M).digest()),Pe(M.length<=this.blockSize);for(var de=M.length;de{"use strict";var j=ee(291),Pe=ee(393),B=j.rotl32,ye=j.sum32,M=j.sum32_3,de=j.sum32_4,Ze=Pe.BlockHash;function O(){if(!(this instanceof O))return new O;Ze.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Le(le,Ae,pe,Ee){return le<=15?Ae^pe^Ee:le<=31?Ae&pe|~Ae&Ee:le<=47?(Ae|~pe)^Ee:le<=63?Ae&Ee|pe&~Ee:Ae^(pe|~Ee)}function ve(le){return le<=15?1352829926:le<=31?1548603684:le<=47?1836072691:le<=63?2053994217:0}j.inherits(O,Ze),ce.ripemd160=O,O.blockSize=512,O.outSize=160,O.hmacStrength=192,O.padLength=64,O.prototype._update=function(Ae,pe){for(var Ee=this.h[0],Ue=this.h[1],ke=this.h[2],Se=this.h[3],Bt=this.h[4],pn=Ee,nt=Ue,Ht=ke,k=Se,f=Bt,h=0;h<80;h++){var v=ye(B(de(Ee,Le(h,Ue,ke,Se),Ae[lt[h]+pe],(le=h)<=15?0:le<=31?1518500249:le<=47?1859775393:le<=63?2400959708:2840853838),$[h]),Bt);Ee=Bt,Bt=Se,Se=B(ke,10),ke=Ue,Ue=v,v=ye(B(de(pn,Le(79-h,nt,Ht,k),Ae[De[h]+pe],ve(h)),ne[h]),f),pn=f,f=k,k=B(Ht,10),Ht=nt,nt=v}var le;v=M(this.h[1],ke,k),this.h[1]=M(this.h[2],Se,f),this.h[2]=M(this.h[3],Bt,pn),this.h[3]=M(this.h[4],Ee,nt),this.h[4]=M(this.h[0],Ue,Ht),this.h[0]=v},O.prototype._digest=function(Ae){return"hex"===Ae?j.toHex32(this.h,"little"):j.split32(this.h,"little")};var lt=[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],De=[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],$=[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],ne=[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]},221:(at,ce,ee)=>{"use strict";ce.sha1=ee(605),ce.sha224=ee(643),ce.sha256=ee(21),ce.sha384=ee(513),ce.sha512=ee(958)},605:(at,ce,ee)=>{"use strict";var j=ee(291),Pe=ee(393),B=ee(491),ye=j.rotl32,M=j.sum32,de=j.sum32_5,Ze=B.ft_1,O=Pe.BlockHash,Le=[1518500249,1859775393,2400959708,3395469782];function he(){if(!(this instanceof he))return new he;O.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}j.inherits(he,O),at.exports=he,he.blockSize=512,he.outSize=160,he.hmacStrength=80,he.padLength=64,he.prototype._update=function(lt,De){for(var $=this.W,ne=0;ne<16;ne++)$[ne]=lt[De+ne];for(;ne<$.length;ne++)$[ne]=ye($[ne-3]^$[ne-8]^$[ne-14]^$[ne-16],1);var le=this.h[0],Ae=this.h[1],pe=this.h[2],Ee=this.h[3],Ue=this.h[4];for(ne=0;ne<$.length;ne++){var ke=~~(ne/20),Se=de(ye(le,5),Ze(ke,Ae,pe,Ee),Ue,$[ne],Le[ke]);Ue=Ee,Ee=pe,pe=ye(Ae,30),Ae=le,le=Se}this.h[0]=M(this.h[0],le),this.h[1]=M(this.h[1],Ae),this.h[2]=M(this.h[2],pe),this.h[3]=M(this.h[3],Ee),this.h[4]=M(this.h[4],Ue)},he.prototype._digest=function(lt){return"hex"===lt?j.toHex32(this.h,"big"):j.split32(this.h,"big")}},643:(at,ce,ee)=>{"use strict";var j=ee(291),Pe=ee(21);function B(){if(!(this instanceof B))return new B;Pe.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}j.inherits(B,Pe),at.exports=B,B.blockSize=512,B.outSize=224,B.hmacStrength=192,B.padLength=64,B.prototype._digest=function(M){return"hex"===M?j.toHex32(this.h.slice(0,7),"big"):j.split32(this.h.slice(0,7),"big")}},21:(at,ce,ee)=>{"use strict";var j=ee(291),Pe=ee(393),B=ee(491),ye=ee(55),M=j.sum32,de=j.sum32_4,Ze=j.sum32_5,O=B.ch32,Le=B.maj32,he=B.s0_256,ve=B.s1_256,lt=B.g0_256,De=B.g1_256,$=Pe.BlockHash,ne=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function le(){if(!(this instanceof le))return new le;$.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ne,this.W=new Array(64)}j.inherits(le,$),at.exports=le,le.blockSize=512,le.outSize=256,le.hmacStrength=192,le.padLength=64,le.prototype._update=function(pe,Ee){for(var Ue=this.W,ke=0;ke<16;ke++)Ue[ke]=pe[Ee+ke];for(;ke{"use strict";var j=ee(291),Pe=ee(958);function B(){if(!(this instanceof B))return new B;Pe.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}j.inherits(B,Pe),at.exports=B,B.blockSize=1024,B.outSize=384,B.hmacStrength=192,B.padLength=128,B.prototype._digest=function(M){return"hex"===M?j.toHex32(this.h.slice(0,12),"big"):j.split32(this.h.slice(0,12),"big")}},958:(at,ce,ee)=>{"use strict";var j=ee(291),Pe=ee(393),B=ee(55),ye=j.rotr64_hi,M=j.rotr64_lo,de=j.shr64_hi,Ze=j.shr64_lo,O=j.sum64,Le=j.sum64_hi,he=j.sum64_lo,ve=j.sum64_4_hi,lt=j.sum64_4_lo,De=j.sum64_5_hi,$=j.sum64_5_lo,ne=Pe.BlockHash,le=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Ae(){if(!(this instanceof Ae))return new Ae;ne.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=le,this.W=new Array(160)}function pe(v,b,E,A,S){var C=v&E^~v&S;return C<0&&(C+=4294967296),C}function Ee(v,b,E,A,S,C){var p=b&A^~b&C;return p<0&&(p+=4294967296),p}function Ue(v,b,E,A,S){var C=v&E^v&S^E&S;return C<0&&(C+=4294967296),C}function ke(v,b,E,A,S,C){var p=b&A^b&C^A&C;return p<0&&(p+=4294967296),p}function Se(v,b){var C=ye(v,b,28)^ye(b,v,2)^ye(b,v,7);return C<0&&(C+=4294967296),C}function Bt(v,b){var C=M(v,b,28)^M(b,v,2)^M(b,v,7);return C<0&&(C+=4294967296),C}function pn(v,b){var C=ye(v,b,14)^ye(v,b,18)^ye(b,v,9);return C<0&&(C+=4294967296),C}function nt(v,b){var C=M(v,b,14)^M(v,b,18)^M(b,v,9);return C<0&&(C+=4294967296),C}function Ht(v,b){var C=ye(v,b,1)^ye(v,b,8)^de(v,b,7);return C<0&&(C+=4294967296),C}function k(v,b){var C=M(v,b,1)^M(v,b,8)^Ze(v,b,7);return C<0&&(C+=4294967296),C}function f(v,b){var C=ye(v,b,19)^ye(b,v,29)^de(v,b,6);return C<0&&(C+=4294967296),C}function h(v,b){var C=M(v,b,19)^M(b,v,29)^Ze(v,b,6);return C<0&&(C+=4294967296),C}j.inherits(Ae,ne),at.exports=Ae,Ae.blockSize=1024,Ae.outSize=512,Ae.hmacStrength=192,Ae.padLength=128,Ae.prototype._prepareBlock=function(b,E){for(var A=this.W,S=0;S<32;S++)A[S]=b[E+S];for(;S{"use strict";var Pe=ee(291).rotr32;function ye(ve,lt,De){return ve<^~ve&De}function M(ve,lt,De){return ve<^ve&De^lt&De}function de(ve,lt,De){return ve^lt^De}ce.ft_1=function(ve,lt,De,$){return 0===ve?ye(lt,De,$):1===ve||3===ve?de(lt,De,$):2===ve?M(lt,De,$):void 0},ce.ch32=ye,ce.maj32=M,ce.p32=de,ce.s0_256=function(ve){return Pe(ve,2)^Pe(ve,13)^Pe(ve,22)},ce.s1_256=function(ve){return Pe(ve,6)^Pe(ve,11)^Pe(ve,25)},ce.g0_256=function(ve){return Pe(ve,7)^Pe(ve,18)^ve>>>3},ce.g1_256=function(ve){return Pe(ve,17)^Pe(ve,19)^ve>>>10}},291:(at,ce,ee)=>{"use strict";var j=ee(55),Pe=ee(879);function B(h,v){return!(55296!=(64512&h.charCodeAt(v))||v<0||v+1>=h.length)&&56320==(64512&h.charCodeAt(v+1))}function de(h){return(h>>>24|h>>>8&65280|h<<8&16711680|(255&h)<<24)>>>0}function O(h){return 1===h.length?"0"+h:h}function Le(h){return 7===h.length?"0"+h:6===h.length?"00"+h:5===h.length?"000"+h:4===h.length?"0000"+h:3===h.length?"00000"+h:2===h.length?"000000"+h:1===h.length?"0000000"+h:h}ce.inherits=Pe,ce.toArray=function(h,v){if(Array.isArray(h))return h.slice();if(!h)return[];var b=[];if("string"==typeof h)if(v){if("hex"===v)for((h=h.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(h="0"+h),A=0;A>6|192,b[E++]=63&S|128):B(h,A)?(S=65536+((1023&S)<<10)+(1023&h.charCodeAt(++A)),b[E++]=S>>18|240,b[E++]=S>>12&63|128,b[E++]=S>>6&63|128,b[E++]=63&S|128):(b[E++]=S>>12|224,b[E++]=S>>6&63|128,b[E++]=63&S|128)}else for(A=0;A>>0;return S},ce.split32=function(h,v){for(var b=new Array(4*h.length),E=0,A=0;E>>24,b[A+1]=S>>>16&255,b[A+2]=S>>>8&255,b[A+3]=255&S):(b[A+3]=S>>>24,b[A+2]=S>>>16&255,b[A+1]=S>>>8&255,b[A]=255&S)}return b},ce.rotr32=function(h,v){return h>>>v|h<<32-v},ce.rotl32=function(h,v){return h<>>32-v},ce.sum32=function(h,v){return h+v>>>0},ce.sum32_3=function(h,v,b){return h+v+b>>>0},ce.sum32_4=function(h,v,b,E){return h+v+b+E>>>0},ce.sum32_5=function(h,v,b,E,A){return h+v+b+E+A>>>0},ce.sum64=function(h,v,b,E){var C=E+h[v+1]>>>0;h[v]=(C>>0,h[v+1]=C},ce.sum64_hi=function(h,v,b,E){return(v+E>>>0>>0},ce.sum64_lo=function(h,v,b,E){return v+E>>>0},ce.sum64_4_hi=function(h,v,b,E,A,S,C,p){var N=0,Q=v;return N+=(Q=Q+E>>>0)>>0)>>0)>>0},ce.sum64_4_lo=function(h,v,b,E,A,S,C,p){return v+E+S+p>>>0},ce.sum64_5_hi=function(h,v,b,E,A,S,C,p,N,Q){var ae=0,ie=v;return ae+=(ie=ie+E>>>0)>>0)>>0)>>0)>>0},ce.sum64_5_lo=function(h,v,b,E,A,S,C,p,N,Q){return v+E+S+p+Q>>>0},ce.rotr64_hi=function(h,v,b){return(v<<32-b|h>>>b)>>>0},ce.rotr64_lo=function(h,v,b){return(h<<32-b|v>>>b)>>>0},ce.shr64_hi=function(h,v,b){return h>>>b},ce.shr64_lo=function(h,v,b){return(h<<32-b|v>>>b)>>>0}},658:(at,ce)=>{ce.read=function(ee,j,Pe,B,ye){var M,de,Ze=8*ye-B-1,O=(1<>1,he=-7,ve=Pe?ye-1:0,lt=Pe?-1:1,De=ee[j+ve];for(ve+=lt,M=De&(1<<-he)-1,De>>=-he,he+=Ze;he>0;M=256*M+ee[j+ve],ve+=lt,he-=8);for(de=M&(1<<-he)-1,M>>=-he,he+=B;he>0;de=256*de+ee[j+ve],ve+=lt,he-=8);if(0===M)M=1-Le;else{if(M===O)return de?NaN:1/0*(De?-1:1);de+=Math.pow(2,B),M-=Le}return(De?-1:1)*de*Math.pow(2,M-B)},ce.write=function(ee,j,Pe,B,ye,M){var de,Ze,O,Le=8*M-ye-1,he=(1<>1,lt=23===ye?Math.pow(2,-24)-Math.pow(2,-77):0,De=B?0:M-1,$=B?1:-1,ne=j<0||0===j&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(Ze=isNaN(j)?1:0,de=he):(de=Math.floor(Math.log(j)/Math.LN2),j*(O=Math.pow(2,-de))<1&&(de--,O*=2),(j+=de+ve>=1?lt/O:lt*Math.pow(2,1-ve))*O>=2&&(de++,O/=2),de+ve>=he?(Ze=0,de=he):de+ve>=1?(Ze=(j*O-1)*Math.pow(2,ye),de+=ve):(Ze=j*Math.pow(2,ve-1)*Math.pow(2,ye),de=0));ye>=8;ee[Pe+De]=255&Ze,De+=$,Ze/=256,ye-=8);for(de=de<0;ee[Pe+De]=255&de,De+=$,de/=256,Le-=8);ee[Pe+De-$]|=128*ne}},879:at=>{at.exports="function"==typeof Object.create?function(ee,j){j&&(ee.super_=j,ee.prototype=Object.create(j.prototype,{constructor:{value:ee,enumerable:!1,writable:!0,configurable:!0}}))}:function(ee,j){if(j){ee.super_=j;var Pe=function(){};Pe.prototype=j.prototype,ee.prototype=new Pe,ee.prototype.constructor=ee}}},109:(at,ce,ee)=>{var j;!function(){"use strict";var Pe="input is invalid type",ye="object"==typeof window,M=ye?window:{};M.JS_SHA3_NO_WINDOW&&(ye=!1);var de=!ye&&"object"==typeof self;!M.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?M=global:de&&(M=self);var O=!M.JS_SHA3_NO_COMMON_JS&&at.exports,Le=ee.amdO,he=!M.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ve="0123456789abcdef".split(""),De=[4,1024,262144,67108864],le=[0,8,16,24],Ae=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],pe=[224,256,384,512],Ee=[128,256],Ue=["hex","buffer","arrayBuffer","array","digest"],ke={128:168,256:136};(M.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(w){return"[object Array]"===Object.prototype.toString.call(w)}),he&&(M.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(w){return"object"==typeof w&&w.buffer&&w.buffer.constructor===ArrayBuffer});for(var Se=function(w,Y,G){return function(q){return new ie(w,Y,w).update(q)[G]()}},Bt=function(w,Y,G){return function(q,xe){return new ie(w,Y,xe).update(q)[G]()}},pn=function(w,Y,G){return function(q,xe,me,we){return E["cshake"+w].update(q,xe,me,we)[G]()}},nt=function(w,Y,G){return function(q,xe,me,we){return E["kmac"+w].update(q,xe,me,we)[G]()}},Ht=function(w,Y,G,q){for(var xe=0;xe>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(31&G)>>3;for(var q=0;q<50;++q)this.s[q]=0}function Ge(w,Y,G){ie.call(this,w,Y,G)}ie.prototype.update=function(w){if(this.finalized)throw new Error("finalize already called");var Y,G=typeof w;if("string"!==G){if("object"!==G)throw new Error(Pe);if(null===w)throw new Error(Pe);if(he&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||he&&ArrayBuffer.isView(w)))throw new Error(Pe);Y=!0}for(var be,x,q=this.blocks,xe=this.byteCount,me=w.length,we=this.blockCount,Ce=0,Re=this.s;Ce>2]|=w[Ce]<>2]|=x<>2]|=(192|x>>6)<>2]|=(128|63&x)<=57344?(q[be>>2]|=(224|x>>12)<>2]|=(128|x>>6&63)<>2]|=(128|63&x)<>2]|=(240|x>>18)<>2]|=(128|x>>12&63)<>2]|=(128|x>>6&63)<>2]|=(128|63&x)<=xe){for(this.start=be-xe,this.block=q[we],be=0;be>=8);G>0;)xe.unshift(G),G=255&(w>>=8),++q;return Y?xe.push(q):xe.unshift(q),this.update(xe),xe.length},ie.prototype.encodeString=function(w){var Y,G=typeof w;if("string"!==G){if("object"!==G)throw new Error(Pe);if(null===w)throw new Error(Pe);if(he&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||he&&ArrayBuffer.isView(w)))throw new Error(Pe);Y=!0}var q=0;if(Y)q=w.length;else for(var me=0;me=57344?q+=3:(we=65536+((1023&we)<<10|1023&w.charCodeAt(++me)),q+=4)}return q+=this.encode(8*q),this.update(w),q},ie.prototype.bytepad=function(w,Y){for(var G=this.encode(Y),q=0;q>2]|=this.padding[3&Y],this.lastByteIndex===this.byteCount)for(w[0]=w[G],Y=1;Y>4&15]+ve[15&Ce]+ve[Ce>>12&15]+ve[Ce>>8&15]+ve[Ce>>20&15]+ve[Ce>>16&15]+ve[Ce>>28&15]+ve[Ce>>24&15];me%w==0&&(Xe(Y),xe=0)}return q&&(we+=ve[(Ce=Y[xe])>>4&15]+ve[15&Ce],q>1&&(we+=ve[Ce>>12&15]+ve[Ce>>8&15]),q>2&&(we+=ve[Ce>>20&15]+ve[Ce>>16&15])),we},ie.prototype.buffer=ie.prototype.arrayBuffer=function(){this.finalize();var Ce,w=this.blockCount,Y=this.s,G=this.outputBlocks,q=this.extraBytes,xe=0,me=0,we=this.outputBits>>3;Ce=q?new ArrayBuffer(G+1<<2):new ArrayBuffer(we);for(var Re=new Uint32Array(Ce);me>8&255,we[Ce+2]=Re>>16&255,we[Ce+3]=Re>>24&255;me%w==0&&Xe(Y)}return q&&(we[Ce=me<<2]=255&(Re=Y[xe]),q>1&&(we[Ce+1]=Re>>8&255),q>2&&(we[Ce+2]=Re>>16&255)),we},(Ge.prototype=new ie).finalize=function(){return this.encode(this.outputBits,!0),ie.prototype.finalize.call(this)};var Xe=function(w){var Y,G,q,xe,me,we,Ce,Re,be,x,m,_,I,F,z,oe,je,Be,pt,rt,Ye,Wr,$t,Ut,Fo,an,gn,Oo,ln,un,Lo,rn,Ke,Oi,Fe,Zt,Vo,Ve,ge,lo,mn,Ft,ds,Xt,Ie,An,cn,_n,fs,Gt,Dt,hs,dn,yn,or,Bo,Ho,Uo,jo,uo,$o,co,Go;for(q=0;q<48;q+=2)xe=w[0]^w[10]^w[20]^w[30]^w[40],me=w[1]^w[11]^w[21]^w[31]^w[41],Re=w[4]^w[14]^w[24]^w[34]^w[44],be=w[5]^w[15]^w[25]^w[35]^w[45],x=w[6]^w[16]^w[26]^w[36]^w[46],m=w[7]^w[17]^w[27]^w[37]^w[47],G=(I=w[9]^w[19]^w[29]^w[39]^w[49])^((Ce=w[3]^w[13]^w[23]^w[33]^w[43])<<1|(we=w[2]^w[12]^w[22]^w[32]^w[42])>>>31),w[0]^=Y=(_=w[8]^w[18]^w[28]^w[38]^w[48])^(we<<1|Ce>>>31),w[1]^=G,w[10]^=Y,w[11]^=G,w[20]^=Y,w[21]^=G,w[30]^=Y,w[31]^=G,w[40]^=Y,w[41]^=G,G=me^(be<<1|Re>>>31),w[2]^=Y=xe^(Re<<1|be>>>31),w[3]^=G,w[12]^=Y,w[13]^=G,w[22]^=Y,w[23]^=G,w[32]^=Y,w[33]^=G,w[42]^=Y,w[43]^=G,G=Ce^(m<<1|x>>>31),w[4]^=Y=we^(x<<1|m>>>31),w[5]^=G,w[14]^=Y,w[15]^=G,w[24]^=Y,w[25]^=G,w[34]^=Y,w[35]^=G,w[44]^=Y,w[45]^=G,G=be^(I<<1|_>>>31),w[6]^=Y=Re^(_<<1|I>>>31),w[7]^=G,w[16]^=Y,w[17]^=G,w[26]^=Y,w[27]^=G,w[36]^=Y,w[37]^=G,w[46]^=Y,w[47]^=G,G=m^(me<<1|xe>>>31),w[8]^=Y=x^(xe<<1|me>>>31),w[9]^=G,w[18]^=Y,w[19]^=G,w[28]^=Y,w[29]^=G,w[38]^=Y,w[39]^=G,w[48]^=Y,w[49]^=G,z=w[1],An=w[11]<<4|w[10]>>>28,cn=w[10]<<4|w[11]>>>28,Oo=w[20]<<3|w[21]>>>29,ln=w[21]<<3|w[20]>>>29,uo=w[31]<<9|w[30]>>>23,$o=w[30]<<9|w[31]>>>23,Ft=w[40]<<18|w[41]>>>14,ds=w[41]<<18|w[40]>>>14,Oi=w[2]<<1|w[3]>>>31,Fe=w[3]<<1|w[2]>>>31,je=w[12]<<12|w[13]>>>20,_n=w[22]<<10|w[23]>>>22,fs=w[23]<<10|w[22]>>>22,un=w[33]<<13|w[32]>>>19,Lo=w[32]<<13|w[33]>>>19,co=w[42]<<2|w[43]>>>30,Go=w[43]<<2|w[42]>>>30,yn=w[5]<<30|w[4]>>>2,or=w[4]<<30|w[5]>>>2,Zt=w[14]<<6|w[15]>>>26,Vo=w[15]<<6|w[14]>>>26,pt=w[24]<<11|w[25]>>>21,Gt=w[34]<<15|w[35]>>>17,Dt=w[35]<<15|w[34]>>>17,rn=w[45]<<29|w[44]>>>3,Ke=w[44]<<29|w[45]>>>3,Ut=w[6]<<28|w[7]>>>4,Fo=w[7]<<28|w[6]>>>4,Bo=w[17]<<23|w[16]>>>9,Ho=w[16]<<23|w[17]>>>9,Ve=w[26]<<25|w[27]>>>7,ge=w[27]<<25|w[26]>>>7,rt=w[36]<<21|w[37]>>>11,Ye=w[37]<<21|w[36]>>>11,hs=w[47]<<24|w[46]>>>8,dn=w[46]<<24|w[47]>>>8,Xt=w[8]<<27|w[9]>>>5,Ie=w[9]<<27|w[8]>>>5,an=w[18]<<20|w[19]>>>12,gn=w[19]<<20|w[18]>>>12,Uo=w[29]<<7|w[28]>>>25,jo=w[28]<<7|w[29]>>>25,lo=w[38]<<8|w[39]>>>24,mn=w[39]<<8|w[38]>>>24,Wr=w[48]<<14|w[49]>>>18,$t=w[49]<<14|w[48]>>>18,w[0]=(F=w[0])^~(oe=w[13]<<12|w[12]>>>20)&(Be=w[25]<<11|w[24]>>>21),w[1]=z^~je&pt,w[10]=Ut^~an&Oo,w[11]=Fo^~gn&ln,w[20]=Oi^~Zt&Ve,w[21]=Fe^~Vo&ge,w[30]=Xt^~An&_n,w[31]=Ie^~cn&fs,w[40]=yn^~Bo&Uo,w[41]=or^~Ho&jo,w[2]=oe^~Be&rt,w[3]=je^~pt&Ye,w[12]=an^~Oo&un,w[13]=gn^~ln&Lo,w[22]=Zt^~Ve&lo,w[23]=Vo^~ge&mn,w[32]=An^~_n&Gt,w[33]=cn^~fs&Dt,w[42]=Bo^~Uo&uo,w[43]=Ho^~jo&$o,w[4]=Be^~rt&Wr,w[5]=pt^~Ye&$t,w[14]=Oo^~un&rn,w[15]=ln^~Lo&Ke,w[24]=Ve^~lo&Ft,w[25]=ge^~mn&ds,w[34]=_n^~Gt&hs,w[35]=fs^~Dt&dn,w[44]=Uo^~uo&co,w[45]=jo^~$o&Go,w[6]=rt^~Wr&F,w[7]=Ye^~$t&z,w[16]=un^~rn&Ut,w[17]=Lo^~Ke&Fo,w[26]=lo^~Ft&Oi,w[27]=mn^~ds&Fe,w[36]=Gt^~hs&Xt,w[37]=Dt^~dn&Ie,w[46]=uo^~co&yn,w[47]=$o^~Go&or,w[8]=Wr^~F&oe,w[9]=$t^~z&je,w[18]=rn^~Ut&an,w[19]=Ke^~Fo&gn,w[28]=Ft^~Oi&Zt,w[29]=ds^~Fe&Vo,w[38]=hs^~Xt&An,w[39]=dn^~Ie&cn,w[48]=co^~yn&Bo,w[49]=Go^~or&Ho,w[0]^=Ae[q],w[1]^=Ae[q+1]};if(O)at.exports=E;else{for(S=0;S{function ce(ee,j){if(!ee)throw new Error(j||"Assertion failed")}at.exports=ce,ce.equal=function(j,Pe,B){if(j!=Pe)throw new Error(B||"Assertion failed: "+j+" != "+Pe)}},75:(at,ce,ee)=>{"use strict";function j(n){return"function"==typeof n}let Pe=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else Pe&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Pe=n},get useDeprecatedSynchronousErrorHandling(){return Pe}};function ye(n){setTimeout(()=>{throw n},0)}const M={closed:!0,next(n){},error(n){if(B.useDeprecatedSynchronousErrorHandling)throw n;ye(n)},complete(){}},de=Array.isArray||(n=>n&&"number"==typeof n.length);function Ze(n){return null!==n&&"object"==typeof n}const Le=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,r)=>`${r+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class he{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof he)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof Le?t.errors:t),[])}he.EMPTY=((n=new he).closed=!0,n);const lt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class $ extends he{constructor(e,t,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=M;break;case 1:if(!e){this.destination=M;break}if("object"==typeof e){e instanceof $?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new ne(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new ne(this,e,t,r)}}[lt](){return this}static create(e,t,r){const i=new $(e,t,r);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class ne extends ${constructor(e,t,r,i){super(),this._parentSubscriber=e;let o,s=this;j(t)?o=t:t&&(o=t.next,r=t.error,i=t.complete,t!==M&&(s=Object.create(t),j(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:r}=B;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):ye(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;ye(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(r){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw r;ye(r)}}__tryOrSetError(e,t,r){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(i){return B.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(ye(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const pe="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ee(n){return n}let Se=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const r=new n;return r.source=this,r.operator=t,r}subscribe(t,r,i){const{operator:o}=this,s=function(n,e,t){if(n){if(n instanceof $)return n;if(n[lt])return n[lt]()}return n||e||t?new $(n,e,t):new $(M)}(t,r,i);if(s.add(o?o.call(s,this.source):this.source||B.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),B.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(r){B.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=r),function(n){for(;n;){const{closed:e,destination:t,isStopped:r}=n;if(e||r)return!1;n=t&&t instanceof $?t:null}return!0}(t)?t.error(r):console.warn(r)}}forEach(t,r){return new(r=Bt(r))((i,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,i)})}_subscribe(t){const{source:r}=this;return r&&r.subscribe(t)}[pe](){return this}pipe(...t){return 0===t.length?this:function(n){return 0===n.length?Ee:1===n.length?n[0]:function(t){return n.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=Bt(t))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return n.create=e=>new n(e),n})();function Bt(n){if(n||(n=B.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const nt=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Ht extends he{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}class k extends ${constructor(e){super(e),this.destination=e}}let f=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[lt](){return new k(this)}lift(t){const r=new h(this,this);return r.operator=t,r}next(t){if(this.closed)throw new nt;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;snew h(e,t),n})();class h extends f{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):he.EMPTY}}function v(n){return n&&"function"==typeof n.schedule}function b(n,e){return function(r){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new E(n,e))}}class E{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new A(e,this.project,this.thisArg))}}class A extends ${constructor(e,t,r){super(e),this.project=t,this.count=0,this.thisArg=r||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(t)}}const S=n=>e=>{for(let t=0,r=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function Xe(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const w=n=>{if(n&&"function"==typeof n[pe])return(n=>e=>{const t=n[pe]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(Ge(n))return S(n);if(Xe(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,ye),e))(n);if(n&&"function"==typeof n[N])return(n=>e=>{const t=n[N]();for(;;){let r;try{r=t.next()}catch(i){return e.error(i),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${Ze(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function q(n,e){return new Se(t=>{const r=new he;let i=0;return r.add(e.schedule(function(){i!==n.length?(t.next(n[i++]),t.closed||r.add(this.schedule())):t.complete()})),r})}function Re(n,e){return e?function(n,e){if(null!=n){if(function(n){return n&&"function"==typeof n[pe]}(n))return function(n,e){return new Se(t=>{const r=new he;return r.add(e.schedule(()=>{const i=n[pe]();r.add(i.subscribe({next(o){r.add(e.schedule(()=>t.next(o)))},error(o){r.add(e.schedule(()=>t.error(o)))},complete(){r.add(e.schedule(()=>t.complete()))}}))})),r})}(n,e);if(Xe(n))return function(n,e){return new Se(t=>{const r=new he;return r.add(e.schedule(()=>n.then(i=>{r.add(e.schedule(()=>{t.next(i),r.add(e.schedule(()=>t.complete()))}))},i=>{r.add(e.schedule(()=>t.error(i)))}))),r})}(n,e);if(Ge(n))return q(n,e);if(function(n){return n&&"function"==typeof n[N]}(n)||"string"==typeof n)return function(n,e){if(!n)throw new Error("Iterable cannot be null");return new Se(t=>{const r=new he;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(e.schedule(()=>{i=n[N](),r.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=i.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),r})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}(n,e):n instanceof Se?n:new Se(w(n))}class be extends ${constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class m extends ${notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function I(n,e){if(e.closed)return;if(n instanceof Se)return n.subscribe(e);let t;try{t=w(n)(e)}catch(r){e.error(r)}return t}function F(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?r=>r.pipe(F((i,o)=>Re(n(i,o)).pipe(b((s,a)=>e(i,s,o,a))),t)):("number"==typeof e&&(t=e),r=>r.lift(new z(n,t)))}class z{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new oe(e,this.project,this.concurrent))}}class oe extends m{constructor(e,t,r=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Be(n=Number.POSITIVE_INFINITY){return F(Ee,n)}function pt(n,e){return e?q(n,e):new Se(S(n))}function Ye(){return function(e){return e.lift(new Wr(e))}}class Wr{constructor(e){this.connectable=e}call(e,t){const{connectable:r}=this;r._refCount++;const i=new $t(e,r),o=t.subscribe(i);return i.closed||(i.connection=r.connect()),o}}class $t extends ${constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:r}=this,i=e._connection;this.connection=null,i&&(!r||i===r)&&i.unsubscribe()}}class Ut extends Se{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new he,e.add(this.source.subscribe(new an(this.getSubject(),this))),e.closed&&(this._connection=null,e=he.EMPTY)),e}refCount(){return Ye()(this)}}const Fo=(()=>{const n=Ut.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class an extends k{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}function Lo(){return new f}function Ke(n){for(let e in n)if(n[e]===Ke)return e;throw Error("Could not find renamed property on target object.")}function Fe(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Fe).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function Zt(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const Vo=Ke({__forward_ref__:Ke});function Ve(n){return n.__forward_ref__=Ve,n.toString=function(){return Fe(this())},n}function ge(n){return function(n){return"function"==typeof n&&n.hasOwnProperty(Vo)&&n.__forward_ref__===Ve}(n)?n():n}class Ft extends Error{constructor(e,t){super(function(n,e){return`${n?`NG0${n}: `:""}${e}`}(e,t)),this.code=e}}function Ie(n){return"string"==typeof n?n:null==n?"":String(n)}function An(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Ie(n)}function Gt(n,e){const t=e?` in ${e}`:"";throw new Ft("201",`No provider for ${An(n)} found${t}`)}function hr(n,e){null==n&&function(n,e,t,r){throw new Error(`ASSERTION ERROR: ${n}`+(null==r?"":` [Expected=> ${t} ${r} ${e} <=Actual]`))}(e,n,null,"!=")}function _e(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function St(n){return{providers:n.providers||[],imports:n.imports||[]}}function ti(n){return Aa(n,rd)||Aa(n,m_)}function Aa(n,e){return n.hasOwnProperty(e)?n[e]:null}function g_(n){return n&&(n.hasOwnProperty(ip)||n.hasOwnProperty(SA))?n[ip]:null}const rd=Ke({\u0275prov:Ke}),ip=Ke({\u0275inj:Ke}),m_=Ke({ngInjectableDef:Ke}),SA=Ke({ngInjectorDef:Ke});var et=(()=>((et=et||{})[et.Default=0]="Default",et[et.Host=1]="Host",et[et.Self=2]="Self",et[et.SkipSelf=4]="SkipSelf",et[et.Optional=8]="Optional",et))();let op;function ps(n){const e=op;return op=n,e}function __(n,e,t){const r=ti(n);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&et.Optional?null:void 0!==e?e:void Gt(Fe(n),"Injector")}function gs(n){return{toString:n}.toString()}var _i=(()=>((_i=_i||{})[_i.OnPush=0]="OnPush",_i[_i.Default=1]="Default",_i))(),Wn=(()=>((Wn=Wn||{})[Wn.Emulated=0]="Emulated",Wn[Wn.None=2]="None",Wn[Wn.ShadowDom=3]="ShadowDom",Wn))();const RA="undefined"!=typeof globalThis&&globalThis,kA="undefined"!=typeof window&&window,PA="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,zt=RA||"undefined"!=typeof global&&global||kA||PA,Ta={},on=[],id=Ke({\u0275cmp:Ke}),sp=Ke({\u0275dir:Ke}),ap=Ke({\u0275pipe:Ke}),y_=Ke({\u0275mod:Ke}),FA=Ke({\u0275loc:Ke}),zo=Ke({\u0275fac:Ke}),nu=Ke({__NG_ELEMENT_ID__:Ke});let OA=0;function Dn(n){return gs(()=>{const t={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===_i.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||on,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||Wn.Emulated,id:"c",styles:n.styles||on,_:null,setInput:null,schemas:n.schemas||null,tView:null},i=n.directives,o=n.features,s=n.pipes;return r.id+=OA++,r.inputs=D_(n.inputs,t),r.outputs=D_(n.outputs),o&&o.forEach(a=>a(r)),r.directiveDefs=i?()=>("function"==typeof i?i():i).map(b_):null,r.pipeDefs=s?()=>("function"==typeof s?s():s).map(v_):null,r})}function b_(n){return Fr(n)||function(n){return n[sp]||null}(n)}function v_(n){return function(n){return n[ap]||null}(n)}const w_={};function tn(n){return gs(()=>{const e={type:n.type,bootstrap:n.bootstrap||on,declarations:n.declarations||on,imports:n.imports||on,exports:n.exports||on,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(w_[n.id]=n.type),e})}function D_(n,e){if(null==n)return Ta;const t={};for(const r in n)if(n.hasOwnProperty(r)){let i=n[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),t[i]=r,e&&(e[i]=o)}return t}const fe=Dn;function Fr(n){return n[id]||null}function yi(n,e){const t=n[y_]||null;if(!t&&!0===e)throw new Error(`Type ${Fe(n)} does not have '\u0275mod' property.`);return t}function fo(n){return Array.isArray(n)&&"object"==typeof n[1]}function Vi(n){return Array.isArray(n)&&!0===n[1]}function cp(n){return 0!=(8&n.flags)}function ld(n){return 2==(2&n.flags)}function ud(n){return 1==(1&n.flags)}function Bi(n){return null!==n.template}function $A(n){return 0!=(512&n[2])}function qs(n,e){return n.hasOwnProperty(zo)?n[zo]:null}class E_{constructor(e,t,r){this.previousValue=e,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function x_(n){return n.type.prototype.ngOnChanges&&(n.setInput=qA),WA}function WA(){const n=N_(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===Ta)n.previous=e;else for(let r in e)t[r]=e[r];n.current=null,this.ngOnChanges(e)}}function qA(n,e,t,r){const i=N_(n)||function(n,e){return n[M_]=e}(n,{previous:Ta,current:null}),o=i.current||(i.current={}),s=i.previous,a=this.declaredInputs[t],l=s[a];o[a]=new E_(l&&l.currentValue,e,s===Ta),n[r]=e}const M_="__ngSimpleChanges__";function N_(n){return n[M_]||null}const A_="http://www.w3.org/2000/svg";let hp;function kn(n){return!!n.listen}const S_={createRenderer:(n,e)=>void 0!==hp?hp:"undefined"!=typeof document?document:void 0};function jn(n){for(;Array.isArray(n);)n=n[0];return n}function cd(n,e){return jn(e[n])}function wi(n,e){return jn(e[n.index])}function gp(n,e){return n.data[e]}function ri(n,e){const t=e[n];return fo(t)?t:t[0]}function I_(n){return 4==(4&n[2])}function mp(n){return 128==(128&n[2])}function _s(n,e){return null==e?null:n[e]}function R_(n){n[18]=0}function _p(n,e){n[5]+=e;let t=n,r=n[3];for(;null!==r&&(1===e&&1===t[5]||-1===e&&0===t[5]);)r[5]+=e,t=r,r=r[3]}const ut={lFrame:H_(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function k_(){return ut.bindingsEnabled}function te(){return ut.lFrame.lView}function kt(){return ut.lFrame.tView}function wt(n){return ut.lFrame.contextLView=n,n[8]}function qn(){let n=P_();for(;null!==n&&64===n.type;)n=n.parent;return n}function P_(){return ut.lFrame.currentTNode}function ho(n,e){const t=ut.lFrame;t.currentTNode=n,t.isParent=e}function yp(){return ut.lFrame.isParent}function bp(){ut.lFrame.isParent=!1}function dd(){return ut.isInCheckNoChangesMode}function fd(n){ut.isInCheckNoChangesMode=n}function Fa(){return ut.lFrame.bindingIndex++}function Wo(n){const e=ut.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function lT(n,e){const t=ut.lFrame;t.bindingIndex=t.bindingRootIndex=n,vp(e)}function vp(n){ut.lFrame.currentDirectiveIndex=n}function L_(){return ut.lFrame.currentQueryIndex}function Dp(n){ut.lFrame.currentQueryIndex=n}function cT(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function V_(n,e,t){if(t&et.SkipSelf){let i=e,o=n;for(;!(i=i.parent,null!==i||t&et.Host||(i=cT(o),null===i||(o=o[15],10&i.type))););if(null===i)return!1;e=i,n=o}const r=ut.lFrame=B_();return r.currentTNode=e,r.lView=n,!0}function hd(n){const e=B_(),t=n[1];ut.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function B_(){const n=ut.lFrame,e=null===n?null:n.child;return null===e?H_(n):e}function H_(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function U_(){const n=ut.lFrame;return ut.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const j_=U_;function pd(){const n=U_();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Lr(){return ut.lFrame.selectedIndex}function ys(n){ut.lFrame.selectedIndex=n}function Pn(){const n=ut.lFrame;return gp(n.tView,n.selectedIndex)}function au(){ut.lFrame.currentNamespace=A_}function lu(){ut.lFrame.currentNamespace=null}function gd(n,e){for(let t=e.directiveStart,r=e.directiveEnd;t=r)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class uu{constructor(e,t,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function yd(n,e,t){const r=kn(n);let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),r=e;for(;t>0;)r=r[15],t--;return r}let Mp=!0;function vd(n){const e=Mp;return Mp=n,e}let CT=0;function du(n,e){const t=Ap(n,e);if(-1!==t)return t;const r=e[1];r.firstCreatePass&&(n.injectorIndex=e.length,Np(r.data,n),Np(e,null),Np(r.blueprint,null));const i=wd(n,e),o=n.injectorIndex;if(W_(i)){const s=Oa(i),a=La(i,e),l=a[1].data;for(let u=0;u<8;u++)e[o+u]=a[s+u]|l[s+u]}return e[o+8]=i,o}function Np(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Ap(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function wd(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,r=null,i=e;for(;null!==i;){const o=i[1],s=o.type;if(r=2===s?o.declTNode:1===s?i[6]:null,null===r)return-1;if(t++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return-1}function Dd(n,e,t){!function(n,e,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(nu)&&(r=t[nu]),null==r&&(r=t[nu]=CT++);const i=255&r;e.data[n+(i>>5)]|=1<=0?255&e:MT:e}(t);if("function"==typeof o){if(!V_(e,n,r))return r&et.Host?K_(i,t,r):Y_(e,t,r,i);try{const s=o(r);if(null!=s||r&et.Optional)return s;Gt(t)}finally{j_()}}else if("number"==typeof o){let s=null,a=Ap(n,e),l=-1,u=r&et.Host?e[16][6]:null;for((-1===a||r&et.SkipSelf)&&(l=-1===a?wd(n,e):e[a+8],-1!==l&&ey(r,!1)?(s=e[1],a=Oa(l),e=La(l,e)):a=-1);-1!==a;){const c=e[1];if(X_(o,a,c.data)){const d=NT(a,e,t,s,r,u);if(d!==Z_)return d}l=e[a+8],-1!==l&&ey(r,e[1].data[a+8]===u)&&X_(o,a,e)?(s=c,a=Oa(l),e=La(l,e)):a=-1}}}return Y_(e,t,r,i)}const Z_={};function MT(){return new Va(qn(),te())}function NT(n,e,t,r,i,o){const s=e[1],a=s.data[n+8],c=Cd(a,s,t,null==r?ld(a)&&Mp:r!=s&&0!=(3&a.type),i&et.Host&&o===a);return null!==c?fu(e,s,c,a):Z_}function Cd(n,e,t,r,i){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,c=o>>20,g=i?a+c:n.directiveEnd;for(let y=r?a:a+c;y=l&&D.type===t)return y}if(i){const y=s[l];if(y&&Bi(y)&&y.type===t)return l}return null}function fu(n,e,t,r){let i=n[t];const o=e.data;if(function(n){return n instanceof uu}(i)){const s=i;s.resolving&&function(n,e){throw new Ft("200",`Circular dependency in DI detected for ${n}`)}(An(o[t]));const a=vd(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?ps(s.injectImpl):null;V_(n,r,et.Default);try{i=n[t]=s.factory(void 0,o,n,r),e.firstCreatePass&&t>=r.directiveStart&&function(n,e,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){const s=x_(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}i&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,i),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&ps(l),vd(a),s.resolving=!1,j_()}}return i}function X_(n,e,t){return!!(t[e+(n>>5)]&1<{const r=function(n){return function(...t){if(n){const r=n(...t);for(const i in r)this[i]=r[i]}}}(e);function i(...o){if(this instanceof i)return r.apply(this,o),this;const s=new i(...o);return a.annotation=s,a;function a(l,u,c){const d=l.hasOwnProperty(Ha)?l[Ha]:Object.defineProperty(l,Ha,{value:[]})[Ha];for(;d.length<=c;)d.push(null);return(d[c]=d[c]||[]).push(s),l}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=n,i.annotationCls=i,i})}class xt{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}const IT=new xt("AnalyzeForEntryComponents"),Ed=Function;function Di(n,e){void 0===e&&(e=n);for(let t=0;tArray.isArray(t)?go(t,e):e(t))}function Md(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Ks(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function ws(n,e){const t=[];for(let r=0;r=0?n[1|r]=t:(r=~r,function(n,e,t,r){let i=n.length;if(i==e)n.push(t,r);else if(1===i)n.push(r,n[0]),n[0]=t;else{for(i--,n.push(n[i-1],n[i]);i>e;)n[i]=n[i-2],i--;n[e]=t,n[e+1]=r}}(n,r,e,t)),r}function Ip(n,e){const t=ja(n,e);if(t>=0)return n[1|t]}function ja(n,e){return function(n,e,t){let r=0,i=n.length>>t;for(;i!==r;){const o=r+(i-r>>1),s=n[o<e?i=o:r=o+1}return~(i< ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Fe(a)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${n.replace(UT,"\n ")}`}("\n"+n.message,i,t,r),n.ngTokenPath=i,n[$a]=null,n}const za=yu(Js("Inject",n=>({token:n})),-1),Kr=yu(Js("Optional"),8),Ds=yu(Js("SkipSelf"),4);class Qs{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function oi(n){return n instanceof Qs?n.changingThisBreaksApplicationSecurity:n}function mo(n,e){const t=function(n){return n instanceof Qs&&n.getTypeName()||null}(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}const pS=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,gS=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;var fn=(()=>((fn=fn||{})[fn.NONE=0]="NONE",fn[fn.HTML=1]="HTML",fn[fn.STYLE=2]="STYLE",fn[fn.SCRIPT=3]="SCRIPT",fn[fn.URL=4]="URL",fn[fn.RESOURCE_URL=5]="RESOURCE_URL",fn))();function Ja(n){const e=function(){const n=te();return n&&n[12]}();return e?e.sanitize(fn.URL,n)||"":mo(n,"URL")?oi(n):function(n){return(n=String(n)).match(pS)||n.match(gS)?n:"unsafe:"+n}(Ie(n))}const xy="__ngContext__";function Ar(n,e){n[xy]=e}function Gp(n){const e=function(n){return n[xy]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function kd(n){return n.ngOriginalError}function LS(n,...e){n.error(...e)}class Zs{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),r=this._findContext(e),i=function(n){return n&&n.ngErrorLogger||LS}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t),r&&i(this._console,"ERROR CONTEXT",r)}_findContext(e){return e?function(n){return n.ngDebugContext}(e)||this._findContext(kd(e)):null}_findOriginalError(e){let t=e&&kd(e);for(;t&&kd(t);)t=kd(t);return t||null}}const Py=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(zt))();function yo(n){return n instanceof Function?n():n}var si=(()=>((si=si||{})[si.Important=1]="Important",si[si.DashCase=2]="DashCase",si))();function qp(n,e){return undefined(n,e)}function Eu(n){const e=n[3];return Vi(e)?e[3]:e}function Jp(n){return By(n[13])}function Kp(n){return By(n[4])}function By(n){for(;null!==n&&!Vi(n);)n=n[4];return n}function Ya(n,e,t,r,i){if(null!=r){let o,s=!1;Vi(r)?o=r:fo(r)&&(s=!0,r=r[0]);const a=jn(r);0===n&&null!==t?null==i?zy(e,t,a):Xs(e,t,a,i||null,!0):1===n&&null!==t?Xs(e,t,a,i||null,!0):2===n?function(n,e,t){const r=Fd(n,e);r&&function(n,e,t,r){kn(n)?n.removeChild(e,t,r):e.removeChild(t)}(n,r,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function(n,e,t,r,i){const o=t[7];o!==jn(t)&&Ya(e,n,r,o,i);for(let a=10;a0&&(n[t-1][4]=r[4]);const o=Ks(n,10+e);!function(n,e){xu(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(r[1],r);const s=o[19];null!==s&&s.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function jy(n,e){if(!(256&e[2])){const t=e[11];kn(t)&&t.destroyNode&&xu(n,e,t,3,null,null),function(n){let e=n[13];if(!e)return Xp(n[1],n);for(;e;){let t=null;if(fo(e))t=e[13];else{const r=e[10];r&&(t=r)}if(!t){for(;e&&!e[4]&&e!==n;)fo(e)&&Xp(e[1],e),e=e[3];null===e&&(e=n),fo(e)&&Xp(e[1],e),t=e&&e[4]}e=t}}(e)}}function Xp(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let r=0;r=0?r[i=u]():r[i=-u].unsubscribe(),o+=2}else{const s=r[i=t[o+1]];t[o].call(s)}if(null!==r){for(let o=i+1;oo?"":i[d+1].toLowerCase();const y=8&r?g:null;if(y&&-1!==tb(y,u,0)||2&r&&u!==g){if(Hi(r))return!1;s=!0}}}}else{if(!s&&!Hi(r)&&!Hi(l))return!1;if(s&&Hi(l))continue;s=!1,r=l|1&r}}return Hi(r)||s}function Hi(n){return 0==(1&n)}function fI(n,e,t,r){if(null===e)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Hi(s)&&(e+=ob(o,i),i=""),r=s,o=o||!Hi(r);t++}return""!==i&&(e+=ob(o,i)),e}const dt={};function Z(n){sb(kt(),te(),Lr()+n,dd())}function sb(n,e,t,r){if(!r)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&md(e,o,t)}else{const o=n.preOrderHooks;null!==o&&_d(e,o,0,t)}ys(t)}function Vd(n,e){return n<<17|e<<2}function Ui(n){return n>>17&32767}function ig(n){return 2|n}function qo(n){return(131068&n)>>2}function og(n,e){return-131069&n|e<<2}function sg(n){return 1|n}function mb(n,e){const t=n.contentQueries;if(null!==t)for(let r=0;r20&&sb(n,e,20,dd()),t(r,i)}finally{ys(o)}}function pg(n,e,t){!k_()||(function(n,e,t,r){const i=t.directiveStart,o=t.directiveEnd;n.firstCreatePass||du(t,e),Ar(r,e);const s=t.initialInputs;for(let a=i;a0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(r,i,s)}}function Mb(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function Nb(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function $I(n,e,t){if(t){if(e.exportAs)for(let r=0;r0&&yg(t)}}function yg(n){for(let r=Jp(n);null!==r;r=Kp(r))for(let i=10;i0&&yg(o)}const t=n[1].components;if(null!==t)for(let r=0;r0&&yg(i)}}function YI(n,e){const t=ri(e,n),r=t[1];(function(n,e){for(let t=e.length;tPromise.resolve(null))();function Rb(n){return n[7]||(n[7]=[])}function kb(n){return n.cleanup||(n.cleanup=[])}function Fb(n,e){const t=n[9],r=t?t.get(Zs,null):null;r&&r.handleError(e)}function Ob(n,e,t,r,i){for(let o=0;othis.processProvider(a,e,t)),go([e],a=>this.processInjectorType(a,[],o)),this.records.set(xs,el(void 0,this));const s=this.records.get(Au);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:Fe(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=mu,r=et.Default){this.assertNotDestroyed();const i=Ga(this),o=ps(void 0);try{if(!(r&et.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function(n){return"function"==typeof n||"object"==typeof n&&n instanceof xt}(e)&&ti(e);a=l&&this.injectableDefInScope(l)?el(Eg(e),Tu):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(r&et.Self?Vb():this.parent).get(e,t=r&et.Optional&&t===mu?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[$a]=s[$a]||[]).unshift(Fe(e)),i)throw s;return sy(s,e,"R3InjectorError",this.source)}throw s}finally{ps(o),Ga(i)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((r,i)=>e.push(Fe(i))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,t,r){if(!(e=ge(e)))return!1;let i=g_(e);const o=null==i&&e.ngModule||void 0,s=void 0===o?e:o,a=-1!==r.indexOf(s);if(void 0!==o&&(i=g_(o)),null==i)return!1;if(null!=i.imports&&!a){let c;r.push(s);try{go(i.imports,d=>{this.processInjectorType(d,t,r)&&(void 0===c&&(c=[]),c.push(d))})}finally{}if(void 0!==c)for(let d=0;dthis.processProvider(D,g,y||on))}}this.injectorDefTypes.add(s);const l=qs(s)||(()=>new s);this.records.set(s,el(l,Tu));const u=i.providers;if(null!=u&&!a){const c=e;go(u,d=>this.processProvider(d,c,u))}return void 0!==o&&void 0!==e.providers}processProvider(e,t,r){let i=tl(e=ge(e))?e:ge(e&&e.provide);const o=function(n,e,t){return Ub(n)?el(void 0,n.useValue):el(function(n,e,t){let r;if(tl(n)){const i=ge(n);return qs(i)||Eg(i)}if(Ub(n))r=()=>ge(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))r=()=>n.useFactory(...Ys(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))r=()=>J(ge(n.useExisting));else{const i=ge(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return qs(i)||Eg(i);r=()=>new i(...Ys(n.deps))}return r}(n),Tu)}(e);if(tl(e)||!0!==e.multi)this.records.get(i);else{let s=this.records.get(i);s||(s=el(void 0,Tu,!0),s.factory=()=>Ys(s.multi),this.records.set(i,s)),i=e,s.multi.push(e)}this.records.set(i,o)}hydrate(e,t){return t.value===Tu&&(t.value=iR,t.value=t.factory()),"object"==typeof t.value&&t.value&&function(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=ge(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function Eg(n){const e=ti(n),t=null!==e?e.factory:qs(n);if(null!==t)return t;if(n instanceof xt)throw new Error(`Token ${Fe(n)} is missing a \u0275prov definition.`);if(n instanceof Function)return function(n){const e=n.length;if(e>0){const r=ws(e,"?");throw new Error(`Can't resolve all parameters for ${Fe(n)}: (${r.join(", ")}).`)}const t=function(n){const e=n&&(n[rd]||n[m_]);if(e){const t=function(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Error("unreachable")}function el(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function Ub(n){return null!==n&&"object"==typeof n&&Fp in n}function tl(n){return"function"==typeof n}const jb=function(n,e,t){return function(n,e=null,t=null,r){const i=Bb(n,e,t,r);return i._resolveInjectorDefTypes(),i}({name:t},e,n,t)};let It=(()=>{class n{static create(t,r){return Array.isArray(t)?jb(t,r,""):jb(t.providers,t.parent,t.name||"")}}return n.THROW_IF_NOT_FOUND=mu,n.NULL=new Lb,n.\u0275prov=_e({token:n,providedIn:"any",factory:()=>J(xs)}),n.__NG_ELEMENT_ID__=-1,n})();function NR(n,e){gd(Gp(n)[1],qn())}let Gd=null;function nl(){if(!Gd){const n=zt.Symbol;if(n&&n.iterator)Gd=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ta(jn(Oe[r.index])):r.index;if(kn(t)){let Oe=null;if(!a&&l&&(Oe=function(n,e,t,r){const i=n.cleanup;if(null!=i)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,i,r.index)),null!==Oe)(Oe.__ngLastListenerFn__||Oe).__ngNextListenerFn__=o,Oe.__ngLastListenerFn__=o,y=!1;else{o=Bg(r,e,d,o,!1);const We=t.listen(V,i,o);g.push(o,We),c&&c.push(i,re,L,L+1)}}else o=Bg(r,e,d,o,!0),V.addEventListener(i,o,s),g.push(o),c&&c.push(i,re,L,s)}else o=Bg(r,e,d,o,!1);const D=r.outputs;let T;if(y&&null!==D&&(T=D[i])){const R=T.length;if(R)for(let V=0;V0;)e=e[15],n--;return e}(n,ut.lFrame.contextLView))[8]}(n)}function fk(n,e){let t=null;const r=function(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(n);for(let i=0;i=0}const Yn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Vv(n){return n.substring(Yn.key,Yn.keyEnd)}function Bv(n,e){const t=Yn.textEnd;return t===e?-1:(e=Yn.keyEnd=function(n,e,t){for(;e32;)e++;return e}(n,Yn.key=e,t),hl(n,e,t))}function hl(n,e,t){for(;e=0;t=Bv(e,t))ii(n,Vv(e),!0)}function Gv(n,e){return e>=n.expandoStartIndex}function zv(n,e,t,r){const i=n.data;if(null===i[t+1]){const o=i[Lr()],s=Gv(n,t);Kv(o,r)&&null===e&&!s&&(e=!1),e=function(n,e,t,r){const i=function(n){const e=ut.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=r?e.residualClasses:e.residualStyles;if(null===i)0===(r?e.classBindings:e.styleBindings)&&(t=Fu(t=Ug(null,n,e,t,r),e.attrs,r),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==i)if(t=Ug(i,n,e,t,r),null===o){let l=function(n,e,t){const r=t?e.classBindings:e.styleBindings;if(0!==qo(r))return n[Ui(r)]}(n,e,r);void 0!==l&&Array.isArray(l)&&(l=Ug(null,n,e,l[1],r),l=Fu(l,e.attrs,r),function(n,e,t,r){n[Ui(t?e.classBindings:e.styleBindings)]=r}(n,e,r,l))}else o=function(n,e,t){let r;const i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(u=!0)}else c=t;if(i)if(0!==l){const g=Ui(n[a+1]);n[r+1]=Vd(g,a),0!==g&&(n[g+1]=og(n[g+1],r)),n[a+1]=function(n,e){return 131071&n|e<<17}(n[a+1],r)}else n[r+1]=Vd(a,0),0!==a&&(n[a+1]=og(n[a+1],r)),a=r;else n[r+1]=Vd(l,0),0===a?a=r:n[l+1]=og(n[l+1],r),l=r;u&&(n[r+1]=ig(n[r+1])),Lv(n,c,r,!0),Lv(n,c,r,!1),function(n,e,t,r,i){const o=i?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&ja(o,e)>=0&&(t[r+1]=sg(t[r+1]))}(e,c,n,r,o),s=Vd(a,l),o?e.classBindings=s:e.styleBindings=s}(i,o,e,t,s,r)}}function Ug(n,e,t,r,i){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[i],u=Array.isArray(l),c=u?l[1]:l,d=null===c;let g=t[i+1];g===dt&&(g=d?on:void 0);let y=d?Ip(g,r):c===r?g:void 0;if(u&&!Kd(y)&&(y=Ip(l,r)),Kd(y)&&(a=y,s))return a;const D=n[i+1];i=s?Ui(D):qo(D)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=Ip(l,r))}return a}function Kd(n){return void 0!==n}function Kv(n,e){return 0!=(n.flags&(e?16:32))}function Je(n,e=""){const t=te(),r=kt(),i=n+20,o=r.firstCreatePass?Qa(r,i,1,e,null):r.data[i],s=t[i]=function(n,e){return kn(n)?n.createText(e):n.createTextNode(e)}(t[11],e);Od(r,t,s,o),ho(o,!1)}function Qo(n,e,t){const r=te(),i=function(n,e,t,r){return Tr(n,Fa(),t)?e+Ie(t)+r:dt}(r,n,e,t);return i!==dt&&Ko(r,Lr(),i),Qo}const ra=void 0;var Jk=["en",[["a","p"],["AM","PM"],ra],[["AM","PM"],ra,ra],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ra,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ra,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ra,"{1} 'at' {0}",ra],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(n){const e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===t?1:5}];let gl={};function mw(n){return n in gl||(gl[n]=zt.ng&&zt.ng.common&&zt.ng.common.locales&&zt.ng.common.locales[n]),gl[n]}var Te=(()=>((Te=Te||{})[Te.LocaleId=0]="LocaleId",Te[Te.DayPeriodsFormat=1]="DayPeriodsFormat",Te[Te.DayPeriodsStandalone=2]="DayPeriodsStandalone",Te[Te.DaysFormat=3]="DaysFormat",Te[Te.DaysStandalone=4]="DaysStandalone",Te[Te.MonthsFormat=5]="MonthsFormat",Te[Te.MonthsStandalone=6]="MonthsStandalone",Te[Te.Eras=7]="Eras",Te[Te.FirstDayOfWeek=8]="FirstDayOfWeek",Te[Te.WeekendRange=9]="WeekendRange",Te[Te.DateFormat=10]="DateFormat",Te[Te.TimeFormat=11]="TimeFormat",Te[Te.DateTimeFormat=12]="DateTimeFormat",Te[Te.NumberSymbols=13]="NumberSymbols",Te[Te.NumberFormats=14]="NumberFormats",Te[Te.CurrencyCode=15]="CurrencyCode",Te[Te.CurrencySymbol=16]="CurrencySymbol",Te[Te.CurrencyName=17]="CurrencyName",Te[Te.Currencies=18]="Currencies",Te[Te.Directionality=19]="Directionality",Te[Te.PluralCase=20]="PluralCase",Te[Te.ExtraData=21]="ExtraData",Te))();const Yd="en-US";let _w=Yd;function jg(n){hr(n,"Expected localeId to be defined"),"string"==typeof n&&(_w=n.toLowerCase().replace(/_/g,"-"))}class Uw{}const $w="ngComponent";class W3{resolveComponentFactory(e){throw function(n){const e=Error(`No component factory found for ${Fe(n)}. Did you add it to @NgModule.entryComponents?`);return e[$w]=n,e}(e)}}let ui=(()=>{class n{}return n.NULL=new W3,n})();function tf(...n){}function yl(n,e){return new yt(wi(n,e))}const K3=function(){return yl(qn(),te())};let yt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=K3,n})();function Gw(n){return n instanceof yt?n.nativeElement:n}class bl{}let Yg=(()=>{class n{}return n.\u0275prov=_e({token:n,providedIn:"root",factory:()=>null}),n})();class Uu{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const zw=new Uu("12.2.13");class Ww{constructor(){}supports(e){return Iu(e)}create(e){return new tP(e)}}const eP=(n,e)=>e;class tP{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||eP}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const s=!r||t&&t.currentIndex{s=this._trackByFn(i,a),null!==t&&Object.is(t.trackById,s)?(r&&(t=this._verifyReinsertion(t,a,s,i)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,r,i){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,i)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,i)):e=this._addAfter(new nP(t,r),o,i),e}_verifyReinsertion(e,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,o=e._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,t,r),this._addToMoves(e,r),e}_moveAfter(e,t,r){return this._unlink(e),this._insertAfter(e,t,r),this._addToMoves(e,r),e}_addAfter(e,t,r){return this._insertAfter(e,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,r){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new qw),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,r=e._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new qw),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class nP{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class rP{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const t=e._prevDup,r=e._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class qw{constructor(){this.map=new Map}put(e){const t=e.trackById;let r=this.map.get(t);r||(r=new rP,this.map.set(t,r)),r.add(e)}get(e,t){const i=this.map.get(e);return i?i.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Jw(n,e,t){const r=n.previousIndex;if(null===r)return r;let i=0;return t&&r{if(t&&t.key===i)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(i,r);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const r=e._prev;return t._next=e,t._prev=r,e._prev=t,r&&(r._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const i=this._records.get(e);this._maybeAddToChanges(i,t);const o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}const r=new oP(e);return this._records.set(e,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(r=>t(e[r],r))}}class oP{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Yw(){return new ju([new Ww])}let ju=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||Yw()),deps:[[n,new Ds,new Kr]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new Error(`Cannot find a differ supporting object '${t}' of type '${function(n){return n.name||typeof n}(t)}'`)}}return n.\u0275prov=_e({token:n,providedIn:"root",factory:Yw}),n})();function Qw(){return new vl([new Kw])}let vl=(()=>{class n{constructor(t){this.factories=t}static create(t,r){if(r){const i=r.factories.slice();t=t.concat(i)}return new n(t)}static extend(t){return{provide:n,useFactory:r=>n.create(t,r||Qw()),deps:[[n,new Ds,new Kr]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(r)return r;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return n.\u0275prov=_e({token:n,providedIn:"root",factory:Qw}),n})();function nf(n,e,t,r,i=!1){for(;null!==t;){const o=e[t.index];if(null!==o&&r.push(jn(o)),Vi(o))for(let a=10;a-1&&(Zp(e,r),Ks(t,r))}this._attachedToViewContainer=!1}jy(this._lView[1],this._lView)}onDestroy(e){Db(this._lView[1],this._lView,null,e)}markForCheck(){bg(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){wg(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(n,e,t){fd(!0);try{wg(n,e,t)}finally{fd(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function(n,e){xu(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class aP extends $u{constructor(e){super(e),this._view=e}detectChanges(){Ib(this._view)}checkNoChanges(){!function(n){fd(!0);try{Ib(n)}finally{fd(!1)}}(this._view)}get context(){return null}}const uP=function(n){return function(n,e,t){if(ld(n)&&!t){const r=ri(n.index,e);return new $u(r,r)}return 47&n.type?new $u(e[16],e):null}(qn(),te(),16==(16&n))};let _r=(()=>{class n{}return n.__NG_ELEMENT_ID__=uP,n})();const fP=[new Kw],pP=new ju([new Ww]),gP=new vl(fP),_P=function(){return rf(qn(),te())};let hn=(()=>{class n{}return n.__NG_ELEMENT_ID__=_P,n})();const yP=hn,bP=class extends yP{constructor(e,t,r){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=r}createEmbeddedView(e){const t=this._declarationTContainer.tViews,r=Mu(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const o=this._declarationLView[19];return null!==o&&(r[19]=o.createEmbeddedView(t)),Nu(t,r,e),new $u(r)}};function rf(n,e){return 4&n.type?new bP(e,n,yl(n,e)):null}class Co{}class Zw{}const DP=function(){return tD(qn(),te())};let Hr=(()=>{class n{}return n.__NG_ELEMENT_ID__=DP,n})();const EP=Hr,Xw=class extends EP{constructor(e,t,r){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=r}get element(){return yl(this._hostTNode,this._hostLView)}get injector(){return new Va(this._hostTNode,this._hostLView)}get parentInjector(){const e=wd(this._hostTNode,this._hostLView);if(W_(e)){const t=La(e,this._hostLView),r=Oa(e);return new Va(t[1].data[r+8],t)}return new Va(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=eD(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,r){const i=e.createEmbeddedView(t||{});return this.insert(i,r),i}createComponent(e,t,r,i,o){const s=r||this.parentInjector;if(!o&&null==e.ngModule&&s){const l=s.get(Co,null);l&&(o=l)}const a=e.create(s,i,void 0,o);return this.insert(a.hostView,t),a}insert(e,t){const r=e._lView,i=r[1];if(function(n){return Vi(n[3])}(r)){const c=this.indexOf(e);if(-1!==c)this.detach(c);else{const d=r[3],g=new Xw(d,d[6],d[3]);g.detach(g.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function(n,e,t,r){const i=10+r,o=t.length;r>0&&(t[i-1][4]=e),rPy});class CD extends Uw{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function(n){return n.map(_I).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return DD(this.componentDef.inputs)}get outputs(){return DD(this.componentDef.outputs)}create(e,t,r,i){const o=(i=i||this.ngModule)?function(n,e){return{get:(t,r,i)=>{const o=n.get(t,El,i);return o!==El||r===El?o:e.get(t,r,i)}}}(e,i.injector):e,s=o.get(bl,S_),a=o.get(Yg,null),l=s.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",c=r?function(n,e,t){if(kn(n))return n.selectRootElement(e,t===Wn.ShadowDom);let r="string"==typeof e?n.querySelector(e):e;return r.textContent="",r}(l,r,this.componentDef.encapsulation):Qp(s.createRenderer(null,this.componentDef),u,function(n){const e=n.toLowerCase();return"svg"===e?A_:"math"===e?"http://www.w3.org/1998/MathML/":null}(u)),d=this.componentDef.onPush?576:528,g=function(n,e){return{components:[],scheduler:n||Py,clean:tR,playerHandler:e||null,flags:0}}(),y=Ud(0,null,null,1,0,null,null,null,null,null),D=Mu(null,y,g,d,null,null,s,l,a,o);let T,R;hd(D);try{const V=function(n,e,t,r,i,o){const s=t[1];t[20]=n;const l=Qa(s,20,2,"#host",null),u=l.mergedAttrs=e.hostAttrs;null!==u&&($d(l,u,!0),null!==n&&(yd(i,n,u),null!==l.classes&&rg(i,n,l.classes),null!==l.styles&&eb(i,n,l.styles)));const c=r.createRenderer(n,e),d=Mu(t,bb(e),null,e.onPush?64:16,t[20],l,r,c,o||null,null);return s.firstCreatePass&&(Dd(du(l,t),s,e.type),Nb(s,l),Ab(l,t.length,1)),jd(t,d),t[20]=d}(c,this.componentDef,D,s,l);if(c)if(r)yd(l,c,["ng-version",zw.full]);else{const{attrs:L,classes:re}=function(n){const e=[],t=[];let r=1,i=2;for(;r0&&rg(l,c,re.join(" "))}if(R=gp(y,20),void 0!==t){const L=R.projection=[];for(let re=0;rel(s,e)),e.contentQueries){const l=qn();e.contentQueries(1,s,l.directiveStart)}const a=qn();return!o.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(ys(a.index),xb(t[1],a,0,a.directiveStart,a.directiveEnd,e),Mb(e,s)),s}(V,this.componentDef,D,g,[NR]),Nu(y,D,null)}finally{pd()}return new CF(this.componentType,T,yl(R,D),D,R)}}class CF extends class{}{constructor(e,t,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.instance=t,this.hostView=this.changeDetectorRef=new aP(i),this.componentType=e}get injector(){return new Va(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}const xl=new Map;class MF extends Co{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new wD(this);const r=yi(e),i=function(n){return n[FA]||null}(e);i&&jg(i),this._bootstrapComponents=yo(r.bootstrap),this._r3Injector=Bb(e,t,[{provide:Co,useValue:this},{provide:ui,useValue:this.componentFactoryResolver}],Fe(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=It.THROW_IF_NOT_FOUND,r=et.Default){return e===It||e===Co||e===xs?this:this._r3Injector.get(e,t,r)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class c0 extends Zw{constructor(e){super(),this.moduleType=e,null!==yi(e)&&function(n){const e=new Set;!function t(r){const i=yi(r,!0),o=i.id;null!==o&&(function(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${Fe(e)} vs ${Fe(e.name)}`)}(o,xl.get(o),r),xl.set(o,r));const s=yo(i.imports);for(const a of s)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new MF(this.moduleType,e)}}function d0(n){return e=>{setTimeout(n,void 0,e)}}const qe=class extends f{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,r){var i,o,s;let a=e,l=t||(()=>null),u=r;if(e&&"object"==typeof e){const d=e;a=null===(i=d.next)||void 0===i?void 0:i.bind(d),l=null===(o=d.error)||void 0===o?void 0:o.bind(d),u=null===(s=d.complete)||void 0===s?void 0:s.bind(d)}this.__isAsync&&(l=d0(l),a&&(a=d0(a)),u&&(u=d0(u)));const c=super.subscribe({next:a,error:l,complete:u});return e instanceof he&&e.add(c),c}};function HF(){return this._results[nl()]()}class df{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=nl(),r=df.prototype;r[t]||(r[t]=HF)}get changes(){return this._changes||(this._changes=new qe)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const r=this;r.dirty=!1;const i=Di(e);(this._changesDetected=!function(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r0)r.push(s[a/2]);else{const u=o[a+1],c=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=tf,this.reject=tf,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const t=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(J(nc,8))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const rc=new xt("AppId"),wO={provide:rc,useFactory:function(){return`${D0()}${D0()}${D0()}`},deps:[]};function D0(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const tC=new xt("Platform Initializer"),pf=new xt("Platform ID"),nC=new xt("appBootstrapListener");let gf=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const Ni=new xt("LocaleId"),rC=new xt("DefaultCurrencyCode");class CO{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}const C0=function(n){return new c0(n)},EO=C0,xO=function(n){return Promise.resolve(C0(n))},iC=function(n){const e=C0(n),r=yo(yi(n).declarations).reduce((i,o)=>{const s=Fr(o);return s&&i.push(new CD(s)),i},[]);return new CO(e,r)},MO=iC,NO=function(n){return Promise.resolve(iC(n))};let aa=(()=>{class n{constructor(){this.compileModuleSync=EO,this.compileModuleAsync=xO,this.compileModuleAndAllComponentsSync=MO,this.compileModuleAndAllComponentsAsync=NO}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const SO=(()=>Promise.resolve(0))();function E0(n){"undefined"==typeof Zone?SO.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Nt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new qe(!1),this.onMicrotaskEmpty=new qe(!1),this.onStable=new qe(!1),this.onError=new qe(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function(){let n=zt.requestAnimationFrame,e=zt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(n){const e=()=>{!function(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(zt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,M0(n),n.isCheckStableRunning=!0,x0(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),M0(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,s,a)=>{try{return oC(n),t.invokeTask(i,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),sC(n)}},onInvoke:(t,r,i,o,s,a,l)=>{try{return oC(n),t.invoke(i,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),sC(n)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,M0(n),x0(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Nt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Nt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,r){return this._inner.run(e,t,r)}runTask(e,t,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,RO,tf,tf);try{return o.runTask(s,t,r)}finally{o.cancelTask(s)}}runGuarded(e,t,r){return this._inner.runGuarded(e,t,r)}runOutsideAngular(e){return this._outer.run(e)}}const RO={};function x0(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function M0(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function oC(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function sC(n){n._nesting--,x0(n)}class FO{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new qe,this.onMicrotaskEmpty=new qe,this.onStable=new qe,this.onError=new qe}run(e,t,r){return e.apply(t,r)}runGuarded(e,t,r){return e.apply(t,r)}runOutsideAngular(e){return e()}runTask(e,t,r,i){return e.apply(t,r)}}let N0=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Nt.assertNotInAngularZone(),E0(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())E0(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:i})}whenStable(t,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,r,i){return[]}}return n.\u0275fac=function(t){return new(t||n)(J(Nt))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})(),aC=(()=>{class n{constructor(){this._applications=new Map,A0.addToWindow(this)}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return A0.findTestabilityInTree(this,t,r)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();class OO{addToWindow(e){}findTestabilityInTree(e,t,r){return null}}let A0=new OO,lC=!0,uC=!1;let Ki;const dC=new xt("AllowMultipleToken");class T0{constructor(e,t){this.name=e,this.token=t}}function fC(n,e,t=[]){const r=`Platform: ${e}`,i=new xt(r);return(o=[])=>{let s=hC();if(!s||s.injector.get(dC,!1))if(n)n(t.concat(o).concat({provide:i,useValue:!0}));else{const a=t.concat(o).concat({provide:i,useValue:!0},{provide:Au,useValue:"platform"});!function(n){if(Ki&&!Ki.destroyed&&!Ki.injector.get(dC,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Ki=n.get(pC);const e=n.get(tC,null);e&&e.forEach(t=>t())}(It.create({providers:a,name:r}))}return function(n){const e=hC();if(!e)throw new Error("No platform exists!");if(!e.injector.get(n,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function hC(){return Ki&&!Ki.destroyed?Ki:null}let pC=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const a=function(n,e){let t;return t="noop"===n?new FO:("zone.js"===n?void 0:n)||new Nt({enableLongStackTrace:(uC=!0,lC),shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:Nt,useValue:a}];return a.run(()=>{const u=It.create({providers:l,parent:this.injector,name:t.moduleType.name}),c=t.create(u),d=c.injector.get(Zs,null);if(!d)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(()=>{const g=a.onError.subscribe({next:y=>{d.handleError(y)}});c.onDestroy(()=>{S0(this._modules,c),g.unsubscribe()})}),function(n,e,t){try{const r=t();return ku(r)?r.catch(i=>{throw e.runOutsideAngular(()=>n.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>n.handleError(r)),r}}(d,a,()=>{const g=c.injector.get(Nl);return g.runInitializers(),g.donePromise.then(()=>(jg(c.injector.get(Ni,Yd)||Yd),this._moduleDoBootstrap(c),c))})})}bootstrapModule(t,r=[]){const i=gC({},r);return function(n,e,t){const r=new c0(t);return Promise.resolve(r)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(t){const r=t.injector.get(Yi);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${Fe(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(J(It))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function gC(n,e){return Array.isArray(e)?e.reduce(gC,n):Object.assign(Object.assign({},n),e)}let Yi=(()=>{class n{constructor(t,r,i,o,s){this._zone=t,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=o,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new Se(u=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{u.next(this._stable),u.complete()})}),l=new Se(u=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{Nt.assertNotInAngularZone(),E0(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,u.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{Nt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{u.next(!1)}))});return()=>{c.unsubscribe(),d.unsubscribe()}});this.isStable=function(...n){let e=Number.POSITIVE_INFINITY,t=null,r=n[n.length-1];return v(r)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof r&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Se?n[0]:Be(e)(pt(n,t))}(a,l.pipe(n=>Ye()(function(n,e){return function(r){let i;i="function"==typeof n?n:function(){return n};const o=Object.create(r,Fo);return o.source=r,o.subjectFactory=i,o}}(Lo)(n))))}bootstrap(t,r){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=t instanceof Uw?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const o=function(n){return n.isBoundToModule}(i)?void 0:this._injector.get(Co),a=i.create(It.NULL,[],r||i.selector,o),l=a.location.nativeElement,u=a.injector.get(N0,null),c=u&&a.injector.get(aC);return u&&c&&c.registerApplication(l,u),a.onDestroy(()=>{this.detachView(a.hostView),S0(this.components,a),c&&c.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;S0(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(nC,[]).concat(this._bootstrapListeners).forEach(i=>i(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(J(Nt),J(It),J(Zs),J(ui),J(Nl))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function S0(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class _f{}class QO{}const ZO={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let XO=(()=>{class n{constructor(t,r){this._compiler=t,this._config=r||ZO}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[r,i]=t.split("#");return void 0===i&&(i="default"),ee(255)(r).then(o=>o[i]).then(o=>bC(o,r,i)).then(o=>this._compiler.compileModuleAsync(o))}loadFactory(t){let[r,i]=t.split("#"),o="NgFactory";return void 0===i&&(i="default",o=""),ee(255)(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(s=>s[i+o]).then(s=>bC(s,r,i))}}return n.\u0275fac=function(t){return new(t||n)(J(aa),J(QO,8))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function bC(n,e,t){if(!n)throw new Error(`Cannot find '${t}' in '${e}'`);return n}const u6=fC(null,"core",[{provide:pf,useValue:"unknown"},{provide:pC,deps:[It]},{provide:aC,deps:[]},{provide:gf,deps:[]}]),p6=[{provide:Yi,useClass:Yi,deps:[Nt,It,Zs,ui,Nl]},{provide:vF,deps:[Nt],useFactory:function(n){let e=[];return n.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Nl,useClass:Nl,deps:[[new Kr,nc]]},{provide:aa,useClass:aa,deps:[]},wO,{provide:ju,useFactory:function(){return pP},deps:[]},{provide:vl,useFactory:function(){return gP},deps:[]},{provide:Ni,useFactory:function(n){return jg(n=n||"undefined"!=typeof $localize&&$localize.locale||Yd),n},deps:[[new za(Ni),new Kr,new Ds]]},{provide:rC,useValue:"USD"}];let m6=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(J(Yi))},n.\u0275mod=tn({type:n}),n.\u0275inj=St({providers:p6}),n})(),Nf=null;function Eo(){return Nf}const Yt=new xt("DocumentToken");let ca=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({factory:g4,token:n,providedIn:"platform"}),n})();function g4(){return J($C)}const m4=new xt("Location Initialized");let $C=(()=>{class n extends ca{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Eo().getBaseHref(this._doc)}onPopState(t){const r=Eo().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){const r=Eo().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,r,i){GC()?this._history.pushState(t,r,i):this.location.hash=i}replaceState(t,r,i){GC()?this._history.replaceState(t,r,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(J(Yt))},n.\u0275prov=_e({factory:_4,token:n,providedIn:"platform"}),n})();function GC(){return!!window.history.pushState}function _4(){return new $C(J(Yt))}function z0(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function zC(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Xo(n){return n&&"?"!==n[0]?"?"+n:n}let Sl=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({factory:y4,token:n,providedIn:"root"}),n})();function y4(n){const e=J(Yt).location;return new WC(J(ca),e&&e.origin||"")}const W0=new xt("appBaseHref");let WC=(()=>{class n extends Sl{constructor(t,r){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==r&&(r=this._platformLocation.getBaseHrefFromDOM()),null==r)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return z0(this._baseHref,t)}path(t=!1){const r=this._platformLocation.pathname+Xo(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${r}${i}`:r}pushState(t,r,i,o){const s=this.prepareExternalUrl(i+Xo(o));this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){const s=this.prepareExternalUrl(i+Xo(o));this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(J(ca),J(W0,8))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})(),b4=(()=>{class n extends Sl{constructor(t,r){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(t){const r=z0(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,i,o){let s=this.prepareExternalUrl(i+Xo(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,r,s)}replaceState(t,r,i,o){let s=this.prepareExternalUrl(i+Xo(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformLocation).historyGo)||void 0===i||i.call(r,t)}}return n.\u0275fac=function(t){return new(t||n)(J(ca),J(W0,8))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})(),Af=(()=>{class n{constructor(t,r){this._subject=new qe,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=r,this._baseHref=zC(qC(i)),this._platformStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+Xo(r))}normalize(t){return n.stripTrailingSlash(function(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,qC(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,r="",i=null){this._platformStrategy.pushState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Xo(r)),i)}replaceState(t,r="",i=null){this._platformStrategy.replaceState(i,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Xo(r)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var r,i;null===(i=(r=this._platformStrategy).historyGo)||void 0===i||i.call(r,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}))}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(i=>i(t,r))}subscribe(t,r,i){return this._subject.subscribe({next:t,error:r,complete:i})}}return n.\u0275fac=function(t){return new(t||n)(J(Sl),J(ca))},n.normalizeQueryParams=Xo,n.joinWithSlash=z0,n.stripTrailingSlash=zC,n.\u0275prov=_e({factory:v4,token:n,providedIn:"root"}),n})();function v4(){return new Af(J(Sl),J(ca))}function qC(n){return n.replace(/\/index.html$/,"")}var $n=(()=>(($n=$n||{})[$n.Zero=0]="Zero",$n[$n.One=1]="One",$n[$n.Two=2]="Two",$n[$n.Few=3]="Few",$n[$n.Many=4]="Many",$n[$n.Other=5]="Other",$n))();const x4=function(n){return function(n){const e=function(n){return n.toLowerCase().replace(/_/g,"-")}(n);let t=mw(e);if(t)return t;const r=e.split("-")[0];if(t=mw(r),t)return t;if("en"===r)return Jk;throw new Error(`Missing locale data for the locale "${n}".`)}(n)[Te.PluralCase]};class Vf{}let X4=(()=>{class n extends Vf{constructor(t){super(),this.locale=t}getPluralCategory(t,r){switch(x4(r||this.locale)(t)){case $n.Zero:return"zero";case $n.One:return"one";case $n.Two:return"two";case $n.Few:return"few";case $n.Many:return"many";default:return"other"}}}return n.\u0275fac=function(t){return new(t||n)(J(Ni))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();class r5{constructor(e,t,r,i){this.$implicit=e,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ci=(()=>{class n{constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(r){throw new Error(`Cannot find a differ supporting object '${t}' of type '${function(n){return n.name||typeof n}(t)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=[];t.forEachOperation((i,o,s)=>{if(null==i.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new r5(null,this._ngForOf,-1,-1),null===s?void 0:s),l=new oE(i,a);r.push(l)}else if(null==s)this._viewContainer.remove(null===o?void 0:o);else if(null!==o){const a=this._viewContainer.get(o);this._viewContainer.move(a,s);const l=new oE(i,a);r.push(l)}});for(let i=0;i{this._viewContainer.get(i.currentIndex).context.$implicit=i.item})}_perViewChange(t,r){t.context.$implicit=r.item}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(P(Hr),P(hn),P(ju))},n.\u0275dir=fe({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();class oE{constructor(e,t){this.record=e,this.view=t}}let $r=(()=>{class n{constructor(t,r){this._viewContainer=t,this._context=new o5,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){sE("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){sE("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}}return n.\u0275fac=function(t){return new(t||n)(P(Hr),P(hn))},n.\u0275dir=fe({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class o5{constructor(){this.$implicit=null,this.ngIf=null}}function sE(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Fe(e)}'.`)}let di=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({providers:[{provide:Vf,useClass:X4}]}),n})();let dE=(()=>{class n{}return n.\u0275prov=_e({token:n,providedIn:"root",factory:()=>new k5(J(Yt),window)}),n})();class k5{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let i=r.currentNode;for(;i;){const o=i.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=r.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),this.attemptFocus(t))}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),r=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(r-o[0],i-o[1])}attemptFocus(e){return e.focus(),this.document.activeElement===e}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=fE(this.window.history)||fE(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}function fE(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class sm extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function(n){Nf||(Nf=n)}(new sm)}onAndCancel(e,t,r){return e.addEventListener(t,r,!1),()=>{e.removeEventListener(t,r,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=(cc=cc||document.querySelector("base"),cc?cc.getAttribute("href"):null);return null==t?null:function(n){Bf=Bf||document.createElement("a"),Bf.setAttribute("href",n);const e=Bf.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){cc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}(document.cookie,e)}}let Bf,cc=null;const hE=new xt("TRANSITION_ID"),H5=[{provide:nc,useFactory:function(n,e,t){return()=>{t.get(Nl).donePromise.then(()=>{const r=Eo(),i=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{const o=e.findTestabilityInTree(r,i);if(null==o)throw new Error("Could not find testability for element.");return o},zt.getAllAngularTestabilities=()=>e.getAllTestabilities(),zt.getAllAngularRootElements=()=>e.getAllRootElements(),zt.frameworkStabilizers||(zt.frameworkStabilizers=[]),zt.frameworkStabilizers.push(r=>{const i=zt.getAllAngularTestabilities();let o=i.length,s=!1;const a=function(l){s=s||l,o--,0==o&&r(s)};i.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,r){if(null==t)return null;const i=e.getTestability(t);return null!=i?i:r?Eo().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let U5=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const dc=new xt("EventManagerPlugins");let Uf=(()=>{class n{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>i.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}addGlobalEventListener(t,r,i){return this._findPluginFor(r).addGlobalEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){const r=this._eventNameToPlugin.get(t);if(r)return r;const i=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const r=new Set;t.forEach(i=>{this._stylesSet.has(i)||(this._stylesSet.add(i),r.add(i))}),this.onStylesAdded(r)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})(),fc=(()=>{class n extends gE{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,r,i){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,i.push(r.appendChild(s))})}addHost(t){const r=[];this._addStylesToHost(this._stylesSet,t,r),this._hostNodes.set(t,r)}removeHost(t){const r=this._hostNodes.get(t);r&&r.forEach(mE),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((r,i)=>{this._addStylesToHost(t,i,r)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(mE))}}return n.\u0275fac=function(t){return new(t||n)(J(Yt))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function mE(n){Eo().remove(n)}const um={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},cm=/%COMP%/g;function jf(n,e,t){for(let r=0;r{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let dm=(()=>{class n{constructor(t,r,i){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new fm(t)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;switch(r.encapsulation){case Wn.Emulated:{let i=this.rendererByCompId.get(r.id);return i||(i=new n8(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,i)),i.applyToHost(t),i}case 1:case Wn.ShadowDom:return new r8(this.eventManager,this.sharedStylesHost,t,r);default:if(!this.rendererByCompId.has(r.id)){const i=jf(r.id,r.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(J(Uf),J(fc),J(rc))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();class fm{constructor(e){this.eventManager=e,this.data=Object.create(null)}destroy(){}createElement(e,t){return t?document.createElementNS(um[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,r){e&&e.insertBefore(t,r)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return t||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,r,i){if(i){t=i+":"+t;const o=um[i];o?e.setAttributeNS(o,t,r):e.setAttribute(t,r)}else e.setAttribute(t,r)}removeAttribute(e,t,r){if(r){const i=um[r];i?e.removeAttributeNS(i,t):e.removeAttribute(`${r}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,r,i){i&(si.DashCase|si.Important)?e.style.setProperty(t,r,i&si.Important?"important":""):e.style[t]=r}removeStyle(e,t,r){r&si.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,r){e[t]=r}setValue(e,t){e.nodeValue=t}listen(e,t,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,bE(r)):this.eventManager.addEventListener(e,t,bE(r))}}class n8 extends fm{constructor(e,t,r,i){super(e),this.component=r;const o=jf(i+"-"+r.id,r.styles,[]);t.addStyles(o),this.contentAttr=function(n){return"_ngcontent-%COMP%".replace(cm,n)}(i+"-"+r.id),this.hostAttr=function(n){return"_nghost-%COMP%".replace(cm,n)}(i+"-"+r.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const r=super.createElement(e,t);return super.setAttribute(r,this.contentAttr,""),r}}class r8 extends fm{constructor(e,t,r,i){super(e),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=jf(i.id,i.styles,[]);for(let s=0;s{class n extends lm{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}}return n.\u0275fac=function(t){return new(t||n)(J(Yt))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const DE=["alt","control","meta","shift"],d8={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},CE={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},f8={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let h8=(()=>{class n extends lm{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,r,i){const o=n.parseEventName(r),s=n.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Eo().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=n._normalizeKey(r.pop());let s="";if(DE.forEach(l=>{const u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=o,0!=r.length||0===o.length)return null;const a={};return a.domEventName=i,a.fullKey=s,a}static getEventFullKey(t){let r="",i=function(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&CE.hasOwnProperty(e)&&(e=CE[e]))}return d8[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),DE.forEach(o=>{o!=i&&f8[o](t)&&(r+=o+".")}),r+=i,r}static eventCallback(t,r,i){return o=>{n.getEventFullKey(o)===t&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return n.\u0275fac=function(t){return new(t||n)(J(Yt))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const w8=fC(u6,"browser",[{provide:pf,useValue:"browser"},{provide:tC,useValue:function(){sm.makeCurrent(),am.init()},multi:!0},{provide:Yt,useFactory:function(){return function(n){hp=n}(document),document},deps:[]}]),D8=[[],{provide:Au,useValue:"root"},{provide:Zs,useFactory:function(){return new Zs},deps:[]},{provide:dc,useClass:i8,multi:!0,deps:[Yt,Nt,pf]},{provide:dc,useClass:h8,multi:!0,deps:[Yt]},[],{provide:dm,useClass:dm,deps:[Uf,fc,rc]},{provide:bl,useExisting:dm},{provide:gE,useExisting:fc},{provide:fc,useClass:fc,deps:[Yt]},{provide:N0,useClass:N0,deps:[Nt]},{provide:Uf,useClass:Uf,deps:[dc,Nt]},{provide:class{},useClass:U5,deps:[]},[]];let C8=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:rc,useValue:t.appId},{provide:hE,useExisting:rc},H5]}}}return n.\u0275fac=function(t){return new(t||n)(J(n,12))},n.\u0275mod=tn({type:n}),n.\u0275inj=St({providers:D8,imports:[di,m6]}),n})();"undefined"!=typeof window&&window;const da=new Se(n=>n.complete());function $f(n){return n?function(n){return new Se(e=>n.schedule(()=>e.complete()))}(n):da}function ot(...n){let e=n[n.length-1];return v(e)?(n.pop(),q(n,e)):pt(n)}function yr(n,e,t,r){return j(t)&&(r=t,t=void 0),r?yr(n,e,t).pipe(b(i=>de(i)?r(...i):r(i))):new Se(i=>{xE(n,e,function(s){i.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},i,t)})}function xE(n,e,t,r,i){let o;if(function(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(e,t,i),o=()=>s.removeEventListener(e,t,i)}else if(function(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(e,t),o=()=>s.off(e,t)}else if(function(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(e,t),o=()=>s.removeListener(e,t)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s{class n{constructor(t,r=n.now){this.SchedulerAction=t,this.now=r}schedule(t,r=0,i){return new this.SchedulerAction(this,t).schedule(i,r)}}return n.now=()=>Date.now(),n})();class Ts extends ME{constructor(e,t=ME.now){super(e,()=>Ts.delegate&&Ts.delegate!==this?Ts.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,r){return Ts.delegate&&Ts.delegate!==this?Ts.delegate.schedule(e,t,r):super.schedule(e,t,r)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}}const NE=new Ts(class extends F8{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,r=0){return setInterval(e.flush.bind(e,this),r)}recycleAsyncId(e,t,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i,r=!1;try{this.work(e)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,r=t.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}});function AE(n){return!de(n)&&n-parseFloat(n)+1>=0}function L8(n){const{index:e,period:t,subscriber:r}=n;if(r.next(e),!r.closed){if(-1===t)return r.complete();n.index=e+1,this.schedule(n,t)}}class _m extends ${notifyNext(e,t,r,i,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class V8 extends ${constructor(e,t,r){super(),this.parent=e,this.outerValue=t,this.outerIndex=r,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function ym(n,e,t,r,i=new V8(n,t,r)){if(!i.closed)return e instanceof Se?e.subscribe(i):w(e)(i)}class B8{call(e,t){return t.subscribe(new H8(e))}}class H8 extends _m{constructor(e){super(e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(e){this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(let r=0;rthis.index}hasCompleted(){return this.array.length===this.index}}class q8 extends m{constructor(e,t,r){super(e),this.parent=t,this.observable=r,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[N](){return this}next(){const e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(e){this.buffer.push(e),this.parent.checkIterators()}subscribe(){return I(this.observable,new be(this))}}function zf(...n){return Be(1)(ot(...n))}function On(n){return e=>e.lift(new Y8(n))}class Y8{constructor(e){this.notifier=e}call(e,t){const r=new Q8(e),i=I(this.notifier,new be(r));return i&&!r.seenValue?(r.add(i),t.subscribe(r)):r}}class Q8 extends m{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function er(n,e){return function(r){return r.lift(new Z8(n,e))}}class Z8{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new X8(e,this.predicate,this.thisArg))}}class X8 extends ${constructor(e,t,r){super(e),this.predicate=t,this.thisArg=r,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(r){return void this.destination.error(r)}t&&this.destination.next(e)}}const kE=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function Gr(n){return e=>0===n?$f():e.lift(new e7(n))}class e7{constructor(e){if(this.total=e,this.total<0)throw new kE}call(e,t){return t.subscribe(new t7(e,this.total))}}class t7 extends ${constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))}}function no(n,e){return"function"==typeof e?t=>t.pipe(no((r,i)=>Re(n(r,i)).pipe(b((o,s)=>e(r,o,i,s))))):t=>t.lift(new i7(n))}class i7{constructor(e){this.project=e}call(e,t){return t.subscribe(new o7(e,this.project))}}class o7 extends m{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const r=this.index++;try{t=this.project(e,r)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const r=new be(this),i=this.destination;i.add(r),this.innerSubscription=I(e,r),this.innerSubscription!==r&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}function br(n,e,t){return function(i){return i.lift(new s7(n,e,t))}}class s7{constructor(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}call(e,t){return t.subscribe(new a7(e,this.nextOrObserver,this.error,this.complete))}}class a7 extends ${constructor(e,t,r,i){super(e),this._tapNext=ts,this._tapError=ts,this._tapComplete=ts,this._tapError=r||ts,this._tapComplete=i||ts,j(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||ts,this._tapError=t.error||ts,this._tapComplete=t.complete||ts)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}function wm(...n){return e=>{let t;return"function"==typeof n[n.length-1]&&(t=n.pop()),e.lift(new l7(n,t))}}class l7{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new u7(e,this.observables,this.project))}}class u7 extends _m{constructor(e,t,r){super(e),this.observables=t,this.project=r,this.toRespond=[];const i=t.length;this.values=new Array(i);for(let o=0;o0){const o=i.indexOf(r);-1!==o&&i.splice(o,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(r){return void this.destination.error(r)}this.destination.next(t)}}class ro{constructor(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}}accept(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)}toObservable(){switch(this.kind){case"N":return ot(this.value);case"E":return function(n,e){return new Se(t=>t.error(n))}(this.error);case"C":return $f()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new ro("N",e):ro.undefinedValueNotification}static createError(e){return new ro("E",void 0,e)}static createComplete(){return ro.completeNotification}}ro.completeNotification=new ro("C"),ro.undefinedValueNotification=new ro("N",void 0);let m2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})(),F2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[m2]]}),n})(),O2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[F2]}),n})();const Rl=["*"],QL=["dialog"];function Ps(n){return null!=n}function Pl(n){return(n||document.body).getBoundingClientRect()}"undefined"!=typeof Element&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(n){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});const B2={animation:!0,transitionTimerDelayMs:5};let ur=(()=>{class n{constructor(){this.animation=B2.animation}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=_e({factory:function(){return new n},token:n,providedIn:"root"}),n})();const uB=()=>{},{transitionTimerDelayMs:cB}=B2,yc=new Map,tr=(n,e,t,r)=>{let i=r.context||{};const o=yc.get(e);if(o)switch(r.runningTransition){case"continue":return da;case"stop":n.run(()=>o.transition$.complete()),i=Object.assign(o.context,i),yc.delete(e)}const s=t(e,r.animation,i)||uB;if(!r.animation||"none"===window.getComputedStyle(e).transitionProperty)return n.run(()=>s()),ot(void 0).pipe(function(n){return e=>new Se(t=>e.subscribe(s=>n.run(()=>t.next(s)),s=>n.run(()=>t.error(s)),()=>n.run(()=>t.complete())))}(n));const a=new f,l=new f,u=a.pipe(function(...n){return e=>zf(e,ot(...n))}(!0));yc.set(e,{transition$:a,complete:()=>{l.next(),l.complete()},context:i});const c=function(n){const{transitionDelay:e,transitionDuration:t}=window.getComputedStyle(n);return 1e3*(parseFloat(e)+parseFloat(t))}(e);return n.runOutsideAngular(()=>{const d=yr(e,"transitionend").pipe(On(u),er(({target:y})=>y===e));(function(...n){if(1===n.length){if(!de(n[0]))return n[0];n=n[0]}return pt(n,void 0).lift(new B8)})(function(n=0,e,t){let r=-1;return AE(e)?r=Number(e)<1?1:Number(e):v(e)&&(t=e),v(t)||(t=NE),new Se(i=>{const o=AE(n)?n:+n-t.now();return t.schedule(L8,o,{index:0,period:r,subscriber:i})})}(c+cB).pipe(On(u)),d,l).pipe(On(u)).subscribe(()=>{yc.delete(e),n.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()};let G2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),z2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),q2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})(),Y2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Q2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})();var Ct=(()=>(function(n){n[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Escape=27]="Escape",n[n.Space=32]="Space",n[n.PageUp=33]="PageUp",n[n.PageDown=34]="PageDown",n[n.End=35]="End",n[n.Home=36]="Home",n[n.ArrowLeft=37]="ArrowLeft",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowRight=39]="ArrowRight",n[n.ArrowDown=40]="ArrowDown"}(Ct||(Ct={})),Ct))();"undefined"!=typeof navigator&&navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));const nx=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function rx(n){const e=Array.from(n.querySelectorAll(nx)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}new class{getAllStyles(e){return window.getComputedStyle(e)}getStyle(e,t){return this.getAllStyles(e)[t]}isStaticPositioned(e){return"static"===(this.getStyle(e,"position")||"static")}offsetParent(e){let t=e.offsetParent||document.documentElement;for(;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement}position(e,t=!0){let r,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position"))r=e.getBoundingClientRect(),r={top:r.top,bottom:r.bottom,left:r.left,right:r.right,height:r.height,width:r.width};else{const o=this.offsetParent(e);r=this.offset(e,!1),o!==document.documentElement&&(i=this.offset(o,!1)),i.top+=o.clientTop,i.left+=o.clientLeft}return r.top-=i.top,r.bottom-=i.top,r.left-=i.left,r.right-=i.left,t&&(r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r}offset(e,t=!0){const r=e.getBoundingClientRect(),i_top=window.pageYOffset-document.documentElement.clientTop,i_left=window.pageXOffset-document.documentElement.clientLeft;let o={height:r.height||e.offsetHeight,width:r.width||e.offsetWidth,top:r.top+i_top,bottom:r.bottom+i_top,left:r.left+i_left,right:r.right+i_left};return t&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(e,t,r,i){const[o="top",s="center"]=r.split("-"),a=i?this.offset(e,!1):this.position(e,!1),l=this.getAllStyles(t),u=parseFloat(l.marginTop),c=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),g=parseFloat(l.marginRight);let y=0,D=0;switch(o){case"top":y=a.top-(t.offsetHeight+u+c);break;case"bottom":y=a.top+a.height;break;case"left":D=a.left-(t.offsetWidth+d+g);break;case"right":D=a.left+a.width}switch(s){case"top":y=a.top;break;case"bottom":y=a.top+a.height-t.offsetHeight;break;case"left":D=a.left;break;case"right":D=a.left+a.width-t.offsetWidth;break;case"center":"top"===o||"bottom"===o?D=a.left+a.width/2-t.offsetWidth/2:y=a.top+a.height/2-t.offsetHeight/2}t.style.transform=`translate(${Math.round(D)}px, ${Math.round(y)}px)`;const T=t.getBoundingClientRect(),R=document.documentElement,V=window.innerHeight||R.clientHeight,L=window.innerWidth||R.clientWidth;return T.left>=0&&T.top>=0&&T.right<=L&&T.bottom<=V}},new Date(1882,10,12),new Date(2174,10,25);let hx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di,O2]]}),n})(),_x=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})(),yx=(()=>{class n{constructor(t){this._ngbConfig=t,this.backdrop=!0,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(t){this._animation=t}}return n.\u0275fac=function(t){return new(t||n)(J(ur))},n.\u0275prov=_e({factory:function(){return new n(J(ur))},token:n,providedIn:"root"}),n})();class _a{constructor(e,t,r){this.nodes=e,this.viewRef=t,this.componentRef=r}}const a9=()=>{};let bx=(()=>{class n{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):a9}_adjustBody(t){const r=this._document.body,i=r.style.paddingRight,o=parseFloat(window.getComputedStyle(r)["padding-right"]);return r.style["padding-right"]=`${o+t}px`,()=>r.style["padding-right"]=i}_isPresent(t){const r=this._document.body.getBoundingClientRect();return window.innerWidth-(r.left+r.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const r=this._document.body;r.appendChild(t);const i=t.getBoundingClientRect().width-t.clientWidth;return r.removeChild(t),i}}return n.\u0275fac=function(t){return new(t||n)(J(Yt))},n.\u0275prov=_e({factory:function(){return new n(J(Yt))},token:n,providedIn:"root"}),n})(),l9=(()=>{class n{constructor(t,r){this._el=t,this._zone=r}ngOnInit(){this._zone.onStable.asObservable().pipe(Gr(1)).subscribe(()=>{tr(this._zone,this._el.nativeElement,(t,r)=>{r&&Pl(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return tr(this._zone,this._el.nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return n.\u0275fac=function(t){return new(t||n)(P(yt),P(Nt))},n.\u0275cmp=Dn({type:n,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(t,r){2&t&&(Gi("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),gt("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,r){},encapsulation:2}),n})();class vx{close(e){}dismiss(e){}}class u9{constructor(e,t,r,i){this._windowCmptRef=e,this._contentRef=t,this._backdropCmptRef=r,this._beforeDismiss=i,this._closed=new f,this._dismissed=new f,this._hidden=new f,e.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(On(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(On(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(e){this._windowCmptRef&&(this._closed.next(e),this._resolve(e),this._removeModalElements())}_dismiss(e){this._dismissed.next(e),this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(this._beforeDismiss){const t=this._beforeDismiss();t&&t.then?t.then(r=>{!1!==r&&this._dismiss(e)},()=>{}):!1!==t&&this._dismiss(e)}else this._dismiss(e)}_removeModalElements(){const e=this._windowCmptRef.instance.hide(),t=this._backdropCmptRef?this._backdropCmptRef.instance.hide():ot(void 0);e.subscribe(()=>{const{nativeElement:r}=this._windowCmptRef.location;r.parentNode.removeChild(r),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),t.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:r}=this._backdropCmptRef.location;r.parentNode.removeChild(r),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Gf(e,t).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ya=(()=>(function(n){n[n.BACKDROP_CLICK=0]="BACKDROP_CLICK",n[n.ESC=1]="ESC"}(ya||(ya={})),ya))();let c9=(()=>{class n{constructor(t,r,i){this._document=t,this._elRef=r,this._zone=i,this._closed$=new f,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new qe,this.shown=new f,this.hidden=new f}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Gr(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:t}=this._elRef,r={animation:this.animation,runningTransition:"stop"},s=Gf(tr(this._zone,t,()=>t.classList.remove("show"),r),tr(this._zone,this._dialogEl.nativeElement,()=>{},r));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const t={animation:this.animation,runningTransition:"continue"};Gf(tr(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Pl(o),o.classList.add("show")},t),tr(this._zone,this._dialogEl.nativeElement,()=>{},t)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{yr(t,"keydown").pipe(On(this._closed$),er(i=>i.which===Ct.Escape)).subscribe(i=>{this.keyboard?requestAnimationFrame(()=>{i.defaultPrevented||this._zone.run(()=>this.dismiss(ya.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let r=!1;yr(this._dialogEl.nativeElement,"mousedown").pipe(On(this._closed$),br(()=>r=!1),no(()=>yr(t,"mouseup").pipe(On(this._closed$),Gr(1))),er(({target:i})=>t===i)).subscribe(()=>{r=!0}),yr(t,"click").pipe(On(this._closed$)).subscribe(({target:i})=>{t===i&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!r&&this._zone.run(()=>this.dismiss(ya.BACKDROP_CLICK))),r=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){const r=t.querySelector("[ngbAutofocus]"),i=rx(t)[0];(r||i||t).focus()}}_restoreFocus(){const t=this._document.body,r=this._elWithFocus;let i;i=r&&r.focus&&t.contains(r)?r:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>i.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&tr(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return n.\u0275fac=function(t){return new(t||n)(P(Yt),P(yt),P(Nt))},n.\u0275cmp=Dn({type:n,selectors:[["ngb-modal-window"]],viewQuery:function(t,r){if(1&t&&sa(QL,7),2&t){let i;Jt(i=function(n,e){return n[19].queries[e].queryList}(te(),L_()))&&(r._dialogEl=i.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(t,r){2&t&&(Pt("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),Gi("modal d-block"+(r.windowClass?" "+r.windowClass:"")),gt("fade",r.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:Rl,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,r){1&t&&(function(n){const e=te()[16][6];if(!e.projection){const r=e.projection=ws(n?n.length:1,null),i=r.slice();let o=e.child;for(;null!==o;){const s=n?fk(o,n):0;null!==s&&(i[s]?i[s].projectionNext=o:r[s]=o,i[s]=o),o=o.next}}}(),H(0,"div",0,1),H(2,"div",2),function(n,e=0,t){const r=te(),i=kt(),o=Qa(i,20+n,16,null,t||null);null===o.projection&&(o.projection=e),bp(),64!=(64&o.flags)&&function(n,e,t){Xy(e[11],0,e,t,$y(n,t,e),qy(t.parent||e[6],t,e))}(i,r,o)}(3),U(),U()),2&t&&Gi("modal-dialog"+(r.size?" modal-"+r.size:"")+(r.centered?" modal-dialog-centered":"")+(r.scrollable?" modal-dialog-scrollable":"")+(r.modalDialogClass?" "+r.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),n})(),wx=(()=>{class n{constructor(t,r,i,o,s,a){this._applicationRef=t,this._injector=r,this._document=i,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new f,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass","modalDialogClass"],this._windowCmpts=[],this._activeInstances=new qe,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((n,e,t,r=!1)=>{n.runOutsideAngular(()=>{const i=yr(e,"focusin").pipe(On(t),b(o=>o.target));yr(e,"keydown").pipe(On(t),er(o=>o.which===Ct.Tab),wm(i)).subscribe(([o,s])=>{const[a,l]=rx(e);(s===a||s===e)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),r&&yr(e,"click").pipe(On(t),wm(i),b(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(t,r,i,o){const s=o.container instanceof HTMLElement?o.container:Ps(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),u=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const c=new vx,d=this._getContentRef(t,o.injector||r,i,c,o);let g=!1!==o.backdrop?this._attachBackdrop(t,s):void 0,y=this._attachWindowComponent(t,s,d),D=new u9(y,d,g,o.beforeDismiss);return this._registerModalRef(D),this._registerWindowCmpt(y),D.result.then(l,l),D.result.then(u,u),c.close=T=>{D.close(T)},c.dismiss=T=>{D.dismiss(T)},this._applyWindowOptions(y.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),g&&g.instance&&(this._applyBackdropOptions(g.instance,o),g.changeDetectorRef.detectChanges()),y.changeDetectorRef.detectChanges(),D}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(r=>r.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,r){let o=t.resolveComponentFactory(l9).create(this._injector);return this._applicationRef.attachView(o.hostView),r.appendChild(o.location.nativeElement),o}_attachWindowComponent(t,r,i){let s=t.resolveComponentFactory(c9).create(this._injector,i.nodes);return this._applicationRef.attachView(s.hostView),r.appendChild(s.location.nativeElement),s}_applyWindowOptions(t,r){this._windowAttributes.forEach(i=>{Ps(r[i])&&(t[i]=r[i])})}_applyBackdropOptions(t,r){this._backdropAttributes.forEach(i=>{Ps(r[i])&&(t[i]=r[i])})}_getContentRef(t,r,i,o,s){return i?i instanceof hn?this._createFromTemplateRef(i,o):function(n){return"string"==typeof n}(i)?this._createFromString(i):this._createFromComponent(t,r,i,o,s):new _a([])}_createFromTemplateRef(t,r){const o=t.createEmbeddedView({$implicit:r,close(s){r.close(s)},dismiss(s){r.dismiss(s)}});return this._applicationRef.attachView(o),new _a([o.rootNodes],o)}_createFromString(t){const r=this._document.createTextNode(`${t}`);return new _a([[r]])}_createFromComponent(t,r,i,o,s){const a=t.resolveComponentFactory(i),l=It.create({providers:[{provide:vx,useValue:o}],parent:r}),u=a.create(l),c=u.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(u.hostView),new _a([[c]],u.hostView,u)}_setAriaHidden(t){const r=t.parentElement;r&&t!==this._document.body&&(Array.from(r.children).forEach(i=>{i!==t&&"SCRIPT"!==i.nodeName&&(this._ariaHiddenValues.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}),this._setAriaHidden(r))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,r)=>{t?r.setAttribute("aria-hidden",t):r.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const r=()=>{const i=this._modalRefs.indexOf(t);i>-1&&(this._modalRefs.splice(i,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(r,r)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const r=this._windowCmpts.indexOf(t);r>-1&&(this._windowCmpts.splice(r,1),this._activeWindowCmptHasChanged.next())})}}return n.\u0275fac=function(t){return new(t||n)(J(Yi),J(It),J(Yt),J(bx),J(bl),J(Nt))},n.\u0275prov=_e({factory:function(){return new n(J(Yi),J(xs),J(Yt),J(bx),J(bl),J(Nt))},token:n,providedIn:"root"}),n})(),Dx=(()=>{class n{constructor(t,r,i,o){this._moduleCFR=t,this._injector=r,this._modalStack=i,this._config=o}open(t,r={}){const i=Object.assign(Object.assign(Object.assign({},this._config),{animation:this._config.animation}),r);return this._modalStack.open(this._moduleCFR,this._injector,t,i)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return n.\u0275fac=function(t){return new(t||n)(J(ui),J(It),J(wx),J(yx))},n.\u0275prov=_e({factory:function(){return new n(J(ui),J(xs),J(wx),J(yx))},token:n,providedIn:"root"}),n})(),Cx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({providers:[Dx]}),n})(),Nx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Fx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Vx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Bx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Hx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Gx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),zx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})(),Wx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})();new xt("live announcer delay",{providedIn:"root",factory:function(){return 100}});let Kx=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[di]]}),n})();const q9=[G2,z2,q2,Y2,Q2,hx,_x,Cx,Nx,Fx,Vx,Bx,Hx,Gx,zx,Wx,Kx];let J9=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[q9,G2,z2,q2,Y2,Q2,hx,_x,Cx,Nx,Fx,Vx,Bx,Hx,Gx,zx,Wx,Kx]}),n})();const gh=(()=>{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();function Yx(n){return new Se(e=>{let t;try{t=n()}catch(i){return void e.error(i)}return(t?Re(t):$f()).subscribe(e)})}function Qx(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(i){return i.lift(new K9(n,e,t))}}class K9{constructor(e,t,r=!1){this.accumulator=e,this.seed=t,this.hasSeed=r}call(e,t){return t.subscribe(new Y9(e,this.accumulator,this.seed,this.hasSeed))}}class Y9 extends ${constructor(e,t,r,i){super(e),this.accumulator=t,this._seed=r,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let r;try{r=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=r,this.destination.next(r)}}function ba(n){return function(t){const r=new Q9(n),i=t.lift(r);return r.caught=i}}class Q9{constructor(e){this.selector=e}call(e,t){return t.subscribe(new Z9(e,this.selector,this.caught))}}class Z9 extends m{constructor(e,t,r){super(e),this.selector=t,this.caught=r}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const r=new be(this);this.add(r);const i=I(t,r);i!==r&&this.add(i)}}}function Ec(n,e){return F(n,e,1)}function a1(n){return function(t){return 0===n?$f():t.lift(new X9(n))}}class X9{constructor(e){if(this.total=e,this.total<0)throw new kE}call(e,t){return t.subscribe(new eH(e,this.total))}}class eH extends ${constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,r=this.total,i=this.count++;t.length0){const r=this.count>=this.total?this.total:this.count,i=this.ring;for(let o=0;oe.lift(new tH(n))}class tH{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new nH(e,this.errorFactory))}}class nH extends ${constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function rH(){return new gh}function Xx(n=null){return e=>e.lift(new iH(n))}class iH{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new oH(e,this.defaultValue))}}class oH extends ${constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function Vl(n,e){const t=arguments.length>=2;return r=>r.pipe(n?er((i,o)=>n(i,o,r)):Ee,Gr(1),t?Xx(e):Zx(()=>new gh))}class lH{constructor(e){this.callback=e}call(e,t){return t.subscribe(new uH(e,this.callback))}}class uH extends ${constructor(e,t){super(e),this.add(new he(t))}}class ns{constructor(e,t){this.id=e,this.url=t}}class l1 extends ns{constructor(e,t,r="imperative",i=null){super(e,t),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class xc extends ns{constructor(e,t,r){super(e,t),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class eM extends ns{constructor(e,t,r){super(e,t),this.reason=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class cH extends ns{constructor(e,t,r){super(e,t),this.error=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class dH extends ns{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class fH extends ns{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class hH extends ns{constructor(e,t,r,i,o){super(e,t),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class pH extends ns{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class gH extends ns{constructor(e,t,r,i){super(e,t),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tM{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class nM{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class mH{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class _H{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class yH{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class bH{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rM{constructor(e,t,r){this.routerEvent=e,this.position=t,this.anchor=r}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Mt="primary";class vH{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Bl(n){return new vH(n)}const iM="ngNavigationCancelingError";function u1(n){const e=Error("NavigationCancelingError: "+n);return e[iM]=!0,e}function DH(n,e,t){const r=t.path.split("/");if(r.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||r.lengthr[o]===i)}return n===e}function sM(n){return Array.prototype.concat.apply([],n)}function aM(n){return n.length>0?n[n.length-1]:null}function Cr(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function Mo(n){return qd(n)?n:ku(n)?Re(Promise.resolve(n)):ot(n)}const xH={exact:function cM(n,e,t){if(!wa(n.segments,e.segments)||!mh(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const r in e.children)if(!n.children[r]||!cM(n.children[r],e.children[r],t))return!1;return!0},subset:dM},lM={exact:function(n,e){return xo(n,e)},subset:function(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>oM(n[t],e[t]))},ignored:()=>!0};function uM(n,e,t){return xH[t.paths](n.root,e.root,t.matrixParams)&&lM[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function dM(n,e,t){return fM(n,e,e.segments,t)}function fM(n,e,t,r){if(n.segments.length>t.length){const i=n.segments.slice(0,t.length);return!(!wa(i,t)||e.hasChildren()||!mh(i,t,r))}if(n.segments.length===t.length){if(!wa(n.segments,t)||!mh(n.segments,t,r))return!1;for(const i in e.children)if(!n.children[i]||!dM(n.children[i],e.children[i],r))return!1;return!0}{const i=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(wa(n.segments,i)&&mh(n.segments,i,r)&&n.children[Mt])&&fM(n.children[Mt],e,o,r)}}function mh(n,e,t){return e.every((r,i)=>lM[t](n[i].parameters,r.parameters))}class va{constructor(e,t,r){this.root=e,this.queryParams=t,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Bl(this.queryParams)),this._queryParamMap}toString(){return SH.serialize(this)}}class At{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Cr(t,(r,i)=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _h(this)}}class Mc{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Bl(this.parameters)),this._parameterMap}toString(){return mM(this)}}function wa(n,e){return n.length===e.length&&n.every((t,r)=>t.path===e[r].path)}class c1{}class hM{parse(e){const t=new BH(e);return new va(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){return`${`/${Nc(e.root,!0)}`}${function(n){const e=Object.keys(n).map(t=>{const r=n[t];return Array.isArray(r)?r.map(i=>`${yh(t)}=${yh(i)}`).join("&"):`${yh(t)}=${yh(r)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams)}${"string"==typeof e.fragment?`#${function(n){return encodeURI(n)}(e.fragment)}`:""}`}}const SH=new hM;function _h(n){return n.segments.map(e=>mM(e)).join("/")}function Nc(n,e){if(!n.hasChildren())return _h(n);if(e){const t=n.children[Mt]?Nc(n.children[Mt],!1):"",r=[];return Cr(n.children,(i,o)=>{o!==Mt&&r.push(`${o}:${Nc(i,!1)}`)}),r.length>0?`${t}(${r.join("//")})`:t}{const t=function(n,e){let t=[];return Cr(n.children,(r,i)=>{i===Mt&&(t=t.concat(e(r,i)))}),Cr(n.children,(r,i)=>{i!==Mt&&(t=t.concat(e(r,i)))}),t}(n,(r,i)=>i===Mt?[Nc(n.children[Mt],!1)]:[`${i}:${Nc(r,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Mt]?`${_h(n)}/${t[0]}`:`${_h(n)}/(${t.join("//")})`}}function pM(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function yh(n){return pM(n).replace(/%3B/gi,";")}function d1(n){return pM(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function bh(n){return decodeURIComponent(n)}function gM(n){return bh(n.replace(/\+/g,"%20"))}function mM(n){return`${d1(n.path)}${function(n){return Object.keys(n).map(e=>`;${d1(e)}=${d1(n[e])}`).join("")}(n.parameters)}`}const PH=/^[^\/()?;=#]+/;function vh(n){const e=n.match(PH);return e?e[0]:""}const FH=/^[^=?&#]+/,LH=/^[^?&#]+/;class BH{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new At([],{}):new At([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(r[Mt]=new At(e,t)),r}parseSegment(){const e=vh(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new Mc(bh(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=vh(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const i=vh(this.remaining);i&&(r=i,this.capture(r))}e[bh(t)]=bh(r)}parseQueryParam(e){const t=function(n){const e=n.match(FH);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let r="";if(this.consumeOptional("=")){const s=function(n){const e=n.match(LH);return e?e[0]:""}(this.remaining);s&&(r=s,this.capture(r))}const i=gM(t),o=gM(r);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=vh(this.remaining),i=this.remaining[r.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let o;r.indexOf(":")>-1?(o=r.substr(0,r.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=Mt);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[Mt]:new At([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class _M{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=f1(e,this._root);return t?t.children.map(r=>r.value):[]}firstChild(e){const t=f1(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=h1(e,this._root);return t.length<2?[]:t[t.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return h1(e,this._root).map(t=>t.value)}}function f1(n,e){if(n===e.value)return e;for(const t of e.children){const r=f1(n,t);if(r)return r}return null}function h1(n,e){if(n===e.value)return[e];for(const t of e.children){const r=h1(n,t);if(r.length)return r.unshift(e),r}return[]}class rs{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Ac(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class yM extends _M{constructor(e,t){super(e),this.snapshot=t,p1(this,e)}toString(){return this.snapshot.toString()}}function bM(n,e){const t=function(n,e){const s=new wh([],{},{},"",{},Mt,e,null,n.root,-1,{});return new wM("",new rs(s,[]))}(n,e),r=new Xn([new Mc("",{})]),i=new Xn({}),o=new Xn({}),s=new Xn({}),a=new Xn(""),l=new Hl(r,i,s,a,o,Mt,e,t.root);return l.snapshot=t.root,new yM(new rs(l,[]),t)}class Hl{constructor(e,t,r,i,o,s,a,l){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(b(e=>Bl(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(b(e=>Bl(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function vM(n,e="emptyOnly"){const t=n.pathFromRoot;let r=0;if("always"!==e)for(r=t.length-1;r>=1;){const i=t[r],o=t[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function(n){return n.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(t.slice(r))}class wh{constructor(e,t,r,i,o,s,a,l,u,c,d){this.url=e,this.params=t,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=u,this._lastPathIndex=c,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Bl(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Bl(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class wM extends _M{constructor(e,t){super(t),this.url=e,p1(this,t)}toString(){return DM(this._root)}}function p1(n,e){e.value._routerState=n,e.children.forEach(t=>p1(n,t))}function DM(n){const e=n.children.length>0?` { ${n.children.map(DM).join(", ")} } `:"";return`${n.value}${e}`}function g1(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,xo(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),xo(e.params,t.params)||n.params.next(t.params),function(n,e){if(n.length!==e.length)return!1;for(let t=0;txo(t.parameters,e[r].parameters))}(n.url,e.url)&&!(!n.parent!=!e.parent)&&(!n.parent||m1(n.parent,e.parent))}function Dh(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const r=t.value;r._futureSnapshot=e.value;const i=function(n,e,t){return e.children.map(r=>{for(const i of t.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return Dh(n,r,i);return Dh(n,r)})}(n,e,t);return new rs(r,i)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return CM(e,s),s}}const r=function(n){return new Hl(new Xn(n.url),new Xn(n.params),new Xn(n.queryParams),new Xn(n.fragment),new Xn(n.data),n.outlet,n.component,n)}(e.value),i=e.children.map(o=>Dh(n,o));return new rs(r,i)}}function CM(n,e){if(n.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(n.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=n.value;for(let t=0;t{o[a]=Array.isArray(s)?s.map(l=>`${l}`):`${s}`}),new va(t.root===n?e:EM(t.root,n,e),o,i)}function EM(n,e,t){const r={};return Cr(n.children,(i,o)=>{r[o]=i===e?t:EM(i,e,t)}),new At(n.segments,r)}class xM{constructor(e,t,r){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=r,e&&r.length>0&&Ch(r[0]))throw new Error("Root segment cannot have matrix parameters");const i=r.find(Tc);if(i&&i!==aM(r))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class y1{constructor(e,t,r){this.segmentGroup=e,this.processChildren=t,this.index=r}}function MM(n,e,t){if(n||(n=new At([],{})),0===n.segments.length&&n.hasChildren())return Eh(n,e,t);const r=function(n,e,t){let r=0,i=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;i=t.length)return o;const s=n.segments[i],a=t[r];if(Tc(a))break;const l=`${a}`,u=r0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!AM(l,u,s))return o;r+=2}else{if(!AM(l,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(n,e,t),i=t.slice(r.commandIndex);if(r.match&&r.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(i[s]=MM(n.children[s],e,o))}),Cr(n.children,(o,s)=>{void 0===r[s]&&(i[s]=o)}),new At(n.segments,i)}}function b1(n,e,t){const r=n.segments.slice(0,e);let i=0;for(;i{"string"==typeof t&&(t=[t]),null!==t&&(e[r]=b1(new At([],{}),0,t))}),e}function NM(n){const e={};return Cr(n,(t,r)=>e[r]=`${t}`),e}function AM(n,e,t){return n==t.path&&xo(e,t.parameters)}class XH{constructor(e,t,r,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=r,this.forwardEvent=i}activate(e){const t=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,r,e),g1(this.futureState.root),this.activateChildRoutes(t,r,e)}deactivateChildRoutes(e,t,r){const i=Ac(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Cr(i,(o,s)=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(i===o)if(i.component){const s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,r);else o&&this.deactivateRouteAndItsChildren(t,r)}deactivateRouteAndItsChildren(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const r=t.getContext(e.value.outlet);if(r&&r.outlet){const i=r.outlet.detach(),o=r.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:i,route:e,contexts:o})}}deactivateRouteAndOutlet(e,t){const r=t.getContext(e.value.outlet),i=r&&e.value.component?r.children:t,o=Ac(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated(),r.attachRef=null,r.resolver=null,r.route=null)}activateChildRoutes(e,t,r){const i=Ac(t);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new bH(o.value.snapshot))}),e.children.length&&this.forwardEvent(new _H(e.value.snapshot))}activateRoutes(e,t,r){const i=e.value,o=t?t.value:null;if(g1(i),i===o)if(i.component){const s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,r);else if(i.component){const s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),TM(a.route)}else{const a=function(n){for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),l=a?a.module.componentFactoryResolver:null;s.attachRef=null,s.route=i,s.resolver=l,s.outlet&&s.outlet.activateWith(i,l),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,r)}}function TM(n){g1(n.value),n.children.forEach(TM)}class v1{constructor(e,t){this.routes=e,this.module=t}}function Os(n){return"function"==typeof n}function Da(n){return n instanceof va}const Sc=Symbol("INITIAL_VALUE");function Ic(){return no(n=>function(...n){let e,t;return v(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&de(n[0])&&(n=n[0]),pt(n,t).lift(new U8(e))}(n.map(e=>e.pipe(Gr(1),function(...n){const e=n[n.length-1];return v(e)?(n.pop(),t=>zf(n,t,e)):t=>zf(n,t)}(Sc)))).pipe(Qx((e,t)=>{let r=!1;return t.reduce((i,o,s)=>i!==Sc?i:(o===Sc&&(r=!0),r||!1!==o&&s!==t.length-1&&!Da(o)?i:o),e)},Sc),er(e=>e!==Sc),b(e=>Da(e)?e:!0===e),Gr(1)))}let SM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Dn({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,r){1&t&&$e(0,"router-outlet")},directives:function(){return[N1]},encapsulation:2}),n})();function IM(n,e=""){for(let t=0;tSi(r)===e);return t.push(...n.filter(r=>Si(r)!==e)),t}const kM={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function xh(n,e,t){var r;if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?Object.assign({},kM):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};const o=(e.matcher||DH)(t,n,e);if(!o)return Object.assign({},kM);const s={};Cr(o.posParams,(l,u)=>{s[u]=l.path});const a=o.consumed.length>0?Object.assign(Object.assign({},s),o.consumed[o.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:a,positionalParamSegments:null!==(r=o.posParams)&&void 0!==r?r:{}}}function Mh(n,e,t,r,i="corrected"){if(t.length>0&&function(n,e,t){return t.some(r=>Nh(n,e,r)&&Si(r)!==Mt)}(n,t,r)){const s=new At(e,function(n,e,t,r){const i={};i[Mt]=r,r._sourceSegment=n,r._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&Si(o)!==Mt){const s=new At([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,i[Si(o)]=s}return i}(n,e,r,new At(t,n.children)));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===t.length&&function(n,e,t){return t.some(r=>Nh(n,e,r))}(n,t,r)){const s=new At(n.segments,function(n,e,t,r,i,o){const s={};for(const a of r)if(Nh(n,t,a)&&!i[Si(a)]){const l=new At([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===o?n.segments.length:e.length,s[Si(a)]=l}return Object.assign(Object.assign({},i),s)}(n,e,t,r,n.children,i));return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}const o=new At(n.segments,n.children);return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}function Nh(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function PM(n,e,t,r){return!!(Si(n)===r||r!==Mt&&Nh(e,t,n))&&("**"===n.path||xh(e,n,t).matched)}function FM(n,e,t){return 0===e.length&&!n.children[t]}class Rc{constructor(e){this.segmentGroup=e||null}}class OM{constructor(e){this.urlTree=e}}function Ah(n){return new Se(e=>e.error(new Rc(n)))}function LM(n){return new Se(e=>e.error(new OM(n)))}function fU(n){return new Se(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${n}'`)))}class gU{constructor(e,t,r,i,o){this.configLoader=t,this.urlSerializer=r,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=e.get(Co)}apply(){const e=Mh(this.urlTree.root,[],[],this.config).segmentGroup,t=new At(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,t,Mt).pipe(b(o=>this.createUrlTree(D1(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(ba(o=>{if(o instanceof OM)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Rc?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,Mt).pipe(b(i=>this.createUrlTree(D1(i),e.queryParams,e.fragment))).pipe(ba(i=>{throw i instanceof Rc?this.noMatchError(i):i}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,r){const i=e.segments.length>0?new At([],{[Mt]:e}):e;return new va(i,t,r)}expandSegmentGroup(e,t,r,i){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(e,t,r).pipe(b(o=>new At([],o))):this.expandSegment(e,r,t,r.segments,i,!0)}expandChildren(e,t,r){const i=[];for(const o of Object.keys(r.children))"primary"===o?i.unshift(o):i.push(o);return Re(i).pipe(Ec(o=>{const s=r.children[o],a=RM(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(b(l=>({segment:l,outlet:o})))}),Qx((o,s)=>(o[s.outlet]=s.segment,o),{}),function(n,e){const t=arguments.length>=2;return r=>r.pipe(n?er((i,o)=>n(i,o,r)):Ee,a1(1),t?Xx(e):Zx(()=>new gh))}())}expandSegment(e,t,r,i,o,s){return Re(r).pipe(Ec(a=>this.expandSegmentAgainstRoute(e,t,r,a,i,o,s).pipe(ba(u=>{if(u instanceof Rc)return ot(null);throw u}))),Vl(a=>!!a),ba((a,l)=>{if(a instanceof gh||"EmptyError"===a.name){if(FM(t,i,o))return ot(new At([],{}));throw new Rc(t)}throw a}))}expandSegmentAgainstRoute(e,t,r,i,o,s,a){return PM(i,t,o,s)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s):Ah(t):Ah(t)}expandSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,r,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,r,i){const o=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?LM(o):this.lineralizeSegments(r,o).pipe(F(s=>{const a=new At(s,{});return this.expandSegment(e,a,t,s,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,r,i,o,s){const{matched:a,consumedSegments:l,lastChild:u,positionalParamSegments:c}=xh(t,i,o);if(!a)return Ah(t);const d=this.applyRedirectCommands(l,i.redirectTo,c);return i.redirectTo.startsWith("/")?LM(d):this.lineralizeSegments(i,d).pipe(F(g=>this.expandSegment(e,t,r,g.concat(o.slice(u)),s,!1)))}matchSegmentAgainstRoute(e,t,r,i,o){if("**"===r.path)return r.loadChildren?(r._loadedConfig?ot(r._loadedConfig):this.configLoader.load(e.injector,r)).pipe(b(g=>(r._loadedConfig=g,new At(i,{})))):ot(new At(i,{}));const{matched:s,consumedSegments:a,lastChild:l}=xh(t,r,i);if(!s)return Ah(t);const u=i.slice(l);return this.getChildConfig(e,r,i).pipe(F(d=>{const g=d.module,y=d.routes,{segmentGroup:D,slicedSegments:T}=Mh(t,a,u,y),R=new At(D.segments,D.children);if(0===T.length&&R.hasChildren())return this.expandChildren(g,y,R).pipe(b(Oe=>new At(a,Oe)));if(0===y.length&&0===T.length)return ot(new At(a,{}));const V=Si(r)===o;return this.expandSegment(g,R,y,T,V?Mt:o,!0).pipe(b(re=>new At(a.concat(re.segments),re.children)))}))}getChildConfig(e,t,r){return t.children?ot(new v1(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?ot(t._loadedConfig):this.runCanLoadGuards(e.injector,t,r).pipe(F(i=>i?this.configLoader.load(e.injector,t).pipe(b(o=>(t._loadedConfig=o,o))):function(n){return new Se(e=>e.error(u1(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`)))}(t))):ot(new v1([],e))}runCanLoadGuards(e,t,r){const i=t.canLoad;return i&&0!==i.length?ot(i.map(s=>{const a=e.get(s);let l;if(function(n){return n&&Os(n.canLoad)}(a))l=a.canLoad(t,r);else{if(!Os(a))throw new Error("Invalid CanLoad guard");l=a(t,r)}return Mo(l)})).pipe(Ic(),br(s=>{if(!Da(s))return;const a=u1(`Redirecting to "${this.urlSerializer.serialize(s)}"`);throw a.url=s,a}),b(s=>!0===s)):ot(!0)}lineralizeSegments(e,t){let r=[],i=t.root;for(;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return ot(r);if(i.numberOfChildren>1||!i.children[Mt])return fU(e.redirectTo);i=i.children[Mt]}}applyRedirectCommands(e,t,r){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,r)}applyRedirectCreatreUrlTree(e,t,r,i){const o=this.createSegmentGroup(e,t.root,r,i);return new va(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const r={};return Cr(e,(i,o)=>{if("string"==typeof i&&i.startsWith(":")){const a=i.substring(1);r[o]=t[a]}else r[o]=i}),r}createSegmentGroup(e,t,r,i){const o=this.createSegments(e,t.segments,r,i);let s={};return Cr(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,r,i)}),new At(o,s)}createSegments(e,t,r,i){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,r))}findPosParam(e,t,r){const i=r[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let r=0;for(const i of t){if(i.path===e.path)return t.splice(r),i;r++}return e}}function D1(n){const e={};for(const r of Object.keys(n.children)){const o=D1(n.children[r]);(o.segments.length>0||o.hasChildren())&&(e[r]=o)}return function(n){if(1===n.numberOfChildren&&n.children[Mt]){const e=n.children[Mt];return new At(n.segments.concat(e.segments),e.children)}return n}(new At(n.segments,e))}class VM{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Th{constructor(e,t){this.component=e,this.route=t}}function yU(n,e,t){const r=n._root;return kc(r,e?e._root:null,t,[r.value])}function Sh(n,e,t){const r=function(n){if(!n)return null;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:t).get(n)}function kc(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=Ac(e);return n.children.forEach(s=>{(function(n,e,t,r,i={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!wa(n.url,e.url);case"pathParamsOrQueryParamsChange":return!wa(n.url,e.url)||!xo(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!m1(n,e)||!xo(n.queryParams,e.queryParams);case"paramsChange":default:return!m1(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?i.canActivateChecks.push(new VM(r)):(o.data=s.data,o._resolvedData=s._resolvedData),kc(n,e,o.component?a?a.children:null:t,r,i),l&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Th(a.outlet.component,s))}else s&&Pc(e,a,i),i.canActivateChecks.push(new VM(r)),kc(n,null,o.component?a?a.children:null:t,r,i)})(s,o[s.value.outlet],t,r.concat([s.value]),i),delete o[s.value.outlet]}),Cr(o,(s,a)=>Pc(s,t.getContext(a),i)),i}function Pc(n,e,t){const r=Ac(n),i=n.value;Cr(r,(o,s)=>{Pc(o,i.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new Th(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}class IU{}function BM(n){return new Se(e=>e.error(n))}class kU{constructor(e,t,r,i,o,s){this.rootComponentType=e,this.config=t,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=s}recognize(){const e=Mh(this.urlTree.root,[],[],this.config.filter(s=>void 0===s.redirectTo),this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,Mt);if(null===t)return null;const r=new wh([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Mt,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new rs(r,t),o=new wM(this.url,i);return this.inheritParamsAndData(o._root),o}inheritParamsAndData(e){const t=e.value,r=vM(t,this.paramsInheritanceStrategy);t.params=Object.freeze(r.params),t.data=Object.freeze(r.data),e.children.forEach(i=>this.inheritParamsAndData(i))}processSegmentGroup(e,t,r){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,r)}processChildren(e,t){const r=[];for(const o of Object.keys(t.children)){const s=t.children[o],a=RM(e,o),l=this.processSegmentGroup(a,s,o);if(null===l)return null;r.push(...l)}const i=HM(r);return function(n){n.sort((e,t)=>e.value.outlet===Mt?-1:t.value.outlet===Mt?1:e.value.outlet.localeCompare(t.value.outlet))}(i),i}processSegment(e,t,r,i){for(const o of e){const s=this.processSegmentAgainstRoute(o,t,r,i);if(null!==s)return s}return FM(t,r,i)?[]:null}processSegmentAgainstRoute(e,t,r,i){if(e.redirectTo||!PM(e,t,r,i))return null;let o,s=[],a=[];if("**"===e.path){const y=r.length>0?aM(r).parameters:{};o=new wh(r,y,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,$M(e),Si(e),e.component,e,UM(t),jM(t)+r.length,GM(e))}else{const y=xh(t,e,r);if(!y.matched)return null;s=y.consumedSegments,a=r.slice(y.lastChild),o=new wh(s,y.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,$M(e),Si(e),e.component,e,UM(t),jM(t)+s.length,GM(e))}const l=function(n){return n.children?n.children:n.loadChildren?n._loadedConfig.routes:[]}(e),{segmentGroup:u,slicedSegments:c}=Mh(t,s,a,l.filter(y=>void 0===y.redirectTo),this.relativeLinkResolution);if(0===c.length&&u.hasChildren()){const y=this.processChildren(l,u);return null===y?null:[new rs(o,y)]}if(0===l.length&&0===c.length)return[new rs(o,[])];const d=Si(e)===i,g=this.processSegment(l,u,c,d?Mt:i);return null===g?null:[new rs(o,g)]}}function OU(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function HM(n){const e=[],t=new Set;for(const r of n){if(!OU(r)){e.push(r);continue}const i=e.find(o=>r.value.routeConfig===o.value.routeConfig);void 0!==i?(i.children.push(...r.children),t.add(i)):e.push(r)}for(const r of t){const i=HM(r.children);e.push(new rs(r.value,i))}return e.filter(r=>!t.has(r))}function UM(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function jM(n){let e=n,t=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift?e._segmentIndexShift:0;return t-1}function $M(n){return n.data||{}}function GM(n){return n.resolve||{}}function C1(n){return no(e=>{const t=n(e);return t?Re(t).pipe(b(()=>e)):ot(e)})}class GU extends class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}const E1=new xt("ROUTES");class zM{constructor(e,t,r,i){this.loader=e,this.compiler=t,this.onLoadStartListener=r,this.onLoadEndListener=i}load(e,t){if(t._loader$)return t._loader$;this.onLoadStartListener&&this.onLoadStartListener(t);const i=this.loadModuleFactory(t.loadChildren).pipe(b(o=>{this.onLoadEndListener&&this.onLoadEndListener(t);const s=o.create(e);return new v1(sM(s.injector.get(E1,void 0,et.Self|et.Optional)).map(w1),s)}),ba(o=>{throw t._loader$=void 0,o}));return t._loader$=new Ut(i,()=>new f).pipe(Ye()),t._loader$}loadModuleFactory(e){return"string"==typeof e?Re(this.loader.load(e)):Mo(e()).pipe(F(t=>t instanceof Zw?ot(t):Re(this.compiler.compileModuleAsync(t))))}}class zU{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ul,this.attachRef=null}}class Ul{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const r=this.getOrCreateContext(e);r.outlet=t,this.contexts.set(e,r)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new zU,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}class qU{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function JU(n){throw n}function KU(n,e,t){return e.parse("/")}function WM(n,e){return ot(null)}const YU={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},QU={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Zr=(()=>{class n{constructor(t,r,i,o,s,a,l,u){this.rootComponentType=t,this.urlSerializer=r,this.rootContexts=i,this.location=o,this.config=u,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new f,this.errorHandler=JU,this.malformedUriErrorHandler=KU,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:WM,afterPreactivation:WM},this.urlHandlingStrategy=new qU,this.routeReuseStrategy=new GU,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=s.get(Co),this.console=s.get(gf);const g=s.get(Nt);this.isNgZoneEnabled=g instanceof Nt&&Nt.isInAngularZone(),this.resetConfig(u),this.currentUrlTree=new va(new At([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new zM(a,l,y=>this.triggerEvent(new tM(y)),y=>this.triggerEvent(new nM(y))),this.routerState=bM(this.currentUrlTree,this.rootComponentType),this.transitions=new Xn({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const r=this.events;return t.pipe(er(i=>0!==i.id),b(i=>Object.assign(Object.assign({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl)})),no(i=>{let o=!1,s=!1;return ot(i).pipe(br(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),no(a=>{const l=this.browserUrlTree.toString(),u=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||u)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return Ih(a.source)&&(this.browserUrlTree=a.extractedUrl),ot(a).pipe(no(d=>{const g=this.transitions.getValue();return r.next(new l1(d.id,this.serializeUrl(d.extractedUrl),d.source,d.restoredState)),g!==this.transitions.getValue()?da:Promise.resolve(d)}),function(n,e,t,r){return no(i=>function(n,e,t,r,i){return new gU(n,e,t,r,i).apply()}(n,e,t,i.extractedUrl,r).pipe(b(o=>Object.assign(Object.assign({},i),{urlAfterRedirects:o}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),br(d=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:d.urlAfterRedirects})}),function(n,e,t,r,i){return F(o=>function(n,e,t,r,i="emptyOnly",o="legacy"){try{const s=new kU(n,e,t,r,i,o).recognize();return null===s?BM(new IU):ot(s)}catch(s){return BM(s)}}(n,e,o.urlAfterRedirects,t(o.urlAfterRedirects),r,i).pipe(b(s=>Object.assign(Object.assign({},o),{targetSnapshot:s}))))}(this.rootComponentType,this.config,d=>this.serializeUrl(d),this.paramsInheritanceStrategy,this.relativeLinkResolution),br(d=>{"eager"===this.urlUpdateStrategy&&(d.extras.skipLocationChange||this.setBrowserUrl(d.urlAfterRedirects,d),this.browserUrlTree=d.urlAfterRedirects);const g=new dH(d.id,this.serializeUrl(d.extractedUrl),this.serializeUrl(d.urlAfterRedirects),d.targetSnapshot);r.next(g)}));if(u&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:g,extractedUrl:y,source:D,restoredState:T,extras:R}=a,V=new l1(g,this.serializeUrl(y),D,T);r.next(V);const L=bM(y,this.rootComponentType).snapshot;return ot(Object.assign(Object.assign({},a),{targetSnapshot:L,urlAfterRedirects:y,extras:Object.assign(Object.assign({},R),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=a.rawUrl,this.browserUrlTree=a.urlAfterRedirects,a.resolve(null),da}),C1(a=>{const{targetSnapshot:l,id:u,extractedUrl:c,rawUrl:d,extras:{skipLocationChange:g,replaceUrl:y}}=a;return this.hooks.beforePreactivation(l,{navigationId:u,appliedUrlTree:c,rawUrlTree:d,skipLocationChange:!!g,replaceUrl:!!y})}),br(a=>{const l=new fH(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),b(a=>Object.assign(Object.assign({},a),{guards:yU(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function(n,e){return F(t=>{const{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?ot(Object.assign(Object.assign({},t),{guardsResult:!0})):function(n,e,t,r){return Re(n).pipe(F(i=>function(n,e,t,r,i){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?ot(o.map(a=>{const l=Sh(a,e,i);let u;if(function(n){return n&&Os(n.canDeactivate)}(l))u=Mo(l.canDeactivate(n,e,t,r));else{if(!Os(l))throw new Error("Invalid CanDeactivate guard");u=Mo(l(n,e,t,r))}return u.pipe(Vl())})).pipe(Ic()):ot(!0)}(i.component,i.route,t,e,r)),Vl(i=>!0!==i,!0))}(s,r,i,n).pipe(F(a=>a&&function(n){return"boolean"==typeof n}(a)?function(n,e,t,r){return Re(e).pipe(Ec(i=>zf(function(n,e){return null!==n&&e&&e(new mH(n)),ot(!0)}(i.route.parent,r),function(n,e){return null!==n&&e&&e(new yH(n)),ot(!0)}(i.route,r),function(n,e,t){const r=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>Yx(()=>ot(s.guards.map(l=>{const u=Sh(l,s.node,t);let c;if(function(n){return n&&Os(n.canActivateChild)}(u))c=Mo(u.canActivateChild(r,n));else{if(!Os(u))throw new Error("Invalid CanActivateChild guard");c=Mo(u(r,n))}return c.pipe(Vl())})).pipe(Ic())));return ot(o).pipe(Ic())}(n,i.path,t),function(n,e,t){const r=e.routeConfig?e.routeConfig.canActivate:null;return r&&0!==r.length?ot(r.map(o=>Yx(()=>{const s=Sh(o,e,t);let a;if(function(n){return n&&Os(n.canActivate)}(s))a=Mo(s.canActivate(e,n));else{if(!Os(s))throw new Error("Invalid CanActivate guard");a=Mo(s(e,n))}return a.pipe(Vl())}))).pipe(Ic()):ot(!0)}(n,i.route,t))),Vl(i=>!0!==i,!0))}(r,o,n,e):ot(a)),b(a=>Object.assign(Object.assign({},t),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),br(a=>{if(Da(a.guardsResult)){const u=u1(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw u.url=a.guardsResult,u}const l=new hH(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),er(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),C1(a=>{if(a.guards.canActivateChecks.length)return ot(a).pipe(br(l=>{const u=new pH(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(u)}),no(l=>{let u=!1;return ot(l).pipe(function(n,e){return F(t=>{const{targetSnapshot:r,guards:{canActivateChecks:i}}=t;if(!i.length)return ot(t);let o=0;return Re(i).pipe(Ec(s=>function(n,e,t,r){return function(n,e,t,r){const i=Object.keys(n);if(0===i.length)return ot({});const o={};return Re(i).pipe(F(s=>function(n,e,t,r){const i=Sh(n,e,r);return Mo(i.resolve?i.resolve(e,t):i(e,t))}(n[s],e,t,r).pipe(br(a=>{o[s]=a}))),a1(1),F(()=>Object.keys(o).length===i.length?ot(o):da))}(n._resolve,n,e,r).pipe(b(o=>(n._resolvedData=o,n.data=Object.assign(Object.assign({},n.data),vM(n,t).resolve),null)))}(s.route,r,n,e)),br(()=>o++),a1(1),F(s=>o===i.length?ot(t):da))})}(this.paramsInheritanceStrategy,this.ngModule.injector),br({next:()=>u=!0,complete:()=>{u||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),br(l=>{const u=new gH(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(u)}))}),C1(a=>{const{targetSnapshot:l,id:u,extractedUrl:c,rawUrl:d,extras:{skipLocationChange:g,replaceUrl:y}}=a;return this.hooks.afterPreactivation(l,{navigationId:u,appliedUrlTree:c,rawUrlTree:d,skipLocationChange:!!g,replaceUrl:!!y})}),b(a=>{const l=function(n,e,t){const r=Dh(n,e._root,t?t._root:void 0);return new yM(r,e)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),br(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,e,t)=>b(r=>(new XH(e,r.targetRouterState,r.currentRouterState,t).activate(n),r)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),br({next(){o=!0},complete(){o=!0}}),function(n){return e=>e.lift(new lH(n))}(()=>{var a;if(!o&&!s){const l=`Navigation ID ${i.id} is not equal to the current navigation id ${this.navigationId}`;"replace"===this.canceledNavigationResolution?(this.restoreHistory(i),this.cancelNavigationTransition(i,l)):this.cancelNavigationTransition(i,l)}(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===i.id&&(this.currentNavigation=null)}),ba(a=>{if(s=!0,function(n){return n&&n[iM]}(a)){const l=Da(a.url);l||(this.navigated=!0,this.restoreHistory(i,!0));const u=new eM(i.id,this.serializeUrl(i.extractedUrl),a.message);r.next(u),l?setTimeout(()=>{const c=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),d={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||Ih(i.source)};this.scheduleNavigation(c,"imperative",null,d,{resolve:i.resolve,reject:i.reject,promise:i.promise})},0):i.resolve(!1)}else{this.restoreHistory(i,!0);const l=new cH(i.id,this.serializeUrl(i.extractedUrl),a);r.next(l);try{i.resolve(this.errorHandler(a))}catch(u){i.reject(u)}}return da}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const r=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,r)&&setTimeout(()=>{const{source:i,state:o,urlTree:s}=r,a={replaceUrl:!0};if(o){const l=Object.assign({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(a.state=l)}this.scheduleNavigation(s,i,o,a)},0),this.lastLocationChangeInfo=r}))}extractLocationChangeInfoFromEvent(t){var r;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(r=t.state)||void 0===r?void 0:r.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,r){if(!t)return!0;const i=r.urlTree.toString()===t.urlTree.toString();return r.transitionId!==t.transitionId||!i||!("hashchange"===r.source&&"popstate"===t.source||"popstate"===r.source&&"hashchange"===t.source)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){IM(t),this.config=t.map(w1),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,r={}){const{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=r,u=i||this.routerState.root,c=l?this.currentUrlTree.fragment:s;let d=null;switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}return null!==d&&(d=this.removeEmptyProps(d)),function(n,e,t,r,i){if(0===t.length)return _1(e.root,e.root,e,r,i);const o=function(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new xM(!0,0,n);let e=0,t=!1;const r=n.reduce((i,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Cr(o.outlets,(l,u)=>{a[u]="string"==typeof l?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return"string"!=typeof o?[...i,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&i.push(a))}),i):[...i,o]},[]);return new xM(t,e,r)}(t);if(o.toRoot())return _1(e.root,new At([],{}),e,r,i);const s=function(n,e,t){if(n.isAbsolute)return new y1(e.root,!0,0);if(-1===t.snapshot._lastPathIndex){const o=t.snapshot._urlSegment;return new y1(o,o===e.root,0)}const r=Ch(n.commands[0])?0:1;return function(n,e,t){let r=n,i=e,o=t;for(;o>i;){if(o-=i,r=r.parent,!r)throw new Error("Invalid number of '../'");i=r.segments.length}return new y1(r,!1,i-o)}(t.snapshot._urlSegment,t.snapshot._lastPathIndex+r,n.numberOfDoubleDots)}(o,e,n),a=s.processChildren?Eh(s.segmentGroup,s.index,o.commands):MM(s.segmentGroup,s.index,o.commands);return _1(s.segmentGroup,a,e,r,i)}(u,this.currentUrlTree,t,d,null!=c?c:null)}navigateByUrl(t,r={skipLocationChange:!1}){const i=Da(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)}navigate(t,r={skipLocationChange:!1}){return function(n){for(let e=0;e{const o=t[i];return null!=o&&(r[i]=o),r},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new xc(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,r,i,o,s){var a,l;if(this.disposed)return Promise.resolve(!1);const u=this.getTransition(),c=Ih(r)&&u&&!Ih(u.source),y=(this.lastSuccessfulId===u.id||this.currentNavigation?u.rawUrl:u.urlAfterRedirects).toString()===t.toString();if(c&&y)return Promise.resolve(!0);let D,T,R;s?(D=s.resolve,T=s.reject,R=s.promise):R=new Promise((re,Oe)=>{D=re,T=Oe});const V=++this.navigationId;let L;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(i=this.location.getState()),L=i&&i.\u0275routerPageId?i.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?null!==(a=this.browserPageId)&&void 0!==a?a:0:(null!==(l=this.browserPageId)&&void 0!==l?l:0)+1):L=0,this.setTransition({id:V,targetPageId:L,source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:o,resolve:D,reject:T,promise:R,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),R.catch(re=>Promise.reject(re))}setBrowserUrl(t,r){const i=this.urlSerializer.serialize(t),o=Object.assign(Object.assign({},r.extras.state),this.generateNgRouterState(r.id,r.targetPageId));this.location.isCurrentPathEqualTo(i)||r.extras.replaceUrl?this.location.replaceState(i,"",o):this.location.go(i,"",o)}restoreHistory(t,r=!1){var i,o;if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(i=this.currentNavigation)||void 0===i?void 0:i.finalUrl)||0===s?this.currentUrlTree===(null===(o=this.currentNavigation)||void 0===o?void 0:o.finalUrl)&&0===s&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(s)}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,r){const i=new eM(t.id,this.serializeUrl(t.extractedUrl),r);this.triggerEvent(i),t.resolve(!1)}generateNgRouterState(t,r){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:r}:{navigationId:t}}}return n.\u0275fac=function(t){return new(t||n)(J(Ed),J(c1),J(Ul),J(Af),J(It),J(_f),J(aa),J(void 0))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function Ih(n){return"imperative"!==n}let N1=(()=>{class n{constructor(t,r,i,o,s){this.parentContexts=t,this.location=r,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new qe,this.deactivateEvents=new qe,this.name=o||Mt,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,r){this.activated=t,this._activatedRoute=r,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,r){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const s=(r=r||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new tj(t,a,this.location.injector);this.activated=this.location.createComponent(s,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)(P(Ul),P(Hr),P(ui),function(n){return function(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const r=t.length;let i=0;for(;i{class n{constructor(t,r,i,o,s){this.router=t,this.injector=o,this.preloadingStrategy=s,this.loader=new zM(r,i,u=>t.triggerEvent(new tM(u)),u=>t.triggerEvent(new nM(u)))}setUpPreloading(){this.subscription=this.router.events.pipe(er(t=>t instanceof xc),Ec(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Co);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,r){const i=[];for(const o of r)if(o.loadChildren&&!o.canLoad&&o._loadedConfig){const s=o._loadedConfig;i.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?i.push(this.preloadConfig(t,o)):o.children&&i.push(this.processRoutes(t,o.children));return Re(i).pipe(Be(),b(o=>{}))}preloadConfig(t,r){return this.preloadingStrategy.preload(r,()=>(r._loadedConfig?ot(r._loadedConfig):this.loader.load(t.injector,r)).pipe(F(o=>(r._loadedConfig=o,this.processRoutes(o.module,o.routes)))))}}return n.\u0275fac=function(t){return new(t||n)(J(Zr),J(_f),J(aa),J(It),J(qM))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})(),A1=(()=>{class n{constructor(t,r,i={}){this.router=t,this.viewportScroller=r,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof l1?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof xc&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof rM&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,r){this.router.triggerEvent(new rM(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(J(Zr),J(dE),J(void 0))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();const Ca=new xt("ROUTER_CONFIGURATION"),YM=new xt("ROUTER_FORROOT_GUARD"),rj=[Af,{provide:c1,useClass:hM},{provide:Zr,useFactory:function(n,e,t,r,i,o,s,a={},l,u){const c=new Zr(null,n,e,t,r,i,o,sM(s));return l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),function(n,e){n.errorHandler&&(e.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(e.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(e.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(e.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(e.urlUpdateStrategy=n.urlUpdateStrategy)}(a,c),a.enableTracing&&c.events.subscribe(d=>{var g,y;null===(g=console.group)||void 0===g||g.call(console,`Router Event: ${d.constructor.name}`),console.log(d.toString()),console.log(d),null===(y=console.groupEnd)||void 0===y||y.call(console)}),c},deps:[c1,Ul,Af,It,_f,aa,E1,Ca,[class{},new Kr],[class{},new Kr]]},Ul,{provide:Hl,useFactory:function(n){return n.routerState.root},deps:[Zr]},{provide:_f,useClass:XO},KM,JM,class{preload(e,t){return t().pipe(ba(()=>ot(null)))}},{provide:Ca,useValue:{enableTracing:!1}}];function ij(){return new T0("Router",Zr)}let QM=(()=>{class n{constructor(t,r){}static forRoot(t,r){return{ngModule:n,providers:[rj,ZM(t),{provide:YM,useFactory:aj,deps:[[Zr,new Kr,new Ds]]},{provide:Ca,useValue:r||{}},{provide:Sl,useFactory:sj,deps:[ca,[new za(W0),new Kr],Ca]},{provide:A1,useFactory:oj,deps:[Zr,dE,Ca]},{provide:qM,useExisting:r&&r.preloadingStrategy?r.preloadingStrategy:JM},{provide:T0,multi:!0,useFactory:ij},[T1,{provide:nc,multi:!0,useFactory:dj,deps:[T1]},{provide:XM,useFactory:fj,deps:[T1]},{provide:nC,multi:!0,useExisting:XM}]]}}static forChild(t){return{ngModule:n,providers:[ZM(t)]}}}return n.\u0275fac=function(t){return new(t||n)(J(YM,8),J(Zr,8))},n.\u0275mod=tn({type:n}),n.\u0275inj=St({}),n})();function oj(n,e,t){return t.scrollOffset&&e.setOffset(t.scrollOffset),new A1(n,e,t)}function sj(n,e,t={}){return t.useHash?new b4(n,e):new WC(n,e)}function aj(n){return"guarded"}function ZM(n){return[{provide:IT,multi:!0,useValue:n},{provide:E1,multi:!0,useValue:n}]}let T1=(()=>{class n{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new f}appInitializer(){return this.injector.get(m4,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let r=null;const i=new Promise(a=>r=a),o=this.injector.get(Zr),s=this.injector.get(Ca);return"disabled"===s.initialNavigation?(o.setUpLocationChangeListener(),r(!0)):"enabled"===s.initialNavigation||"enabledBlocking"===s.initialNavigation?(o.hooks.afterPreactivation=()=>this.initNavigation?ot(null):(this.initNavigation=!0,r(!0),this.resultOfPreactivationDone),o.initialNavigation()):r(!0),i})}bootstrapListener(t){const r=this.injector.get(Ca),i=this.injector.get(KM),o=this.injector.get(A1),s=this.injector.get(Zr),a=this.injector.get(Yi);t===a.components[0]&&(("enabledNonBlocking"===r.initialNavigation||void 0===r.initialNavigation)&&s.initialNavigation(),i.setUpPreloading(),o.init(),s.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(t){return new(t||n)(J(It))},n.\u0275prov=_e({token:n,factory:n.\u0275fac}),n})();function dj(n){return n.appInitializer.bind(n)}function fj(n){return n.bootstrapListener.bind(n)}const XM=new xt("Router Initializer");function eN(n,e,t,r,i,o,s){try{var a=n[o](s),l=a.value}catch(u){return void t(u)}a.done?e(l):Promise.resolve(l).then(r,i)}function Ls(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function s(l){eN(o,r,i,s,a,"next",l)}function a(l){eN(o,r,i,s,a,"throw",l)}s(void 0)})}}let nN=!1,rN=!1;const Rh={debug:1,default:2,info:2,warning:3,error:4,off:5};let iN=Rh.default,S1=null;const oN=function(){try{const n=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch(t){n.push(e)}}),n.length)throw new Error("missing "+n.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(n){return n.message}return null}();var kh=(()=>(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"}(kh||(kh={})),kh))(),Ph=(()=>(function(n){n.UNKNOWN_ERROR="UNKNOWN_ERROR",n.NOT_IMPLEMENTED="NOT_IMPLEMENTED",n.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",n.NETWORK_ERROR="NETWORK_ERROR",n.SERVER_ERROR="SERVER_ERROR",n.TIMEOUT="TIMEOUT",n.BUFFER_OVERRUN="BUFFER_OVERRUN",n.NUMERIC_FAULT="NUMERIC_FAULT",n.MISSING_NEW="MISSING_NEW",n.INVALID_ARGUMENT="INVALID_ARGUMENT",n.MISSING_ARGUMENT="MISSING_ARGUMENT",n.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",n.CALL_EXCEPTION="CALL_EXCEPTION",n.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",n.NONCE_EXPIRED="NONCE_EXPIRED",n.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",n.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",n.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(Ph||(Ph={})),Ph))();const sN="0123456789abcdef";let W=(()=>{class n{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,r){const i=t.toLowerCase();null==Rh[i]&&this.throwArgumentError("invalid log level name","logLevel",t),!(iN>Rh[i])&&console.log.apply(console,r)}debug(...t){this._log(n.levels.DEBUG,t)}info(...t){this._log(n.levels.INFO,t)}warn(...t){this._log(n.levels.WARNING,t)}makeError(t,r,i){if(rN)return this.makeError("censored error",r,{});r||(r=n.errors.UNKNOWN_ERROR),i||(i={});const o=[];Object.keys(i).forEach(l=>{const u=i[l];try{if(u instanceof Uint8Array){let c="";for(let d=0;d>4],c+=sN[15&u[d]];o.push(l+"=Uint8Array(0x"+c+")")}else o.push(l+"="+JSON.stringify(u))}catch(c){o.push(l+"="+JSON.stringify(i[l].toString()))}}),o.push(`code=${r}`),o.push(`version=${this.version}`);const s=t;o.length&&(t+=" ("+o.join(", ")+")");const a=new Error(t);return a.reason=s,a.code=r,Object.keys(i).forEach(function(l){a[l]=i[l]}),a}throwError(t,r,i){throw this.makeError(t,r,i)}throwArgumentError(t,r,i){return this.throwError(t,n.errors.INVALID_ARGUMENT,{argument:r,value:i})}assert(t,r,i,o){t||this.throwError(r,i,o)}assertArgument(t,r,i,o){t||this.throwArgumentError(r,i,o)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),oN&&this.throwError("platform missing String.prototype.normalize",n.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:oN})}checkSafeUint53(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,n.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,n.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,r,i){i=i?": "+i:"",tr&&this.throwError("too many arguments"+i,n.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}checkNew(t,r){(t===Object||null==t)&&this.throwError("missing new",n.errors.MISSING_NEW,{name:r.name})}checkAbstract(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",n.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||null==t)&&this.throwError("missing new",n.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return S1||(S1=new n("logger/5.5.0")),S1}static setCensorship(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",n.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),nN){if(!t)return;this.globalLogger().throwError("error censorship permanent",n.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}rN=!!t,nN=!!r}static setLogLevel(t){const r=Rh[t.toLowerCase()];null!=r?iN=r:n.globalLogger().warn("invalid log level - "+t)}static from(t){return new n(t)}}return n.errors=Ph,n.levels=kh,n})();const Vn=new W("bytes/5.5.0");function aN(n){return!!n.toHexString}function $l(n){return n.slice||(n.slice=function(){const e=Array.prototype.slice.call(arguments);return $l(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function I1(n){return jt(n)&&!(n.length%2)||Fh(n)}function lN(n){return"number"==typeof n&&n==n&&n%1==0}function Fh(n){if(null==n)return!1;if(n.constructor===Uint8Array)return!0;if("string"==typeof n||!lN(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function st(n,e){if(e||(e={}),"number"==typeof n){Vn.checkSafeUint53(n,"invalid arrayify value");const t=[];for(;n;)t.unshift(255&n),n=parseInt(String(n/256));return 0===t.length&&t.push(0),$l(new Uint8Array(t))}if(e.allowMissingPrefix&&"string"==typeof n&&"0x"!==n.substring(0,2)&&(n="0x"+n),aN(n)&&(n=n.toHexString()),jt(n)){let t=n.substring(2);t.length%2&&("left"===e.hexPad?t="0x0"+t.substring(2):"right"===e.hexPad?t+="0":Vn.throwArgumentError("hex data is odd-length","value",n));const r=[];for(let i=0;ist(i)),t=e.reduce((i,o)=>i+o.length,0),r=new Uint8Array(t);return e.reduce((i,o)=>(r.set(o,i),i+o.length),0),$l(r)}function Gl(n){let e=st(n);if(0===e.length)return e;let t=0;for(;t>4]+R1[15&i]}return t}return Vn.throwArgumentError("invalid hexlify value","value",n)}function Fc(n){if("string"!=typeof n)n=Qe(n);else if(!jt(n)||n.length%2)return null;return(n.length-2)/2}function is(n,e,t){return"string"!=typeof n?n=Qe(n):(!jt(n)||n.length%2)&&Vn.throwArgumentError("invalid hexData","value",n),e=2+2*e,null!=t?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function oo(n){let e="0x";return n.forEach(t=>{e+=Qe(t).substring(2)}),e}function k1(n){const e=function(n){"string"!=typeof n&&(n=Qe(n)),jt(n)||Vn.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&Vn.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Oc(n){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(I1(n)){const t=st(n);65!==t.length&&Vn.throwArgumentError("invalid signature string; must be 65 bytes","signature",n),e.r=Qe(t.slice(0,32)),e.s=Qe(t.slice(32,64)),e.v=t[64],e.v<27&&(0===e.v||1===e.v?e.v+=27:Vn.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=Qe(t.slice(32,64))}else{if(e.r=n.r,e.s=n.s,e.v=n.v,e.recoveryParam=n.recoveryParam,e._vs=n._vs,null!=e._vs){const i=function(n,e){(n=st(n)).length>e&&Vn.throwArgumentError("value out of range","value",arguments[0]);const t=new Uint8Array(e);return t.set(n,e-n.length),$l(t)}(st(e._vs),32);e._vs=Qe(i);const o=i[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=o:e.recoveryParam!==o&&Vn.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;const s=Qe(i);null==e.s?e.s=s:e.s!==s&&Vn.throwArgumentError("signature v mismatch _vs","signature",n)}null==e.recoveryParam?null==e.v?Vn.throwArgumentError("signature missing v and recoveryParam","signature",n):e.recoveryParam=0===e.v||1===e.v?e.v:1-e.v%2:null==e.v?e.v=27+e.recoveryParam:e.recoveryParam!==(0===e.v||1===e.v?e.v:1-e.v%2)&&Vn.throwArgumentError("signature recoveryParam mismatch v","signature",n),null!=e.r&&jt(e.r)?e.r=Hn(e.r,32):Vn.throwArgumentError("signature missing or invalid r","signature",n),null!=e.s&&jt(e.s)?e.s=Hn(e.s,32):Vn.throwArgumentError("signature missing or invalid s","signature",n);const t=st(e.s);t[0]>=128&&Vn.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);const r=Qe(t);e._vs&&(jt(e._vs)||Vn.throwArgumentError("signature invalid _vs","signature",n),e._vs=Hn(e._vs,32)),null==e._vs?e._vs=r:e._vs!==r&&Vn.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e}var bj=ee(630),mt=ee.n(bj),Lc=mt().BN;const No=new W("bignumber/5.5.0"),P1={},uN=9007199254740991;let cN=!1;class Ne{constructor(e,t){No.checkNew(new.target,Ne),e!==P1&&No.throwError("cannot call constructor directly; use BigNumber.from",W.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Xr(Tt(this).fromTwos(e))}toTwos(e){return Xr(Tt(this).toTwos(e))}abs(){return"-"===this._hex[0]?Ne.from(this._hex.substring(1)):this}add(e){return Xr(Tt(this).add(Tt(e)))}sub(e){return Xr(Tt(this).sub(Tt(e)))}div(e){return Ne.from(e).isZero()&&Ii("division by zero","div"),Xr(Tt(this).div(Tt(e)))}mul(e){return Xr(Tt(this).mul(Tt(e)))}mod(e){const t=Tt(e);return t.isNeg()&&Ii("cannot modulo negative values","mod"),Xr(Tt(this).umod(t))}pow(e){const t=Tt(e);return t.isNeg()&&Ii("cannot raise to negative values","pow"),Xr(Tt(this).pow(t))}and(e){const t=Tt(e);return(this.isNegative()||t.isNeg())&&Ii("cannot 'and' negative values","and"),Xr(Tt(this).and(t))}or(e){const t=Tt(e);return(this.isNegative()||t.isNeg())&&Ii("cannot 'or' negative values","or"),Xr(Tt(this).or(t))}xor(e){const t=Tt(e);return(this.isNegative()||t.isNeg())&&Ii("cannot 'xor' negative values","xor"),Xr(Tt(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&Ii("cannot mask negative values","mask"),Xr(Tt(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Ii("cannot shift negative values","shl"),Xr(Tt(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Ii("cannot shift negative values","shr"),Xr(Tt(this).shrn(e))}eq(e){return Tt(this).eq(Tt(e))}lt(e){return Tt(this).lt(Tt(e))}lte(e){return Tt(this).lte(Tt(e))}gt(e){return Tt(this).gt(Tt(e))}gte(e){return Tt(this).gte(Tt(e))}isNegative(){return"-"===this._hex[0]}isZero(){return Tt(this).isZero()}toNumber(){try{return Tt(this).toNumber()}catch(e){Ii("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return No.throwError("this platform does not support BigInt",W.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?cN||(cN=!0,No.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):No.throwError(16===arguments[0]?"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()":"BigNumber.toString does not accept parameters",W.errors.UNEXPECTED_ARGUMENT,{})),Tt(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Ne)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new Ne(P1,Vc(e)):e.match(/^-?[0-9]+$/)?new Ne(P1,Vc(new Lc(e))):No.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Ii("underflow","BigNumber.from",e),(e>=uN||e<=-uN)&&Ii("overflow","BigNumber.from",e),Ne.from(String(e));const t=e;if("bigint"==typeof t)return Ne.from(t.toString());if(Fh(t))return Ne.from(Qe(t));if(t)if(t.toHexString){const r=t.toHexString();if("string"==typeof r)return Ne.from(r)}else{let r=t._hex;if(null==r&&"BigNumber"===t.type&&(r=t.hex),"string"==typeof r&&(jt(r)||"-"===r[0]&&jt(r.substring(1))))return Ne.from(r)}return No.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function Vc(n){if("string"!=typeof n)return Vc(n.toString(16));if("-"===n[0])return"-"===(n=n.substring(1))[0]&&No.throwArgumentError("invalid hex","value",n),"0x00"===(n=Vc(n))?n:"-"+n;if("0x"!==n.substring(0,2)&&(n="0x"+n),"0x"===n)return"0x00";for(n.length%2&&(n="0x0"+n.substring(2));n.length>4&&"0x00"===n.substring(0,4);)n="0x"+n.substring(4);return n}function Xr(n){return Ne.from(Vc(n))}function Tt(n){const e=Ne.from(n).toHexString();return new Lc("-"===e[0]?"-"+e.substring(3):e.substring(2),16)}function Ii(n,e,t){const r={fault:n,operation:e};return null!=t&&(r.value=t),No.throwError(n,W.errors.NUMERIC_FAULT,r)}const Oh=new W("properties/5.5.0");function ue(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function Ao(n,e){for(let t=0;t<32;t++){if(n[e])return n[e];if(!n.prototype||"object"!=typeof n.prototype)break;n=Object.getPrototypeOf(n.prototype).constructor}return null}function zn(n){return function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const e=Object.keys(n).map(r=>Promise.resolve(n[r]).then(o=>({key:r,value:o})));return(yield Promise.all(e)).reduce((r,i)=>(r[i.key]=i.value,r),{})})}function cr(n){const e={};for(const t in n)e[t]=n[t];return e}const xj={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function dN(n){if(null==n||xj[typeof n])return!0;if(Array.isArray(n)||"object"==typeof n){if(!Object.isFrozen(n))return!1;const e=Object.keys(n);for(let t=0;tos(e)));if("object"==typeof n){const e={};for(const t in n){const r=n[t];void 0!==r&&ue(e,t,os(r))}return e}return Oh.throwArgumentError("Cannot deepCopy "+typeof n,"object",n)}function os(n){return Mj(n)}class Bc{constructor(e){for(const t in e)this[t]=os(e[t])}}const Hc="abi/5.5.0",F1=new W(Hc);class ss{constructor(e,t,r,i){this.name=e,this.type=t,this.localName=r,this.dynamic=i}_throwError(e,t){F1.throwArgumentError(e,this.localName,t)}}class O1{constructor(e){ue(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return oo(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(fi(e._data))}writeBytes(e){let t=st(e);const r=t.length%this.wordSize;return r&&(t=fi([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=st(Ne.from(e));return t.length>this.wordSize&&F1.throwError("value out-of-bounds",W.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=fi([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class Lh{constructor(e,t,r,i){ue(this,"_data",st(e)),ue(this,"wordSize",t||32),ue(this,"_coerceFunc",r),ue(this,"allowLoose",i),this._offset=0}get data(){return Qe(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):Lh.coerce(e,t)}_peekBytes(e,t,r){let i=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?i=t:F1.throwError("data out-of-bounds",W.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Lh(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return Ne.from(this.readBytes(this.wordSize))}}var Aj=ee(109),Tj=ee.n(Aj);function rr(n){return"0x"+Tj().keccak_256(st(n))}const To=new W("rlp/5.5.0");function fN(n){const e=[];for(;n;)e.unshift(255&n),n>>=8;return e}function hN(n,e,t){let r=0;for(let i=0;ie+1+r&&To.throwError("child data too short",W.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:i}}function mN(n,e){if(0===n.length&&To.throwError("data too short",W.errors.BUFFER_OVERRUN,{}),n[e]>=248){const t=n[e]-247;e+1+t>n.length&&To.throwError("data short segment too short",W.errors.BUFFER_OVERRUN,{});const r=hN(n,e+1,t);return e+1+t+r>n.length&&To.throwError("data long segment too short",W.errors.BUFFER_OVERRUN,{}),gN(n,e,e+1+t,t+r)}if(n[e]>=192){const t=n[e]-192;return e+1+t>n.length&&To.throwError("data array too short",W.errors.BUFFER_OVERRUN,{}),gN(n,e,e+1,t)}if(n[e]>=184){const t=n[e]-183;e+1+t>n.length&&To.throwError("data array too short",W.errors.BUFFER_OVERRUN,{});const r=hN(n,e+1,t);return e+1+t+r>n.length&&To.throwError("data array too short",W.errors.BUFFER_OVERRUN,{}),{consumed:1+t+r,result:Qe(n.slice(e+1+t,e+1+t+r))}}if(n[e]>=128){const t=n[e]-128;return e+1+t>n.length&&To.throwError("data too short",W.errors.BUFFER_OVERRUN,{}),{consumed:1+t,result:Qe(n.slice(e+1,e+1+t))}}return{consumed:1,result:Qe(n[e])}}function L1(n){const e=st(n),t=mN(e,0);return t.consumed!==e.length&&To.throwArgumentError("invalid rlp data","data",n),t.result}const Vs=new W("address/5.5.0");function _N(n){jt(n,20)||Vs.throwArgumentError("invalid address","address",n);const e=(n=n.toLowerCase()).substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const r=st(rr(t));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&r[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const V1={};for(let n=0;n<10;n++)V1[String(n)]=String(n);for(let n=0;n<26;n++)V1[String.fromCharCode(65+n)]=String(10+n);const yN=Math.floor(function(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}(9007199254740991));function Un(n){let e=null;if("string"!=typeof n&&Vs.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==n.substring(0,2)&&(n="0x"+n),e=_N(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Vs.throwArgumentError("bad address checksum","address",n);else if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(n.substring(2,4)!==function(n){let e=(n=(n=n.toUpperCase()).substring(4)+n.substring(0,2)+"00").split("").map(r=>V1[r]).join("");for(;e.length>=yN;){let r=e.substring(0,yN);e=parseInt(r,10)%97+e.substring(r.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}(n)&&Vs.throwArgumentError("bad icap checksum","address",n),e=function(n){return new Lc(n,36).toString(16)}(n.substring(4));e.length<40;)e="0"+e;e=_N("0x"+e)}else Vs.throwArgumentError("invalid address","address",n);return e}function vN(n){let e=null;try{e=Un(n.from)}catch(r){Vs.throwArgumentError("missing from address","transaction",n)}return Un(is(rr(Vh([e,Gl(st(Ne.from(n.nonce).toHexString()))])),12))}const wN=new W("strings/5.5.0");var Ea=(()=>(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"}(Ea||(Ea={})),Ea))(),ei=(()=>(function(n){n.UNEXPECTED_CONTINUE="unexpected continuation byte",n.BAD_PREFIX="bad codepoint prefix",n.OVERRUN="string overrun",n.MISSING_CONTINUE="missing continuation byte",n.OUT_OF_RANGE="out of UTF-8 range",n.UTF16_SURROGATE="UTF-16 surrogate",n.OVERLONG="overlong representation"}(ei||(ei={})),ei))();function DN(n,e,t,r,i){if(n===ei.BAD_PREFIX||n===ei.UNEXPECTED_CONTINUE){let o=0;for(let s=e+1;s>6==2;s++)o++;return o}return n===ei.OVERRUN?t.length-e-1:0}const Lj=Object.freeze({error:function(n,e,t,r,i){return wN.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)},ignore:DN,replace:function(n,e,t,r,i){return n===ei.OVERLONG?(r.push(i),0):(r.push(65533),DN(n,e,t))}});function B1(n,e){null==e&&(e=Lj.error),n=st(n);const t=[];let r=0;for(;r>7==0){t.push(i);continue}let o=null,s=null;if(192==(224&i))o=1,s=127;else if(224==(240&i))o=2,s=2047;else{if(240!=(248&i)){r+=e(128==(192&i)?ei.UNEXPECTED_CONTINUE:ei.BAD_PREFIX,r-1,n,t);continue}o=3,s=65535}if(r-1+o>=n.length){r+=e(ei.OVERRUN,r-1,n,t);continue}let a=i&(1<<8-o-1)-1;for(let l=0;l1114111){r+=e(ei.OUT_OF_RANGE,r-1-o,n,t,a);continue}if(a>=55296&&a<=57343){r+=e(ei.UTF16_SURROGATE,r-1-o,n,t,a);continue}if(a<=s){r+=e(ei.OVERLONG,r-1-o,n,t,a);continue}t.push(a)}}return t}function as(n,e=Ea.current){e!=Ea.current&&(wN.checkNormalize(),n=n.normalize(e));let t=[];for(let r=0;r>6|192),t.push(63&i|128);else if(55296==(64512&i)){r++;const o=n.charCodeAt(r);if(r>=n.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const s=65536+((1023&i)<<10)+(1023&o);t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(63&s|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)}return st(t)}function U1(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}function zl(n,e){return U1(B1(n,e))}function CN(n,e=Ea.current){return B1(as(n,e))}function Wl(n){return rr(as(n))}class Vj extends ss{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Un(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}decode(e){return Un(Hn(e.readValue().toHexString(),20))}}class Bj extends ss{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const ql=new W(Hc);function EN(n,e,t){let r=null;if(Array.isArray(t))r=t;else if(t&&"object"==typeof t){let l={};r=e.map(u=>{const c=u.localName;return c||ql.throwError("cannot encode object for signature with missing names",W.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:t}),l[c]&&ql.throwError("cannot encode object for signature with duplicate names",W.errors.INVALID_ARGUMENT,{argument:"values",coder:u,value:t}),l[c]=!0,t[c]})}else ql.throwArgumentError("invalid tuple value","tuple",t);e.length!==r.length&&ql.throwArgumentError("types/value length mismatch","tuple",t);let i=new O1(n.wordSize),o=new O1(n.wordSize),s=[];e.forEach((l,u)=>{let c=r[u];if(l.dynamic){let d=o.length;l.encode(o,c);let g=i.writeUpdatableValue();s.push(y=>{g(y+d)})}else l.encode(i,c)}),s.forEach(l=>{l(i.length)});let a=n.appendWriter(i);return a+=n.appendWriter(o),a}function xN(n,e){let t=[],r=n.subReader(0);e.forEach(o=>{let s=null;if(o.dynamic){let a=n.readValue(),l=r.subReader(a.toNumber());try{s=o.decode(l)}catch(u){if(u.code===W.errors.BUFFER_OVERRUN)throw u;s=u,s.baseType=o.name,s.name=o.localName,s.type=o.type}}else try{s=o.decode(n)}catch(a){if(a.code===W.errors.BUFFER_OVERRUN)throw a;s=a,s.baseType=o.name,s.name=o.localName,s.type=o.type}null!=s&&t.push(s)});const i=e.reduce((o,s)=>{const a=s.localName;return a&&(o[a]||(o[a]=0),o[a]++),o},{});e.forEach((o,s)=>{let a=o.localName;if(!a||1!==i[a]||("length"===a&&(a="_length"),null!=t[a]))return;const l=t[s];l instanceof Error?Object.defineProperty(t,a,{enumerable:!0,get:()=>{throw l}}):t[a]=l});for(let o=0;o{throw s}})}return Object.freeze(t)}class Hj extends ss{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&ql.throwError("insufficient data length",W.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let i=0;i{s.dynamic&&(r=!0),i.push(s.type)}),super("tuple","tuple("+i.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach(r=>{e.push(r.defaultValue())});const t=this.coders.reduce((r,i)=>{const o=i.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});return this.coders.forEach((r,i)=>{let o=r.localName;!o||1!==t[o]||("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[i]))}),Object.freeze(e)}encode(e,t){return EN(e,this.coders,t)}decode(e){return e.coerce(this.name,xN(e,this.coders))}}const Rt=new W(Hc),xa={};let AN={calldata:!0,memory:!0,storage:!0},Yj={calldata:!0,memory:!0};function Hh(n,e){if("bytes"===n||"string"===n){if(AN[e])return!0}else if("address"===n){if("payable"===e)return!0}else if((n.indexOf("[")>=0||"tuple"===n)&&Yj[e])return!0;return(AN[e]||"payable"===e)&&Rt.throwArgumentError("invalid modifier","name",e),!1}function Uh(n,e){for(let t in e)ue(n,t,e[t])}const Vt=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),Zj=new RegExp(/^(.*)\[([0-9]*)\]$/);class dr{constructor(e,t){e!==xa&&Rt.throwError("use fromString",W.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Uh(this,t);let r=this.type.match(Zj);Uh(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:dr.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=Vt.sighash),Vt[e]||Rt.throwArgumentError("invalid format type","format",e),e===Vt.json){let r={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.components&&(r.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(r)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Vt.sighash&&(t+=this.type),t+="("+this.components.map(r=>r.format(e)).join(e===Vt.full?", ":",")+")"):t+=this.type,e!==Vt.sighash&&(!0===this.indexed&&(t+=" indexed"),e===Vt.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?dr.fromString(e,t):dr.fromObject(e)}static fromObject(e){return dr.isParamType(e)?e:new dr(xa,{name:e.name||null,type:Jl(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(dr.fromObject):null})}static fromString(e,t){return i=function(n,e){let t=n;function r(a){Rt.throwArgumentError(`unexpected character at position ${a}`,"param",n)}function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}n=n.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;adr.fromString(t,e))}class ls{constructor(e,t){e!==xa&&Rt.throwError("use a static from method",W.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Uh(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return ls.isFragment(e)?e:"string"==typeof e?ls.fromString(e):ls.fromObject(e)}static fromObject(e){if(ls.isFragment(e))return e;switch(e.type){case"function":return Io.fromObject(e);case"event":return us.fromObject(e);case"constructor":return So.fromObject(e);case"error":return Bs.fromObject(e);case"fallback":case"receive":return null}return Rt.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?us.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Io.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?So.fromString(e.trim()):"error"===e.split(" ")[0]?Bs.fromString(e.substring(5).trim()):Rt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class us extends ls{format(e){if(e||(e=Vt.sighash),Vt[e]||Rt.throwArgumentError("invalid format type","format",e),e===Vt.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});let t="";return e!==Vt.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(r=>r.format(e)).join(e===Vt.full?", ":",")+") ",e!==Vt.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?us.fromString(e):us.fromObject(e)}static fromObject(e){if(us.isEventFragment(e))return e;"event"!==e.type&&Rt.throwArgumentError("invalid event object","value",e);const t={name:jc(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dr.fromObject):[],type:"event"};return new us(xa,t)}static fromString(e){let t=e.match($c);t||Rt.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":r=!0;break;case"":break;default:Rt.warn("unknown modifier: "+i)}}),us.fromObject({name:t[1].trim(),anonymous:r,inputs:Uc(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function TN(n,e){e.gas=null;let t=n.split("@");return 1!==t.length?(t.length>2&&Rt.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||Rt.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=Ne.from(t[1]),t[0]):n}function SN(n,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",n.split(" ").forEach(t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}})}function IN(n){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=n.stateMutability?(e.stateMutability=n.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=n.constant&&!!n.constant!==e.constant&&Rt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable="payable"===e.stateMutability,null!=n.payable&&!!n.payable!==e.payable&&Rt.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",n)):null!=n.payable?(e.payable=!!n.payable,null==n.constant&&!e.payable&&"constructor"!==n.type&&Rt.throwArgumentError("unable to determine stateMutability","value",n),e.constant=!!n.constant,e.stateMutability=e.constant?"view":e.payable?"payable":"nonpayable",e.payable&&e.constant&&Rt.throwArgumentError("cannot have constant payable function","value",n)):null!=n.constant?(e.constant=!!n.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==n.type&&Rt.throwArgumentError("unable to determine stateMutability","value",n),e}class So extends ls{format(e){if(e||(e=Vt.sighash),Vt[e]||Rt.throwArgumentError("invalid format type","format",e),e===Vt.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});e===Vt.sighash&&Rt.throwError("cannot format a constructor for sighash",W.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(r=>r.format(e)).join(e===Vt.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?So.fromString(e):So.fromObject(e)}static fromObject(e){if(So.isConstructorFragment(e))return e;"constructor"!==e.type&&Rt.throwArgumentError("invalid constructor object","value",e);let t=IN(e);t.constant&&Rt.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dr.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Ne.from(e.gas):null};return new So(xa,r)}static fromString(e){let t={type:"constructor"},r=(e=TN(e,t)).match($c);return(!r||"constructor"!==r[1].trim())&&Rt.throwArgumentError("invalid constructor string","value",e),t.inputs=Uc(r[2].trim(),!1),SN(r[3].trim(),t),So.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Io extends So{format(e){if(e||(e=Vt.sighash),Vt[e]||Rt.throwArgumentError("invalid format type","format",e),e===Vt.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(e))),outputs:this.outputs.map(r=>JSON.parse(r.format(e)))});let t="";return e!==Vt.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(r=>r.format(e)).join(e===Vt.full?", ":",")+") ",e!==Vt.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(r=>r.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Io.fromString(e):Io.fromObject(e)}static fromObject(e){if(Io.isFunctionFragment(e))return e;"function"!==e.type&&Rt.throwArgumentError("invalid function object","value",e);let t=IN(e);const r={type:e.type,name:jc(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(dr.fromObject):[],outputs:e.outputs?e.outputs.map(dr.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?Ne.from(e.gas):null};return new Io(xa,r)}static fromString(e){let t={type:"function"},r=(e=TN(e,t)).split(" returns ");r.length>2&&Rt.throwArgumentError("invalid function string","value",e);let i=r[0].match($c);if(i||Rt.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&jc(t.name),t.inputs=Uc(i[2],!1),SN(i[3].trim(),t),r.length>1){let o=r[1].match($c);(""!=o[1].trim()||""!=o[3].trim())&&Rt.throwArgumentError("unexpected tokens","value",e),t.outputs=Uc(o[2],!1)}else t.outputs=[];return Io.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function RN(n){const e=n.format();return("Error(string)"===e||"Panic(uint256)"===e)&&Rt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}class Bs extends ls{format(e){if(e||(e=Vt.sighash),Vt[e]||Rt.throwArgumentError("invalid format type","format",e),e===Vt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(e)))});let t="";return e!==Vt.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(r=>r.format(e)).join(e===Vt.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?Bs.fromString(e):Bs.fromObject(e)}static fromObject(e){if(Bs.isErrorFragment(e))return e;"error"!==e.type&&Rt.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:jc(e.name),inputs:e.inputs?e.inputs.map(dr.fromObject):[]};return RN(new Bs(xa,t))}static fromString(e){let t={type:"error"},r=e.match($c);return r||Rt.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&jc(t.name),t.inputs=Uc(r[2],!1),RN(Bs.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Jl(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}const Xj=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function jc(n){return(!n||!n.match(Xj))&&Rt.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}const $c=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),Gc=new W(Hc),t$=new RegExp(/^bytes([0-9]*)$/),n$=new RegExp(/^(u?int)([0-9]*)$/);class j1{constructor(e){Gc.checkNew(new.target,j1),ue(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Vj(e.name);case"bool":return new Uj(e.name);case"string":return new Kj(e.name);case"bytes":return new jj(e.name);case"array":return new Hj(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Bh((e.components||[]).map(r=>this._getCoder(r)),e.name);case"":return new Gj(e.name)}let t=e.type.match(n$);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&Gc.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Jj(r/8,"int"===t[1],e.name)}if(t=e.type.match(t$),t){let r=parseInt(t[1]);return(0===r||r>32)&&Gc.throwArgumentError("invalid bytes length","param",e),new $j(r,e.name)}return Gc.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new Lh(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new O1(this._getWordSize())}getDefaultValue(e){const t=e.map(i=>this._getCoder(dr.from(i)));return new Bh(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&Gc.throwError("types/values length mismatch",W.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map(s=>this._getCoder(dr.from(s))),i=new Bh(r,"_"),o=this._getWriter();return i.encode(o,t),o.data}decode(e,t,r){const i=e.map(s=>this._getCoder(dr.from(s)));return new Bh(i,"_").decode(this._getReader(st(t),r))}}const r$=new j1,Nn=new W(Hc);class i$ extends Bc{}class o$ extends Bc{}class s$ extends Bc{}class $1 extends Bc{static isIndexed(e){return!(!e||!e._isIndexed)}}const a$={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function kN(n,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}class jh{constructor(e){Nn.checkNew(new.target,jh);let t=[];t="string"==typeof e?JSON.parse(e):e,ue(this,"fragments",t.map(r=>ls.from(r)).filter(r=>null!=r)),ue(this,"_abiCoder",Ao(new.target,"getAbiCoder")()),ue(this,"functions",{}),ue(this,"errors",{}),ue(this,"events",{}),ue(this,"structs",{}),this.fragments.forEach(r=>{let i=null;switch(r.type){case"constructor":return this.deploy?void Nn.warn("duplicate definition - constructor"):void ue(this,"deploy",r);case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=r.format();i[o]?Nn.warn("duplicate definition - "+o):i[o]=r}),this.deploy||ue(this,"deploy",So.from({payable:!1,type:"constructor"})),ue(this,"_isInterface",!0)}format(e){e||(e=Vt.full),e===Vt.sighash&&Nn.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(r=>r.format(e));return e===Vt.json?JSON.stringify(t.map(r=>JSON.parse(r))):t}static getAbiCoder(){return r$}static getAddress(e){return Un(e)}static getSighash(e){return is(Wl(e.format()),0,4)}static getEventTopic(e){return Wl(e.format())}getFunction(e){if(jt(e)){for(const r in this.functions)if(e===this.getSighash(r))return this.functions[r];Nn.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const r=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===r);return 0===i.length?Nn.throwArgumentError("no matching function","name",r):i.length>1&&Nn.throwArgumentError("multiple matching functions","name",r),this.functions[i[0]]}const t=this.functions[Io.fromString(e).format()];return t||Nn.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(jt(e)){const r=e.toLowerCase();for(const i in this.events)if(r===this.getEventTopic(i))return this.events[i];Nn.throwArgumentError("no matching event","topichash",r)}if(-1===e.indexOf("(")){const r=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===r);return 0===i.length?Nn.throwArgumentError("no matching event","name",r):i.length>1&&Nn.throwArgumentError("multiple matching events","name",r),this.events[i[0]]}const t=this.events[us.fromString(e).format()];return t||Nn.throwArgumentError("no matching event","signature",e),t}getError(e){if(jt(e)){const r=Ao(this.constructor,"getSighash");for(const i in this.errors)if(e===r(this.errors[i]))return this.errors[i];Nn.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const r=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===r);return 0===i.length?Nn.throwArgumentError("no matching error","name",r):i.length>1&&Nn.throwArgumentError("multiple matching errors","name",r),this.errors[i[0]]}const t=this.errors[Io.fromString(e).format()];return t||Nn.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return Ao(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Ao(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=st(t);return Qe(r.slice(0,4))!==this.getSighash(e)&&Nn.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Qe(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Qe(fi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=st(t);return Qe(r.slice(0,4))!==this.getSighash(e)&&Nn.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Qe(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Qe(fi([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=st(t),i=null,o=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:{const l=Qe(r.slice(0,4)),u=a$[l];if(u)o=this._abiCoder.decode(u.inputs,r.slice(4)),s=u.name,a=u.signature,u.reason&&(i=o[0]);else try{const c=this.getError(l);o=this._abiCoder.decode(c.inputs,r.slice(4)),s=c.name,a=c.format()}catch(c){console.log(c)}break}}return Nn.throwError("call revert exception",W.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:o,errorName:s,errorSignature:a,reason:i})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Qe(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Nn.throwError("too many arguments for "+e.format(),W.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const i=(o,s)=>"string"===o.type?Wl(s):"bytes"===o.type?rr(Qe(s)):("address"===o.type&&this._abiCoder.encode(["address"],[s]),Hn(Qe(s),32));for(t.forEach((o,s)=>{let a=e.inputs[s];a.indexed?null==o?r.push(null):"array"===a.baseType||"tuple"===a.baseType?Nn.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,o):Array.isArray(o)?r.push(o.map(l=>i(a,l))):r.push(i(a,o)):null!=o&&Nn.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,o)});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],i=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Nn.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,a)=>{const l=t[a];if(s.indexed)if("string"===s.type)r.push(Wl(l));else if("bytes"===s.type)r.push(rr(l));else{if("tuple"===s.baseType||"array"===s.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([s.type],[l]))}else i.push(s),o.push(l)}),{data:this._abiCoder.encode(i,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let g=this.getEventTopic(e);(!jt(r[0],32)||r[0].toLowerCase()!==g)&&Nn.throwError("fragment/topic mismatch",W.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:g,value:r[0]}),r=r.slice(1)}let i=[],o=[],s=[];e.inputs.forEach((g,y)=>{g.indexed?"string"===g.type||"bytes"===g.type||"tuple"===g.baseType||"array"===g.baseType?(i.push(dr.fromObject({type:"bytes32",name:g.name})),s.push(!0)):(i.push(g),s.push(!1)):(o.push(g),s.push(!1))});let a=null!=r?this._abiCoder.decode(i,fi(r)):null,l=this._abiCoder.decode(o,t,!0),u=[],c=0,d=0;e.inputs.forEach((g,y)=>{if(g.indexed)if(null==a)u[y]=new $1({_isIndexed:!0,hash:null});else if(s[y])u[y]=new $1({_isIndexed:!0,hash:a[d++]});else try{u[y]=a[d++]}catch(D){u[y]=D}else try{u[y]=l[c++]}catch(D){u[y]=D}if(g.name&&null==u[g.name]){const D=u[y];D instanceof Error?Object.defineProperty(u,g.name,{enumerable:!0,get:()=>{throw kN(`property ${JSON.stringify(g.name)}`,D)}}):u[g.name]=D}});for(let g=0;g{throw kN(`index ${g}`,y)}})}return Object.freeze(u)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new o$({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:Ne.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new i$({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=Qe(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new s$({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}const zc=new W("abstract-provider/5.5.1");class c$ extends Bc{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class Wc{constructor(){zc.checkAbstract(new.target,Wc),ue(this,"_isProvider",!0)}getFeeData(){return function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield zn({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let r=null,i=null;return e&&e.baseFeePerGas&&(i=Ne.from("2500000000"),r=e.baseFeePerGas.mul(2).add(i)),{maxFeePerGas:r,maxPriorityFeePerGas:i,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}var so=function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})};const hi=new W("abstract-signer/5.5.0"),f$=["accessList","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],h$=[W.errors.INSUFFICIENT_FUNDS,W.errors.NONCE_EXPIRED,W.errors.REPLACEMENT_UNDERPRICED];class qc{constructor(){hi.checkAbstract(new.target,qc),ue(this,"_isSigner",!0)}getBalance(e){return so(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return so(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return so(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield zn(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return so(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield zn(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return so(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)})}getChainId(){return so(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return so(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return so(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return so(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)-1===f$.indexOf(r)&&hi.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=cr(e);return t.from=null==t.from?this.getAddress():Promise.all([Promise.resolve(t.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&hi.throwArgumentError("from address mismatch","transaction",e),r[0])),t}populateTransaction(e){return so(this,void 0,void 0,function*(){const t=yield zn(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then(i=>so(this,void 0,void 0,function*(){if(null==i)return null;const o=yield this.resolveName(i);return null==o&&hi.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?(0===t.type||1===t.type)&&r&&hi.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):hi.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(null==t.type)if(null!=i.maxFeePerGas&&null!=i.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else null==t.maxFeePerGas&&(t.maxFeePerGas=i.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else null!=i.gasPrice?(r&&hi.throwError("network does not support EIP-1559",W.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=i.gasPrice),t.type=0):hi.throwError("failed to get consistent fee data",W.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=i.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(h$.indexOf(i.code)>=0)throw i;return hi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",W.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId=null==t.chainId?this.getChainId():Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(0!==i[1]&&i[0]!==i[1]&&hi.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield zn(t)})}_checkProvider(e){this.provider||hi.throwError("missing provider",W.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class $h extends qc{constructor(e,t){hi.checkNew(new.target,$h),super(),ue(this,"address",e),ue(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{hi.throwError(e,W.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new $h(this.address,e)}}var p$=ee(909),Ro=ee.n(p$);function Kl(n,e,t){return n(t={path:e,exports:{},require:function(r,i){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var G1=PN;function PN(n,e){if(!n)throw new Error(e||"Assertion failed")}PN.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var ao=Kl(function(n,e){var t=e;function i(s){return 1===s.length?"0"+s:s}function o(s){for(var a="",l=0;l>8,g=255&c;d?l.push(d,g):l.push(g)}return l},t.zero2=i,t.toHex=o,t.encode=function(a,l){return"hex"===l?o(a):a}}),pi=Kl(function(n,e){var t=e;t.assert=G1,t.toArray=ao.toArray,t.zero2=ao.zero2,t.toHex=ao.toHex,t.encode=ao.encode,t.getNAF=function(l,u,c){var d=new Array(Math.max(l.bitLength(),c)+1);d.fill(0);for(var g=1<(g>>1)-1?(g>>1)-R:R):T=0,d[D]=T,y.iushrn(1)}return d},t.getJSF=function(l,u){var c=[[],[]];l=l.clone(),u=u.clone();for(var y,d=0,g=0;l.cmpn(-d)>0||u.cmpn(-g)>0;){var R,V,D=l.andln(3)+d&3,T=u.andln(3)+g&3;3===D&&(D=-1),3===T&&(T=-1),R=0==(1&D)?0:3!=(y=l.andln(7)+d&7)&&5!==y||2!==T?D:-D,c[0].push(R),V=0==(1&T)?0:3!=(y=u.andln(7)+g&7)&&5!==y||2!==D?T:-T,c[1].push(V),2*d===R+1&&(d=1-d),2*g===V+1&&(g=1-g),l.iushrn(1),u.iushrn(1)}return c},t.cachedProperty=function(l,u,c){var d="_"+u;l.prototype[u]=function(){return void 0!==this[d]?this[d]:this[d]=c.call(this)}},t.parseBytes=function(l){return"string"==typeof l?t.toArray(l,"hex"):l},t.intFromLE=function(l){return new(mt())(l,"hex","le")}}),Gh=pi.getNAF,m$=pi.getJSF,zh=pi.assert;function Hs(n,e){this.type=n,this.p=new(mt())(e.p,16),this.red=e.prime?mt().red(e.prime):mt().mont(this.p),this.zero=new(mt())(0).toRed(this.red),this.one=new(mt())(1).toRed(this.red),this.two=new(mt())(2).toRed(this.red),this.n=e.n&&new(mt())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ma=Hs;function Ri(n,e){this.curve=n,this.type=e,this.precomputed=null}Hs.prototype.point=function(){throw new Error("Not implemented")},Hs.prototype.validate=function(){throw new Error("Not implemented")},Hs.prototype._fixedNafMul=function(e,t){zh(e.precomputed);var r=e._getDoubles(),i=Gh(t,1,this._bitLength),o=(1<=a;u--)l=(l<<1)+i[u];s.push(l)}for(var c=this.jpoint(null,null,null),d=this.jpoint(null,null,null),g=o;g>0;g--){for(a=0;a=0;l--){for(var u=0;l>=0&&0===s[l];l--)u++;if(l>=0&&u++,a=a.dblp(u),l<0)break;var c=s[l];zh(0!==c),a="affine"===e.type?a.mixedAdd(c>0?o[c-1>>1]:o[-c-1>>1].neg()):a.add(c>0?o[c-1>>1]:o[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},Hs.prototype._wnafMulAdd=function(e,t,r,i,o){var c,d,g,s=this._wnafT1,a=this._wnafT2,l=this._wnafT3,u=0;for(c=0;c=1;c-=2){var D=c-1,T=c;if(1===s[D]&&1===s[T]){var R=[t[D],null,null,t[T]];0===t[D].y.cmp(t[T].y)?(R[1]=t[D].add(t[T]),R[2]=t[D].toJ().mixedAdd(t[T].neg())):0===t[D].y.cmp(t[T].y.redNeg())?(R[1]=t[D].toJ().mixedAdd(t[T]),R[2]=t[D].add(t[T].neg())):(R[1]=t[D].toJ().mixedAdd(t[T]),R[2]=t[D].toJ().mixedAdd(t[T].neg()));var V=[-3,-1,-5,-7,0,7,5,1,3],L=m$(r[D],r[T]);for(u=Math.max(L[0].length,u),l[D]=new Array(u),l[T]=new Array(u),d=0;d=0;c--){for(var ir=0;c>=0;){var Mr=!0;for(d=0;d=0&&ir++,We=We.dblp(ir),c<0)break;for(d=0;d0?g=a[d][Fi-1>>1]:Fi<0&&(g=a[d][-Fi-1>>1].neg()),We="affine"===g.type?We.mixedAdd(g):We.add(g))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step)},Ri.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,o=0;o=0&&(y=u,D=c),d.negative&&(d=d.neg(),g=g.neg()),y.negative&&(y=y.neg(),D=D.neg()),[{a:d,b:g},{a:y,b:D}]},ki.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),a=o.mul(r.a),l=s.mul(i.a),u=o.mul(r.b),c=s.mul(i.b);return{k1:e.sub(a).sub(l),k2:u.add(c).neg()}},ki.prototype.pointFromX=function(e,t){(e=new(mt())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)},ki.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},ki.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s":""},fr.prototype.isInfinity=function(){return this.inf},fr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},fr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},fr.prototype.getX=function(){return this.x.fromRed()},fr.prototype.getY=function(){return this.y.fromRed()},fr.prototype.mul=function(e){return e=new(mt())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},fr.prototype.mulAdd=function(e,t,r){var i=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)},fr.prototype.jmulAdd=function(e,t,r){var i=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)},fr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},fr.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(o){return o.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},fr.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},z1(Er,Ma.BasePoint),ki.prototype.jpoint=function(e,t,r){return new Er(this,e,t,r)},Er.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},Er.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Er.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),l=i.redSub(o),u=s.redSub(a);if(0===l.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),d=c.redMul(l),g=i.redMul(c),y=u.redSqr().redIAdd(d).redISub(g).redISub(g),D=u.redMul(g.redISub(y)).redISub(s.redMul(d)),T=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(y,D,T)},Er.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),o=this.y,s=e.y.redMul(t).redMul(this.z),a=r.redSub(i),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),d=r.redMul(u),g=l.redSqr().redIAdd(c).redISub(d).redISub(d),y=l.redMul(d.redISub(g)).redISub(o.redMul(c)),D=this.z.redMul(a);return this.curve.jpoint(g,y,D)},Er.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},Er.prototype.inspect=function(){return this.isInfinity()?"":""},Er.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Wh=Kl(function(n,e){var t=e;t.base=Ma,t.short=y$,t.mont=null,t.edwards=null}),qh=Kl(function(n,e){var s,t=e,r=pi.assert;function i(a){this.curve="short"===a.type?new Wh.short(a):"edwards"===a.type?new Wh.edwards(a):new Wh.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(a,l){Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){var u=new i(l);return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,value:u}),u}})}t.PresetCurve=i,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ro().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ro().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ro().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ro().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ro().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ro().sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ro().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{s=null.crash()}catch(a){s=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ro().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Us(n){if(!(this instanceof Us))return new Us(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=ao.toArray(n.entropy,n.entropyEnc||"hex"),t=ao.toArray(n.nonce,n.nonceEnc||"hex"),r=ao.toArray(n.pers,n.persEnc||"hex");G1(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var FN=Us;Us.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Us.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=ao.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length"};var b$=pi.assert;function Jh(n,e){if(n instanceof Jh)return n;this._importDER(n,e)||(b$(n.r&&n.s,"Signature without r or s"),this.r=new(mt())(n.r,16),this.s=new(mt())(n.s,16),this.recoveryParam=void 0===n.recoveryParam?null:n.recoveryParam)}var Kh=Jh;function v$(){this.place=0}function J1(n,e){var t=n[e.place++];if(!(128&t))return t;var r=15&t;if(0===r||r>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return!(i<=127)&&(e.place=s,i)}function ON(n){for(var e=0,t=n.length-1;!n[e]&&!(128&n[e+1])&&e>>3);for(n.push(128|t);--t;)n.push(e>>>(t<<3)&255);n.push(e)}}Jh.prototype._importDER=function(e,t){e=pi.toArray(e,t);var r=new v$;if(48!==e[r.place++])return!1;var i=J1(e,r);if(!1===i||i+r.place!==e.length||2!==e[r.place++])return!1;var o=J1(e,r);if(!1===o)return!1;var s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=J1(e,r);if(!1===a||e.length!==a+r.place)return!1;var l=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new(mt())(s),this.s=new(mt())(l),this.recoveryParam=null,!0},Jh.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=ON(t),r=ON(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];K1(i,t.length),(i=i.concat(t)).push(2),K1(i,r.length);var o=i.concat(r),s=[48];return K1(s,o.length),s=s.concat(o),pi.encode(s,e)};var w$=function(){throw new Error("unsupported")},LN=pi.assert;function Pi(n){if(!(this instanceof Pi))return new Pi(n);"string"==typeof n&&(LN(Object.prototype.hasOwnProperty.call(qh,n),"Unknown curve "+n),n=qh[n]),n instanceof qh.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var D$=Pi;Pi.prototype.keyPair=function(e){return new q1(this,e)},Pi.prototype.keyFromPrivate=function(e,t){return q1.fromPrivate(this,e,t)},Pi.prototype.keyFromPublic=function(e,t){return q1.fromPublic(this,e,t)},Pi.prototype.genKeyPair=function(e){e||(e={});for(var t=new FN({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||w$(),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new(mt())(2));;){var o=new(mt())(t.generate(r));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}},Pi.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},Pi.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(mt())(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),a=e.toArray("be",o),l=new FN({hash:this.hash,entropy:s,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new(mt())(1)),c=0;;c++){var d=i.k?i.k(c):new(mt())(l.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(u)>=0)){var g=this.g.mul(d);if(!g.isInfinity()){var y=g.getX(),D=y.umod(this.n);if(0!==D.cmpn(0)){var T=d.invm(this.n).mul(D.mul(t.getPrivate()).iadd(e));if(0!==(T=T.umod(this.n)).cmpn(0)){var R=(g.getY().isOdd()?1:0)|(0!==y.cmp(D)?2:0);return i.canonical&&T.cmp(this.nh)>0&&(T=this.n.sub(T),R^=1),new Kh({r:D,s:T,recoveryParam:R})}}}}}},Pi.prototype.verify=function(e,t,r,i){e=this._truncateToN(new(mt())(e,16)),r=this.keyFromPublic(r,i);var o=(t=new Kh(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var c,a=s.invm(this.n),l=a.mul(e).umod(this.n),u=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,r.getPublic(),u)).isInfinity()&&c.eqXToP(o):!(c=this.g.mulAdd(l,r.getPublic(),u)).isInfinity()&&0===c.getX().umod(this.n).cmp(o)},Pi.prototype.recoverPubKey=function(n,e,t,r){LN((3&t)===t,"The recovery param is more than two bits"),e=new Kh(e,r);var i=this.n,o=new(mt())(n),s=e.r,a=e.s,l=1&t,u=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=this.curve.pointFromX(u?s.add(this.curve.n):s,l);var c=e.r.invm(i),d=i.sub(o).mul(c).umod(i),g=a.mul(c).umod(i);return this.g.mulAdd(d,s,g)},Pi.prototype.getKeyRecoveryParam=function(n,e,t,r){if(null!==(e=new Kh(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(n,e,i)}catch(s){continue}if(o.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var E$=Kl(function(n,e){var t=e;t.version="6.5.4",t.utils=pi,t.rand=function(){throw new Error("unsupported")},t.curve=Wh,t.curves=qh,t.ec=D$,t.eddsa=null}).ec;const VN=new W("signing-key/5.5.0");let Y1=null;function ko(){return Y1||(Y1=new E$("secp256k1")),Y1}class M${constructor(e){ue(this,"curve","secp256k1"),ue(this,"privateKey",Qe(e));const t=ko().keyFromPrivate(st(this.privateKey));ue(this,"publicKey","0x"+t.getPublic(!1,"hex")),ue(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),ue(this,"_isSigningKey",!0)}_addPoint(e){const t=ko().keyFromPublic(st(this.publicKey)),r=ko().keyFromPublic(st(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=ko().keyFromPrivate(st(this.privateKey)),r=st(e);32!==r.length&&VN.throwArgumentError("bad digest length","digest",e);const i=t.sign(r,{canonical:!0});return Oc({recoveryParam:i.recoveryParam,r:Hn("0x"+i.r.toString(16),32),s:Hn("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=ko().keyFromPrivate(st(this.privateKey)),r=ko().keyFromPublic(st(BN(e)));return Hn("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function BN(n,e){const t=st(n);if(32===t.length){const r=new M$(t);return e?"0x"+ko().keyFromPrivate(t).getPublic(!0,"hex"):r.publicKey}return 33===t.length?e?Qe(t):"0x"+ko().keyFromPublic(t).getPublic(!1,"hex"):65===t.length?e?"0x"+ko().keyFromPublic(t).getPublic(!0,"hex"):Qe(t):VN.throwArgumentError("invalid public or private key","key","[REDACTED]")}const kr=new W("transactions/5.5.0");function Q1(n){return"0x"===n?null:Un(n)}function Pr(n){return"0x"===n?NN:Ne.from(n)}function HN(n,e){return function(n){return Un(is(rr(is(BN(n),1)),12))}(function(n,e){const t=Oc(e),r={r:st(t.r),s:st(t.s)};return"0x"+ko().recoverPubKey(st(n),r,t.recoveryParam).encode("hex",!1)}(st(n),e))}function gi(n,e){const t=Gl(Ne.from(n).toHexString());return t.length>32&&kr.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Z1(n,e){return{address:Un(n),storageKeys:(e||[]).map((t,r)=>(32!==Fc(t)&&kr.throwArgumentError("invalid access list storageKey",`accessList[${n}:${r}]`,t),t.toLowerCase()))}}function Yl(n){if(Array.isArray(n))return n.map((t,r)=>Array.isArray(t)?(t.length>2&&kr.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${r}]`,t),Z1(t[0],t[1])):Z1(t.address,t.storageKeys));const e=Object.keys(n).map(t=>{const r=n[t].reduce((i,o)=>(i[o]=!0,i),{});return Z1(t,Object.keys(r).sort())});return e.sort((t,r)=>t.address.localeCompare(r.address)),e}function UN(n){return Yl(n).map(e=>[e.address,e.storageKeys])}function jN(n,e){if(null!=n.gasPrice){const r=Ne.from(n.gasPrice),i=Ne.from(n.maxFeePerGas||0);r.eq(i)||kr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:i})}const t=[gi(n.chainId||0,"chainId"),gi(n.nonce||0,"nonce"),gi(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),gi(n.maxFeePerGas||0,"maxFeePerGas"),gi(n.gasLimit||0,"gasLimit"),null!=n.to?Un(n.to):"0x",gi(n.value||0,"value"),n.data||"0x",UN(n.accessList||[])];if(e){const r=Oc(e);t.push(gi(r.recoveryParam,"recoveryParam")),t.push(Gl(r.r)),t.push(Gl(r.s))}return oo(["0x02",Vh(t)])}function $N(n,e){const t=[gi(n.chainId||0,"chainId"),gi(n.nonce||0,"nonce"),gi(n.gasPrice||0,"gasPrice"),gi(n.gasLimit||0,"gasLimit"),null!=n.to?Un(n.to):"0x",gi(n.value||0,"value"),n.data||"0x",UN(n.accessList||[])];if(e){const r=Oc(e);t.push(gi(r.recoveryParam,"recoveryParam")),t.push(Gl(r.r)),t.push(Gl(r.s))}return oo(["0x01",Vh(t)])}function GN(n,e,t){try{const r=Pr(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");n.v=r}catch(r){kr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=Hn(e[1],32),n.s=Hn(e[2],32);try{const r=rr(t(n));n.from=HN(r,{r:n.r,s:n.s,recoveryParam:n.v})}catch(r){console.log(r)}}var js=function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})};const nn=new W("contracts/5.5.0");function Yh(n,e){return js(this,void 0,void 0,function*(){const t=yield e;"string"!=typeof t&&nn.throwArgumentError("invalid address or ENS name","name",t);try{return Un(t)}catch(i){}n||nn.throwError("a provider or signer is needed to resolve ENS names",W.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const r=yield n.resolveName(t);return null==r&&nn.throwArgumentError("resolver or addr is not configured for ENS name","name",t),r})}function Jc(n,e,t){return js(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((r,i)=>Jc(n,Array.isArray(e)?e[i]:e[r.name],r))):"address"===t.type?yield Yh(n,e):"tuple"===t.type?yield Jc(n,e,t.components):"array"===t.baseType?Array.isArray(e)?yield Promise.all(e.map(r=>Jc(n,r,t.arrayChildren))):Promise.reject(nn.makeError("invalid value for array",W.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Qh(n,e,t){return js(this,void 0,void 0,function*(){let r={};t.length===e.inputs.length+1&&"object"==typeof t[t.length-1]&&(r=cr(t.pop())),nn.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?r.from=r.from?zn({override:Yh(n.signer,r.from),signer:n.signer.getAddress()}).then(u=>js(this,void 0,void 0,function*(){return Un(u.signer)!==u.override&&nn.throwError("Contract with a Signer cannot override from",W.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),u.override})):n.signer.getAddress():r.from&&(r.from=Yh(n.provider,r.from));const i=yield zn({args:Jc(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:zn(r)||{}}),o=n.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},a=i.overrides;if(null!=a.nonce&&(s.nonce=Ne.from(a.nonce).toNumber()),null!=a.gasLimit&&(s.gasLimit=Ne.from(a.gasLimit)),null!=a.gasPrice&&(s.gasPrice=Ne.from(a.gasPrice)),null!=a.maxFeePerGas&&(s.maxFeePerGas=Ne.from(a.maxFeePerGas)),null!=a.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=Ne.from(a.maxPriorityFeePerGas)),null!=a.from&&(s.from=a.from),null!=a.type&&(s.type=a.type),null!=a.accessList&&(s.accessList=Yl(a.accessList)),null==s.gasLimit&&null!=e.gas){let u=21e3;const c=st(o);for(let d=0;dnull!=r[u]);return l.length&&nn.throwError(`cannot override ${l.map(u=>JSON.stringify(u)).join(",")}`,W.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function WN(n,e,t){const r=n.signer||n.provider;return function(...i){return js(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&"object"==typeof i[i.length-1]){const l=cr(i.pop());null!=l.blockTag&&(o=yield l.blockTag),delete l.blockTag,i.push(l)}null!=n.deployTransaction&&(yield n._deployed(o));const s=yield Qh(n,e,i),a=yield r.call(s,o);try{let l=n.interface.decodeFunctionResult(e,a);return t&&1===e.outputs.length&&(l=l[0]),l}catch(l){throw l.code===W.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function qN(n,e,t){return e.constant?WN(n,e,t):function(n,e){return function(...t){return js(this,void 0,void 0,function*(){n.signer||nn.throwError("sending a transaction requires a signer",W.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=n.deployTransaction&&(yield n._deployed());const r=yield Qh(n,e,t),i=yield n.signer.sendTransaction(r);return function(n,e){const t=e.wait.bind(e);e.wait=r=>t(r).then(i=>(i.events=i.logs.map(o=>{let s=os(o),a=null;try{a=n.interface.parseLog(o)}catch(l){}return a&&(s.args=a.args,s.decode=(l,u)=>n.interface.decodeEventLog(a.eventFragment,l,u),s.event=a.name,s.eventSignature=a.signature),s.removeListener=()=>n.provider,s.getBlock=()=>n.provider.getBlock(i.blockHash),s.getTransaction=()=>n.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}(n,i),i})}}(n,e)}function JN(n){return!n.address||null!=n.topics&&0!==n.topics.length?(n.address||"*")+"@"+(n.topics?n.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):""):"*"}class Kc{constructor(e,t){ue(this,"tag",e),ue(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(r=>!(!t&&r.listener===e&&(t=!0,1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(r=>{const i=e.slice();return setTimeout(()=>{r.listener.apply(this,i)},0),!r.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class j$ extends Kc{constructor(){super("error",null)}}class KN extends Kc{constructor(e,t,r,i){const o={address:e};let s=t.getEventTopic(r);i?(s!==i[0]&&nn.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[s],super(JN(o),o),ue(this,"address",e),ue(this,"interface",t),ue(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,r)=>this.interface.decodeEventLog(this.fragment,t,r);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=function(n){const e=[],t=function(r,i){if(Array.isArray(i))for(let o in i){const s=r.slice();s.push(o);try{t(s,i[o])}catch(a){e.push({path:s,error:a})}}};return t([],n),e}(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class YN extends Kc{constructor(e,t){super("*",{address:e}),ue(this,"address",e),ue(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(r,i)=>this.interface.decodeEventLog(t.eventFragment,r,i),e.args=t.args}catch(t){}}}class Zh extends class{constructor(e,t,r){nn.checkNew(new.target,Zh),ue(this,"interface",Ao(new.target,"getInterface")(t)),null==r?(ue(this,"provider",null),ue(this,"signer",null)):qc.isSigner(r)?(ue(this,"provider",r.provider||null),ue(this,"signer",r)):Wc.isProvider(r)?(ue(this,"provider",r),ue(this,"signer",null)):nn.throwArgumentError("invalid signer or provider","signerOrProvider",r),ue(this,"callStatic",{}),ue(this,"estimateGas",{}),ue(this,"functions",{}),ue(this,"populateTransaction",{}),ue(this,"filters",{});{const s={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];ue(this.filters,a,(...u)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,u)})),s[l.name]||(s[l.name]=[]),s[l.name].push(a)}),Object.keys(s).forEach(a=>{const l=s[a];1===l.length?ue(this.filters,a,this.filters[l[0]]):nn.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ue(this,"_runningEvents",{}),ue(this,"_wrappedEmits",{}),null==e&&nn.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ue(this,"address",e),this.provider)ue(this,"resolvedAddress",Yh(this.provider,e));else try{ue(this,"resolvedAddress",Promise.resolve(Un(e)))}catch(s){nn.throwError("provider is required to use ENS name as contract address",W.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}const i={},o={};Object.keys(this.interface.functions).forEach(s=>{const a=this.interface.functions[s];if(o[s])nn.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);else{o[s]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(s)}null==this[s]&&ue(this,s,qN(this,a,!0)),null==this.functions[s]&&ue(this.functions,s,qN(this,a,!1)),null==this.callStatic[s]&&ue(this.callStatic,s,WN(this,a,!0)),null==this.populateTransaction[s]&&ue(this.populateTransaction,s,function(n,e){return function(...t){return Qh(n,e,t)}}(this,a)),null==this.estimateGas[s]&&ue(this.estimateGas,s,function(n,e){const t=n.signer||n.provider;return function(...r){return js(this,void 0,void 0,function*(){t||nn.throwError("estimate require a provider or signer",W.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Qh(n,e,r);return yield t.estimateGas(i)})}}(this,a))}}),Object.keys(i).forEach(s=>{const a=i[s];if(a.length>1)return;s=s.substring(1);const l=a[0];try{null==this[s]&&ue(this,s,this[l])}catch(u){}null==this.functions[s]&&ue(this.functions,s,this.functions[l]),null==this.callStatic[s]&&ue(this.callStatic,s,this.callStatic[l]),null==this.populateTransaction[s]&&ue(this.populateTransaction,s,this.populateTransaction[l]),null==this.estimateGas[s]&&ue(this.estimateGas,s,this.estimateGas[l])})}static getContractAddress(e){return vN(e)}static getInterface(e){return jh.isInterface(e)?e:new jh(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this._deployedPromise=this.deployTransaction?this.deployTransaction.wait().then(()=>this):this.provider.getCode(this.address,e).then(t=>("0x"===t&&nn.throwError("contract not deployed",W.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||nn.throwError("sending a transactions require a signer",W.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=cr(e||{});return["from","to"].forEach(function(r){null!=t[r]&&nn.throwError("cannot override "+r,W.errors.UNSUPPORTED_OPERATION,{operation:r})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){"string"==typeof e&&(e=new $h(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ue(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return $1.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new j$);if("event"===e)return this._normalizeRunningEvent(new Kc("event",null));if("*"===e)return this._normalizeRunningEvent(new YN(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new KN(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const r=e.topics[0];if("string"!=typeof r)throw new Error("invalid topic");const i=this.interface.getEvent(r);return this._normalizeRunningEvent(new KN(this.address,this.interface,i,e.topics))}catch(r){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Kc(JN(t),t))}return this._normalizeRunningEvent(new YN(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const i=os(t);return i.removeListener=()=>{!r||(e.removeListener(r),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,r){if(this.provider||nn.throwError("events require a provider or a signer with a provider",W.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let s=this._wrapEvent(e,o,t);if(null==s.decodeError)try{const a=e.getEmit(s);this.emit(e.filter,...a)}catch(a){s.decodeError=a.error}null!=e.filter&&this.emit("event",s),null!=s.decodeError&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}queryFilter(e,t,r){const i=this._getRunningEvent(e),o=cr(i.filter);return"string"==typeof t&&jt(t,32)?(null!=r&&nn.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then(s=>s.map(a=>this._wrapEvent(i,a,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),i=r.run(t)>0;return this._checkRunningEvents(r),i}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce((t,r)=>t+this._runningEvents[r].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const t=[];for(let r in this._runningEvents)this._runningEvents[r].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const r in this._runningEvents){const i=this._runningEvents[r];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}{}const Xh="providers/5.5.0",QN="hash/5.5.0";const Rn=new W(QN),ZN=new Uint8Array(32);ZN.fill(0);const z$=Ne.from(-1),XN=Ne.from(0),eA=Ne.from(1),W$=Ne.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),J$=Hn(eA.toHexString(),32),K$=Hn(XN.toHexString(),32),tA={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},X1=["name","version","chainId","verifyingContract","salt"];function nA(n){return function(e){return"string"!=typeof e&&Rn.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}const Y$={name:nA("name"),version:nA("version"),chainId:function(n){try{return Ne.from(n).toString()}catch(e){}return Rn.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return Un(n).toLowerCase()}catch(e){}return Rn.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{const e=st(n);if(32!==e.length)throw new Error("bad length");return Qe(e)}catch(e){}return Rn.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function e_(n){{const e=n.match(/^(u?)int(\d*)$/);if(e){const t=""===e[1],r=parseInt(e[2]||"256");(r%8!=0||r>256||e[2]&&e[2]!==String(r))&&Rn.throwArgumentError("invalid numeric width","type",n);const i=W$.mask(t?r-1:r),o=t?i.add(eA).mul(z$):XN;return function(s){const a=Ne.from(s);return(a.lt(o)||a.gt(i))&&Rn.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),Hn(a.toTwos(256).toHexString(),32)}}}{const e=n.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return(0===t||t>32||e[1]!==String(t))&&Rn.throwArgumentError("invalid bytes width","type",n),function(r){return st(r).length!==t&&Rn.throwArgumentError(`invalid length for ${n}`,"value",r),function(n){const e=st(n),t=e.length%32;return t?oo([e,ZN.slice(t)]):Qe(e)}(r)}}}switch(n){case"address":return function(e){return Hn(Un(e),32)};case"bool":return function(e){return e?J$:K$};case"bytes":return function(e){return rr(e)};case"string":return function(e){return Wl(e)}}return null}function rA(n,e){return`${n}(${e.map(({name:t,type:r})=>r+" "+t).join(",")})`}class mi{constructor(e){ue(this,"types",Object.freeze(os(e))),ue(this,"_encoderCache",{}),ue(this,"_types",{});const t={},r={},i={};Object.keys(e).forEach(a=>{t[a]={},r[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(u=>{l[u.name]&&Rn.throwArgumentError(`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(a)}`,"types",e),l[u.name]=!0;const c=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===a&&Rn.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!e_(c)&&(r[c]||Rn.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),r[c].push(a),t[a][c]=!0)})}const o=Object.keys(r).filter(a=>0===r[a].length);0===o.length?Rn.throwArgumentError("missing primary type","types",e):o.length>1&&Rn.throwArgumentError(`ambiguous primary types or unused types: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ue(this,"primaryType",o[0]),function s(a,l){l[a]&&Rn.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(t[a]).forEach(u=>{!r[u]||(s(u,l),Object.keys(l).forEach(c=>{i[c][u]=!0}))}),delete l[a]}(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=rA(a,e[a])+l.map(u=>rA(u,e[u])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const i=e_(e);if(i)return i}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const i=t[1],o=this.getEncoder(i),s=parseInt(t[3]);return a=>{s>=0&&a.length!==s&&Rn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(o);return this._types[i]&&(l=l.map(rr)),rr(oo(l))}}const r=this.types[e];if(r){const i=Wl(this._types[e]);return o=>{const s=r.map(({name:a,type:l})=>{const u=this.getEncoder(l)(o[a]);return this._types[l]?rr(u):u});return s.unshift(i),oo(s)}}return Rn.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||Rn.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return rr(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(e_(e))return r(e,t);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&Rn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(l=>this._visit(s,l,r))}const o=this.types[e];return o?o.reduce((s,{name:a,type:l})=>(s[a]=this._visit(l,t[a],r),s),{}):Rn.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new mi(e)}static getPrimaryType(e){return mi.from(e).primaryType}static hashStruct(e,t,r){return mi.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const i=tA[r];i||Rn.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:i})}return t.sort((r,i)=>X1.indexOf(r.name)-X1.indexOf(i.name)),mi.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return oo(["0x1901",mi.hashDomain(e),mi.from(t).hash(r)])}static hash(e,t,r){return rr(mi.encode(e,t,r))}static resolveNames(e,t,r,i){return function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){e=cr(e);const o={};e.verifyingContract&&!jt(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=mi.from(t);s.visit(r,(a,l)=>("address"===a&&!jt(l,20)&&(o[l]="0x"),l));for(const a in o)o[a]=yield i(a);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=s.visit(r,(a,l)=>"address"===a&&o[l]?o[l]:l),{domain:e,value:r}})}static getPayload(e,t,r){mi.hashDomain(e);const i={},o=[];X1.forEach(l=>{const u=e[l];null!=u&&(i[l]=Y$[l](u),o.push({name:l,type:tA[l]}))});const s=mi.from(t),a=cr(t);return a.EIP712Domain?Rn.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):a.EIP712Domain=o,s.encode(r),{types:a,domain:i,primaryType:s.primaryType,message:s.visit(r,(l,u)=>{if(l.match(/^bytes(\d*)/))return Qe(st(u));if(l.match(/^u?int/))return Ne.from(u).toString();switch(l){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return"string"!=typeof u&&Rn.throwArgumentError("invalid string","value",u),u}return Rn.throwArgumentError("unsupported type","type",l)})}}}function Q$(n){n=st(n);let e="";for(let t=0;t{o[a.toLowerCase()]=s}):r.headers.keys().forEach(s=>{o[s.toLowerCase()]=r.headers.get(s)}),{headers:o,statusCode:r.status,statusMessage:r.statusText,body:st(new Uint8Array(i))}})}const Po=new W("web/5.5.0");function iA(n){return new Promise(e=>{setTimeout(e,n)})}function Na(n,e){if(null==n)return null;if("string"==typeof n)return n;if(I1(n)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return zl(n)}catch(t){}return Qe(n)}return n}function oA(n,e,t){let i=null;if(null!=e){i=as(e);const o="string"==typeof n?{url:n}:cr(n);o.headers?0!==Object.keys(o.headers).filter(a=>"content-type"===a.toLowerCase()).length||(o.headers=cr(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},n=o}return function(n,e,t){const r="object"==typeof n&&null!=n.throttleLimit?n.throttleLimit:12;Po.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const i="object"==typeof n?n.throttleCallback:null,o="object"==typeof n&&"number"==typeof n.throttleSlotInterval?n.throttleSlotInterval:100;Po.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s={};let a=null;const l={method:"GET"};let u=!1,c=12e4;if("string"==typeof n)a=n;else if("object"==typeof n){if((null==n||null==n.url)&&Po.throwArgumentError("missing URL","connection.url",n),a=n.url,"number"==typeof n.timeout&&n.timeout>0&&(c=n.timeout),n.headers)for(const D in n.headers)s[D.toLowerCase()]={key:D,value:String(n.headers[D])},["if-none-match","if-modified-since"].indexOf(D.toLowerCase())>=0&&(u=!0);l.allowGzip=!!n.allowGzip,null!=n.user&&null!=n.password&&("https:"!==a.substring(0,6)&&!0!==n.allowInsecureAuthentication&&Po.throwError("basic authentication requires a secure https url",W.errors.INVALID_ARGUMENT,{argument:"url",url:a,user:n.user,password:"[REDACTED]"}),s.authorization={key:"Authorization",value:"Basic "+Q$(as(n.user+":"+n.password))})}e&&(l.method="POST",l.body=e,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));const d={};Object.keys(s).forEach(D=>{const T=s[D];d[T.key]=T.value}),l.headers=d;const g=function(){let D=null;return{promise:new Promise(function(V,L){c&&(D=setTimeout(()=>{null!=D&&(D=null,L(Po.makeError("timeout",W.errors.TIMEOUT,{requestBody:Na(l.body,d["content-type"]),requestMethod:l.method,timeout:c,url:a})))},c))}),cancel:function(){null!=D&&(clearTimeout(D),D=null)}}}(),y=function(){return function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){for(let D=0;D=300)&&(g.cancel(),Po.throwError("bad response",W.errors.SERVER_ERROR,{status:T.statusCode,headers:T.headers,body:Na(R,T.headers?T.headers["content-type"]:null),requestBody:Na(l.body,d["content-type"]),requestMethod:l.method,url:a})),t)try{const V=yield t(R,T);return g.cancel(),V}catch(V){if(V.throttleRetry&&D{let a=null;if(null!=o)try{a=JSON.parse(zl(o))}catch(l){Po.throwError("invalid JSON",W.errors.SERVER_ERROR,{body:o,error:l})}return t&&(a=t(a,s)),a})}function Yc(n,e){return e||(e={}),null==(e=cr(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise(function(t,r){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&r(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;!function u(){return n().then(function(c){if(void 0!==c)s()&&t(c);else if(e.oncePoll)e.oncePoll.once("poll",u);else if(e.onceBlock)e.onceBlock.once("block",u);else if(!o){if(l++,l>a)return void(s()&&r(new Error("retry limit reached")));let d=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));de.ceiling&&(d=e.ceiling),setTimeout(u,d)}return null},function(c){s()&&r(c)})}()})}class sA{constructor(e){ue(this,"alphabet",e),ue(this,"base",e.length),ue(this,"_alphabetMap",{}),ue(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;0===t[o]&&o=0;--o)i+=this.alphabet[r[o]];return i}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r{let o=i.split(":");t+=parseInt(o[0],16),r[t]=e(o[1])}),r}function lA(n){let e=0;return n.split(",").map(t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let i=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:i,h:e}})}function n_(n,e){let t=0;for(let r=0;r=t&&n<=t+i.h&&(n-t)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(n-t))continue;return i}}return null}const oG=lA("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),sG="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),aG=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],lG=t_("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),uG=t_("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),cG=t_("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(n){if(n.length%4!=0)throw new Error("bad data");let e=[];for(let t=0;t(t.forEach(r=>{e.push(r)}),e),[])}(e.map(r=>sG.indexOf(r)>=0||r>=65024&&r<=65039?[]:function(n){let e=n_(n,aG);if(e)return[n+e.s];let t=lG[n];if(t)return t;let r=uG[n];return r?[n+r[0]]:cG[n]||null}(r)||[r])),e=CN(U1(e),Ea.NFKC),e.forEach(r=>{if(function(n){return!!n_(n,dG)}(r))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(r=>{if(function(n){return!!n_(n,oG)}(r))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=U1(e);if("-"===t.substring(0,1)||"--"===t.substring(2,4)||"-"===t.substring(t.length-1))throw new Error("invalid hyphen");if(t.length>63)throw new Error("too long");return t}const uA=new W(QN),cA=new Uint8Array(32);cA.fill(0);const _G=new RegExp("^((.*)\\.)?([^.]+)$");function ep(n){"string"!=typeof n&&uA.throwArgumentError("invalid ENS name; not a string","name",n);let e=n,t=cA;for(;e.length;){const r=e.match(_G);(null==r||""===r[2])&&uA.throwArgumentError("invalid ENS address; missing component","name",n),t=rr(fi([t,rr(as(mG(r[3])))])),e=r[2]||""}return Qe(t)}const dA=new W("networks/5.5.0");function Ql(n){const e=function(t,r){null==r&&(r={});const i=[];if(t.InfuraProvider)try{i.push(new t.InfuraProvider(n,r.infura))}catch(o){}if(t.EtherscanProvider)try{i.push(new t.EtherscanProvider(n,r.etherscan))}catch(o){}if(t.AlchemyProvider)try{i.push(new t.AlchemyProvider(n,r.alchemy))}catch(o){}if(t.PocketProvider){const o=["goerli","ropsten","rinkeby"];try{const s=new t.PocketProvider(n);s.network&&-1===o.indexOf(s.network.name)&&i.push(s)}catch(s){}}if(t.CloudflareProvider)try{i.push(new t.CloudflareProvider(n))}catch(o){}if(0===i.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===n&&(o=2),new t.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(t){return Ql(t)},e}function tp(n,e){const t=function(r,i){return r.JsonRpcProvider?new r.JsonRpcProvider(n,e):null};return t.renetwork=function(r){return tp(n,r)},t}const fA={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ql("homestead")},hA={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ql("ropsten")},pA={chainId:63,name:"classicMordor",_defaultProvider:tp("https://www.ethercluster.com/mordor","classicMordor")},np={unspecified:{chainId:0,name:"unspecified"},homestead:fA,mainnet:fA,morden:{chainId:2,name:"morden"},ropsten:hA,testnet:hA,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ql("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ql("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ql("goerli")},classic:{chainId:61,name:"classic",_defaultProvider:tp("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:pA,classicTestnet:pA,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:tp("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic"},maticmum:{chainId:80001,name:"maticmum"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function gA(n){return"0x"+Ro().sha256().update(st(n)).digest("hex")}new W("sha2/5.5.0");var CG=ee(901),mA=ee.n(CG);const Zl=new W(Xh);class ze{constructor(){Zl.checkNew(new.target,ze),this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),i=this.blockTag.bind(this),o=this.data.bind(this),s=this.hash.bind(this),a=this.hex.bind(this),l=this.number.bind(this),u=this.type.bind(this);return e.transaction={hash:s,type:u,accessList:ze.allowNull(this.accessList.bind(this),null),blockHash:ze.allowNull(s,null),blockNumber:ze.allowNull(l,null),transactionIndex:ze.allowNull(l,null),confirmations:ze.allowNull(l,null),from:t,gasPrice:ze.allowNull(r),maxPriorityFeePerGas:ze.allowNull(r),maxFeePerGas:ze.allowNull(r),gasLimit:r,to:ze.allowNull(t,null),value:r,nonce:l,data:o,r:ze.allowNull(this.uint256),s:ze.allowNull(this.uint256),v:ze.allowNull(l),creates:ze.allowNull(t,null),raw:ze.allowNull(o)},e.transactionRequest={from:ze.allowNull(t),nonce:ze.allowNull(l),gasLimit:ze.allowNull(r),gasPrice:ze.allowNull(r),maxPriorityFeePerGas:ze.allowNull(r),maxFeePerGas:ze.allowNull(r),to:ze.allowNull(t),value:ze.allowNull(r),data:ze.allowNull(d=>this.data(d,!0)),type:ze.allowNull(l),accessList:ze.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:s,address:t,topics:ze.arrayOf(s),data:o,logIndex:l,blockHash:s},e.receipt={to:ze.allowNull(this.address,null),from:ze.allowNull(this.address,null),contractAddress:ze.allowNull(t,null),transactionIndex:l,root:ze.allowNull(a),gasUsed:r,logsBloom:ze.allowNull(o),blockHash:s,transactionHash:s,logs:ze.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ze.allowNull(l,null),cumulativeGasUsed:r,effectiveGasPrice:ze.allowNull(r),status:ze.allowNull(l),type:u},e.block={hash:s,parentHash:s,number:l,timestamp:l,nonce:ze.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:t,extraData:o,transactions:ze.allowNull(ze.arrayOf(s)),baseFeePerGas:ze.allowNull(r)},e.blockWithTransactions=cr(e.block),e.blockWithTransactions.transactions=ze.allowNull(ze.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ze.allowNull(i,void 0),toBlock:ze.allowNull(i,void 0),blockHash:ze.allowNull(s,void 0),address:ze.allowNull(t,void 0),topics:ze.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ze.allowNull(l),blockHash:ze.allowNull(s),transactionIndex:l,removed:ze.allowNull(this.boolean.bind(this)),address:t,data:ze.allowFalsish(o,"0x"),topics:ze.arrayOf(s),transactionHash:s,logIndex:l},e}accessList(e){return Yl(e||[])}number(e){return"0x"===e?0:Ne.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Ne.from(e).toNumber()}bigNumber(e){return Ne.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(!t&&"0x"!==e.substring(0,2)&&(e="0x"+e),jt(e))?e.toLowerCase():Zl.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Un(e)}callAddress(e){if(!jt(e,32))return null;const t=Un(is(e,12));return"0x0000000000000000000000000000000000000000"===t?null:t}contractAddress(e){return vN(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e||jt(e))return k1(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==Fc(r)?Zl.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=Ne.from(e);try{return t.toNumber()}catch(r){}return null}uint256(e){if(!jt(e))throw new Error("invalid uint256");return Hn(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,i=ze.check(t,e);return i._difficulty=null==r?null:Ne.from(r),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ze.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Ne.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const t=ze.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;jt(r)&&(r=Ne.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),jt(r)&&(r=Ne.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return function(n){const e=st(n);if(e[0]>127)return function(n){const e=L1(n);9!==e.length&&6!==e.length&&kr.throwArgumentError("invalid raw transaction","rawTransaction",n);const t={nonce:Pr(e[0]).toNumber(),gasPrice:Pr(e[1]),gasLimit:Pr(e[2]),to:Q1(e[3]),value:Pr(e[4]),data:e[5],chainId:0};if(6===e.length)return t;try{t.v=Ne.from(e[6]).toNumber()}catch(r){return console.log(r),t}if(t.r=Hn(e[7],32),t.s=Hn(e[8],32),Ne.from(t.r).isZero()&&Ne.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let r=t.v-27;const i=e.slice(0,6);0!==t.chainId&&(i.push(Qe(t.chainId)),i.push("0x"),i.push("0x"),r-=2*t.chainId+8);const o=rr(Vh(i));try{t.from=HN(o,{r:Qe(t.r),s:Qe(t.s),recoveryParam:r})}catch(s){console.log(s)}t.hash=rr(n)}return t.type=null,t}(e);switch(e[0]){case 1:return function(n){const e=L1(n.slice(1));8!==e.length&&11!==e.length&&kr.throwArgumentError("invalid component count for transaction type: 1","payload",Qe(n));const t={type:1,chainId:Pr(e[0]).toNumber(),nonce:Pr(e[1]).toNumber(),gasPrice:Pr(e[2]),gasLimit:Pr(e[3]),to:Q1(e[4]),value:Pr(e[5]),data:e[6],accessList:Yl(e[7])};return 8===e.length||(t.hash=rr(n),GN(t,e.slice(8),$N)),t}(e);case 2:return function(n){const e=L1(n.slice(1));9!==e.length&&12!==e.length&&kr.throwArgumentError("invalid component count for transaction type: 2","payload",Qe(n));const t=Pr(e[2]),r=Pr(e[3]),i={type:2,chainId:Pr(e[0]).toNumber(),nonce:Pr(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:r,gasPrice:null,gasLimit:Pr(e[4]),to:Q1(e[5]),value:Pr(e[6]),data:e[7],accessList:Yl(e[8])};return 9===e.length||(i.hash=rr(n),GN(i,e.slice(9),jN)),i}(e)}return kr.throwError(`unsupported transaction type: ${e[0]}`,W.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}(e)}receiptLog(e){return ze.check(this.formats.receiptLog,e)}receipt(e){const t=ze.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const r=Ne.from(t.root).toNumber();0===r||1===r?(null!=t.status&&t.status!==r&&Zl.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=r,delete t.root):Zl.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&Zl.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):null!=e?this.hash(e,!0):null}filter(e){return ze.check(this.formats.filter,e)}filterLog(e){return ze.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const i in e)try{const o=e[i](t[i]);void 0!==o&&(r[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=t[i],o}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach(function(i){r.push(e(i))}),r}}}var vt=function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})};const Qt=new W(Xh);function yA(n){return null==n?"null":(32!==Fc(n)&&Qt.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function bA(n){for(n=n.slice();n.length>0&&null==n[n.length-1];)n.pop();return n.map(e=>{if(Array.isArray(e)){const t={};e.forEach(i=>{t[yA(i)]=!0});const r=Object.keys(t);return r.sort(),r.join("|")}return yA(e)}).join("&")}function Xl(n){if("string"==typeof n){if(32===Fc(n=n.toLowerCase()))return"tx:"+n;if(-1===n.indexOf(":"))return n}else{if(Array.isArray(n))return"filter:*:"+bA(n);if(c$.isForkEvent(n))throw Qt.warn("not implemented"),new Error("not implemented");if(n&&"object"==typeof n)return"filter:"+(n.address||"*")+":"+bA(n.topics||[])}throw new Error("invalid event - "+n)}function Qc(){return(new Date).getTime()}function vA(n){return new Promise(e=>{setTimeout(e,n)})}const NG=["block","network","pending","poll"];class AG{constructor(e,t,r){ue(this,"tag",e),ue(this,"listener",t),ue(this,"once",r)}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=function(n){return""===n?[]:n.split(/&/g).map(e=>{if(""===e)return[];const t=e.split("|").map(r=>"null"===r?null:r);return 1===t.length?t[0]:t})}(e[2]),i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||NG.indexOf(this.tag)>=0}}const TG={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function r_(n){return Hn(Ne.from(n).toHexString(),32)}function wA(n){return aA.encode(fi([n,is(gA(gA(n)),0,4)]))}const DA=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),new RegExp("^(ipfs)://(.*)$","i"),new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function SG(n){try{return zl(CA(n))}catch(e){}return null}function CA(n){if("0x"===n)return null;const e=Ne.from(is(n,0,32)).toNumber(),t=Ne.from(is(n,e,e+32)).toNumber();return is(n,e+32,e+32+t)}class EA{constructor(e,t,r,i){ue(this,"provider",e),ue(this,"name",r),ue(this,"address",e.formatter.address(t)),ue(this,"_resolvedAddress",i)}_fetchBytes(e,t){return vt(this,void 0,void 0,function*(){const r={to:this.address,data:oo([e,ep(this.name),t||"0x"])};try{return CA(yield this.provider.call(r))}catch(i){return null}})}_getAddress(e,t){const r=TG[String(e)];if(null==r&&Qt.throwError(`unsupported coin type: ${e}`,W.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const i=st(t);if(null!=r.p2pkh){const o=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===2*s&&s>=1&&s<=75)return wA(fi([[r.p2pkh],"0x"+o[2]]))}}if(null!=r.p2sh){const o=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===2*s&&s>=1&&s<=75)return wA(fi([[r.p2sh],"0x"+o[2]]))}}if(null!=r.prefix){const o=i[1];let s=i[0];if(0===s?20!==o&&32!==o&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const a=mA().toWords(i.slice(2));return a.unshift(s),mA().encode(r.prefix,a)}}return null}getAddress(e){return vt(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const i={to:this.address,data:"0x3b3b57de"+ep(this.name).substring(2)},o=yield this.provider.call(i);return"0x"===o||"0x0000000000000000000000000000000000000000000000000000000000000000"===o?null:this.provider.formatter.callAddress(o)}catch(i){if(i.code===W.errors.CALL_EXCEPTION)return null;throw i}const t=yield this._fetchBytes("0xf1cb7e06",r_(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&Qt.throwError("invalid or unsupported coin data",W.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r})}getAvatar(){return vt(this,void 0,void 0,function*(){const e=[];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r{}),this._ready().catch(t=>{});else{const t=Ao(new.target,"getNetwork")(e);t?(ue(this,"_network",t),this.emit("network",t,null)):Qt.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return vt(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(t){}null==e&&(e=yield this.detectNetwork()),e||Qt.throwError("no network detected",W.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:ue(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Yc(()=>this._ready().then(e=>e,e=>{if(e.code!==W.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==i_&&(i_=new ze),i_}static getNetwork(e){return function(n){if(null==n)return null;if("number"==typeof n){for(const r in np){const i=np[r];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if("string"==typeof n){const r=np[n];return null==r?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}const e=np[n.name];if(!e)return"number"!=typeof n.chainId&&dA.throwArgumentError("invalid network chainId","network",n),n;0!==n.chainId&&n.chainId!==e.chainId&&dA.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return null==t&&e._defaultProvider&&(t=function(n){return n&&"function"==typeof n.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(n):e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}(null==e?"homestead":e)}_getInternalBlockNumber(e){return vt(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(Qc()-o.respTime<=e)return o.blockNumber;break}catch(o){if(this._internalBlockNumber===i)break}}const t=Qc(),r=zn({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),o;const s=Qc();return(i=Ne.from(i).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return vt(this,void 0,void 0,function*(){const e=IG++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){return void this.emit("error",i)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Qt.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Qt.makeError("network block skew detected",W.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let i=this._emitted.block+1;i<=r;i++)this.emit("block",i);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(i=>{if("block"===i)return;const o=this._emitted[i];"pending"!==o&&r-o>12&&delete this._emitted[i]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(a=>(!a||null==a.blockNumber||(this._emitted["t:"+o]=a.blockNumber,this.emit(o,a)),null)).catch(a=>{this.emit("error",a)});t.push(s);break}case"filter":{const o=i.filter;o.fromBlock=this._lastBlockNumber+1,o.toBlock=r;const s=this.getLogs(o).then(a=>{0!==a.length&&a.forEach(l=>{this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(o,l)})}).catch(a=>{this.emit("error",a)});t.push(s);break}}}),this._lastBlockNumber=r,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return vt(this,void 0,void 0,function*(){return Qt.throwError("provider does not support network detection",W.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return vt(this,void 0,void 0,function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield vA(0),this._network;const r=Qt.makeError("underlying network changed",W.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=Qc();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return vt(this,void 0,void 0,function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)})}_waitForTransaction(e,t,r,i){return vt(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise((s,a)=>{const l=[];let u=!1;const c=function(){return!!u||(u=!0,l.forEach(g=>{g()}),!1)},d=g=>{g.confirmations{this.removeListener(e,d)}),i){let g=i.startBlock,y=null;const D=T=>vt(this,void 0,void 0,function*(){u||(yield vA(1e3),this.getTransactionCount(i.from).then(R=>vt(this,void 0,void 0,function*(){if(!u){if(R<=i.nonce)g=T;else{{const V=yield this.getTransaction(e);if(V&&null!=V.blockNumber)return}for(null==y&&(y=g-3,y{u||this.once("block",D)}))});if(u)return;this.once("block",D),l.push(()=>{this.removeListener("block",D)})}if("number"==typeof r&&r>0){const g=setTimeout(()=>{c()||a(Qt.makeError("timeout exceeded",W.errors.TIMEOUT,{timeout:r}))},r);g.unref&&g.unref(),l.push(()=>{clearTimeout(g)})}})})}getBlockNumber(){return vt(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Ne.from(e)}catch(t){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield zn({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",r);try{return Ne.from(i)}catch(o){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"getBalance",params:r,result:i,error:o})}})}getTransactionCount(e,t){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield zn({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",r);try{return Ne.from(i).toNumber()}catch(o){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:i,error:o})}})}getCode(e,t){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield zn({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",r);try{return Qe(i)}catch(o){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"getCode",params:r,result:i,error:o})}})}getStorageAt(e,t,r){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield zn({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then(s=>k1(s))}),o=yield this.perform("getStorageAt",i);try{return Qe(o)}catch(s){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,t,r){if(null!=t&&32!==Fc(t))throw new Error("invalid response - sendTransaction");const i=e;return null!=t&&e.hash!==t&&Qt.throwError("Transaction hash mismatch from Provider.sendTransaction.",W.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(o,s)=>vt(this,void 0,void 0,function*(){let a;null==o&&(o=1),null==s&&(s=0),0!==o&&null!=r&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const l=yield this._waitForTransaction(e.hash,o,s,a);return null==l&&0===o?null:(this._emitted["t:"+e.hash]=l.blockNumber,0===l.status&&Qt.throwError("transaction failed",W.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then(o=>Qe(o)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,o,i)}catch(o){throw o.transaction=r,o.transactionHash=r.hash,o}})}_getTransactionRequest(e){return vt(this,void 0,void 0,function*(){const t=yield e,r={};return["from","to"].forEach(i=>{null!=t[i]&&(r[i]=Promise.resolve(t[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{null!=t[i]&&(r[i]=Promise.resolve(t[i]).then(o=>o?Ne.from(o):null))}),["type"].forEach(i=>{null!=t[i]&&(r[i]=Promise.resolve(t[i]).then(o=>null!=o?o:null))}),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{null!=t[i]&&(r[i]=Promise.resolve(t[i]).then(o=>o?Qe(o):null))}),this.formatter.transactionRequest(yield zn(r))})}_getFilter(e){return vt(this,void 0,void 0,function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(r=>{null!=e[r]&&(t[r]=e[r])}),["fromBlock","toBlock"].forEach(r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))}),this.formatter.filter(yield zn(t))})}call(e,t){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield zn({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("call",r);try{return Qe(i)}catch(o){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"call",params:r,result:i,error:o})}})}estimateGas(e){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield zn({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return Ne.from(r)}catch(i){return Qt.throwError("bad result from backend",W.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:i})}})}_getAddress(e){return vt(this,void 0,void 0,function*(){"string"!=typeof(e=yield e)&&Qt.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&Qt.throwError("ENS name not configured",W.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t})}_getBlock(e,t){return vt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let r=-128;const i={includeTransactions:!!t};if(jt(e,32))i.blockHash=e;else try{i.blockTag=yield this._getBlockTag(e),jt(i.blockTag)&&(r=parseInt(i.blockTag.substring(2),16))}catch(o){Qt.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return Yc(()=>vt(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(null==o)return null!=i.blockHash&&null==this._emitted["b:"+i.blockHash]||null!=i.blockTag&&r>this._emitted.block?null:void 0;if(t){let s=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return vt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Yc(()=>vt(this,void 0,void 0,function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const i=this.formatter.transactionResponse(r);if(null==i.blockNumber)i.confirmations=0;else if(null==i.confirmations){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return vt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Yc(()=>vt(this,void 0,void 0,function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const i=this.formatter.receipt(r);if(null==i.blockNumber)i.confirmations=0;else if(null==i.confirmations){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return vt(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield zn({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach(i=>{null==i.removed&&(i.removed=!1)}),ze.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return vt(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return vt(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Qt.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return vt(this,void 0,void 0,function*(){try{const t=yield this._getResolver(e);return null==t?null:new EA(this,t,e)}catch(t){return null}})}_getResolver(e){return vt(this,void 0,void 0,function*(){const t=yield this.getNetwork();t.ensAddress||Qt.throwError("network does not support ENS",W.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:t.name});const r={to:t.ensAddress,data:"0x0178b8bf"+ep(e).substring(2)};try{return this.formatter.callAddress(yield this.call(r))}catch(i){if(i.code===W.errors.CALL_EXCEPTION)return null;throw i}})}resolveName(e){return vt(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if(jt(e))throw r}"string"!=typeof e&&Qt.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return vt(this,void 0,void 0,function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t);if(!r)return null;let i=st(yield this.call({to:r,data:"0x691f3431"+ep(t).substring(2)}));if(i.length<32||!Ne.from(i.slice(0,32)).eq(32)||(i=i.slice(32),i.length<32))return null;const o=Ne.from(i.slice(0,32)).toNumber();if(i=i.slice(32),o>i.length)return null;const s=zl(i.slice(0,o));return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return vt(this,void 0,void 0,function*(){let t=null;if(jt(e)){const i=this.formatter.address(e),o=i.substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o);if(!s)return null;t=new EA(this,s,"_",i)}else t=yield this.getResolver(e);const r=yield t.getAvatar();return null==r?null:r.url})}perform(e,t){return Qt.throwError(e+" not implemented",W.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,r){const i=new AG(Xl(e),t,r);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,i=[],o=Xl(e);return this._events=this._events.filter(s=>s.tag!==o||(setTimeout(()=>{s.listener.apply(this,t)},0),r=!0,!s.once||(i.push(s),!1))),i.forEach(s=>{this._stopEvent(s)}),r}listenerCount(e){if(!e)return this._events.length;let t=Xl(e);return this._events.filter(r=>r.tag===t).length}listeners(e){if(null==e)return this._events.map(r=>r.listener);let t=Xl(e);return this._events.filter(r=>r.tag===t).map(r=>r.listener)}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let i=!1,o=Xl(e);return this._events=this._events.filter(s=>!(s.tag===o&&s.listener==t&&!i&&(i=!0,r.push(s),1))),r.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=Xl(e);this._events=this._events.filter(i=>i.tag!==r||(t.push(i),!1))}return t.forEach(r=>{this._stopEvent(r)}),this}}var cs=function(n,e,t,r){return new(t||(t=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):function(o){return o instanceof t?o:new t(function(s){s(o)})}(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})};const xr=new W(Xh),kG=["call","estimateGas"];function xA(n,e,t){if("call"===n&&e.code===W.errors.SERVER_ERROR){const o=e.error;if(o&&o.message.match("reverted")&&jt(o.data))return o.data;xr.throwError("missing revert data in call exception",W.errors.CALL_EXCEPTION,{error:e,data:"0x"})}let r=e.message;e.code===W.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?r=e.error.message:"string"==typeof e.body?r=e.body:"string"==typeof e.responseText&&(r=e.responseText),r=(r||"").toLowerCase();const i=t.transaction||t.signedTransaction;throw r.match(/insufficient funds|base fee exceeds gas limit/)&&xr.throwError("insufficient funds for intrinsic transaction cost",W.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:i}),r.match(/nonce too low/)&&xr.throwError("nonce has already been used",W.errors.NONCE_EXPIRED,{error:e,method:n,transaction:i}),r.match(/replacement transaction underpriced/)&&xr.throwError("replacement fee too low",W.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:i}),r.match(/only replay-protected/)&&xr.throwError("legacy pre-eip-155 transactions not supported",W.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:i}),kG.indexOf(n)>=0&&r.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&xr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",W.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:i}),e}function MA(n){return new Promise(function(e){setTimeout(e,n)})}function PG(n){if(n.error){const e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function Zc(n){return n&&n.toLowerCase()}const o_={};class rp extends qc{constructor(e,t,r){if(xr.checkNew(new.target,rp),super(),e!==o_)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ue(this,"provider",t),null==r&&(r=0),"string"==typeof r?(ue(this,"_address",this.provider.formatter.address(r)),ue(this,"_index",null)):"number"==typeof r?(ue(this,"_index",r),ue(this,"_address",null)):xr.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return xr.throwError("cannot alter JSON-RPC Signer connection",W.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new FG(o_,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&xr.throwError("unknown account #"+this._index,W.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=cr(e);const t=this.getAddress().then(r=>(r&&(r=r.toLowerCase()),r));if(null==e.gasLimit){const r=cr(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(r=>cs(this,void 0,void 0,function*(){if(null==r)return null;const i=yield this.provider.resolveName(r);return null==i&&xr.throwArgumentError("provided ENS name resolves to null","tx.to",r),i}))),zn({tx:zn(e),sender:t}).then(({tx:r,sender:i})=>{null!=r.from?r.from.toLowerCase()!==i&&xr.throwArgumentError("from address mismatch","transaction",e):r.from=i;const o=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>xA("sendTransaction",s,o))})}signTransaction(e){return xr.throwError("signing transactions is unsupported",W.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return cs(this,void 0,void 0,function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Yc(()=>cs(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(r);if(null!==i)return this.provider._wrapTransaction(i,r,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=r,i}})}signMessage(e){return cs(this,void 0,void 0,function*(){const t="string"==typeof e?as(e):e,r=yield this.getAddress();return yield this.provider.send("personal_sign",[Qe(t),r.toLowerCase()])})}_legacySignMessage(e){return cs(this,void 0,void 0,function*(){const t="string"==typeof e?as(e):e,r=yield this.getAddress();return yield this.provider.send("eth_sign",[r.toLowerCase(),Qe(t)])})}_signTypedData(e,t,r){return cs(this,void 0,void 0,function*(){const i=yield mi.resolveNames(e,t,r,s=>this.provider.resolveName(s)),o=yield this.getAddress();return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(mi.getPayload(i.domain,t,i.value))])})}unlock(e){return cs(this,void 0,void 0,function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class FG extends rp{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:r=>this.provider.waitForTransaction(t,r)}))}}const OG={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class s_ extends RG{constructor(e,t){xr.checkNew(new.target,s_);let r=t;null==r&&(r=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(r),e||(e=Ao(this.constructor,"defaultUrl")()),ue(this,"connection",Object.freeze("string"==typeof e?{url:e}:cr(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return cs(this,void 0,void 0,function*(){yield MA(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(r){}}if(null!=e){const t=Ao(this.constructor,"getNetwork");try{return t(Ne.from(e).toNumber())}catch(r){return xr.throwError("could not detect network",W.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:r})}}return xr.throwError("could not detect network",W.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new rp(o_,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:os(r),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=oA(this.connection,JSON.stringify(r),PG).then(s=>(this.emit("debug",{action:"response",request:r,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:r,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Zc(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Zc(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Zc(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Zc(t.address),t.position,t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Ao(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Ao(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=Zc(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return cs(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const i=t.transaction;if(i&&null!=i.type&&Ne.from(i.type).isZero()&&null==i.maxFeePerGas&&null==i.maxPriorityFeePerGas){const o=yield this.getFeeData();null==o.maxFeePerGas&&null==o.maxPriorityFeePerGas&&((t=cr(t)).transaction=cr(i),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&xr.throwError(e+" not implemented",W.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(i){return xA(e,i,t)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(r){return function i(){e.send("eth_getFilterChanges",[r]).then(function(o){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return o.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),s.then(function(){return MA(1e3)})}).then(function(){if(e._pendingFilter==t)return setTimeout(function(){i()},0),null;e.send("eth_uninstallFilter",[r])}).catch(o=>{})}(),r}).catch(r=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=cr(OG);if(t)for(const o in t)t[o]&&(r[o]=!0);!function(n,e){(!n||"object"!=typeof n)&&Oh.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Oh.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}(e,r);const i={};return["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(null==e[o])return;const s=k1(e[o]);"gasLimit"===o&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){null!=e[o]&&(i[o]=Qe(e[o]))}),e.accessList&&(i.accessList=Yl(e.accessList)),i}}const a_=new W(Xh);let LG=1;function NA(n,e){const t="Web3LegacyFetcher";return function(r,i){const o={method:r,params:i,id:LG++,jsonrpc:"2.0"};return new Promise((s,a)=>{this.emit("debug",{action:"request",fetcher:t,request:os(o),provider:this}),e(o,(l,u)=>{if(l)return this.emit("debug",{action:"response",fetcher:t,error:l,request:o,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:t,request:o,response:u,provider:this}),u.error){const c=new Error(u.error.message);return c.code=u.error.code,c.data=u.error.data,a(c)}s(u.result)})})}}class l_ extends s_{constructor(e,t){a_.checkNew(new.target,l_),null==e&&a_.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;"function"==typeof e?(r="unknown:",i=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),o=e,e.request?(""===r&&(r="eip-1193:"),i=function(n){return function(e,t){null==t&&(t=[]);const r={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:os(r),provider:this}),n.request(r).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,error:i,provider:this}),i})}}(e)):e.sendAsync?i=NA(0,e.sendAsync.bind(e)):e.send?i=NA(0,e.send.bind(e)):a_.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),ue(this,"jsonRpcFetchFunc",i),ue(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}function BG(n,e){if(1&n){const t=Ot();H(0,"button",44),He("click",function(){return wt(t),se().login()}),Je(1,"Connect Wallet"),U()}}function HG(n,e){if(1&n){const t=Ot();H(0,"button",45),He("click",function(){return wt(t),se().logOut()}),Je(1,"Wallet Connected"),U()}}function UG(n,e){1&n&&(H(0,"button",46),Je(1,"Install MetaMask"),U())}function jG(n,e){if(1&n&&(H(0,"div"),$e(1,"img",50),U()),2&n){const t=e.$implicit,r=se(3);Z(1),Pu("src","",r.pic,"",t,".png",Ja)}}function $G(n,e){if(1&n&&(H(0,"div",48),X(1,jG,2,2,"div",49),U()),2&n){const t=e.$implicit;Z(1),K("ngForOf",t)}}function GG(n,e){1&n&&X(0,$G,2,1,"div",47),2&n&&K("ngForOf",se().viewPuzzle)}function zG(n,e){if(1&n&&$e(0,"img",50),2&n){const t=se().$implicit;Pu("src","",se(3).pic,"",-t,".png",Ja)}}function WG(n,e){if(1&n&&$e(0,"img",51),2&n){const t=se().$implicit;Pu("src","",se(3).pic,"",t,".png",Ja)}}function qG(n,e){if(1&n&&(H(0,"div"),X(1,zG,1,2,"ng-template",14),X(2,WG,1,2,"ng-template",14),U()),2&n){const t=e.$implicit;Z(1),K("ngIf",t&&t<0),Z(1),K("ngIf",t&&t>0)}}function JG(n,e){if(1&n&&(H(0,"div",48),X(1,qG,3,2,"div",49),U()),2&n){const t=e.$implicit;Z(1),K("ngForOf",t)}}function KG(n,e){1&n&&X(0,JG,2,1,"div",47),2&n&&K("ngForOf",se().puzzle)}function YG(n,e){if(1&n){const t=Ot();H(0,"div",52),H(1,"h4",53),Je(2,"Congratulations!!"),U(),H(3,"button",54),He("click",function(){return wt(t).dismiss("Cross click")}),H(4,"span",55),Je(5,"\xd7"),U(),U(),U(),H(6,"div",56),H(7,"p"),Je(8,"Well done on completing the puzzle! Click the link to fill out a "),$e(9,"br"),Je(10,"form to validate your wallet and for us to send you your the prize!! "),U(),U(),H(11,"div",57),H(12,"button",58),He("click",function(){return wt(t),se().form()}),Je(13,"Form"),U(),U()}}function QG(n,e){1&n&&$e(0,"div",61)}function ZG(n,e){if(1&n){const t=Ot();H(0,"div",52),H(1,"h4",53),Je(2,"Scanning..."),U(),H(3,"button",54),He("click",function(){return wt(t).dismiss("Cross click")}),H(4,"span",55),Je(5,"\xd7"),U(),U(),U(),$e(6,"br"),H(7,"div",59),Je(8),X(9,QG,1,0,"div",60),U(),$e(10,"br"),$e(11,"div",57)}if(2&n){const t=se();Z(8),Qo("",t.count," pieces scanned "),Z(1),K("ngIf",t.loading)}}function XG(n,e){if(1&n){const t=Ot();H(0,"button",44),He("click",function(){wt(t);const i=se(),o=Kn(71);return i.scan(o)}),Je(1,"Scan"),U()}}function ez(n,e){if(1&n){const t=Ot();H(0,"button",62),He("click",function(){wt(t);const i=se(),o=Kn(71);return i.scan(o)}),Je(1,"Scan"),U()}}function tz(n,e){if(1&n){const t=Ot();H(0,"button",45),He("click",function(){return wt(t),se().clear()}),Je(1,"Clear"),U()}}let nz=ee(804),u_=ee(87);window.global=window,window.Buffer=window.Buffer||ee(875).lW;const rz=[{path:"",pathMatch:"full",redirectTo:"/"},{path:"",component:(()=>{class n{constructor(t){this.modalService=t,this.walletConnection=!1,this.metamask=!1,this.userWallet="",this.pic="../../assets/puzzlepics/Fidira-NFT_",this.png="01.png",this.piecesCollected=new Array,this.complete=!1,this.scanned=!1,this.title="ng-bootstrap-modal-demo"}ngOnInit(){this.viewNFT(),this.loading=!1,this.init(),this.modalOptions={backdrop:"static",backdropClass:"customBackdrop"}}login(){var t=this;return Ls(function*(){if(window.ethereum){let r=yield window.ethereum.request({method:"eth_requestAccounts"}).catch(i=>{console.log(i)});t.walletConnection=!0,t.setData(r[0],"userAddress"),t.userWallet=r[0],yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x89",chainName:"Matic Mainnet",nativeCurrency:{name:"Polygon",symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com/"],blockExplorerUrls:["https://polygonscan.com/"]}]}).catch(i=>{t.walletConnection=!1,console.log(i)}),yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x89"}]}).catch(i=>{t.walletConnection=!1,console.log(i)})}})()}logOut(){return Ls(function*(){})()}init(){var t=this;return Ls(function*(){t.metamask=!!(yield window.ethereum)})()}clear(){var t=this;return Ls(function*(){t.scanned=!1,t.piecesCollected=[],t.puzzle=[],t.complete=!1,t.count=0})()}form(){return Ls(function*(){window.open("https://forms.gle/K1L1u1nbfzQoRCEHA","_blank").focus()})()}scan(t){var r=this;return Ls(function*(){r.userWallet?yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x89"}]}).catch(l=>{r.walletConnection=!1,console.log(l)}):yield r.login(),(yield window.ethereum.request({method:"eth_requestAccounts"}))&&(r.walletConnection=!0),r.piecesCollected=[],r.scanning=!0,r.clear(),r.open(t),r.loading=!0;const s=yield(yield new l_(window.ethereum)).getSigner();let a=new Zh("0x2953399124F0cBB46d2CbACD8A89cF0599974963",nz,s);r.count=0;for(let l=0;l{r.count++,u>0&&r.piecesCollected.push(u_[l].piece)}).catch(u=>{console.log(u)});r.puzzleBuilder()})()}puzzleBuilder(){var t=this;return Ls(function*(){let r=1;t.puzzle=[];for(let i=0;i<8;i++){let o=new Array;o=[];for(let s=0;s<6;s++)(yield t.piecesCollected.includes(r.toString()))?o.push(r):o.push(-r),r++;t.puzzle.push(o)}48==t.piecesCollected.length?(console.log(t.piecesCollected.length),t.complete=!0):t.complete=!1,t.loading=!1,t.scanned=!0,t.scanning=!1,t.modalService.dismissAll()})()}viewNFT(){var t=this;return Ls(function*(){t.loading=!0;let r=1;t.viewPuzzle=[];for(let i=0;i<8;i++){let o=new Array;o=[];for(let s=0;s<6;s++)o.push(r),r++;t.viewPuzzle.push(o)}t.loading=!1})()}open(t){this.modalService.open(t)}getDismissReason(t){return t===ya.ESC?"by pressing ESC":t===ya.BACKDROP_CLICK?"by clicking on a backdrop":`with: ${t}`}setData(t,r){const i=JSON.stringify(t);localStorage.setItem(r,i)}getData(t){return JSON.parse(localStorage.getItem(t))}removeData(t){localStorage.removeItem(t)}}return n.\u0275fac=function(t){return new(t||n)(P(Dx))},n.\u0275cmp=Dn({type:n,selectors:[["app-puzzle"]],decls:95,vars:8,consts:[[1,"container"],[1,"d-flex","justify-content-between","pt-5"],["id","Fidira_Logo","data-name","Fidira Logo","xmlns","http://www.w3.org/2000/svg","width","48.112","height","60","viewBox","0 0 48.112 60"],["id","Ellipse_306","data-name","Ellipse 306","cx","4.651","cy","4.651","r","4.651","fill","#fcee21"],["id","Ellipse_307","data-name","Ellipse 307","cx","4.651","cy","4.651","r","4.651","transform","translate(0 12.674)","fill","#fcee21"],["id","Ellipse_308","data-name","Ellipse 308","cx","4.651","cy","4.651","r","4.651","transform","translate(0 25.349)","fill","#fcee21"],["id","Ellipse_309","data-name","Ellipse 309","cx","4.651","cy","4.651","r","4.651","transform","translate(0 38.023)","fill","#fcee21"],["id","Ellipse_310","data-name","Ellipse 310","cx","4.651","cy","4.651","r","4.651","transform","translate(0 50.697)","fill","#fcee21"],["id","Ellipse_311","data-name","Ellipse 311","cx","4.651","cy","4.651","r","4.651","transform","translate(12.937)","fill","#fcee21"],["id","Ellipse_312","data-name","Ellipse 312","cx","4.651","cy","4.651","r","4.651","transform","translate(25.873)","fill","#fcee21"],["id","Ellipse_313","data-name","Ellipse 313","cx","4.651","cy","4.651","r","4.651","transform","translate(12.937 25.349)","fill","#fcee21"],["id","Ellipse_314","data-name","Ellipse 314","cx","4.651","cy","4.651","r","4.651","transform","translate(25.873 25.349)","fill","#fcee21"],["id","Ellipse_315","data-name","Ellipse 315","cx","4.651","cy","4.651","r","4.651","transform","translate(38.809)","fill","#fcee21"],[2,"color","#ffff00","font-weight","800px","font-size","28px","font-family","Montserrat-ExtraBold, Montserrat"],[3,"ngIf"],[1,"row","pt-5"],[1,"col-12","d-flex"],[1,"col-6",2,"color","#fff000","background-color","rgba(0,0,0,0.6 )"],["href","https://quickswap.exchange/#/add/0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619/0x9A4Eb698e5DE3D3Df0a68F681789072DE1E50222",1,"hyperLinks"],["href","https://stake.unifyre.io/fidirapolyliq/info/0xae76edd1c6b5feac1938f01e3d8c66e893b33f12",1,"hyperLinks"],["href","https://puzzle.fidira.io",1,"hyperLinks"],["href","https://opensea.io/assets/0x3cd41ec039c1f2dd1f76144bb3722e7b503f50ab/499",1,"hyperLinks"],[1,"hyperLinks",3,"click"],[1,"col-6"],[1,"d-flex","justify-content-end","pt-5"],["content2",""],["content",""],[1,"pb-3"],[1,"text-center","d-flex","justify-content-center"],["onclick","location.href='https://t.me/Fidira_community_Official'"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","30px","height","30px",1,"m-3"],["x","0px","y","0px","width","30px","height","30px",0,"xlink","href","data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5QsSDQsHctVRrwAACOdJREFUSMdtl1mMXEcVhr9TVff27e5Zvc0+4y3xAhiDcRJCSCAogBGLBBF5gIfACyDxAAgEiBckXkFAxAOLhBBIICBABEEkxELKZpbghMhLYs84JvFk4nFmembc03e6771Vh4fbswRoqZdbpar/nPOf5W9559troAZrDL09hondhiOHHc45BvrBWYnbGZM7Bu2tO3bYY7XE3JAkOlFNbJ8YL53MN9tt5hoNmXl1IX/mejOcqlSi6bwInUZDyTqWdC3n8kuLzM5ltNbAiMEBiACAbnxAniFZLvvHRtxHhnfaO2o97I5jBp2VXhFqggKWSqL09di927YXb5ycqty5lvqPzl8Lp2Ze8L8ucs6CUVBEyhPrbwegCiICongPhdf65Ki5e/9+e/fYqNxaq7ENsaABVNAghO4NViKs1QSxCf12J97eODiYH+/t5a3T0/q7K7P6c1VZRqHrHyJg90xFgJTuW6FSY+D2W6ufevvb4i8PT0Q3RdZWfWEocsUXBh9Ag6KqqIKq4r3gC/CZIqrEiatsH3Z7x4fM8Sw3lZdmi/NLy2ut1dST5wCC3T3lEAyIYK0M3HFb8un3f6D61fqAGw6pkrfLSAiKiG7QUv5QQMo9I5Qrgs8FCiXulfrIqD2+ulLIuQsr51otXc2Krse7pyI0CNaa+rvf1fPpT95b+2pPnxvwacDngCkvBilPbE2ELtTm+uaeIqgXokSiqT3RsYVXV8P5C/5fhWfNisFOjkcUhchdd1bv+cS9PV8ZHHVDoQmh2OqhbBLUNWLd140NFcrAGcSAEAjBoD4Q16Noz0R8uNHoLE1PF0+JiNo3vr7C8JC78Z6P9n/hwNH4uG8GQhHAsHnpelTXvdvIUt2SMEpkBVN3mKpgAM2EEATxHWq7emp91bj2ylU5k2fxnL35WMXdcVvt3jvfUflYXDFJaGkXdB1XtyJv8Kuh9NtaxdUNprcKiWF5vsOVf+dorlTrFkHwIWAFdg66kbzjmhdn/BNuoL8yefRofGfPoBkgBbVlxsp6FomUzwiqAuqxVrF1C5UEjOCbHc6fb3H+vOfUkylLjYIPvq/Gh+9OsKEga1v8mmL7pLJvL2/dvl0OusOHazcNjdgpjJBnAcwWUNgAEyNElQichRjwBdfmlQvnU558IuXv/1zjqac7vDyX0Vu3HDlSxdsIgwc83lusCtt3urFjR9ztbnysOFatRoOELSFWBTWIDVinGOsgAihYbUcsXil47kyHBx9e5vd/bLLYyBkeiui0SzomxmMO3uBwTiHvdhoDZJ6eqh08fDA+5oaG3f7Yhh5yi65XDYJzAakAiSP4iNXljOnnCh55dJWTj6xx7kKHq/MdRkdiPvnx7QQNPHyyxUIjZ3Qk4sZ9EaIFIZjNJA0WZ31vf7/scaM77KiztqpFmZmqgo1A6pa847n0TJvHnmzy2GMpZy9mzM7mLDZyrDV8/J5tvP9EjbPnch78U4u5qxkAI8OOsVEDHtQHEEFECd5jxLuBfrPD1Wuu14mxIZQJFNWEVgv+/OAqD/ypzaWZDi++VDD7SmeD9zcf7eGLnxvkdYccDz20xv0PNHl+OgXAGpgcj6j3G/CeoN2qV8r+jsVFvuqCapfeblXagkINl170/O0fa1y61MaXJ9i5LebEiV4++5l+9k0ZfvSTFt+8b5GFxXzDqG3bKoxPWYgjaKVocIjoZnV269+l7aJZreONMTaEgE8NNWf48IfqHDoUcebZnKdOd2ilgffelXDvJ/roZPC1ry/z458ukuVb6huYHDdMTDgwQlCzpePRNSDgc7vmGgs6NzDAYanRo4XBe8UI7N1n2Huwl/ecMKw2OhReGdyVcHU25fNfWuKBPyyTF/zPa3IsZveEAfVokO7MVVQNxkKRSdFYyRfMy/N+pp3LKrbkQQwogdBWSHNc8AxsU3ZM1MiD5Ze/anPyL63/CwowOhYzsQvwAQjIRutVMEIRtLmywmVz8QV/urXml7CmKw/KuisKIesEsrSgaAn4nLRVMDPTYWklZ2Kyyv49yWtArRWmxix9gxXIlMDmNBMMREKahqXnL2SnzaWL4R8Lr8iLeEsUh+4QkHLCSPkdgkBQOmnB9dXA7W/r4Rvf2MW3vzvCB0/0Y7qNJ6lYRsYc1A2aewibvd4YBeNZWChefvpZ/5hrp/rS2TPtkzfcGG7p3V4ZkJWAljJpYzwgCllOLI533lZl95TjXe+pQaXK1HBg1y7Lb/+wyvhwxNiEBQwhbIZY1WPrjtDW9gsvypPXGuF5u3cqDnPz2fzkpDk0vq9+QIsMLdZVR3lYRAmFEDk4eiRi/6EK5B7ynKE9NW55U8RgPeKmN1e5+eaYgX7wnVJkBSByivQknDtTPP7b36x8Z2nJX7FD22MWGiyLRvbAPnlL75Drl06p68o5LxvhN0aJKooWSlFAyBXpeHoGhOO31HnLsYj+Kvh2QAUI4CLB9kUszaaL9/9s+fuPP9p6sGjnavfvqSBGmL2qM3luwxsOupviHhKKLrfIa3SWhu66Kipd4enB2YCRguAD6i0AxhhcFbKOrv3iF3Pfe+jh9AfqTWqdYPdNJagoJjL53FV9Lku1c/AAx+NeEgldBYGWfMsWqbPBP6gafA6+MBsGWguuruSZrD3yUOu7Jx9dua+dhleLrGwqJTDgIkcU075+PT9biXR1aNAcSAbiAWsVinUR8F/ya90Q3Xx2RnGxYBJYW/bX/vZ3/73Tz+b3rTaz+bQZyNoGMYLdO1Up/xM4S1I19PVpO+TFswuL4ZpBXL1idsQ1qdpYsC5gxWAorRYjZTgd2EixSSn00rS4/u/L+eOnny6+/8Jl/WGR6+JKM+X6SiBfE4w1ONnaTKGsSaOt2bnw006W/TVt8pFdQ+aOJJGpaiyD1pk+oaiKMSXPGlCknXvfzHNdaqfhyvyr4dT0TPHrRkPPqkYqWyG6UsrpZrW+RtJVKqpxxV9cXMy/NXNZ7q8lcuvkpD3W1+dvSCoynlS0T1Bp576Ztc3cYoOZhYXsmZWmP5Uk0XQU204UK1mHLbfqRnL8BySYXL3BpgMkAAAAAElFTkSuQmCC"],["href","https://t.me/Fidira_community_Official","target","__blank"],["onclick","location.href='https://twitter.com/Fidira_crypto'"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","30px","height","25px",1,"m-3","mb-3"],["x","0px","y","0px","width","30px","height","25px",0,"xlink","href","data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAZCAYAAAAmNZ4aAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5QsSDQsVgWwg5wAABuVJREFUSMdtVW2MFVcZft5zzsy9M3uXu9/sZ3fDx7Js5cPgFkuBNiUrCaRoNDHWpsWE8IfEmEYTY/SHiUZjtdFoGjXGxESNTWiCDQIqIrbSdqV1a4FSYFnKArveBfbz7v2YOXPO64+5X9w6N3PPzGTOec7zvs/zDP3sB31QLpBbJFy/YtHUq9HWShjeIGCMAxJAaxNw8ZLGT3+yAschAIC1BMcF9uwlPLHLSzc0qC92d8nRRl+sN8z55Sy9l89HR8/+s3C6p9NF+2pCdpGwlMXaIIoW1H+nLTq7sa4p7Q6GoTnJDFiLysHMYAasAcKIIRXF98ywAaCUHB55JPGL1lVqF4gBG2+sq5MeiYx8dm6ef7m0aH/ueejs63GfmcmEHX89o59Trhehszvx2b373G+5Hj9z6Wp0XEkAIAAEIsAYRnunxKaHk5i7Z6FcgtFAb68cOHjQO9rapoajvAVzaRoAGIYgJPc8nvzK/IL+QkuTWL0U0Nw/zhUPbFjnFeThQw342JD8at9ad8vafrPXkWoqCM37vgcAEkSAKwE3CXS0OSDJ6OpSaGsn+vzT/vdGHnP26SWulohKyAwwALYWqUaRyhex+K+3Ci/09yd67kyLYbl/1Edvlzzc0SrXOCS8gQHaXwy4MZvjcUAWhABcBwgDRlu7BIsI+TBATx/WP3XA/7ETwY9hy1SpOnB8Ya0FW476BxM7GGH7718OXlBNzYBQNAcAWgNSCW/n9sTXp2f0k9cm7XezWTplLTQzQWtgcJ2Hzg4HDT4/7CpqsmwBJtSo4oEBIIAJnq9Sb4/rU7/7Q/a5e3POfTE1mcDly/IMBEOQhTUMHTJ6upyRnZ9Ur2zdrE40N4tDYLtGayJFDILB/AIbCBkDUC3h2pv4UArIrmDqzbHgYCEQ9xtTBDV+oYiFrPPKpk3yyOCQ3KLzBkDMjgQ5D/XRaE+3Gu3vF1PZJZpcXuF3peNcbvRp0OHIGiZZpUgAcwzO1XqTECjkIp0vcrG7y4UUBDUzq+Xu3Y77wSVzxPfxq55OHo4MlaxE0EWABCOdEv3NaeoHiyctA2CGMTW9pBiU44kx50qfLYxBODe3YosBYuBPP9Vod+9UL6VSlhfn7fWu9sRGgGOzlkrHIBjDMBZVRgAYDKqAxkhUz54JgEAhjG4/uj1dJFiAGGrVKubMLH/w+Bbvm90dGloziLimX/W6KS0IApUBK+UtAZafl0fByGTMhXuzMK4ba0C8MbaC187lj+bn7QoJqmFZWrCsTqrUrVpD5nikOiuVnzNAwgIg3JigizcnCOVTtjQncOVKNLuShX50l/spyQKWOWZTTYU6gJhZdRv1m6pu1HEEMgv29h9P5L4TcLSgySKEgXxsRwrpRoHZu/ZNz5W5/gG53ZU2WZvXFb/UOYVKv6qSaqfE99In/Oe8PnH2b9lfBzmL4opBPhtB7d2TggBBGwMh6aU7t4JLgnCkt9fdT2DBTChpFVQbFFRvnZrrUgGEZBit7JmTud/mMwZuMhYjA1AT1wKAgCBgeAnnQFeP9+2wYDwwU8kUD/xXV64V2ke7AgZkQuGdf0d/unoLf0+0JiBE9V11f8EAgiFAOD8ent788cTXNgw5Q3rZfMSj/1fpZWtxyVol5tIRCIp2+exr2e83d4jQdSW45vMltm5WaGlyACIUA5o/frzwpZmb4btOkqCkgJBUk7tlpXO1vBWs6oaIAeECrx4zL2YyZszzAakYygGUw1AOQ37j+TQ+sTWBliaJhSUGG9zLTEfHIcANPtqsAQlBCRJUVVe9tSqYsRqcRgfj7+WOnTqZf9712EjJEIIhBFC+ls8+vQrNaYkN6xWSSYuEBzQ3OtnpDJ+emNQvK0mipVXuUMpK5hqQktepBpxAcDyFq1cKr58fyx9iGS76PsPzNDzfwPOi+PQjKIBhmRFoghAEx2H0PiS9u7N6W9tqcXhoUH5GKXKtqQ2HUviX2TJDCoJwJa5N6GOvnyt8WYpohkQ5xeSD7QJBAbQRxGuYOWjwRdpPOZs72/HExsHESNKTntEMW2vq2jgEIIggHUI+h6W33wp+eOtW+CO2IhCKALZ1gNV56sZNtmsG1OdSDbxv2zZnNSkAmmEjQhSYEgaDWZTKGX/mhIpFVNQme3uKT1y4qF+8k7HvABauKsd6qRFEJUWj4g5VLNBVHfDhyRvRSBDJ0d5u2t/aROul5DQRy/hDRQDZeAFLRkdYzs7z9fvz5i+5Ffw5jPQbhWKEhCsRReU2oBIw1bivbkBBWIDIWCvGPvxQj+lA/mZKmM2NKXdTWwvWpVIilS9a5SiYfD5anl+k63dn7ftJjy4WQzXl+wZCEIRAJeFAVBetANeyBvA/av5VcuQ3an4AAAAASUVORK5CYII="],["href","https://twitter.com/Fidira_crypto","target","__blank"],["onclick","location.href='mailto:hq@fidira.io'"],["href","mailto:hq@fidira.io","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","30px","height","30px",1,"m-3"],["x","0px","y","0px","width","30px","height","30px",0,"xlink","href","data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5QsSDQoqLhE8mwAABtFJREFUSMdtl3mMVWcZxn/vd5Z7Z4aZYRYuDDBUZhqQUSwUQ1MQ0phOxRpqKktbWtC0Cmqk1cTEVCVqqrYx1mijEVJ10oBLqzZEEbSbrWk0xmi0TTEN3irLsAwDzFJmuGf5Xv84yz134Pxzz/2W93mX53ve78izB+ZQLjdxdiTkXUt9/vbPkL7FLpMTytgYLH6Hw2tHAwaWOkxMWird4mpotvf1m496JeNWq9H+o8euDF0e84OBAcPpkYi+RSWqx6eYV3EpNwkXRuH0uWmmp5T1a9v47aG3cQFAUQARUFDVZFjSOVViC54n77x+sf94b69zO6KgwoIeWbtgvtn0yiv281FsXku3pDaU1HBiOrWrKCaZkQQjHRZJ/qmCqhBGSlub2Tp4S/mF3l5zexRZwgDCwBJF0N/vDW7eVHq+dZa9L4wEq5lFSYKhEEyKZvLIEpcSB1VBhDiGOLbt69eUvrN2tf/0rBa7IKgJ1qZrENRCUIPWWVJZv9bfv3qlt9da7QxjzeK4xqO40JheSb2MQktLs9y4Yrn//Z75crMNLZE1iGjqaTECSxiBEWXlSnfXxQvy3tMjZncU8Zd6yaQhm6a+OTEVq6VWg95ed+eWO/3nenq4OawlNaah9sXipPtVCAPo7GDV5o0tRxYudB6shaC2uDbJqil6Hlul5DuVxYvMT9atcfeVS3QFgaRL03pJVoq6A5IRM32CUGluon3VDaXvLV5kfu55Mj8MbRJtWv8k1QJhqBija+7YUP5hzwLnPVEQo1YQNK9/VpbkV3OXs/SRG4bICmItAwPu3ZVuXXHxkvvp02fiP2ZxO3d9pAXFYU7F2X3TKvfHHR1yXVgDNE1+BpoaTbA1DTg7DfVoiwRCBBtCa5vpfvcyf3NQM7GI+XO1GmCCSFuXLXWGBteXn/B9pz0MGomT11XzA1oHy05DXrlG0Cw7YQ08z7R8cEPpsSX97k+np22H85lPdDx64+ryp6JajNXMcykQKKmt5oycsUYT8JmRK415UBU0htkVZ7njmNlyvtr/Zlc3S6KwGOmMNNcR6tbqVJ5xLq5hJz86gmPg8rRWTalJPRubhiOSs1hnGMqAGoYFbfCkDnLVWOpkFCAuNtvXKGl1T4v1zjObszojWT0TBfZLoSwZQVOyFATE4LkGr93BcUHzqUxvU+Up+CJS12K00cesrsYIXqvB8wRsfS7XauMb/nvSsu8Hk0RW8FukfqS0aLWQjWuA1VEFv0nAwJN73+bNt2KckpMHYhBBRDFl+PYTE3zys2e4a8cIJ0/GeJ3ODLYWhKKYXmn0QlC8DpdzIzHb7h9l54On+ea3JjC+pFqfRmwtcCVm29ZmVt4wi4OHxlk3OMyhg9O4nT6uZ5IOmlEvk8ysv6b1UxUcB9wuh+eOTLNu8AzP/PoSy5c1s/2+FggsqlmTSLUzCIS160u8eLjCx+/v4viJK2zcdII9X7rEtFX81hm1zcmSKpgK/iwhdg3f+Oo4H7jjfxz7zxQ77uni+d/3cOttZYKazQloMnEVUcIJpaPV8OS+Lg4MLWTunBJff/QsH/rwOf79RozX5Rd6QQaepNbtNLxVDdh453m+/LVzdLR7/GjvfJ4a6mRut0M0rnmaEcFoXh4FsYQ1iCeVez/WyqsvLmTDYDsv/2mCWwZPsX9oHLfNwWvK9gheSXBnG375iyned+tZ/vDCGO9f386rL/XywK427LQSTtmCpCZkNUn/qacNAatKOBpx/RKHw8/O4ZE9FUYuBOx4YJiduy5yfFjxul28bpfhUctDu8fZuu0kZ87W+OIXKhz+TYWBAZdwNCKOiy20Ljgycaqv2tzs9Fk7Q51EUFU81yBtHgd/NclDnzvPieErzKuU2LKlDdeDZ56eYPhMjbkVn+8+Po+77y3DZHIfw+R6kQfmGGV8nKpMDPdXm5ukDnyV1oIYxW33OH4s5JHHxnnqwChRlAqBwPZ7utjzcDv9Ax52PCLWokzSEJDjCuNjWk0ibnH6bKxFrEIPrkug1wS4Dkdfn+avf4+JY+GmVS7LV/hgLeFlASlK7dV92nFhfEyrbpbShoUzQVOHwhpILWJgoMTASjfZU4sIL0eJ+optBGvsi/WTALgi2tjrtADe4Hl6nVUhnLYwFRZE18zoisVGURCa+oCYICRyjE0vcte6whTAc11ONDhPa244WyqNTC4IjSL4Pph/vF47LKWkQRsRjCMYYzBGMI5J3w3GEcSQziekMo5J9hjBCDgmfTfSMJ68JzadMvzrjfgl93dHrnyl77qS392pt4nizGR28QMnv/7kkduGT5TGhlKkc1J7ccSOntKXh342+fD/AT5OG9g/LzdxAAAAAElFTkSuQmCC"],["href","hq@fidira.io","target","__blank"],["id","thefix","onclick","window.top.location.href='http://www.google.com/';"],[1,"text-center",2,"color","#fff","font-size","13px"],["href","https://astaetc.com/",2,"color","#fff","text-decoration","none"],["id","btn-login",1,"btn-danger","btn-lg",3,"click"],["id","btn-logout",1,"btn-danger","btn-lg",3,"click"],["id","btn-logout","onclick","window.open('https://metamask.io/download')","target","_blank",1,"btn-danger","btn-lg"],["class","d-flex justify-content-center",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-center"],[4,"ngFor","ngForOf"],[2,"filter","grayscale(100%)","width","75px","height","89px",3,"src"],[2,"width","75px","height","89px",3,"src"],[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-dark",3,"click"],[1,"modal-body","text-center","mb-5","pb-5"],["class","loader pt-5",4,"ngIf"],[1,"loader","pt-5"],["disabled","","id","btn-logout",1,"btn-grey","btn-lg",3,"click"]],template:function(t,r){if(1&t){const i=Ot();H(0,"div",0),H(1,"div",1),au(),H(2,"svg",2),$e(3,"circle",3),$e(4,"circle",4),$e(5,"circle",5),$e(6,"circle",6),$e(7,"circle",7),$e(8,"circle",8),$e(9,"circle",9),$e(10,"circle",10),$e(11,"circle",11),$e(12,"circle",12),U(),lu(),H(13,"h2",13),Je(14," Fidira / ChainGuardians Puzzle Game Number 001"),U(),X(15,BG,2,0,"ng-template",14),X(16,HG,2,0,"ng-template",14),X(17,UG,2,0,"ng-template",14),U(),H(18,"div",15),H(19,"div",16),H(20,"div",17),H(21,"div"),Je(22," Lolita Puzzle Game pool"),$e(23,"br"),Je(24," Stake FID + ETH our liquidity pool on quickswap "),H(25,"a",18),Je(26,"here."),U(),$e(27,"br"),$e(28,"br"),Je(29," Quickswap will send you LP tokens, though you probably won\u2019t see them in your wallet without adding them as a custom token"),$e(30,"br"),Je(31," 0x497f87686d51556510a1edaa73a7809bb1bd5356."),$e(32,"br"),$e(33,"br"),Je(34," Once you have your LP tokens, simply farm them in our Puzzle Game pool "),H(35,"a",19),Je(36,"here."),U(),$e(37,"br"),$e(38,"br"),Je(39," You will have one month to contribute to the LP farming pool, and the pool will run for 60 days. "),$e(40,"br"),$e(41,"br"),Je(42," Every second day, farmers in the pool will receive one puzzle piece for every 5 LP tokens in the pool. For farmers with less than 5 LP tokens, you will receive 1-4 puzzle pieces (1 for every LP token in the pool) every 5th day. Farmers can connect their wallet on "),H(43,"a",20),Je(44,"https://puzzle.fidira.io."),U(),$e(45,"br"),$e(46,"br"),Je(47," The first person to collect all the puzzle pieces will win the original Lolita! View her "),H(48,"a",21),Je(49,"here."),U(),$e(50,"br"),Je(51," To check your progress, simply come back to this "),H(52,"a",20),Je(53,"page"),U(),Je(54,", connect your wallet and click "),H(55,"span",22),He("click",function(){wt(i);const s=Kn(71);return r.scan(s)}),Je(56,"Scan"),U(),Je(57," to see your pieces revealed. Good luck! "),$e(58,"br"),$e(59,"br"),Je(60," Legendary - Lolita Lee has a past which has seen her suffer more than any other ChainGuardian. She might look petite and innocent, but she certainly packs a punch! Her side-kick isn\u2019t all cute either! "),$e(61,"br"),$e(62,"br"),U(),U(),H(63,"div",23),X(64,GG,1,1,"ng-template",14),X(65,KG,1,1,"ng-template",14),U(),U(),U(),H(66,"div",0),H(67,"div",24),X(68,YG,14,0,"ng-template",null,25,Qn),X(70,ZG,12,2,"ng-template",null,26,Qn),X(72,XG,2,0,"ng-template",14),X(73,ez,2,0,"ng-template",14),X(74,tz,2,0,"ng-template",14),U(),U(),U(),H(75,"footer",27),H(76,"div",28),H(77,"div",29),au(),H(78,"svg",30),$e(79,"image",31),$e(80,"a",32),U(),U(),lu(),H(81,"div",33),au(),H(82,"svg",34),$e(83,"image",35),$e(84,"a",36),U(),U(),lu(),H(85,"div",37),au(),H(86,"svg",38),$e(87,"image",39),$e(88,"a",40),$e(89,"g",41),U(),U(),U(),lu(),H(90,"div",42),Je(91,"\xa9 2021 FIDIRA.IO | "),H(92,"a",43),Je(93,"POWERED BY ASTA ETC"),U(),Je(94," | FIND YOUR GROWTH PARTNER "),U(),U()}2&t&&(Z(15),K("ngIf",!r.walletConnection&&r.metamask),Z(1),K("ngIf",r.walletConnection),Z(1),K("ngIf",!r.metamask),Z(47),K("ngIf",!r.scanned),Z(1),K("ngIf",r.scanned),Z(7),K("ngIf",!r.complete&&r.walletConnection&&!r.scanning),Z(1),K("ngIf",!r.complete&&r.walletConnection&&r.scanning),Z(1),K("ngIf",r.walletConnection))},directives:[$r,ci],styles:['.loader[_ngcontent-%COMP%]{display:inline-block;width:40px;height:40px;position:absolute;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;transform:translateY(-50%)}.loader[_ngcontent-%COMP%]:after{content:"";display:block;width:60px;height:60px;border-radius:50%;border:5px solid #000000;border-color:#000000 transparent #000000 transparent;animation:loader 1.2s linear infinite}@keyframes loader{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.hyperLinks[_ngcontent-%COMP%]{font-size:17px;font-weight:bold;text-decoration:underline;color:#fff000}']}),n})()},{path:"**",pathMatch:"full",redirectTo:""}];let iz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n}),n.\u0275inj=St({imports:[[QM.forRoot(rz)],QM]}),n})(),oz=(()=>{class n{constructor(){this.title="nftPuzzle"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Dn({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(t,r){1&t&&$e(0,"router-outlet")},directives:[N1],styles:[""]}),n})(),sz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=tn({type:n,bootstrap:[oz]}),n.\u0275inj=St({providers:[],imports:[[C8,iz,O2,J9]]}),n})();(function(){if(uC)throw new Error("Cannot enable prod mode after platform setup.");lC=!1})(),w8().bootstrapModule(sz).catch(n=>console.error(n))},601:()=>{},804:at=>{"use strict";at.exports=JSON.parse('[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_proxyRegistryAddress","type":"address"},{"internalType":"string","name":"_templateURI","type":"string"},{"internalType":"address","name":"_migrationAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":true,"internalType":"address","name":"_creator","type":"address"}],"name":"CreatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addSharedProxyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"}],"name":"batchBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"creator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"isPermanentURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct AssetContractShared.Ownership[]","name":"_ownerships","type":"tuple[]"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrationTarget","outputs":[{"internalType":"contract AssetContractShared","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openSeaVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeSharedProxyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"setCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setPermanentURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setProxyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setTemplateURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sharedProxyAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supportsFactoryInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"templateURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]')},87:at=>{"use strict";at.exports=JSON.parse('[{"tokenID":"79602859700261064622221784183717196215401761789492457451302215245849975424672","piece":"1"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215246949487052448","piece":"2"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215248048998680224","piece":"3"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215249148510308000","piece":"4"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215250248021935776","piece":"5"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215251347533563552","piece":"6"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215252447045191328","piece":"7"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215253546556819104","piece":"8"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215254646068446880","piece":"9"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215255745580074656","piece":"10"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215256845091702432","piece":"11"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215257944603330208","piece":"12"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215259044114957984","piece":"13"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215260143626585760","piece":"14"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215261243138213536","piece":"15"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215262342649841312","piece":"16"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215263442161469088","piece":"17"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215264541673096864","piece":"18"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215265641184724640","piece":"19"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215266740696352416","piece":"20"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215267840207980192","piece":"21"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215268939719607968","piece":"22"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215270039231235744","piece":"23"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215271138742863520","piece":"24"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215272238254491296","piece":"25"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215273337766119072","piece":"26"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215274437277746848","piece":"27"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215275536789374624","piece":"28"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215276636301002400","piece":"29"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215277735812630176","piece":"30"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215278835324257952","piece":"31"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215279934835885728","piece":"32"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215281034347513504","piece":"33"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215282133859141280","piece":"34"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215283233370769056","piece":"35"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215284332882396832","piece":"36"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215285432394024608","piece":"37"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215286531905652384","piece":"38"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215287631417280160","piece":"39"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215288730928907936","piece":"40"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215289830440535712","piece":"41"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215290929952163488","piece":"42"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215292029463791264","piece":"43"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215293128975419040","piece":"44"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215294228487046816","piece":"45"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215295327998674592","piece":"46"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215296427510302368","piece":"47"},{"tokenID":"79602859700261064622221784183717196215401761789492457451302215297527021930144","piece":"48"}]')}},at=>{at(at.s=75)}]);