@elizaos/client 1.6.3-alpha.2 → 1.6.3-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var kC=Object.defineProperty;var i=(e,t)=>kC(e,"name",{value:t,configurable:!0});var AC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);import{g as Xo,j,S as ys,r as J,R as B_,a as z_,T as U_,P as F_,C as Sf,b as $_,X as Zr,O as Mf,c as Ef,D as kf,d as jC,e as NC,f as IC,h as CC,i as V_,k as OC,l as Z_,m as H_,L as ev,n as tv,o as G_,p as RC,V as TC,G as PC,q as J_,I as DC,s as Ji,t as LC,u as K_,v as BC,w as q_,x as zC,y as Mn,z as UC,A as X_,B as W_,E as Q_,F as Y_,H as e5,J as Nr,K as FC,M as $C,N as VC,Q as ZC,U as HC,W as GC,Y as JC,Z as KC,_ as qC,$ as t5,a0 as r5,a1 as i5,a2 as n5,a3 as a5,a4 as s5,a5 as ci,a6 as XC,a7 as WC,a8 as o5,a9 as l5,aa as QC,ab as u5,ac as Ar,ad as rv,ae as Wo,af as f5,ag as c5,ah as YC,ai as eO,aj as iv,ak as d5,al as tO,am as rO,an as h5,ao as iO,ap as ga,aq as Jc,ar as vn,as as zi,at as Cy,au as _a,av as nO,aw as Ui,ax as jr,ay as xr,az as p5,aA as m5,aB as g5,aC as v5,aD as b5,aE as Qr,aF as Af,aG as aO,aH as sO,aI as oO,aJ as jf,aK as Nf,aL as oo,aM as Sa,aN as Bn,aO as Oy,aP as lO,aQ as Qo,aR as If,aS as yo,aT as uO,aU as Ry,aV as fO,aW as y5,aX as cO,aY as w5,aZ as x5,a_ as _5,a$ as S5,b0 as M5,b1 as dO,b2 as nv,b3 as Gm,b4 as E5,b5 as hO,b6 as $u,b7 as av,b8 as k5,b9 as pO,ba as ws,bb as us,bc as sv,bd as Yo,be as Vu,bf as mO,bg as A5,bh as gO,bi as ov,bj as wo,bk as ei,bl as vO,bm as bO,bn as Tn,bo as Kc,bp as yO,bq as lo,br as Wa,bs as wO,bt as xO,bu as _O,bv as SO,bw as MO,bx as EO,by as lv,bz as kO,bA as AO,bB as jO,bC as uv,bD as fv,bE as NO,bF as j5,bG as Jm,bH as IO,bI as N5,bJ as CO,bK as OO,bL as RO,bM as TO,bN as PO,bO as DO,bP as LO,bQ as BO,bR as zO,bS as I5,bT as C5,bU as O5,bV as R5,bW as UO,bX as FO,bY as $O,bZ as Km,b_ as VO,b$ as ZO,c0 as Cf,c1 as HO,c2 as T5,c3 as GO,c4 as JO,c5 as qc,c6 as Ty,c7 as Py,c8 as KO,c9 as cv,ca as qO,cb as XO,cc as WO,cd as QO,ce as YO,cf as eR,cg as tR,ch as rR,ci as iR,cj as nR,ck as mi,cl as aR}from"./react-vendor-DPGVcrXi.js";import{r as Hn}from"./main-BtcZiEuQ.js";import"./ui-vendor-B7JxFfFk.js";var ire=AC(Yg=>{function P5(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=P5(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}i(P5,"r");function dv(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=P5(e))&&(a&&(a+=" "),a+=t);return a}i(dv,"clsx");const Dy=i(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),Ly=dv,kn=i((e,t)=>r=>{var a;if(t?.variants==null)return Ly(e,r?.class,r?.className);const{variants:n,defaultVariants:s}=t,o=Object.keys(n).map(v=>{const c=r?.[v],d=s?.[v];if(c===null)return null;const y=Dy(c)||Dy(d);return n[v][y]}),h=r&&Object.entries(r).reduce((v,c)=>{let[d,y]=c;return y===void 0||(v[d]=y),v},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((v,c)=>{let{class:d,className:y,...b}=c;return Object.entries(b).every(x=>{let[k,N]=x;return Array.isArray(N)?N.includes({...s,...h}[k]):{...s,...h}[k]===N})?[...v,d,y]:v},[]);return Ly(e,o,m,r?.class,r?.className)},"cva"),es="user",jl="client_chat",uo="client_group_chat",xo=512;var Su=(e=>(e.REQUIRED="required",e.OPTIONAL="optional",e))(Su||{});const Za={name:"required",username:"optional",system:"required","settings.voice.model":"optional",bio:"optional",topics:"optional",adjectives:"optional","style.all":"optional","style.chat":"optional","style.post":"optional"};var Mu={exports:{}},sR=Mu.exports,By;function oR(){return By||(By=1,(function(e,t){(function(r,a){e.exports=a()})(sR,(function(){var r=1e3,a=6e4,n=36e5,s="millisecond",o="second",h="minute",m="hour",v="day",c="week",d="month",y="quarter",b="year",x="date",k="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(l){var g=["th","st","nd","rd"],w=l%100;return"["+l+(g[(w-20)%10]||g[w]||g[0])+"]"},"ordinal")},R=i(function(l,g,w){var M=String(l);return!M||M.length>=g?l:""+Array(g+1-M.length).join(w)+l},"m"),T={s:R,z:i(function(l){var g=-l.utcOffset(),w=Math.abs(g),M=Math.floor(w/60),A=w%60;return(g<=0?"+":"-")+R(M,2,"0")+":"+R(A,2,"0")},"z"),m:i(function l(g,w){if(g.date()<w.date())return-l(w,g);var M=12*(w.year()-g.year())+(w.month()-g.month()),A=g.clone().add(M,d),S=w-A<0,f=g.clone().add(M+(S?-1:1),d);return+(-(M+(w-A)/(S?A-f:f-A))||0)},"t2"),a:i(function(l){return l<0?Math.ceil(l)||0:Math.floor(l)},"a"),p:i(function(l){return{M:d,y:b,w:c,d:v,D:x,h:m,m:h,s:o,ms:s,Q:y}[l]||String(l||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(l){return l===void 0},"u")},P="en",B={};B[P]=O;var Z="$isDayjsObject",H=i(function(l){return l instanceof u||!(!l||!l[Z])},"S"),ee=i(function l(g,w,M){var A;if(!g)return P;if(typeof g=="string"){var S=g.toLowerCase();B[S]&&(A=S),w&&(B[S]=w,A=S);var f=g.split("-");if(!A&&f.length>1)return l(f[0])}else{var _=g.name;B[_]=g,A=_}return!M&&A&&(P=A),A||!M&&P},"t2"),$=i(function(l,g){if(H(l))return l.clone();var w=typeof g=="object"?g:{};return w.date=l,w.args=arguments,new u(w)},"O"),F=T;F.l=ee,F.i=H,F.w=function(l,g){return $(l,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var u=(function(){function l(w){this.$L=ee(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[Z]=!0}i(l,"M2");var g=l.prototype;return g.parse=function(w){this.$d=(function(M){var A=M.date,S=M.utc;if(A===null)return new Date(NaN);if(F.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var f=A.match(N);if(f){var _=f[2]-1||0,E=(f[7]||"0").substring(0,3);return S?new Date(Date.UTC(f[1],_,f[3]||1,f[4]||0,f[5]||0,f[6]||0,E)):new Date(f[1],_,f[3]||1,f[4]||0,f[5]||0,f[6]||0,E)}}return new Date(A)})(w),this.init()},g.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},g.$utils=function(){return F},g.isValid=function(){return this.$d.toString()!==k},g.isSame=function(w,M){var A=$(w);return this.startOf(M)<=A&&A<=this.endOf(M)},g.isAfter=function(w,M){return $(w)<this.startOf(M)},g.isBefore=function(w,M){return this.endOf(M)<$(w)},g.$g=function(w,M,A){return F.u(w)?this[M]:this.set(A,w)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(w,M){var A=this,S=!!F.u(M)||M,f=F.p(w),_=i(function(G,q){var _e=F.w(A.$u?Date.UTC(A.$y,q,G):new Date(A.$y,q,G),A);return S?_e:_e.endOf(v)},"l2"),E=i(function(G,q){return F.w(A.toDate()[G].apply(A.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(q)),A)},"$2"),I=this.$W,D=this.$M,L=this.$D,U="set"+(this.$u?"UTC":"");switch(f){case b:return S?_(1,0):_(31,11);case d:return S?_(1,D):_(0,D+1);case c:var z=this.$locale().weekStart||0,V=(I<z?I+7:I)-z;return _(S?L-V:L+(6-V),D);case v:case x:return E(U+"Hours",0);case m:return E(U+"Minutes",1);case h:return E(U+"Seconds",2);case o:return E(U+"Milliseconds",3);default:return this.clone()}},g.endOf=function(w){return this.startOf(w,!1)},g.$set=function(w,M){var A,S=F.p(w),f="set"+(this.$u?"UTC":""),_=(A={},A[v]=f+"Date",A[x]=f+"Date",A[d]=f+"Month",A[b]=f+"FullYear",A[m]=f+"Hours",A[h]=f+"Minutes",A[o]=f+"Seconds",A[s]=f+"Milliseconds",A)[S],E=S===v?this.$D+(M-this.$W):M;if(S===d||S===b){var I=this.clone().set(x,1);I.$d[_](E),I.init(),this.$d=I.set(x,Math.min(this.$D,I.daysInMonth())).$d}else _&&this.$d[_](E);return this.init(),this},g.set=function(w,M){return this.clone().$set(w,M)},g.get=function(w){return this[F.p(w)]()},g.add=function(w,M){var A,S=this;w=Number(w);var f=F.p(M),_=i(function(D){var L=$(S);return F.w(L.date(L.date()+Math.round(D*w)),S)},"y2");if(f===d)return this.set(d,this.$M+w);if(f===b)return this.set(b,this.$y+w);if(f===v)return _(1);if(f===c)return _(7);var E=(A={},A[h]=a,A[m]=n,A[o]=r,A)[f]||1,I=this.$d.getTime()+w*E;return F.w(I,this)},g.subtract=function(w,M){return this.add(-1*w,M)},g.format=function(w){var M=this,A=this.$locale();if(!this.isValid())return A.invalidDate||k;var S=w||"YYYY-MM-DDTHH:mm:ssZ",f=F.z(this),_=this.$H,E=this.$m,I=this.$M,D=A.weekdays,L=A.months,U=A.meridiem,z=i(function(q,_e,ae,se){return q&&(q[_e]||q(M,S))||ae[_e].slice(0,se)},"h2"),V=i(function(q){return F.s(_%12||12,q,"0")},"d2"),G=U||function(q,_e,ae){var se=q<12?"AM":"PM";return ae?se.toLowerCase():se};return S.replace(C,(function(q,_e){return _e||(function(ae){switch(ae){case"YY":return String(M.$y).slice(-2);case"YYYY":return F.s(M.$y,4,"0");case"M":return I+1;case"MM":return F.s(I+1,2,"0");case"MMM":return z(A.monthsShort,I,L,3);case"MMMM":return z(L,I);case"D":return M.$D;case"DD":return F.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return z(A.weekdaysMin,M.$W,D,2);case"ddd":return z(A.weekdaysShort,M.$W,D,3);case"dddd":return D[M.$W];case"H":return String(_);case"HH":return F.s(_,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(_,E,!0);case"A":return G(_,E,!1);case"m":return String(E);case"mm":return F.s(E,2,"0");case"s":return String(M.$s);case"ss":return F.s(M.$s,2,"0");case"SSS":return F.s(M.$ms,3,"0");case"Z":return f}return null})(q)||f.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(w,M,A){var S,f=this,_=F.p(M),E=$(w),I=(E.utcOffset()-this.utcOffset())*a,D=this-E,L=i(function(){return F.m(f,E)},"D2");switch(_){case b:S=L()/12;break;case d:S=L();break;case y:S=L()/3;break;case c:S=(D-I)/6048e5;break;case v:S=(D-I)/864e5;break;case m:S=D/n;break;case h:S=D/a;break;case o:S=D/r;break;default:S=D}return A?S:F.a(S)},g.daysInMonth=function(){return this.endOf(d).$D},g.$locale=function(){return B[this.$L]},g.locale=function(w,M){if(!w)return this.$L;var A=this.clone(),S=ee(w,M,!0);return S&&(A.$L=S),A},g.clone=function(){return F.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},l})(),p=u.prototype;return $.prototype=p,[["$ms",s],["$s",o],["$m",h],["$H",m],["$W",v],["$M",d],["$y",b],["$D",x]].forEach((function(l){p[l[1]]=function(g){return this.$g(g,l[0],l[1])}})),$.extend=function(l,g){return l.$i||(l(g,u,$),l.$i=!0),$},$.locale=ee,$.isDayjs=H,$.unix=function(l){return $(1e3*l)},$.en=B[P],$.Ls=B,$.p={},$}))})(Mu)),Mu.exports}i(oR,"requireDayjs_min");var lR=oR();const D5=Xo(lR);var Eu={exports:{}},uR=Eu.exports,zy;function fR(){return zy||(zy=1,(function(e,t){(function(r,a){e.exports=a()})(uR,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(a,n,s){var o=n.prototype,h=o.format;s.en.formats=r,o.format=function(m){m===void 0&&(m="YYYY-MM-DDTHH:mm:ssZ");var v=this.$locale().formats,c=(function(d,y){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(b,x,k){var N=k&&k.toUpperCase();return x||y[k]||r[k]||y[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(C,O,R){return O||R.slice(1)}))}))})(m,v===void 0?{}:v);return h.call(this,c)}}}))})(Eu)),Eu.exports}i(fR,"requireLocalizedFormat");var cR=fR();const dR=Xo(cR),hv="-",hR=i(e=>{const t=mR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i(o=>{const h=o.split(hv);return h[0]===""&&h.length!==1&&h.shift(),L5(h,t)||pR(o)},"getClassGroupId"),getConflictingClassGroupIds:i((o,h)=>{const m=r[o]||[];return h&&a[o]?[...m,...a[o]]:m},"getConflictingClassGroupIds")}},"createClassGroupUtils"),L5=i((e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),n=a?L5(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(hv);return t.validators.find(({validator:o})=>o(s))?.classGroupId},"getGroupRecursive"),Uy=/^\[(.+)\]$/,pR=i(e=>{if(Uy.test(e)){const t=Uy.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},"getGroupIdForArbitraryProperty"),mR=i(e=>{const{theme:t,classGroups:r}=e,a={nextPart:new Map,validators:[]};for(const n in r)qm(r[n],a,n,t);return a},"createClassMap"),qm=i((e,t,r,a)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:Fy(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(gR(n)){qm(n(a),t,r,a);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,o])=>{qm(o,Fy(t,s),r,a)})})},"processClassesRecursively"),Fy=i((e,t)=>{let r=e;return t.split(hv).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},"getPart"),gR=i(e=>e.isThemeGetter,"isThemeGetter"),vR=i(e=>{if(e<1)return{get:i(()=>{},"get"),set:i(()=>{},"set")};let t=0,r=new Map,a=new Map;const n=i((s,o)=>{r.set(s,o),t++,t>e&&(t=0,a=r,r=new Map)},"update");return{get(s){let o=r.get(s);if(o!==void 0)return o;if((o=a.get(s))!==void 0)return n(s,o),o},set(s,o){r.has(s)?r.set(s,o):n(s,o)}}},"createLruCache"),Xm="!",Wm=":",bR=Wm.length,yR=i(e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=i(n=>{const s=[];let o=0,h=0,m=0,v;for(let x=0;x<n.length;x++){let k=n[x];if(o===0&&h===0){if(k===Wm){s.push(n.slice(m,x)),m=x+bR;continue}if(k==="/"){v=x;continue}}k==="["?o++:k==="]"?o--:k==="("?h++:k===")"&&h--}const c=s.length===0?n:n.substring(m),d=wR(c),y=d!==c,b=v&&v>m?v-m:void 0;return{modifiers:s,hasImportantModifier:y,baseClassName:d,maybePostfixModifierPosition:b}},"parseClassName");if(t){const n=t+Wm,s=a;a=i(o=>o.startsWith(n)?s(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0},"parseClassName")}if(r){const n=a;a=i(s=>r({className:s,parseClassName:n}),"parseClassName")}return a},"createParseClassName"),wR=i(e=>e.endsWith(Xm)?e.substring(0,e.length-1):e.startsWith(Xm)?e.substring(1):e,"stripImportantModifier"),xR=i(e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return i(a=>{if(a.length<=1)return a;const n=[];let s=[];return a.forEach(o=>{o[0]==="["||t[o]?(n.push(...s.sort(),o),s=[]):s.push(o)}),n.push(...s.sort()),n},"sortModifiers")},"createSortModifiers"),_R=i(e=>({cache:vR(e.cacheSize),parseClassName:yR(e),sortModifiers:xR(e),...hR(e)}),"createConfigUtils"),SR=/\s+/,MR=i((e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:s}=t,o=[],h=e.trim().split(SR);let m="";for(let v=h.length-1;v>=0;v-=1){const c=h[v],{isExternal:d,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:k}=r(c);if(d){m=c+(m.length>0?" "+m:m);continue}let N=!!k,C=a(N?x.substring(0,k):x);if(!C){if(!N){m=c+(m.length>0?" "+m:m);continue}if(C=a(x),!C){m=c+(m.length>0?" "+m:m);continue}N=!1}const O=s(y).join(":"),R=b?O+Xm:O,T=R+C;if(o.includes(T))continue;o.push(T);const P=n(C,N);for(let B=0;B<P.length;++B){const Z=P[B];o.push(R+Z)}m=c+(m.length>0?" "+m:m)}return m},"mergeClassList");function ER(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=B5(t))&&(a&&(a+=" "),a+=r);return a}i(ER,"twJoin");const B5=i(e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=B5(e[a]))&&(r&&(r+=" "),r+=t);return r},"toValue");function kR(e,...t){let r,a,n,s=o;function o(m){const v=t.reduce((c,d)=>d(c),e());return r=_R(v),a=r.cache.get,n=r.cache.set,s=h,h(m)}i(o,"initTailwindMerge");function h(m){const v=a(m);if(v)return v;const c=MR(m,r);return n(m,c),c}return i(h,"tailwindMerge"),i(function(){return s(ER.apply(null,arguments))},"callTailwindMerge")}i(kR,"createTailwindMerge");const vr=i(e=>{const t=i(r=>r[e]||[],"themeGetter");return t.isThemeGetter=!0,t},"fromTheme"),z5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AR=/^\d+\/\d+$/,jR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,CR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=i(e=>AR.test(e),"isFraction"),Lt=i(e=>!!e&&!Number.isNaN(Number(e)),"isNumber"),In=i(e=>!!e&&Number.isInteger(Number(e)),"isInteger"),Xc=i(e=>e.endsWith("%")&&Lt(e.slice(0,-1)),"isPercent"),nn=i(e=>jR.test(e),"isTshirtSize"),RR=i(()=>!0,"isAny"),TR=i(e=>NR.test(e)&&!IR.test(e),"isLengthOnly"),F5=i(()=>!1,"isNever"),PR=i(e=>CR.test(e),"isShadow"),DR=i(e=>OR.test(e),"isImage"),LR=i(e=>!pt(e)&&!mt(e),"isAnyNonArbitrary"),BR=i(e=>xs(e,Z5,F5),"isArbitrarySize"),pt=i(e=>z5.test(e),"isArbitraryValue"),Wn=i(e=>xs(e,H5,TR),"isArbitraryLength"),Wc=i(e=>xs(e,VR,Lt),"isArbitraryNumber"),$y=i(e=>xs(e,$5,F5),"isArbitraryPosition"),zR=i(e=>xs(e,V5,DR),"isArbitraryImage"),Nl=i(e=>xs(e,G5,PR),"isArbitraryShadow"),mt=i(e=>U5.test(e),"isArbitraryVariable"),Rs=i(e=>_s(e,H5),"isArbitraryVariableLength"),UR=i(e=>_s(e,ZR),"isArbitraryVariableFamilyName"),Vy=i(e=>_s(e,$5),"isArbitraryVariablePosition"),FR=i(e=>_s(e,Z5),"isArbitraryVariableSize"),$R=i(e=>_s(e,V5),"isArbitraryVariableImage"),Il=i(e=>_s(e,G5,!0),"isArbitraryVariableShadow"),xs=i((e,t,r)=>{const a=z5.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},"getIsArbitraryValue"),_s=i((e,t,r=!1)=>{const a=U5.exec(e);return a?a[1]?t(a[1]):r:!1},"getIsArbitraryVariable"),$5=i(e=>e==="position"||e==="percentage","isLabelPosition"),V5=i(e=>e==="image"||e==="url","isLabelImage"),Z5=i(e=>e==="length"||e==="size"||e==="bg-size","isLabelSize"),H5=i(e=>e==="length","isLabelLength"),VR=i(e=>e==="number","isLabelNumber"),ZR=i(e=>e==="family-name","isLabelFamilyName"),G5=i(e=>e==="shadow","isLabelShadow"),HR=i(()=>{const e=vr("color"),t=vr("font"),r=vr("text"),a=vr("font-weight"),n=vr("tracking"),s=vr("leading"),o=vr("breakpoint"),h=vr("container"),m=vr("spacing"),v=vr("radius"),c=vr("shadow"),d=vr("inset-shadow"),y=vr("text-shadow"),b=vr("drop-shadow"),x=vr("blur"),k=vr("perspective"),N=vr("aspect"),C=vr("ease"),O=vr("animate"),R=i(()=>["auto","avoid","all","avoid-page","page","left","right","column"],"scaleBreak"),T=i(()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],"scalePosition"),P=i(()=>[...T(),mt,pt],"scalePositionWithArbitrary"),B=i(()=>["auto","hidden","clip","visible","scroll"],"scaleOverflow"),Z=i(()=>["auto","contain","none"],"scaleOverscroll"),H=i(()=>[mt,pt,m],"scaleUnambiguousSpacing"),ee=i(()=>[Ha,"full","auto",...H()],"scaleInset"),$=i(()=>[In,"none","subgrid",mt,pt],"scaleGridTemplateColsRows"),F=i(()=>["auto",{span:["full",In,mt,pt]},In,mt,pt],"scaleGridColRowStartAndEnd"),u=i(()=>[In,"auto",mt,pt],"scaleGridColRowStartOrEnd"),p=i(()=>["auto","min","max","fr",mt,pt],"scaleGridAutoColsRows"),l=i(()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],"scaleAlignPrimaryAxis"),g=i(()=>["start","end","center","stretch","center-safe","end-safe"],"scaleAlignSecondaryAxis"),w=i(()=>["auto",...H()],"scaleMargin"),M=i(()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],"scaleSizing"),A=i(()=>[e,mt,pt],"scaleColor"),S=i(()=>[...T(),Vy,$y,{position:[mt,pt]}],"scaleBgPosition"),f=i(()=>["no-repeat",{repeat:["","x","y","space","round"]}],"scaleBgRepeat"),_=i(()=>["auto","cover","contain",FR,BR,{size:[mt,pt]}],"scaleBgSize"),E=i(()=>[Xc,Rs,Wn],"scaleGradientStopPosition"),I=i(()=>["","none","full",v,mt,pt],"scaleRadius"),D=i(()=>["",Lt,Rs,Wn],"scaleBorderWidth"),L=i(()=>["solid","dashed","dotted","double"],"scaleLineStyle"),U=i(()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],"scaleBlendMode"),z=i(()=>[Lt,Xc,Vy,$y],"scaleMaskImagePosition"),V=i(()=>["","none",x,mt,pt],"scaleBlur"),G=i(()=>["none",Lt,mt,pt],"scaleRotate"),q=i(()=>["none",Lt,mt,pt],"scaleScale"),_e=i(()=>[Lt,mt,pt],"scaleSkew"),ae=i(()=>[Ha,"full",...H()],"scaleTranslate");return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nn],breakpoint:[nn],color:[RR],container:[nn],"drop-shadow":[nn],ease:["in","out","in-out"],font:[LR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nn],shadow:[nn],spacing:["px",Lt],text:[nn],"text-shadow":[nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,pt,mt,N]}],container:["container"],columns:[{columns:[Lt,pt,mt,h]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[In,"auto",mt,pt]}],basis:[{basis:[Ha,"full","auto",h,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Lt,Ha,"auto","initial","none",pt]}],grow:[{grow:["",Lt,mt,pt]}],shrink:[{shrink:["",Lt,mt,pt]}],order:[{order:[In,"first","last","none",mt,pt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":u()}],"col-end":[{"col-end":u()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":u()}],"row-end":[{"row-end":u()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":p()}],"auto-rows":[{"auto-rows":p()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...l(),"normal"]}],"justify-items":[{"justify-items":[...g(),"normal"]}],"justify-self":[{"justify-self":["auto",...g()]}],"align-content":[{content:["normal",...l()]}],"align-items":[{items:[...g(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...g(),{baseline:["","last"]}]}],"place-content":[{"place-content":l()}],"place-items":[{"place-items":[...g(),"baseline"]}],"place-self":[{"place-self":["auto",...g()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[h,"screen",...M()]}],"min-w":[{"min-w":[h,"screen","none",...M()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[o]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",r,Rs,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,mt,Wc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xc,pt]}],"font-family":[{font:[UR,pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,mt,pt]}],"line-clamp":[{"line-clamp":[Lt,"none",mt,Wc]}],leading:[{leading:[s,...H()]}],"list-image":[{"list-image":["none",mt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[Lt,"from-font","auto",mt,Wn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Lt,"auto",mt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:f()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},In,mt,pt],radial:["",mt,pt],conic:[In,mt,pt]},$R,zR]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Lt,mt,pt]}],"outline-w":[{outline:["",Lt,Rs,Wn]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,Il,Nl]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Il,Nl]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Lt,Wn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",y,Il,Nl]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Lt,mt,pt]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[mt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:f()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,pt]}],filter:[{filter:["","none",mt,pt]}],blur:[{blur:V()}],brightness:[{brightness:[Lt,mt,pt]}],contrast:[{contrast:[Lt,mt,pt]}],"drop-shadow":[{"drop-shadow":["","none",b,Il,Nl]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Lt,mt,pt]}],"hue-rotate":[{"hue-rotate":[Lt,mt,pt]}],invert:[{invert:["",Lt,mt,pt]}],saturate:[{saturate:[Lt,mt,pt]}],sepia:[{sepia:["",Lt,mt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,pt]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[Lt,mt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Lt,mt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Lt,mt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Lt,mt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Lt,mt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Lt,mt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Lt,mt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Lt,mt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Lt,"initial",mt,pt]}],ease:[{ease:["linear","initial",C,mt,pt]}],delay:[{delay:[Lt,mt,pt]}],animate:[{animate:["none",O,mt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,mt,pt]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[mt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mt,pt]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Lt,Rs,Wn,Wc]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},"getDefaultConfig"),GR=kR(HR);function Le(...e){return GR(dv(e))}i(Le,"cn");D5.extend(dR);const va=D5,Ma=i(e=>e.substring(0,2),"formatAgentName");function yn(){return URL.createObjectURL(new Blob).split("/").pop()}i(yn,"randomUUID");function Ea(){const e="elizaos-client-user-id",t=localStorage.getItem(e);if(t)return t;const r=yn();return localStorage.setItem(e,r),r}i(Ea,"getEntityId");const J5=i((e,t=xo,r=.8)=>new Promise((a,n)=>{const s=new FileReader;s.onload=o=>{if(o.target?.result){const h=new Image;h.src=o.target.result,h.onload=()=>{const m=document.createElement("canvas");let v=h.width,c=h.height;v>c?v>t&&(c*=t/v,v=t):c>t&&(v*=t/c,c=t),m.width=v,m.height=c,m.getContext("2d")?.drawImage(h,0,0,v,c);const y=m.toDataURL("image/jpeg",r);a(y)},h.onerror=n}},s.onerror=n,s.readAsDataURL(e)}),"compressImage"),Zy=["/images/agents/agent1.png","/images/agents/agent2.png","/images/agents/agent3.png","/images/agents/agent4.png","/images/agents/agent5.png"],_o=i(e=>{if(e?.settings?.avatar)return e.settings.avatar;if(e?.id){let t=0;for(let a=0;a<e.id.length;a++){const n=e.id.charCodeAt(a);t=(t<<5)-t+n,t|=0}const r=Math.abs(t)%Zy.length;return Zy[r]}return"/elizaos-icon.png"},"getAgentAvatar"),pv=i((e,t,r)=>{if(e?.name&&e.name.trim()!=="")return e.name;if(t&&t.length>0){const a=t.filter(n=>n.id!==r&&n.name);if(a.length===0&&t.some(n=>n.id===r&&n.name)){const n=t.find(s=>s.id===r);return n&&n.name||"Unnamed Group"}if(a.length>0)return a.map(n=>n.name).slice(0,3).join(", ")+(a.length>3?"...":"")}return"Unnamed Group"},"generateGroupName"),mv=kn("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-red-800 text-white shadow-xs hover:bg-red-600 focus-visible:ring-red-400/20 dark:focus-visible:ring-red-500",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-auto w-auto"}},defaultVariants:{variant:"default",size:"default"}});function et({className:e,variant:t,size:r,asChild:a=!1,...n}){const s=a?ys:"button";return j.jsx(s,{"data-slot":"button",className:Le(mv({variant:t,size:r,className:e})),...n})}i(et,"Button$1");const hr=J.forwardRef(({className:e,type:t,...r},a)=>j.jsx("input",{type:t,className:Le("flex h-12 w-full rounded border border-input bg-card px-4 py-3 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,"data-testid":r["data-testid"]||"input",...r}));hr.displayName="Input";const ti=J.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...a},n)=>j.jsx(B_,{ref:n,decorative:r,orientation:t,className:Le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),"data-testid":a["data-testid"]||"separator",...a}));ti.displayName=B_.displayName;const K5=z_,JR=U_,KR=F_,q5=J.forwardRef(({className:e,...t},r)=>j.jsx(Mf,{className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));q5.displayName=Mf.displayName;const qR=kn("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),gv=J.forwardRef(({side:e="right",className:t,children:r,...a},n)=>j.jsxs(KR,{children:[j.jsx(q5,{}),j.jsxs(Sf,{ref:n,className:Le(qR({side:e}),t),...a,children:[j.jsxs($_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[j.jsx(Zr,{className:"h-4 w-4"}),j.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));gv.displayName=Sf.displayName;const XR=J.forwardRef(({className:e,...t},r)=>j.jsx(Ef,{ref:r,className:Le("text-lg font-semibold text-foreground",e),...t}));XR.displayName=Ef.displayName;const WR=J.forwardRef(({className:e,...t},r)=>j.jsx(kf,{ref:r,className:Le("text-sm text-muted-foreground",e),...t}));WR.displayName=kf.displayName;function So({className:e,...t}){return j.jsx("div",{className:Le("animate-pulse rounded-md bg-primary/10",e),"data-testid":t["data-testid"]||"skeleton",...t})}i(So,"Skeleton");const ns=jC,cr=NC,dr=IC,lr=J.forwardRef(({className:e,sideOffset:t=4,...r},a)=>j.jsx(CC,{children:j.jsx(V_,{ref:a,sideOffset:t,className:Le("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));lr.displayName=V_.displayName;const Qc=768;function QR(){const[e,t]=J.useState(void 0);return J.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Qc-1}px)`),a=i(()=>{t(window.innerWidth<Qc)},"onChange");return r.addEventListener("change",a),t(window.innerWidth<Qc),()=>r.removeEventListener("change",a)},[]),!!e}i(QR,"useIsMobile");const YR="sidebar:state",eT=3600*24*7,tT="16rem",rT="18rem",iT="3rem",nT="b",X5=J.createContext(null);function Of(){const e=J.useContext(X5);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}i(Of,"useSidebar");const W5=J.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:a,style:n,children:s,...o},h)=>{const m=QR(),[v,c]=J.useState(!1),[d,y]=J.useState(e),b=t??d,x=J.useCallback(O=>{const R=typeof O=="function"?O(b):O;r?r(R):y(R),document.cookie=`${YR}=${R}; path=/; max-age=${eT}`},[r,b]),k=J.useCallback(()=>m?c(O=>!O):x(O=>!O),[m,x,c]);J.useEffect(()=>{const O=i(R=>{R.key===nT&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),k())},"handleKeyDown");return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[k]);const N=b?"expanded":"collapsed",C=J.useMemo(()=>({state:N,open:b,setOpen:x,isMobile:m,openMobile:v,setOpenMobile:c,toggleSidebar:k}),[N,b,x,m,v,c,k]);return j.jsx(X5.Provider,{value:C,children:j.jsx(ns,{delayDuration:0,children:j.jsx("div",{style:{"--sidebar-width":tT,"--sidebar-width-icon":iT,...n},className:Le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",a),ref:h,...o,children:s})})})});W5.displayName="SidebarProvider";const Q5=J.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:a,children:n,...s},o)=>{const{isMobile:h,state:m,openMobile:v,setOpenMobile:c}=Of();return r==="none"?j.jsx("div",{className:Le("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",a),ref:o,...s,children:n}):h?j.jsx(K5,{open:v,onOpenChange:c,...s,children:j.jsx(gv,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":rT},side:e,children:j.jsx("div",{className:"flex h-full w-full flex-col",children:n})})}):j.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?r:"","data-variant":t,"data-side":e,children:[j.jsx("div",{className:Le("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),j.jsx("div",{className:Le("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...s,children:j.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md w-full flex-col group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:n})})]})});Q5.displayName="Sidebar";const aT=J.forwardRef(({className:e,onClick:t,...r},a)=>{const{toggleSidebar:n}=Of();return j.jsxs(et,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Le("h-7 w-7",e),onClick:i(s=>{t?.(s),n()},"onClick"),"data-testid":"sidebar-toggle",...r,children:[j.jsx(OC,{}),j.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});aT.displayName="SidebarTrigger";const sT=J.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:a}=Of();return j.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Le("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});sT.displayName="SidebarRail";const Y5=J.forwardRef(({className:e,...t},r)=>j.jsx("main",{ref:r,className:Le("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Y5.displayName="SidebarInset";const oT=J.forwardRef(({className:e,...t},r)=>j.jsx(hr,{ref:r,"data-sidebar":"input",className:Le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));oT.displayName="SidebarInput";const e7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"header",className:Le("flex flex-col gap-2 p-2",e),...t}));e7.displayName="SidebarHeader";const t7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"footer",className:Le("flex flex-col gap-2 p-2",e),...t}));t7.displayName="SidebarFooter";const lT=J.forwardRef(({className:e,...t},r)=>j.jsx(ti,{ref:r,"data-sidebar":"separator",className:Le("mx-2 w-auto bg-card-border",e),...t}));lT.displayName="SidebarSeparator";const r7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"content",className:Le("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));r7.displayName="SidebarContent";const Rf=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"group",className:Le("relative flex w-full min-w-0 flex-col p-0.5",e),...t}));Rf.displayName="SidebarGroup";const uT=J.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?ys:"div";return j.jsx(n,{ref:a,"data-sidebar":"group-label",className:Le("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});uT.displayName="SidebarGroupLabel";const fT=J.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?ys:"button";return j.jsx(n,{ref:a,"data-sidebar":"group-action",className:Le("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});fT.displayName="SidebarGroupAction";const Tf=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"group-content",className:Le("w-full text-sm p-0 m-0",e),...t}));Tf.displayName="SidebarGroupContent";const ba=J.forwardRef(({className:e,...t},r)=>j.jsx("ul",{ref:r,"data-sidebar":"menu",className:Le("flex w-full min-w-0 flex-col gap-0.5",e),...t}));ba.displayName="SidebarMenu";const Ai=J.forwardRef(({className:e,...t},r)=>j.jsx("li",{ref:r,"data-sidebar":"menu-item",className:Le("group/menu-item relative",e),...t}));Ai.displayName="SidebarMenuItem";const cT=kn("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),ka=J.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:a="default",tooltip:n,className:s,...o},h)=>{const m=e?ys:"button",{isMobile:v,state:c}=Of(),d=j.jsx(m,{ref:h,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Le(cT({variant:r,size:a}),s),...o});return n?(typeof n=="string"&&(n={children:n}),j.jsxs(cr,{children:[j.jsx(dr,{asChild:!0,children:d}),j.jsx(lr,{side:"right",align:"center",hidden:c!=="collapsed"||v,...n})]})):d});ka.displayName="SidebarMenuButton";const dT=J.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...a},n)=>{const s=t?ys:"button";return j.jsx(s,{ref:n,"data-sidebar":"menu-action",className:Le("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a})});dT.displayName="SidebarMenuAction";const hT=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:Le("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));hT.displayName="SidebarMenuBadge";const Pf=J.forwardRef(({className:e,showIcon:t=!1,...r},a)=>{const n=J.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return j.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Le("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&j.jsx(So,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),j.jsx(So,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":n}})]})});Pf.displayName="SidebarMenuSkeleton";const pT=J.forwardRef(({className:e,...t},r)=>j.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:Le("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));pT.displayName="SidebarMenuSub";const mT=J.forwardRef(({...e},t)=>j.jsx("li",{ref:t,...e}));mT.displayName="SidebarMenuSubItem";const gT=J.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:a,...n},s)=>{const o=e?ys:"a";return j.jsx(o,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:Le("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...n})});gT.displayName="SidebarMenuSubButton";const vT=kn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function xi({className:e,variant:t,...r}){return j.jsx("div",{className:Le(vT({variant:t}),e),"data-testid":r["data-testid"]||"badge",...r})}i(xi,"Badge$1");const bT=kn("text-sm font-normal text-muted-foreground leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),as=J.forwardRef(({className:e,...t},r)=>j.jsx(Z_,{ref:r,className:Le(bT(),e),...t}));as.displayName=Z_.displayName;const yT=i(({tag:e,onRemove:t})=>j.jsxs(xi,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-accent hover:text-accent-foreground",children:[e,j.jsxs(et,{type:"button",variant:"ghost",size:"icon",onClick:i(()=>t(e),"onClick"),className:"hover:bg-accent/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[j.jsx(Zr,{className:"h-3 w-3"}),j.jsxs("span",{className:"sr-only",children:["Remove ",e]})]})]}),"Tag"),wT=i(({tags:e,onRemove:t})=>j.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.map(r=>j.jsx(yT,{tag:r,onRemove:t},r))}),"TagList"),xT=i(({value:e,onChange:t,onKeyDown:r,onAdd:a})=>j.jsxs("div",{className:"relative",children:[j.jsx(hr,{value:e,onChange:t,onKeyDown:r,placeholder:"Type and press Enter or click Add...",className:Le("bg-background pr-16",!e&&"text-muted-foreground")}),e.trim()&&j.jsx(et,{size:"sm",onClick:a,className:"absolute top-1/2 -translate-y-1/2 right-2 h-7 px-3",children:"Add"})]}),"TagInput");function _T({title:e,data:t,onChange:r}){const[a,n]=J.useState(""),s=i(()=>{const m=a.trim();m&&!t.includes(m)&&(r([...t,m]),n(""))},"addTag"),o=i(m=>{m.key==="Enter"&&(m.preventDefault(),s())},"handleKeyDown"),h=i(m=>{r(t.filter(v=>v!==m))},"removeTag");return j.jsxs("div",{className:"space-y-2",children:[j.jsx(as,{children:e}),j.jsxs("div",{className:"p-2 bg-card rounded border border-input",children:[j.jsx(wT,{tags:t,onRemove:h}),j.jsx(xT,{value:a,onChange:i(m=>n(m.target.value),"onChange"),onKeyDown:o,onAdd:s})]})]})}i(_T,"ArrayInput");const vv=H_,Df=J.forwardRef(({className:e,...t},r)=>j.jsx(ev,{ref:r,className:Le("inline-flex items-center bg-transparent border-b border-sidebar-border w-full",e),...t}));Df.displayName=ev.displayName;const Mo=J.forwardRef(({className:e,...t},r)=>j.jsx(tv,{ref:r,className:Le("inline-flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium text-muted-foreground bg-transparent transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-b-primary relative",e),...t}));Mo.displayName=tv.displayName;const wi=J.forwardRef(({className:e,...t},r)=>j.jsx(G_,{ref:r,className:Le("text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));wi.displayName=G_.displayName;const el=J.forwardRef(({className:e,...t},r)=>j.jsx("textarea",{className:Le("flex min-h-[120px] w-full rounded border border-input bg-card px-4 py-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,"data-testid":t["data-testid"]||"textarea",...t}));el.displayName="Textarea";const ST=1,MT=3e3;let Yc=0;function ET(){return Yc=(Yc+1)%Number.MAX_SAFE_INTEGER,Yc.toString()}i(ET,"genId");const ed=new Map,Hy=i(e=>{if(ed.has(e))return;const t=setTimeout(()=>{ed.delete(e),go({type:"REMOVE_TOAST",toastId:e})},MT);ed.set(e,t)},"addToRemoveQueue"),kT=i((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ST)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;if(r)Hy(r);else for(const a of e.toasts)Hy(a.id);return{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},"reducer"),ku=[];let Au={toasts:[]};function go(e){Au=kT(Au,e);for(const t of ku)t(Au)}i(go,"dispatch");function AT({...e}){const t=ET(),r=i(n=>go({type:"UPDATE_TOAST",toast:{...n,id:t}}),"update"),a=i(()=>go({type:"DISMISS_TOAST",toastId:t}),"dismiss");return go({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i(n=>{n||a()},"onOpenChange")}}),{id:t,dismiss:a,update:r}}i(AT,"toast");function rr(){const[e,t]=J.useState(Au);return J.useEffect(()=>(ku.push(t),()=>{const r=ku.indexOf(t);r>-1&&ku.splice(r,1)}),[]),{...e,toast:AT,dismiss:i(r=>go({type:"DISMISS_TOAST",toastId:r}),"dismiss")}}i(rr,"useToast");function jT(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}i(jT,"sanitizeFilename");function NT(e){const t={id:e.id,name:e.name,username:e.username,system:e.system,templates:e.templates,bio:e.bio,messageExamples:e.messageExamples,postExamples:e.postExamples,topics:e.topics,adjectives:e.adjectives,knowledge:e.knowledge,plugins:e.plugins,settings:e.settings?{...e.settings}:void 0,style:e.style};if(t.settings&&"secrets"in t.settings){const{secrets:r,...a}=t.settings;t.settings=a}return Object.fromEntries(Object.entries(t).filter(([r,a])=>a!=null))}i(NT,"agentToCharacterData");function IT(e){const t=new Date().toISOString().split("T")[0];return`${jT(e||"agent")}-${t}.json`}i(IT,"generateExportFilename");function CT(e,t){const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(r),n=document.createElement("a");n.href=a,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a)}i(CT,"downloadJsonFile");function bv(e,t){try{const r=NT(e),a=IT(e.name);return CT(r,a),t&&t({title:"Character Exported",description:`${e.name}'s character data has been downloaded as ${a}`}),{success:!0,filename:a}}catch(r){return console.error("Failed to export character:",r),t&&t({title:"Export Failed",description:"Failed to export character data. Please try again.",variant:"destructive"}),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}i(bv,"exportCharacterAsJson");const _n=RC,td=PC,Sn=TC,Vi=J.forwardRef(({className:e,children:t,...r},a)=>j.jsxs(J_,{ref:a,className:Le("flex h-12 w-full items-center justify-between whitespace-nowrap rounded border border-input bg-card px-4 py-3 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,j.jsx(DC,{asChild:!0,children:j.jsx(Ji,{className:"h-4 w-4 opacity-50"})})]}));Vi.displayName=J_.displayName;const i7=J.forwardRef(({className:e,...t},r)=>j.jsx(Q_,{ref:r,className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:j.jsx(Y_,{className:"h-4 w-4"})}));i7.displayName=Q_.displayName;const n7=J.forwardRef(({className:e,...t},r)=>j.jsx(e5,{ref:r,className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:j.jsx(Ji,{className:"h-4 w-4"})}));n7.displayName=e5.displayName;const Zi=J.forwardRef(({className:e,children:t,position:r="popper",...a},n)=>j.jsx(LC,{children:j.jsxs(K_,{ref:n,className:Le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-input bg-card text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[j.jsx(i7,{}),j.jsx(BC,{className:Le("p-2",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),j.jsx(n7,{})]})}));Zi.displayName=K_.displayName;const Qm=J.forwardRef(({className:e,...t},r)=>j.jsx(W_,{ref:r,className:Le("px-4 py-2 text-xs font-medium text-muted-foreground uppercase tracking-wider",e),...t}));Qm.displayName=W_.displayName;const Qt=J.forwardRef(({className:e,children:t,...r},a)=>j.jsxs(q_,{ref:a,className:Le("relative flex w-full cursor-default select-none items-center rounded py-3 pl-4 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[j.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:j.jsx(zC,{children:j.jsx(Mn,{className:"h-4 w-4"})})}),j.jsx(UC,{children:t})]}));Qt.displayName=q_.displayName;const Ym=J.forwardRef(({className:e,...t},r)=>j.jsx(X_,{ref:r,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));Ym.displayName=X_.displayName;const a7={elevenlabs:"@elizaos/plugin-elevenlabs",openai:"@elizaos/plugin-openai",none:""},OT=[{value:"none",label:"No Voice",provider:"none"}],RT=[],yv=[{value:"EXAVITQu4vr4xnSDxMaL",label:"ElevenLabs - Rachel (Default)",provider:"elevenlabs",gender:"female",language:"en",features:["natural","professional"]},{value:"21m00Tcm4TlvDq8ikWAM",label:"ElevenLabs - Adam",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]},{value:"AZnzlk1XvdvUeBnXmlld",label:"ElevenLabs - Domi",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"MF3mGyEYCl7XYWbV9V6O",label:"ElevenLabs - Elli",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"TxGEqnHWrfWFTfGW9XjX",label:"ElevenLabs - Josh",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]}],s7=[{value:"alloy",label:"OpenAI - Alloy",provider:"openai",gender:"female",language:"en",features:["natural","versatile"]},{value:"echo",label:"OpenAI - Echo",provider:"openai",gender:"male",language:"en",features:["natural","professional"]},{value:"fable",label:"OpenAI - Fable",provider:"openai",gender:"male",language:"en",features:["natural","narrative"]},{value:"onyx",label:"OpenAI - Onyx",provider:"openai",gender:"male",language:"en",features:["natural","deep"]},{value:"nova",label:"OpenAI - Nova",provider:"openai",gender:"female",language:"en",features:["natural","friendly"]},{value:"shimmer",label:"OpenAI - Shimmer",provider:"openai",gender:"female",language:"en",features:["natural","bright"]},{value:"ash",label:"OpenAI - Ash",provider:"openai",gender:"male",language:"en",features:["natural","calm"]},{value:"coral",label:"OpenAI - Coral",provider:"openai",gender:"female",language:"en",features:["natural","warm"]},{value:"sage",label:"OpenAI - Sage",provider:"openai",gender:"female",language:"en",features:["natural","wise"]},{value:"ballad",label:"OpenAI - Ballad",provider:"openai",gender:"male",language:"en",features:["natural","melodic"]}],o7=i(()=>[...OT,...RT,...yv,...s7],"getAllVoiceModels"),eg=i(e=>o7().find(t=>t.value===e),"getVoiceModelByValue");function TT(){const[e,t]=J.useState(null);return J.useEffect(()=>{const r=localStorage.getItem("ELEVENLABS_API_KEY");t(r)},[]),Nr({queryKey:["elevenlabs-voices",e],queryFn:i(async()=>{if(!e)return[];try{const r=await fetch("https://api.elevenlabs.io/v2/voices",{method:"GET",headers:{"xi-api-key":e}});if(!r.ok)return console.error("Failed to fetch ElevenLabs voices:",r.statusText),[];const a=await r.json(),n=yv.map(h=>h.value);return a.voices.filter(h=>!n.includes(h.voice_id)).map(h=>({value:h.voice_id,label:`ElevenLabs - ${h.name} (Custom)`,provider:"elevenlabs",gender:h.labels?.gender==="female"?"female":"male",language:"en",features:[h.category||"professional",h.labels?.description||"natural"]}))}catch(r){return console.error("Error fetching ElevenLabs voices:",r),[]}},"queryFn"),staleTime:3600*1e3,refetchOnWindowFocus:!1})}i(TT,"useElevenLabsVoices");function Eo({...e}){return j.jsx(FC,{"data-slot":"dropdown-menu",...e})}i(Eo,"DropdownMenu");function ko({...e}){return j.jsx($C,{"data-slot":"dropdown-menu-trigger",...e})}i(ko,"DropdownMenuTrigger");function Ao({className:e,sideOffset:t=4,onPointerDown:r,onPointerDownOutside:a,onCloseAutoFocus:n,...s}){const o=J.useRef(!1),h=J.useCallback(c=>{o.current=!0,r?.(c)},[r]),m=J.useCallback(c=>{o.current=!0,a?.(c)},[a]),v=J.useCallback(c=>{if(n)return n(c);o.current&&(c.preventDefault(),o.current=!1)},[n]);return j.jsx(VC,{children:j.jsx(ZC,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border p-1 shadow-lg",e),onPointerDown:h,onPointerDownOutside:m,onCloseAutoFocus:v,...s})})}i(Ao,"DropdownMenuContent");function Fi({className:e,inset:t,variant:r="default",...a}){return j.jsx(HC,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:Le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground data-[variant=destructive]:font-normal relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a})}i(Fi,"DropdownMenuItem");function PT({className:e,inset:t,...r}){return j.jsx(JC,{"data-slot":"dropdown-menu-label","data-inset":t,className:Le("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8",e),...r})}i(PT,"DropdownMenuLabel");function Zu({className:e,...t}){return j.jsx(GC,{"data-slot":"dropdown-menu-separator",className:Le("bg-border -mx-1 my-1 h-px",e),...t})}i(Zu,"DropdownMenuSeparator");const l7=[{id:"none",label:"None (Start Blank)",description:"Start with an empty configuration",template:{name:"",username:"",system:"",bio:[],topics:[],adjectives:[],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap"],settings:{secrets:{}}}},{id:"discord-bot",label:"Discord Bot",description:"Interactive Discord bot that handles server interactions",template:{name:"Discord Assistant",username:"discordbot",system:"You are a Discord bot designed to assist users in a Discord server. You respond to messages, handle commands, and provide helpful information to community members. You should be friendly, helpful, and maintain a consistent personality. Focus on providing value to the community through clear, concise responses.",bio:["Helpful Discord community assistant","Responds to commands and natural language queries","Assists with server-specific information and resources","Maintains a friendly and helpful tone"],topics:["Discord server","Community assistance","Command handling","Server information"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-discord"],style:{all:["Be friendly and helpful","Use clear, concise language","Follow Discord conventions"],chat:["Respond promptly to queries","Use appropriate formatting for clarity","Reference relevant commands when helpful"],post:["Structure longer responses with clear sections","Use embeds for rich content when appropriate"]},settings:{secrets:{}}}},{id:"telegram-bot",label:"Telegram Bot",description:"Interactive bot for Telegram channels and groups",template:{name:"Telegram Assistant",username:"telegrambot",system:"You are a helpful Telegram bot designed to assist users in channels and groups. You respond to commands and natural language queries, providing information, assistance, and engaging with users in a friendly manner. You can handle both one-on-one conversations and group interactions, adapting your tone and content accordingly while respecting privacy and community guidelines.",bio:["Interactive Telegram bot","Assists users in channels and groups","Responds to commands and natural language"],topics:["Channel information","User assistance","Content sharing","Group moderation","FAQ responses"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-telegram"],style:{all:["Be concise and clear","Use Telegram-friendly formatting","Respond promptly to user queries"],chat:["Handle commands efficiently","Include relevant emoji when appropriate","Maintain conversation context"],post:["Structure longer messages clearly","Use formatting for better readability","Include relevant links when helpful"]},settings:{clients:["telegram"],allowDirectMessages:!0,shouldOnlyJoinInAllowedGroups:!1,messageTrackingLimit:100,secrets:{}}}},{id:"slack-bot",label:"Slack Bot",description:"Interactive bot for Slack workspaces",template:{name:"Slack Assistant",username:"slackbot",system:"You are a specialized assistant for Slack workspaces. You help teams by answering questions, providing information, and facilitating collaboration. You can respond to direct messages and channel mentions, maintaining a helpful and professional tone that aligns with the organization's culture. Keep responses concise and relevant to the conversation context.",bio:["Specialized Slack workspace assistant","Facilitates team collaboration","Provides timely responses to queries"],topics:["Workspace information","Team collaboration","Company policies","Resource access","Task management"],adjectives:["Responsive","Helpful","Organized","Team-oriented","Professional"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-slack"],style:{all:["Be concise and clear","Match the tone of the workspace","Use Slack-appropriate formatting"],chat:["Reference relevant messages when appropriate","Use thread replies for detailed responses","Include emojis when fitting the workspace culture"],post:["Structure information with clear sections","Use bullet points for lists","Include relevant links when helpful"]},settings:{secrets:{}}}},{id:"twitter-agent",label:"Twitter/X Agent",description:"Manages Twitter presence and engagement",template:{name:"Twitter Agent",username:"twitteragent",system:"You are a Twitter engagement specialist designed to help create and manage effective Twitter content. You assist with drafting tweets, responding to mentions, analyzing engagement metrics, and suggesting content strategies. Your tone should match the brand voice while maintaining authenticity and encouraging audience interaction. Keep tweets concise and impactful within character limits.",bio:["Twitter engagement specialist","Creates compelling social content","Manages audience interactions"],topics:["Tweet creation","Audience engagement","Content strategy","Trend analysis","Brand voice"],adjectives:["Engaging","Concise","Strategic","Conversational","Creative"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-twitter"],style:{all:["Be concise and impactful","Stay within character limits","Use platform-appropriate formatting"],chat:["Match brand voice in replies","Be conversational and authentic","Use hashtags strategically"],post:["Draft varied content types","Suggest engaging visuals or polls","Include call-to-actions when appropriate"]},settings:{TWITTER_DRY_RUN:!1,MAX_TWEET_LENGTH:280,TWITTER_ENABLE_POST_GENERATION:!0,TWITTER_POST_INTERVAL_MIN:90,TWITTER_POST_INTERVAL_MAX:180,secrets:{}}}},{id:"github-bot",label:"GitHub Repository Assistant",description:"Helps manage GitHub repositories and development workflows",template:{name:"GitHub Assistant",username:"githubasst",system:"You are a GitHub repository assistant designed to help development teams manage their workflow and codebase. You can assist with pull request reviews, issue triage, documentation updates, and providing information about repository structure and conventions. Maintain a technical but approachable tone, and prioritize accuracy in all technical information.",bio:["GitHub repository management specialist","Assists with development workflows","Provides code and documentation support"],topics:["Pull requests","Issue tracking","Repository structure","Code reviews","Development workflows"],adjectives:["Technical","Precise","Helpful","Organized","Knowledgeable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-github"],style:{all:["Use technically precise language","Reference GitHub concepts appropriately","Link to relevant documentation when helpful"],chat:["Be concise in comments","Format code snippets properly","Summarize technical points clearly"],post:["Structure longer responses with clear headings","Use code blocks with syntax highlighting","Link to specific lines of code when relevant"]},settings:{secrets:{}}}},{id:"instagram-agent",label:"Instagram Content Manager",description:"Creates and manages content for Instagram",template:{name:"Instagram Manager",username:"instagrammgr",system:"You are an Instagram content specialist designed to help create and manage engaging Instagram presence. You assist with content creation, caption writing, hashtag strategy, engagement tactics, and understanding analytics. Your approach emphasizes visual storytelling, authenticity, and building connections with followers. Maintain a voice that matches the brand identity while adapting to Instagram's evolving features and trends.",bio:["Instagram content creation specialist","Develops engaging visual storytelling","Optimizes profile engagement"],topics:["Content creation","Caption writing","Hashtag strategy","Engagement tactics","Visual aesthetics"],adjectives:["Creative","Visual","Engaging","Trend-aware","Authentic"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-instagram"],style:{all:["Balance visual description with compelling text","Maintain brand voice consistency","Consider current platform trends"],chat:["Provide actionable content suggestions","Reference visual elements clearly","Include relevant hashtag recommendations"],post:["Craft captions that enhance visual content","Suggest content series and themes","Balance promotional with authentic content"]},settings:{POST_INTERVAL_MIN:90,POST_INTERVAL_MAX:180,ENABLE_ACTION_PROCESSING:!0,ACTION_INTERVAL:5,MAX_ACTIONS_PROCESSING:1,secrets:{}}}}];function u7(e){return l7.find(t=>t.id===e)}i(u7,"getTemplateById");const wv=KC,DT=qC,f7=J.forwardRef(({className:e,...t},r)=>j.jsx(s5,{className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));f7.displayName=s5.displayName;const Lf=J.forwardRef(({className:e,...t},r)=>j.jsxs(DT,{children:[j.jsx(f7,{}),j.jsx(t5,{ref:r,className:Le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Lf.displayName=t5.displayName;const Bf=i(({className:e,...t})=>j.jsx("div",{className:Le("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader");Bf.displayName="AlertDialogHeader";const zf=i(({className:e,...t})=>j.jsx("div",{className:Le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter");zf.displayName="AlertDialogFooter";const Uf=J.forwardRef(({className:e,...t},r)=>j.jsx(r5,{ref:r,className:Le("text-lg font-semibold",e),...t}));Uf.displayName=r5.displayName;const Ff=J.forwardRef(({className:e,...t},r)=>j.jsx(i5,{ref:r,className:Le("text-sm text-muted-foreground",e),...t}));Ff.displayName=i5.displayName;const $f=J.forwardRef(({className:e,...t},r)=>j.jsx(a5,{ref:r,className:Le(mv(),e),...t}));$f.displayName=a5.displayName;const Vf=J.forwardRef(({className:e,...t},r)=>j.jsx(n5,{ref:r,className:Le(mv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vf.displayName=n5.displayName;function LT({open:e,onOpenChange:t,missingSecrets:r,onConfirm:a,onCancel:n}){return j.jsx(wv,{open:e,onOpenChange:t,children:j.jsxs(Lf,{children:[j.jsxs(Bf,{children:[j.jsxs(Uf,{className:"flex items-center gap-2",children:[j.jsx(ci,{className:"h-5 w-5 text-yellow-500"}),"Missing Required Configuration"]}),j.jsxs(Ff,{className:"space-y-3",children:[j.jsx("p",{children:"The following required secrets are missing or empty. Your agent may not function properly without these values."}),j.jsx("div",{className:"bg-muted rounded-md p-3 space-y-2",children:r.map(s=>j.jsxs("div",{className:"text-sm",children:[j.jsx("code",{className:"font-mono font-semibold",children:s.name}),s.plugin&&j.jsxs("span",{className:"text-muted-foreground ml-2",children:["(required by ",s.plugin,")"]}),s.description&&j.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:s.description})]},s.name))}),j.jsx("p",{className:"text-sm",children:"Do you want to save anyway?"})]})]}),j.jsxs(zf,{children:[j.jsx(Vf,{onClick:n,children:"Go Back"}),j.jsx($f,{onClick:a,className:"bg-yellow-600 hover:bg-yellow-700",children:"Save Anyway"})]})]})})}i(LT,"MissingSecretsDialog");var It={},Cl={exports:{}},Ol={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Gy;function jt(){return Gy||(Gy=1,(function(e,t){var r=Hn(),a=r.Buffer;function n(o,h){for(var m in o)h[m]=o[m]}i(n,"copyProps"),a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=s);function s(o,h,m){return a(o,h,m)}i(s,"SafeBuffer"),s.prototype=Object.create(a.prototype),n(a,s),s.from=function(o,h,m){if(typeof o=="number")throw new TypeError("Argument must not be a number");return a(o,h,m)},s.alloc=function(o,h,m){if(typeof o!="number")throw new TypeError("Argument must be a number");var v=a(o);return h!==void 0?typeof m=="string"?v.fill(h,m):v.fill(h):v.fill(0),v},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Ol,Ol.exports)),Ol.exports}i(jt,"requireSafeBuffer$2");var Jy;function Ss(){if(Jy)return Cl.exports;Jy=1;var e=65536,t=4294967295;function r(){throw new Error(`Secure random number generation is not supported by this browser.
1
+ var kC=Object.defineProperty;var i=(e,t)=>kC(e,"name",{value:t,configurable:!0});var AC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);import{g as Xo,j,S as ys,r as J,R as B_,a as z_,T as U_,P as F_,C as Sf,b as $_,X as Zr,O as Mf,c as Ef,D as kf,d as jC,e as NC,f as IC,h as CC,i as V_,k as OC,l as Z_,m as H_,L as ev,n as tv,o as G_,p as RC,V as TC,G as PC,q as J_,I as DC,s as Ji,t as LC,u as K_,v as BC,w as q_,x as zC,y as Mn,z as UC,A as X_,B as W_,E as Q_,F as Y_,H as e5,J as Nr,K as FC,M as $C,N as VC,Q as ZC,U as HC,W as GC,Y as JC,Z as KC,_ as qC,$ as t5,a0 as r5,a1 as i5,a2 as n5,a3 as a5,a4 as s5,a5 as ci,a6 as XC,a7 as WC,a8 as o5,a9 as l5,aa as QC,ab as u5,ac as Ar,ad as rv,ae as Wo,af as f5,ag as c5,ah as YC,ai as eO,aj as iv,ak as d5,al as tO,am as rO,an as h5,ao as iO,ap as ga,aq as Jc,ar as vn,as as zi,at as Cy,au as _a,av as nO,aw as Ui,ax as jr,ay as xr,az as p5,aA as m5,aB as g5,aC as v5,aD as b5,aE as Qr,aF as Af,aG as aO,aH as sO,aI as oO,aJ as jf,aK as Nf,aL as oo,aM as Sa,aN as Bn,aO as Oy,aP as lO,aQ as Qo,aR as If,aS as yo,aT as uO,aU as Ry,aV as fO,aW as y5,aX as cO,aY as w5,aZ as x5,a_ as _5,a$ as S5,b0 as M5,b1 as dO,b2 as nv,b3 as Gm,b4 as E5,b5 as hO,b6 as $u,b7 as av,b8 as k5,b9 as pO,ba as ws,bb as us,bc as sv,bd as Yo,be as Vu,bf as mO,bg as A5,bh as gO,bi as ov,bj as wo,bk as ei,bl as vO,bm as bO,bn as Tn,bo as Kc,bp as yO,bq as lo,br as Wa,bs as wO,bt as xO,bu as _O,bv as SO,bw as MO,bx as EO,by as lv,bz as kO,bA as AO,bB as jO,bC as uv,bD as fv,bE as NO,bF as j5,bG as Jm,bH as IO,bI as N5,bJ as CO,bK as OO,bL as RO,bM as TO,bN as PO,bO as DO,bP as LO,bQ as BO,bR as zO,bS as I5,bT as C5,bU as O5,bV as R5,bW as UO,bX as FO,bY as $O,bZ as Km,b_ as VO,b$ as ZO,c0 as Cf,c1 as HO,c2 as T5,c3 as GO,c4 as JO,c5 as qc,c6 as Ty,c7 as Py,c8 as KO,c9 as cv,ca as qO,cb as XO,cc as WO,cd as QO,ce as YO,cf as eR,cg as tR,ch as rR,ci as iR,cj as nR,ck as mi,cl as aR}from"./react-vendor-DPGVcrXi.js";import{r as Hn}from"./main-S_Anb5JP.js";import"./ui-vendor-B7JxFfFk.js";var ire=AC(Yg=>{function P5(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=P5(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}i(P5,"r");function dv(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=P5(e))&&(a&&(a+=" "),a+=t);return a}i(dv,"clsx");const Dy=i(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),Ly=dv,kn=i((e,t)=>r=>{var a;if(t?.variants==null)return Ly(e,r?.class,r?.className);const{variants:n,defaultVariants:s}=t,o=Object.keys(n).map(v=>{const c=r?.[v],d=s?.[v];if(c===null)return null;const y=Dy(c)||Dy(d);return n[v][y]}),h=r&&Object.entries(r).reduce((v,c)=>{let[d,y]=c;return y===void 0||(v[d]=y),v},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((v,c)=>{let{class:d,className:y,...b}=c;return Object.entries(b).every(x=>{let[k,N]=x;return Array.isArray(N)?N.includes({...s,...h}[k]):{...s,...h}[k]===N})?[...v,d,y]:v},[]);return Ly(e,o,m,r?.class,r?.className)},"cva"),es="user",jl="client_chat",uo="client_group_chat",xo=512;var Su=(e=>(e.REQUIRED="required",e.OPTIONAL="optional",e))(Su||{});const Za={name:"required",username:"optional",system:"required","settings.voice.model":"optional",bio:"optional",topics:"optional",adjectives:"optional","style.all":"optional","style.chat":"optional","style.post":"optional"};var Mu={exports:{}},sR=Mu.exports,By;function oR(){return By||(By=1,(function(e,t){(function(r,a){e.exports=a()})(sR,(function(){var r=1e3,a=6e4,n=36e5,s="millisecond",o="second",h="minute",m="hour",v="day",c="week",d="month",y="quarter",b="year",x="date",k="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(l){var g=["th","st","nd","rd"],w=l%100;return"["+l+(g[(w-20)%10]||g[w]||g[0])+"]"},"ordinal")},R=i(function(l,g,w){var M=String(l);return!M||M.length>=g?l:""+Array(g+1-M.length).join(w)+l},"m"),T={s:R,z:i(function(l){var g=-l.utcOffset(),w=Math.abs(g),M=Math.floor(w/60),A=w%60;return(g<=0?"+":"-")+R(M,2,"0")+":"+R(A,2,"0")},"z"),m:i(function l(g,w){if(g.date()<w.date())return-l(w,g);var M=12*(w.year()-g.year())+(w.month()-g.month()),A=g.clone().add(M,d),S=w-A<0,f=g.clone().add(M+(S?-1:1),d);return+(-(M+(w-A)/(S?A-f:f-A))||0)},"t2"),a:i(function(l){return l<0?Math.ceil(l)||0:Math.floor(l)},"a"),p:i(function(l){return{M:d,y:b,w:c,d:v,D:x,h:m,m:h,s:o,ms:s,Q:y}[l]||String(l||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(l){return l===void 0},"u")},P="en",B={};B[P]=O;var Z="$isDayjsObject",H=i(function(l){return l instanceof u||!(!l||!l[Z])},"S"),ee=i(function l(g,w,M){var A;if(!g)return P;if(typeof g=="string"){var S=g.toLowerCase();B[S]&&(A=S),w&&(B[S]=w,A=S);var f=g.split("-");if(!A&&f.length>1)return l(f[0])}else{var _=g.name;B[_]=g,A=_}return!M&&A&&(P=A),A||!M&&P},"t2"),$=i(function(l,g){if(H(l))return l.clone();var w=typeof g=="object"?g:{};return w.date=l,w.args=arguments,new u(w)},"O"),F=T;F.l=ee,F.i=H,F.w=function(l,g){return $(l,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var u=(function(){function l(w){this.$L=ee(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[Z]=!0}i(l,"M2");var g=l.prototype;return g.parse=function(w){this.$d=(function(M){var A=M.date,S=M.utc;if(A===null)return new Date(NaN);if(F.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var f=A.match(N);if(f){var _=f[2]-1||0,E=(f[7]||"0").substring(0,3);return S?new Date(Date.UTC(f[1],_,f[3]||1,f[4]||0,f[5]||0,f[6]||0,E)):new Date(f[1],_,f[3]||1,f[4]||0,f[5]||0,f[6]||0,E)}}return new Date(A)})(w),this.init()},g.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},g.$utils=function(){return F},g.isValid=function(){return this.$d.toString()!==k},g.isSame=function(w,M){var A=$(w);return this.startOf(M)<=A&&A<=this.endOf(M)},g.isAfter=function(w,M){return $(w)<this.startOf(M)},g.isBefore=function(w,M){return this.endOf(M)<$(w)},g.$g=function(w,M,A){return F.u(w)?this[M]:this.set(A,w)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(w,M){var A=this,S=!!F.u(M)||M,f=F.p(w),_=i(function(G,q){var _e=F.w(A.$u?Date.UTC(A.$y,q,G):new Date(A.$y,q,G),A);return S?_e:_e.endOf(v)},"l2"),E=i(function(G,q){return F.w(A.toDate()[G].apply(A.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(q)),A)},"$2"),I=this.$W,D=this.$M,L=this.$D,U="set"+(this.$u?"UTC":"");switch(f){case b:return S?_(1,0):_(31,11);case d:return S?_(1,D):_(0,D+1);case c:var z=this.$locale().weekStart||0,V=(I<z?I+7:I)-z;return _(S?L-V:L+(6-V),D);case v:case x:return E(U+"Hours",0);case m:return E(U+"Minutes",1);case h:return E(U+"Seconds",2);case o:return E(U+"Milliseconds",3);default:return this.clone()}},g.endOf=function(w){return this.startOf(w,!1)},g.$set=function(w,M){var A,S=F.p(w),f="set"+(this.$u?"UTC":""),_=(A={},A[v]=f+"Date",A[x]=f+"Date",A[d]=f+"Month",A[b]=f+"FullYear",A[m]=f+"Hours",A[h]=f+"Minutes",A[o]=f+"Seconds",A[s]=f+"Milliseconds",A)[S],E=S===v?this.$D+(M-this.$W):M;if(S===d||S===b){var I=this.clone().set(x,1);I.$d[_](E),I.init(),this.$d=I.set(x,Math.min(this.$D,I.daysInMonth())).$d}else _&&this.$d[_](E);return this.init(),this},g.set=function(w,M){return this.clone().$set(w,M)},g.get=function(w){return this[F.p(w)]()},g.add=function(w,M){var A,S=this;w=Number(w);var f=F.p(M),_=i(function(D){var L=$(S);return F.w(L.date(L.date()+Math.round(D*w)),S)},"y2");if(f===d)return this.set(d,this.$M+w);if(f===b)return this.set(b,this.$y+w);if(f===v)return _(1);if(f===c)return _(7);var E=(A={},A[h]=a,A[m]=n,A[o]=r,A)[f]||1,I=this.$d.getTime()+w*E;return F.w(I,this)},g.subtract=function(w,M){return this.add(-1*w,M)},g.format=function(w){var M=this,A=this.$locale();if(!this.isValid())return A.invalidDate||k;var S=w||"YYYY-MM-DDTHH:mm:ssZ",f=F.z(this),_=this.$H,E=this.$m,I=this.$M,D=A.weekdays,L=A.months,U=A.meridiem,z=i(function(q,_e,ae,se){return q&&(q[_e]||q(M,S))||ae[_e].slice(0,se)},"h2"),V=i(function(q){return F.s(_%12||12,q,"0")},"d2"),G=U||function(q,_e,ae){var se=q<12?"AM":"PM";return ae?se.toLowerCase():se};return S.replace(C,(function(q,_e){return _e||(function(ae){switch(ae){case"YY":return String(M.$y).slice(-2);case"YYYY":return F.s(M.$y,4,"0");case"M":return I+1;case"MM":return F.s(I+1,2,"0");case"MMM":return z(A.monthsShort,I,L,3);case"MMMM":return z(L,I);case"D":return M.$D;case"DD":return F.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return z(A.weekdaysMin,M.$W,D,2);case"ddd":return z(A.weekdaysShort,M.$W,D,3);case"dddd":return D[M.$W];case"H":return String(_);case"HH":return F.s(_,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(_,E,!0);case"A":return G(_,E,!1);case"m":return String(E);case"mm":return F.s(E,2,"0");case"s":return String(M.$s);case"ss":return F.s(M.$s,2,"0");case"SSS":return F.s(M.$ms,3,"0");case"Z":return f}return null})(q)||f.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(w,M,A){var S,f=this,_=F.p(M),E=$(w),I=(E.utcOffset()-this.utcOffset())*a,D=this-E,L=i(function(){return F.m(f,E)},"D2");switch(_){case b:S=L()/12;break;case d:S=L();break;case y:S=L()/3;break;case c:S=(D-I)/6048e5;break;case v:S=(D-I)/864e5;break;case m:S=D/n;break;case h:S=D/a;break;case o:S=D/r;break;default:S=D}return A?S:F.a(S)},g.daysInMonth=function(){return this.endOf(d).$D},g.$locale=function(){return B[this.$L]},g.locale=function(w,M){if(!w)return this.$L;var A=this.clone(),S=ee(w,M,!0);return S&&(A.$L=S),A},g.clone=function(){return F.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},l})(),p=u.prototype;return $.prototype=p,[["$ms",s],["$s",o],["$m",h],["$H",m],["$W",v],["$M",d],["$y",b],["$D",x]].forEach((function(l){p[l[1]]=function(g){return this.$g(g,l[0],l[1])}})),$.extend=function(l,g){return l.$i||(l(g,u,$),l.$i=!0),$},$.locale=ee,$.isDayjs=H,$.unix=function(l){return $(1e3*l)},$.en=B[P],$.Ls=B,$.p={},$}))})(Mu)),Mu.exports}i(oR,"requireDayjs_min");var lR=oR();const D5=Xo(lR);var Eu={exports:{}},uR=Eu.exports,zy;function fR(){return zy||(zy=1,(function(e,t){(function(r,a){e.exports=a()})(uR,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(a,n,s){var o=n.prototype,h=o.format;s.en.formats=r,o.format=function(m){m===void 0&&(m="YYYY-MM-DDTHH:mm:ssZ");var v=this.$locale().formats,c=(function(d,y){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(b,x,k){var N=k&&k.toUpperCase();return x||y[k]||r[k]||y[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(C,O,R){return O||R.slice(1)}))}))})(m,v===void 0?{}:v);return h.call(this,c)}}}))})(Eu)),Eu.exports}i(fR,"requireLocalizedFormat");var cR=fR();const dR=Xo(cR),hv="-",hR=i(e=>{const t=mR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i(o=>{const h=o.split(hv);return h[0]===""&&h.length!==1&&h.shift(),L5(h,t)||pR(o)},"getClassGroupId"),getConflictingClassGroupIds:i((o,h)=>{const m=r[o]||[];return h&&a[o]?[...m,...a[o]]:m},"getConflictingClassGroupIds")}},"createClassGroupUtils"),L5=i((e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),n=a?L5(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(hv);return t.validators.find(({validator:o})=>o(s))?.classGroupId},"getGroupRecursive"),Uy=/^\[(.+)\]$/,pR=i(e=>{if(Uy.test(e)){const t=Uy.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},"getGroupIdForArbitraryProperty"),mR=i(e=>{const{theme:t,classGroups:r}=e,a={nextPart:new Map,validators:[]};for(const n in r)qm(r[n],a,n,t);return a},"createClassMap"),qm=i((e,t,r,a)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:Fy(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(gR(n)){qm(n(a),t,r,a);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,o])=>{qm(o,Fy(t,s),r,a)})})},"processClassesRecursively"),Fy=i((e,t)=>{let r=e;return t.split(hv).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},"getPart"),gR=i(e=>e.isThemeGetter,"isThemeGetter"),vR=i(e=>{if(e<1)return{get:i(()=>{},"get"),set:i(()=>{},"set")};let t=0,r=new Map,a=new Map;const n=i((s,o)=>{r.set(s,o),t++,t>e&&(t=0,a=r,r=new Map)},"update");return{get(s){let o=r.get(s);if(o!==void 0)return o;if((o=a.get(s))!==void 0)return n(s,o),o},set(s,o){r.has(s)?r.set(s,o):n(s,o)}}},"createLruCache"),Xm="!",Wm=":",bR=Wm.length,yR=i(e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=i(n=>{const s=[];let o=0,h=0,m=0,v;for(let x=0;x<n.length;x++){let k=n[x];if(o===0&&h===0){if(k===Wm){s.push(n.slice(m,x)),m=x+bR;continue}if(k==="/"){v=x;continue}}k==="["?o++:k==="]"?o--:k==="("?h++:k===")"&&h--}const c=s.length===0?n:n.substring(m),d=wR(c),y=d!==c,b=v&&v>m?v-m:void 0;return{modifiers:s,hasImportantModifier:y,baseClassName:d,maybePostfixModifierPosition:b}},"parseClassName");if(t){const n=t+Wm,s=a;a=i(o=>o.startsWith(n)?s(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0},"parseClassName")}if(r){const n=a;a=i(s=>r({className:s,parseClassName:n}),"parseClassName")}return a},"createParseClassName"),wR=i(e=>e.endsWith(Xm)?e.substring(0,e.length-1):e.startsWith(Xm)?e.substring(1):e,"stripImportantModifier"),xR=i(e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return i(a=>{if(a.length<=1)return a;const n=[];let s=[];return a.forEach(o=>{o[0]==="["||t[o]?(n.push(...s.sort(),o),s=[]):s.push(o)}),n.push(...s.sort()),n},"sortModifiers")},"createSortModifiers"),_R=i(e=>({cache:vR(e.cacheSize),parseClassName:yR(e),sortModifiers:xR(e),...hR(e)}),"createConfigUtils"),SR=/\s+/,MR=i((e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:s}=t,o=[],h=e.trim().split(SR);let m="";for(let v=h.length-1;v>=0;v-=1){const c=h[v],{isExternal:d,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:k}=r(c);if(d){m=c+(m.length>0?" "+m:m);continue}let N=!!k,C=a(N?x.substring(0,k):x);if(!C){if(!N){m=c+(m.length>0?" "+m:m);continue}if(C=a(x),!C){m=c+(m.length>0?" "+m:m);continue}N=!1}const O=s(y).join(":"),R=b?O+Xm:O,T=R+C;if(o.includes(T))continue;o.push(T);const P=n(C,N);for(let B=0;B<P.length;++B){const Z=P[B];o.push(R+Z)}m=c+(m.length>0?" "+m:m)}return m},"mergeClassList");function ER(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=B5(t))&&(a&&(a+=" "),a+=r);return a}i(ER,"twJoin");const B5=i(e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=B5(e[a]))&&(r&&(r+=" "),r+=t);return r},"toValue");function kR(e,...t){let r,a,n,s=o;function o(m){const v=t.reduce((c,d)=>d(c),e());return r=_R(v),a=r.cache.get,n=r.cache.set,s=h,h(m)}i(o,"initTailwindMerge");function h(m){const v=a(m);if(v)return v;const c=MR(m,r);return n(m,c),c}return i(h,"tailwindMerge"),i(function(){return s(ER.apply(null,arguments))},"callTailwindMerge")}i(kR,"createTailwindMerge");const vr=i(e=>{const t=i(r=>r[e]||[],"themeGetter");return t.isThemeGetter=!0,t},"fromTheme"),z5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AR=/^\d+\/\d+$/,jR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NR=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,CR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ha=i(e=>AR.test(e),"isFraction"),Lt=i(e=>!!e&&!Number.isNaN(Number(e)),"isNumber"),In=i(e=>!!e&&Number.isInteger(Number(e)),"isInteger"),Xc=i(e=>e.endsWith("%")&&Lt(e.slice(0,-1)),"isPercent"),nn=i(e=>jR.test(e),"isTshirtSize"),RR=i(()=>!0,"isAny"),TR=i(e=>NR.test(e)&&!IR.test(e),"isLengthOnly"),F5=i(()=>!1,"isNever"),PR=i(e=>CR.test(e),"isShadow"),DR=i(e=>OR.test(e),"isImage"),LR=i(e=>!pt(e)&&!mt(e),"isAnyNonArbitrary"),BR=i(e=>xs(e,Z5,F5),"isArbitrarySize"),pt=i(e=>z5.test(e),"isArbitraryValue"),Wn=i(e=>xs(e,H5,TR),"isArbitraryLength"),Wc=i(e=>xs(e,VR,Lt),"isArbitraryNumber"),$y=i(e=>xs(e,$5,F5),"isArbitraryPosition"),zR=i(e=>xs(e,V5,DR),"isArbitraryImage"),Nl=i(e=>xs(e,G5,PR),"isArbitraryShadow"),mt=i(e=>U5.test(e),"isArbitraryVariable"),Rs=i(e=>_s(e,H5),"isArbitraryVariableLength"),UR=i(e=>_s(e,ZR),"isArbitraryVariableFamilyName"),Vy=i(e=>_s(e,$5),"isArbitraryVariablePosition"),FR=i(e=>_s(e,Z5),"isArbitraryVariableSize"),$R=i(e=>_s(e,V5),"isArbitraryVariableImage"),Il=i(e=>_s(e,G5,!0),"isArbitraryVariableShadow"),xs=i((e,t,r)=>{const a=z5.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},"getIsArbitraryValue"),_s=i((e,t,r=!1)=>{const a=U5.exec(e);return a?a[1]?t(a[1]):r:!1},"getIsArbitraryVariable"),$5=i(e=>e==="position"||e==="percentage","isLabelPosition"),V5=i(e=>e==="image"||e==="url","isLabelImage"),Z5=i(e=>e==="length"||e==="size"||e==="bg-size","isLabelSize"),H5=i(e=>e==="length","isLabelLength"),VR=i(e=>e==="number","isLabelNumber"),ZR=i(e=>e==="family-name","isLabelFamilyName"),G5=i(e=>e==="shadow","isLabelShadow"),HR=i(()=>{const e=vr("color"),t=vr("font"),r=vr("text"),a=vr("font-weight"),n=vr("tracking"),s=vr("leading"),o=vr("breakpoint"),h=vr("container"),m=vr("spacing"),v=vr("radius"),c=vr("shadow"),d=vr("inset-shadow"),y=vr("text-shadow"),b=vr("drop-shadow"),x=vr("blur"),k=vr("perspective"),N=vr("aspect"),C=vr("ease"),O=vr("animate"),R=i(()=>["auto","avoid","all","avoid-page","page","left","right","column"],"scaleBreak"),T=i(()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],"scalePosition"),P=i(()=>[...T(),mt,pt],"scalePositionWithArbitrary"),B=i(()=>["auto","hidden","clip","visible","scroll"],"scaleOverflow"),Z=i(()=>["auto","contain","none"],"scaleOverscroll"),H=i(()=>[mt,pt,m],"scaleUnambiguousSpacing"),ee=i(()=>[Ha,"full","auto",...H()],"scaleInset"),$=i(()=>[In,"none","subgrid",mt,pt],"scaleGridTemplateColsRows"),F=i(()=>["auto",{span:["full",In,mt,pt]},In,mt,pt],"scaleGridColRowStartAndEnd"),u=i(()=>[In,"auto",mt,pt],"scaleGridColRowStartOrEnd"),p=i(()=>["auto","min","max","fr",mt,pt],"scaleGridAutoColsRows"),l=i(()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],"scaleAlignPrimaryAxis"),g=i(()=>["start","end","center","stretch","center-safe","end-safe"],"scaleAlignSecondaryAxis"),w=i(()=>["auto",...H()],"scaleMargin"),M=i(()=>[Ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],"scaleSizing"),A=i(()=>[e,mt,pt],"scaleColor"),S=i(()=>[...T(),Vy,$y,{position:[mt,pt]}],"scaleBgPosition"),f=i(()=>["no-repeat",{repeat:["","x","y","space","round"]}],"scaleBgRepeat"),_=i(()=>["auto","cover","contain",FR,BR,{size:[mt,pt]}],"scaleBgSize"),E=i(()=>[Xc,Rs,Wn],"scaleGradientStopPosition"),I=i(()=>["","none","full",v,mt,pt],"scaleRadius"),D=i(()=>["",Lt,Rs,Wn],"scaleBorderWidth"),L=i(()=>["solid","dashed","dotted","double"],"scaleLineStyle"),U=i(()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],"scaleBlendMode"),z=i(()=>[Lt,Xc,Vy,$y],"scaleMaskImagePosition"),V=i(()=>["","none",x,mt,pt],"scaleBlur"),G=i(()=>["none",Lt,mt,pt],"scaleRotate"),q=i(()=>["none",Lt,mt,pt],"scaleScale"),_e=i(()=>[Lt,mt,pt],"scaleSkew"),ae=i(()=>[Ha,"full",...H()],"scaleTranslate");return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nn],breakpoint:[nn],color:[RR],container:[nn],"drop-shadow":[nn],ease:["in","out","in-out"],font:[LR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nn],shadow:[nn],spacing:["px",Lt],text:[nn],"text-shadow":[nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ha,pt,mt,N]}],container:["container"],columns:[{columns:[Lt,pt,mt,h]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{start:ee()}],end:[{end:ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[In,"auto",mt,pt]}],basis:[{basis:[Ha,"full","auto",h,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Lt,Ha,"auto","initial","none",pt]}],grow:[{grow:["",Lt,mt,pt]}],shrink:[{shrink:["",Lt,mt,pt]}],order:[{order:[In,"first","last","none",mt,pt]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":u()}],"col-end":[{"col-end":u()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":u()}],"row-end":[{"row-end":u()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":p()}],"auto-rows":[{"auto-rows":p()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...l(),"normal"]}],"justify-items":[{"justify-items":[...g(),"normal"]}],"justify-self":[{"justify-self":["auto",...g()]}],"align-content":[{content:["normal",...l()]}],"align-items":[{items:[...g(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...g(),{baseline:["","last"]}]}],"place-content":[{"place-content":l()}],"place-items":[{"place-items":[...g(),"baseline"]}],"place-self":[{"place-self":["auto",...g()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[h,"screen",...M()]}],"min-w":[{"min-w":[h,"screen","none",...M()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[o]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",r,Rs,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,mt,Wc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xc,pt]}],"font-family":[{font:[UR,pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,mt,pt]}],"line-clamp":[{"line-clamp":[Lt,"none",mt,Wc]}],leading:[{leading:[s,...H()]}],"list-image":[{"list-image":["none",mt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[Lt,"from-font","auto",mt,Wn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Lt,"auto",mt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:f()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},In,mt,pt],radial:["",mt,pt],conic:[In,mt,pt]},$R,zR]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Lt,mt,pt]}],"outline-w":[{outline:["",Lt,Rs,Wn]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,Il,Nl]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Il,Nl]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Lt,Wn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",y,Il,Nl]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Lt,mt,pt]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[mt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:f()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,pt]}],filter:[{filter:["","none",mt,pt]}],blur:[{blur:V()}],brightness:[{brightness:[Lt,mt,pt]}],contrast:[{contrast:[Lt,mt,pt]}],"drop-shadow":[{"drop-shadow":["","none",b,Il,Nl]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Lt,mt,pt]}],"hue-rotate":[{"hue-rotate":[Lt,mt,pt]}],invert:[{invert:["",Lt,mt,pt]}],saturate:[{saturate:[Lt,mt,pt]}],sepia:[{sepia:["",Lt,mt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,pt]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[Lt,mt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Lt,mt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Lt,mt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Lt,mt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Lt,mt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Lt,mt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Lt,mt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Lt,mt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Lt,"initial",mt,pt]}],ease:[{ease:["linear","initial",C,mt,pt]}],delay:[{delay:[Lt,mt,pt]}],animate:[{animate:["none",O,mt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,mt,pt]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[mt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mt,pt]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Lt,Rs,Wn,Wc]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},"getDefaultConfig"),GR=kR(HR);function Le(...e){return GR(dv(e))}i(Le,"cn");D5.extend(dR);const va=D5,Ma=i(e=>e.substring(0,2),"formatAgentName");function yn(){return URL.createObjectURL(new Blob).split("/").pop()}i(yn,"randomUUID");function Ea(){const e="elizaos-client-user-id",t=localStorage.getItem(e);if(t)return t;const r=yn();return localStorage.setItem(e,r),r}i(Ea,"getEntityId");const J5=i((e,t=xo,r=.8)=>new Promise((a,n)=>{const s=new FileReader;s.onload=o=>{if(o.target?.result){const h=new Image;h.src=o.target.result,h.onload=()=>{const m=document.createElement("canvas");let v=h.width,c=h.height;v>c?v>t&&(c*=t/v,v=t):c>t&&(v*=t/c,c=t),m.width=v,m.height=c,m.getContext("2d")?.drawImage(h,0,0,v,c);const y=m.toDataURL("image/jpeg",r);a(y)},h.onerror=n}},s.onerror=n,s.readAsDataURL(e)}),"compressImage"),Zy=["/images/agents/agent1.png","/images/agents/agent2.png","/images/agents/agent3.png","/images/agents/agent4.png","/images/agents/agent5.png"],_o=i(e=>{if(e?.settings?.avatar)return e.settings.avatar;if(e?.id){let t=0;for(let a=0;a<e.id.length;a++){const n=e.id.charCodeAt(a);t=(t<<5)-t+n,t|=0}const r=Math.abs(t)%Zy.length;return Zy[r]}return"/elizaos-icon.png"},"getAgentAvatar"),pv=i((e,t,r)=>{if(e?.name&&e.name.trim()!=="")return e.name;if(t&&t.length>0){const a=t.filter(n=>n.id!==r&&n.name);if(a.length===0&&t.some(n=>n.id===r&&n.name)){const n=t.find(s=>s.id===r);return n&&n.name||"Unnamed Group"}if(a.length>0)return a.map(n=>n.name).slice(0,3).join(", ")+(a.length>3?"...":"")}return"Unnamed Group"},"generateGroupName"),mv=kn("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-red-800 text-white shadow-xs hover:bg-red-600 focus-visible:ring-red-400/20 dark:focus-visible:ring-red-500",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-auto w-auto"}},defaultVariants:{variant:"default",size:"default"}});function et({className:e,variant:t,size:r,asChild:a=!1,...n}){const s=a?ys:"button";return j.jsx(s,{"data-slot":"button",className:Le(mv({variant:t,size:r,className:e})),...n})}i(et,"Button$1");const hr=J.forwardRef(({className:e,type:t,...r},a)=>j.jsx("input",{type:t,className:Le("flex h-12 w-full rounded border border-input bg-card px-4 py-3 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,"data-testid":r["data-testid"]||"input",...r}));hr.displayName="Input";const ti=J.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...a},n)=>j.jsx(B_,{ref:n,decorative:r,orientation:t,className:Le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),"data-testid":a["data-testid"]||"separator",...a}));ti.displayName=B_.displayName;const K5=z_,JR=U_,KR=F_,q5=J.forwardRef(({className:e,...t},r)=>j.jsx(Mf,{className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));q5.displayName=Mf.displayName;const qR=kn("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),gv=J.forwardRef(({side:e="right",className:t,children:r,...a},n)=>j.jsxs(KR,{children:[j.jsx(q5,{}),j.jsxs(Sf,{ref:n,className:Le(qR({side:e}),t),...a,children:[j.jsxs($_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[j.jsx(Zr,{className:"h-4 w-4"}),j.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));gv.displayName=Sf.displayName;const XR=J.forwardRef(({className:e,...t},r)=>j.jsx(Ef,{ref:r,className:Le("text-lg font-semibold text-foreground",e),...t}));XR.displayName=Ef.displayName;const WR=J.forwardRef(({className:e,...t},r)=>j.jsx(kf,{ref:r,className:Le("text-sm text-muted-foreground",e),...t}));WR.displayName=kf.displayName;function So({className:e,...t}){return j.jsx("div",{className:Le("animate-pulse rounded-md bg-primary/10",e),"data-testid":t["data-testid"]||"skeleton",...t})}i(So,"Skeleton");const ns=jC,cr=NC,dr=IC,lr=J.forwardRef(({className:e,sideOffset:t=4,...r},a)=>j.jsx(CC,{children:j.jsx(V_,{ref:a,sideOffset:t,className:Le("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));lr.displayName=V_.displayName;const Qc=768;function QR(){const[e,t]=J.useState(void 0);return J.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Qc-1}px)`),a=i(()=>{t(window.innerWidth<Qc)},"onChange");return r.addEventListener("change",a),t(window.innerWidth<Qc),()=>r.removeEventListener("change",a)},[]),!!e}i(QR,"useIsMobile");const YR="sidebar:state",eT=3600*24*7,tT="16rem",rT="18rem",iT="3rem",nT="b",X5=J.createContext(null);function Of(){const e=J.useContext(X5);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}i(Of,"useSidebar");const W5=J.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:a,style:n,children:s,...o},h)=>{const m=QR(),[v,c]=J.useState(!1),[d,y]=J.useState(e),b=t??d,x=J.useCallback(O=>{const R=typeof O=="function"?O(b):O;r?r(R):y(R),document.cookie=`${YR}=${R}; path=/; max-age=${eT}`},[r,b]),k=J.useCallback(()=>m?c(O=>!O):x(O=>!O),[m,x,c]);J.useEffect(()=>{const O=i(R=>{R.key===nT&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),k())},"handleKeyDown");return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[k]);const N=b?"expanded":"collapsed",C=J.useMemo(()=>({state:N,open:b,setOpen:x,isMobile:m,openMobile:v,setOpenMobile:c,toggleSidebar:k}),[N,b,x,m,v,c,k]);return j.jsx(X5.Provider,{value:C,children:j.jsx(ns,{delayDuration:0,children:j.jsx("div",{style:{"--sidebar-width":tT,"--sidebar-width-icon":iT,...n},className:Le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",a),ref:h,...o,children:s})})})});W5.displayName="SidebarProvider";const Q5=J.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:a,children:n,...s},o)=>{const{isMobile:h,state:m,openMobile:v,setOpenMobile:c}=Of();return r==="none"?j.jsx("div",{className:Le("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",a),ref:o,...s,children:n}):h?j.jsx(K5,{open:v,onOpenChange:c,...s,children:j.jsx(gv,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":rT},side:e,children:j.jsx("div",{className:"flex h-full w-full flex-col",children:n})})}):j.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?r:"","data-variant":t,"data-side":e,children:[j.jsx("div",{className:Le("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),j.jsx("div",{className:Le("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...s,children:j.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md w-full flex-col group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:n})})]})});Q5.displayName="Sidebar";const aT=J.forwardRef(({className:e,onClick:t,...r},a)=>{const{toggleSidebar:n}=Of();return j.jsxs(et,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Le("h-7 w-7",e),onClick:i(s=>{t?.(s),n()},"onClick"),"data-testid":"sidebar-toggle",...r,children:[j.jsx(OC,{}),j.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});aT.displayName="SidebarTrigger";const sT=J.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:a}=Of();return j.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:Le("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});sT.displayName="SidebarRail";const Y5=J.forwardRef(({className:e,...t},r)=>j.jsx("main",{ref:r,className:Le("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Y5.displayName="SidebarInset";const oT=J.forwardRef(({className:e,...t},r)=>j.jsx(hr,{ref:r,"data-sidebar":"input",className:Le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));oT.displayName="SidebarInput";const e7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"header",className:Le("flex flex-col gap-2 p-2",e),...t}));e7.displayName="SidebarHeader";const t7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"footer",className:Le("flex flex-col gap-2 p-2",e),...t}));t7.displayName="SidebarFooter";const lT=J.forwardRef(({className:e,...t},r)=>j.jsx(ti,{ref:r,"data-sidebar":"separator",className:Le("mx-2 w-auto bg-card-border",e),...t}));lT.displayName="SidebarSeparator";const r7=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"content",className:Le("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));r7.displayName="SidebarContent";const Rf=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"group",className:Le("relative flex w-full min-w-0 flex-col p-0.5",e),...t}));Rf.displayName="SidebarGroup";const uT=J.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?ys:"div";return j.jsx(n,{ref:a,"data-sidebar":"group-label",className:Le("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});uT.displayName="SidebarGroupLabel";const fT=J.forwardRef(({className:e,asChild:t=!1,...r},a)=>{const n=t?ys:"button";return j.jsx(n,{ref:a,"data-sidebar":"group-action",className:Le("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});fT.displayName="SidebarGroupAction";const Tf=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"group-content",className:Le("w-full text-sm p-0 m-0",e),...t}));Tf.displayName="SidebarGroupContent";const ba=J.forwardRef(({className:e,...t},r)=>j.jsx("ul",{ref:r,"data-sidebar":"menu",className:Le("flex w-full min-w-0 flex-col gap-0.5",e),...t}));ba.displayName="SidebarMenu";const Ai=J.forwardRef(({className:e,...t},r)=>j.jsx("li",{ref:r,"data-sidebar":"menu-item",className:Le("group/menu-item relative",e),...t}));Ai.displayName="SidebarMenuItem";const cT=kn("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),ka=J.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:a="default",tooltip:n,className:s,...o},h)=>{const m=e?ys:"button",{isMobile:v,state:c}=Of(),d=j.jsx(m,{ref:h,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:Le(cT({variant:r,size:a}),s),...o});return n?(typeof n=="string"&&(n={children:n}),j.jsxs(cr,{children:[j.jsx(dr,{asChild:!0,children:d}),j.jsx(lr,{side:"right",align:"center",hidden:c!=="collapsed"||v,...n})]})):d});ka.displayName="SidebarMenuButton";const dT=J.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...a},n)=>{const s=t?ys:"button";return j.jsx(s,{ref:n,"data-sidebar":"menu-action",className:Le("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...a})});dT.displayName="SidebarMenuAction";const hT=J.forwardRef(({className:e,...t},r)=>j.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:Le("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));hT.displayName="SidebarMenuBadge";const Pf=J.forwardRef(({className:e,showIcon:t=!1,...r},a)=>{const n=J.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return j.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:Le("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&j.jsx(So,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),j.jsx(So,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":n}})]})});Pf.displayName="SidebarMenuSkeleton";const pT=J.forwardRef(({className:e,...t},r)=>j.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:Le("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));pT.displayName="SidebarMenuSub";const mT=J.forwardRef(({...e},t)=>j.jsx("li",{ref:t,...e}));mT.displayName="SidebarMenuSubItem";const gT=J.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:a,...n},s)=>{const o=e?ys:"a";return j.jsx(o,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:Le("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",a),...n})});gT.displayName="SidebarMenuSubButton";const vT=kn("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function xi({className:e,variant:t,...r}){return j.jsx("div",{className:Le(vT({variant:t}),e),"data-testid":r["data-testid"]||"badge",...r})}i(xi,"Badge$1");const bT=kn("text-sm font-normal text-muted-foreground leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),as=J.forwardRef(({className:e,...t},r)=>j.jsx(Z_,{ref:r,className:Le(bT(),e),...t}));as.displayName=Z_.displayName;const yT=i(({tag:e,onRemove:t})=>j.jsxs(xi,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-accent hover:text-accent-foreground",children:[e,j.jsxs(et,{type:"button",variant:"ghost",size:"icon",onClick:i(()=>t(e),"onClick"),className:"hover:bg-accent/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[j.jsx(Zr,{className:"h-3 w-3"}),j.jsxs("span",{className:"sr-only",children:["Remove ",e]})]})]}),"Tag"),wT=i(({tags:e,onRemove:t})=>j.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.map(r=>j.jsx(yT,{tag:r,onRemove:t},r))}),"TagList"),xT=i(({value:e,onChange:t,onKeyDown:r,onAdd:a})=>j.jsxs("div",{className:"relative",children:[j.jsx(hr,{value:e,onChange:t,onKeyDown:r,placeholder:"Type and press Enter or click Add...",className:Le("bg-background pr-16",!e&&"text-muted-foreground")}),e.trim()&&j.jsx(et,{size:"sm",onClick:a,className:"absolute top-1/2 -translate-y-1/2 right-2 h-7 px-3",children:"Add"})]}),"TagInput");function _T({title:e,data:t,onChange:r}){const[a,n]=J.useState(""),s=i(()=>{const m=a.trim();m&&!t.includes(m)&&(r([...t,m]),n(""))},"addTag"),o=i(m=>{m.key==="Enter"&&(m.preventDefault(),s())},"handleKeyDown"),h=i(m=>{r(t.filter(v=>v!==m))},"removeTag");return j.jsxs("div",{className:"space-y-2",children:[j.jsx(as,{children:e}),j.jsxs("div",{className:"p-2 bg-card rounded border border-input",children:[j.jsx(wT,{tags:t,onRemove:h}),j.jsx(xT,{value:a,onChange:i(m=>n(m.target.value),"onChange"),onKeyDown:o,onAdd:s})]})]})}i(_T,"ArrayInput");const vv=H_,Df=J.forwardRef(({className:e,...t},r)=>j.jsx(ev,{ref:r,className:Le("inline-flex items-center bg-transparent border-b border-sidebar-border w-full",e),...t}));Df.displayName=ev.displayName;const Mo=J.forwardRef(({className:e,...t},r)=>j.jsx(tv,{ref:r,className:Le("inline-flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium text-muted-foreground bg-transparent transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-b-primary relative",e),...t}));Mo.displayName=tv.displayName;const wi=J.forwardRef(({className:e,...t},r)=>j.jsx(G_,{ref:r,className:Le("text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));wi.displayName=G_.displayName;const el=J.forwardRef(({className:e,...t},r)=>j.jsx("textarea",{className:Le("flex min-h-[120px] w-full rounded border border-input bg-card px-4 py-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,"data-testid":t["data-testid"]||"textarea",...t}));el.displayName="Textarea";const ST=1,MT=3e3;let Yc=0;function ET(){return Yc=(Yc+1)%Number.MAX_SAFE_INTEGER,Yc.toString()}i(ET,"genId");const ed=new Map,Hy=i(e=>{if(ed.has(e))return;const t=setTimeout(()=>{ed.delete(e),go({type:"REMOVE_TOAST",toastId:e})},MT);ed.set(e,t)},"addToRemoveQueue"),kT=i((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ST)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;if(r)Hy(r);else for(const a of e.toasts)Hy(a.id);return{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},"reducer"),ku=[];let Au={toasts:[]};function go(e){Au=kT(Au,e);for(const t of ku)t(Au)}i(go,"dispatch");function AT({...e}){const t=ET(),r=i(n=>go({type:"UPDATE_TOAST",toast:{...n,id:t}}),"update"),a=i(()=>go({type:"DISMISS_TOAST",toastId:t}),"dismiss");return go({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i(n=>{n||a()},"onOpenChange")}}),{id:t,dismiss:a,update:r}}i(AT,"toast");function rr(){const[e,t]=J.useState(Au);return J.useEffect(()=>(ku.push(t),()=>{const r=ku.indexOf(t);r>-1&&ku.splice(r,1)}),[]),{...e,toast:AT,dismiss:i(r=>go({type:"DISMISS_TOAST",toastId:r}),"dismiss")}}i(rr,"useToast");function jT(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}i(jT,"sanitizeFilename");function NT(e){const t={id:e.id,name:e.name,username:e.username,system:e.system,templates:e.templates,bio:e.bio,messageExamples:e.messageExamples,postExamples:e.postExamples,topics:e.topics,adjectives:e.adjectives,knowledge:e.knowledge,plugins:e.plugins,settings:e.settings?{...e.settings}:void 0,style:e.style};if(t.settings&&"secrets"in t.settings){const{secrets:r,...a}=t.settings;t.settings=a}return Object.fromEntries(Object.entries(t).filter(([r,a])=>a!=null))}i(NT,"agentToCharacterData");function IT(e){const t=new Date().toISOString().split("T")[0];return`${jT(e||"agent")}-${t}.json`}i(IT,"generateExportFilename");function CT(e,t){const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(r),n=document.createElement("a");n.href=a,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a)}i(CT,"downloadJsonFile");function bv(e,t){try{const r=NT(e),a=IT(e.name);return CT(r,a),t&&t({title:"Character Exported",description:`${e.name}'s character data has been downloaded as ${a}`}),{success:!0,filename:a}}catch(r){return console.error("Failed to export character:",r),t&&t({title:"Export Failed",description:"Failed to export character data. Please try again.",variant:"destructive"}),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}i(bv,"exportCharacterAsJson");const _n=RC,td=PC,Sn=TC,Vi=J.forwardRef(({className:e,children:t,...r},a)=>j.jsxs(J_,{ref:a,className:Le("flex h-12 w-full items-center justify-between whitespace-nowrap rounded border border-input bg-card px-4 py-3 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,j.jsx(DC,{asChild:!0,children:j.jsx(Ji,{className:"h-4 w-4 opacity-50"})})]}));Vi.displayName=J_.displayName;const i7=J.forwardRef(({className:e,...t},r)=>j.jsx(Q_,{ref:r,className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:j.jsx(Y_,{className:"h-4 w-4"})}));i7.displayName=Q_.displayName;const n7=J.forwardRef(({className:e,...t},r)=>j.jsx(e5,{ref:r,className:Le("flex cursor-default items-center justify-center py-1",e),...t,children:j.jsx(Ji,{className:"h-4 w-4"})}));n7.displayName=e5.displayName;const Zi=J.forwardRef(({className:e,children:t,position:r="popper",...a},n)=>j.jsx(LC,{children:j.jsxs(K_,{ref:n,className:Le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-input bg-card text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[j.jsx(i7,{}),j.jsx(BC,{className:Le("p-2",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),j.jsx(n7,{})]})}));Zi.displayName=K_.displayName;const Qm=J.forwardRef(({className:e,...t},r)=>j.jsx(W_,{ref:r,className:Le("px-4 py-2 text-xs font-medium text-muted-foreground uppercase tracking-wider",e),...t}));Qm.displayName=W_.displayName;const Qt=J.forwardRef(({className:e,children:t,...r},a)=>j.jsxs(q_,{ref:a,className:Le("relative flex w-full cursor-default select-none items-center rounded py-3 pl-4 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[j.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:j.jsx(zC,{children:j.jsx(Mn,{className:"h-4 w-4"})})}),j.jsx(UC,{children:t})]}));Qt.displayName=q_.displayName;const Ym=J.forwardRef(({className:e,...t},r)=>j.jsx(X_,{ref:r,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));Ym.displayName=X_.displayName;const a7={elevenlabs:"@elizaos/plugin-elevenlabs",openai:"@elizaos/plugin-openai",none:""},OT=[{value:"none",label:"No Voice",provider:"none"}],RT=[],yv=[{value:"EXAVITQu4vr4xnSDxMaL",label:"ElevenLabs - Rachel (Default)",provider:"elevenlabs",gender:"female",language:"en",features:["natural","professional"]},{value:"21m00Tcm4TlvDq8ikWAM",label:"ElevenLabs - Adam",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]},{value:"AZnzlk1XvdvUeBnXmlld",label:"ElevenLabs - Domi",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"MF3mGyEYCl7XYWbV9V6O",label:"ElevenLabs - Elli",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"TxGEqnHWrfWFTfGW9XjX",label:"ElevenLabs - Josh",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]}],s7=[{value:"alloy",label:"OpenAI - Alloy",provider:"openai",gender:"female",language:"en",features:["natural","versatile"]},{value:"echo",label:"OpenAI - Echo",provider:"openai",gender:"male",language:"en",features:["natural","professional"]},{value:"fable",label:"OpenAI - Fable",provider:"openai",gender:"male",language:"en",features:["natural","narrative"]},{value:"onyx",label:"OpenAI - Onyx",provider:"openai",gender:"male",language:"en",features:["natural","deep"]},{value:"nova",label:"OpenAI - Nova",provider:"openai",gender:"female",language:"en",features:["natural","friendly"]},{value:"shimmer",label:"OpenAI - Shimmer",provider:"openai",gender:"female",language:"en",features:["natural","bright"]},{value:"ash",label:"OpenAI - Ash",provider:"openai",gender:"male",language:"en",features:["natural","calm"]},{value:"coral",label:"OpenAI - Coral",provider:"openai",gender:"female",language:"en",features:["natural","warm"]},{value:"sage",label:"OpenAI - Sage",provider:"openai",gender:"female",language:"en",features:["natural","wise"]},{value:"ballad",label:"OpenAI - Ballad",provider:"openai",gender:"male",language:"en",features:["natural","melodic"]}],o7=i(()=>[...OT,...RT,...yv,...s7],"getAllVoiceModels"),eg=i(e=>o7().find(t=>t.value===e),"getVoiceModelByValue");function TT(){const[e,t]=J.useState(null);return J.useEffect(()=>{const r=localStorage.getItem("ELEVENLABS_API_KEY");t(r)},[]),Nr({queryKey:["elevenlabs-voices",e],queryFn:i(async()=>{if(!e)return[];try{const r=await fetch("https://api.elevenlabs.io/v2/voices",{method:"GET",headers:{"xi-api-key":e}});if(!r.ok)return console.error("Failed to fetch ElevenLabs voices:",r.statusText),[];const a=await r.json(),n=yv.map(h=>h.value);return a.voices.filter(h=>!n.includes(h.voice_id)).map(h=>({value:h.voice_id,label:`ElevenLabs - ${h.name} (Custom)`,provider:"elevenlabs",gender:h.labels?.gender==="female"?"female":"male",language:"en",features:[h.category||"professional",h.labels?.description||"natural"]}))}catch(r){return console.error("Error fetching ElevenLabs voices:",r),[]}},"queryFn"),staleTime:3600*1e3,refetchOnWindowFocus:!1})}i(TT,"useElevenLabsVoices");function Eo({...e}){return j.jsx(FC,{"data-slot":"dropdown-menu",...e})}i(Eo,"DropdownMenu");function ko({...e}){return j.jsx($C,{"data-slot":"dropdown-menu-trigger",...e})}i(ko,"DropdownMenuTrigger");function Ao({className:e,sideOffset:t=4,onPointerDown:r,onPointerDownOutside:a,onCloseAutoFocus:n,...s}){const o=J.useRef(!1),h=J.useCallback(c=>{o.current=!0,r?.(c)},[r]),m=J.useCallback(c=>{o.current=!0,a?.(c)},[a]),v=J.useCallback(c=>{if(n)return n(c);o.current&&(c.preventDefault(),o.current=!1)},[n]);return j.jsx(VC,{children:j.jsx(ZC,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border p-1 shadow-lg",e),onPointerDown:h,onPointerDownOutside:m,onCloseAutoFocus:v,...s})})}i(Ao,"DropdownMenuContent");function Fi({className:e,inset:t,variant:r="default",...a}){return j.jsx(HC,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:Le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground data-[variant=destructive]:font-normal relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a})}i(Fi,"DropdownMenuItem");function PT({className:e,inset:t,...r}){return j.jsx(JC,{"data-slot":"dropdown-menu-label","data-inset":t,className:Le("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8",e),...r})}i(PT,"DropdownMenuLabel");function Zu({className:e,...t}){return j.jsx(GC,{"data-slot":"dropdown-menu-separator",className:Le("bg-border -mx-1 my-1 h-px",e),...t})}i(Zu,"DropdownMenuSeparator");const l7=[{id:"none",label:"None (Start Blank)",description:"Start with an empty configuration",template:{name:"",username:"",system:"",bio:[],topics:[],adjectives:[],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap"],settings:{secrets:{}}}},{id:"discord-bot",label:"Discord Bot",description:"Interactive Discord bot that handles server interactions",template:{name:"Discord Assistant",username:"discordbot",system:"You are a Discord bot designed to assist users in a Discord server. You respond to messages, handle commands, and provide helpful information to community members. You should be friendly, helpful, and maintain a consistent personality. Focus on providing value to the community through clear, concise responses.",bio:["Helpful Discord community assistant","Responds to commands and natural language queries","Assists with server-specific information and resources","Maintains a friendly and helpful tone"],topics:["Discord server","Community assistance","Command handling","Server information"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-discord"],style:{all:["Be friendly and helpful","Use clear, concise language","Follow Discord conventions"],chat:["Respond promptly to queries","Use appropriate formatting for clarity","Reference relevant commands when helpful"],post:["Structure longer responses with clear sections","Use embeds for rich content when appropriate"]},settings:{secrets:{}}}},{id:"telegram-bot",label:"Telegram Bot",description:"Interactive bot for Telegram channels and groups",template:{name:"Telegram Assistant",username:"telegrambot",system:"You are a helpful Telegram bot designed to assist users in channels and groups. You respond to commands and natural language queries, providing information, assistance, and engaging with users in a friendly manner. You can handle both one-on-one conversations and group interactions, adapting your tone and content accordingly while respecting privacy and community guidelines.",bio:["Interactive Telegram bot","Assists users in channels and groups","Responds to commands and natural language"],topics:["Channel information","User assistance","Content sharing","Group moderation","FAQ responses"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-telegram"],style:{all:["Be concise and clear","Use Telegram-friendly formatting","Respond promptly to user queries"],chat:["Handle commands efficiently","Include relevant emoji when appropriate","Maintain conversation context"],post:["Structure longer messages clearly","Use formatting for better readability","Include relevant links when helpful"]},settings:{clients:["telegram"],allowDirectMessages:!0,shouldOnlyJoinInAllowedGroups:!1,messageTrackingLimit:100,secrets:{}}}},{id:"slack-bot",label:"Slack Bot",description:"Interactive bot for Slack workspaces",template:{name:"Slack Assistant",username:"slackbot",system:"You are a specialized assistant for Slack workspaces. You help teams by answering questions, providing information, and facilitating collaboration. You can respond to direct messages and channel mentions, maintaining a helpful and professional tone that aligns with the organization's culture. Keep responses concise and relevant to the conversation context.",bio:["Specialized Slack workspace assistant","Facilitates team collaboration","Provides timely responses to queries"],topics:["Workspace information","Team collaboration","Company policies","Resource access","Task management"],adjectives:["Responsive","Helpful","Organized","Team-oriented","Professional"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-slack"],style:{all:["Be concise and clear","Match the tone of the workspace","Use Slack-appropriate formatting"],chat:["Reference relevant messages when appropriate","Use thread replies for detailed responses","Include emojis when fitting the workspace culture"],post:["Structure information with clear sections","Use bullet points for lists","Include relevant links when helpful"]},settings:{secrets:{}}}},{id:"twitter-agent",label:"Twitter/X Agent",description:"Manages Twitter presence and engagement",template:{name:"Twitter Agent",username:"twitteragent",system:"You are a Twitter engagement specialist designed to help create and manage effective Twitter content. You assist with drafting tweets, responding to mentions, analyzing engagement metrics, and suggesting content strategies. Your tone should match the brand voice while maintaining authenticity and encouraging audience interaction. Keep tweets concise and impactful within character limits.",bio:["Twitter engagement specialist","Creates compelling social content","Manages audience interactions"],topics:["Tweet creation","Audience engagement","Content strategy","Trend analysis","Brand voice"],adjectives:["Engaging","Concise","Strategic","Conversational","Creative"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-twitter"],style:{all:["Be concise and impactful","Stay within character limits","Use platform-appropriate formatting"],chat:["Match brand voice in replies","Be conversational and authentic","Use hashtags strategically"],post:["Draft varied content types","Suggest engaging visuals or polls","Include call-to-actions when appropriate"]},settings:{TWITTER_DRY_RUN:!1,MAX_TWEET_LENGTH:280,TWITTER_ENABLE_POST_GENERATION:!0,TWITTER_POST_INTERVAL_MIN:90,TWITTER_POST_INTERVAL_MAX:180,secrets:{}}}},{id:"github-bot",label:"GitHub Repository Assistant",description:"Helps manage GitHub repositories and development workflows",template:{name:"GitHub Assistant",username:"githubasst",system:"You are a GitHub repository assistant designed to help development teams manage their workflow and codebase. You can assist with pull request reviews, issue triage, documentation updates, and providing information about repository structure and conventions. Maintain a technical but approachable tone, and prioritize accuracy in all technical information.",bio:["GitHub repository management specialist","Assists with development workflows","Provides code and documentation support"],topics:["Pull requests","Issue tracking","Repository structure","Code reviews","Development workflows"],adjectives:["Technical","Precise","Helpful","Organized","Knowledgeable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-github"],style:{all:["Use technically precise language","Reference GitHub concepts appropriately","Link to relevant documentation when helpful"],chat:["Be concise in comments","Format code snippets properly","Summarize technical points clearly"],post:["Structure longer responses with clear headings","Use code blocks with syntax highlighting","Link to specific lines of code when relevant"]},settings:{secrets:{}}}},{id:"instagram-agent",label:"Instagram Content Manager",description:"Creates and manages content for Instagram",template:{name:"Instagram Manager",username:"instagrammgr",system:"You are an Instagram content specialist designed to help create and manage engaging Instagram presence. You assist with content creation, caption writing, hashtag strategy, engagement tactics, and understanding analytics. Your approach emphasizes visual storytelling, authenticity, and building connections with followers. Maintain a voice that matches the brand identity while adapting to Instagram's evolving features and trends.",bio:["Instagram content creation specialist","Develops engaging visual storytelling","Optimizes profile engagement"],topics:["Content creation","Caption writing","Hashtag strategy","Engagement tactics","Visual aesthetics"],adjectives:["Creative","Visual","Engaging","Trend-aware","Authentic"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-instagram"],style:{all:["Balance visual description with compelling text","Maintain brand voice consistency","Consider current platform trends"],chat:["Provide actionable content suggestions","Reference visual elements clearly","Include relevant hashtag recommendations"],post:["Craft captions that enhance visual content","Suggest content series and themes","Balance promotional with authentic content"]},settings:{POST_INTERVAL_MIN:90,POST_INTERVAL_MAX:180,ENABLE_ACTION_PROCESSING:!0,ACTION_INTERVAL:5,MAX_ACTIONS_PROCESSING:1,secrets:{}}}}];function u7(e){return l7.find(t=>t.id===e)}i(u7,"getTemplateById");const wv=KC,DT=qC,f7=J.forwardRef(({className:e,...t},r)=>j.jsx(s5,{className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));f7.displayName=s5.displayName;const Lf=J.forwardRef(({className:e,...t},r)=>j.jsxs(DT,{children:[j.jsx(f7,{}),j.jsx(t5,{ref:r,className:Le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Lf.displayName=t5.displayName;const Bf=i(({className:e,...t})=>j.jsx("div",{className:Le("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader");Bf.displayName="AlertDialogHeader";const zf=i(({className:e,...t})=>j.jsx("div",{className:Le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter");zf.displayName="AlertDialogFooter";const Uf=J.forwardRef(({className:e,...t},r)=>j.jsx(r5,{ref:r,className:Le("text-lg font-semibold",e),...t}));Uf.displayName=r5.displayName;const Ff=J.forwardRef(({className:e,...t},r)=>j.jsx(i5,{ref:r,className:Le("text-sm text-muted-foreground",e),...t}));Ff.displayName=i5.displayName;const $f=J.forwardRef(({className:e,...t},r)=>j.jsx(a5,{ref:r,className:Le(mv(),e),...t}));$f.displayName=a5.displayName;const Vf=J.forwardRef(({className:e,...t},r)=>j.jsx(n5,{ref:r,className:Le(mv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vf.displayName=n5.displayName;function LT({open:e,onOpenChange:t,missingSecrets:r,onConfirm:a,onCancel:n}){return j.jsx(wv,{open:e,onOpenChange:t,children:j.jsxs(Lf,{children:[j.jsxs(Bf,{children:[j.jsxs(Uf,{className:"flex items-center gap-2",children:[j.jsx(ci,{className:"h-5 w-5 text-yellow-500"}),"Missing Required Configuration"]}),j.jsxs(Ff,{className:"space-y-3",children:[j.jsx("p",{children:"The following required secrets are missing or empty. Your agent may not function properly without these values."}),j.jsx("div",{className:"bg-muted rounded-md p-3 space-y-2",children:r.map(s=>j.jsxs("div",{className:"text-sm",children:[j.jsx("code",{className:"font-mono font-semibold",children:s.name}),s.plugin&&j.jsxs("span",{className:"text-muted-foreground ml-2",children:["(required by ",s.plugin,")"]}),s.description&&j.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:s.description})]},s.name))}),j.jsx("p",{className:"text-sm",children:"Do you want to save anyway?"})]})]}),j.jsxs(zf,{children:[j.jsx(Vf,{onClick:n,children:"Go Back"}),j.jsx($f,{onClick:a,className:"bg-yellow-600 hover:bg-yellow-700",children:"Save Anyway"})]})]})})}i(LT,"MissingSecretsDialog");var It={},Cl={exports:{}},Ol={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Gy;function jt(){return Gy||(Gy=1,(function(e,t){var r=Hn(),a=r.Buffer;function n(o,h){for(var m in o)h[m]=o[m]}i(n,"copyProps"),a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=s);function s(o,h,m){return a(o,h,m)}i(s,"SafeBuffer"),s.prototype=Object.create(a.prototype),n(a,s),s.from=function(o,h,m){if(typeof o=="number")throw new TypeError("Argument must not be a number");return a(o,h,m)},s.alloc=function(o,h,m){if(typeof o!="number")throw new TypeError("Argument must be a number");var v=a(o);return h!==void 0?typeof m=="string"?v.fill(h,m):v.fill(h):v.fill(0),v},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Ol,Ol.exports)),Ol.exports}i(jt,"requireSafeBuffer$2");var Jy;function Ss(){if(Jy)return Cl.exports;Jy=1;var e=65536,t=4294967295;function r(){throw new Error(`Secure random number generation is not supported by this browser.
2
2
  Use Chrome, Firefox or Internet Explorer 11`)}i(r,"oldBrowser");var a=jt().Buffer,n=globalThis.crypto||globalThis.msCrypto;n&&n.getRandomValues?Cl.exports=s:Cl.exports=r;function s(o,h){if(o>t)throw new RangeError("requested too many random bytes");var m=a.allocUnsafe(o);if(o>0)if(o>e)for(var v=0;v<o;v+=e)n.getRandomValues(m.slice(v,v+e));else n.getRandomValues(m);return typeof h=="function"?process.nextTick(function(){h(null,m)}):m}return i(s,"randomBytes"),Cl.exports}i(Ss,"requireBrowser$b");var Rl={exports:{}},Ky;function Bt(){return Ky||(Ky=1,typeof Object.create=="function"?Rl.exports=i(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):Rl.exports=i(function(t,r){if(r){t.super_=r;var a=i(function(){},"TempCtor");a.prototype=r.prototype,t.prototype=new a,t.prototype.constructor=t}},"inherits")),Rl.exports}i(Bt,"requireInherits_browser");const BT={},zT=Object.freeze(Object.defineProperty({__proto__:null,default:BT},Symbol.toStringTag,{value:"Module"})),ji=XC(zT);var rd,qy;function UT(){if(qy)return rd;qy=1;var e=jt().Buffer,t=ji.Transform,r=Bt();function a(h){t.call(this),this._block=e.allocUnsafe(h),this._blockSize=h,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(a,"HashBase"),r(a,t),a.prototype._transform=function(h,m,v){var c=null;try{this.update(h,m)}catch(d){c=d}v(c)},a.prototype._flush=function(h){var m=null;try{this.push(this.digest())}catch(v){m=v}h(m)};var n=typeof Uint8Array<"u",s=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);function o(h,m){if(h instanceof e)return h;if(typeof h=="string")return e.from(h,m);if(s&&ArrayBuffer.isView(h)){if(h.byteLength===0)return e.alloc(0);var v=e.from(h.buffer,h.byteOffset,h.byteLength);if(v.byteLength===h.byteLength)return v}if(n&&h instanceof Uint8Array||e.isBuffer(h)&&h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h))return e.from(h);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return i(o,"toBuffer"),a.prototype.update=function(h,m){if(this._finalized)throw new Error("Digest already called");h=o(h,m);for(var v=this._block,c=0;this._blockOffset+h.length-c>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)v[d++]=h[c++];this._update(),this._blockOffset=0}for(;c<h.length;)v[this._blockOffset++]=h[c++];for(var y=0,b=h.length*8;b>0;++y)this._length[y]+=b,b=this._length[y]/4294967296|0,b>0&&(this._length[y]-=4294967296*b);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(h){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var m=this._digest();h!==void 0&&(m=m.toString(h)),this._block.fill(0),this._blockOffset=0;for(var v=0;v<4;++v)this._length[v]=0;return m},a.prototype._digest=function(){throw new Error("_digest is not implemented")},rd=a,rd}i(UT,"requireHashBase$1");var id,Xy;function xv(){if(Xy)return id;Xy=1;var e=Bt(),t=UT(),r=jt().Buffer,a=new Array(16);function n(){t.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}i(n,"MD5"),e(n,t),n.prototype._update=function(){for(var c=a,d=0;d<16;++d)c[d]=this._block.readInt32LE(d*4);var y=this._a,b=this._b,x=this._c,k=this._d;y=o(y,b,x,k,c[0],3614090360,7),k=o(k,y,b,x,c[1],3905402710,12),x=o(x,k,y,b,c[2],606105819,17),b=o(b,x,k,y,c[3],3250441966,22),y=o(y,b,x,k,c[4],4118548399,7),k=o(k,y,b,x,c[5],1200080426,12),x=o(x,k,y,b,c[6],2821735955,17),b=o(b,x,k,y,c[7],4249261313,22),y=o(y,b,x,k,c[8],1770035416,7),k=o(k,y,b,x,c[9],2336552879,12),x=o(x,k,y,b,c[10],4294925233,17),b=o(b,x,k,y,c[11],2304563134,22),y=o(y,b,x,k,c[12],1804603682,7),k=o(k,y,b,x,c[13],4254626195,12),x=o(x,k,y,b,c[14],2792965006,17),b=o(b,x,k,y,c[15],1236535329,22),y=h(y,b,x,k,c[1],4129170786,5),k=h(k,y,b,x,c[6],3225465664,9),x=h(x,k,y,b,c[11],643717713,14),b=h(b,x,k,y,c[0],3921069994,20),y=h(y,b,x,k,c[5],3593408605,5),k=h(k,y,b,x,c[10],38016083,9),x=h(x,k,y,b,c[15],3634488961,14),b=h(b,x,k,y,c[4],3889429448,20),y=h(y,b,x,k,c[9],568446438,5),k=h(k,y,b,x,c[14],3275163606,9),x=h(x,k,y,b,c[3],4107603335,14),b=h(b,x,k,y,c[8],1163531501,20),y=h(y,b,x,k,c[13],2850285829,5),k=h(k,y,b,x,c[2],4243563512,9),x=h(x,k,y,b,c[7],1735328473,14),b=h(b,x,k,y,c[12],2368359562,20),y=m(y,b,x,k,c[5],4294588738,4),k=m(k,y,b,x,c[8],2272392833,11),x=m(x,k,y,b,c[11],1839030562,16),b=m(b,x,k,y,c[14],4259657740,23),y=m(y,b,x,k,c[1],2763975236,4),k=m(k,y,b,x,c[4],1272893353,11),x=m(x,k,y,b,c[7],4139469664,16),b=m(b,x,k,y,c[10],3200236656,23),y=m(y,b,x,k,c[13],681279174,4),k=m(k,y,b,x,c[0],3936430074,11),x=m(x,k,y,b,c[3],3572445317,16),b=m(b,x,k,y,c[6],76029189,23),y=m(y,b,x,k,c[9],3654602809,4),k=m(k,y,b,x,c[12],3873151461,11),x=m(x,k,y,b,c[15],530742520,16),b=m(b,x,k,y,c[2],3299628645,23),y=v(y,b,x,k,c[0],4096336452,6),k=v(k,y,b,x,c[7],1126891415,10),x=v(x,k,y,b,c[14],2878612391,15),b=v(b,x,k,y,c[5],4237533241,21),y=v(y,b,x,k,c[12],1700485571,6),k=v(k,y,b,x,c[3],2399980690,10),x=v(x,k,y,b,c[10],4293915773,15),b=v(b,x,k,y,c[1],2240044497,21),y=v(y,b,x,k,c[8],1873313359,6),k=v(k,y,b,x,c[15],4264355552,10),x=v(x,k,y,b,c[6],2734768916,15),b=v(b,x,k,y,c[13],1309151649,21),y=v(y,b,x,k,c[4],4149444226,6),k=v(k,y,b,x,c[11],3174756917,10),x=v(x,k,y,b,c[2],718787259,15),b=v(b,x,k,y,c[9],3951481745,21),this._a=this._a+y|0,this._b=this._b+b|0,this._c=this._c+x|0,this._d=this._d+k|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var c=r.allocUnsafe(16);return c.writeInt32LE(this._a,0),c.writeInt32LE(this._b,4),c.writeInt32LE(this._c,8),c.writeInt32LE(this._d,12),c};function s(c,d){return c<<d|c>>>32-d}i(s,"rotl");function o(c,d,y,b,x,k,N){return s(c+(d&y|~d&b)+x+k|0,N)+d|0}i(o,"fnF");function h(c,d,y,b,x,k,N){return s(c+(d&b|y&~b)+x+k|0,N)+d|0}i(h,"fnG");function m(c,d,y,b,x,k,N){return s(c+(d^y^b)+x+k|0,N)+d|0}i(m,"fnH");function v(c,d,y,b,x,k,N){return s(c+(y^(d|~b))+x+k|0,N)+d|0}return i(v,"fnI"),id=n,id}i(xv,"requireMd5_js");var nd,Wy;function FT(){if(Wy)return nd;Wy=1;var e={}.toString;return nd=Array.isArray||function(t){return e.call(t)=="[object Array]"},nd}i(FT,"requireIsarray$1");var ad,Qy;function tl(){return Qy||(Qy=1,ad=TypeError),ad}i(tl,"requireType");var sd,Yy;function c7(){return Yy||(Yy=1,sd=Object),sd}i(c7,"requireEsObjectAtoms");var od,e2;function $T(){return e2||(e2=1,od=Error),od}i($T,"requireEsErrors");var ld,t2;function VT(){return t2||(t2=1,ld=EvalError),ld}i(VT,"require_eval");var ud,r2;function ZT(){return r2||(r2=1,ud=RangeError),ud}i(ZT,"requireRange$1");var fd,i2;function HT(){return i2||(i2=1,fd=ReferenceError),fd}i(HT,"requireRef");var cd,n2;function d7(){return n2||(n2=1,cd=SyntaxError),cd}i(d7,"requireSyntax");var dd,a2;function GT(){return a2||(a2=1,dd=URIError),dd}i(GT,"requireUri");var hd,s2;function JT(){return s2||(s2=1,hd=Math.abs),hd}i(JT,"requireAbs");var pd,o2;function KT(){return o2||(o2=1,pd=Math.floor),pd}i(KT,"requireFloor");var md,l2;function qT(){return l2||(l2=1,md=Math.max),md}i(qT,"requireMax");var gd,u2;function XT(){return u2||(u2=1,gd=Math.min),gd}i(XT,"requireMin");var vd,f2;function WT(){return f2||(f2=1,vd=Math.pow),vd}i(WT,"requirePow");var bd,c2;function QT(){return c2||(c2=1,bd=Math.round),bd}i(QT,"requireRound");var yd,d2;function YT(){return d2||(d2=1,yd=Number.isNaN||i(function(t){return t!==t},"isNaN")),yd}i(YT,"require_isNaN");var wd,h2;function eP(){if(h2)return wd;h2=1;var e=YT();return wd=i(function(r){return e(r)||r===0?r:r<0?-1:1},"sign"),wd}i(eP,"requireSign$1");var xd,p2;function tP(){return p2||(p2=1,xd=Object.getOwnPropertyDescriptor),xd}i(tP,"requireGOPD");var _d,m2;function rl(){if(m2)return _d;m2=1;var e=tP();if(e)try{e([],"length")}catch{e=null}return _d=e,_d}i(rl,"requireGopd");var Sd,g2;function Zf(){if(g2)return Sd;g2=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Sd=e,Sd}i(Zf,"requireEsDefineProperty");var Md,v2;function h7(){return v2||(v2=1,Md=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),a=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(t,r);if(h.value!==n||h.enumerable!==!0)return!1}return!0},"hasSymbols")),Md}i(h7,"requireShams$1");var Ed,b2;function rP(){if(b2)return Ed;b2=1;var e=typeof Symbol<"u"&&Symbol,t=h7();return Ed=i(function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},"hasNativeSymbols"),Ed}i(rP,"requireHasSymbols");var kd,y2;function p7(){return y2||(y2=1,kd=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),kd}i(p7,"requireReflect_getPrototypeOf");var Ad,w2;function m7(){if(w2)return Ad;w2=1;var e=c7();return Ad=e.getPrototypeOf||null,Ad}i(m7,"requireObject_getPrototypeOf");var jd,x2;function iP(){if(x2)return jd;x2=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,a="[object Function]",n=i(function(m,v){for(var c=[],d=0;d<m.length;d+=1)c[d]=m[d];for(var y=0;y<v.length;y+=1)c[y+m.length]=v[y];return c},"concatty"),s=i(function(m,v){for(var c=[],d=v,y=0;d<m.length;d+=1,y+=1)c[y]=m[d];return c},"slicy"),o=i(function(h,m){for(var v="",c=0;c<h.length;c+=1)v+=h[c],c+1<h.length&&(v+=m);return v},"joiny");return jd=i(function(m){var v=this;if(typeof v!="function"||t.apply(v)!==a)throw new TypeError(e+v);for(var c=s(arguments,1),d,y=i(function(){if(this instanceof d){var C=v.apply(this,n(c,arguments));return Object(C)===C?C:this}return v.apply(m,n(c,arguments))},"binder"),b=r(0,v.length-c.length),x=[],k=0;k<b;k++)x[k]="$"+k;if(d=Function("binder","return function ("+o(x,",")+"){ return binder.apply(this,arguments); }")(y),v.prototype){var N=i(function(){},"Empty");N.prototype=v.prototype,d.prototype=new N,N.prototype=null}return d},"bind"),jd}i(iP,"requireImplementation");var Nd,_2;function il(){if(_2)return Nd;_2=1;var e=iP();return Nd=Function.prototype.bind||e,Nd}i(il,"requireFunctionBind");var Id,S2;function _v(){return S2||(S2=1,Id=Function.prototype.call),Id}i(_v,"requireFunctionCall");var Cd,M2;function Sv(){return M2||(M2=1,Cd=Function.prototype.apply),Cd}i(Sv,"requireFunctionApply");var Od,E2;function nP(){return E2||(E2=1,Od=typeof Reflect<"u"&&Reflect&&Reflect.apply),Od}i(nP,"requireReflectApply");var Rd,k2;function g7(){if(k2)return Rd;k2=1;var e=il(),t=Sv(),r=_v(),a=nP();return Rd=a||e.call(r,t),Rd}i(g7,"requireActualApply");var Td,A2;function Mv(){if(A2)return Td;A2=1;var e=il(),t=tl(),r=_v(),a=g7();return Td=i(function(s){if(s.length<1||typeof s[0]!="function")throw new t("a function is required");return a(e,r,s)},"callBindBasic"),Td}i(Mv,"requireCallBindApplyHelpers");var Pd,j2;function aP(){if(j2)return Pd;j2=1;var e=Mv(),t=rl(),r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var a=!!r&&t&&t(Object.prototype,"__proto__"),n=Object,s=n.getPrototypeOf;return Pd=a&&typeof a.get=="function"?e([a.get]):typeof s=="function"?i(function(h){return s(h==null?h:n(h))},"getDunder"):!1,Pd}i(aP,"requireGet");var Dd,N2;function v7(){if(N2)return Dd;N2=1;var e=p7(),t=m7(),r=aP();return Dd=e?i(function(n){return e(n)},"getProto"):t?i(function(n){if(!n||typeof n!="object"&&typeof n!="function")throw new TypeError("getProto: not an object");return t(n)},"getProto"):r?i(function(n){return r(n)},"getProto"):null,Dd}i(v7,"requireGetProto");var Ld,I2;function sP(){if(I2)return Ld;I2=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=il();return Ld=r.call(e,t),Ld}i(sP,"requireHasown");var Bd,C2;function b7(){if(C2)return Bd;C2=1;var e,t=c7(),r=$T(),a=VT(),n=ZT(),s=HT(),o=d7(),h=tl(),m=GT(),v=JT(),c=KT(),d=qT(),y=XT(),b=WT(),x=QT(),k=eP(),N=Function,C=i(function(G){try{return N('"use strict"; return ('+G+").constructor;")()}catch{}},"getEvalledConstructor"),O=rl(),R=Zf(),T=i(function(){throw new h},"throwTypeError"),P=O?(function(){try{return arguments.callee,T}catch{try{return O(arguments,"callee").get}catch{return T}}})():T,B=rP()(),Z=v7(),H=m7(),ee=p7(),$=Sv(),F=_v(),u={},p=typeof Uint8Array>"u"||!Z?e:Z(Uint8Array),l={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":B&&Z?Z([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":u,"%AsyncGenerator%":u,"%AsyncGeneratorFunction%":u,"%AsyncIteratorPrototype%":u,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":N,"%GeneratorFunction%":u,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&Z?Z(Z([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!B||!Z?e:Z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":n,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!B||!Z?e:Z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&Z?Z(""[Symbol.iterator]()):e,"%Symbol%":B?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":P,"%TypedArray%":p,"%TypeError%":h,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":$,"%Object.defineProperty%":R,"%Object.getPrototypeOf%":H,"%Math.abs%":v,"%Math.floor%":c,"%Math.max%":d,"%Math.min%":y,"%Math.pow%":b,"%Math.round%":x,"%Math.sign%":k,"%Reflect.getPrototypeOf%":ee};if(Z)try{null.error}catch(G){var g=Z(Z(G));l["%Error.prototype%"]=g}var w=i(function G(q){var _e;if(q==="%AsyncFunction%")_e=C("async function () {}");else if(q==="%GeneratorFunction%")_e=C("function* () {}");else if(q==="%AsyncGeneratorFunction%")_e=C("async function* () {}");else if(q==="%AsyncGenerator%"){var ae=G("%AsyncGeneratorFunction%");ae&&(_e=ae.prototype)}else if(q==="%AsyncIteratorPrototype%"){var se=G("%AsyncGenerator%");se&&Z&&(_e=Z(se.prototype))}return l[q]=_e,_e},"doEval"),M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=il(),S=sP(),f=A.call(F,Array.prototype.concat),_=A.call($,Array.prototype.splice),E=A.call(F,String.prototype.replace),I=A.call(F,String.prototype.slice),D=A.call(F,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,z=i(function(q){var _e=I(q,0,1),ae=I(q,-1);if(_e==="%"&&ae!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(ae==="%"&&_e!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var se=[];return E(q,L,function(ye,K,re,X){se[se.length]=re?E(X,U,"$1"):K||ye}),se},"stringToPath"),V=i(function(q,_e){var ae=q,se;if(S(M,ae)&&(se=M[ae],ae="%"+se[0]+"%"),S(l,ae)){var ye=l[ae];if(ye===u&&(ye=w(ae)),typeof ye>"u"&&!_e)throw new h("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:se,name:ae,value:ye}}throw new o("intrinsic "+q+" does not exist!")},"getBaseIntrinsic");return Bd=i(function(q,_e){if(typeof q!="string"||q.length===0)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof _e!="boolean")throw new h('"allowMissing" argument must be a boolean');if(D(/^%?[^%]*%?$/,q)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ae=z(q),se=ae.length>0?ae[0]:"",ye=V("%"+se+"%",_e),K=ye.name,re=ye.value,X=!1,W=ye.alias;W&&(se=W[0],_(ae,f([0,1],W)));for(var le=1,ke=!0;le<ae.length;le+=1){var pe=ae[le],fe=I(pe,0,1),Q=I(pe,-1);if((fe==='"'||fe==="'"||fe==="`"||Q==='"'||Q==="'"||Q==="`")&&fe!==Q)throw new o("property names with quotes must have matching quotes");if((pe==="constructor"||!ke)&&(X=!0),se+="."+pe,K="%"+se+"%",S(l,K))re=l[K];else if(re!=null){if(!(pe in re)){if(!_e)throw new h("base intrinsic for "+q+" exists, but the property is not available.");return}if(O&&le+1>=ae.length){var Y=O(re,pe);ke=!!Y,ke&&"get"in Y&&!("originalValue"in Y.get)?re=Y.get:re=re[pe]}else ke=S(re,pe),re=re[pe];ke&&!X&&(l[K]=re)}}return re},"GetIntrinsic"),Bd}i(b7,"requireGetIntrinsic");var zd,O2;function y7(){if(O2)return zd;O2=1;var e=b7(),t=Mv(),r=t([e("%String.prototype.indexOf%")]);return zd=i(function(n,s){var o=e(n,!!s);return typeof o=="function"&&r(n,".prototype.")>-1?t([o]):o},"callBoundIntrinsic"),zd}i(y7,"requireCallBound");var Ud,R2;function oP(){if(R2)return Ud;R2=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,a;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:i(function(){throw a},"get")}),a={},t(function(){throw 42},null,r)}catch(O){O!==a&&(t=null)}else t=null;var n=/^\s*class\b/,s=i(function(R){try{var T=e.call(R);return n.test(T)}catch{return!1}},"isES6ClassFunction"),o=i(function(R){try{return s(R)?!1:(e.call(R),!0)}catch{return!1}},"tryFunctionToStr"),h=Object.prototype.toString,m="[object Object]",v="[object Function]",c="[object GeneratorFunction]",d="[object HTMLAllCollection]",y="[object HTML document.all class]",b="[object HTMLCollection]",x=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),N=i(function(){return!1},"isDocumentDotAll");if(typeof document=="object"){var C=document.all;h.call(C)===h.call(document.all)&&(N=i(function(R){if((k||!R)&&(typeof R>"u"||typeof R=="object"))try{var T=h.call(R);return(T===d||T===y||T===b||T===m)&&R("")==null}catch{}return!1},"isDocumentDotAll2"))}return Ud=t?i(function(R){if(N(R))return!0;if(!R||typeof R!="function"&&typeof R!="object")return!1;try{t(R,null,r)}catch(T){if(T!==a)return!1}return!s(R)&&o(R)},"isCallable"):i(function(R){if(N(R))return!0;if(!R||typeof R!="function"&&typeof R!="object")return!1;if(x)return o(R);if(s(R))return!1;var T=h.call(R);return T!==v&&T!==c&&!/^\[object HTML/.test(T)?!1:o(R)},"isCallable2"),Ud}i(oP,"requireIsCallable");var Fd,T2;function lP(){if(T2)return Fd;T2=1;var e=oP(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,a=i(function(m,v,c){for(var d=0,y=m.length;d<y;d++)r.call(m,d)&&(c==null?v(m[d],d,m):v.call(c,m[d],d,m))},"forEachArray"),n=i(function(m,v,c){for(var d=0,y=m.length;d<y;d++)c==null?v(m.charAt(d),d,m):v.call(c,m.charAt(d),d,m)},"forEachString"),s=i(function(m,v,c){for(var d in m)r.call(m,d)&&(c==null?v(m[d],d,m):v.call(c,m[d],d,m))},"forEachObject");function o(h){return t.call(h)==="[object Array]"}return i(o,"isArray"),Fd=i(function(m,v,c){if(!e(v))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=c),o(m)?a(m,v,d):typeof m=="string"?n(m,v,d):s(m,v,d)},"forEach"),Fd}i(lP,"requireForEach");var $d,P2;function uP(){return P2||(P2=1,$d=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),$d}i(uP,"requirePossibleTypedArrayNames");var Vd,D2;function fP(){if(D2)return Vd;D2=1;var e=uP(),t=globalThis;return Vd=i(function(){for(var a=[],n=0;n<e.length;n++)typeof t[e[n]]=="function"&&(a[a.length]=e[n]);return a},"availableTypedArrays"),Vd}i(fP,"requireAvailableTypedArrays");var Zd={exports:{}},Hd,L2;function cP(){if(L2)return Hd;L2=1;var e=Zf(),t=d7(),r=tl(),a=rl();return Hd=i(function(s,o,h){if(!s||typeof s!="object"&&typeof s!="function")throw new r("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var m=arguments.length>3?arguments[3]:null,v=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,y=!!a&&a(s,o);if(e)e(s,o,{configurable:c===null&&y?y.configurable:!c,enumerable:m===null&&y?y.enumerable:!m,value:h,writable:v===null&&y?y.writable:!v});else if(d||!m&&!v&&!c)s[o]=h;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},"defineDataProperty"),Hd}i(cP,"requireDefineDataProperty");var Gd,B2;function dP(){if(B2)return Gd;B2=1;var e=Zf(),t=i(function(){return!!e},"hasPropertyDescriptors");return t.hasArrayLengthDefineBug=i(function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},"hasArrayLengthDefineBug"),Gd=t,Gd}i(dP,"requireHasPropertyDescriptors");var Jd,z2;function hP(){if(z2)return Jd;z2=1;var e=b7(),t=cP(),r=dP()(),a=rl(),n=tl(),s=e("%Math.floor%");return Jd=i(function(h,m){if(typeof h!="function")throw new n("`fn` is not a function");if(typeof m!="number"||m<0||m>4294967295||s(m)!==m)throw new n("`length` must be a positive 32-bit integer");var v=arguments.length>2&&!!arguments[2],c=!0,d=!0;if("length"in h&&a){var y=a(h,"length");y&&!y.configurable&&(c=!1),y&&!y.writable&&(d=!1)}return(c||d||!v)&&(r?t(h,"length",m,!0,!0):t(h,"length",m)),h},"setFunctionLength"),Jd}i(hP,"requireSetFunctionLength");var Kd,U2;function pP(){if(U2)return Kd;U2=1;var e=il(),t=Sv(),r=g7();return Kd=i(function(){return r(e,t,arguments)},"applyBind"),Kd}i(pP,"requireApplyBind");var F2;function mP(){return F2||(F2=1,(function(e){var t=hP(),r=Zf(),a=Mv(),n=pP();e.exports=i(function(o){var h=a(arguments),m=o.length-(arguments.length-1);return t(h,1+(m>0?m:0),!0)},"callBind"),r?r(e.exports,"apply",{value:n}):e.exports.apply=n})(Zd)),Zd.exports}i(mP,"requireCallBind");var qd,$2;function gP(){if($2)return qd;$2=1;var e=h7();return qd=i(function(){return e()&&!!Symbol.toStringTag},"hasToStringTagShams"),qd}i(gP,"requireShams");var Xd,V2;function vP(){if(V2)return Xd;V2=1;var e=lP(),t=fP(),r=mP(),a=y7(),n=rl(),s=v7(),o=a("Object.prototype.toString"),h=gP()(),m=globalThis,v=t(),c=a("String.prototype.slice"),d=a("Array.prototype.indexOf",!0)||i(function(N,C){for(var O=0;O<N.length;O+=1)if(N[O]===C)return O;return-1},"indexOf"),y={__proto__:null};h&&n&&s?e(v,function(k){var N=new m[k];if(Symbol.toStringTag in N&&s){var C=s(N),O=n(C,Symbol.toStringTag);if(!O&&C){var R=s(C);O=n(R,Symbol.toStringTag)}y["$"+k]=r(O.get)}}):e(v,function(k){var N=new m[k],C=N.slice||N.set;C&&(y["$"+k]=r(C))});var b=i(function(N){var C=!1;return e(y,function(O,R){if(!C)try{"$"+O(N)===R&&(C=c(R,1))}catch{}}),C},"tryAllTypedArrays"),x=i(function(N){var C=!1;return e(y,function(O,R){if(!C)try{O(N),C=c(R,1)}catch{}}),C},"tryAllSlices");return Xd=i(function(N){if(!N||typeof N!="object")return!1;if(!h){var C=c(o(N),8,-1);return d(v,C)>-1?C:C!=="Object"?!1:x(N)}return n?b(N):null},"whichTypedArray"),Xd}i(vP,"requireWhichTypedArray");var Wd,Z2;function bP(){if(Z2)return Wd;Z2=1;var e=vP();return Wd=i(function(r){return!!e(r)},"isTypedArray"),Wd}i(bP,"requireIsTypedArray");var Qd,H2;function yP(){if(H2)return Qd;H2=1;var e=tl(),t=y7(),r=t("TypedArray.prototype.buffer",!0),a=bP();return Qd=r||i(function(s){if(!a(s))throw new e("Not a Typed Array");return s.buffer},"typedArrayBuffer"),Qd}i(yP,"requireTypedArrayBuffer");var Yd,G2;function Hf(){if(G2)return Yd;G2=1;var e=jt().Buffer,t=FT(),r=yP(),a=ArrayBuffer.isView||i(function(m){try{return r(m),!0}catch{return!1}},"isView"),n=typeof Uint8Array<"u",s=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o=s&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return Yd=i(function(m,v){if(e.isBuffer(m))return m.constructor&&!("isBuffer"in m)?e.from(m):m;if(typeof m=="string")return e.from(m,v);if(s&&a(m)){if(m.byteLength===0)return e.alloc(0);if(o){var c=e.from(m.buffer,m.byteOffset,m.byteLength);if(c.byteLength===m.byteLength)return c}var d=m instanceof Uint8Array?m:new Uint8Array(m.buffer,m.byteOffset,m.byteLength),y=e.from(d);if(y.length===m.byteLength)return y}if(n&&m instanceof Uint8Array)return e.from(m);var b=t(m);if(b)for(var x=0;x<m.length;x+=1){var k=m[x];if(typeof k!="number"||k<0||k>255||~~k!==k)throw new RangeError("Array items must be numbers in the range 0-255.")}if(b||e.isBuffer(m)&&m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m))return e.from(m);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},"toBuffer"),Yd}i(Hf,"requireToBuffer$2");var eh,J2;function wP(){if(J2)return eh;J2=1;var e=jt().Buffer,t=Hf(),r=typeof Uint8Array<"u",a=r&&typeof ArrayBuffer<"u",n=a&&ArrayBuffer.isView;return eh=i(function(s,o){if(typeof s=="string"||e.isBuffer(s)||r&&s instanceof Uint8Array||n&&n(s))return t(s,o);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},"toBuffer_1$1"),eh}i(wP,"requireToBuffer$1");var Tl={exports:{}},Pl={exports:{}},K2;function Gf(){if(K2)return Pl.exports;K2=1,typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Pl.exports={nextTick:e}:Pl.exports=process;function e(t,r,a,n){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,o,h;switch(s){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(i(function(){t.call(null,r)},"afterTickOne"));case 3:return process.nextTick(i(function(){t.call(null,r,a)},"afterTickTwo"));case 4:return process.nextTick(i(function(){t.call(null,r,a,n)},"afterTickThree"));default:for(o=new Array(s-1),h=0;h<o.length;)o[h++]=arguments[h];return process.nextTick(i(function(){t.apply(null,o)},"afterTick"))}}return i(e,"nextTick"),Pl.exports}i(Gf,"requireProcessNextickArgs");var th,q2;function xP(){if(q2)return th;q2=1;var e={}.toString;return th=Array.isArray||function(t){return e.call(t)=="[object Array]"},th}i(xP,"requireIsarray");var rh,X2;function w7(){return X2||(X2=1,rh=ji.EventEmitter),rh}i(w7,"requireStreamBrowser");var Dl={exports:{}},W2;function Ev(){return W2||(W2=1,(function(e,t){var r=Hn(),a=r.Buffer;function n(o,h){for(var m in o)h[m]=o[m]}i(n,"copyProps"),a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=s);function s(o,h,m){return a(o,h,m)}i(s,"SafeBuffer"),n(a,s),s.from=function(o,h,m){if(typeof o=="number")throw new TypeError("Argument must not be a number");return a(o,h,m)},s.alloc=function(o,h,m){if(typeof o!="number")throw new TypeError("Argument must be a number");var v=a(o);return h!==void 0?typeof m=="string"?v.fill(h,m):v.fill(h):v.fill(0),v},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Dl,Dl.exports)),Dl.exports}i(Ev,"requireSafeBuffer$1");var _r={},Q2;function nl(){if(Q2)return _r;Q2=1;function e(k){return Array.isArray?Array.isArray(k):x(k)==="[object Array]"}i(e,"isArray"),_r.isArray=e;function t(k){return typeof k=="boolean"}i(t,"isBoolean"),_r.isBoolean=t;function r(k){return k===null}i(r,"isNull"),_r.isNull=r;function a(k){return k==null}i(a,"isNullOrUndefined"),_r.isNullOrUndefined=a;function n(k){return typeof k=="number"}i(n,"isNumber"),_r.isNumber=n;function s(k){return typeof k=="string"}i(s,"isString"),_r.isString=s;function o(k){return typeof k=="symbol"}i(o,"isSymbol"),_r.isSymbol=o;function h(k){return k===void 0}i(h,"isUndefined"),_r.isUndefined=h;function m(k){return x(k)==="[object RegExp]"}i(m,"isRegExp"),_r.isRegExp=m;function v(k){return typeof k=="object"&&k!==null}i(v,"isObject"),_r.isObject=v;function c(k){return x(k)==="[object Date]"}i(c,"isDate"),_r.isDate=c;function d(k){return x(k)==="[object Error]"||k instanceof Error}i(d,"isError"),_r.isError=d;function y(k){return typeof k=="function"}i(y,"isFunction"),_r.isFunction=y;function b(k){return k===null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||typeof k=="symbol"||typeof k>"u"}i(b,"isPrimitive"),_r.isPrimitive=b,_r.isBuffer=Hn().Buffer.isBuffer;function x(k){return Object.prototype.toString.call(k)}return i(x,"objectToString"),_r}i(nl,"requireUtil$1");var ih={exports:{}},Y2;function _P(){return Y2||(Y2=1,(function(e){function t(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}i(t,"_classCallCheck");var r=Ev().Buffer,a=ji;function n(s,o,h){s.copy(o,h)}i(n,"copyBuffer"),e.exports=(function(){function s(){t(this,s),this.head=null,this.tail=null,this.length=0}return i(s,"BufferList"),s.prototype.push=i(function(h){var m={data:h,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length},"push"),s.prototype.unshift=i(function(h){var m={data:h,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length},"unshift"),s.prototype.shift=i(function(){if(this.length!==0){var h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}},"shift"),s.prototype.clear=i(function(){this.head=this.tail=null,this.length=0},"clear"),s.prototype.join=i(function(h){if(this.length===0)return"";for(var m=this.head,v=""+m.data;m=m.next;)v+=h+m.data;return v},"join"),s.prototype.concat=i(function(h){if(this.length===0)return r.alloc(0);for(var m=r.allocUnsafe(h>>>0),v=this.head,c=0;v;)n(v.data,m,c),c+=v.data.length,v=v.next;return m},"concat"),s})(),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var s=a.inspect({length:this.length});return this.constructor.name+" "+s})})(ih)),ih.exports}i(_P,"requireBufferList");var nh,ew;function x7(){if(ew)return nh;ew=1;var e=Gf();function t(n,s){var o=this,h=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return h||m?(s?s(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(a,this,n)):e.nextTick(a,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(v){!s&&v?o._writableState?o._writableState.errorEmitted||(o._writableState.errorEmitted=!0,e.nextTick(a,o,v)):e.nextTick(a,o,v):s&&s(v)}),this)}i(t,"destroy");function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}i(r,"undestroy");function a(n,s){n.emit("error",s)}return i(a,"emitErrorNT"),nh={destroy:t,undestroy:r},nh}i(x7,"requireDestroy");var ah,tw;function SP(){if(tw)return ah;tw=1,ah=e;function e(r,a){if(t("noDeprecation"))return r;var n=!1;function s(){if(!n){if(t("throwDeprecation"))throw new Error(a);t("traceDeprecation")?console.trace(a):console.warn(a),n=!0}return r.apply(this,arguments)}return i(s,"deprecated"),s}i(e,"deprecate");function t(r){try{if(!globalThis.localStorage)return!1}catch{return!1}var a=globalThis.localStorage[r];return a==null?!1:String(a).toLowerCase()==="true"}return i(t,"config"),ah}i(SP,"requireBrowser$a");var sh,rw;function _7(){if(rw)return sh;rw=1;var e=Gf();sh=k;function t(M){var A=this;this.next=null,this.entry=null,this.finish=function(){w(A,M)}}i(t,"CorkedRequest");var r=e.nextTick,a;k.WritableState=b;var n=Object.create(nl());n.inherits=Bt();var s={deprecate:SP()},o=w7(),h=Ev().Buffer,m=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function v(M){return h.from(M)}i(v,"_uint8ArrayToBuffer");function c(M){return h.isBuffer(M)||M instanceof m}i(c,"_isUint8Array");var d=x7();n.inherits(k,o);function y(){}i(y,"nop");function b(M,A){a=a||fs(),M=M||{};var S=A instanceof a;this.objectMode=!!M.objectMode,S&&(this.objectMode=this.objectMode||!!M.writableObjectMode);var f=M.highWaterMark,_=M.writableHighWaterMark,E=this.objectMode?16:16*1024;f||f===0?this.highWaterMark=f:S&&(_||_===0)?this.highWaterMark=_:this.highWaterMark=E,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=M.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(D){Z(A,D)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}i(b,"WritableState"),b.prototype.getBuffer=i(function(){for(var A=this.bufferedRequest,S=[];A;)S.push(A),A=A.next;return S},"getBuffer"),(function(){try{Object.defineProperty(b.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var x;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:i(function(M){return x.call(this,M)?!0:this!==k?!1:M&&M._writableState instanceof b},"value")})):x=i(function(M){return M instanceof this},"realHasInstance");function k(M){if(a=a||fs(),!x.call(k,this)&&!(this instanceof a))return new k(M);this._writableState=new b(M,this),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),o.call(this)}i(k,"Writable"),k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(M,A){var S=new Error("write after end");M.emit("error",S),e.nextTick(A,S)}i(N,"writeAfterEnd");function C(M,A,S,f){var _=!0,E=!1;return S===null?E=new TypeError("May not write null values to stream"):typeof S!="string"&&S!==void 0&&!A.objectMode&&(E=new TypeError("Invalid non-string/buffer chunk")),E&&(M.emit("error",E),e.nextTick(f,E),_=!1),_}i(C,"validChunk"),k.prototype.write=function(M,A,S){var f=this._writableState,_=!1,E=!f.objectMode&&c(M);return E&&!h.isBuffer(M)&&(M=v(M)),typeof A=="function"&&(S=A,A=null),E?A="buffer":A||(A=f.defaultEncoding),typeof S!="function"&&(S=y),f.ended?N(this,S):(E||C(this,f,M,S))&&(f.pendingcb++,_=R(this,f,E,M,A,S)),_},k.prototype.cork=function(){var M=this._writableState;M.corked++},k.prototype.uncork=function(){var M=this._writableState;M.corked&&(M.corked--,!M.writing&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&$(this,M))},k.prototype.setDefaultEncoding=i(function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+A);return this._writableState.defaultEncoding=A,this},"setDefaultEncoding");function O(M,A,S){return!M.objectMode&&M.decodeStrings!==!1&&typeof A=="string"&&(A=h.from(A,S)),A}i(O,"decodeChunk"),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function R(M,A,S,f,_,E){if(!S){var I=O(A,f,_);f!==I&&(S=!0,_="buffer",f=I)}var D=A.objectMode?1:f.length;A.length+=D;var L=A.length<A.highWaterMark;if(L||(A.needDrain=!0),A.writing||A.corked){var U=A.lastBufferedRequest;A.lastBufferedRequest={chunk:f,encoding:_,isBuf:S,callback:E,next:null},U?U.next=A.lastBufferedRequest:A.bufferedRequest=A.lastBufferedRequest,A.bufferedRequestCount+=1}else T(M,A,!1,D,f,_,E);return L}i(R,"writeOrBuffer");function T(M,A,S,f,_,E,I){A.writelen=f,A.writecb=I,A.writing=!0,A.sync=!0,S?M._writev(_,A.onwrite):M._write(_,E,A.onwrite),A.sync=!1}i(T,"doWrite");function P(M,A,S,f,_){--A.pendingcb,S?(e.nextTick(_,f),e.nextTick(l,M,A),M._writableState.errorEmitted=!0,M.emit("error",f)):(_(f),M._writableState.errorEmitted=!0,M.emit("error",f),l(M,A))}i(P,"onwriteError");function B(M){M.writing=!1,M.writecb=null,M.length-=M.writelen,M.writelen=0}i(B,"onwriteStateUpdate");function Z(M,A){var S=M._writableState,f=S.sync,_=S.writecb;if(B(S),A)P(M,S,f,A,_);else{var E=F(S);!E&&!S.corked&&!S.bufferProcessing&&S.bufferedRequest&&$(M,S),f?r(H,M,S,E,_):H(M,S,E,_)}}i(Z,"onwrite");function H(M,A,S,f){S||ee(M,A),A.pendingcb--,f(),l(M,A)}i(H,"afterWrite");function ee(M,A){A.length===0&&A.needDrain&&(A.needDrain=!1,M.emit("drain"))}i(ee,"onwriteDrain");function $(M,A){A.bufferProcessing=!0;var S=A.bufferedRequest;if(M._writev&&S&&S.next){var f=A.bufferedRequestCount,_=new Array(f),E=A.corkedRequestsFree;E.entry=S;for(var I=0,D=!0;S;)_[I]=S,S.isBuf||(D=!1),S=S.next,I+=1;_.allBuffers=D,T(M,A,!0,A.length,_,"",E.finish),A.pendingcb++,A.lastBufferedRequest=null,E.next?(A.corkedRequestsFree=E.next,E.next=null):A.corkedRequestsFree=new t(A),A.bufferedRequestCount=0}else{for(;S;){var L=S.chunk,U=S.encoding,z=S.callback,V=A.objectMode?1:L.length;if(T(M,A,!1,V,L,U,z),S=S.next,A.bufferedRequestCount--,A.writing)break}S===null&&(A.lastBufferedRequest=null)}A.bufferedRequest=S,A.bufferProcessing=!1}i($,"clearBuffer"),k.prototype._write=function(M,A,S){S(new Error("_write() is not implemented"))},k.prototype._writev=null,k.prototype.end=function(M,A,S){var f=this._writableState;typeof M=="function"?(S=M,M=null,A=null):typeof A=="function"&&(S=A,A=null),M!=null&&this.write(M,A),f.corked&&(f.corked=1,this.uncork()),f.ending||g(this,f,S)};function F(M){return M.ending&&M.length===0&&M.bufferedRequest===null&&!M.finished&&!M.writing}i(F,"needFinish");function u(M,A){M._final(function(S){A.pendingcb--,S&&M.emit("error",S),A.prefinished=!0,M.emit("prefinish"),l(M,A)})}i(u,"callFinal");function p(M,A){!A.prefinished&&!A.finalCalled&&(typeof M._final=="function"?(A.pendingcb++,A.finalCalled=!0,e.nextTick(u,M,A)):(A.prefinished=!0,M.emit("prefinish")))}i(p,"prefinish");function l(M,A){var S=F(A);return S&&(p(M,A),A.pendingcb===0&&(A.finished=!0,M.emit("finish"))),S}i(l,"finishMaybe");function g(M,A,S){A.ending=!0,l(M,A),S&&(A.finished?e.nextTick(S):M.once("finish",S)),A.ended=!0,M.writable=!1}i(g,"endWritable");function w(M,A,S){var f=M.entry;for(M.entry=null;f;){var _=f.callback;A.pendingcb--,_(S),f=f.next}A.corkedRequestsFree.next=M}return i(w,"onCorkedFinish"),Object.defineProperty(k.prototype,"destroyed",{get:i(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:i(function(M){this._writableState&&(this._writableState.destroyed=M)},"set")}),k.prototype.destroy=d.destroy,k.prototype._undestroy=d.undestroy,k.prototype._destroy=function(M,A){this.end(),A(M)},sh}i(_7,"require_stream_writable");var oh,iw;function fs(){if(iw)return oh;iw=1;var e=Gf(),t=Object.keys||function(d){var y=[];for(var b in d)y.push(b);return y};oh=m;var r=Object.create(nl());r.inherits=Bt();var a=S7(),n=_7();r.inherits(m,a);for(var s=t(n.prototype),o=0;o<s.length;o++){var h=s[o];m.prototype[h]||(m.prototype[h]=n.prototype[h])}function m(d){if(!(this instanceof m))return new m(d);a.call(this,d),n.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",v)}i(m,"Duplex"),Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function v(){this.allowHalfOpen||this._writableState.ended||e.nextTick(c,this)}i(v,"onend");function c(d){d.end()}return i(c,"onEndNT"),Object.defineProperty(m.prototype,"destroyed",{get:i(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:i(function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)},"set")}),m.prototype._destroy=function(d,y){this.push(null),this.end(),e.nextTick(y,d)},oh}i(fs,"require_stream_duplex");var lh={},Ll={exports:{}},nw;function MP(){return nw||(nw=1,(function(e,t){var r=Hn(),a=r.Buffer;function n(o,h){for(var m in o)h[m]=o[m]}i(n,"copyProps"),a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=s);function s(o,h,m){return a(o,h,m)}i(s,"SafeBuffer"),n(a,s),s.from=function(o,h,m){if(typeof o=="number")throw new TypeError("Argument must not be a number");return a(o,h,m)},s.alloc=function(o,h,m){if(typeof o!="number")throw new TypeError("Argument must be a number");var v=a(o);return h!==void 0?typeof m=="string"?v.fill(h,m):v.fill(h):v.fill(0),v},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return a(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Ll,Ll.exports)),Ll.exports}i(MP,"requireSafeBuffer");var aw;function tg(){if(aw)return lh;aw=1;var e=MP().Buffer,t=e.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(C){if(!C)return"utf8";for(var O;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(O)return;C=(""+C).toLowerCase(),O=!0}}i(r,"_normalizeEncoding");function a(C){var O=r(C);if(typeof O!="string"&&(e.isEncoding===t||!t(C)))throw new Error("Unknown encoding: "+C);return O||C}i(a,"normalizeEncoding"),lh.StringDecoder=n;function n(C){this.encoding=a(C);var O;switch(this.encoding){case"utf16le":this.text=d,this.end=y,O=4;break;case"utf8":this.fillLast=m,O=4;break;case"base64":this.text=b,this.end=x,O=3;break;default:this.write=k,this.end=N;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(O)}i(n,"StringDecoder"),n.prototype.write=function(C){if(C.length===0)return"";var O,R;if(this.lastNeed){if(O=this.fillLast(C),O===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R<C.length?O?O+this.text(C,R):this.text(C,R):O||""},n.prototype.end=c,n.prototype.text=v,n.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length};function s(C){return C<=127?0:C>>5===6?2:C>>4===14?3:C>>3===30?4:C>>6===2?-1:-2}i(s,"utf8CheckByte");function o(C,O,R){var T=O.length-1;if(T<R)return 0;var P=s(O[T]);return P>=0?(P>0&&(C.lastNeed=P-1),P):--T<R||P===-2?0:(P=s(O[T]),P>=0?(P>0&&(C.lastNeed=P-2),P):--T<R||P===-2?0:(P=s(O[T]),P>=0?(P>0&&(P===2?P=0:C.lastNeed=P-3),P):0))}i(o,"utf8CheckIncomplete");function h(C,O,R){if((O[0]&192)!==128)return C.lastNeed=0,"�";if(C.lastNeed>1&&O.length>1){if((O[1]&192)!==128)return C.lastNeed=1,"�";if(C.lastNeed>2&&O.length>2&&(O[2]&192)!==128)return C.lastNeed=2,"�"}}i(h,"utf8CheckExtraBytes");function m(C){var O=this.lastTotal-this.lastNeed,R=h(this,C);if(R!==void 0)return R;if(this.lastNeed<=C.length)return C.copy(this.lastChar,O,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,O,0,C.length),this.lastNeed-=C.length}i(m,"utf8FillLast");function v(C,O){var R=o(this,C,O);if(!this.lastNeed)return C.toString("utf8",O);this.lastTotal=R;var T=C.length-(R-this.lastNeed);return C.copy(this.lastChar,0,T),C.toString("utf8",O,T)}i(v,"utf8Text");function c(C){var O=C&&C.length?this.write(C):"";return this.lastNeed?O+"�":O}i(c,"utf8End");function d(C,O){if((C.length-O)%2===0){var R=C.toString("utf16le",O);if(R){var T=R.charCodeAt(R.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",O,C.length-1)}i(d,"utf16Text");function y(C){var O=C&&C.length?this.write(C):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,R)}return O}i(y,"utf16End");function b(C,O){var R=(C.length-O)%3;return R===0?C.toString("base64",O):(this.lastNeed=3-R,this.lastTotal=3,R===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",O,C.length-R))}i(b,"base64Text");function x(C){var O=C&&C.length?this.write(C):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}i(x,"base64End");function k(C){return C.toString(this.encoding)}i(k,"simpleWrite");function N(C){return C&&C.length?this.write(C):""}return i(N,"simpleEnd"),lh}i(tg,"requireString_decoder");var uh,sw;function S7(){if(sw)return uh;sw=1;var e=Gf();uh=O;var t=xP(),r;O.ReadableState=C,ji.EventEmitter;var a=i(function(z,V){return z.listeners(V).length},"EElistenerCount"),n=w7(),s=Ev().Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(z){return s.from(z)}i(h,"_uint8ArrayToBuffer");function m(z){return s.isBuffer(z)||z instanceof o}i(m,"_isUint8Array");var v=Object.create(nl());v.inherits=Bt();var c=ji,d=void 0;c&&c.debuglog?d=c.debuglog("stream"):d=i(function(){},"debug");var y=_P(),b=x7(),x;v.inherits(O,n);var k=["error","close","destroy","pause","resume"];function N(z,V,G){if(typeof z.prependListener=="function")return z.prependListener(V,G);!z._events||!z._events[V]?z.on(V,G):t(z._events[V])?z._events[V].unshift(G):z._events[V]=[G,z._events[V]]}i(N,"prependListener");function C(z,V){r=r||fs(),z=z||{};var G=V instanceof r;this.objectMode=!!z.objectMode,G&&(this.objectMode=this.objectMode||!!z.readableObjectMode);var q=z.highWaterMark,_e=z.readableHighWaterMark,ae=this.objectMode?16:16*1024;q||q===0?this.highWaterMark=q:G&&(_e||_e===0)?this.highWaterMark=_e:this.highWaterMark=ae,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,z.encoding&&(x||(x=tg().StringDecoder),this.decoder=new x(z.encoding),this.encoding=z.encoding)}i(C,"ReadableState");function O(z){if(r=r||fs(),!(this instanceof O))return new O(z);this._readableState=new C(z,this),this.readable=!0,z&&(typeof z.read=="function"&&(this._read=z.read),typeof z.destroy=="function"&&(this._destroy=z.destroy)),n.call(this)}i(O,"Readable"),Object.defineProperty(O.prototype,"destroyed",{get:i(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:i(function(z){this._readableState&&(this._readableState.destroyed=z)},"set")}),O.prototype.destroy=b.destroy,O.prototype._undestroy=b.undestroy,O.prototype._destroy=function(z,V){this.push(null),V(z)},O.prototype.push=function(z,V){var G=this._readableState,q;return G.objectMode?q=!0:typeof z=="string"&&(V=V||G.defaultEncoding,V!==G.encoding&&(z=s.from(z,V),V=""),q=!0),R(this,z,V,!1,q)},O.prototype.unshift=function(z){return R(this,z,null,!0,!1)};function R(z,V,G,q,_e){var ae=z._readableState;if(V===null)ae.reading=!1,$(z,ae);else{var se;_e||(se=P(ae,V)),se?z.emit("error",se):ae.objectMode||V&&V.length>0?(typeof V!="string"&&!ae.objectMode&&Object.getPrototypeOf(V)!==s.prototype&&(V=h(V)),q?ae.endEmitted?z.emit("error",new Error("stream.unshift() after end event")):T(z,ae,V,!0):ae.ended?z.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!G?(V=ae.decoder.write(V),ae.objectMode||V.length!==0?T(z,ae,V,!1):p(z,ae)):T(z,ae,V,!1))):q||(ae.reading=!1)}return B(ae)}i(R,"readableAddChunk");function T(z,V,G,q){V.flowing&&V.length===0&&!V.sync?(z.emit("data",G),z.read(0)):(V.length+=V.objectMode?1:G.length,q?V.buffer.unshift(G):V.buffer.push(G),V.needReadable&&F(z)),p(z,V)}i(T,"addChunk");function P(z,V){var G;return!m(V)&&typeof V!="string"&&V!==void 0&&!z.objectMode&&(G=new TypeError("Invalid non-string/buffer chunk")),G}i(P,"chunkInvalid");function B(z){return!z.ended&&(z.needReadable||z.length<z.highWaterMark||z.length===0)}i(B,"needMoreData"),O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function(z){return x||(x=tg().StringDecoder),this._readableState.decoder=new x(z),this._readableState.encoding=z,this};var Z=8388608;function H(z){return z>=Z?z=Z:(z--,z|=z>>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z}i(H,"computeNewHighWaterMark");function ee(z,V){return z<=0||V.length===0&&V.ended?0:V.objectMode?1:z!==z?V.flowing&&V.length?V.buffer.head.data.length:V.length:(z>V.highWaterMark&&(V.highWaterMark=H(z)),z<=V.length?z:V.ended?V.length:(V.needReadable=!0,0))}i(ee,"howMuchToRead"),O.prototype.read=function(z){d("read",z),z=parseInt(z,10);var V=this._readableState,G=z;if(z!==0&&(V.emittedReadable=!1),z===0&&V.needReadable&&(V.length>=V.highWaterMark||V.ended))return d("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?D(this):F(this),null;if(z=ee(z,V),z===0&&V.ended)return V.length===0&&D(this),null;var q=V.needReadable;d("need readable",q),(V.length===0||V.length-z<V.highWaterMark)&&(q=!0,d("length less than watermark",q)),V.ended||V.reading?(q=!1,d("reading or ended",q)):q&&(d("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(z=ee(G,V)));var _e;return z>0?_e=f(z,V):_e=null,_e===null?(V.needReadable=!0,z=0):V.length-=z,V.length===0&&(V.ended||(V.needReadable=!0),G!==z&&V.ended&&D(this)),_e!==null&&this.emit("data",_e),_e};function $(z,V){if(!V.ended){if(V.decoder){var G=V.decoder.end();G&&G.length&&(V.buffer.push(G),V.length+=V.objectMode?1:G.length)}V.ended=!0,F(z)}}i($,"onEofChunk");function F(z){var V=z._readableState;V.needReadable=!1,V.emittedReadable||(d("emitReadable",V.flowing),V.emittedReadable=!0,V.sync?e.nextTick(u,z):u(z))}i(F,"emitReadable");function u(z){d("emit readable"),z.emit("readable"),S(z)}i(u,"emitReadable_");function p(z,V){V.readingMore||(V.readingMore=!0,e.nextTick(l,z,V))}i(p,"maybeReadMore");function l(z,V){for(var G=V.length;!V.reading&&!V.flowing&&!V.ended&&V.length<V.highWaterMark&&(d("maybeReadMore read 0"),z.read(0),G!==V.length);)G=V.length;V.readingMore=!1}i(l,"maybeReadMore_"),O.prototype._read=function(z){this.emit("error",new Error("_read() is not implemented"))},O.prototype.pipe=function(z,V){var G=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=z;break;case 1:q.pipes=[q.pipes,z];break;default:q.pipes.push(z);break}q.pipesCount+=1,d("pipe count=%d opts=%j",q.pipesCount,V);var _e=(!V||V.end!==!1)&&z!==process.stdout&&z!==process.stderr,ae=_e?ye:Q;q.endEmitted?e.nextTick(ae):G.once("end",ae),z.on("unpipe",se);function se(Y,te){d("onunpipe"),Y===G&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,X())}i(se,"onunpipe");function ye(){d("onend"),z.end()}i(ye,"onend");var K=g(G);z.on("drain",K);var re=!1;function X(){d("cleanup"),z.removeListener("close",pe),z.removeListener("finish",fe),z.removeListener("drain",K),z.removeListener("error",ke),z.removeListener("unpipe",se),G.removeListener("end",ye),G.removeListener("end",Q),G.removeListener("data",le),re=!0,q.awaitDrain&&(!z._writableState||z._writableState.needDrain)&&K()}i(X,"cleanup");var W=!1;G.on("data",le);function le(Y){d("ondata"),W=!1;var te=z.write(Y);te===!1&&!W&&((q.pipesCount===1&&q.pipes===z||q.pipesCount>1&&U(q.pipes,z)!==-1)&&!re&&(d("false write response, pause",q.awaitDrain),q.awaitDrain++,W=!0),G.pause())}i(le,"ondata");function ke(Y){d("onerror",Y),Q(),z.removeListener("error",ke),a(z,"error")===0&&z.emit("error",Y)}i(ke,"onerror"),N(z,"error",ke);function pe(){z.removeListener("finish",fe),Q()}i(pe,"onclose"),z.once("close",pe);function fe(){d("onfinish"),z.removeListener("close",pe),Q()}i(fe,"onfinish"),z.once("finish",fe);function Q(){d("unpipe"),G.unpipe(z)}return i(Q,"unpipe"),z.emit("pipe",G),q.flowing||(d("pipe resume"),G.resume()),z};function g(z){return function(){var V=z._readableState;d("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&a(z,"data")&&(V.flowing=!0,S(z))}}i(g,"pipeOnDrain"),O.prototype.unpipe=function(z){var V=this._readableState,G={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return z&&z!==V.pipes?this:(z||(z=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,z&&z.emit("unpipe",this,G),this);if(!z){var q=V.pipes,_e=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var ae=0;ae<_e;ae++)q[ae].emit("unpipe",this,{hasUnpiped:!1});return this}var se=U(V.pipes,z);return se===-1?this:(V.pipes.splice(se,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),z.emit("unpipe",this,G),this)},O.prototype.on=function(z,V){var G=n.prototype.on.call(this,z,V);if(z==="data")this._readableState.flowing!==!1&&this.resume();else if(z==="readable"){var q=this._readableState;!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&F(this):e.nextTick(w,this))}return G},O.prototype.addListener=O.prototype.on;function w(z){d("readable nexttick read 0"),z.read(0)}i(w,"nReadingNextTick"),O.prototype.resume=function(){var z=this._readableState;return z.flowing||(d("resume"),z.flowing=!0,M(this,z)),this};function M(z,V){V.resumeScheduled||(V.resumeScheduled=!0,e.nextTick(A,z,V))}i(M,"resume");function A(z,V){V.reading||(d("resume read 0"),z.read(0)),V.resumeScheduled=!1,V.awaitDrain=0,z.emit("resume"),S(z),V.flowing&&!V.reading&&z.read(0)}i(A,"resume_"),O.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function S(z){var V=z._readableState;for(d("flow",V.flowing);V.flowing&&z.read()!==null;);}i(S,"flow"),O.prototype.wrap=function(z){var V=this,G=this._readableState,q=!1;z.on("end",function(){if(d("wrapped end"),G.decoder&&!G.ended){var se=G.decoder.end();se&&se.length&&V.push(se)}V.push(null)}),z.on("data",function(se){if(d("wrapped data"),G.decoder&&(se=G.decoder.write(se)),!(G.objectMode&&se==null)&&!(!G.objectMode&&(!se||!se.length))){var ye=V.push(se);ye||(q=!0,z.pause())}});for(var _e in z)this[_e]===void 0&&typeof z[_e]=="function"&&(this[_e]=(function(se){return function(){return z[se].apply(z,arguments)}})(_e));for(var ae=0;ae<k.length;ae++)z.on(k[ae],this.emit.bind(this,k[ae]));return this._read=function(se){d("wrapped _read",se),q&&(q=!1,z.resume())},this},Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:i(function(){return this._readableState.highWaterMark},"get")}),O._fromList=f;function f(z,V){if(V.length===0)return null;var G;return V.objectMode?G=V.buffer.shift():!z||z>=V.length?(V.decoder?G=V.buffer.join(""):V.buffer.length===1?G=V.buffer.head.data:G=V.buffer.concat(V.length),V.buffer.clear()):G=_(z,V.buffer,V.decoder),G}i(f,"fromList");function _(z,V,G){var q;return z<V.head.data.length?(q=V.head.data.slice(0,z),V.head.data=V.head.data.slice(z)):z===V.head.data.length?q=V.shift():q=G?E(z,V):I(z,V),q}i(_,"fromListPartial");function E(z,V){var G=V.head,q=1,_e=G.data;for(z-=_e.length;G=G.next;){var ae=G.data,se=z>ae.length?ae.length:z;if(se===ae.length?_e+=ae:_e+=ae.slice(0,z),z-=se,z===0){se===ae.length?(++q,G.next?V.head=G.next:V.head=V.tail=null):(V.head=G,G.data=ae.slice(se));break}++q}return V.length-=q,_e}i(E,"copyFromBufferString");function I(z,V){var G=s.allocUnsafe(z),q=V.head,_e=1;for(q.data.copy(G),z-=q.data.length;q=q.next;){var ae=q.data,se=z>ae.length?ae.length:z;if(ae.copy(G,G.length-z,0,se),z-=se,z===0){se===ae.length?(++_e,q.next?V.head=q.next:V.head=V.tail=null):(V.head=q,q.data=ae.slice(se));break}++_e}return V.length-=_e,G}i(I,"copyFromBuffer");function D(z){var V=z._readableState;if(V.length>0)throw new Error('"endReadable()" called on non-empty stream');V.endEmitted||(V.ended=!0,e.nextTick(L,V,z))}i(D,"endReadable");function L(z,V){!z.endEmitted&&z.length===0&&(z.endEmitted=!0,V.readable=!1,V.emit("end"))}i(L,"endReadableNT");function U(z,V){for(var G=0,q=z.length;G<q;G++)if(z[G]===V)return G;return-1}return i(U,"indexOf"),uh}i(S7,"require_stream_readable");var fh,ow;function M7(){if(ow)return fh;ow=1,fh=a;var e=fs(),t=Object.create(nl());t.inherits=Bt(),t.inherits(a,e);function r(o,h){var m=this._transformState;m.transforming=!1;var v=m.writecb;if(!v)return this.emit("error",new Error("write callback called multiple times"));m.writechunk=null,m.writecb=null,h!=null&&this.push(h),v(o);var c=this._readableState;c.reading=!1,(c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}i(r,"afterTransform");function a(o){if(!(this instanceof a))return new a(o);e.call(this,o),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",n)}i(a,"Transform");function n(){var o=this;typeof this._flush=="function"?this._flush(function(h,m){s(o,h,m)}):s(this,null,null)}i(n,"prefinish"),a.prototype.push=function(o,h){return this._transformState.needTransform=!1,e.prototype.push.call(this,o,h)},a.prototype._transform=function(o,h,m){throw new Error("_transform() is not implemented")},a.prototype._write=function(o,h,m){var v=this._transformState;if(v.writecb=m,v.writechunk=o,v.writeencoding=h,!v.transforming){var c=this._readableState;(v.needTransform||c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}},a.prototype._read=function(o){var h=this._transformState;h.writechunk!==null&&h.writecb&&!h.transforming?(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform)):h.needTransform=!0},a.prototype._destroy=function(o,h){var m=this;e.prototype._destroy.call(this,o,function(v){h(v),m.emit("close")})};function s(o,h,m){if(h)return o.emit("error",h);if(m!=null&&o.push(m),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}return i(s,"done"),fh}i(M7,"require_stream_transform");var ch,lw;function EP(){if(lw)return ch;lw=1,ch=r;var e=M7(),t=Object.create(nl());t.inherits=Bt(),t.inherits(r,e);function r(a){if(!(this instanceof r))return new r(a);e.call(this,a)}return i(r,"PassThrough"),r.prototype._transform=function(a,n,s){s(null,a)},ch}i(EP,"require_stream_passthrough");var uw;function E7(){return uw||(uw=1,(function(e,t){t=e.exports=S7(),t.Stream=t,t.Readable=t,t.Writable=_7(),t.Duplex=fs(),t.Transform=M7(),t.PassThrough=EP()})(Tl,Tl.exports)),Tl.exports}i(E7,"requireReadableBrowser");var dh,fw;function kP(){if(fw)return dh;fw=1;var e=jt().Buffer,t=wP(),r=E7().Transform,a=Bt();function n(s){r.call(this),this._block=e.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return i(n,"HashBase"),a(n,r),n.prototype._transform=function(s,o,h){var m=null;try{this.update(s,o)}catch(v){m=v}h(m)},n.prototype._flush=function(s){var o=null;try{this.push(this.digest())}catch(h){o=h}s(o)},n.prototype.update=function(s,o){if(this._finalized)throw new Error("Digest already called");for(var h=t(s,o),m=this._block,v=0;this._blockOffset+h.length-v>=this._blockSize;){for(var c=this._blockOffset;c<this._blockSize;)m[c]=h[v],c+=1,v+=1;this._update(),this._blockOffset=0}for(;v<h.length;)m[this._blockOffset]=h[v],this._blockOffset+=1,v+=1;for(var d=0,y=h.length*8;y>0;++d)this._length[d]+=y,y=this._length[d]/4294967296|0,y>0&&(this._length[d]-=4294967296*y);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var o=this._digest();s!==void 0&&(o=o.toString(s)),this._block.fill(0),this._blockOffset=0;for(var h=0;h<4;++h)this._length[h]=0;return o},n.prototype._digest=function(){throw new Error("_digest is not implemented")},dh=n,dh}i(kP,"requireHashBase");var hh,cw;function kv(){if(cw)return hh;cw=1;var e=Hn().Buffer,t=Bt(),r=kP(),a=new Array(16),n=[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],s=[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],o=[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],h=[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],m=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];function c(C,O){return C<<O|C>>>32-O}i(c,"rotl");function d(C,O,R,T,P,B,Z,H){return c(C+(O^R^T)+B+Z|0,H)+P|0}i(d,"fn1");function y(C,O,R,T,P,B,Z,H){return c(C+(O&R|~O&T)+B+Z|0,H)+P|0}i(y,"fn2");function b(C,O,R,T,P,B,Z,H){return c(C+((O|~R)^T)+B+Z|0,H)+P|0}i(b,"fn3");function x(C,O,R,T,P,B,Z,H){return c(C+(O&T|R&~T)+B+Z|0,H)+P|0}i(x,"fn4");function k(C,O,R,T,P,B,Z,H){return c(C+(O^(R|~T))+B+Z|0,H)+P|0}i(k,"fn5");function N(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return i(N,"RIPEMD160"),t(N,r),N.prototype._update=function(){for(var C=a,O=0;O<16;++O)C[O]=this._block.readInt32LE(O*4);for(var R=this._a|0,T=this._b|0,P=this._c|0,B=this._d|0,Z=this._e|0,H=this._a|0,ee=this._b|0,$=this._c|0,F=this._d|0,u=this._e|0,p=0;p<80;p+=1){var l,g;p<16?(l=d(R,T,P,B,Z,C[n[p]],m[0],o[p]),g=k(H,ee,$,F,u,C[s[p]],v[0],h[p])):p<32?(l=y(R,T,P,B,Z,C[n[p]],m[1],o[p]),g=x(H,ee,$,F,u,C[s[p]],v[1],h[p])):p<48?(l=b(R,T,P,B,Z,C[n[p]],m[2],o[p]),g=b(H,ee,$,F,u,C[s[p]],v[2],h[p])):p<64?(l=x(R,T,P,B,Z,C[n[p]],m[3],o[p]),g=y(H,ee,$,F,u,C[s[p]],v[3],h[p])):(l=k(R,T,P,B,Z,C[n[p]],m[4],o[p]),g=d(H,ee,$,F,u,C[s[p]],v[4],h[p])),R=Z,Z=B,B=c(P,10),P=T,T=l,H=u,u=F,F=c($,10),$=ee,ee=g}var w=this._b+P+F|0;this._b=this._c+B+u|0,this._c=this._d+Z+H|0,this._d=this._e+R+ee|0,this._e=this._a+T+$|0,this._a=w},N.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var C=e.alloc?e.alloc(20):new e(20);return C.writeInt32LE(this._a,0),C.writeInt32LE(this._b,4),C.writeInt32LE(this._c,8),C.writeInt32LE(this._d,12),C.writeInt32LE(this._e,16),C},hh=N,hh}i(kv,"requireRipemd160");var ph={exports:{}},mh,dw;function Ms(){if(dw)return mh;dw=1;var e=jt().Buffer,t=Hf();function r(a,n){this._block=e.alloc(a),this._finalSize=n,this._blockSize=a,this._len=0}return i(r,"Hash"),r.prototype.update=function(a,n){a=t(a,n||"utf8");for(var s=this._block,o=this._blockSize,h=a.length,m=this._len,v=0;v<h;){for(var c=m%o,d=Math.min(h-v,o-c),y=0;y<d;y++)s[c+y]=a[v+y];m+=d,v+=d,m%o===0&&this._update(s)}return this._len+=h,this},r.prototype.digest=function(a){var n=this._len%this._blockSize;this._block[n]=128,this._block.fill(0,n+1),n>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var o=(s&4294967295)>>>0,h=(s-o)/4294967296;this._block.writeUInt32BE(h,this._blockSize-8),this._block.writeUInt32BE(o,this._blockSize-4)}this._update(this._block);var m=this._hash();return a?m.toString(a):m},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},mh=r,mh}i(Ms,"requireHash$1");var gh,hw;function AP(){if(hw)return gh;hw=1;var e=Bt(),t=Ms(),r=jt().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function s(){this.init(),this._w=n,t.call(this,64,56)}i(s,"Sha"),e(s,t),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(v){return v<<5|v>>>27}i(o,"rotl5");function h(v){return v<<30|v>>>2}i(h,"rotl30");function m(v,c,d,y){return v===0?c&d|~c&y:v===2?c&d|c&y|d&y:c^d^y}return i(m,"ft"),s.prototype._update=function(v){for(var c=this._w,d=this._a|0,y=this._b|0,b=this._c|0,x=this._d|0,k=this._e|0,N=0;N<16;++N)c[N]=v.readInt32BE(N*4);for(;N<80;++N)c[N]=c[N-3]^c[N-8]^c[N-14]^c[N-16];for(var C=0;C<80;++C){var O=~~(C/20),R=o(d)+m(O,y,b,x)+k+c[C]+a[O]|0;k=x,x=b,b=h(y),y=d,d=R}this._a=d+this._a|0,this._b=y+this._b|0,this._c=b+this._c|0,this._d=x+this._d|0,this._e=k+this._e|0},s.prototype._hash=function(){var v=r.allocUnsafe(20);return v.writeInt32BE(this._a|0,0),v.writeInt32BE(this._b|0,4),v.writeInt32BE(this._c|0,8),v.writeInt32BE(this._d|0,12),v.writeInt32BE(this._e|0,16),v},gh=s,gh}i(AP,"requireSha$1");var vh,pw;function jP(){if(pw)return vh;pw=1;var e=Bt(),t=Ms(),r=jt().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function s(){this.init(),this._w=n,t.call(this,64,56)}i(s,"Sha1"),e(s,t),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function o(c){return c<<1|c>>>31}i(o,"rotl1");function h(c){return c<<5|c>>>27}i(h,"rotl5");function m(c){return c<<30|c>>>2}i(m,"rotl30");function v(c,d,y,b){return c===0?d&y|~d&b:c===2?d&y|d&b|y&b:d^y^b}return i(v,"ft"),s.prototype._update=function(c){for(var d=this._w,y=this._a|0,b=this._b|0,x=this._c|0,k=this._d|0,N=this._e|0,C=0;C<16;++C)d[C]=c.readInt32BE(C*4);for(;C<80;++C)d[C]=o(d[C-3]^d[C-8]^d[C-14]^d[C-16]);for(var O=0;O<80;++O){var R=~~(O/20),T=h(y)+v(R,b,x,k)+N+d[O]+a[R]|0;N=k,k=x,x=m(b),b=y,y=T}this._a=y+this._a|0,this._b=b+this._b|0,this._c=x+this._c|0,this._d=k+this._d|0,this._e=N+this._e|0},s.prototype._hash=function(){var c=r.allocUnsafe(20);return c.writeInt32BE(this._a|0,0),c.writeInt32BE(this._b|0,4),c.writeInt32BE(this._c|0,8),c.writeInt32BE(this._d|0,12),c.writeInt32BE(this._e|0,16),c},vh=s,vh}i(jP,"requireSha1");var bh,mw;function k7(){if(mw)return bh;mw=1;var e=Bt(),t=Ms(),r=jt().Buffer,a=[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],n=new Array(64);function s(){this.init(),this._w=n,t.call(this,64,56)}i(s,"Sha256"),e(s,t),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function o(y,b,x){return x^y&(b^x)}i(o,"ch");function h(y,b,x){return y&b|x&(y|b)}i(h,"maj");function m(y){return(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10)}i(m,"sigma0");function v(y){return(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7)}i(v,"sigma1");function c(y){return(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3}i(c,"gamma0");function d(y){return(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10}return i(d,"gamma1"),s.prototype._update=function(y){for(var b=this._w,x=this._a|0,k=this._b|0,N=this._c|0,C=this._d|0,O=this._e|0,R=this._f|0,T=this._g|0,P=this._h|0,B=0;B<16;++B)b[B]=y.readInt32BE(B*4);for(;B<64;++B)b[B]=d(b[B-2])+b[B-7]+c(b[B-15])+b[B-16]|0;for(var Z=0;Z<64;++Z){var H=P+v(O)+o(O,R,T)+a[Z]+b[Z]|0,ee=m(x)+h(x,k,N)|0;P=T,T=R,R=O,O=C+H|0,C=N,N=k,k=x,x=H+ee|0}this._a=x+this._a|0,this._b=k+this._b|0,this._c=N+this._c|0,this._d=C+this._d|0,this._e=O+this._e|0,this._f=R+this._f|0,this._g=T+this._g|0,this._h=P+this._h|0},s.prototype._hash=function(){var y=r.allocUnsafe(32);return y.writeInt32BE(this._a,0),y.writeInt32BE(this._b,4),y.writeInt32BE(this._c,8),y.writeInt32BE(this._d,12),y.writeInt32BE(this._e,16),y.writeInt32BE(this._f,20),y.writeInt32BE(this._g,24),y.writeInt32BE(this._h,28),y},bh=s,bh}i(k7,"requireSha256");var yh,gw;function NP(){if(gw)return yh;gw=1;var e=Bt(),t=k7(),r=Ms(),a=jt().Buffer,n=new Array(64);function s(){this.init(),this._w=n,r.call(this,64,56)}return i(s,"Sha224"),e(s,t),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var o=a.allocUnsafe(28);return o.writeInt32BE(this._a,0),o.writeInt32BE(this._b,4),o.writeInt32BE(this._c,8),o.writeInt32BE(this._d,12),o.writeInt32BE(this._e,16),o.writeInt32BE(this._f,20),o.writeInt32BE(this._g,24),o},yh=s,yh}i(NP,"requireSha224");var wh,vw;function A7(){if(vw)return wh;vw=1;var e=Bt(),t=Ms(),r=jt().Buffer,a=[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],n=new Array(160);function s(){this.init(),this._w=n,t.call(this,128,112)}i(s,"Sha512"),e(s,t),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function o(k,N,C){return C^k&(N^C)}i(o,"Ch");function h(k,N,C){return k&N|C&(k|N)}i(h,"maj");function m(k,N){return(k>>>28|N<<4)^(N>>>2|k<<30)^(N>>>7|k<<25)}i(m,"sigma0");function v(k,N){return(k>>>14|N<<18)^(k>>>18|N<<14)^(N>>>9|k<<23)}i(v,"sigma1");function c(k,N){return(k>>>1|N<<31)^(k>>>8|N<<24)^k>>>7}i(c,"Gamma0");function d(k,N){return(k>>>1|N<<31)^(k>>>8|N<<24)^(k>>>7|N<<25)}i(d,"Gamma0l");function y(k,N){return(k>>>19|N<<13)^(N>>>29|k<<3)^k>>>6}i(y,"Gamma1");function b(k,N){return(k>>>19|N<<13)^(N>>>29|k<<3)^(k>>>6|N<<26)}i(b,"Gamma1l");function x(k,N){return k>>>0<N>>>0?1:0}return i(x,"getCarry"),s.prototype._update=function(k){for(var N=this._w,C=this._ah|0,O=this._bh|0,R=this._ch|0,T=this._dh|0,P=this._eh|0,B=this._fh|0,Z=this._gh|0,H=this._hh|0,ee=this._al|0,$=this._bl|0,F=this._cl|0,u=this._dl|0,p=this._el|0,l=this._fl|0,g=this._gl|0,w=this._hl|0,M=0;M<32;M+=2)N[M]=k.readInt32BE(M*4),N[M+1]=k.readInt32BE(M*4+4);for(;M<160;M+=2){var A=N[M-30],S=N[M-30+1],f=c(A,S),_=d(S,A);A=N[M-4],S=N[M-4+1];var E=y(A,S),I=b(S,A),D=N[M-14],L=N[M-14+1],U=N[M-32],z=N[M-32+1],V=_+L|0,G=f+D+x(V,_)|0;V=V+I|0,G=G+E+x(V,I)|0,V=V+z|0,G=G+U+x(V,z)|0,N[M]=G,N[M+1]=V}for(var q=0;q<160;q+=2){G=N[q],V=N[q+1];var _e=h(C,O,R),ae=h(ee,$,F),se=m(C,ee),ye=m(ee,C),K=v(P,p),re=v(p,P),X=a[q],W=a[q+1],le=o(P,B,Z),ke=o(p,l,g),pe=w+re|0,fe=H+K+x(pe,w)|0;pe=pe+ke|0,fe=fe+le+x(pe,ke)|0,pe=pe+W|0,fe=fe+X+x(pe,W)|0,pe=pe+V|0,fe=fe+G+x(pe,V)|0;var Q=ye+ae|0,Y=se+_e+x(Q,ye)|0;H=Z,w=g,Z=B,g=l,B=P,l=p,p=u+pe|0,P=T+fe+x(p,u)|0,T=R,u=F,R=O,F=$,O=C,$=ee,ee=pe+Q|0,C=fe+Y+x(ee,pe)|0}this._al=this._al+ee|0,this._bl=this._bl+$|0,this._cl=this._cl+F|0,this._dl=this._dl+u|0,this._el=this._el+p|0,this._fl=this._fl+l|0,this._gl=this._gl+g|0,this._hl=this._hl+w|0,this._ah=this._ah+C+x(this._al,ee)|0,this._bh=this._bh+O+x(this._bl,$)|0,this._ch=this._ch+R+x(this._cl,F)|0,this._dh=this._dh+T+x(this._dl,u)|0,this._eh=this._eh+P+x(this._el,p)|0,this._fh=this._fh+B+x(this._fl,l)|0,this._gh=this._gh+Z+x(this._gl,g)|0,this._hh=this._hh+H+x(this._hl,w)|0},s.prototype._hash=function(){var k=r.allocUnsafe(64);function N(C,O,R){k.writeInt32BE(C,R),k.writeInt32BE(O,R+4)}return i(N,"writeInt64BE"),N(this._ah,this._al,0),N(this._bh,this._bl,8),N(this._ch,this._cl,16),N(this._dh,this._dl,24),N(this._eh,this._el,32),N(this._fh,this._fl,40),N(this._gh,this._gl,48),N(this._hh,this._hl,56),k},wh=s,wh}i(A7,"requireSha512");var xh,bw;function IP(){if(bw)return xh;bw=1;var e=Bt(),t=A7(),r=Ms(),a=jt().Buffer,n=new Array(160);function s(){this.init(),this._w=n,r.call(this,128,112)}return i(s,"Sha384"),e(s,t),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var o=a.allocUnsafe(48);function h(m,v,c){o.writeInt32BE(m,c),o.writeInt32BE(v,c+4)}return i(h,"writeInt64BE"),h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),o},xh=s,xh}i(IP,"requireSha384");var yw;function Av(){return yw||(yw=1,(function(e){e.exports=i(function(r){var a=r.toLowerCase(),n=e.exports[a];if(!n)throw new Error(a+" is not supported (we accept pull requests)");return new n},"SHA"),e.exports.sha=AP(),e.exports.sha1=jP(),e.exports.sha224=NP(),e.exports.sha256=k7(),e.exports.sha384=IP(),e.exports.sha512=A7()})(ph)),ph.exports}i(Av,"requireSha_js");var _h,ww;function Gn(){if(ww)return _h;ww=1;var e=jt().Buffer,t=ji.Transform,r=tg().StringDecoder,a=Bt(),n=Hf();function s(o){t.call(this),this.hashMode=typeof o=="string",this.hashMode?this[o]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return i(s,"CipherBase"),a(s,t),s.prototype.update=function(o,h,m){var v=n(o,h),c=this._update(v);return this.hashMode?this:(m&&(c=this._toString(c,m)),c)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(o,h,m){var v;try{this.hashMode?this._update(o):this.push(this._update(o))}catch(c){v=c}finally{m(v)}},s.prototype._flush=function(o){var h;try{this.push(this.__final())}catch(m){h=m}o(h)},s.prototype._finalOrDigest=function(o){var h=this.__final()||e.alloc(0);return o&&(h=this._toString(h,o,!0)),h},s.prototype._toString=function(o,h,m){if(this._decoder||(this._decoder=new r(h),this._encoding=h),this._encoding!==h)throw new Error("can’t switch encodings");var v=this._decoder.write(o);return m&&(v+=this._decoder.end()),v},_h=s,_h}i(Gn,"requireCipherBase");var Sh,xw;function al(){if(xw)return Sh;xw=1;var e=Bt(),t=xv(),r=kv(),a=Av(),n=Gn();function s(o){n.call(this,"digest"),this._hash=o}return i(s,"Hash"),e(s,n),s.prototype._update=function(o){this._hash.update(o)},s.prototype._final=function(){return this._hash.digest()},Sh=i(function(h){return h=h.toLowerCase(),h==="md5"?new t:h==="rmd160"||h==="ripemd160"?new r:new s(a(h))},"createHash"),Sh}i(al,"requireBrowser$9");var Mh,_w;function CP(){if(_w)return Mh;_w=1;var e=Bt(),t=jt().Buffer,r=Gn(),a=t.alloc(128),n=64;function s(o,h){r.call(this,"digest"),typeof h=="string"&&(h=t.from(h)),this._alg=o,this._key=h,h.length>n?h=o(h):h.length<n&&(h=t.concat([h,a],n));for(var m=this._ipad=t.allocUnsafe(n),v=this._opad=t.allocUnsafe(n),c=0;c<n;c++)m[c]=h[c]^54,v[c]=h[c]^92;this._hash=[m]}return i(s,"Hmac"),e(s,r),s.prototype._update=function(o){this._hash.push(o)},s.prototype._final=function(){var o=this._alg(t.concat(this._hash));return this._alg(t.concat([this._opad,o]))},Mh=s,Mh}i(CP,"requireLegacy");var Eh,Sw;function j7(){if(Sw)return Eh;Sw=1;var e=xv();return Eh=i(function(t){return new e().update(t).digest()},"md5"),Eh}i(j7,"requireMd5");var kh,Mw;function N7(){if(Mw)return kh;Mw=1;var e=Bt(),t=CP(),r=Gn(),a=jt().Buffer,n=j7(),s=kv(),o=Av(),h=a.alloc(128);function m(v,c){r.call(this,"digest"),typeof c=="string"&&(c=a.from(c));var d=v==="sha512"||v==="sha384"?128:64;if(this._alg=v,this._key=c,c.length>d){var y=v==="rmd160"?new s:o(v);c=y.update(c).digest()}else c.length<d&&(c=a.concat([c,h],d));for(var b=this._ipad=a.allocUnsafe(d),x=this._opad=a.allocUnsafe(d),k=0;k<d;k++)b[k]=c[k]^54,x[k]=c[k]^92;this._hash=v==="rmd160"?new s:o(v),this._hash.update(b)}return i(m,"Hmac"),e(m,r),m.prototype._update=function(v){this._hash.update(v)},m.prototype._final=function(){var v=this._hash.digest(),c=this._alg==="rmd160"?new s:o(this._alg);return c.update(this._opad).update(v).digest()},kh=i(function(c,d){return c=c.toLowerCase(),c==="rmd160"||c==="ripemd160"?new m("rmd160",d):c==="md5"?new t(n,d):new m(c,d)},"createHmac"),kh}i(N7,"requireBrowser$8");const OP={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},RP={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},TP={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},PP={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},DP={sign:"ecdsa",hash:"sha256",id:""},LP={sign:"ecdsa",hash:"sha224",id:""},BP={sign:"ecdsa",hash:"sha384",id:""},zP={sign:"ecdsa",hash:"sha512",id:""},UP={sign:"dsa",hash:"sha1",id:""},FP={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},$P={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},I7={sha224WithRSAEncryption:OP,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:RP,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:TP,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:PP,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:DP,sha224:LP,sha384:BP,sha512:zP,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:UP,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:FP,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:$P,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var Ah,Ew;function VP(){return Ew||(Ew=1,Ah=I7),Ah}i(VP,"requireAlgos");var Bl={},jh,kw;function C7(){if(kw)return jh;kw=1;var e=isFinite,t=Math.pow(2,30)-1;return jh=i(function(r,a){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0||!e(r))throw new TypeError("Bad iterations");if(typeof a!="number")throw new TypeError("Key length not a number");if(a<0||a>t||a!==a)throw new TypeError("Bad key length")},"precondition"),jh}i(C7,"requirePrecondition");var Nh,Aw;function O7(){if(Aw)return Nh;Aw=1;var e;if(globalThis.process&&globalThis.process.browser)e="utf-8";else if(globalThis.process&&globalThis.process.version){var t=parseInt(process.version.split(".")[0].slice(1),10);e=t>=6?"utf-8":"binary"}else e="utf-8";return Nh=e,Nh}i(O7,"requireDefaultEncoding");var Ih,jw;function R7(){if(jw)return Ih;jw=1;var e=jt().Buffer,t=Hf(),r=typeof Uint8Array<"u",a=r&&typeof ArrayBuffer<"u",n=a&&ArrayBuffer.isView;return Ih=i(function(s,o,h){if(typeof s=="string"||e.isBuffer(s)||r&&s instanceof Uint8Array||n&&n(s))return t(s,o);throw new TypeError(h+" must be a string, a Buffer, a Uint8Array, or a DataView")},"toBuffer_1"),Ih}i(R7,"requireToBuffer");var Ch,Nw;function T7(){if(Nw)return Ch;Nw=1;var e=j7(),t=kv(),r=Av(),a=jt().Buffer,n=C7(),s=O7(),o=R7(),h=a.alloc(128),m={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},v={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function c(x){return new t().update(x).digest()}i(c,"rmd160Func");function d(x){function k(N){return r(x).update(N).digest()}return i(k,"shaFunc"),x==="rmd160"||x==="ripemd160"?c:x==="md5"?e:k}i(d,"getDigest");function y(x,k,N){var C=d(x),O=x==="sha512"||x==="sha384"?128:64;k.length>O?k=C(k):k.length<O&&(k=a.concat([k,h],O));for(var R=a.allocUnsafe(O+m[x]),T=a.allocUnsafe(O+m[x]),P=0;P<O;P++)R[P]=k[P]^54,T[P]=k[P]^92;var B=a.allocUnsafe(O+N+4);R.copy(B,0,0,O),this.ipad1=B,this.ipad2=R,this.opad=T,this.alg=x,this.blocksize=O,this.hash=C,this.size=m[x]}i(y,"Hmac"),y.prototype.run=function(x,k){x.copy(k,this.blocksize);var N=this.hash(k);return N.copy(this.opad,this.blocksize),this.hash(this.opad)};function b(x,k,N,C,O){n(N,C),x=o(x,s,"Password"),k=o(k,s,"Salt");var R=(O||"sha1").toLowerCase(),T=v[R]||R,P=m[T];if(typeof P!="number"||!P)throw new TypeError("Digest algorithm not supported: "+O);var B=new y(T,x,k.length),Z=a.allocUnsafe(C),H=a.allocUnsafe(k.length+4);k.copy(H,0,0,k.length);for(var ee=0,$=P,F=Math.ceil(C/$),u=1;u<=F;u++){H.writeUInt32BE(u,k.length);for(var p=B.run(H,B.ipad1),l=p,g=1;g<N;g++){l=B.run(l,B.ipad2);for(var w=0;w<$;w++)p[w]^=l[w]}p.copy(Z,ee),ee+=$}return Z}return i(b,"pbkdf2"),Ch=b,Ch}i(T7,"requireSyncBrowser");var Oh,Iw;function ZP(){if(Iw)return Oh;Iw=1;var e=jt().Buffer,t=C7(),r=O7(),a=T7(),n=R7(),s,o=globalThis.crypto&&globalThis.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[],v;function c(){return v||(globalThis.process&&globalThis.process.nextTick?v=globalThis.process.nextTick:globalThis.queueMicrotask?v=globalThis.queueMicrotask:globalThis.setImmediate?v=globalThis.setImmediate:v=globalThis.setTimeout,v)}i(c,"getNextTick");function d(x,k,N,C,O){return o.importKey("raw",x,{name:"PBKDF2"},!1,["deriveBits"]).then(function(R){return o.deriveBits({name:"PBKDF2",salt:k,iterations:N,hash:{name:O}},R,C<<3)}).then(function(R){return e.from(R)})}i(d,"browserPbkdf2");function y(x){if(globalThis.process&&!globalThis.process.browser||!o||!o.importKey||!o.deriveBits)return Promise.resolve(!1);if(m[x]!==void 0)return m[x];s=s||e.alloc(8);var k=d(s,s,10,128,x).then(function(){return!0},function(){return!1});return m[x]=k,k}i(y,"checkNative");function b(x,k){x.then(function(N){c()(function(){k(null,N)})},function(N){c()(function(){k(N)})})}return i(b,"resolvePromise"),Oh=i(function(x,k,N,C,O,R){if(typeof O=="function"&&(R=O,O=void 0),t(N,C),x=n(x,r,"Password"),k=n(k,r,"Salt"),typeof R!="function")throw new Error("No callback provided to pbkdf2");O=O||"sha1";var T=h[O.toLowerCase()];if(!T||typeof globalThis.Promise!="function"){c()(function(){var P;try{P=a(x,k,N,C,O)}catch(B){R(B);return}R(null,P)});return}b(y(T).then(function(P){return P?d(x,k,N,C,T):a(x,k,N,C,O)}),R)},"async"),Oh}i(ZP,"requireAsync");var Cw;function P7(){return Cw||(Cw=1,Bl.pbkdf2=ZP(),Bl.pbkdf2Sync=T7()),Bl}i(P7,"requireBrowser$7");var si={},Qn={},Gr={},Ow;function D7(){if(Ow)return Gr;Ow=1,Gr.readUInt32BE=i(function(n,s){var o=n[0+s]<<24|n[1+s]<<16|n[2+s]<<8|n[3+s];return o>>>0},"readUInt32BE"),Gr.writeUInt32BE=i(function(n,s,o){n[0+o]=s>>>24,n[1+o]=s>>>16&255,n[2+o]=s>>>8&255,n[3+o]=s&255},"writeUInt32BE"),Gr.ip=i(function(n,s,o,h){for(var m=0,v=0,c=6;c>=0;c-=2){for(var d=0;d<=24;d+=8)m<<=1,m|=s>>>d+c&1;for(var d=0;d<=24;d+=8)m<<=1,m|=n>>>d+c&1}for(var c=6;c>=0;c-=2){for(var d=1;d<=25;d+=8)v<<=1,v|=s>>>d+c&1;for(var d=1;d<=25;d+=8)v<<=1,v|=n>>>d+c&1}o[h+0]=m>>>0,o[h+1]=v>>>0},"ip"),Gr.rip=i(function(n,s,o,h){for(var m=0,v=0,c=0;c<4;c++)for(var d=24;d>=0;d-=8)m<<=1,m|=s>>>d+c&1,m<<=1,m|=n>>>d+c&1;for(var c=4;c<8;c++)for(var d=24;d>=0;d-=8)v<<=1,v|=s>>>d+c&1,v<<=1,v|=n>>>d+c&1;o[h+0]=m>>>0,o[h+1]=v>>>0},"rip"),Gr.pc1=i(function(n,s,o,h){for(var m=0,v=0,c=7;c>=5;c--){for(var d=0;d<=24;d+=8)m<<=1,m|=s>>d+c&1;for(var d=0;d<=24;d+=8)m<<=1,m|=n>>d+c&1}for(var d=0;d<=24;d+=8)m<<=1,m|=s>>d+c&1;for(var c=1;c<=3;c++){for(var d=0;d<=24;d+=8)v<<=1,v|=s>>d+c&1;for(var d=0;d<=24;d+=8)v<<=1,v|=n>>d+c&1}for(var d=0;d<=24;d+=8)v<<=1,v|=n>>d+c&1;o[h+0]=m>>>0,o[h+1]=v>>>0},"pc1"),Gr.r28shl=i(function(n,s){return n<<s&268435455|n>>>28-s},"r28shl");var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Gr.pc2=i(function(n,s,o,h){for(var m=0,v=0,c=e.length>>>1,d=0;d<c;d++)m<<=1,m|=n>>>e[d]&1;for(var d=c;d<e.length;d++)v<<=1,v|=s>>>e[d]&1;o[h+0]=m>>>0,o[h+1]=v>>>0},"pc2"),Gr.expand=i(function(n,s,o){var h=0,m=0;h=(n&1)<<5|n>>>27;for(var v=23;v>=15;v-=4)h<<=6,h|=n>>>v&63;for(var v=11;v>=3;v-=4)m|=n>>>v&63,m<<=6;m|=(n&31)<<1|n>>>31,s[o+0]=h>>>0,s[o+1]=m>>>0},"expand");var t=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Gr.substitute=i(function(n,s){for(var o=0,h=0;h<4;h++){var m=n>>>18-h*6&63,v=t[h*64+m];o<<=4,o|=v}for(var h=0;h<4;h++){var m=s>>>18-h*6&63,v=t[256+h*64+m];o<<=4,o|=v}return o>>>0},"substitute");var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return Gr.permute=i(function(n){for(var s=0,o=0;o<r.length;o++)s<<=1,s|=n>>>r[o]&1;return s>>>0},"permute"),Gr.padSplit=i(function(n,s,o){for(var h=n.toString(2);h.length<s;)h="0"+h;for(var m=[],v=0;v<s;v+=o)m.push(h.slice(v,v+o));return m.join(" ")},"padSplit"),Gr}i(D7,"requireUtils$3");var Rh,Rw;function di(){if(Rw)return Rh;Rw=1,Rh=e;function e(t,r){if(!t)throw new Error(r||"Assertion failed")}return i(e,"assert"),e.equal=i(function(r,a,n){if(r!=a)throw new Error(n||"Assertion failed: "+r+" != "+a)},"assertEqual"),Rh}i(di,"requireMinimalisticAssert");var Th,Tw;function jv(){if(Tw)return Th;Tw=1;var e=di();function t(r){this.options=r,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=r.padding!==!1}return i(t,"Cipher"),Th=t,t.prototype._init=i(function(){},"_init"),t.prototype.update=i(function(a){return a.length===0?[]:this.type==="decrypt"?this._updateDecrypt(a):this._updateEncrypt(a)},"update"),t.prototype._buffer=i(function(a,n){for(var s=Math.min(this.buffer.length-this.bufferOff,a.length-n),o=0;o<s;o++)this.buffer[this.bufferOff+o]=a[n+o];return this.bufferOff+=s,s},"_buffer"),t.prototype._flushBuffer=i(function(a,n){return this._update(this.buffer,0,a,n),this.bufferOff=0,this.blockSize},"_flushBuffer"),t.prototype._updateEncrypt=i(function(a){var n=0,s=0,o=(this.bufferOff+a.length)/this.blockSize|0,h=new Array(o*this.blockSize);this.bufferOff!==0&&(n+=this._buffer(a,n),this.bufferOff===this.buffer.length&&(s+=this._flushBuffer(h,s)));for(var m=a.length-(a.length-n)%this.blockSize;n<m;n+=this.blockSize)this._update(a,n,h,s),s+=this.blockSize;for(;n<a.length;n++,this.bufferOff++)this.buffer[this.bufferOff]=a[n];return h},"_updateEncrypt"),t.prototype._updateDecrypt=i(function(a){for(var n=0,s=0,o=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,h=new Array(o*this.blockSize);o>0;o--)n+=this._buffer(a,n),s+=this._flushBuffer(h,s);return n+=this._buffer(a,n),h},"_updateDecrypt"),t.prototype.final=i(function(a){var n;a&&(n=this.update(a));var s;return this.type==="encrypt"?s=this._finalEncrypt():s=this._finalDecrypt(),n?n.concat(s):s},"final"),t.prototype._pad=i(function(a,n){if(n===0)return!1;for(;n<a.length;)a[n++]=0;return!0},"_pad"),t.prototype._finalEncrypt=i(function(){if(!this._pad(this.buffer,this.bufferOff))return[];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},"_finalEncrypt"),t.prototype._unpad=i(function(a){return a},"_unpad"),t.prototype._finalDecrypt=i(function(){e.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)},"_finalDecrypt"),Th}i(jv,"requireCipher");var Ph,Pw;function L7(){if(Pw)return Ph;Pw=1;var e=di(),t=Bt(),r=D7(),a=jv();function n(){this.tmp=new Array(2),this.keys=null}i(n,"DESState");function s(h){a.call(this,h);var m=new n;this._desState=m,this.deriveKeys(m,h.key)}i(s,"DES"),t(s,a),Ph=s,s.create=i(function(m){return new s(m)},"create");var o=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return s.prototype.deriveKeys=i(function(m,v){m.keys=new Array(32),e.equal(v.length,this.blockSize,"Invalid key length");var c=r.readUInt32BE(v,0),d=r.readUInt32BE(v,4);r.pc1(c,d,m.tmp,0),c=m.tmp[0],d=m.tmp[1];for(var y=0;y<m.keys.length;y+=2){var b=o[y>>>1];c=r.r28shl(c,b),d=r.r28shl(d,b),r.pc2(c,d,m.keys,y)}},"deriveKeys"),s.prototype._update=i(function(m,v,c,d){var y=this._desState,b=r.readUInt32BE(m,v),x=r.readUInt32BE(m,v+4);r.ip(b,x,y.tmp,0),b=y.tmp[0],x=y.tmp[1],this.type==="encrypt"?this._encrypt(y,b,x,y.tmp,0):this._decrypt(y,b,x,y.tmp,0),b=y.tmp[0],x=y.tmp[1],r.writeUInt32BE(c,b,d),r.writeUInt32BE(c,x,d+4)},"_update"),s.prototype._pad=i(function(m,v){if(this.padding===!1)return!1;for(var c=m.length-v,d=v;d<m.length;d++)m[d]=c;return!0},"_pad"),s.prototype._unpad=i(function(m){if(this.padding===!1)return m;for(var v=m[m.length-1],c=m.length-v;c<m.length;c++)e.equal(m[c],v);return m.slice(0,m.length-v)},"_unpad"),s.prototype._encrypt=i(function(m,v,c,d,y){for(var b=v,x=c,k=0;k<m.keys.length;k+=2){var N=m.keys[k],C=m.keys[k+1];r.expand(x,m.tmp,0),N^=m.tmp[0],C^=m.tmp[1];var O=r.substitute(N,C),R=r.permute(O),T=x;x=(b^R)>>>0,b=T}r.rip(x,b,d,y)},"_encrypt"),s.prototype._decrypt=i(function(m,v,c,d,y){for(var b=c,x=v,k=m.keys.length-2;k>=0;k-=2){var N=m.keys[k],C=m.keys[k+1];r.expand(b,m.tmp,0),N^=m.tmp[0],C^=m.tmp[1];var O=r.substitute(N,C),R=r.permute(O),T=b;b=(x^R)>>>0,x=T}r.rip(b,x,d,y)},"_decrypt"),Ph}i(L7,"requireDes$1");var Dh={},Dw;function HP(){if(Dw)return Dh;Dw=1;var e=di(),t=Bt(),r={};function a(s){e.equal(s.length,8,"Invalid IV length"),this.iv=new Array(8);for(var o=0;o<this.iv.length;o++)this.iv[o]=s[o]}i(a,"CBCState");function n(s){function o(c){s.call(this,c),this._cbcInit()}i(o,"CBC"),t(o,s);for(var h=Object.keys(r),m=0;m<h.length;m++){var v=h[m];o.prototype[v]=r[v]}return o.create=i(function(d){return new o(d)},"create"),o}return i(n,"instantiate"),Dh.instantiate=n,r._cbcInit=i(function(){var o=new a(this.options.iv);this._cbcState=o},"_cbcInit"),r._update=i(function(o,h,m,v){var c=this._cbcState,d=this.constructor.super_.prototype,y=c.iv;if(this.type==="encrypt"){for(var b=0;b<this.blockSize;b++)y[b]^=o[h+b];d._update.call(this,y,0,m,v);for(var b=0;b<this.blockSize;b++)y[b]=m[v+b]}else{d._update.call(this,o,h,m,v);for(var b=0;b<this.blockSize;b++)m[v+b]^=y[b];for(var b=0;b<this.blockSize;b++)y[b]=o[h+b]}},"_update"),Dh}i(HP,"requireCbc$1");var Lh,Lw;function GP(){if(Lw)return Lh;Lw=1;var e=di(),t=Bt(),r=jv(),a=L7();function n(o,h){e.equal(h.length,24,"Invalid key length");var m=h.slice(0,8),v=h.slice(8,16),c=h.slice(16,24);o==="encrypt"?this.ciphers=[a.create({type:"encrypt",key:m}),a.create({type:"decrypt",key:v}),a.create({type:"encrypt",key:c})]:this.ciphers=[a.create({type:"decrypt",key:c}),a.create({type:"encrypt",key:v}),a.create({type:"decrypt",key:m})]}i(n,"EDEState");function s(o){r.call(this,o);var h=new n(this.type,this.options.key);this._edeState=h}return i(s,"EDE"),t(s,r),Lh=s,s.create=i(function(h){return new s(h)},"create"),s.prototype._update=i(function(h,m,v,c){var d=this._edeState;d.ciphers[0]._update(h,m,v,c),d.ciphers[1]._update(v,c,v,c),d.ciphers[2]._update(v,c,v,c)},"_update"),s.prototype._pad=a.prototype._pad,s.prototype._unpad=a.prototype._unpad,Lh}i(GP,"requireEde");var Bw;function JP(){return Bw||(Bw=1,Qn.utils=D7(),Qn.Cipher=jv(),Qn.DES=L7(),Qn.CBC=HP(),Qn.EDE=GP()),Qn}i(JP,"requireDes");var Bh,zw;function KP(){if(zw)return Bh;zw=1;var e=Gn(),t=JP(),r=Bt(),a=jt().Buffer,n={"des-ede3-cbc":t.CBC.instantiate(t.EDE),"des-ede3":t.EDE,"des-ede-cbc":t.CBC.instantiate(t.EDE),"des-ede":t.EDE,"des-cbc":t.CBC.instantiate(t.DES),"des-ecb":t.DES};n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],Bh=s,r(s,e);function s(o){e.call(this);var h=o.mode.toLowerCase(),m=n[h],v;o.decrypt?v="decrypt":v="encrypt";var c=o.key;a.isBuffer(c)||(c=a.from(c)),(h==="des-ede"||h==="des-ede-cbc")&&(c=a.concat([c,c.slice(0,8)]));var d=o.iv;a.isBuffer(d)||(d=a.from(d)),this._des=m.create({key:c,iv:d,type:v})}return i(s,"DES"),s.prototype._update=function(o){return a.from(this._des.update(o))},s.prototype._final=function(){return a.from(this._des.final())},Bh}i(KP,"requireBrowserifyDes");var oi={},zl={},Ul={},Uw;function qP(){return Uw||(Uw=1,Ul.encrypt=function(e,t){return e._cipher.encryptBlock(t)},Ul.decrypt=function(e,t){return e._cipher.decryptBlock(t)}),Ul}i(qP,"requireEcb");var Fl={},zh,Fw;function sl(){return Fw||(Fw=1,zh=i(function(t,r){for(var a=Math.min(t.length,r.length),n=new Buffer(a),s=0;s<a;++s)n[s]=t[s]^r[s];return n},"xor")),zh}i(sl,"requireBufferXor");var $w;function XP(){if($w)return Fl;$w=1;var e=sl();return Fl.encrypt=function(t,r){var a=e(r,t._prev);return t._prev=t._cipher.encryptBlock(a),t._prev},Fl.decrypt=function(t,r){var a=t._prev;t._prev=r;var n=t._cipher.decryptBlock(r);return e(n,a)},Fl}i(XP,"requireCbc");var Uh={},Vw;function WP(){if(Vw)return Uh;Vw=1;var e=jt().Buffer,t=sl();function r(a,n,s){var o=n.length,h=t(n,a._cache);return a._cache=a._cache.slice(o),a._prev=e.concat([a._prev,s?n:h]),h}return i(r,"encryptStart"),Uh.encrypt=function(a,n,s){for(var o=e.allocUnsafe(0),h;n.length;)if(a._cache.length===0&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=e.allocUnsafe(0)),a._cache.length<=n.length)h=a._cache.length,o=e.concat([o,r(a,n.slice(0,h),s)]),n=n.slice(h);else{o=e.concat([o,r(a,n,s)]);break}return o},Uh}i(WP,"requireCfb");var Fh={},Zw;function QP(){if(Zw)return Fh;Zw=1;var e=jt().Buffer;function t(r,a,n){var s=r._cipher.encryptBlock(r._prev),o=s[0]^a;return r._prev=e.concat([r._prev.slice(1),e.from([n?a:o])]),o}return i(t,"encryptByte"),Fh.encrypt=function(r,a,n){for(var s=a.length,o=e.allocUnsafe(s),h=-1;++h<s;)o[h]=t(r,a[h],n);return o},Fh}i(QP,"requireCfb8");var $h={},Hw;function YP(){if(Hw)return $h;Hw=1;var e=jt().Buffer;function t(a,n,s){for(var o,h=-1,m=8,v=0,c,d;++h<m;)o=a._cipher.encryptBlock(a._prev),c=n&1<<7-h?128:0,d=o[0]^c,v+=(d&128)>>h%8,a._prev=r(a._prev,s?c:d);return v}i(t,"encryptByte");function r(a,n){var s=a.length,o=-1,h=e.allocUnsafe(a.length);for(a=e.concat([a,e.from([n])]);++o<s;)h[o]=a[o]<<1|a[o+1]>>7;return h}return i(r,"shiftIn"),$h.encrypt=function(a,n,s){for(var o=n.length,h=e.allocUnsafe(o),m=-1;++m<o;)h[m]=t(a,n[m],s);return h},$h}i(YP,"requireCfb1");var Vh={},Gw;function eD(){if(Gw)return Vh;Gw=1;var e=sl();function t(r){return r._prev=r._cipher.encryptBlock(r._prev),r._prev}return i(t,"getBlock"),Vh.encrypt=function(r,a){for(;r._cache.length<a.length;)r._cache=Buffer.concat([r._cache,t(r)]);var n=r._cache.slice(0,a.length);return r._cache=r._cache.slice(a.length),e(a,n)},Vh}i(eD,"requireOfb");var Zh={},Hh,Jw;function B7(){if(Jw)return Hh;Jw=1;function e(t){for(var r=t.length,a;r--;)if(a=t.readUInt8(r),a===255)t.writeUInt8(0,r);else{a++,t.writeUInt8(a,r);break}}return i(e,"incr32"),Hh=e,Hh}i(B7,"requireIncr32");var Kw;function qw(){if(Kw)return Zh;Kw=1;var e=sl(),t=jt().Buffer,r=B7();function a(s){var o=s._cipher.encryptBlockRaw(s._prev);return r(s._prev),o}i(a,"getBlock");var n=16;return Zh.encrypt=function(s,o){var h=Math.ceil(o.length/n),m=s._cache.length;s._cache=t.concat([s._cache,t.allocUnsafe(h*n)]);for(var v=0;v<h;v++){var c=a(s),d=m+v*n;s._cache.writeUInt32BE(c[0],d+0),s._cache.writeUInt32BE(c[1],d+4),s._cache.writeUInt32BE(c[2],d+8),s._cache.writeUInt32BE(c[3],d+12)}var y=s._cache.slice(0,o.length);return s._cache=s._cache.slice(o.length),e(o,y)},Zh}i(qw,"requireCtr");const tD={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},rD={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},iD={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},z7={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:tD,aes192:rD,aes256:iD,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var Gh,Xw;function Nv(){if(Xw)return Gh;Xw=1;var e={ECB:qP(),CBC:XP(),CFB:WP(),CFB8:QP(),CFB1:YP(),OFB:eD(),CTR:qw(),GCM:qw()},t=z7;for(var r in t)t[r].module=e[t[r].mode];return Gh=t,Gh}i(Nv,"requireModes$1");var Jh={},Ww;function Jf(){if(Ww)return Jh;Ww=1;var e=jt().Buffer;function t(h){e.isBuffer(h)||(h=e.from(h));for(var m=h.length/4|0,v=new Array(m),c=0;c<m;c++)v[c]=h.readUInt32BE(c*4);return v}i(t,"asUInt32Array");function r(h){for(var m=0;m<h.length;h++)h[m]=0}i(r,"scrubVec");function a(h,m,v,c,d){for(var y=v[0],b=v[1],x=v[2],k=v[3],N=h[0]^m[0],C=h[1]^m[1],O=h[2]^m[2],R=h[3]^m[3],T,P,B,Z,H=4,ee=1;ee<d;ee++)T=y[N>>>24]^b[C>>>16&255]^x[O>>>8&255]^k[R&255]^m[H++],P=y[C>>>24]^b[O>>>16&255]^x[R>>>8&255]^k[N&255]^m[H++],B=y[O>>>24]^b[R>>>16&255]^x[N>>>8&255]^k[C&255]^m[H++],Z=y[R>>>24]^b[N>>>16&255]^x[C>>>8&255]^k[O&255]^m[H++],N=T,C=P,O=B,R=Z;return T=(c[N>>>24]<<24|c[C>>>16&255]<<16|c[O>>>8&255]<<8|c[R&255])^m[H++],P=(c[C>>>24]<<24|c[O>>>16&255]<<16|c[R>>>8&255]<<8|c[N&255])^m[H++],B=(c[O>>>24]<<24|c[R>>>16&255]<<16|c[N>>>8&255]<<8|c[C&255])^m[H++],Z=(c[R>>>24]<<24|c[N>>>16&255]<<16|c[C>>>8&255]<<8|c[O&255])^m[H++],T=T>>>0,P=P>>>0,B=B>>>0,Z=Z>>>0,[T,P,B,Z]}i(a,"cryptBlock");var n=[0,1,2,4,8,16,32,64,128,27,54],s=(function(){for(var h=new Array(256),m=0;m<256;m++)m<128?h[m]=m<<1:h[m]=m<<1^283;for(var v=[],c=[],d=[[],[],[],[]],y=[[],[],[],[]],b=0,x=0,k=0;k<256;++k){var N=x^x<<1^x<<2^x<<3^x<<4;N=N>>>8^N&255^99,v[b]=N,c[N]=b;var C=h[b],O=h[C],R=h[O],T=h[N]*257^N*16843008;d[0][b]=T<<24|T>>>8,d[1][b]=T<<16|T>>>16,d[2][b]=T<<8|T>>>24,d[3][b]=T,T=R*16843009^O*65537^C*257^b*16843008,y[0][N]=T<<24|T>>>8,y[1][N]=T<<16|T>>>16,y[2][N]=T<<8|T>>>24,y[3][N]=T,b===0?b=x=1:(b=C^h[h[h[R^C]]],x^=h[h[x]])}return{SBOX:v,INV_SBOX:c,SUB_MIX:d,INV_SUB_MIX:y}})();function o(h){this._key=t(h),this._reset()}return i(o,"AES"),o.blockSize=16,o.keySize=256/8,o.prototype.blockSize=o.blockSize,o.prototype.keySize=o.keySize,o.prototype._reset=function(){for(var h=this._key,m=h.length,v=m+6,c=(v+1)*4,d=[],y=0;y<m;y++)d[y]=h[y];for(y=m;y<c;y++){var b=d[y-1];y%m===0?(b=b<<8|b>>>24,b=s.SBOX[b>>>24]<<24|s.SBOX[b>>>16&255]<<16|s.SBOX[b>>>8&255]<<8|s.SBOX[b&255],b^=n[y/m|0]<<24):m>6&&y%m===4&&(b=s.SBOX[b>>>24]<<24|s.SBOX[b>>>16&255]<<16|s.SBOX[b>>>8&255]<<8|s.SBOX[b&255]),d[y]=d[y-m]^b}for(var x=[],k=0;k<c;k++){var N=c-k,C=d[N-(k%4?0:4)];k<4||N<=4?x[k]=C:x[k]=s.INV_SUB_MIX[0][s.SBOX[C>>>24]]^s.INV_SUB_MIX[1][s.SBOX[C>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[C>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[C&255]]}this._nRounds=v,this._keySchedule=d,this._invKeySchedule=x},o.prototype.encryptBlockRaw=function(h){return h=t(h),a(h,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},o.prototype.encryptBlock=function(h){var m=this.encryptBlockRaw(h),v=e.allocUnsafe(16);return v.writeUInt32BE(m[0],0),v.writeUInt32BE(m[1],4),v.writeUInt32BE(m[2],8),v.writeUInt32BE(m[3],12),v},o.prototype.decryptBlock=function(h){h=t(h);var m=h[1];h[1]=h[3],h[3]=m;var v=a(h,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),c=e.allocUnsafe(16);return c.writeUInt32BE(v[0],0),c.writeUInt32BE(v[3],4),c.writeUInt32BE(v[2],8),c.writeUInt32BE(v[1],12),c},o.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},Jh.AES=o,Jh}i(Jf,"requireAes");var Kh,Qw;function nD(){if(Qw)return Kh;Qw=1;var e=jt().Buffer,t=e.alloc(16,0);function r(s){return[s.readUInt32BE(0),s.readUInt32BE(4),s.readUInt32BE(8),s.readUInt32BE(12)]}i(r,"toArray");function a(s){var o=e.allocUnsafe(16);return o.writeUInt32BE(s[0]>>>0,0),o.writeUInt32BE(s[1]>>>0,4),o.writeUInt32BE(s[2]>>>0,8),o.writeUInt32BE(s[3]>>>0,12),o}i(a,"fromArray");function n(s){this.h=s,this.state=e.alloc(16,0),this.cache=e.allocUnsafe(0)}return i(n,"GHASH"),n.prototype.ghash=function(s){for(var o=-1;++o<s.length;)this.state[o]^=s[o];this._multiply()},n.prototype._multiply=function(){for(var s=r(this.h),o=[0,0,0,0],h,m,v,c=-1;++c<128;){for(m=(this.state[~~(c/8)]&1<<7-c%8)!==0,m&&(o[0]^=s[0],o[1]^=s[1],o[2]^=s[2],o[3]^=s[3]),v=(s[3]&1)!==0,h=3;h>0;h--)s[h]=s[h]>>>1|(s[h-1]&1)<<31;s[0]=s[0]>>>1,v&&(s[0]=s[0]^225<<24)}this.state=a(o)},n.prototype.update=function(s){this.cache=e.concat([this.cache,s]);for(var o;this.cache.length>=16;)o=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(o)},n.prototype.final=function(s,o){return this.cache.length&&this.ghash(e.concat([this.cache,t],16)),this.ghash(a([0,s,0,o])),this.state},Kh=n,Kh}i(nD,"requireGhash");var qh,Yw;function U7(){if(Yw)return qh;Yw=1;var e=Jf(),t=jt().Buffer,r=Gn(),a=Bt(),n=nD(),s=sl(),o=B7();function h(c,d){var y=0;c.length!==d.length&&y++;for(var b=Math.min(c.length,d.length),x=0;x<b;++x)y+=c[x]^d[x];return y}i(h,"xorTest");function m(c,d,y){if(d.length===12)return c._finID=t.concat([d,t.from([0,0,0,1])]),t.concat([d,t.from([0,0,0,2])]);var b=new n(y),x=d.length,k=x%16;b.update(d),k&&(k=16-k,b.update(t.alloc(k,0))),b.update(t.alloc(8,0));var N=x*8,C=t.alloc(8);C.writeUIntBE(N,0,8),b.update(C),c._finID=b.state;var O=t.from(c._finID);return o(O),O}i(m,"calcIv");function v(c,d,y,b){r.call(this);var x=t.alloc(4,0);this._cipher=new e.AES(d);var k=this._cipher.encryptBlock(x);this._ghash=new n(k),y=m(this,y,k),this._prev=t.from(y),this._cache=t.allocUnsafe(0),this._secCache=t.allocUnsafe(0),this._decrypt=b,this._alen=0,this._len=0,this._mode=c,this._authTag=null,this._called=!1}return i(v,"StreamCipher"),a(v,r),v.prototype._update=function(c){if(!this._called&&this._alen){var d=16-this._alen%16;d<16&&(d=t.alloc(d,0),this._ghash.update(d))}this._called=!0;var y=this._mode.encrypt(this,c);return this._decrypt?this._ghash.update(c):this._ghash.update(y),this._len+=c.length,y},v.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var c=s(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&h(c,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=c,this._cipher.scrub()},v.prototype.getAuthTag=i(function(){if(this._decrypt||!t.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},"getAuthTag"),v.prototype.setAuthTag=i(function(d){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=d},"setAuthTag"),v.prototype.setAAD=i(function(d){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(d),this._alen+=d.length},"setAAD"),qh=v,qh}i(U7,"requireAuthCipher");var Xh,e6;function F7(){if(e6)return Xh;e6=1;var e=Jf(),t=jt().Buffer,r=Gn(),a=Bt();function n(s,o,h,m){r.call(this),this._cipher=new e.AES(o),this._prev=t.from(h),this._cache=t.allocUnsafe(0),this._secCache=t.allocUnsafe(0),this._decrypt=m,this._mode=s}return i(n,"StreamCipher"),a(n,r),n.prototype._update=function(s){return this._mode.encrypt(this,s,this._decrypt)},n.prototype._final=function(){this._cipher.scrub()},Xh=n,Xh}i(F7,"requireStreamCipher");var Wh,t6;function Kf(){if(t6)return Wh;t6=1;var e=jt().Buffer,t=xv();function r(a,n,s,o){if(e.isBuffer(a)||(a=e.from(a,"binary")),n&&(e.isBuffer(n)||(n=e.from(n,"binary")),n.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var h=s/8,m=e.alloc(h),v=e.alloc(o||0),c=e.alloc(0);h>0||o>0;){var d=new t;d.update(c),d.update(a),n&&d.update(n),c=d.digest();var y=0;if(h>0){var b=m.length-h;y=Math.min(h,c.length),c.copy(m,b,0,y),h-=y}if(y<c.length&&o>0){var x=v.length-o,k=Math.min(o,c.length-y);c.copy(v,x,y,y+k),o-=k}}return c.fill(0),{key:m,iv:v}}return i(r,"EVP_BytesToKey"),Wh=r,Wh}i(Kf,"requireEvp_bytestokey");var r6;function aD(){if(r6)return zl;r6=1;var e=Nv(),t=U7(),r=jt().Buffer,a=F7(),n=Gn(),s=Jf(),o=Kf(),h=Bt();function m(b,x,k){n.call(this),this._cache=new c,this._cipher=new s.AES(x),this._prev=r.from(k),this._mode=b,this._autopadding=!0}i(m,"Cipher"),h(m,n),m.prototype._update=function(b){this._cache.add(b);for(var x,k,N=[];x=this._cache.get();)k=this._mode.encrypt(this,x),N.push(k);return r.concat(N)};var v=r.alloc(16,16);m.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return b=this._mode.encrypt(this,b),this._cipher.scrub(),b;if(!b.equals(v))throw this._cipher.scrub(),new Error("data not multiple of block length")},m.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this};function c(){this.cache=r.allocUnsafe(0)}i(c,"Splitter"),c.prototype.add=function(b){this.cache=r.concat([this.cache,b])},c.prototype.get=function(){if(this.cache.length>15){var b=this.cache.slice(0,16);return this.cache=this.cache.slice(16),b}return null},c.prototype.flush=function(){for(var b=16-this.cache.length,x=r.allocUnsafe(b),k=-1;++k<b;)x.writeUInt8(b,k);return r.concat([this.cache,x])};function d(b,x,k){var N=e[b.toLowerCase()];if(!N)throw new TypeError("invalid suite type");if(typeof x=="string"&&(x=r.from(x)),x.length!==N.key/8)throw new TypeError("invalid key length "+x.length);if(typeof k=="string"&&(k=r.from(k)),N.mode!=="GCM"&&k.length!==N.iv)throw new TypeError("invalid iv length "+k.length);return N.type==="stream"?new a(N.module,x,k):N.type==="auth"?new t(N.module,x,k):new m(N.module,x,k)}i(d,"createCipheriv");function y(b,x){var k=e[b.toLowerCase()];if(!k)throw new TypeError("invalid suite type");var N=o(x,!1,k.key,k.iv);return d(b,N.key,N.iv)}return i(y,"createCipher"),zl.createCipheriv=d,zl.createCipher=y,zl}i(aD,"requireEncrypter");var $l={},i6;function sD(){if(i6)return $l;i6=1;var e=U7(),t=jt().Buffer,r=Nv(),a=F7(),n=Gn(),s=Jf(),o=Kf(),h=Bt();function m(b,x,k){n.call(this),this._cache=new v,this._last=void 0,this._cipher=new s.AES(x),this._prev=t.from(k),this._mode=b,this._autopadding=!0}i(m,"Decipher"),h(m,n),m.prototype._update=function(b){this._cache.add(b);for(var x,k,N=[];x=this._cache.get(this._autopadding);)k=this._mode.decrypt(this,x),N.push(k);return t.concat(N)},m.prototype._final=function(){var b=this._cache.flush();if(this._autopadding)return c(this._mode.decrypt(this,b));if(b)throw new Error("data not multiple of block length")},m.prototype.setAutoPadding=function(b){return this._autopadding=!!b,this};function v(){this.cache=t.allocUnsafe(0)}i(v,"Splitter"),v.prototype.add=function(b){this.cache=t.concat([this.cache,b])},v.prototype.get=function(b){var x;if(b){if(this.cache.length>16)return x=this.cache.slice(0,16),this.cache=this.cache.slice(16),x}else if(this.cache.length>=16)return x=this.cache.slice(0,16),this.cache=this.cache.slice(16),x;return null},v.prototype.flush=function(){if(this.cache.length)return this.cache};function c(b){var x=b[15];if(x<1||x>16)throw new Error("unable to decrypt data");for(var k=-1;++k<x;)if(b[k+(16-x)]!==x)throw new Error("unable to decrypt data");if(x!==16)return b.slice(0,16-x)}i(c,"unpad");function d(b,x,k){var N=r[b.toLowerCase()];if(!N)throw new TypeError("invalid suite type");if(typeof k=="string"&&(k=t.from(k)),N.mode!=="GCM"&&k.length!==N.iv)throw new TypeError("invalid iv length "+k.length);if(typeof x=="string"&&(x=t.from(x)),x.length!==N.key/8)throw new TypeError("invalid key length "+x.length);return N.type==="stream"?new a(N.module,x,k,!0):N.type==="auth"?new e(N.module,x,k,!0):new m(N.module,x,k)}i(d,"createDecipheriv");function y(b,x){var k=r[b.toLowerCase()];if(!k)throw new TypeError("invalid suite type");var N=o(x,!1,k.key,k.iv);return d(b,N.key,N.iv)}return i(y,"createDecipher"),$l.createDecipher=y,$l.createDecipheriv=d,$l}i(sD,"requireDecrypter");var n6;function Iv(){if(n6)return oi;n6=1;var e=aD(),t=sD(),r=z7;function a(){return Object.keys(r)}return i(a,"getCiphers"),oi.createCipher=oi.Cipher=e.createCipher,oi.createCipheriv=oi.Cipheriv=e.createCipheriv,oi.createDecipher=oi.Decipher=t.createDecipher,oi.createDecipheriv=oi.Decipheriv=t.createDecipheriv,oi.listCiphers=oi.getCiphers=a,oi}i(Iv,"requireBrowser$6");var Qh={},a6;function oD(){return a6||(a6=1,(function(e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}})(Qh)),Qh}i(oD,"requireModes");var s6;function lD(){if(s6)return si;s6=1;var e=KP(),t=Iv(),r=Nv(),a=oD(),n=Kf();function s(c,d){c=c.toLowerCase();var y,b;if(r[c])y=r[c].key,b=r[c].iv;else if(a[c])y=a[c].key*8,b=a[c].iv;else throw new TypeError("invalid suite type");var x=n(d,!1,y,b);return h(c,x.key,x.iv)}i(s,"createCipher");function o(c,d){c=c.toLowerCase();var y,b;if(r[c])y=r[c].key,b=r[c].iv;else if(a[c])y=a[c].key*8,b=a[c].iv;else throw new TypeError("invalid suite type");var x=n(d,!1,y,b);return m(c,x.key,x.iv)}i(o,"createDecipher");function h(c,d,y){if(c=c.toLowerCase(),r[c])return t.createCipheriv(c,d,y);if(a[c])return new e({key:d,iv:y,mode:c});throw new TypeError("invalid suite type")}i(h,"createCipheriv");function m(c,d,y){if(c=c.toLowerCase(),r[c])return t.createDecipheriv(c,d,y);if(a[c])return new e({key:d,iv:y,mode:c,decrypt:!0});throw new TypeError("invalid suite type")}i(m,"createDecipheriv");function v(){return Object.keys(a).concat(t.getCiphers())}return i(v,"getCiphers"),si.createCipher=si.Cipher=s,si.createCipheriv=si.Cipheriv=h,si.createDecipher=si.Decipher=o,si.createDecipheriv=si.Decipheriv=m,si.listCiphers=si.getCiphers=v,si}i(lD,"requireBrowser$5");var Yn={},ju={exports:{}},uD=ju.exports,o6;function Ir(){return o6||(o6=1,(function(e){(function(t,r){function a(F,u){if(!F)throw new Error(u||"Assertion failed")}i(a,"assert");function n(F,u){F.super_=u;var p=i(function(){},"TempCtor");p.prototype=u.prototype,F.prototype=new p,F.prototype.constructor=F}i(n,"inherits");function s(F,u,p){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((u==="le"||u==="be")&&(p=u,u=10),this._init(F||0,u||10,p||"be"))}i(s,"BN"),typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ji.Buffer}catch{}s.isBN=i(function(u){return u instanceof s?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===s.wordSize&&Array.isArray(u.words)},"isBN"),s.max=i(function(u,p){return u.cmp(p)>0?u:p},"max"),s.min=i(function(u,p){return u.cmp(p)<0?u:p},"min"),s.prototype._init=i(function(u,p,l){if(typeof u=="number")return this._initNumber(u,p,l);if(typeof u=="object")return this._initArray(u,p,l);p==="hex"&&(p=16),a(p===(p|0)&&p>=2&&p<=36),u=u.toString().replace(/\s+/g,"");var g=0;u[0]==="-"&&(g++,this.negative=1),g<u.length&&(p===16?this._parseHex(u,g,l):(this._parseBase(u,p,g),l==="le"&&this._initArray(this.toArray(),p,l)))},"init"),s.prototype._initNumber=i(function(u,p,l){u<0&&(this.negative=1,u=-u),u<67108864?(this.words=[u&67108863],this.length=1):u<4503599627370496?(this.words=[u&67108863,u/67108864&67108863],this.length=2):(a(u<9007199254740992),this.words=[u&67108863,u/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),p,l)},"_initNumber"),s.prototype._initArray=i(function(u,p,l){if(a(typeof u.length=="number"),u.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(u.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var w,M,A=0;if(l==="be")for(g=u.length-1,w=0;g>=0;g-=3)M=u[g]|u[g-1]<<8|u[g-2]<<16,this.words[w]|=M<<A&67108863,this.words[w+1]=M>>>26-A&67108863,A+=24,A>=26&&(A-=26,w++);else if(l==="le")for(g=0,w=0;g<u.length;g+=3)M=u[g]|u[g+1]<<8|u[g+2]<<16,this.words[w]|=M<<A&67108863,this.words[w+1]=M>>>26-A&67108863,A+=24,A>=26&&(A-=26,w++);return this.strip()},"_initArray");function h(F,u){var p=F.charCodeAt(u);return p>=65&&p<=70?p-55:p>=97&&p<=102?p-87:p-48&15}i(h,"parseHex4Bits");function m(F,u,p){var l=h(F,p);return p-1>=u&&(l|=h(F,p-1)<<4),l}i(m,"parseHexByte"),s.prototype._parseHex=i(function(u,p,l){this.length=Math.ceil((u.length-p)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var w=0,M=0,A;if(l==="be")for(g=u.length-1;g>=p;g-=2)A=m(u,p,g)<<w,this.words[M]|=A&67108863,w>=18?(w-=18,M+=1,this.words[M]|=A>>>26):w+=8;else{var S=u.length-p;for(g=S%2===0?p+1:p;g<u.length;g+=2)A=m(u,p,g)<<w,this.words[M]|=A&67108863,w>=18?(w-=18,M+=1,this.words[M]|=A>>>26):w+=8}this.strip()},"_parseHex");function v(F,u,p,l){for(var g=0,w=Math.min(F.length,p),M=u;M<w;M++){var A=F.charCodeAt(M)-48;g*=l,A>=49?g+=A-49+10:A>=17?g+=A-17+10:g+=A}return g}i(v,"parseBase"),s.prototype._parseBase=i(function(u,p,l){this.words=[0],this.length=1;for(var g=0,w=1;w<=67108863;w*=p)g++;g--,w=w/p|0;for(var M=u.length-l,A=M%g,S=Math.min(M,M-A)+l,f=0,_=l;_<S;_+=g)f=v(u,_,_+g,p),this.imuln(w),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(A!==0){var E=1;for(f=v(u,_,u.length,p),_=0;_<A;_++)E*=p;this.imuln(E),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},"_parseBase"),s.prototype.copy=i(function(u){u.words=new Array(this.length);for(var p=0;p<this.length;p++)u.words[p]=this.words[p];u.length=this.length,u.negative=this.negative,u.red=this.red},"copy"),s.prototype.clone=i(function(){var u=new s(null);return this.copy(u),u},"clone"),s.prototype._expand=i(function(u){for(;this.length<u;)this.words[this.length++]=0;return this},"_expand"),s.prototype.strip=i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),s.prototype._normSign=i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),s.prototype.inspect=i(function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"},"inspect");var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=i(function(u,p){u=u||10,p=p|0||1;var l;if(u===16||u==="hex"){l="";for(var g=0,w=0,M=0;M<this.length;M++){var A=this.words[M],S=((A<<g|w)&16777215).toString(16);w=A>>>24-g&16777215,g+=2,g>=26&&(g-=26,M--),w!==0||M!==this.length-1?l=c[6-S.length]+S+l:l=S+l}for(w!==0&&(l=w.toString(16)+l);l.length%p!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(u===(u|0)&&u>=2&&u<=36){var f=d[u],_=y[u];l="";var E=this.clone();for(E.negative=0;!E.isZero();){var I=E.modn(_).toString(u);E=E.idivn(_),E.isZero()?l=I+l:l=c[f-I.length]+I+l}for(this.isZero()&&(l="0"+l);l.length%p!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}a(!1,"Base should be between 2 and 36")},"toString"),s.prototype.toNumber=i(function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},"toNumber"),s.prototype.toJSON=i(function(){return this.toString(16)},"toJSON"),s.prototype.toBuffer=i(function(u,p){return a(typeof o<"u"),this.toArrayLike(o,u,p)},"toBuffer"),s.prototype.toArray=i(function(u,p){return this.toArrayLike(Array,u,p)},"toArray"),s.prototype.toArrayLike=i(function(u,p,l){var g=this.byteLength(),w=l||Math.max(1,g);a(g<=w,"byte array longer than desired length"),a(w>0,"Requested array length <= 0"),this.strip();var M=p==="le",A=new u(w),S,f,_=this.clone();if(M){for(f=0;!_.isZero();f++)S=_.andln(255),_.iushrn(8),A[f]=S;for(;f<w;f++)A[f]=0}else{for(f=0;f<w-g;f++)A[f]=0;for(f=0;!_.isZero();f++)S=_.andln(255),_.iushrn(8),A[w-f-1]=S}return A},"toArrayLike"),Math.clz32?s.prototype._countBits=i(function(u){return 32-Math.clz32(u)},"_countBits"):s.prototype._countBits=i(function(u){var p=u,l=0;return p>=4096&&(l+=13,p>>>=13),p>=64&&(l+=7,p>>>=7),p>=8&&(l+=4,p>>>=4),p>=2&&(l+=2,p>>>=2),l+p},"_countBits"),s.prototype._zeroBits=i(function(u){if(u===0)return 26;var p=u,l=0;return(p&8191)===0&&(l+=13,p>>>=13),(p&127)===0&&(l+=7,p>>>=7),(p&15)===0&&(l+=4,p>>>=4),(p&3)===0&&(l+=2,p>>>=2),(p&1)===0&&l++,l},"_zeroBits"),s.prototype.bitLength=i(function(){var u=this.words[this.length-1],p=this._countBits(u);return(this.length-1)*26+p},"bitLength");function b(F){for(var u=new Array(F.bitLength()),p=0;p<u.length;p++){var l=p/26|0,g=p%26;u[p]=(F.words[l]&1<<g)>>>g}return u}i(b,"toBitArray"),s.prototype.zeroBits=i(function(){if(this.isZero())return 0;for(var u=0,p=0;p<this.length;p++){var l=this._zeroBits(this.words[p]);if(u+=l,l!==26)break}return u},"zeroBits"),s.prototype.byteLength=i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),s.prototype.toTwos=i(function(u){return this.negative!==0?this.abs().inotn(u).iaddn(1):this.clone()},"toTwos"),s.prototype.fromTwos=i(function(u){return this.testn(u-1)?this.notn(u).iaddn(1).ineg():this.clone()},"fromTwos"),s.prototype.isNeg=i(function(){return this.negative!==0},"isNeg"),s.prototype.neg=i(function(){return this.clone().ineg()},"neg"),s.prototype.ineg=i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),s.prototype.iuor=i(function(u){for(;this.length<u.length;)this.words[this.length++]=0;for(var p=0;p<u.length;p++)this.words[p]=this.words[p]|u.words[p];return this.strip()},"iuor"),s.prototype.ior=i(function(u){return a((this.negative|u.negative)===0),this.iuor(u)},"ior"),s.prototype.or=i(function(u){return this.length>u.length?this.clone().ior(u):u.clone().ior(this)},"or"),s.prototype.uor=i(function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},"uor"),s.prototype.iuand=i(function(u){var p;this.length>u.length?p=u:p=this;for(var l=0;l<p.length;l++)this.words[l]=this.words[l]&u.words[l];return this.length=p.length,this.strip()},"iuand"),s.prototype.iand=i(function(u){return a((this.negative|u.negative)===0),this.iuand(u)},"iand"),s.prototype.and=i(function(u){return this.length>u.length?this.clone().iand(u):u.clone().iand(this)},"and"),s.prototype.uand=i(function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},"uand"),s.prototype.iuxor=i(function(u){var p,l;this.length>u.length?(p=this,l=u):(p=u,l=this);for(var g=0;g<l.length;g++)this.words[g]=p.words[g]^l.words[g];if(this!==p)for(;g<p.length;g++)this.words[g]=p.words[g];return this.length=p.length,this.strip()},"iuxor"),s.prototype.ixor=i(function(u){return a((this.negative|u.negative)===0),this.iuxor(u)},"ixor"),s.prototype.xor=i(function(u){return this.length>u.length?this.clone().ixor(u):u.clone().ixor(this)},"xor"),s.prototype.uxor=i(function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},"uxor"),s.prototype.inotn=i(function(u){a(typeof u=="number"&&u>=0);var p=Math.ceil(u/26)|0,l=u%26;this._expand(p),l>0&&p--;for(var g=0;g<p;g++)this.words[g]=~this.words[g]&67108863;return l>0&&(this.words[g]=~this.words[g]&67108863>>26-l),this.strip()},"inotn"),s.prototype.notn=i(function(u){return this.clone().inotn(u)},"notn"),s.prototype.setn=i(function(u,p){a(typeof u=="number"&&u>=0);var l=u/26|0,g=u%26;return this._expand(l+1),p?this.words[l]=this.words[l]|1<<g:this.words[l]=this.words[l]&~(1<<g),this.strip()},"setn"),s.prototype.iadd=i(function(u){var p;if(this.negative!==0&&u.negative===0)return this.negative=0,p=this.isub(u),this.negative^=1,this._normSign();if(this.negative===0&&u.negative!==0)return u.negative=0,p=this.isub(u),u.negative=1,p._normSign();var l,g;this.length>u.length?(l=this,g=u):(l=u,g=this);for(var w=0,M=0;M<g.length;M++)p=(l.words[M]|0)+(g.words[M]|0)+w,this.words[M]=p&67108863,w=p>>>26;for(;w!==0&&M<l.length;M++)p=(l.words[M]|0)+w,this.words[M]=p&67108863,w=p>>>26;if(this.length=l.length,w!==0)this.words[this.length]=w,this.length++;else if(l!==this)for(;M<l.length;M++)this.words[M]=l.words[M];return this},"iadd"),s.prototype.add=i(function(u){var p;return u.negative!==0&&this.negative===0?(u.negative=0,p=this.sub(u),u.negative^=1,p):u.negative===0&&this.negative!==0?(this.negative=0,p=u.sub(this),this.negative=1,p):this.length>u.length?this.clone().iadd(u):u.clone().iadd(this)},"add"),s.prototype.isub=i(function(u){if(u.negative!==0){u.negative=0;var p=this.iadd(u);return u.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var l=this.cmp(u);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,w;l>0?(g=this,w=u):(g=u,w=this);for(var M=0,A=0;A<w.length;A++)p=(g.words[A]|0)-(w.words[A]|0)+M,M=p>>26,this.words[A]=p&67108863;for(;M!==0&&A<g.length;A++)p=(g.words[A]|0)+M,M=p>>26,this.words[A]=p&67108863;if(M===0&&A<g.length&&g!==this)for(;A<g.length;A++)this.words[A]=g.words[A];return this.length=Math.max(this.length,A),g!==this&&(this.negative=1),this.strip()},"isub"),s.prototype.sub=i(function(u){return this.clone().isub(u)},"sub");function x(F,u,p){p.negative=u.negative^F.negative;var l=F.length+u.length|0;p.length=l,l=l-1|0;var g=F.words[0]|0,w=u.words[0]|0,M=g*w,A=M&67108863,S=M/67108864|0;p.words[0]=A;for(var f=1;f<l;f++){for(var _=S>>>26,E=S&67108863,I=Math.min(f,u.length-1),D=Math.max(0,f-F.length+1);D<=I;D++){var L=f-D|0;g=F.words[L]|0,w=u.words[D]|0,M=g*w+E,_+=M/67108864|0,E=M&67108863}p.words[f]=E|0,S=_|0}return S!==0?p.words[f]=S|0:p.length--,p.strip()}i(x,"smallMulTo");var k=i(function(u,p,l){var g=u.words,w=p.words,M=l.words,A=0,S,f,_,E=g[0]|0,I=E&8191,D=E>>>13,L=g[1]|0,U=L&8191,z=L>>>13,V=g[2]|0,G=V&8191,q=V>>>13,_e=g[3]|0,ae=_e&8191,se=_e>>>13,ye=g[4]|0,K=ye&8191,re=ye>>>13,X=g[5]|0,W=X&8191,le=X>>>13,ke=g[6]|0,pe=ke&8191,fe=ke>>>13,Q=g[7]|0,Y=Q&8191,te=Q>>>13,he=g[8]|0,oe=he&8191,ue=he>>>13,ze=g[9]|0,we=ze&8191,Be=ze>>>13,We=w[0]|0,ve=We&8191,Ue=We>>>13,ce=w[1]|0,be=ce&8191,Te=ce>>>13,Oe=w[2]|0,Ae=Oe&8191,$e=Oe>>>13,Ye=w[3]|0,Ne=Ye&8191,Ee=Ye>>>13,Pe=w[4]|0,Se=Pe&8191,He=Pe>>>13,qe=w[5]|0,ie=qe&8191,me=qe>>>13,Ce=w[6]|0,xe=Ce&8191,Re=Ce>>>13,Ge=w[7]|0,ne=Ge&8191,je=Ge>>>13,Ve=w[8]|0,ge=Ve&8191,Je=Ve>>>13,rt=w[9]|0,De=rt&8191,Qe=rt>>>13;l.negative=u.negative^p.negative,l.length=19,S=Math.imul(I,ve),f=Math.imul(I,Ue),f=f+Math.imul(D,ve)|0,_=Math.imul(D,Ue);var Ie=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,S=Math.imul(U,ve),f=Math.imul(U,Ue),f=f+Math.imul(z,ve)|0,_=Math.imul(z,Ue),S=S+Math.imul(I,be)|0,f=f+Math.imul(I,Te)|0,f=f+Math.imul(D,be)|0,_=_+Math.imul(D,Te)|0;var Fe=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,S=Math.imul(G,ve),f=Math.imul(G,Ue),f=f+Math.imul(q,ve)|0,_=Math.imul(q,Ue),S=S+Math.imul(U,be)|0,f=f+Math.imul(U,Te)|0,f=f+Math.imul(z,be)|0,_=_+Math.imul(z,Te)|0,S=S+Math.imul(I,Ae)|0,f=f+Math.imul(I,$e)|0,f=f+Math.imul(D,Ae)|0,_=_+Math.imul(D,$e)|0;var ut=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(ut>>>26)|0,ut&=67108863,S=Math.imul(ae,ve),f=Math.imul(ae,Ue),f=f+Math.imul(se,ve)|0,_=Math.imul(se,Ue),S=S+Math.imul(G,be)|0,f=f+Math.imul(G,Te)|0,f=f+Math.imul(q,be)|0,_=_+Math.imul(q,Te)|0,S=S+Math.imul(U,Ae)|0,f=f+Math.imul(U,$e)|0,f=f+Math.imul(z,Ae)|0,_=_+Math.imul(z,$e)|0,S=S+Math.imul(I,Ne)|0,f=f+Math.imul(I,Ee)|0,f=f+Math.imul(D,Ne)|0,_=_+Math.imul(D,Ee)|0;var yt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(yt>>>26)|0,yt&=67108863,S=Math.imul(K,ve),f=Math.imul(K,Ue),f=f+Math.imul(re,ve)|0,_=Math.imul(re,Ue),S=S+Math.imul(ae,be)|0,f=f+Math.imul(ae,Te)|0,f=f+Math.imul(se,be)|0,_=_+Math.imul(se,Te)|0,S=S+Math.imul(G,Ae)|0,f=f+Math.imul(G,$e)|0,f=f+Math.imul(q,Ae)|0,_=_+Math.imul(q,$e)|0,S=S+Math.imul(U,Ne)|0,f=f+Math.imul(U,Ee)|0,f=f+Math.imul(z,Ne)|0,_=_+Math.imul(z,Ee)|0,S=S+Math.imul(I,Se)|0,f=f+Math.imul(I,He)|0,f=f+Math.imul(D,Se)|0,_=_+Math.imul(D,He)|0;var ht=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(ht>>>26)|0,ht&=67108863,S=Math.imul(W,ve),f=Math.imul(W,Ue),f=f+Math.imul(le,ve)|0,_=Math.imul(le,Ue),S=S+Math.imul(K,be)|0,f=f+Math.imul(K,Te)|0,f=f+Math.imul(re,be)|0,_=_+Math.imul(re,Te)|0,S=S+Math.imul(ae,Ae)|0,f=f+Math.imul(ae,$e)|0,f=f+Math.imul(se,Ae)|0,_=_+Math.imul(se,$e)|0,S=S+Math.imul(G,Ne)|0,f=f+Math.imul(G,Ee)|0,f=f+Math.imul(q,Ne)|0,_=_+Math.imul(q,Ee)|0,S=S+Math.imul(U,Se)|0,f=f+Math.imul(U,He)|0,f=f+Math.imul(z,Se)|0,_=_+Math.imul(z,He)|0,S=S+Math.imul(I,ie)|0,f=f+Math.imul(I,me)|0,f=f+Math.imul(D,ie)|0,_=_+Math.imul(D,me)|0;var Mt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,S=Math.imul(pe,ve),f=Math.imul(pe,Ue),f=f+Math.imul(fe,ve)|0,_=Math.imul(fe,Ue),S=S+Math.imul(W,be)|0,f=f+Math.imul(W,Te)|0,f=f+Math.imul(le,be)|0,_=_+Math.imul(le,Te)|0,S=S+Math.imul(K,Ae)|0,f=f+Math.imul(K,$e)|0,f=f+Math.imul(re,Ae)|0,_=_+Math.imul(re,$e)|0,S=S+Math.imul(ae,Ne)|0,f=f+Math.imul(ae,Ee)|0,f=f+Math.imul(se,Ne)|0,_=_+Math.imul(se,Ee)|0,S=S+Math.imul(G,Se)|0,f=f+Math.imul(G,He)|0,f=f+Math.imul(q,Se)|0,_=_+Math.imul(q,He)|0,S=S+Math.imul(U,ie)|0,f=f+Math.imul(U,me)|0,f=f+Math.imul(z,ie)|0,_=_+Math.imul(z,me)|0,S=S+Math.imul(I,xe)|0,f=f+Math.imul(I,Re)|0,f=f+Math.imul(D,xe)|0,_=_+Math.imul(D,Re)|0;var zt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(zt>>>26)|0,zt&=67108863,S=Math.imul(Y,ve),f=Math.imul(Y,Ue),f=f+Math.imul(te,ve)|0,_=Math.imul(te,Ue),S=S+Math.imul(pe,be)|0,f=f+Math.imul(pe,Te)|0,f=f+Math.imul(fe,be)|0,_=_+Math.imul(fe,Te)|0,S=S+Math.imul(W,Ae)|0,f=f+Math.imul(W,$e)|0,f=f+Math.imul(le,Ae)|0,_=_+Math.imul(le,$e)|0,S=S+Math.imul(K,Ne)|0,f=f+Math.imul(K,Ee)|0,f=f+Math.imul(re,Ne)|0,_=_+Math.imul(re,Ee)|0,S=S+Math.imul(ae,Se)|0,f=f+Math.imul(ae,He)|0,f=f+Math.imul(se,Se)|0,_=_+Math.imul(se,He)|0,S=S+Math.imul(G,ie)|0,f=f+Math.imul(G,me)|0,f=f+Math.imul(q,ie)|0,_=_+Math.imul(q,me)|0,S=S+Math.imul(U,xe)|0,f=f+Math.imul(U,Re)|0,f=f+Math.imul(z,xe)|0,_=_+Math.imul(z,Re)|0,S=S+Math.imul(I,ne)|0,f=f+Math.imul(I,je)|0,f=f+Math.imul(D,ne)|0,_=_+Math.imul(D,je)|0;var Et=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Et>>>26)|0,Et&=67108863,S=Math.imul(oe,ve),f=Math.imul(oe,Ue),f=f+Math.imul(ue,ve)|0,_=Math.imul(ue,Ue),S=S+Math.imul(Y,be)|0,f=f+Math.imul(Y,Te)|0,f=f+Math.imul(te,be)|0,_=_+Math.imul(te,Te)|0,S=S+Math.imul(pe,Ae)|0,f=f+Math.imul(pe,$e)|0,f=f+Math.imul(fe,Ae)|0,_=_+Math.imul(fe,$e)|0,S=S+Math.imul(W,Ne)|0,f=f+Math.imul(W,Ee)|0,f=f+Math.imul(le,Ne)|0,_=_+Math.imul(le,Ee)|0,S=S+Math.imul(K,Se)|0,f=f+Math.imul(K,He)|0,f=f+Math.imul(re,Se)|0,_=_+Math.imul(re,He)|0,S=S+Math.imul(ae,ie)|0,f=f+Math.imul(ae,me)|0,f=f+Math.imul(se,ie)|0,_=_+Math.imul(se,me)|0,S=S+Math.imul(G,xe)|0,f=f+Math.imul(G,Re)|0,f=f+Math.imul(q,xe)|0,_=_+Math.imul(q,Re)|0,S=S+Math.imul(U,ne)|0,f=f+Math.imul(U,je)|0,f=f+Math.imul(z,ne)|0,_=_+Math.imul(z,je)|0,S=S+Math.imul(I,ge)|0,f=f+Math.imul(I,Je)|0,f=f+Math.imul(D,ge)|0,_=_+Math.imul(D,Je)|0;var _t=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(_t>>>26)|0,_t&=67108863,S=Math.imul(we,ve),f=Math.imul(we,Ue),f=f+Math.imul(Be,ve)|0,_=Math.imul(Be,Ue),S=S+Math.imul(oe,be)|0,f=f+Math.imul(oe,Te)|0,f=f+Math.imul(ue,be)|0,_=_+Math.imul(ue,Te)|0,S=S+Math.imul(Y,Ae)|0,f=f+Math.imul(Y,$e)|0,f=f+Math.imul(te,Ae)|0,_=_+Math.imul(te,$e)|0,S=S+Math.imul(pe,Ne)|0,f=f+Math.imul(pe,Ee)|0,f=f+Math.imul(fe,Ne)|0,_=_+Math.imul(fe,Ee)|0,S=S+Math.imul(W,Se)|0,f=f+Math.imul(W,He)|0,f=f+Math.imul(le,Se)|0,_=_+Math.imul(le,He)|0,S=S+Math.imul(K,ie)|0,f=f+Math.imul(K,me)|0,f=f+Math.imul(re,ie)|0,_=_+Math.imul(re,me)|0,S=S+Math.imul(ae,xe)|0,f=f+Math.imul(ae,Re)|0,f=f+Math.imul(se,xe)|0,_=_+Math.imul(se,Re)|0,S=S+Math.imul(G,ne)|0,f=f+Math.imul(G,je)|0,f=f+Math.imul(q,ne)|0,_=_+Math.imul(q,je)|0,S=S+Math.imul(U,ge)|0,f=f+Math.imul(U,Je)|0,f=f+Math.imul(z,ge)|0,_=_+Math.imul(z,Je)|0,S=S+Math.imul(I,De)|0,f=f+Math.imul(I,Qe)|0,f=f+Math.imul(D,De)|0,_=_+Math.imul(D,Qe)|0;var $t=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+($t>>>26)|0,$t&=67108863,S=Math.imul(we,be),f=Math.imul(we,Te),f=f+Math.imul(Be,be)|0,_=Math.imul(Be,Te),S=S+Math.imul(oe,Ae)|0,f=f+Math.imul(oe,$e)|0,f=f+Math.imul(ue,Ae)|0,_=_+Math.imul(ue,$e)|0,S=S+Math.imul(Y,Ne)|0,f=f+Math.imul(Y,Ee)|0,f=f+Math.imul(te,Ne)|0,_=_+Math.imul(te,Ee)|0,S=S+Math.imul(pe,Se)|0,f=f+Math.imul(pe,He)|0,f=f+Math.imul(fe,Se)|0,_=_+Math.imul(fe,He)|0,S=S+Math.imul(W,ie)|0,f=f+Math.imul(W,me)|0,f=f+Math.imul(le,ie)|0,_=_+Math.imul(le,me)|0,S=S+Math.imul(K,xe)|0,f=f+Math.imul(K,Re)|0,f=f+Math.imul(re,xe)|0,_=_+Math.imul(re,Re)|0,S=S+Math.imul(ae,ne)|0,f=f+Math.imul(ae,je)|0,f=f+Math.imul(se,ne)|0,_=_+Math.imul(se,je)|0,S=S+Math.imul(G,ge)|0,f=f+Math.imul(G,Je)|0,f=f+Math.imul(q,ge)|0,_=_+Math.imul(q,Je)|0,S=S+Math.imul(U,De)|0,f=f+Math.imul(U,Qe)|0,f=f+Math.imul(z,De)|0,_=_+Math.imul(z,Qe)|0;var Zt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,S=Math.imul(we,Ae),f=Math.imul(we,$e),f=f+Math.imul(Be,Ae)|0,_=Math.imul(Be,$e),S=S+Math.imul(oe,Ne)|0,f=f+Math.imul(oe,Ee)|0,f=f+Math.imul(ue,Ne)|0,_=_+Math.imul(ue,Ee)|0,S=S+Math.imul(Y,Se)|0,f=f+Math.imul(Y,He)|0,f=f+Math.imul(te,Se)|0,_=_+Math.imul(te,He)|0,S=S+Math.imul(pe,ie)|0,f=f+Math.imul(pe,me)|0,f=f+Math.imul(fe,ie)|0,_=_+Math.imul(fe,me)|0,S=S+Math.imul(W,xe)|0,f=f+Math.imul(W,Re)|0,f=f+Math.imul(le,xe)|0,_=_+Math.imul(le,Re)|0,S=S+Math.imul(K,ne)|0,f=f+Math.imul(K,je)|0,f=f+Math.imul(re,ne)|0,_=_+Math.imul(re,je)|0,S=S+Math.imul(ae,ge)|0,f=f+Math.imul(ae,Je)|0,f=f+Math.imul(se,ge)|0,_=_+Math.imul(se,Je)|0,S=S+Math.imul(G,De)|0,f=f+Math.imul(G,Qe)|0,f=f+Math.imul(q,De)|0,_=_+Math.imul(q,Qe)|0;var Pt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,S=Math.imul(we,Ne),f=Math.imul(we,Ee),f=f+Math.imul(Be,Ne)|0,_=Math.imul(Be,Ee),S=S+Math.imul(oe,Se)|0,f=f+Math.imul(oe,He)|0,f=f+Math.imul(ue,Se)|0,_=_+Math.imul(ue,He)|0,S=S+Math.imul(Y,ie)|0,f=f+Math.imul(Y,me)|0,f=f+Math.imul(te,ie)|0,_=_+Math.imul(te,me)|0,S=S+Math.imul(pe,xe)|0,f=f+Math.imul(pe,Re)|0,f=f+Math.imul(fe,xe)|0,_=_+Math.imul(fe,Re)|0,S=S+Math.imul(W,ne)|0,f=f+Math.imul(W,je)|0,f=f+Math.imul(le,ne)|0,_=_+Math.imul(le,je)|0,S=S+Math.imul(K,ge)|0,f=f+Math.imul(K,Je)|0,f=f+Math.imul(re,ge)|0,_=_+Math.imul(re,Je)|0,S=S+Math.imul(ae,De)|0,f=f+Math.imul(ae,Qe)|0,f=f+Math.imul(se,De)|0,_=_+Math.imul(se,Qe)|0;var Ut=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,S=Math.imul(we,Se),f=Math.imul(we,He),f=f+Math.imul(Be,Se)|0,_=Math.imul(Be,He),S=S+Math.imul(oe,ie)|0,f=f+Math.imul(oe,me)|0,f=f+Math.imul(ue,ie)|0,_=_+Math.imul(ue,me)|0,S=S+Math.imul(Y,xe)|0,f=f+Math.imul(Y,Re)|0,f=f+Math.imul(te,xe)|0,_=_+Math.imul(te,Re)|0,S=S+Math.imul(pe,ne)|0,f=f+Math.imul(pe,je)|0,f=f+Math.imul(fe,ne)|0,_=_+Math.imul(fe,je)|0,S=S+Math.imul(W,ge)|0,f=f+Math.imul(W,Je)|0,f=f+Math.imul(le,ge)|0,_=_+Math.imul(le,Je)|0,S=S+Math.imul(K,De)|0,f=f+Math.imul(K,Qe)|0,f=f+Math.imul(re,De)|0,_=_+Math.imul(re,Qe)|0;var Nt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,S=Math.imul(we,ie),f=Math.imul(we,me),f=f+Math.imul(Be,ie)|0,_=Math.imul(Be,me),S=S+Math.imul(oe,xe)|0,f=f+Math.imul(oe,Re)|0,f=f+Math.imul(ue,xe)|0,_=_+Math.imul(ue,Re)|0,S=S+Math.imul(Y,ne)|0,f=f+Math.imul(Y,je)|0,f=f+Math.imul(te,ne)|0,_=_+Math.imul(te,je)|0,S=S+Math.imul(pe,ge)|0,f=f+Math.imul(pe,Je)|0,f=f+Math.imul(fe,ge)|0,_=_+Math.imul(fe,Je)|0,S=S+Math.imul(W,De)|0,f=f+Math.imul(W,Qe)|0,f=f+Math.imul(le,De)|0,_=_+Math.imul(le,Qe)|0;var Dt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,S=Math.imul(we,xe),f=Math.imul(we,Re),f=f+Math.imul(Be,xe)|0,_=Math.imul(Be,Re),S=S+Math.imul(oe,ne)|0,f=f+Math.imul(oe,je)|0,f=f+Math.imul(ue,ne)|0,_=_+Math.imul(ue,je)|0,S=S+Math.imul(Y,ge)|0,f=f+Math.imul(Y,Je)|0,f=f+Math.imul(te,ge)|0,_=_+Math.imul(te,Je)|0,S=S+Math.imul(pe,De)|0,f=f+Math.imul(pe,Qe)|0,f=f+Math.imul(fe,De)|0,_=_+Math.imul(fe,Qe)|0;var Ft=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,S=Math.imul(we,ne),f=Math.imul(we,je),f=f+Math.imul(Be,ne)|0,_=Math.imul(Be,je),S=S+Math.imul(oe,ge)|0,f=f+Math.imul(oe,Je)|0,f=f+Math.imul(ue,ge)|0,_=_+Math.imul(ue,Je)|0,S=S+Math.imul(Y,De)|0,f=f+Math.imul(Y,Qe)|0,f=f+Math.imul(te,De)|0,_=_+Math.imul(te,Qe)|0;var Ht=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,S=Math.imul(we,ge),f=Math.imul(we,Je),f=f+Math.imul(Be,ge)|0,_=Math.imul(Be,Je),S=S+Math.imul(oe,De)|0,f=f+Math.imul(oe,Qe)|0,f=f+Math.imul(ue,De)|0,_=_+Math.imul(ue,Qe)|0;var Gt=(A+S|0)+((f&8191)<<13)|0;A=(_+(f>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,S=Math.imul(we,De),f=Math.imul(we,Qe),f=f+Math.imul(Be,De)|0,_=Math.imul(Be,Qe);var Jt=(A+S|0)+((f&8191)<<13)|0;return A=(_+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,M[0]=Ie,M[1]=Fe,M[2]=ut,M[3]=yt,M[4]=ht,M[5]=Mt,M[6]=zt,M[7]=Et,M[8]=_t,M[9]=$t,M[10]=Zt,M[11]=Pt,M[12]=Ut,M[13]=Nt,M[14]=Dt,M[15]=Ft,M[16]=Ht,M[17]=Gt,M[18]=Jt,A!==0&&(M[19]=A,l.length++),l},"comb10MulTo");Math.imul||(k=x);function N(F,u,p){p.negative=u.negative^F.negative,p.length=F.length+u.length;for(var l=0,g=0,w=0;w<p.length-1;w++){var M=g;g=0;for(var A=l&67108863,S=Math.min(w,u.length-1),f=Math.max(0,w-F.length+1);f<=S;f++){var _=w-f,E=F.words[_]|0,I=u.words[f]|0,D=E*I,L=D&67108863;M=M+(D/67108864|0)|0,L=L+A|0,A=L&67108863,M=M+(L>>>26)|0,g+=M>>>26,M&=67108863}p.words[w]=A,l=M,M=g}return l!==0?p.words[w]=l:p.length--,p.strip()}i(N,"bigMulTo");function C(F,u,p){var l=new O;return l.mulp(F,u,p)}i(C,"jumboMulTo"),s.prototype.mulTo=i(function(u,p){var l,g=this.length+u.length;return this.length===10&&u.length===10?l=k(this,u,p):g<63?l=x(this,u,p):g<1024?l=N(this,u,p):l=C(this,u,p),l},"mulTo");function O(F,u){this.x=F,this.y=u}i(O,"FFTM"),O.prototype.makeRBT=i(function(u){for(var p=new Array(u),l=s.prototype._countBits(u)-1,g=0;g<u;g++)p[g]=this.revBin(g,l,u);return p},"makeRBT"),O.prototype.revBin=i(function(u,p,l){if(u===0||u===l-1)return u;for(var g=0,w=0;w<p;w++)g|=(u&1)<<p-w-1,u>>=1;return g},"revBin"),O.prototype.permute=i(function(u,p,l,g,w,M){for(var A=0;A<M;A++)g[A]=p[u[A]],w[A]=l[u[A]]},"permute"),O.prototype.transform=i(function(u,p,l,g,w,M){this.permute(M,u,p,l,g,w);for(var A=1;A<w;A<<=1)for(var S=A<<1,f=Math.cos(2*Math.PI/S),_=Math.sin(2*Math.PI/S),E=0;E<w;E+=S)for(var I=f,D=_,L=0;L<A;L++){var U=l[E+L],z=g[E+L],V=l[E+L+A],G=g[E+L+A],q=I*V-D*G;G=I*G+D*V,V=q,l[E+L]=U+V,g[E+L]=z+G,l[E+L+A]=U-V,g[E+L+A]=z-G,L!==S&&(q=f*I-_*D,D=f*D+_*I,I=q)}},"transform"),O.prototype.guessLen13b=i(function(u,p){var l=Math.max(p,u)|1,g=l&1,w=0;for(l=l/2|0;l;l=l>>>1)w++;return 1<<w+1+g},"guessLen13b"),O.prototype.conjugate=i(function(u,p,l){if(!(l<=1))for(var g=0;g<l/2;g++){var w=u[g];u[g]=u[l-g-1],u[l-g-1]=w,w=p[g],p[g]=-p[l-g-1],p[l-g-1]=-w}},"conjugate"),O.prototype.normalize13b=i(function(u,p){for(var l=0,g=0;g<p/2;g++){var w=Math.round(u[2*g+1]/p)*8192+Math.round(u[2*g]/p)+l;u[g]=w&67108863,w<67108864?l=0:l=w/67108864|0}return u},"normalize13b"),O.prototype.convert13b=i(function(u,p,l,g){for(var w=0,M=0;M<p;M++)w=w+(u[M]|0),l[2*M]=w&8191,w=w>>>13,l[2*M+1]=w&8191,w=w>>>13;for(M=2*p;M<g;++M)l[M]=0;a(w===0),a((w&-8192)===0)},"convert13b"),O.prototype.stub=i(function(u){for(var p=new Array(u),l=0;l<u;l++)p[l]=0;return p},"stub"),O.prototype.mulp=i(function(u,p,l){var g=2*this.guessLen13b(u.length,p.length),w=this.makeRBT(g),M=this.stub(g),A=new Array(g),S=new Array(g),f=new Array(g),_=new Array(g),E=new Array(g),I=new Array(g),D=l.words;D.length=g,this.convert13b(u.words,u.length,A,g),this.convert13b(p.words,p.length,_,g),this.transform(A,M,S,f,g,w),this.transform(_,M,E,I,g,w);for(var L=0;L<g;L++){var U=S[L]*E[L]-f[L]*I[L];f[L]=S[L]*I[L]+f[L]*E[L],S[L]=U}return this.conjugate(S,f,g),this.transform(S,f,D,M,g,w),this.conjugate(D,M,g),this.normalize13b(D,g),l.negative=u.negative^p.negative,l.length=u.length+p.length,l.strip()},"mulp"),s.prototype.mul=i(function(u){var p=new s(null);return p.words=new Array(this.length+u.length),this.mulTo(u,p)},"mul"),s.prototype.mulf=i(function(u){var p=new s(null);return p.words=new Array(this.length+u.length),C(this,u,p)},"mulf"),s.prototype.imul=i(function(u){return this.clone().mulTo(u,this)},"imul"),s.prototype.imuln=i(function(u){a(typeof u=="number"),a(u<67108864);for(var p=0,l=0;l<this.length;l++){var g=(this.words[l]|0)*u,w=(g&67108863)+(p&67108863);p>>=26,p+=g/67108864|0,p+=w>>>26,this.words[l]=w&67108863}return p!==0&&(this.words[l]=p,this.length++),this.length=u===0?1:this.length,this},"imuln"),s.prototype.muln=i(function(u){return this.clone().imuln(u)},"muln"),s.prototype.sqr=i(function(){return this.mul(this)},"sqr"),s.prototype.isqr=i(function(){return this.imul(this.clone())},"isqr"),s.prototype.pow=i(function(u){var p=b(u);if(p.length===0)return new s(1);for(var l=this,g=0;g<p.length&&p[g]===0;g++,l=l.sqr());if(++g<p.length)for(var w=l.sqr();g<p.length;g++,w=w.sqr())p[g]!==0&&(l=l.mul(w));return l},"pow"),s.prototype.iushln=i(function(u){a(typeof u=="number"&&u>=0);var p=u%26,l=(u-p)/26,g=67108863>>>26-p<<26-p,w;if(p!==0){var M=0;for(w=0;w<this.length;w++){var A=this.words[w]&g,S=(this.words[w]|0)-A<<p;this.words[w]=S|M,M=A>>>26-p}M&&(this.words[w]=M,this.length++)}if(l!==0){for(w=this.length-1;w>=0;w--)this.words[w+l]=this.words[w];for(w=0;w<l;w++)this.words[w]=0;this.length+=l}return this.strip()},"iushln"),s.prototype.ishln=i(function(u){return a(this.negative===0),this.iushln(u)},"ishln"),s.prototype.iushrn=i(function(u,p,l){a(typeof u=="number"&&u>=0);var g;p?g=(p-p%26)/26:g=0;var w=u%26,M=Math.min((u-w)/26,this.length),A=67108863^67108863>>>w<<w,S=l;if(g-=M,g=Math.max(0,g),S){for(var f=0;f<M;f++)S.words[f]=this.words[f];S.length=M}if(M!==0)if(this.length>M)for(this.length-=M,f=0;f<this.length;f++)this.words[f]=this.words[f+M];else this.words[0]=0,this.length=1;var _=0;for(f=this.length-1;f>=0&&(_!==0||f>=g);f--){var E=this.words[f]|0;this.words[f]=_<<26-w|E>>>w,_=E&A}return S&&_!==0&&(S.words[S.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},"iushrn"),s.prototype.ishrn=i(function(u,p,l){return a(this.negative===0),this.iushrn(u,p,l)},"ishrn"),s.prototype.shln=i(function(u){return this.clone().ishln(u)},"shln"),s.prototype.ushln=i(function(u){return this.clone().iushln(u)},"ushln"),s.prototype.shrn=i(function(u){return this.clone().ishrn(u)},"shrn"),s.prototype.ushrn=i(function(u){return this.clone().iushrn(u)},"ushrn"),s.prototype.testn=i(function(u){a(typeof u=="number"&&u>=0);var p=u%26,l=(u-p)/26,g=1<<p;if(this.length<=l)return!1;var w=this.words[l];return!!(w&g)},"testn"),s.prototype.imaskn=i(function(u){a(typeof u=="number"&&u>=0);var p=u%26,l=(u-p)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(p!==0&&l++,this.length=Math.min(l,this.length),p!==0){var g=67108863^67108863>>>p<<p;this.words[this.length-1]&=g}return this.strip()},"imaskn"),s.prototype.maskn=i(function(u){return this.clone().imaskn(u)},"maskn"),s.prototype.iaddn=i(function(u){return a(typeof u=="number"),a(u<67108864),u<0?this.isubn(-u):this.negative!==0?this.length===1&&(this.words[0]|0)<u?(this.words[0]=u-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(u),this.negative=1,this):this._iaddn(u)},"iaddn"),s.prototype._iaddn=i(function(u){this.words[0]+=u;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},"_iaddn"),s.prototype.isubn=i(function(u){if(a(typeof u=="number"),a(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this.strip()},"isubn"),s.prototype.addn=i(function(u){return this.clone().iaddn(u)},"addn"),s.prototype.subn=i(function(u){return this.clone().isubn(u)},"subn"),s.prototype.iabs=i(function(){return this.negative=0,this},"iabs"),s.prototype.abs=i(function(){return this.clone().iabs()},"abs"),s.prototype._ishlnsubmul=i(function(u,p,l){var g=u.length+l,w;this._expand(g);var M,A=0;for(w=0;w<u.length;w++){M=(this.words[w+l]|0)+A;var S=(u.words[w]|0)*p;M-=S&67108863,A=(M>>26)-(S/67108864|0),this.words[w+l]=M&67108863}for(;w<this.length-l;w++)M=(this.words[w+l]|0)+A,A=M>>26,this.words[w+l]=M&67108863;if(A===0)return this.strip();for(a(A===-1),A=0,w=0;w<this.length;w++)M=-(this.words[w]|0)+A,A=M>>26,this.words[w]=M&67108863;return this.negative=1,this.strip()},"_ishlnsubmul"),s.prototype._wordDiv=i(function(u,p){var l=this.length-u.length,g=this.clone(),w=u,M=w.words[w.length-1]|0,A=this._countBits(M);l=26-A,l!==0&&(w=w.ushln(l),g.iushln(l),M=w.words[w.length-1]|0);var S=g.length-w.length,f;if(p!=="mod"){f=new s(null),f.length=S+1,f.words=new Array(f.length);for(var _=0;_<f.length;_++)f.words[_]=0}var E=g.clone()._ishlnsubmul(w,1,S);E.negative===0&&(g=E,f&&(f.words[S]=1));for(var I=S-1;I>=0;I--){var D=(g.words[w.length+I]|0)*67108864+(g.words[w.length+I-1]|0);for(D=Math.min(D/M|0,67108863),g._ishlnsubmul(w,D,I);g.negative!==0;)D--,g.negative=0,g._ishlnsubmul(w,1,I),g.isZero()||(g.negative^=1);f&&(f.words[I]=D)}return f&&f.strip(),g.strip(),p!=="div"&&l!==0&&g.iushrn(l),{div:f||null,mod:g}},"_wordDiv"),s.prototype.divmod=i(function(u,p,l){if(a(!u.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var g,w,M;return this.negative!==0&&u.negative===0?(M=this.neg().divmod(u,p),p!=="mod"&&(g=M.div.neg()),p!=="div"&&(w=M.mod.neg(),l&&w.negative!==0&&w.iadd(u)),{div:g,mod:w}):this.negative===0&&u.negative!==0?(M=this.divmod(u.neg(),p),p!=="mod"&&(g=M.div.neg()),{div:g,mod:M.mod}):(this.negative&u.negative)!==0?(M=this.neg().divmod(u.neg(),p),p!=="div"&&(w=M.mod.neg(),l&&w.negative!==0&&w.isub(u)),{div:M.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new s(0),mod:this}:u.length===1?p==="div"?{div:this.divn(u.words[0]),mod:null}:p==="mod"?{div:null,mod:new s(this.modn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new s(this.modn(u.words[0]))}:this._wordDiv(u,p)},"divmod"),s.prototype.div=i(function(u){return this.divmod(u,"div",!1).div},"div"),s.prototype.mod=i(function(u){return this.divmod(u,"mod",!1).mod},"mod"),s.prototype.umod=i(function(u){return this.divmod(u,"mod",!0).mod},"umod"),s.prototype.divRound=i(function(u){var p=this.divmod(u);if(p.mod.isZero())return p.div;var l=p.div.negative!==0?p.mod.isub(u):p.mod,g=u.ushrn(1),w=u.andln(1),M=l.cmp(g);return M<0||w===1&&M===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},"divRound"),s.prototype.modn=i(function(u){a(u<=67108863);for(var p=(1<<26)%u,l=0,g=this.length-1;g>=0;g--)l=(p*l+(this.words[g]|0))%u;return l},"modn"),s.prototype.idivn=i(function(u){a(u<=67108863);for(var p=0,l=this.length-1;l>=0;l--){var g=(this.words[l]|0)+p*67108864;this.words[l]=g/u|0,p=g%u}return this.strip()},"idivn"),s.prototype.divn=i(function(u){return this.clone().idivn(u)},"divn"),s.prototype.egcd=i(function(u){a(u.negative===0),a(!u.isZero());var p=this,l=u.clone();p.negative!==0?p=p.umod(u):p=p.clone();for(var g=new s(1),w=new s(0),M=new s(0),A=new s(1),S=0;p.isEven()&&l.isEven();)p.iushrn(1),l.iushrn(1),++S;for(var f=l.clone(),_=p.clone();!p.isZero();){for(var E=0,I=1;(p.words[0]&I)===0&&E<26;++E,I<<=1);if(E>0)for(p.iushrn(E);E-- >0;)(g.isOdd()||w.isOdd())&&(g.iadd(f),w.isub(_)),g.iushrn(1),w.iushrn(1);for(var D=0,L=1;(l.words[0]&L)===0&&D<26;++D,L<<=1);if(D>0)for(l.iushrn(D);D-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(f),A.isub(_)),M.iushrn(1),A.iushrn(1);p.cmp(l)>=0?(p.isub(l),g.isub(M),w.isub(A)):(l.isub(p),M.isub(g),A.isub(w))}return{a:M,b:A,gcd:l.iushln(S)}},"egcd"),s.prototype._invmp=i(function(u){a(u.negative===0),a(!u.isZero());var p=this,l=u.clone();p.negative!==0?p=p.umod(u):p=p.clone();for(var g=new s(1),w=new s(0),M=l.clone();p.cmpn(1)>0&&l.cmpn(1)>0;){for(var A=0,S=1;(p.words[0]&S)===0&&A<26;++A,S<<=1);if(A>0)for(p.iushrn(A);A-- >0;)g.isOdd()&&g.iadd(M),g.iushrn(1);for(var f=0,_=1;(l.words[0]&_)===0&&f<26;++f,_<<=1);if(f>0)for(l.iushrn(f);f-- >0;)w.isOdd()&&w.iadd(M),w.iushrn(1);p.cmp(l)>=0?(p.isub(l),g.isub(w)):(l.isub(p),w.isub(g))}var E;return p.cmpn(1)===0?E=g:E=w,E.cmpn(0)<0&&E.iadd(u),E},"_invmp"),s.prototype.gcd=i(function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var p=this.clone(),l=u.clone();p.negative=0,l.negative=0;for(var g=0;p.isEven()&&l.isEven();g++)p.iushrn(1),l.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;l.isEven();)l.iushrn(1);var w=p.cmp(l);if(w<0){var M=p;p=l,l=M}else if(w===0||l.cmpn(1)===0)break;p.isub(l)}while(!0);return l.iushln(g)},"gcd"),s.prototype.invm=i(function(u){return this.egcd(u).a.umod(u)},"invm"),s.prototype.isEven=i(function(){return(this.words[0]&1)===0},"isEven"),s.prototype.isOdd=i(function(){return(this.words[0]&1)===1},"isOdd"),s.prototype.andln=i(function(u){return this.words[0]&u},"andln"),s.prototype.bincn=i(function(u){a(typeof u=="number");var p=u%26,l=(u-p)/26,g=1<<p;if(this.length<=l)return this._expand(l+1),this.words[l]|=g,this;for(var w=g,M=l;w!==0&&M<this.length;M++){var A=this.words[M]|0;A+=w,w=A>>>26,A&=67108863,this.words[M]=A}return w!==0&&(this.words[M]=w,this.length++),this},"bincn"),s.prototype.isZero=i(function(){return this.length===1&&this.words[0]===0},"isZero"),s.prototype.cmpn=i(function(u){var p=u<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this.strip();var l;if(this.length>1)l=1;else{p&&(u=-u),a(u<=67108863,"Number is too big");var g=this.words[0]|0;l=g===u?0:g<u?-1:1}return this.negative!==0?-l|0:l},"cmpn"),s.prototype.cmp=i(function(u){if(this.negative!==0&&u.negative===0)return-1;if(this.negative===0&&u.negative!==0)return 1;var p=this.ucmp(u);return this.negative!==0?-p|0:p},"cmp"),s.prototype.ucmp=i(function(u){if(this.length>u.length)return 1;if(this.length<u.length)return-1;for(var p=0,l=this.length-1;l>=0;l--){var g=this.words[l]|0,w=u.words[l]|0;if(g!==w){g<w?p=-1:g>w&&(p=1);break}}return p},"ucmp"),s.prototype.gtn=i(function(u){return this.cmpn(u)===1},"gtn"),s.prototype.gt=i(function(u){return this.cmp(u)===1},"gt"),s.prototype.gten=i(function(u){return this.cmpn(u)>=0},"gten"),s.prototype.gte=i(function(u){return this.cmp(u)>=0},"gte"),s.prototype.ltn=i(function(u){return this.cmpn(u)===-1},"ltn"),s.prototype.lt=i(function(u){return this.cmp(u)===-1},"lt"),s.prototype.lten=i(function(u){return this.cmpn(u)<=0},"lten"),s.prototype.lte=i(function(u){return this.cmp(u)<=0},"lte"),s.prototype.eqn=i(function(u){return this.cmpn(u)===0},"eqn"),s.prototype.eq=i(function(u){return this.cmp(u)===0},"eq"),s.red=i(function(u){return new ee(u)},"red"),s.prototype.toRed=i(function(u){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},"toRed"),s.prototype.fromRed=i(function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),s.prototype._forceRed=i(function(u){return this.red=u,this},"_forceRed"),s.prototype.forceRed=i(function(u){return a(!this.red,"Already a number in reduction context"),this._forceRed(u)},"forceRed"),s.prototype.redAdd=i(function(u){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},"redAdd"),s.prototype.redIAdd=i(function(u){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},"redIAdd"),s.prototype.redSub=i(function(u){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},"redSub"),s.prototype.redISub=i(function(u){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},"redISub"),s.prototype.redShl=i(function(u){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},"redShl"),s.prototype.redMul=i(function(u){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},"redMul"),s.prototype.redIMul=i(function(u){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},"redIMul"),s.prototype.redSqr=i(function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),s.prototype.redISqr=i(function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),s.prototype.redSqrt=i(function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),s.prototype.redInvm=i(function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),s.prototype.redNeg=i(function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),s.prototype.redPow=i(function(u){return a(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)},"redPow");var R={k256:null,p224:null,p192:null,p25519:null};function T(F,u){this.name=F,this.p=new s(u,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(T,"MPrime"),T.prototype._tmp=i(function(){var u=new s(null);return u.words=new Array(Math.ceil(this.n/13)),u},"_tmp"),T.prototype.ireduce=i(function(u){var p=u,l;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),l=p.bitLength();while(l>this.n);var g=l<this.n?-1:p.ucmp(this.p);return g===0?(p.words[0]=0,p.length=1):g>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},"ireduce"),T.prototype.split=i(function(u,p){u.iushrn(this.n,0,p)},"split"),T.prototype.imulK=i(function(u){return u.imul(this.k)},"imulK");function P(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(P,"K256"),n(P,T),P.prototype.split=i(function(u,p){for(var l=4194303,g=Math.min(u.length,9),w=0;w<g;w++)p.words[w]=u.words[w];if(p.length=g,u.length<=9){u.words[0]=0,u.length=1;return}var M=u.words[9];for(p.words[p.length++]=M&l,w=10;w<u.length;w++){var A=u.words[w]|0;u.words[w-10]=(A&l)<<4|M>>>22,M=A}M>>>=22,u.words[w-10]=M,M===0&&u.length>10?u.length-=10:u.length-=9},"split"),P.prototype.imulK=i(function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var p=0,l=0;l<u.length;l++){var g=u.words[l]|0;p+=g*977,u.words[l]=p&67108863,p=g*64+(p/67108864|0)}return u.words[u.length-1]===0&&(u.length--,u.words[u.length-1]===0&&u.length--),u},"imulK");function B(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(B,"P224"),n(B,T);function Z(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Z,"P192"),n(Z,T);function H(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(H,"P25519"),n(H,T),H.prototype.imulK=i(function(u){for(var p=0,l=0;l<u.length;l++){var g=(u.words[l]|0)*19+p,w=g&67108863;g>>>=26,u.words[l]=w,p=g}return p!==0&&(u.words[u.length++]=p),u},"imulK"),s._prime=i(function(u){if(R[u])return R[u];var p;if(u==="k256")p=new P;else if(u==="p224")p=new B;else if(u==="p192")p=new Z;else if(u==="p25519")p=new H;else throw new Error("Unknown prime "+u);return R[u]=p,p},"prime");function ee(F){if(typeof F=="string"){var u=s._prime(F);this.m=u.p,this.prime=u}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}i(ee,"Red"),ee.prototype._verify1=i(function(u){a(u.negative===0,"red works only with positives"),a(u.red,"red works only with red numbers")},"_verify1"),ee.prototype._verify2=i(function(u,p){a((u.negative|p.negative)===0,"red works only with positives"),a(u.red&&u.red===p.red,"red works only with red numbers")},"_verify2"),ee.prototype.imod=i(function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):u.umod(this.m)._forceRed(this)},"imod"),ee.prototype.neg=i(function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},"neg"),ee.prototype.add=i(function(u,p){this._verify2(u,p);var l=u.add(p);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},"add"),ee.prototype.iadd=i(function(u,p){this._verify2(u,p);var l=u.iadd(p);return l.cmp(this.m)>=0&&l.isub(this.m),l},"iadd"),ee.prototype.sub=i(function(u,p){this._verify2(u,p);var l=u.sub(p);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},"sub"),ee.prototype.isub=i(function(u,p){this._verify2(u,p);var l=u.isub(p);return l.cmpn(0)<0&&l.iadd(this.m),l},"isub"),ee.prototype.shl=i(function(u,p){return this._verify1(u),this.imod(u.ushln(p))},"shl"),ee.prototype.imul=i(function(u,p){return this._verify2(u,p),this.imod(u.imul(p))},"imul"),ee.prototype.mul=i(function(u,p){return this._verify2(u,p),this.imod(u.mul(p))},"mul"),ee.prototype.isqr=i(function(u){return this.imul(u,u.clone())},"isqr"),ee.prototype.sqr=i(function(u){return this.mul(u,u)},"sqr"),ee.prototype.sqrt=i(function(u){if(u.isZero())return u.clone();var p=this.m.andln(3);if(a(p%2===1),p===3){var l=this.m.add(new s(1)).iushrn(2);return this.pow(u,l)}for(var g=this.m.subn(1),w=0;!g.isZero()&&g.andln(1)===0;)w++,g.iushrn(1);a(!g.isZero());var M=new s(1).toRed(this),A=M.redNeg(),S=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new s(2*f*f).toRed(this);this.pow(f,S).cmp(A)!==0;)f.redIAdd(A);for(var _=this.pow(f,g),E=this.pow(u,g.addn(1).iushrn(1)),I=this.pow(u,g),D=w;I.cmp(M)!==0;){for(var L=I,U=0;L.cmp(M)!==0;U++)L=L.redSqr();a(U<D);var z=this.pow(_,new s(1).iushln(D-U-1));E=E.redMul(z),_=z.redSqr(),I=I.redMul(_),D=U}return E},"sqrt"),ee.prototype.invm=i(function(u){var p=u._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},"invm"),ee.prototype.pow=i(function(u,p){if(p.isZero())return new s(1).toRed(this);if(p.cmpn(1)===0)return u.clone();var l=4,g=new Array(1<<l);g[0]=new s(1).toRed(this),g[1]=u;for(var w=2;w<g.length;w++)g[w]=this.mul(g[w-1],u);var M=g[0],A=0,S=0,f=p.bitLength()%26;for(f===0&&(f=26),w=p.length-1;w>=0;w--){for(var _=p.words[w],E=f-1;E>=0;E--){var I=_>>E&1;if(M!==g[0]&&(M=this.sqr(M)),I===0&&A===0){S=0;continue}A<<=1,A|=I,S++,!(S!==l&&(w!==0||E!==0))&&(M=this.mul(M,g[A]),S=0,A=0)}f=26}return M},"pow"),ee.prototype.convertTo=i(function(u){var p=u.umod(this.m);return p===u?p.clone():p},"convertTo"),ee.prototype.convertFrom=i(function(u){var p=u.clone();return p.red=null,p},"convertFrom"),s.mont=i(function(u){return new $(u)},"mont");function $(F){ee.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i($,"Mont"),n($,ee),$.prototype.convertTo=i(function(u){return this.imod(u.ushln(this.shift))},"convertTo"),$.prototype.convertFrom=i(function(u){var p=this.imod(u.mul(this.rinv));return p.red=null,p},"convertFrom"),$.prototype.imul=i(function(u,p){if(u.isZero()||p.isZero())return u.words[0]=0,u.length=1,u;var l=u.imul(p),g=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=l.isub(g).iushrn(this.shift),M=w;return w.cmp(this.m)>=0?M=w.isub(this.m):w.cmpn(0)<0&&(M=w.iadd(this.m)),M._forceRed(this)},"imul"),$.prototype.mul=i(function(u,p){if(u.isZero()||p.isZero())return new s(0)._forceRed(this);var l=u.mul(p),g=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=l.isub(g).iushrn(this.shift),M=w;return w.cmp(this.m)>=0?M=w.isub(this.m):w.cmpn(0)<0&&(M=w.iadd(this.m)),M._forceRed(this)},"mul"),$.prototype.invm=i(function(u){var p=this.imod(u._invmp(this.m).mul(this.r2));return p._forceRed(this)},"invm")})(e,uD)})(ju)),ju.exports}i(Ir,"requireBn$2");var Vl={exports:{}},l6;function Cv(){if(l6)return Vl.exports;l6=1;var e;Vl.exports=i(function(n){return e||(e=new t(null)),e.generate(n)},"rand");function t(a){this.rand=a}if(i(t,"Rand"),Vl.exports.Rand=t,t.prototype.generate=i(function(n){return this._rand(n)},"generate"),t.prototype._rand=i(function(n){if(this.rand.getBytes)return this.rand.getBytes(n);for(var s=new Uint8Array(n),o=0;o<s.length;o++)s[o]=this.rand.getByte();return s},"_rand"),typeof self=="object")self.crypto&&self.crypto.getRandomValues?t.prototype._rand=i(function(n){var s=new Uint8Array(n);return self.crypto.getRandomValues(s),s},"_rand"):self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=i(function(n){var s=new Uint8Array(n);return self.msCrypto.getRandomValues(s),s},"_rand"):typeof window=="object"&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=ji;if(typeof r.randomBytes!="function")throw new Error("Not supported");t.prototype._rand=i(function(n){return r.randomBytes(n)},"_rand")}catch{}return Vl.exports}i(Cv,"requireBrorand");var Yh,u6;function $7(){if(u6)return Yh;u6=1;var e=Ir(),t=Cv();function r(a){this.rand=a||new t.Rand}return i(r,"MillerRabin"),Yh=r,r.create=i(function(n){return new r(n)},"create"),r.prototype._randbelow=i(function(n){var s=n.bitLength(),o=Math.ceil(s/8);do var h=new e(this.rand.generate(o));while(h.cmp(n)>=0);return h},"_randbelow"),r.prototype._randrange=i(function(n,s){var o=s.sub(n);return n.add(this._randbelow(o))},"_randrange"),r.prototype.test=i(function(n,s,o){var h=n.bitLength(),m=e.mont(n),v=new e(1).toRed(m);s||(s=Math.max(1,h/48|0));for(var c=n.subn(1),d=0;!c.testn(d);d++);for(var y=n.shrn(d),b=c.toRed(m),x=!0;s>0;s--){var k=this._randrange(new e(2),c);o&&o(k);var N=k.toRed(m).redPow(y);if(!(N.cmp(v)===0||N.cmp(b)===0)){for(var C=1;C<d;C++){if(N=N.redSqr(),N.cmp(v)===0)return!1;if(N.cmp(b)===0)break}if(C===d)return!1}}return x},"test"),r.prototype.getDivisor=i(function(n,s){var o=n.bitLength(),h=e.mont(n),m=new e(1).toRed(h);s||(s=Math.max(1,o/48|0));for(var v=n.subn(1),c=0;!v.testn(c);c++);for(var d=n.shrn(c),y=v.toRed(h);s>0;s--){var b=this._randrange(new e(2),v),x=n.gcd(b);if(x.cmpn(1)!==0)return x;var k=b.toRed(h).redPow(d);if(!(k.cmp(m)===0||k.cmp(y)===0)){for(var N=1;N<c;N++){if(k=k.redSqr(),k.cmp(m)===0)return k.fromRed().subn(1).gcd(n);if(k.cmp(y)===0)break}if(N===c)return k=k.redSqr(),k.fromRed().subn(1).gcd(n)}}return!1},"getDivisor"),Yh}i($7,"requireMr");var ep,f6;function V7(){if(f6)return ep;f6=1;var e=Ss();ep=N,N.simpleSieve=x,N.fermatTest=k;var t=Ir(),r=new t(24),a=$7(),n=new a,s=new t(1),o=new t(2),h=new t(5);new t(16),new t(8);var m=new t(10),v=new t(3);new t(7);var c=new t(11),d=new t(4);new t(12);var y=null;function b(){if(y!==null)return y;var C=1048576,O=[];O[0]=2;for(var R=1,T=3;T<C;T+=2){for(var P=Math.ceil(Math.sqrt(T)),B=0;B<R&&O[B]<=P&&T%O[B]!==0;B++);R!==B&&O[B]<=P||(O[R++]=T)}return y=O,O}i(b,"_getPrimes");function x(C){for(var O=b(),R=0;R<O.length;R++)if(C.modn(O[R])===0)return C.cmpn(O[R])===0;return!0}i(x,"simpleSieve");function k(C){var O=t.mont(C);return o.toRed(O).redPow(C.subn(1)).fromRed().cmpn(1)===0}i(k,"fermatTest");function N(C,O){if(C<16)return O===2||O===5?new t([140,123]):new t([140,39]);O=new t(O);for(var R,T;;){for(R=new t(e(Math.ceil(C/8)));R.bitLength()>C;)R.ishrn(1);if(R.isEven()&&R.iadd(s),R.testn(1)||R.iadd(o),O.cmp(o)){if(!O.cmp(h))for(;R.mod(m).cmp(v);)R.iadd(d)}else for(;R.mod(r).cmp(c);)R.iadd(d);if(T=R.shrn(1),x(T)&&x(R)&&k(T)&&k(R)&&n.test(T)&&n.test(R))return R}}return i(N,"findPrime"),ep}i(V7,"requireGeneratePrime");const fD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},cD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},dD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},hD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},pD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},mD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},gD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},vD={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},bD={modp1:fD,modp2:cD,modp5:dD,modp14:hD,modp15:pD,modp16:mD,modp17:gD,modp18:vD};var tp,c6;function yD(){if(c6)return tp;c6=1;var e=Ir(),t=$7(),r=new t,a=new e(24),n=new e(11),s=new e(10),o=new e(3),h=new e(7),m=V7(),v=Ss();tp=x;function c(N,C){return C=C||"utf8",Buffer.isBuffer(N)||(N=new Buffer(N,C)),this._pub=new e(N),this}i(c,"setPublicKey");function d(N,C){return C=C||"utf8",Buffer.isBuffer(N)||(N=new Buffer(N,C)),this._priv=new e(N),this}i(d,"setPrivateKey");var y={};function b(N,C){var O=C.toString("hex"),R=[O,N.toString(16)].join("_");if(R in y)return y[R];var T=0;if(N.isEven()||!m.simpleSieve||!m.fermatTest(N)||!r.test(N))return T+=1,O==="02"||O==="05"?T+=8:T+=4,y[R]=T,T;r.test(N.shrn(1))||(T+=2);var P;switch(O){case"02":N.mod(a).cmp(n)&&(T+=8);break;case"05":P=N.mod(s),P.cmp(o)&&P.cmp(h)&&(T+=8);break;default:T+=4}return y[R]=T,T}i(b,"checkPrime");function x(N,C,O){this.setGenerator(C),this.__prime=new e(N),this._prime=e.mont(this.__prime),this._primeLen=N.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,O?(this.setPublicKey=c,this.setPrivateKey=d):this._primeCode=8}i(x,"DH"),Object.defineProperty(x.prototype,"verifyError",{enumerable:!0,get:i(function(){return typeof this._primeCode!="number"&&(this._primeCode=b(this.__prime,this.__gen)),this._primeCode},"get")}),x.prototype.generateKeys=function(){return this._priv||(this._priv=new e(v(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},x.prototype.computeSecret=function(N){N=new e(N),N=N.toRed(this._prime);var C=N.redPow(this._priv).fromRed(),O=new Buffer(C.toArray()),R=this.getPrime();if(O.length<R.length){var T=new Buffer(R.length-O.length);T.fill(0),O=Buffer.concat([T,O])}return O},x.prototype.getPublicKey=i(function(C){return k(this._pub,C)},"getPublicKey"),x.prototype.getPrivateKey=i(function(C){return k(this._priv,C)},"getPrivateKey"),x.prototype.getPrime=function(N){return k(this.__prime,N)},x.prototype.getGenerator=function(N){return k(this._gen,N)},x.prototype.setGenerator=function(N,C){return C=C||"utf8",Buffer.isBuffer(N)||(N=new Buffer(N,C)),this.__gen=N,this._gen=new e(N),this};function k(N,C){var O=new Buffer(N.toArray());return C?O.toString(C):O}return i(k,"formatReturnValue"),tp}i(yD,"requireDh");var d6;function wD(){if(d6)return Yn;d6=1;var e=V7(),t=bD,r=yD();function a(o){var h=new Buffer(t[o].prime,"hex"),m=new Buffer(t[o].gen,"hex");return new r(h,m)}i(a,"getDiffieHellman");var n={binary:!0,hex:!0,base64:!0};function s(o,h,m,v){return Buffer.isBuffer(h)||n[h]===void 0?s(o,"binary",h,m):(h=h||"binary",v=v||"binary",m=m||new Buffer([2]),Buffer.isBuffer(m)||(m=new Buffer(m,v)),typeof o=="number"?new r(e(o,m),m,!0):(Buffer.isBuffer(o)||(o=new Buffer(o,h)),new r(o,m,!0)))}return i(s,"createDiffieHellman"),Yn.DiffieHellmanGroup=Yn.createDiffieHellmanGroup=Yn.getDiffieHellman=a,Yn.createDiffieHellman=Yn.DiffieHellman=s,Yn}i(wD,"requireBrowser$4");var Ts={exports:{}},Nu={exports:{}},xD=Nu.exports,h6;function _D(){return h6||(h6=1,(function(e){(function(t,r){function a(p,l){if(!p)throw new Error(l||"Assertion failed")}i(a,"assert");function n(p,l){p.super_=l;var g=i(function(){},"TempCtor");g.prototype=l.prototype,p.prototype=new g,p.prototype.constructor=p}i(n,"inherits");function s(p,l,g){if(s.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((l==="le"||l==="be")&&(g=l,l=10),this._init(p||0,l||10,g||"be"))}i(s,"BN"),typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ji.Buffer}catch{}s.isBN=i(function(l){return l instanceof s?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===s.wordSize&&Array.isArray(l.words)},"isBN"),s.max=i(function(l,g){return l.cmp(g)>0?l:g},"max"),s.min=i(function(l,g){return l.cmp(g)<0?l:g},"min"),s.prototype._init=i(function(l,g,w){if(typeof l=="number")return this._initNumber(l,g,w);if(typeof l=="object")return this._initArray(l,g,w);g==="hex"&&(g=16),a(g===(g|0)&&g>=2&&g<=36),l=l.toString().replace(/\s+/g,"");var M=0;l[0]==="-"&&(M++,this.negative=1),M<l.length&&(g===16?this._parseHex(l,M,w):(this._parseBase(l,g,M),w==="le"&&this._initArray(this.toArray(),g,w)))},"init"),s.prototype._initNumber=i(function(l,g,w){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(a(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),g,w)},"_initNumber"),s.prototype._initArray=i(function(l,g,w){if(a(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A,S,f=0;if(w==="be")for(M=l.length-1,A=0;M>=0;M-=3)S=l[M]|l[M-1]<<8|l[M-2]<<16,this.words[A]|=S<<f&67108863,this.words[A+1]=S>>>26-f&67108863,f+=24,f>=26&&(f-=26,A++);else if(w==="le")for(M=0,A=0;M<l.length;M+=3)S=l[M]|l[M+1]<<8|l[M+2]<<16,this.words[A]|=S<<f&67108863,this.words[A+1]=S>>>26-f&67108863,f+=24,f>=26&&(f-=26,A++);return this._strip()},"_initArray");function h(p,l){var g=p.charCodeAt(l);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;a(!1,"Invalid character in "+p)}i(h,"parseHex4Bits");function m(p,l,g){var w=h(p,g);return g-1>=l&&(w|=h(p,g-1)<<4),w}i(m,"parseHexByte"),s.prototype._parseHex=i(function(l,g,w){this.length=Math.ceil((l.length-g)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A=0,S=0,f;if(w==="be")for(M=l.length-1;M>=g;M-=2)f=m(l,g,M)<<A,this.words[S]|=f&67108863,A>=18?(A-=18,S+=1,this.words[S]|=f>>>26):A+=8;else{var _=l.length-g;for(M=_%2===0?g+1:g;M<l.length;M+=2)f=m(l,g,M)<<A,this.words[S]|=f&67108863,A>=18?(A-=18,S+=1,this.words[S]|=f>>>26):A+=8}this._strip()},"_parseHex");function v(p,l,g,w){for(var M=0,A=0,S=Math.min(p.length,g),f=l;f<S;f++){var _=p.charCodeAt(f)-48;M*=w,_>=49?A=_-49+10:_>=17?A=_-17+10:A=_,a(_>=0&&A<w,"Invalid character"),M+=A}return M}i(v,"parseBase"),s.prototype._parseBase=i(function(l,g,w){this.words=[0],this.length=1;for(var M=0,A=1;A<=67108863;A*=g)M++;M--,A=A/g|0;for(var S=l.length-w,f=S%M,_=Math.min(S,S-f)+w,E=0,I=w;I<_;I+=M)E=v(l,I,I+M,g),this.imuln(A),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(f!==0){var D=1;for(E=v(l,I,l.length,g),I=0;I<f;I++)D*=g;this.imuln(D),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},"_parseBase"),s.prototype.copy=i(function(l){l.words=new Array(this.length);for(var g=0;g<this.length;g++)l.words[g]=this.words[g];l.length=this.length,l.negative=this.negative,l.red=this.red},"copy");function c(p,l){p.words=l.words,p.length=l.length,p.negative=l.negative,p.red=l.red}if(i(c,"move"),s.prototype._move=i(function(l){c(l,this)},"_move"),s.prototype.clone=i(function(){var l=new s(null);return this.copy(l),l},"clone"),s.prototype._expand=i(function(l){for(;this.length<l;)this.words[this.length++]=0;return this},"_expand"),s.prototype._strip=i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),s.prototype._normSign=i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}i(d,"inspect");var y=["","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"],b=[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],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=i(function(l,g){l=l||10,g=g|0||1;var w;if(l===16||l==="hex"){w="";for(var M=0,A=0,S=0;S<this.length;S++){var f=this.words[S],_=((f<<M|A)&16777215).toString(16);A=f>>>24-M&16777215,M+=2,M>=26&&(M-=26,S--),A!==0||S!==this.length-1?w=y[6-_.length]+_+w:w=_+w}for(A!==0&&(w=A.toString(16)+w);w.length%g!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(l===(l|0)&&l>=2&&l<=36){var E=b[l],I=x[l];w="";var D=this.clone();for(D.negative=0;!D.isZero();){var L=D.modrn(I).toString(l);D=D.idivn(I),D.isZero()?w=L+w:w=y[E-L.length]+L+w}for(this.isZero()&&(w="0"+w);w.length%g!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}a(!1,"Base should be between 2 and 36")},"toString"),s.prototype.toNumber=i(function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},"toNumber"),s.prototype.toJSON=i(function(){return this.toString(16,2)},"toJSON"),o&&(s.prototype.toBuffer=i(function(l,g){return this.toArrayLike(o,l,g)},"toBuffer")),s.prototype.toArray=i(function(l,g){return this.toArrayLike(Array,l,g)},"toArray");var k=i(function(l,g){return l.allocUnsafe?l.allocUnsafe(g):new l(g)},"allocate");s.prototype.toArrayLike=i(function(l,g,w){this._strip();var M=this.byteLength(),A=w||Math.max(1,M);a(M<=A,"byte array longer than desired length"),a(A>0,"Requested array length <= 0");var S=k(l,A),f=g==="le"?"LE":"BE";return this["_toArrayLike"+f](S,M),S},"toArrayLike"),s.prototype._toArrayLikeLE=i(function(l,g){for(var w=0,M=0,A=0,S=0;A<this.length;A++){var f=this.words[A]<<S|M;l[w++]=f&255,w<l.length&&(l[w++]=f>>8&255),w<l.length&&(l[w++]=f>>16&255),S===6?(w<l.length&&(l[w++]=f>>24&255),M=0,S=0):(M=f>>>24,S+=2)}if(w<l.length)for(l[w++]=M;w<l.length;)l[w++]=0},"_toArrayLikeLE"),s.prototype._toArrayLikeBE=i(function(l,g){for(var w=l.length-1,M=0,A=0,S=0;A<this.length;A++){var f=this.words[A]<<S|M;l[w--]=f&255,w>=0&&(l[w--]=f>>8&255),w>=0&&(l[w--]=f>>16&255),S===6?(w>=0&&(l[w--]=f>>24&255),M=0,S=0):(M=f>>>24,S+=2)}if(w>=0)for(l[w--]=M;w>=0;)l[w--]=0},"_toArrayLikeBE"),Math.clz32?s.prototype._countBits=i(function(l){return 32-Math.clz32(l)},"_countBits"):s.prototype._countBits=i(function(l){var g=l,w=0;return g>=4096&&(w+=13,g>>>=13),g>=64&&(w+=7,g>>>=7),g>=8&&(w+=4,g>>>=4),g>=2&&(w+=2,g>>>=2),w+g},"_countBits"),s.prototype._zeroBits=i(function(l){if(l===0)return 26;var g=l,w=0;return(g&8191)===0&&(w+=13,g>>>=13),(g&127)===0&&(w+=7,g>>>=7),(g&15)===0&&(w+=4,g>>>=4),(g&3)===0&&(w+=2,g>>>=2),(g&1)===0&&w++,w},"_zeroBits"),s.prototype.bitLength=i(function(){var l=this.words[this.length-1],g=this._countBits(l);return(this.length-1)*26+g},"bitLength");function N(p){for(var l=new Array(p.bitLength()),g=0;g<l.length;g++){var w=g/26|0,M=g%26;l[g]=p.words[w]>>>M&1}return l}i(N,"toBitArray"),s.prototype.zeroBits=i(function(){if(this.isZero())return 0;for(var l=0,g=0;g<this.length;g++){var w=this._zeroBits(this.words[g]);if(l+=w,w!==26)break}return l},"zeroBits"),s.prototype.byteLength=i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),s.prototype.toTwos=i(function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},"toTwos"),s.prototype.fromTwos=i(function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},"fromTwos"),s.prototype.isNeg=i(function(){return this.negative!==0},"isNeg"),s.prototype.neg=i(function(){return this.clone().ineg()},"neg"),s.prototype.ineg=i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),s.prototype.iuor=i(function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var g=0;g<l.length;g++)this.words[g]=this.words[g]|l.words[g];return this._strip()},"iuor"),s.prototype.ior=i(function(l){return a((this.negative|l.negative)===0),this.iuor(l)},"ior"),s.prototype.or=i(function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},"or"),s.prototype.uor=i(function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},"uor"),s.prototype.iuand=i(function(l){var g;this.length>l.length?g=l:g=this;for(var w=0;w<g.length;w++)this.words[w]=this.words[w]&l.words[w];return this.length=g.length,this._strip()},"iuand"),s.prototype.iand=i(function(l){return a((this.negative|l.negative)===0),this.iuand(l)},"iand"),s.prototype.and=i(function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},"and"),s.prototype.uand=i(function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},"uand"),s.prototype.iuxor=i(function(l){var g,w;this.length>l.length?(g=this,w=l):(g=l,w=this);for(var M=0;M<w.length;M++)this.words[M]=g.words[M]^w.words[M];if(this!==g)for(;M<g.length;M++)this.words[M]=g.words[M];return this.length=g.length,this._strip()},"iuxor"),s.prototype.ixor=i(function(l){return a((this.negative|l.negative)===0),this.iuxor(l)},"ixor"),s.prototype.xor=i(function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},"xor"),s.prototype.uxor=i(function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},"uxor"),s.prototype.inotn=i(function(l){a(typeof l=="number"&&l>=0);var g=Math.ceil(l/26)|0,w=l%26;this._expand(g),w>0&&g--;for(var M=0;M<g;M++)this.words[M]=~this.words[M]&67108863;return w>0&&(this.words[M]=~this.words[M]&67108863>>26-w),this._strip()},"inotn"),s.prototype.notn=i(function(l){return this.clone().inotn(l)},"notn"),s.prototype.setn=i(function(l,g){a(typeof l=="number"&&l>=0);var w=l/26|0,M=l%26;return this._expand(w+1),g?this.words[w]=this.words[w]|1<<M:this.words[w]=this.words[w]&~(1<<M),this._strip()},"setn"),s.prototype.iadd=i(function(l){var g;if(this.negative!==0&&l.negative===0)return this.negative=0,g=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,g=this.isub(l),l.negative=1,g._normSign();var w,M;this.length>l.length?(w=this,M=l):(w=l,M=this);for(var A=0,S=0;S<M.length;S++)g=(w.words[S]|0)+(M.words[S]|0)+A,this.words[S]=g&67108863,A=g>>>26;for(;A!==0&&S<w.length;S++)g=(w.words[S]|0)+A,this.words[S]=g&67108863,A=g>>>26;if(this.length=w.length,A!==0)this.words[this.length]=A,this.length++;else if(w!==this)for(;S<w.length;S++)this.words[S]=w.words[S];return this},"iadd"),s.prototype.add=i(function(l){var g;return l.negative!==0&&this.negative===0?(l.negative=0,g=this.sub(l),l.negative^=1,g):l.negative===0&&this.negative!==0?(this.negative=0,g=l.sub(this),this.negative=1,g):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},"add"),s.prototype.isub=i(function(l){if(l.negative!==0){l.negative=0;var g=this.iadd(l);return l.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var w=this.cmp(l);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,A;w>0?(M=this,A=l):(M=l,A=this);for(var S=0,f=0;f<A.length;f++)g=(M.words[f]|0)-(A.words[f]|0)+S,S=g>>26,this.words[f]=g&67108863;for(;S!==0&&f<M.length;f++)g=(M.words[f]|0)+S,S=g>>26,this.words[f]=g&67108863;if(S===0&&f<M.length&&M!==this)for(;f<M.length;f++)this.words[f]=M.words[f];return this.length=Math.max(this.length,f),M!==this&&(this.negative=1),this._strip()},"isub"),s.prototype.sub=i(function(l){return this.clone().isub(l)},"sub");function C(p,l,g){g.negative=l.negative^p.negative;var w=p.length+l.length|0;g.length=w,w=w-1|0;var M=p.words[0]|0,A=l.words[0]|0,S=M*A,f=S&67108863,_=S/67108864|0;g.words[0]=f;for(var E=1;E<w;E++){for(var I=_>>>26,D=_&67108863,L=Math.min(E,l.length-1),U=Math.max(0,E-p.length+1);U<=L;U++){var z=E-U|0;M=p.words[z]|0,A=l.words[U]|0,S=M*A+D,I+=S/67108864|0,D=S&67108863}g.words[E]=D|0,_=I|0}return _!==0?g.words[E]=_|0:g.length--,g._strip()}i(C,"smallMulTo");var O=i(function(l,g,w){var M=l.words,A=g.words,S=w.words,f=0,_,E,I,D=M[0]|0,L=D&8191,U=D>>>13,z=M[1]|0,V=z&8191,G=z>>>13,q=M[2]|0,_e=q&8191,ae=q>>>13,se=M[3]|0,ye=se&8191,K=se>>>13,re=M[4]|0,X=re&8191,W=re>>>13,le=M[5]|0,ke=le&8191,pe=le>>>13,fe=M[6]|0,Q=fe&8191,Y=fe>>>13,te=M[7]|0,he=te&8191,oe=te>>>13,ue=M[8]|0,ze=ue&8191,we=ue>>>13,Be=M[9]|0,We=Be&8191,ve=Be>>>13,Ue=A[0]|0,ce=Ue&8191,be=Ue>>>13,Te=A[1]|0,Oe=Te&8191,Ae=Te>>>13,$e=A[2]|0,Ye=$e&8191,Ne=$e>>>13,Ee=A[3]|0,Pe=Ee&8191,Se=Ee>>>13,He=A[4]|0,qe=He&8191,ie=He>>>13,me=A[5]|0,Ce=me&8191,xe=me>>>13,Re=A[6]|0,Ge=Re&8191,ne=Re>>>13,je=A[7]|0,Ve=je&8191,ge=je>>>13,Je=A[8]|0,rt=Je&8191,De=Je>>>13,Qe=A[9]|0,Ie=Qe&8191,Fe=Qe>>>13;w.negative=l.negative^g.negative,w.length=19,_=Math.imul(L,ce),E=Math.imul(L,be),E=E+Math.imul(U,ce)|0,I=Math.imul(U,be);var ut=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(ut>>>26)|0,ut&=67108863,_=Math.imul(V,ce),E=Math.imul(V,be),E=E+Math.imul(G,ce)|0,I=Math.imul(G,be),_=_+Math.imul(L,Oe)|0,E=E+Math.imul(L,Ae)|0,E=E+Math.imul(U,Oe)|0,I=I+Math.imul(U,Ae)|0;var yt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(yt>>>26)|0,yt&=67108863,_=Math.imul(_e,ce),E=Math.imul(_e,be),E=E+Math.imul(ae,ce)|0,I=Math.imul(ae,be),_=_+Math.imul(V,Oe)|0,E=E+Math.imul(V,Ae)|0,E=E+Math.imul(G,Oe)|0,I=I+Math.imul(G,Ae)|0,_=_+Math.imul(L,Ye)|0,E=E+Math.imul(L,Ne)|0,E=E+Math.imul(U,Ye)|0,I=I+Math.imul(U,Ne)|0;var ht=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(ht>>>26)|0,ht&=67108863,_=Math.imul(ye,ce),E=Math.imul(ye,be),E=E+Math.imul(K,ce)|0,I=Math.imul(K,be),_=_+Math.imul(_e,Oe)|0,E=E+Math.imul(_e,Ae)|0,E=E+Math.imul(ae,Oe)|0,I=I+Math.imul(ae,Ae)|0,_=_+Math.imul(V,Ye)|0,E=E+Math.imul(V,Ne)|0,E=E+Math.imul(G,Ye)|0,I=I+Math.imul(G,Ne)|0,_=_+Math.imul(L,Pe)|0,E=E+Math.imul(L,Se)|0,E=E+Math.imul(U,Pe)|0,I=I+Math.imul(U,Se)|0;var Mt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,_=Math.imul(X,ce),E=Math.imul(X,be),E=E+Math.imul(W,ce)|0,I=Math.imul(W,be),_=_+Math.imul(ye,Oe)|0,E=E+Math.imul(ye,Ae)|0,E=E+Math.imul(K,Oe)|0,I=I+Math.imul(K,Ae)|0,_=_+Math.imul(_e,Ye)|0,E=E+Math.imul(_e,Ne)|0,E=E+Math.imul(ae,Ye)|0,I=I+Math.imul(ae,Ne)|0,_=_+Math.imul(V,Pe)|0,E=E+Math.imul(V,Se)|0,E=E+Math.imul(G,Pe)|0,I=I+Math.imul(G,Se)|0,_=_+Math.imul(L,qe)|0,E=E+Math.imul(L,ie)|0,E=E+Math.imul(U,qe)|0,I=I+Math.imul(U,ie)|0;var zt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(zt>>>26)|0,zt&=67108863,_=Math.imul(ke,ce),E=Math.imul(ke,be),E=E+Math.imul(pe,ce)|0,I=Math.imul(pe,be),_=_+Math.imul(X,Oe)|0,E=E+Math.imul(X,Ae)|0,E=E+Math.imul(W,Oe)|0,I=I+Math.imul(W,Ae)|0,_=_+Math.imul(ye,Ye)|0,E=E+Math.imul(ye,Ne)|0,E=E+Math.imul(K,Ye)|0,I=I+Math.imul(K,Ne)|0,_=_+Math.imul(_e,Pe)|0,E=E+Math.imul(_e,Se)|0,E=E+Math.imul(ae,Pe)|0,I=I+Math.imul(ae,Se)|0,_=_+Math.imul(V,qe)|0,E=E+Math.imul(V,ie)|0,E=E+Math.imul(G,qe)|0,I=I+Math.imul(G,ie)|0,_=_+Math.imul(L,Ce)|0,E=E+Math.imul(L,xe)|0,E=E+Math.imul(U,Ce)|0,I=I+Math.imul(U,xe)|0;var Et=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Et>>>26)|0,Et&=67108863,_=Math.imul(Q,ce),E=Math.imul(Q,be),E=E+Math.imul(Y,ce)|0,I=Math.imul(Y,be),_=_+Math.imul(ke,Oe)|0,E=E+Math.imul(ke,Ae)|0,E=E+Math.imul(pe,Oe)|0,I=I+Math.imul(pe,Ae)|0,_=_+Math.imul(X,Ye)|0,E=E+Math.imul(X,Ne)|0,E=E+Math.imul(W,Ye)|0,I=I+Math.imul(W,Ne)|0,_=_+Math.imul(ye,Pe)|0,E=E+Math.imul(ye,Se)|0,E=E+Math.imul(K,Pe)|0,I=I+Math.imul(K,Se)|0,_=_+Math.imul(_e,qe)|0,E=E+Math.imul(_e,ie)|0,E=E+Math.imul(ae,qe)|0,I=I+Math.imul(ae,ie)|0,_=_+Math.imul(V,Ce)|0,E=E+Math.imul(V,xe)|0,E=E+Math.imul(G,Ce)|0,I=I+Math.imul(G,xe)|0,_=_+Math.imul(L,Ge)|0,E=E+Math.imul(L,ne)|0,E=E+Math.imul(U,Ge)|0,I=I+Math.imul(U,ne)|0;var _t=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(_t>>>26)|0,_t&=67108863,_=Math.imul(he,ce),E=Math.imul(he,be),E=E+Math.imul(oe,ce)|0,I=Math.imul(oe,be),_=_+Math.imul(Q,Oe)|0,E=E+Math.imul(Q,Ae)|0,E=E+Math.imul(Y,Oe)|0,I=I+Math.imul(Y,Ae)|0,_=_+Math.imul(ke,Ye)|0,E=E+Math.imul(ke,Ne)|0,E=E+Math.imul(pe,Ye)|0,I=I+Math.imul(pe,Ne)|0,_=_+Math.imul(X,Pe)|0,E=E+Math.imul(X,Se)|0,E=E+Math.imul(W,Pe)|0,I=I+Math.imul(W,Se)|0,_=_+Math.imul(ye,qe)|0,E=E+Math.imul(ye,ie)|0,E=E+Math.imul(K,qe)|0,I=I+Math.imul(K,ie)|0,_=_+Math.imul(_e,Ce)|0,E=E+Math.imul(_e,xe)|0,E=E+Math.imul(ae,Ce)|0,I=I+Math.imul(ae,xe)|0,_=_+Math.imul(V,Ge)|0,E=E+Math.imul(V,ne)|0,E=E+Math.imul(G,Ge)|0,I=I+Math.imul(G,ne)|0,_=_+Math.imul(L,Ve)|0,E=E+Math.imul(L,ge)|0,E=E+Math.imul(U,Ve)|0,I=I+Math.imul(U,ge)|0;var $t=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+($t>>>26)|0,$t&=67108863,_=Math.imul(ze,ce),E=Math.imul(ze,be),E=E+Math.imul(we,ce)|0,I=Math.imul(we,be),_=_+Math.imul(he,Oe)|0,E=E+Math.imul(he,Ae)|0,E=E+Math.imul(oe,Oe)|0,I=I+Math.imul(oe,Ae)|0,_=_+Math.imul(Q,Ye)|0,E=E+Math.imul(Q,Ne)|0,E=E+Math.imul(Y,Ye)|0,I=I+Math.imul(Y,Ne)|0,_=_+Math.imul(ke,Pe)|0,E=E+Math.imul(ke,Se)|0,E=E+Math.imul(pe,Pe)|0,I=I+Math.imul(pe,Se)|0,_=_+Math.imul(X,qe)|0,E=E+Math.imul(X,ie)|0,E=E+Math.imul(W,qe)|0,I=I+Math.imul(W,ie)|0,_=_+Math.imul(ye,Ce)|0,E=E+Math.imul(ye,xe)|0,E=E+Math.imul(K,Ce)|0,I=I+Math.imul(K,xe)|0,_=_+Math.imul(_e,Ge)|0,E=E+Math.imul(_e,ne)|0,E=E+Math.imul(ae,Ge)|0,I=I+Math.imul(ae,ne)|0,_=_+Math.imul(V,Ve)|0,E=E+Math.imul(V,ge)|0,E=E+Math.imul(G,Ve)|0,I=I+Math.imul(G,ge)|0,_=_+Math.imul(L,rt)|0,E=E+Math.imul(L,De)|0,E=E+Math.imul(U,rt)|0,I=I+Math.imul(U,De)|0;var Zt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,_=Math.imul(We,ce),E=Math.imul(We,be),E=E+Math.imul(ve,ce)|0,I=Math.imul(ve,be),_=_+Math.imul(ze,Oe)|0,E=E+Math.imul(ze,Ae)|0,E=E+Math.imul(we,Oe)|0,I=I+Math.imul(we,Ae)|0,_=_+Math.imul(he,Ye)|0,E=E+Math.imul(he,Ne)|0,E=E+Math.imul(oe,Ye)|0,I=I+Math.imul(oe,Ne)|0,_=_+Math.imul(Q,Pe)|0,E=E+Math.imul(Q,Se)|0,E=E+Math.imul(Y,Pe)|0,I=I+Math.imul(Y,Se)|0,_=_+Math.imul(ke,qe)|0,E=E+Math.imul(ke,ie)|0,E=E+Math.imul(pe,qe)|0,I=I+Math.imul(pe,ie)|0,_=_+Math.imul(X,Ce)|0,E=E+Math.imul(X,xe)|0,E=E+Math.imul(W,Ce)|0,I=I+Math.imul(W,xe)|0,_=_+Math.imul(ye,Ge)|0,E=E+Math.imul(ye,ne)|0,E=E+Math.imul(K,Ge)|0,I=I+Math.imul(K,ne)|0,_=_+Math.imul(_e,Ve)|0,E=E+Math.imul(_e,ge)|0,E=E+Math.imul(ae,Ve)|0,I=I+Math.imul(ae,ge)|0,_=_+Math.imul(V,rt)|0,E=E+Math.imul(V,De)|0,E=E+Math.imul(G,rt)|0,I=I+Math.imul(G,De)|0,_=_+Math.imul(L,Ie)|0,E=E+Math.imul(L,Fe)|0,E=E+Math.imul(U,Ie)|0,I=I+Math.imul(U,Fe)|0;var Pt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,_=Math.imul(We,Oe),E=Math.imul(We,Ae),E=E+Math.imul(ve,Oe)|0,I=Math.imul(ve,Ae),_=_+Math.imul(ze,Ye)|0,E=E+Math.imul(ze,Ne)|0,E=E+Math.imul(we,Ye)|0,I=I+Math.imul(we,Ne)|0,_=_+Math.imul(he,Pe)|0,E=E+Math.imul(he,Se)|0,E=E+Math.imul(oe,Pe)|0,I=I+Math.imul(oe,Se)|0,_=_+Math.imul(Q,qe)|0,E=E+Math.imul(Q,ie)|0,E=E+Math.imul(Y,qe)|0,I=I+Math.imul(Y,ie)|0,_=_+Math.imul(ke,Ce)|0,E=E+Math.imul(ke,xe)|0,E=E+Math.imul(pe,Ce)|0,I=I+Math.imul(pe,xe)|0,_=_+Math.imul(X,Ge)|0,E=E+Math.imul(X,ne)|0,E=E+Math.imul(W,Ge)|0,I=I+Math.imul(W,ne)|0,_=_+Math.imul(ye,Ve)|0,E=E+Math.imul(ye,ge)|0,E=E+Math.imul(K,Ve)|0,I=I+Math.imul(K,ge)|0,_=_+Math.imul(_e,rt)|0,E=E+Math.imul(_e,De)|0,E=E+Math.imul(ae,rt)|0,I=I+Math.imul(ae,De)|0,_=_+Math.imul(V,Ie)|0,E=E+Math.imul(V,Fe)|0,E=E+Math.imul(G,Ie)|0,I=I+Math.imul(G,Fe)|0;var Ut=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,_=Math.imul(We,Ye),E=Math.imul(We,Ne),E=E+Math.imul(ve,Ye)|0,I=Math.imul(ve,Ne),_=_+Math.imul(ze,Pe)|0,E=E+Math.imul(ze,Se)|0,E=E+Math.imul(we,Pe)|0,I=I+Math.imul(we,Se)|0,_=_+Math.imul(he,qe)|0,E=E+Math.imul(he,ie)|0,E=E+Math.imul(oe,qe)|0,I=I+Math.imul(oe,ie)|0,_=_+Math.imul(Q,Ce)|0,E=E+Math.imul(Q,xe)|0,E=E+Math.imul(Y,Ce)|0,I=I+Math.imul(Y,xe)|0,_=_+Math.imul(ke,Ge)|0,E=E+Math.imul(ke,ne)|0,E=E+Math.imul(pe,Ge)|0,I=I+Math.imul(pe,ne)|0,_=_+Math.imul(X,Ve)|0,E=E+Math.imul(X,ge)|0,E=E+Math.imul(W,Ve)|0,I=I+Math.imul(W,ge)|0,_=_+Math.imul(ye,rt)|0,E=E+Math.imul(ye,De)|0,E=E+Math.imul(K,rt)|0,I=I+Math.imul(K,De)|0,_=_+Math.imul(_e,Ie)|0,E=E+Math.imul(_e,Fe)|0,E=E+Math.imul(ae,Ie)|0,I=I+Math.imul(ae,Fe)|0;var Nt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,_=Math.imul(We,Pe),E=Math.imul(We,Se),E=E+Math.imul(ve,Pe)|0,I=Math.imul(ve,Se),_=_+Math.imul(ze,qe)|0,E=E+Math.imul(ze,ie)|0,E=E+Math.imul(we,qe)|0,I=I+Math.imul(we,ie)|0,_=_+Math.imul(he,Ce)|0,E=E+Math.imul(he,xe)|0,E=E+Math.imul(oe,Ce)|0,I=I+Math.imul(oe,xe)|0,_=_+Math.imul(Q,Ge)|0,E=E+Math.imul(Q,ne)|0,E=E+Math.imul(Y,Ge)|0,I=I+Math.imul(Y,ne)|0,_=_+Math.imul(ke,Ve)|0,E=E+Math.imul(ke,ge)|0,E=E+Math.imul(pe,Ve)|0,I=I+Math.imul(pe,ge)|0,_=_+Math.imul(X,rt)|0,E=E+Math.imul(X,De)|0,E=E+Math.imul(W,rt)|0,I=I+Math.imul(W,De)|0,_=_+Math.imul(ye,Ie)|0,E=E+Math.imul(ye,Fe)|0,E=E+Math.imul(K,Ie)|0,I=I+Math.imul(K,Fe)|0;var Dt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,_=Math.imul(We,qe),E=Math.imul(We,ie),E=E+Math.imul(ve,qe)|0,I=Math.imul(ve,ie),_=_+Math.imul(ze,Ce)|0,E=E+Math.imul(ze,xe)|0,E=E+Math.imul(we,Ce)|0,I=I+Math.imul(we,xe)|0,_=_+Math.imul(he,Ge)|0,E=E+Math.imul(he,ne)|0,E=E+Math.imul(oe,Ge)|0,I=I+Math.imul(oe,ne)|0,_=_+Math.imul(Q,Ve)|0,E=E+Math.imul(Q,ge)|0,E=E+Math.imul(Y,Ve)|0,I=I+Math.imul(Y,ge)|0,_=_+Math.imul(ke,rt)|0,E=E+Math.imul(ke,De)|0,E=E+Math.imul(pe,rt)|0,I=I+Math.imul(pe,De)|0,_=_+Math.imul(X,Ie)|0,E=E+Math.imul(X,Fe)|0,E=E+Math.imul(W,Ie)|0,I=I+Math.imul(W,Fe)|0;var Ft=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,_=Math.imul(We,Ce),E=Math.imul(We,xe),E=E+Math.imul(ve,Ce)|0,I=Math.imul(ve,xe),_=_+Math.imul(ze,Ge)|0,E=E+Math.imul(ze,ne)|0,E=E+Math.imul(we,Ge)|0,I=I+Math.imul(we,ne)|0,_=_+Math.imul(he,Ve)|0,E=E+Math.imul(he,ge)|0,E=E+Math.imul(oe,Ve)|0,I=I+Math.imul(oe,ge)|0,_=_+Math.imul(Q,rt)|0,E=E+Math.imul(Q,De)|0,E=E+Math.imul(Y,rt)|0,I=I+Math.imul(Y,De)|0,_=_+Math.imul(ke,Ie)|0,E=E+Math.imul(ke,Fe)|0,E=E+Math.imul(pe,Ie)|0,I=I+Math.imul(pe,Fe)|0;var Ht=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,_=Math.imul(We,Ge),E=Math.imul(We,ne),E=E+Math.imul(ve,Ge)|0,I=Math.imul(ve,ne),_=_+Math.imul(ze,Ve)|0,E=E+Math.imul(ze,ge)|0,E=E+Math.imul(we,Ve)|0,I=I+Math.imul(we,ge)|0,_=_+Math.imul(he,rt)|0,E=E+Math.imul(he,De)|0,E=E+Math.imul(oe,rt)|0,I=I+Math.imul(oe,De)|0,_=_+Math.imul(Q,Ie)|0,E=E+Math.imul(Q,Fe)|0,E=E+Math.imul(Y,Ie)|0,I=I+Math.imul(Y,Fe)|0;var Gt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,_=Math.imul(We,Ve),E=Math.imul(We,ge),E=E+Math.imul(ve,Ve)|0,I=Math.imul(ve,ge),_=_+Math.imul(ze,rt)|0,E=E+Math.imul(ze,De)|0,E=E+Math.imul(we,rt)|0,I=I+Math.imul(we,De)|0,_=_+Math.imul(he,Ie)|0,E=E+Math.imul(he,Fe)|0,E=E+Math.imul(oe,Ie)|0,I=I+Math.imul(oe,Fe)|0;var Jt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,_=Math.imul(We,rt),E=Math.imul(We,De),E=E+Math.imul(ve,rt)|0,I=Math.imul(ve,De),_=_+Math.imul(ze,Ie)|0,E=E+Math.imul(ze,Fe)|0,E=E+Math.imul(we,Ie)|0,I=I+Math.imul(we,Fe)|0;var Ur=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,_=Math.imul(We,Ie),E=Math.imul(We,Fe),E=E+Math.imul(ve,Ie)|0,I=Math.imul(ve,Fe);var de=(f+_|0)+((E&8191)<<13)|0;return f=(I+(E>>>13)|0)+(de>>>26)|0,de&=67108863,S[0]=ut,S[1]=yt,S[2]=ht,S[3]=Mt,S[4]=zt,S[5]=Et,S[6]=_t,S[7]=$t,S[8]=Zt,S[9]=Pt,S[10]=Ut,S[11]=Nt,S[12]=Dt,S[13]=Ft,S[14]=Ht,S[15]=Gt,S[16]=Jt,S[17]=Ur,S[18]=de,f!==0&&(S[19]=f,w.length++),w},"comb10MulTo");Math.imul||(O=C);function R(p,l,g){g.negative=l.negative^p.negative,g.length=p.length+l.length;for(var w=0,M=0,A=0;A<g.length-1;A++){var S=M;M=0;for(var f=w&67108863,_=Math.min(A,l.length-1),E=Math.max(0,A-p.length+1);E<=_;E++){var I=A-E,D=p.words[I]|0,L=l.words[E]|0,U=D*L,z=U&67108863;S=S+(U/67108864|0)|0,z=z+f|0,f=z&67108863,S=S+(z>>>26)|0,M+=S>>>26,S&=67108863}g.words[A]=f,w=S,S=M}return w!==0?g.words[A]=w:g.length--,g._strip()}i(R,"bigMulTo");function T(p,l,g){return R(p,l,g)}i(T,"jumboMulTo"),s.prototype.mulTo=i(function(l,g){var w,M=this.length+l.length;return this.length===10&&l.length===10?w=O(this,l,g):M<63?w=C(this,l,g):M<1024?w=R(this,l,g):w=T(this,l,g),w},"mulTo"),s.prototype.mul=i(function(l){var g=new s(null);return g.words=new Array(this.length+l.length),this.mulTo(l,g)},"mul"),s.prototype.mulf=i(function(l){var g=new s(null);return g.words=new Array(this.length+l.length),T(this,l,g)},"mulf"),s.prototype.imul=i(function(l){return this.clone().mulTo(l,this)},"imul"),s.prototype.imuln=i(function(l){var g=l<0;g&&(l=-l),a(typeof l=="number"),a(l<67108864);for(var w=0,M=0;M<this.length;M++){var A=(this.words[M]|0)*l,S=(A&67108863)+(w&67108863);w>>=26,w+=A/67108864|0,w+=S>>>26,this.words[M]=S&67108863}return w!==0&&(this.words[M]=w,this.length++),this.length=l===0?1:this.length,g?this.ineg():this},"imuln"),s.prototype.muln=i(function(l){return this.clone().imuln(l)},"muln"),s.prototype.sqr=i(function(){return this.mul(this)},"sqr"),s.prototype.isqr=i(function(){return this.imul(this.clone())},"isqr"),s.prototype.pow=i(function(l){var g=N(l);if(g.length===0)return new s(1);for(var w=this,M=0;M<g.length&&g[M]===0;M++,w=w.sqr());if(++M<g.length)for(var A=w.sqr();M<g.length;M++,A=A.sqr())g[M]!==0&&(w=w.mul(A));return w},"pow"),s.prototype.iushln=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26,M=67108863>>>26-g<<26-g,A;if(g!==0){var S=0;for(A=0;A<this.length;A++){var f=this.words[A]&M,_=(this.words[A]|0)-f<<g;this.words[A]=_|S,S=f>>>26-g}S&&(this.words[A]=S,this.length++)}if(w!==0){for(A=this.length-1;A>=0;A--)this.words[A+w]=this.words[A];for(A=0;A<w;A++)this.words[A]=0;this.length+=w}return this._strip()},"iushln"),s.prototype.ishln=i(function(l){return a(this.negative===0),this.iushln(l)},"ishln"),s.prototype.iushrn=i(function(l,g,w){a(typeof l=="number"&&l>=0);var M;g?M=(g-g%26)/26:M=0;var A=l%26,S=Math.min((l-A)/26,this.length),f=67108863^67108863>>>A<<A,_=w;if(M-=S,M=Math.max(0,M),_){for(var E=0;E<S;E++)_.words[E]=this.words[E];_.length=S}if(S!==0)if(this.length>S)for(this.length-=S,E=0;E<this.length;E++)this.words[E]=this.words[E+S];else this.words[0]=0,this.length=1;var I=0;for(E=this.length-1;E>=0&&(I!==0||E>=M);E--){var D=this.words[E]|0;this.words[E]=I<<26-A|D>>>A,I=D&f}return _&&I!==0&&(_.words[_.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},"iushrn"),s.prototype.ishrn=i(function(l,g,w){return a(this.negative===0),this.iushrn(l,g,w)},"ishrn"),s.prototype.shln=i(function(l){return this.clone().ishln(l)},"shln"),s.prototype.ushln=i(function(l){return this.clone().iushln(l)},"ushln"),s.prototype.shrn=i(function(l){return this.clone().ishrn(l)},"shrn"),s.prototype.ushrn=i(function(l){return this.clone().iushrn(l)},"ushrn"),s.prototype.testn=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26,M=1<<g;if(this.length<=w)return!1;var A=this.words[w];return!!(A&M)},"testn"),s.prototype.imaskn=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(g!==0&&w++,this.length=Math.min(w,this.length),g!==0){var M=67108863^67108863>>>g<<g;this.words[this.length-1]&=M}return this._strip()},"imaskn"),s.prototype.maskn=i(function(l){return this.clone().imaskn(l)},"maskn"),s.prototype.iaddn=i(function(l){return a(typeof l=="number"),a(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},"iaddn"),s.prototype._iaddn=i(function(l){this.words[0]+=l;for(var g=0;g<this.length&&this.words[g]>=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},"_iaddn"),s.prototype.isubn=i(function(l){if(a(typeof l=="number"),a(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g<this.length&&this.words[g]<0;g++)this.words[g]+=67108864,this.words[g+1]-=1;return this._strip()},"isubn"),s.prototype.addn=i(function(l){return this.clone().iaddn(l)},"addn"),s.prototype.subn=i(function(l){return this.clone().isubn(l)},"subn"),s.prototype.iabs=i(function(){return this.negative=0,this},"iabs"),s.prototype.abs=i(function(){return this.clone().iabs()},"abs"),s.prototype._ishlnsubmul=i(function(l,g,w){var M=l.length+w,A;this._expand(M);var S,f=0;for(A=0;A<l.length;A++){S=(this.words[A+w]|0)+f;var _=(l.words[A]|0)*g;S-=_&67108863,f=(S>>26)-(_/67108864|0),this.words[A+w]=S&67108863}for(;A<this.length-w;A++)S=(this.words[A+w]|0)+f,f=S>>26,this.words[A+w]=S&67108863;if(f===0)return this._strip();for(a(f===-1),f=0,A=0;A<this.length;A++)S=-(this.words[A]|0)+f,f=S>>26,this.words[A]=S&67108863;return this.negative=1,this._strip()},"_ishlnsubmul"),s.prototype._wordDiv=i(function(l,g){var w=this.length-l.length,M=this.clone(),A=l,S=A.words[A.length-1]|0,f=this._countBits(S);w=26-f,w!==0&&(A=A.ushln(w),M.iushln(w),S=A.words[A.length-1]|0);var _=M.length-A.length,E;if(g!=="mod"){E=new s(null),E.length=_+1,E.words=new Array(E.length);for(var I=0;I<E.length;I++)E.words[I]=0}var D=M.clone()._ishlnsubmul(A,1,_);D.negative===0&&(M=D,E&&(E.words[_]=1));for(var L=_-1;L>=0;L--){var U=(M.words[A.length+L]|0)*67108864+(M.words[A.length+L-1]|0);for(U=Math.min(U/S|0,67108863),M._ishlnsubmul(A,U,L);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(A,1,L),M.isZero()||(M.negative^=1);E&&(E.words[L]=U)}return E&&E._strip(),M._strip(),g!=="div"&&w!==0&&M.iushrn(w),{div:E||null,mod:M}},"_wordDiv"),s.prototype.divmod=i(function(l,g,w){if(a(!l.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,A,S;return this.negative!==0&&l.negative===0?(S=this.neg().divmod(l,g),g!=="mod"&&(M=S.div.neg()),g!=="div"&&(A=S.mod.neg(),w&&A.negative!==0&&A.iadd(l)),{div:M,mod:A}):this.negative===0&&l.negative!==0?(S=this.divmod(l.neg(),g),g!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l.negative)!==0?(S=this.neg().divmod(l.neg(),g),g!=="div"&&(A=S.mod.neg(),w&&A.negative!==0&&A.isub(l)),{div:S.div,mod:A}):l.length>this.length||this.cmp(l)<0?{div:new s(0),mod:this}:l.length===1?g==="div"?{div:this.divn(l.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new s(this.modrn(l.words[0]))}:this._wordDiv(l,g)},"divmod"),s.prototype.div=i(function(l){return this.divmod(l,"div",!1).div},"div"),s.prototype.mod=i(function(l){return this.divmod(l,"mod",!1).mod},"mod"),s.prototype.umod=i(function(l){return this.divmod(l,"mod",!0).mod},"umod"),s.prototype.divRound=i(function(l){var g=this.divmod(l);if(g.mod.isZero())return g.div;var w=g.div.negative!==0?g.mod.isub(l):g.mod,M=l.ushrn(1),A=l.andln(1),S=w.cmp(M);return S<0||A===1&&S===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},"divRound"),s.prototype.modrn=i(function(l){var g=l<0;g&&(l=-l),a(l<=67108863);for(var w=(1<<26)%l,M=0,A=this.length-1;A>=0;A--)M=(w*M+(this.words[A]|0))%l;return g?-M:M},"modrn"),s.prototype.modn=i(function(l){return this.modrn(l)},"modn"),s.prototype.idivn=i(function(l){var g=l<0;g&&(l=-l),a(l<=67108863);for(var w=0,M=this.length-1;M>=0;M--){var A=(this.words[M]|0)+w*67108864;this.words[M]=A/l|0,w=A%l}return this._strip(),g?this.ineg():this},"idivn"),s.prototype.divn=i(function(l){return this.clone().idivn(l)},"divn"),s.prototype.egcd=i(function(l){a(l.negative===0),a(!l.isZero());var g=this,w=l.clone();g.negative!==0?g=g.umod(l):g=g.clone();for(var M=new s(1),A=new s(0),S=new s(0),f=new s(1),_=0;g.isEven()&&w.isEven();)g.iushrn(1),w.iushrn(1),++_;for(var E=w.clone(),I=g.clone();!g.isZero();){for(var D=0,L=1;(g.words[0]&L)===0&&D<26;++D,L<<=1);if(D>0)for(g.iushrn(D);D-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(E),A.isub(I)),M.iushrn(1),A.iushrn(1);for(var U=0,z=1;(w.words[0]&z)===0&&U<26;++U,z<<=1);if(U>0)for(w.iushrn(U);U-- >0;)(S.isOdd()||f.isOdd())&&(S.iadd(E),f.isub(I)),S.iushrn(1),f.iushrn(1);g.cmp(w)>=0?(g.isub(w),M.isub(S),A.isub(f)):(w.isub(g),S.isub(M),f.isub(A))}return{a:S,b:f,gcd:w.iushln(_)}},"egcd"),s.prototype._invmp=i(function(l){a(l.negative===0),a(!l.isZero());var g=this,w=l.clone();g.negative!==0?g=g.umod(l):g=g.clone();for(var M=new s(1),A=new s(0),S=w.clone();g.cmpn(1)>0&&w.cmpn(1)>0;){for(var f=0,_=1;(g.words[0]&_)===0&&f<26;++f,_<<=1);if(f>0)for(g.iushrn(f);f-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var E=0,I=1;(w.words[0]&I)===0&&E<26;++E,I<<=1);if(E>0)for(w.iushrn(E);E-- >0;)A.isOdd()&&A.iadd(S),A.iushrn(1);g.cmp(w)>=0?(g.isub(w),M.isub(A)):(w.isub(g),A.isub(M))}var D;return g.cmpn(1)===0?D=M:D=A,D.cmpn(0)<0&&D.iadd(l),D},"_invmp"),s.prototype.gcd=i(function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var g=this.clone(),w=l.clone();g.negative=0,w.negative=0;for(var M=0;g.isEven()&&w.isEven();M++)g.iushrn(1),w.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;w.isEven();)w.iushrn(1);var A=g.cmp(w);if(A<0){var S=g;g=w,w=S}else if(A===0||w.cmpn(1)===0)break;g.isub(w)}while(!0);return w.iushln(M)},"gcd"),s.prototype.invm=i(function(l){return this.egcd(l).a.umod(l)},"invm"),s.prototype.isEven=i(function(){return(this.words[0]&1)===0},"isEven"),s.prototype.isOdd=i(function(){return(this.words[0]&1)===1},"isOdd"),s.prototype.andln=i(function(l){return this.words[0]&l},"andln"),s.prototype.bincn=i(function(l){a(typeof l=="number");var g=l%26,w=(l-g)/26,M=1<<g;if(this.length<=w)return this._expand(w+1),this.words[w]|=M,this;for(var A=M,S=w;A!==0&&S<this.length;S++){var f=this.words[S]|0;f+=A,A=f>>>26,f&=67108863,this.words[S]=f}return A!==0&&(this.words[S]=A,this.length++),this},"bincn"),s.prototype.isZero=i(function(){return this.length===1&&this.words[0]===0},"isZero"),s.prototype.cmpn=i(function(l){var g=l<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var w;if(this.length>1)w=1;else{g&&(l=-l),a(l<=67108863,"Number is too big");var M=this.words[0]|0;w=M===l?0:M<l?-1:1}return this.negative!==0?-w|0:w},"cmpn"),s.prototype.cmp=i(function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var g=this.ucmp(l);return this.negative!==0?-g|0:g},"cmp"),s.prototype.ucmp=i(function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var g=0,w=this.length-1;w>=0;w--){var M=this.words[w]|0,A=l.words[w]|0;if(M!==A){M<A?g=-1:M>A&&(g=1);break}}return g},"ucmp"),s.prototype.gtn=i(function(l){return this.cmpn(l)===1},"gtn"),s.prototype.gt=i(function(l){return this.cmp(l)===1},"gt"),s.prototype.gten=i(function(l){return this.cmpn(l)>=0},"gten"),s.prototype.gte=i(function(l){return this.cmp(l)>=0},"gte"),s.prototype.ltn=i(function(l){return this.cmpn(l)===-1},"ltn"),s.prototype.lt=i(function(l){return this.cmp(l)===-1},"lt"),s.prototype.lten=i(function(l){return this.cmpn(l)<=0},"lten"),s.prototype.lte=i(function(l){return this.cmp(l)<=0},"lte"),s.prototype.eqn=i(function(l){return this.cmpn(l)===0},"eqn"),s.prototype.eq=i(function(l){return this.cmp(l)===0},"eq"),s.red=i(function(l){return new F(l)},"red"),s.prototype.toRed=i(function(l){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},"toRed"),s.prototype.fromRed=i(function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),s.prototype._forceRed=i(function(l){return this.red=l,this},"_forceRed"),s.prototype.forceRed=i(function(l){return a(!this.red,"Already a number in reduction context"),this._forceRed(l)},"forceRed"),s.prototype.redAdd=i(function(l){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},"redAdd"),s.prototype.redIAdd=i(function(l){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},"redIAdd"),s.prototype.redSub=i(function(l){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},"redSub"),s.prototype.redISub=i(function(l){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},"redISub"),s.prototype.redShl=i(function(l){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},"redShl"),s.prototype.redMul=i(function(l){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},"redMul"),s.prototype.redIMul=i(function(l){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},"redIMul"),s.prototype.redSqr=i(function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),s.prototype.redISqr=i(function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),s.prototype.redSqrt=i(function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),s.prototype.redInvm=i(function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),s.prototype.redNeg=i(function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),s.prototype.redPow=i(function(l){return a(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)},"redPow");var P={k256:null,p224:null,p192:null,p25519:null};function B(p,l){this.name=p,this.p=new s(l,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(B,"MPrime"),B.prototype._tmp=i(function(){var l=new s(null);return l.words=new Array(Math.ceil(this.n/13)),l},"_tmp"),B.prototype.ireduce=i(function(l){var g=l,w;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),w=g.bitLength();while(w>this.n);var M=w<this.n?-1:g.ucmp(this.p);return M===0?(g.words[0]=0,g.length=1):M>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},"ireduce"),B.prototype.split=i(function(l,g){l.iushrn(this.n,0,g)},"split"),B.prototype.imulK=i(function(l){return l.imul(this.k)},"imulK");function Z(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Z,"K256"),n(Z,B),Z.prototype.split=i(function(l,g){for(var w=4194303,M=Math.min(l.length,9),A=0;A<M;A++)g.words[A]=l.words[A];if(g.length=M,l.length<=9){l.words[0]=0,l.length=1;return}var S=l.words[9];for(g.words[g.length++]=S&w,A=10;A<l.length;A++){var f=l.words[A]|0;l.words[A-10]=(f&w)<<4|S>>>22,S=f}S>>>=22,l.words[A-10]=S,S===0&&l.length>10?l.length-=10:l.length-=9},"split"),Z.prototype.imulK=i(function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var g=0,w=0;w<l.length;w++){var M=l.words[w]|0;g+=M*977,l.words[w]=g&67108863,g=M*64+(g/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l},"imulK");function H(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(H,"P224"),n(H,B);function ee(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(ee,"P192"),n(ee,B);function $(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i($,"P25519"),n($,B),$.prototype.imulK=i(function(l){for(var g=0,w=0;w<l.length;w++){var M=(l.words[w]|0)*19+g,A=M&67108863;M>>>=26,l.words[w]=A,g=M}return g!==0&&(l.words[l.length++]=g),l},"imulK"),s._prime=i(function(l){if(P[l])return P[l];var g;if(l==="k256")g=new Z;else if(l==="p224")g=new H;else if(l==="p192")g=new ee;else if(l==="p25519")g=new $;else throw new Error("Unknown prime "+l);return P[l]=g,g},"prime");function F(p){if(typeof p=="string"){var l=s._prime(p);this.m=l.p,this.prime=l}else a(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}i(F,"Red"),F.prototype._verify1=i(function(l){a(l.negative===0,"red works only with positives"),a(l.red,"red works only with red numbers")},"_verify1"),F.prototype._verify2=i(function(l,g){a((l.negative|g.negative)===0,"red works only with positives"),a(l.red&&l.red===g.red,"red works only with red numbers")},"_verify2"),F.prototype.imod=i(function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(c(l,l.umod(this.m)._forceRed(this)),l)},"imod"),F.prototype.neg=i(function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},"neg"),F.prototype.add=i(function(l,g){this._verify2(l,g);var w=l.add(g);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},"add"),F.prototype.iadd=i(function(l,g){this._verify2(l,g);var w=l.iadd(g);return w.cmp(this.m)>=0&&w.isub(this.m),w},"iadd"),F.prototype.sub=i(function(l,g){this._verify2(l,g);var w=l.sub(g);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},"sub"),F.prototype.isub=i(function(l,g){this._verify2(l,g);var w=l.isub(g);return w.cmpn(0)<0&&w.iadd(this.m),w},"isub"),F.prototype.shl=i(function(l,g){return this._verify1(l),this.imod(l.ushln(g))},"shl"),F.prototype.imul=i(function(l,g){return this._verify2(l,g),this.imod(l.imul(g))},"imul"),F.prototype.mul=i(function(l,g){return this._verify2(l,g),this.imod(l.mul(g))},"mul"),F.prototype.isqr=i(function(l){return this.imul(l,l.clone())},"isqr"),F.prototype.sqr=i(function(l){return this.mul(l,l)},"sqr"),F.prototype.sqrt=i(function(l){if(l.isZero())return l.clone();var g=this.m.andln(3);if(a(g%2===1),g===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(l,w)}for(var M=this.m.subn(1),A=0;!M.isZero()&&M.andln(1)===0;)A++,M.iushrn(1);a(!M.isZero());var S=new s(1).toRed(this),f=S.redNeg(),_=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,_).cmp(f)!==0;)E.redIAdd(f);for(var I=this.pow(E,M),D=this.pow(l,M.addn(1).iushrn(1)),L=this.pow(l,M),U=A;L.cmp(S)!==0;){for(var z=L,V=0;z.cmp(S)!==0;V++)z=z.redSqr();a(V<U);var G=this.pow(I,new s(1).iushln(U-V-1));D=D.redMul(G),I=G.redSqr(),L=L.redMul(I),U=V}return D},"sqrt"),F.prototype.invm=i(function(l){var g=l._invmp(this.m);return g.negative!==0?(g.negative=0,this.imod(g).redNeg()):this.imod(g)},"invm"),F.prototype.pow=i(function(l,g){if(g.isZero())return new s(1).toRed(this);if(g.cmpn(1)===0)return l.clone();var w=4,M=new Array(1<<w);M[0]=new s(1).toRed(this),M[1]=l;for(var A=2;A<M.length;A++)M[A]=this.mul(M[A-1],l);var S=M[0],f=0,_=0,E=g.bitLength()%26;for(E===0&&(E=26),A=g.length-1;A>=0;A--){for(var I=g.words[A],D=E-1;D>=0;D--){var L=I>>D&1;if(S!==M[0]&&(S=this.sqr(S)),L===0&&f===0){_=0;continue}f<<=1,f|=L,_++,!(_!==w&&(A!==0||D!==0))&&(S=this.mul(S,M[f]),_=0,f=0)}E=26}return S},"pow"),F.prototype.convertTo=i(function(l){var g=l.umod(this.m);return g===l?g.clone():g},"convertTo"),F.prototype.convertFrom=i(function(l){var g=l.clone();return g.red=null,g},"convertFrom"),s.mont=i(function(l){return new u(l)},"mont");function u(p){F.call(this,p),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(u,"Mont"),n(u,F),u.prototype.convertTo=i(function(l){return this.imod(l.ushln(this.shift))},"convertTo"),u.prototype.convertFrom=i(function(l){var g=this.imod(l.mul(this.rinv));return g.red=null,g},"convertFrom"),u.prototype.imul=i(function(l,g){if(l.isZero()||g.isZero())return l.words[0]=0,l.length=1,l;var w=l.imul(g),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=w.isub(M).iushrn(this.shift),S=A;return A.cmp(this.m)>=0?S=A.isub(this.m):A.cmpn(0)<0&&(S=A.iadd(this.m)),S._forceRed(this)},"imul"),u.prototype.mul=i(function(l,g){if(l.isZero()||g.isZero())return new s(0)._forceRed(this);var w=l.mul(g),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=w.isub(M).iushrn(this.shift),S=A;return A.cmp(this.m)>=0?S=A.isub(this.m):A.cmpn(0)<0&&(S=A.iadd(this.m)),S._forceRed(this)},"mul"),u.prototype.invm=i(function(l){var g=this.imod(l._invmp(this.m).mul(this.r2));return g._forceRed(this)},"invm")})(e,xD)})(Nu)),Nu.exports}i(_D,"requireBn$1");var rp,p6;function Ov(){if(p6)return rp;p6=1;var e=_D(),t=Ss(),r=jt().Buffer;function a(o){var h=o.modulus.byteLength(),m;do m=new e(t(h));while(m.cmp(o.modulus)>=0||!m.umod(o.prime1)||!m.umod(o.prime2));return m}i(a,"getr");function n(o){var h=a(o),m=h.toRed(e.mont(o.modulus)).redPow(new e(o.publicExponent)).fromRed();return{blinder:m,unblinder:h.invm(o.modulus)}}i(n,"blind");function s(o,h){var m=n(h),v=h.modulus.byteLength(),c=new e(o).mul(m.blinder).umod(h.modulus),d=c.toRed(e.mont(h.prime1)),y=c.toRed(e.mont(h.prime2)),b=h.coefficient,x=h.prime1,k=h.prime2,N=d.redPow(h.exponent1).fromRed(),C=y.redPow(h.exponent2).fromRed(),O=N.isub(C).imul(b).umod(x).imul(k);return C.iadd(O).imul(m.unblinder).umod(h.modulus).toArrayLike(r,"be",v)}return i(s,"crt"),s.getr=a,rp=s,rp}i(Ov,"requireBrowserifyRsa");var ip={};const SD="6.6.1",MD={version:SD};var np={},ap={},m6;function Z7(){return m6||(m6=1,(function(e){var t=e;function r(s,o){if(Array.isArray(s))return s.slice();if(!s)return[];var h=[];if(typeof s!="string"){for(var m=0;m<s.length;m++)h[m]=s[m]|0;return h}if(o==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var m=0;m<s.length;m+=2)h.push(parseInt(s[m]+s[m+1],16))}else for(var m=0;m<s.length;m++){var v=s.charCodeAt(m),c=v>>8,d=v&255;c?h.push(c,d):h.push(d)}return h}i(r,"toArray"),t.toArray=r;function a(s){return s.length===1?"0"+s:s}i(a,"zero2"),t.zero2=a;function n(s){for(var o="",h=0;h<s.length;h++)o+=a(s[h].toString(16));return o}i(n,"toHex"),t.toHex=n,t.encode=i(function(o,h){return h==="hex"?n(o):o},"encode")})(ap)),ap}i(Z7,"requireUtils$2");var g6;function hi(){return g6||(g6=1,(function(e){var t=e,r=Ir(),a=di(),n=Z7();t.assert=a,t.toArray=n.toArray,t.zero2=n.zero2,t.toHex=n.toHex,t.encode=n.encode;function s(c,d,y){var b=new Array(Math.max(c.bitLength(),y)+1),x;for(x=0;x<b.length;x+=1)b[x]=0;var k=1<<d+1,N=c.clone();for(x=0;x<b.length;x++){var C,O=N.andln(k-1);N.isOdd()?(O>(k>>1)-1?C=(k>>1)-O:C=O,N.isubn(C)):C=0,b[x]=C,N.iushrn(1)}return b}i(s,"getNAF"),t.getNAF=s;function o(c,d){var y=[[],[]];c=c.clone(),d=d.clone();for(var b=0,x=0,k;c.cmpn(-b)>0||d.cmpn(-x)>0;){var N=c.andln(3)+b&3,C=d.andln(3)+x&3;N===3&&(N=-1),C===3&&(C=-1);var O;(N&1)===0?O=0:(k=c.andln(7)+b&7,(k===3||k===5)&&C===2?O=-N:O=N),y[0].push(O);var R;(C&1)===0?R=0:(k=d.andln(7)+x&7,(k===3||k===5)&&N===2?R=-C:R=C),y[1].push(R),2*b===O+1&&(b=1-b),2*x===R+1&&(x=1-x),c.iushrn(1),d.iushrn(1)}return y}i(o,"getJSF"),t.getJSF=o;function h(c,d,y){var b="_"+d;c.prototype[d]=i(function(){return this[b]!==void 0?this[b]:this[b]=y.call(this)},"cachedProperty")}i(h,"cachedProperty"),t.cachedProperty=h;function m(c){return typeof c=="string"?t.toArray(c,"hex"):c}i(m,"parseBytes"),t.parseBytes=m;function v(c){return new r(c,"hex","le")}i(v,"intFromLE"),t.intFromLE=v})(np)),np}i(hi,"requireUtils$1");var sp={},op,v6;function qf(){if(v6)return op;v6=1;var e=Ir(),t=hi(),r=t.getNAF,a=t.getJSF,n=t.assert;function s(h,m){this.type=h,this.p=new e(m.p,16),this.red=m.prime?e.red(m.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=m.n&&new e(m.n,16),this.g=m.g&&this.pointFromJSON(m.g,m.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 v=this.n&&this.p.div(this.n);!v||v.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}i(s,"BaseCurve"),op=s,s.prototype.point=i(function(){throw new Error("Not implemented")},"point"),s.prototype.validate=i(function(){throw new Error("Not implemented")},"validate"),s.prototype._fixedNafMul=i(function(m,v){n(m.precomputed);var c=m._getDoubles(),d=r(v,1,this._bitLength),y=(1<<c.step+1)-(c.step%2===0?2:1);y/=3;var b=[],x,k;for(x=0;x<d.length;x+=c.step){k=0;for(var N=x+c.step-1;N>=x;N--)k=(k<<1)+d[N];b.push(k)}for(var C=this.jpoint(null,null,null),O=this.jpoint(null,null,null),R=y;R>0;R--){for(x=0;x<b.length;x++)k=b[x],k===R?O=O.mixedAdd(c.points[x]):k===-R&&(O=O.mixedAdd(c.points[x].neg()));C=C.add(O)}return C.toP()},"_fixedNafMul"),s.prototype._wnafMul=i(function(m,v){var c=4,d=m._getNAFPoints(c);c=d.wnd;for(var y=d.points,b=r(v,c,this._bitLength),x=this.jpoint(null,null,null),k=b.length-1;k>=0;k--){for(var N=0;k>=0&&b[k]===0;k--)N++;if(k>=0&&N++,x=x.dblp(N),k<0)break;var C=b[k];n(C!==0),m.type==="affine"?C>0?x=x.mixedAdd(y[C-1>>1]):x=x.mixedAdd(y[-C-1>>1].neg()):C>0?x=x.add(y[C-1>>1]):x=x.add(y[-C-1>>1].neg())}return m.type==="affine"?x.toP():x},"_wnafMul"),s.prototype._wnafMulAdd=i(function(m,v,c,d,y){var b=this._wnafT1,x=this._wnafT2,k=this._wnafT3,N=0,C,O,R;for(C=0;C<d;C++){R=v[C];var T=R._getNAFPoints(m);b[C]=T.wnd,x[C]=T.points}for(C=d-1;C>=1;C-=2){var P=C-1,B=C;if(b[P]!==1||b[B]!==1){k[P]=r(c[P],b[P],this._bitLength),k[B]=r(c[B],b[B],this._bitLength),N=Math.max(k[P].length,N),N=Math.max(k[B].length,N);continue}var Z=[v[P],null,null,v[B]];v[P].y.cmp(v[B].y)===0?(Z[1]=v[P].add(v[B]),Z[2]=v[P].toJ().mixedAdd(v[B].neg())):v[P].y.cmp(v[B].y.redNeg())===0?(Z[1]=v[P].toJ().mixedAdd(v[B]),Z[2]=v[P].add(v[B].neg())):(Z[1]=v[P].toJ().mixedAdd(v[B]),Z[2]=v[P].toJ().mixedAdd(v[B].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],ee=a(c[P],c[B]);for(N=Math.max(ee[0].length,N),k[P]=new Array(N),k[B]=new Array(N),O=0;O<N;O++){var $=ee[0][O]|0,F=ee[1][O]|0;k[P][O]=H[($+1)*3+(F+1)],k[B][O]=0,x[P]=Z}}var u=this.jpoint(null,null,null),p=this._wnafT4;for(C=N;C>=0;C--){for(var l=0;C>=0;){var g=!0;for(O=0;O<d;O++)p[O]=k[O][C]|0,p[O]!==0&&(g=!1);if(!g)break;l++,C--}if(C>=0&&l++,u=u.dblp(l),C<0)break;for(O=0;O<d;O++){var w=p[O];w!==0&&(w>0?R=x[O][w-1>>1]:w<0&&(R=x[O][-w-1>>1].neg()),R.type==="affine"?u=u.mixedAdd(R):u=u.add(R))}}for(C=0;C<d;C++)x[C]=null;return y?u:u.toP()},"_wnafMulAdd");function o(h,m){this.curve=h,this.type=m,this.precomputed=null}return i(o,"BasePoint"),s.BasePoint=o,o.prototype.eq=i(function(){throw new Error("Not implemented")},"eq"),o.prototype.validate=i(function(){return this.curve.validate(this)},"validate"),s.prototype.decodePoint=i(function(m,v){m=t.toArray(m,v);var c=this.p.byteLength();if((m[0]===4||m[0]===6||m[0]===7)&&m.length-1===2*c){m[0]===6?n(m[m.length-1]%2===0):m[0]===7&&n(m[m.length-1]%2===1);var d=this.point(m.slice(1,1+c),m.slice(1+c,1+2*c));return d}else if((m[0]===2||m[0]===3)&&m.length-1===c)return this.pointFromX(m.slice(1,1+c),m[0]===3);throw new Error("Unknown point format")},"decodePoint"),o.prototype.encodeCompressed=i(function(m){return this.encode(m,!0)},"encodeCompressed"),o.prototype._encode=i(function(m){var v=this.curve.p.byteLength(),c=this.getX().toArray("be",v);return m?[this.getY().isEven()?2:3].concat(c):[4].concat(c,this.getY().toArray("be",v))},"_encode"),o.prototype.encode=i(function(m,v){return t.encode(this._encode(v),m)},"encode"),o.prototype.precompute=i(function(m){if(this.precomputed)return this;var v={doubles:null,naf:null,beta:null};return v.naf=this._getNAFPoints(8),v.doubles=this._getDoubles(4,m),v.beta=this._getBeta(),this.precomputed=v,this},"precompute"),o.prototype._hasDoubles=i(function(m){if(!this.precomputed)return!1;var v=this.precomputed.doubles;return v?v.points.length>=Math.ceil((m.bitLength()+1)/v.step):!1},"_hasDoubles"),o.prototype._getDoubles=i(function(m,v){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var c=[this],d=this,y=0;y<v;y+=m){for(var b=0;b<m;b++)d=d.dbl();c.push(d)}return{step:m,points:c}},"_getDoubles"),o.prototype._getNAFPoints=i(function(m){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var v=[this],c=(1<<m)-1,d=c===1?null:this.dbl(),y=1;y<c;y++)v[y]=v[y-1].add(d);return{wnd:m,points:v}},"_getNAFPoints"),o.prototype._getBeta=i(function(){return null},"_getBeta"),o.prototype.dblp=i(function(m){for(var v=this,c=0;c<m;c++)v=v.dbl();return v},"dblp"),op}i(qf,"requireBase$1");var lp,b6;function ED(){if(b6)return lp;b6=1;var e=hi(),t=Ir(),r=Bt(),a=qf(),n=e.assert;function s(m){a.call(this,"short",m),this.a=new t(m.a,16).toRed(this.red),this.b=new t(m.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(m),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}i(s,"ShortCurve"),r(s,a),lp=s,s.prototype._getEndomorphism=i(function(v){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var c,d;if(v.beta)c=new t(v.beta,16).toRed(this.red);else{var y=this._getEndoRoots(this.p);c=y[0].cmp(y[1])<0?y[0]:y[1],c=c.toRed(this.red)}if(v.lambda)d=new t(v.lambda,16);else{var b=this._getEndoRoots(this.n);this.g.mul(b[0]).x.cmp(this.g.x.redMul(c))===0?d=b[0]:(d=b[1],n(this.g.mul(d).x.cmp(this.g.x.redMul(c))===0))}var x;return v.basis?x=v.basis.map(function(k){return{a:new t(k.a,16),b:new t(k.b,16)}}):x=this._getEndoBasis(d),{beta:c,lambda:d,basis:x}}},"_getEndomorphism"),s.prototype._getEndoRoots=i(function(v){var c=v===this.p?this.red:t.mont(v),d=new t(2).toRed(c).redInvm(),y=d.redNeg(),b=new t(3).toRed(c).redNeg().redSqrt().redMul(d),x=y.redAdd(b).fromRed(),k=y.redSub(b).fromRed();return[x,k]},"_getEndoRoots"),s.prototype._getEndoBasis=i(function(v){for(var c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=v,y=this.n.clone(),b=new t(1),x=new t(0),k=new t(0),N=new t(1),C,O,R,T,P,B,Z,H=0,ee,$;d.cmpn(0)!==0;){var F=y.div(d);ee=y.sub(F.mul(d)),$=k.sub(F.mul(b));var u=N.sub(F.mul(x));if(!R&&ee.cmp(c)<0)C=Z.neg(),O=b,R=ee.neg(),T=$;else if(R&&++H===2)break;Z=ee,y=d,d=ee,k=b,b=$,N=x,x=u}P=ee.neg(),B=$;var p=R.sqr().add(T.sqr()),l=P.sqr().add(B.sqr());return l.cmp(p)>=0&&(P=C,B=O),R.negative&&(R=R.neg(),T=T.neg()),P.negative&&(P=P.neg(),B=B.neg()),[{a:R,b:T},{a:P,b:B}]},"_getEndoBasis"),s.prototype._endoSplit=i(function(v){var c=this.endo.basis,d=c[0],y=c[1],b=y.b.mul(v).divRound(this.n),x=d.b.neg().mul(v).divRound(this.n),k=b.mul(d.a),N=x.mul(y.a),C=b.mul(d.b),O=x.mul(y.b),R=v.sub(k).sub(N),T=C.add(O).neg();return{k1:R,k2:T}},"_endoSplit"),s.prototype.pointFromX=i(function(v,c){v=new t(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr().redMul(v).redIAdd(v.redMul(this.a)).redIAdd(this.b),y=d.redSqrt();if(y.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");var b=y.fromRed().isOdd();return(c&&!b||!c&&b)&&(y=y.redNeg()),this.point(v,y)},"pointFromX"),s.prototype.validate=i(function(v){if(v.inf)return!0;var c=v.x,d=v.y,y=this.a.redMul(c),b=c.redSqr().redMul(c).redIAdd(y).redIAdd(this.b);return d.redSqr().redISub(b).cmpn(0)===0},"validate"),s.prototype._endoWnafMulAdd=i(function(v,c,d){for(var y=this._endoWnafT1,b=this._endoWnafT2,x=0;x<v.length;x++){var k=this._endoSplit(c[x]),N=v[x],C=N._getBeta();k.k1.negative&&(k.k1.ineg(),N=N.neg(!0)),k.k2.negative&&(k.k2.ineg(),C=C.neg(!0)),y[x*2]=N,y[x*2+1]=C,b[x*2]=k.k1,b[x*2+1]=k.k2}for(var O=this._wnafMulAdd(1,y,b,x*2,d),R=0;R<x*2;R++)y[R]=null,b[R]=null;return O},"_endoWnafMulAdd");function o(m,v,c,d){a.BasePoint.call(this,m,"affine"),v===null&&c===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(v,16),this.y=new t(c,16),d&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}i(o,"Point"),r(o,a.BasePoint),s.prototype.point=i(function(v,c,d){return new o(this,v,c,d)},"point"),s.prototype.pointFromJSON=i(function(v,c){return o.fromJSON(this,v,c)},"pointFromJSON"),o.prototype._getBeta=i(function(){if(this.curve.endo){var v=this.precomputed;if(v&&v.beta)return v.beta;var c=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(v){var d=this.curve,y=i(function(b){return d.point(b.x.redMul(d.endo.beta),b.y)},"endoMul");v.beta=c,c.precomputed={beta:null,naf:v.naf&&{wnd:v.naf.wnd,points:v.naf.points.map(y)},doubles:v.doubles&&{step:v.doubles.step,points:v.doubles.points.map(y)}}}return c}},"_getBeta"),o.prototype.toJSON=i(function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},"toJSON"),o.fromJSON=i(function(v,c,d){typeof c=="string"&&(c=JSON.parse(c));var y=v.point(c[0],c[1],d);if(!c[2])return y;function b(k){return v.point(k[0],k[1],d)}i(b,"obj2point");var x=c[2];return y.precomputed={beta:null,doubles:x.doubles&&{step:x.doubles.step,points:[y].concat(x.doubles.points.map(b))},naf:x.naf&&{wnd:x.naf.wnd,points:[y].concat(x.naf.points.map(b))}},y},"fromJSON"),o.prototype.inspect=i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},"inspect"),o.prototype.isInfinity=i(function(){return this.inf},"isInfinity"),o.prototype.add=i(function(v){if(this.inf)return v;if(v.inf)return this;if(this.eq(v))return this.dbl();if(this.neg().eq(v))return this.curve.point(null,null);if(this.x.cmp(v.x)===0)return this.curve.point(null,null);var c=this.y.redSub(v.y);c.cmpn(0)!==0&&(c=c.redMul(this.x.redSub(v.x).redInvm()));var d=c.redSqr().redISub(this.x).redISub(v.x),y=c.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,y)},"add"),o.prototype.dbl=i(function(){if(this.inf)return this;var v=this.y.redAdd(this.y);if(v.cmpn(0)===0)return this.curve.point(null,null);var c=this.curve.a,d=this.x.redSqr(),y=v.redInvm(),b=d.redAdd(d).redIAdd(d).redIAdd(c).redMul(y),x=b.redSqr().redISub(this.x.redAdd(this.x)),k=b.redMul(this.x.redSub(x)).redISub(this.y);return this.curve.point(x,k)},"dbl"),o.prototype.getX=i(function(){return this.x.fromRed()},"getX"),o.prototype.getY=i(function(){return this.y.fromRed()},"getY"),o.prototype.mul=i(function(v){return v=new t(v,16),this.isInfinity()?this:this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve.endo?this.curve._endoWnafMulAdd([this],[v]):this.curve._wnafMul(this,v)},"mul"),o.prototype.mulAdd=i(function(v,c,d){var y=[this,c],b=[v,d];return this.curve.endo?this.curve._endoWnafMulAdd(y,b):this.curve._wnafMulAdd(1,y,b,2)},"mulAdd"),o.prototype.jmulAdd=i(function(v,c,d){var y=[this,c],b=[v,d];return this.curve.endo?this.curve._endoWnafMulAdd(y,b,!0):this.curve._wnafMulAdd(1,y,b,2,!0)},"jmulAdd"),o.prototype.eq=i(function(v){return this===v||this.inf===v.inf&&(this.inf||this.x.cmp(v.x)===0&&this.y.cmp(v.y)===0)},"eq"),o.prototype.neg=i(function(v){if(this.inf)return this;var c=this.curve.point(this.x,this.y.redNeg());if(v&&this.precomputed){var d=this.precomputed,y=i(function(b){return b.neg()},"negate");c.precomputed={naf:d.naf&&{wnd:d.naf.wnd,points:d.naf.points.map(y)},doubles:d.doubles&&{step:d.doubles.step,points:d.doubles.points.map(y)}}}return c},"neg"),o.prototype.toJ=i(function(){if(this.inf)return this.curve.jpoint(null,null,null);var v=this.curve.jpoint(this.x,this.y,this.curve.one);return v},"toJ");function h(m,v,c,d){a.BasePoint.call(this,m,"jacobian"),v===null&&c===null&&d===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(v,16),this.y=new t(c,16),this.z=new t(d,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return i(h,"JPoint"),r(h,a.BasePoint),s.prototype.jpoint=i(function(v,c,d){return new h(this,v,c,d)},"jpoint"),h.prototype.toP=i(function(){if(this.isInfinity())return this.curve.point(null,null);var v=this.z.redInvm(),c=v.redSqr(),d=this.x.redMul(c),y=this.y.redMul(c).redMul(v);return this.curve.point(d,y)},"toP"),h.prototype.neg=i(function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},"neg"),h.prototype.add=i(function(v){if(this.isInfinity())return v;if(v.isInfinity())return this;var c=v.z.redSqr(),d=this.z.redSqr(),y=this.x.redMul(c),b=v.x.redMul(d),x=this.y.redMul(c.redMul(v.z)),k=v.y.redMul(d.redMul(this.z)),N=y.redSub(b),C=x.redSub(k);if(N.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var O=N.redSqr(),R=O.redMul(N),T=y.redMul(O),P=C.redSqr().redIAdd(R).redISub(T).redISub(T),B=C.redMul(T.redISub(P)).redISub(x.redMul(R)),Z=this.z.redMul(v.z).redMul(N);return this.curve.jpoint(P,B,Z)},"add"),h.prototype.mixedAdd=i(function(v){if(this.isInfinity())return v.toJ();if(v.isInfinity())return this;var c=this.z.redSqr(),d=this.x,y=v.x.redMul(c),b=this.y,x=v.y.redMul(c).redMul(this.z),k=d.redSub(y),N=b.redSub(x);if(k.cmpn(0)===0)return N.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=k.redSqr(),O=C.redMul(k),R=d.redMul(C),T=N.redSqr().redIAdd(O).redISub(R).redISub(R),P=N.redMul(R.redISub(T)).redISub(b.redMul(O)),B=this.z.redMul(k);return this.curve.jpoint(T,P,B)},"mixedAdd"),h.prototype.dblp=i(function(v){if(v===0)return this;if(this.isInfinity())return this;if(!v)return this.dbl();var c;if(this.curve.zeroA||this.curve.threeA){var d=this;for(c=0;c<v;c++)d=d.dbl();return d}var y=this.curve.a,b=this.curve.tinv,x=this.x,k=this.y,N=this.z,C=N.redSqr().redSqr(),O=k.redAdd(k);for(c=0;c<v;c++){var R=x.redSqr(),T=O.redSqr(),P=T.redSqr(),B=R.redAdd(R).redIAdd(R).redIAdd(y.redMul(C)),Z=x.redMul(T),H=B.redSqr().redISub(Z.redAdd(Z)),ee=Z.redISub(H),$=B.redMul(ee);$=$.redIAdd($).redISub(P);var F=O.redMul(N);c+1<v&&(C=C.redMul(P)),x=H,N=F,O=$}return this.curve.jpoint(x,O.redMul(b),N)},"dblp"),h.prototype.dbl=i(function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},"dbl"),h.prototype._zeroDbl=i(function(){var v,c,d;if(this.zOne){var y=this.x.redSqr(),b=this.y.redSqr(),x=b.redSqr(),k=this.x.redAdd(b).redSqr().redISub(y).redISub(x);k=k.redIAdd(k);var N=y.redAdd(y).redIAdd(y),C=N.redSqr().redISub(k).redISub(k),O=x.redIAdd(x);O=O.redIAdd(O),O=O.redIAdd(O),v=C,c=N.redMul(k.redISub(C)).redISub(O),d=this.y.redAdd(this.y)}else{var R=this.x.redSqr(),T=this.y.redSqr(),P=T.redSqr(),B=this.x.redAdd(T).redSqr().redISub(R).redISub(P);B=B.redIAdd(B);var Z=R.redAdd(R).redIAdd(R),H=Z.redSqr(),ee=P.redIAdd(P);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),v=H.redISub(B).redISub(B),c=Z.redMul(B.redISub(v)).redISub(ee),d=this.y.redMul(this.z),d=d.redIAdd(d)}return this.curve.jpoint(v,c,d)},"_zeroDbl"),h.prototype._threeDbl=i(function(){var v,c,d;if(this.zOne){var y=this.x.redSqr(),b=this.y.redSqr(),x=b.redSqr(),k=this.x.redAdd(b).redSqr().redISub(y).redISub(x);k=k.redIAdd(k);var N=y.redAdd(y).redIAdd(y).redIAdd(this.curve.a),C=N.redSqr().redISub(k).redISub(k);v=C;var O=x.redIAdd(x);O=O.redIAdd(O),O=O.redIAdd(O),c=N.redMul(k.redISub(C)).redISub(O),d=this.y.redAdd(this.y)}else{var R=this.z.redSqr(),T=this.y.redSqr(),P=this.x.redMul(T),B=this.x.redSub(R).redMul(this.x.redAdd(R));B=B.redAdd(B).redIAdd(B);var Z=P.redIAdd(P);Z=Z.redIAdd(Z);var H=Z.redAdd(Z);v=B.redSqr().redISub(H),d=this.y.redAdd(this.z).redSqr().redISub(T).redISub(R);var ee=T.redSqr();ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),c=B.redMul(Z.redISub(v)).redISub(ee)}return this.curve.jpoint(v,c,d)},"_threeDbl"),h.prototype._dbl=i(function(){var v=this.curve.a,c=this.x,d=this.y,y=this.z,b=y.redSqr().redSqr(),x=c.redSqr(),k=d.redSqr(),N=x.redAdd(x).redIAdd(x).redIAdd(v.redMul(b)),C=c.redAdd(c);C=C.redIAdd(C);var O=C.redMul(k),R=N.redSqr().redISub(O.redAdd(O)),T=O.redISub(R),P=k.redSqr();P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P);var B=N.redMul(T).redISub(P),Z=d.redAdd(d).redMul(y);return this.curve.jpoint(R,B,Z)},"_dbl"),h.prototype.trpl=i(function(){if(!this.curve.zeroA)return this.dbl().add(this);var v=this.x.redSqr(),c=this.y.redSqr(),d=this.z.redSqr(),y=c.redSqr(),b=v.redAdd(v).redIAdd(v),x=b.redSqr(),k=this.x.redAdd(c).redSqr().redISub(v).redISub(y);k=k.redIAdd(k),k=k.redAdd(k).redIAdd(k),k=k.redISub(x);var N=k.redSqr(),C=y.redIAdd(y);C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var O=b.redIAdd(k).redSqr().redISub(x).redISub(N).redISub(C),R=c.redMul(O);R=R.redIAdd(R),R=R.redIAdd(R);var T=this.x.redMul(N).redISub(R);T=T.redIAdd(T),T=T.redIAdd(T);var P=this.y.redMul(O.redMul(C.redISub(O)).redISub(k.redMul(N)));P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P);var B=this.z.redAdd(k).redSqr().redISub(d).redISub(N);return this.curve.jpoint(T,P,B)},"trpl"),h.prototype.mul=i(function(v,c){return v=new t(v,c),this.curve._wnafMul(this,v)},"mul"),h.prototype.eq=i(function(v){if(v.type==="affine")return this.eq(v.toJ());if(this===v)return!0;var c=this.z.redSqr(),d=v.z.redSqr();if(this.x.redMul(d).redISub(v.x.redMul(c)).cmpn(0)!==0)return!1;var y=c.redMul(this.z),b=d.redMul(v.z);return this.y.redMul(b).redISub(v.y.redMul(y)).cmpn(0)===0},"eq"),h.prototype.eqXToP=i(function(v){var c=this.z.redSqr(),d=v.toRed(this.curve.red).redMul(c);if(this.x.cmp(d)===0)return!0;for(var y=v.clone(),b=this.curve.redN.redMul(c);;){if(y.iadd(this.curve.n),y.cmp(this.curve.p)>=0)return!1;if(d.redIAdd(b),this.x.cmp(d)===0)return!0}},"eqXToP"),h.prototype.inspect=i(function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},"inspect"),h.prototype.isInfinity=i(function(){return this.z.cmpn(0)===0},"isInfinity"),lp}i(ED,"requireShort");var up,y6;function kD(){if(y6)return up;y6=1;var e=Ir(),t=Bt(),r=qf(),a=hi();function n(o){r.call(this,"mont",o),this.a=new e(o.a,16).toRed(this.red),this.b=new e(o.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}i(n,"MontCurve"),t(n,r),up=n,n.prototype.validate=i(function(h){var m=h.normalize().x,v=m.redSqr(),c=v.redMul(m).redAdd(v.redMul(this.a)).redAdd(m),d=c.redSqrt();return d.redSqr().cmp(c)===0},"validate");function s(o,h,m){r.BasePoint.call(this,o,"projective"),h===null&&m===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(h,16),this.z=new e(m,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return i(s,"Point"),t(s,r.BasePoint),n.prototype.decodePoint=i(function(h,m){return this.point(a.toArray(h,m),1)},"decodePoint"),n.prototype.point=i(function(h,m){return new s(this,h,m)},"point"),n.prototype.pointFromJSON=i(function(h){return s.fromJSON(this,h)},"pointFromJSON"),s.prototype.precompute=i(function(){},"precompute"),s.prototype._encode=i(function(){return this.getX().toArray("be",this.curve.p.byteLength())},"_encode"),s.fromJSON=i(function(h,m){return new s(h,m[0],m[1]||h.one)},"fromJSON"),s.prototype.inspect=i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect"),s.prototype.isInfinity=i(function(){return this.z.cmpn(0)===0},"isInfinity"),s.prototype.dbl=i(function(){var h=this.x.redAdd(this.z),m=h.redSqr(),v=this.x.redSub(this.z),c=v.redSqr(),d=m.redSub(c),y=m.redMul(c),b=d.redMul(c.redAdd(this.curve.a24.redMul(d)));return this.curve.point(y,b)},"dbl"),s.prototype.add=i(function(){throw new Error("Not supported on Montgomery curve")},"add"),s.prototype.diffAdd=i(function(h,m){var v=this.x.redAdd(this.z),c=this.x.redSub(this.z),d=h.x.redAdd(h.z),y=h.x.redSub(h.z),b=y.redMul(v),x=d.redMul(c),k=m.z.redMul(b.redAdd(x).redSqr()),N=m.x.redMul(b.redISub(x).redSqr());return this.curve.point(k,N)},"diffAdd"),s.prototype.mul=i(function(h){for(var m=h.clone(),v=this,c=this.curve.point(null,null),d=this,y=[];m.cmpn(0)!==0;m.iushrn(1))y.push(m.andln(1));for(var b=y.length-1;b>=0;b--)y[b]===0?(v=v.diffAdd(c,d),c=c.dbl()):(c=v.diffAdd(c,d),v=v.dbl());return c},"mul"),s.prototype.mulAdd=i(function(){throw new Error("Not supported on Montgomery curve")},"mulAdd"),s.prototype.jumlAdd=i(function(){throw new Error("Not supported on Montgomery curve")},"jumlAdd"),s.prototype.eq=i(function(h){return this.getX().cmp(h.getX())===0},"eq"),s.prototype.normalize=i(function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},"normalize"),s.prototype.getX=i(function(){return this.normalize(),this.x.fromRed()},"getX"),up}i(kD,"requireMont");var fp,w6;function AD(){if(w6)return fp;w6=1;var e=hi(),t=Ir(),r=Bt(),a=qf(),n=e.assert;function s(h){this.twisted=(h.a|0)!==1,this.mOneA=this.twisted&&(h.a|0)===-1,this.extended=this.mOneA,a.call(this,"edwards",h),this.a=new t(h.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(h.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(h.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(h.c|0)===1}i(s,"EdwardsCurve"),r(s,a),fp=s,s.prototype._mulA=i(function(m){return this.mOneA?m.redNeg():this.a.redMul(m)},"_mulA"),s.prototype._mulC=i(function(m){return this.oneC?m:this.c.redMul(m)},"_mulC"),s.prototype.jpoint=i(function(m,v,c,d){return this.point(m,v,c,d)},"jpoint"),s.prototype.pointFromX=i(function(m,v){m=new t(m,16),m.red||(m=m.toRed(this.red));var c=m.redSqr(),d=this.c2.redSub(this.a.redMul(c)),y=this.one.redSub(this.c2.redMul(this.d).redMul(c)),b=d.redMul(y.redInvm()),x=b.redSqrt();if(x.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");var k=x.fromRed().isOdd();return(v&&!k||!v&&k)&&(x=x.redNeg()),this.point(m,x)},"pointFromX"),s.prototype.pointFromY=i(function(m,v){m=new t(m,16),m.red||(m=m.toRed(this.red));var c=m.redSqr(),d=c.redSub(this.c2),y=c.redMul(this.d).redMul(this.c2).redSub(this.a),b=d.redMul(y.redInvm());if(b.cmp(this.zero)===0){if(v)throw new Error("invalid point");return this.point(this.zero,m)}var x=b.redSqrt();if(x.redSqr().redSub(b).cmp(this.zero)!==0)throw new Error("invalid point");return x.fromRed().isOdd()!==v&&(x=x.redNeg()),this.point(x,m)},"pointFromY"),s.prototype.validate=i(function(m){if(m.isInfinity())return!0;m.normalize();var v=m.x.redSqr(),c=m.y.redSqr(),d=v.redMul(this.a).redAdd(c),y=this.c2.redMul(this.one.redAdd(this.d.redMul(v).redMul(c)));return d.cmp(y)===0},"validate");function o(h,m,v,c,d){a.BasePoint.call(this,h,"projective"),m===null&&v===null&&c===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(m,16),this.y=new t(v,16),this.z=c?new t(c,16):this.curve.one,this.t=d&&new t(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return i(o,"Point"),r(o,a.BasePoint),s.prototype.pointFromJSON=i(function(m){return o.fromJSON(this,m)},"pointFromJSON"),s.prototype.point=i(function(m,v,c,d){return new o(this,m,v,c,d)},"point"),o.fromJSON=i(function(m,v){return new o(m,v[0],v[1],v[2])},"fromJSON"),o.prototype.inspect=i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect"),o.prototype.isInfinity=i(function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},"isInfinity"),o.prototype._extDbl=i(function(){var m=this.x.redSqr(),v=this.y.redSqr(),c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(m),y=this.x.redAdd(this.y).redSqr().redISub(m).redISub(v),b=d.redAdd(v),x=b.redSub(c),k=d.redSub(v),N=y.redMul(x),C=b.redMul(k),O=y.redMul(k),R=x.redMul(b);return this.curve.point(N,C,R,O)},"_extDbl"),o.prototype._projDbl=i(function(){var m=this.x.redAdd(this.y).redSqr(),v=this.x.redSqr(),c=this.y.redSqr(),d,y,b,x,k,N;if(this.curve.twisted){x=this.curve._mulA(v);var C=x.redAdd(c);this.zOne?(d=m.redSub(v).redSub(c).redMul(C.redSub(this.curve.two)),y=C.redMul(x.redSub(c)),b=C.redSqr().redSub(C).redSub(C)):(k=this.z.redSqr(),N=C.redSub(k).redISub(k),d=m.redSub(v).redISub(c).redMul(N),y=C.redMul(x.redSub(c)),b=C.redMul(N))}else x=v.redAdd(c),k=this.curve._mulC(this.z).redSqr(),N=x.redSub(k).redSub(k),d=this.curve._mulC(m.redISub(x)).redMul(N),y=this.curve._mulC(x).redMul(v.redISub(c)),b=x.redMul(N);return this.curve.point(d,y,b)},"_projDbl"),o.prototype.dbl=i(function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},"dbl"),o.prototype._extAdd=i(function(m){var v=this.y.redSub(this.x).redMul(m.y.redSub(m.x)),c=this.y.redAdd(this.x).redMul(m.y.redAdd(m.x)),d=this.t.redMul(this.curve.dd).redMul(m.t),y=this.z.redMul(m.z.redAdd(m.z)),b=c.redSub(v),x=y.redSub(d),k=y.redAdd(d),N=c.redAdd(v),C=b.redMul(x),O=k.redMul(N),R=b.redMul(N),T=x.redMul(k);return this.curve.point(C,O,T,R)},"_extAdd"),o.prototype._projAdd=i(function(m){var v=this.z.redMul(m.z),c=v.redSqr(),d=this.x.redMul(m.x),y=this.y.redMul(m.y),b=this.curve.d.redMul(d).redMul(y),x=c.redSub(b),k=c.redAdd(b),N=this.x.redAdd(this.y).redMul(m.x.redAdd(m.y)).redISub(d).redISub(y),C=v.redMul(x).redMul(N),O,R;return this.curve.twisted?(O=v.redMul(k).redMul(y.redSub(this.curve._mulA(d))),R=x.redMul(k)):(O=v.redMul(k).redMul(y.redSub(d)),R=this.curve._mulC(x).redMul(k)),this.curve.point(C,O,R)},"_projAdd"),o.prototype.add=i(function(m){return this.isInfinity()?m:m.isInfinity()?this:this.curve.extended?this._extAdd(m):this._projAdd(m)},"add"),o.prototype.mul=i(function(m){return this._hasDoubles(m)?this.curve._fixedNafMul(this,m):this.curve._wnafMul(this,m)},"mul"),o.prototype.mulAdd=i(function(m,v,c){return this.curve._wnafMulAdd(1,[this,v],[m,c],2,!1)},"mulAdd"),o.prototype.jmulAdd=i(function(m,v,c){return this.curve._wnafMulAdd(1,[this,v],[m,c],2,!0)},"jmulAdd"),o.prototype.normalize=i(function(){if(this.zOne)return this;var m=this.z.redInvm();return this.x=this.x.redMul(m),this.y=this.y.redMul(m),this.t&&(this.t=this.t.redMul(m)),this.z=this.curve.one,this.zOne=!0,this},"normalize"),o.prototype.neg=i(function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},"neg"),o.prototype.getX=i(function(){return this.normalize(),this.x.fromRed()},"getX"),o.prototype.getY=i(function(){return this.normalize(),this.y.fromRed()},"getY"),o.prototype.eq=i(function(m){return this===m||this.getX().cmp(m.getX())===0&&this.getY().cmp(m.getY())===0},"eq"),o.prototype.eqXToP=i(function(m){var v=m.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(v)===0)return!0;for(var c=m.clone(),d=this.curve.redN.redMul(this.z);;){if(c.iadd(this.curve.n),c.cmp(this.curve.p)>=0)return!1;if(v.redIAdd(d),this.x.cmp(v)===0)return!0}},"eqXToP"),o.prototype.toP=o.prototype.normalize,o.prototype.mixedAdd=o.prototype.add,fp}i(AD,"requireEdwards");var x6;function H7(){return x6||(x6=1,(function(e){var t=e;t.base=qf(),t.short=ED(),t.mont=kD(),t.edwards=AD()})(sp)),sp}i(H7,"requireCurve");var cp={},dp={},Wt={},_6;function Yi(){if(_6)return Wt;_6=1;var e=di(),t=Bt();Wt.inherits=t;function r(u,p){return(u.charCodeAt(p)&64512)!==55296||p<0||p+1>=u.length?!1:(u.charCodeAt(p+1)&64512)===56320}i(r,"isSurrogatePair");function a(u,p){if(Array.isArray(u))return u.slice();if(!u)return[];var l=[];if(typeof u=="string")if(p){if(p==="hex")for(u=u.replace(/[^a-z0-9]+/ig,""),u.length%2!==0&&(u="0"+u),w=0;w<u.length;w+=2)l.push(parseInt(u[w]+u[w+1],16))}else for(var g=0,w=0;w<u.length;w++){var M=u.charCodeAt(w);M<128?l[g++]=M:M<2048?(l[g++]=M>>6|192,l[g++]=M&63|128):r(u,w)?(M=65536+((M&1023)<<10)+(u.charCodeAt(++w)&1023),l[g++]=M>>18|240,l[g++]=M>>12&63|128,l[g++]=M>>6&63|128,l[g++]=M&63|128):(l[g++]=M>>12|224,l[g++]=M>>6&63|128,l[g++]=M&63|128)}else for(w=0;w<u.length;w++)l[w]=u[w]|0;return l}i(a,"toArray"),Wt.toArray=a;function n(u){for(var p="",l=0;l<u.length;l++)p+=h(u[l].toString(16));return p}i(n,"toHex"),Wt.toHex=n;function s(u){var p=u>>>24|u>>>8&65280|u<<8&16711680|(u&255)<<24;return p>>>0}i(s,"htonl"),Wt.htonl=s;function o(u,p){for(var l="",g=0;g<u.length;g++){var w=u[g];p==="little"&&(w=s(w)),l+=m(w.toString(16))}return l}i(o,"toHex32"),Wt.toHex32=o;function h(u){return u.length===1?"0"+u:u}i(h,"zero2"),Wt.zero2=h;function m(u){return u.length===7?"0"+u:u.length===6?"00"+u:u.length===5?"000"+u:u.length===4?"0000"+u:u.length===3?"00000"+u:u.length===2?"000000"+u:u.length===1?"0000000"+u:u}i(m,"zero8"),Wt.zero8=m;function v(u,p,l,g){var w=l-p;e(w%4===0);for(var M=new Array(w/4),A=0,S=p;A<M.length;A++,S+=4){var f;g==="big"?f=u[S]<<24|u[S+1]<<16|u[S+2]<<8|u[S+3]:f=u[S+3]<<24|u[S+2]<<16|u[S+1]<<8|u[S],M[A]=f>>>0}return M}i(v,"join32"),Wt.join32=v;function c(u,p){for(var l=new Array(u.length*4),g=0,w=0;g<u.length;g++,w+=4){var M=u[g];p==="big"?(l[w]=M>>>24,l[w+1]=M>>>16&255,l[w+2]=M>>>8&255,l[w+3]=M&255):(l[w+3]=M>>>24,l[w+2]=M>>>16&255,l[w+1]=M>>>8&255,l[w]=M&255)}return l}i(c,"split32"),Wt.split32=c;function d(u,p){return u>>>p|u<<32-p}i(d,"rotr32"),Wt.rotr32=d;function y(u,p){return u<<p|u>>>32-p}i(y,"rotl32"),Wt.rotl32=y;function b(u,p){return u+p>>>0}i(b,"sum32"),Wt.sum32=b;function x(u,p,l){return u+p+l>>>0}i(x,"sum32_3"),Wt.sum32_3=x;function k(u,p,l,g){return u+p+l+g>>>0}i(k,"sum32_4"),Wt.sum32_4=k;function N(u,p,l,g,w){return u+p+l+g+w>>>0}i(N,"sum32_5"),Wt.sum32_5=N;function C(u,p,l,g){var w=u[p],M=u[p+1],A=g+M>>>0,S=(A<g?1:0)+l+w;u[p]=S>>>0,u[p+1]=A}i(C,"sum64"),Wt.sum64=C;function O(u,p,l,g){var w=p+g>>>0,M=(w<p?1:0)+u+l;return M>>>0}i(O,"sum64_hi"),Wt.sum64_hi=O;function R(u,p,l,g){var w=p+g;return w>>>0}i(R,"sum64_lo"),Wt.sum64_lo=R;function T(u,p,l,g,w,M,A,S){var f=0,_=p;_=_+g>>>0,f+=_<p?1:0,_=_+M>>>0,f+=_<M?1:0,_=_+S>>>0,f+=_<S?1:0;var E=u+l+w+A+f;return E>>>0}i(T,"sum64_4_hi"),Wt.sum64_4_hi=T;function P(u,p,l,g,w,M,A,S){var f=p+g+M+S;return f>>>0}i(P,"sum64_4_lo"),Wt.sum64_4_lo=P;function B(u,p,l,g,w,M,A,S,f,_){var E=0,I=p;I=I+g>>>0,E+=I<p?1:0,I=I+M>>>0,E+=I<M?1:0,I=I+S>>>0,E+=I<S?1:0,I=I+_>>>0,E+=I<_?1:0;var D=u+l+w+A+f+E;return D>>>0}i(B,"sum64_5_hi"),Wt.sum64_5_hi=B;function Z(u,p,l,g,w,M,A,S,f,_){var E=p+g+M+S+_;return E>>>0}i(Z,"sum64_5_lo"),Wt.sum64_5_lo=Z;function H(u,p,l){var g=p<<32-l|u>>>l;return g>>>0}i(H,"rotr64_hi"),Wt.rotr64_hi=H;function ee(u,p,l){var g=u<<32-l|p>>>l;return g>>>0}i(ee,"rotr64_lo"),Wt.rotr64_lo=ee;function $(u,p,l){return u>>>l}i($,"shr64_hi"),Wt.shr64_hi=$;function F(u,p,l){var g=u<<32-l|p>>>l;return g>>>0}return i(F,"shr64_lo"),Wt.shr64_lo=F,Wt}i(Yi,"requireUtils");var hp={},S6;function ol(){if(S6)return hp;S6=1;var e=Yi(),t=di();function r(){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}return i(r,"BlockHash"),hp.BlockHash=r,r.prototype.update=i(function(n,s){if(n=e.toArray(n,s),this.pending?this.pending=this.pending.concat(n):this.pending=n,this.pendingTotal+=n.length,this.pending.length>=this._delta8){n=this.pending;var o=n.length%this._delta8;this.pending=n.slice(n.length-o,n.length),this.pending.length===0&&(this.pending=null),n=e.join32(n,0,n.length-o,this.endian);for(var h=0;h<n.length;h+=this._delta32)this._update(n,h,h+this._delta32)}return this},"update"),r.prototype.digest=i(function(n){return this.update(this._pad()),t(this.pending===null),this._digest(n)},"digest"),r.prototype._pad=i(function(){var n=this.pendingTotal,s=this._delta8,o=s-(n+this.padLength)%s,h=new Array(o+this.padLength);h[0]=128;for(var m=1;m<o;m++)h[m]=0;if(n<<=3,this.endian==="big"){for(var v=8;v<this.padLength;v++)h[m++]=0;h[m++]=0,h[m++]=0,h[m++]=0,h[m++]=0,h[m++]=n>>>24&255,h[m++]=n>>>16&255,h[m++]=n>>>8&255,h[m++]=n&255}else for(h[m++]=n&255,h[m++]=n>>>8&255,h[m++]=n>>>16&255,h[m++]=n>>>24&255,h[m++]=0,h[m++]=0,h[m++]=0,h[m++]=0,v=8;v<this.padLength;v++)h[m++]=0;return h},"pad"),hp}i(ol,"requireCommon$1");var ea={},Li={},M6;function G7(){if(M6)return Li;M6=1;var e=Yi(),t=e.rotr32;function r(c,d,y,b){if(c===0)return a(d,y,b);if(c===1||c===3)return s(d,y,b);if(c===2)return n(d,y,b)}i(r,"ft_1"),Li.ft_1=r;function a(c,d,y){return c&d^~c&y}i(a,"ch32"),Li.ch32=a;function n(c,d,y){return c&d^c&y^d&y}i(n,"maj32"),Li.maj32=n;function s(c,d,y){return c^d^y}i(s,"p32"),Li.p32=s;function o(c){return t(c,2)^t(c,13)^t(c,22)}i(o,"s0_256"),Li.s0_256=o;function h(c){return t(c,6)^t(c,11)^t(c,25)}i(h,"s1_256"),Li.s1_256=h;function m(c){return t(c,7)^t(c,18)^c>>>3}i(m,"g0_256"),Li.g0_256=m;function v(c){return t(c,17)^t(c,19)^c>>>10}return i(v,"g1_256"),Li.g1_256=v,Li}i(G7,"requireCommon");var pp,E6;function jD(){if(E6)return pp;E6=1;var e=Yi(),t=ol(),r=G7(),a=e.rotl32,n=e.sum32,s=e.sum32_5,o=r.ft_1,h=t.BlockHash,m=[1518500249,1859775393,2400959708,3395469782];function v(){if(!(this instanceof v))return new v;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return i(v,"SHA1"),e.inherits(v,h),pp=v,v.blockSize=512,v.outSize=160,v.hmacStrength=80,v.padLength=64,v.prototype._update=i(function(d,y){for(var b=this.W,x=0;x<16;x++)b[x]=d[y+x];for(;x<b.length;x++)b[x]=a(b[x-3]^b[x-8]^b[x-14]^b[x-16],1);var k=this.h[0],N=this.h[1],C=this.h[2],O=this.h[3],R=this.h[4];for(x=0;x<b.length;x++){var T=~~(x/20),P=s(a(k,5),o(T,N,C,O),R,b[x],m[T]);R=O,O=C,C=a(N,30),N=k,k=P}this.h[0]=n(this.h[0],k),this.h[1]=n(this.h[1],N),this.h[2]=n(this.h[2],C),this.h[3]=n(this.h[3],O),this.h[4]=n(this.h[4],R)},"_update"),v.prototype._digest=i(function(d){return d==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")},"digest"),pp}i(jD,"require_1");var mp,k6;function J7(){if(k6)return mp;k6=1;var e=Yi(),t=ol(),r=G7(),a=di(),n=e.sum32,s=e.sum32_4,o=e.sum32_5,h=r.ch32,m=r.maj32,v=r.s0_256,c=r.s1_256,d=r.g0_256,y=r.g1_256,b=t.BlockHash,x=[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 k(){if(!(this instanceof k))return new k;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=x,this.W=new Array(64)}return i(k,"SHA256"),e.inherits(k,b),mp=k,k.blockSize=512,k.outSize=256,k.hmacStrength=192,k.padLength=64,k.prototype._update=i(function(C,O){for(var R=this.W,T=0;T<16;T++)R[T]=C[O+T];for(;T<R.length;T++)R[T]=s(y(R[T-2]),R[T-7],d(R[T-15]),R[T-16]);var P=this.h[0],B=this.h[1],Z=this.h[2],H=this.h[3],ee=this.h[4],$=this.h[5],F=this.h[6],u=this.h[7];for(a(this.k.length===R.length),T=0;T<R.length;T++){var p=o(u,c(ee),h(ee,$,F),this.k[T],R[T]),l=n(v(P),m(P,B,Z));u=F,F=$,$=ee,ee=n(H,p),H=Z,Z=B,B=P,P=n(p,l)}this.h[0]=n(this.h[0],P),this.h[1]=n(this.h[1],B),this.h[2]=n(this.h[2],Z),this.h[3]=n(this.h[3],H),this.h[4]=n(this.h[4],ee),this.h[5]=n(this.h[5],$),this.h[6]=n(this.h[6],F),this.h[7]=n(this.h[7],u)},"_update"),k.prototype._digest=i(function(C){return C==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")},"digest"),mp}i(J7,"require_256");var gp,A6;function ND(){if(A6)return gp;A6=1;var e=Yi(),t=J7();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return i(r,"SHA224"),e.inherits(r,t),gp=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=i(function(n){return n==="hex"?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},"digest"),gp}i(ND,"require_224");var vp,j6;function K7(){if(j6)return vp;j6=1;var e=Yi(),t=ol(),r=di(),a=e.rotr64_hi,n=e.rotr64_lo,s=e.shr64_hi,o=e.shr64_lo,h=e.sum64,m=e.sum64_hi,v=e.sum64_lo,c=e.sum64_4_hi,d=e.sum64_4_lo,y=e.sum64_5_hi,b=e.sum64_5_lo,x=t.BlockHash,k=[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 N(){if(!(this instanceof N))return new N;x.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=k,this.W=new Array(160)}i(N,"SHA512"),e.inherits(N,x),vp=N,N.blockSize=1024,N.outSize=512,N.hmacStrength=192,N.padLength=128,N.prototype._prepareBlock=i(function(l,g){for(var w=this.W,M=0;M<32;M++)w[M]=l[g+M];for(;M<w.length;M+=2){var A=F(w[M-4],w[M-3]),S=u(w[M-4],w[M-3]),f=w[M-14],_=w[M-13],E=ee(w[M-30],w[M-29]),I=$(w[M-30],w[M-29]),D=w[M-32],L=w[M-31];w[M]=c(A,S,f,_,E,I,D,L),w[M+1]=d(A,S,f,_,E,I,D,L)}},"_prepareBlock"),N.prototype._update=i(function(l,g){this._prepareBlock(l,g);var w=this.W,M=this.h[0],A=this.h[1],S=this.h[2],f=this.h[3],_=this.h[4],E=this.h[5],I=this.h[6],D=this.h[7],L=this.h[8],U=this.h[9],z=this.h[10],V=this.h[11],G=this.h[12],q=this.h[13],_e=this.h[14],ae=this.h[15];r(this.k.length===w.length);for(var se=0;se<w.length;se+=2){var ye=_e,K=ae,re=Z(L,U),X=H(L,U),W=C(L,U,z,V,G),le=O(L,U,z,V,G,q),ke=this.k[se],pe=this.k[se+1],fe=w[se],Q=w[se+1],Y=y(ye,K,re,X,W,le,ke,pe,fe,Q),te=b(ye,K,re,X,W,le,ke,pe,fe,Q);ye=P(M,A),K=B(M,A),re=R(M,A,S,f,_),X=T(M,A,S,f,_,E);var he=m(ye,K,re,X),oe=v(ye,K,re,X);_e=G,ae=q,G=z,q=V,z=L,V=U,L=m(I,D,Y,te),U=v(D,D,Y,te),I=_,D=E,_=S,E=f,S=M,f=A,M=m(Y,te,he,oe),A=v(Y,te,he,oe)}h(this.h,0,M,A),h(this.h,2,S,f),h(this.h,4,_,E),h(this.h,6,I,D),h(this.h,8,L,U),h(this.h,10,z,V),h(this.h,12,G,q),h(this.h,14,_e,ae)},"_update"),N.prototype._digest=i(function(l){return l==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")},"digest");function C(p,l,g,w,M){var A=p&g^~p&M;return A<0&&(A+=4294967296),A}i(C,"ch64_hi");function O(p,l,g,w,M,A){var S=l&w^~l&A;return S<0&&(S+=4294967296),S}i(O,"ch64_lo");function R(p,l,g,w,M){var A=p&g^p&M^g&M;return A<0&&(A+=4294967296),A}i(R,"maj64_hi");function T(p,l,g,w,M,A){var S=l&w^l&A^w&A;return S<0&&(S+=4294967296),S}i(T,"maj64_lo");function P(p,l){var g=a(p,l,28),w=a(l,p,2),M=a(l,p,7),A=g^w^M;return A<0&&(A+=4294967296),A}i(P,"s0_512_hi");function B(p,l){var g=n(p,l,28),w=n(l,p,2),M=n(l,p,7),A=g^w^M;return A<0&&(A+=4294967296),A}i(B,"s0_512_lo");function Z(p,l){var g=a(p,l,14),w=a(p,l,18),M=a(l,p,9),A=g^w^M;return A<0&&(A+=4294967296),A}i(Z,"s1_512_hi");function H(p,l){var g=n(p,l,14),w=n(p,l,18),M=n(l,p,9),A=g^w^M;return A<0&&(A+=4294967296),A}i(H,"s1_512_lo");function ee(p,l){var g=a(p,l,1),w=a(p,l,8),M=s(p,l,7),A=g^w^M;return A<0&&(A+=4294967296),A}i(ee,"g0_512_hi");function $(p,l){var g=n(p,l,1),w=n(p,l,8),M=o(p,l,7),A=g^w^M;return A<0&&(A+=4294967296),A}i($,"g0_512_lo");function F(p,l){var g=a(p,l,19),w=a(l,p,29),M=s(p,l,6),A=g^w^M;return A<0&&(A+=4294967296),A}i(F,"g1_512_hi");function u(p,l){var g=n(p,l,19),w=n(l,p,29),M=o(p,l,6),A=g^w^M;return A<0&&(A+=4294967296),A}return i(u,"g1_512_lo"),vp}i(K7,"require_512");var bp,N6;function ID(){if(N6)return bp;N6=1;var e=Yi(),t=K7();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return i(r,"SHA384"),e.inherits(r,t),bp=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=i(function(n){return n==="hex"?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},"digest"),bp}i(ID,"require_384");var I6;function CD(){return I6||(I6=1,ea.sha1=jD(),ea.sha224=ND(),ea.sha256=J7(),ea.sha384=ID(),ea.sha512=K7()),ea}i(CD,"requireSha");var yp={},C6;function OD(){if(C6)return yp;C6=1;var e=Yi(),t=ol(),r=e.rotl32,a=e.sum32,n=e.sum32_3,s=e.sum32_4,o=t.BlockHash;function h(){if(!(this instanceof h))return new h;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}i(h,"RIPEMD160"),e.inherits(h,o),yp.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=i(function(N,C){for(var O=this.h[0],R=this.h[1],T=this.h[2],P=this.h[3],B=this.h[4],Z=O,H=R,ee=T,$=P,F=B,u=0;u<80;u++){var p=a(r(s(O,m(u,R,T,P),N[d[u]+C],v(u)),b[u]),B);O=B,B=P,P=r(T,10),T=R,R=p,p=a(r(s(Z,m(79-u,H,ee,$),N[y[u]+C],c(u)),x[u]),F),Z=F,F=$,$=r(ee,10),ee=H,H=p}p=n(this.h[1],T,$),this.h[1]=n(this.h[2],P,F),this.h[2]=n(this.h[3],B,Z),this.h[3]=n(this.h[4],O,H),this.h[4]=n(this.h[0],R,ee),this.h[0]=p},"update"),h.prototype._digest=i(function(N){return N==="hex"?e.toHex32(this.h,"little"):e.split32(this.h,"little")},"digest");function m(k,N,C,O){return k<=15?N^C^O:k<=31?N&C|~N&O:k<=47?(N|~C)^O:k<=63?N&O|C&~O:N^(C|~O)}i(m,"f");function v(k){return k<=15?0:k<=31?1518500249:k<=47?1859775393:k<=63?2400959708:2840853838}i(v,"K");function c(k){return k<=15?1352829926:k<=31?1548603684:k<=47?1836072691:k<=63?2053994217:0}i(c,"Kh");var d=[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],y=[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],b=[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],x=[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];return yp}i(OD,"requireRipemd");var wp,O6;function RD(){if(O6)return wp;O6=1;var e=Yi(),t=di();function r(a,n,s){if(!(this instanceof r))return new r(a,n,s);this.Hash=a,this.blockSize=a.blockSize/8,this.outSize=a.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(n,s))}return i(r,"Hmac"),wp=r,r.prototype._init=i(function(n){n.length>this.blockSize&&(n=new this.Hash().update(n).digest()),t(n.length<=this.blockSize);for(var s=n.length;s<this.blockSize;s++)n.push(0);for(s=0;s<n.length;s++)n[s]^=54;for(this.inner=new this.Hash().update(n),s=0;s<n.length;s++)n[s]^=106;this.outer=new this.Hash().update(n)},"init"),r.prototype.update=i(function(n,s){return this.inner.update(n,s),this},"update"),r.prototype.digest=i(function(n){return this.outer.update(this.inner.digest()),this.outer.digest(n)},"digest"),wp}i(RD,"requireHmac");var R6;function Rv(){return R6||(R6=1,(function(e){var t=e;t.utils=Yi(),t.common=ol(),t.sha=CD(),t.ripemd=OD(),t.hmac=RD(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160})(dp)),dp}i(Rv,"requireHash");var xp,T6;function TD(){return T6||(T6=1,xp={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),xp}i(TD,"requireSecp256k1");var P6;function Tv(){return P6||(P6=1,(function(e){var t=e,r=Rv(),a=H7(),n=hi(),s=n.assert;function o(v){v.type==="short"?this.curve=new a.short(v):v.type==="edwards"?this.curve=new a.edwards(v):this.curve=new a.mont(v),this.g=this.curve.g,this.n=this.curve.n,this.hash=v.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i(o,"PresetCurve"),t.PresetCurve=o;function h(v,c){Object.defineProperty(t,v,{configurable:!0,enumerable:!0,get:i(function(){var d=new o(c);return Object.defineProperty(t,v,{configurable:!0,enumerable:!0,value:d}),d},"get")})}i(h,"defineCurve"),h("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:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("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:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("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:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("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:r.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"]}),h("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:r.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"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),h("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:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var m;try{m=TD()}catch{m=void 0}h("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:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",m]})})(cp)),cp}i(Tv,"requireCurves");var _p,D6;function PD(){if(D6)return _p;D6=1;var e=Rv(),t=Z7(),r=di();function a(n){if(!(this instanceof a))return new a(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 s=t.toArray(n.entropy,n.entropyEnc||"hex"),o=t.toArray(n.nonce,n.nonceEnc||"hex"),h=t.toArray(n.pers,n.persEnc||"hex");r(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,o,h)}return i(a,"HmacDRBG"),_p=a,a.prototype._init=i(function(s,o,h){var m=s.concat(o).concat(h);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var v=0;v<this.V.length;v++)this.K[v]=0,this.V[v]=1;this._update(m),this._reseed=1,this.reseedInterval=281474976710656},"init"),a.prototype._hmac=i(function(){return new e.hmac(this.hash,this.K)},"hmac"),a.prototype._update=i(function(s){var o=this._hmac().update(this.V).update([0]);s&&(o=o.update(s)),this.K=o.digest(),this.V=this._hmac().update(this.V).digest(),s&&(this.K=this._hmac().update(this.V).update([1]).update(s).digest(),this.V=this._hmac().update(this.V).digest())},"update"),a.prototype.reseed=i(function(s,o,h,m){typeof o!="string"&&(m=h,h=o,o=null),s=t.toArray(s,o),h=t.toArray(h,m),r(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(s.concat(h||[])),this._reseed=1},"reseed"),a.prototype.generate=i(function(s,o,h,m){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof o!="string"&&(m=h,h=o,o=null),h&&(h=t.toArray(h,m||"hex"),this._update(h));for(var v=[];v.length<s;)this.V=this._hmac().update(this.V).digest(),v=v.concat(this.V);var c=v.slice(0,s);return this._update(h),this._reseed++,t.encode(c,o)},"generate"),_p}i(PD,"requireHmacDrbg");var Sp,L6;function DD(){if(L6)return Sp;L6=1;var e=Ir(),t=hi(),r=t.assert;function a(n,s){this.ec=n,this.priv=null,this.pub=null,s.priv&&this._importPrivate(s.priv,s.privEnc),s.pub&&this._importPublic(s.pub,s.pubEnc)}return i(a,"KeyPair"),Sp=a,a.fromPublic=i(function(s,o,h){return o instanceof a?o:new a(s,{pub:o,pubEnc:h})},"fromPublic"),a.fromPrivate=i(function(s,o,h){return o instanceof a?o:new a(s,{priv:o,privEnc:h})},"fromPrivate"),a.prototype.validate=i(function(){var s=this.getPublic();return s.isInfinity()?{result:!1,reason:"Invalid public key"}:s.validate()?s.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},"validate"),a.prototype.getPublic=i(function(s,o){return typeof s=="string"&&(o=s,s=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),o?this.pub.encode(o,s):this.pub},"getPublic"),a.prototype.getPrivate=i(function(s){return s==="hex"?this.priv.toString(16,2):this.priv},"getPrivate"),a.prototype._importPrivate=i(function(s,o){this.priv=new e(s,o||16),this.priv=this.priv.umod(this.ec.curve.n)},"_importPrivate"),a.prototype._importPublic=i(function(s,o){if(s.x||s.y){this.ec.curve.type==="mont"?r(s.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&r(s.x&&s.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(s.x,s.y);return}this.pub=this.ec.curve.decodePoint(s,o)},"_importPublic"),a.prototype.derive=i(function(s){return s.validate()||r(s.validate(),"public point not validated"),s.mul(this.priv).getX()},"derive"),a.prototype.sign=i(function(s,o,h){return this.ec.sign(s,this,o,h)},"sign"),a.prototype.verify=i(function(s,o,h){return this.ec.verify(s,o,this,void 0,h)},"verify"),a.prototype.inspect=i(function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},"inspect"),Sp}i(DD,"requireKey$1");var Mp,B6;function LD(){if(B6)return Mp;B6=1;var e=Ir(),t=hi(),r=t.assert;function a(m,v){if(m instanceof a)return m;this._importDER(m,v)||(r(m.r&&m.s,"Signature without r or s"),this.r=new e(m.r,16),this.s=new e(m.s,16),m.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=m.recoveryParam)}i(a,"Signature"),Mp=a;function n(){this.place=0}i(n,"Position");function s(m,v){var c=m[v.place++];if(!(c&128))return c;var d=c&15;if(d===0||d>4||m[v.place]===0)return!1;for(var y=0,b=0,x=v.place;b<d;b++,x++)y<<=8,y|=m[x],y>>>=0;return y<=127?!1:(v.place=x,y)}i(s,"getLength");function o(m){for(var v=0,c=m.length-1;!m[v]&&!(m[v+1]&128)&&v<c;)v++;return v===0?m:m.slice(v)}i(o,"rmPadding"),a.prototype._importDER=i(function(v,c){v=t.toArray(v,c);var d=new n;if(v[d.place++]!==48)return!1;var y=s(v,d);if(y===!1||y+d.place!==v.length||v[d.place++]!==2)return!1;var b=s(v,d);if(b===!1||(v[d.place]&128)!==0)return!1;var x=v.slice(d.place,b+d.place);if(d.place+=b,v[d.place++]!==2)return!1;var k=s(v,d);if(k===!1||v.length!==k+d.place||(v[d.place]&128)!==0)return!1;var N=v.slice(d.place,k+d.place);if(x[0]===0)if(x[1]&128)x=x.slice(1);else return!1;if(N[0]===0)if(N[1]&128)N=N.slice(1);else return!1;return this.r=new e(x),this.s=new e(N),this.recoveryParam=null,!0},"_importDER");function h(m,v){if(v<128){m.push(v);return}var c=1+(Math.log(v)/Math.LN2>>>3);for(m.push(c|128);--c;)m.push(v>>>(c<<3)&255);m.push(v)}return i(h,"constructLength"),a.prototype.toDER=i(function(v){var c=this.r.toArray(),d=this.s.toArray();for(c[0]&128&&(c=[0].concat(c)),d[0]&128&&(d=[0].concat(d)),c=o(c),d=o(d);!d[0]&&!(d[1]&128);)d=d.slice(1);var y=[2];h(y,c.length),y=y.concat(c),y.push(2),h(y,d.length);var b=y.concat(d),x=[48];return h(x,b.length),x=x.concat(b),t.encode(x,v)},"toDER"),Mp}i(LD,"requireSignature$1");var Ep,z6;function BD(){if(z6)return Ep;z6=1;var e=Ir(),t=PD(),r=hi(),a=Tv(),n=Cv(),s=r.assert,o=DD(),h=LD();function m(v){if(!(this instanceof m))return new m(v);typeof v=="string"&&(s(Object.prototype.hasOwnProperty.call(a,v),"Unknown curve "+v),v=a[v]),v instanceof a.PresetCurve&&(v={curve:v}),this.curve=v.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=v.curve.g,this.g.precompute(v.curve.n.bitLength()+1),this.hash=v.hash||v.curve.hash}return i(m,"EC"),Ep=m,m.prototype.keyPair=i(function(c){return new o(this,c)},"keyPair"),m.prototype.keyFromPrivate=i(function(c,d){return o.fromPrivate(this,c,d)},"keyFromPrivate"),m.prototype.keyFromPublic=i(function(c,d){return o.fromPublic(this,c,d)},"keyFromPublic"),m.prototype.genKeyPair=i(function(c){c||(c={});for(var d=new t({hash:this.hash,pers:c.pers,persEnc:c.persEnc||"utf8",entropy:c.entropy||n(this.hash.hmacStrength),entropyEnc:c.entropy&&c.entropyEnc||"utf8",nonce:this.n.toArray()}),y=this.n.byteLength(),b=this.n.sub(new e(2));;){var x=new e(d.generate(y));if(!(x.cmp(b)>0))return x.iaddn(1),this.keyFromPrivate(x)}},"genKeyPair"),m.prototype._truncateToN=i(function(c,d,y){var b;if(e.isBN(c)||typeof c=="number")c=new e(c,16),b=c.byteLength();else if(typeof c=="object")b=c.length,c=new e(c,16);else{var x=c.toString();b=x.length+1>>>1,c=new e(x,16)}typeof y!="number"&&(y=b*8);var k=y-this.n.bitLength();return k>0&&(c=c.ushrn(k)),!d&&c.cmp(this.n)>=0?c.sub(this.n):c},"_truncateToN"),m.prototype.sign=i(function(c,d,y,b){if(typeof y=="object"&&(b=y,y=null),b||(b={}),typeof c!="string"&&typeof c!="number"&&!e.isBN(c)){s(typeof c=="object"&&c&&typeof c.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),s(c.length>>>0===c.length);for(var x=0;x<c.length;x++)s((c[x]&255)===c[x])}d=this.keyFromPrivate(d,y),c=this._truncateToN(c,!1,b.msgBitLength),s(!c.isNeg(),"Can not sign a negative message");var k=this.n.byteLength(),N=d.getPrivate().toArray("be",k),C=c.toArray("be",k);s(new e(C).eq(c),"Can not sign message");for(var O=new t({hash:this.hash,entropy:N,nonce:C,pers:b.pers,persEnc:b.persEnc||"utf8"}),R=this.n.sub(new e(1)),T=0;;T++){var P=b.k?b.k(T):new e(O.generate(this.n.byteLength()));if(P=this._truncateToN(P,!0),!(P.cmpn(1)<=0||P.cmp(R)>=0)){var B=this.g.mul(P);if(!B.isInfinity()){var Z=B.getX(),H=Z.umod(this.n);if(H.cmpn(0)!==0){var ee=P.invm(this.n).mul(H.mul(d.getPrivate()).iadd(c));if(ee=ee.umod(this.n),ee.cmpn(0)!==0){var $=(B.getY().isOdd()?1:0)|(Z.cmp(H)!==0?2:0);return b.canonical&&ee.cmp(this.nh)>0&&(ee=this.n.sub(ee),$^=1),new h({r:H,s:ee,recoveryParam:$})}}}}}},"sign"),m.prototype.verify=i(function(c,d,y,b,x){x||(x={}),c=this._truncateToN(c,!1,x.msgBitLength),y=this.keyFromPublic(y,b),d=new h(d,"hex");var k=d.r,N=d.s;if(k.cmpn(1)<0||k.cmp(this.n)>=0||N.cmpn(1)<0||N.cmp(this.n)>=0)return!1;var C=N.invm(this.n),O=C.mul(c).umod(this.n),R=C.mul(k).umod(this.n),T;return this.curve._maxwellTrick?(T=this.g.jmulAdd(O,y.getPublic(),R),T.isInfinity()?!1:T.eqXToP(k)):(T=this.g.mulAdd(O,y.getPublic(),R),T.isInfinity()?!1:T.getX().umod(this.n).cmp(k)===0)},"verify"),m.prototype.recoverPubKey=function(v,c,d,y){s((3&d)===d,"The recovery param is more than two bits"),c=new h(c,y);var b=this.n,x=new e(v),k=c.r,N=c.s,C=d&1,O=d>>1;if(k.cmp(this.curve.p.umod(this.curve.n))>=0&&O)throw new Error("Unable to find sencond key candinate");O?k=this.curve.pointFromX(k.add(this.curve.n),C):k=this.curve.pointFromX(k,C);var R=c.r.invm(b),T=b.sub(x).mul(R).umod(b),P=N.mul(R).umod(b);return this.g.mulAdd(T,k,P)},m.prototype.getKeyRecoveryParam=function(v,c,d,y){if(c=new h(c,y),c.recoveryParam!==null)return c.recoveryParam;for(var b=0;b<4;b++){var x;try{x=this.recoverPubKey(v,c,b)}catch{continue}if(x.eq(d))return b}throw new Error("Unable to find valid recovery factor")},Ep}i(BD,"requireEc");var kp,U6;function zD(){if(U6)return kp;U6=1;var e=hi(),t=e.assert,r=e.parseBytes,a=e.cachedProperty;function n(s,o){this.eddsa=s,this._secret=r(o.secret),s.isPoint(o.pub)?this._pub=o.pub:this._pubBytes=r(o.pub)}return i(n,"KeyPair"),n.fromPublic=i(function(o,h){return h instanceof n?h:new n(o,{pub:h})},"fromPublic"),n.fromSecret=i(function(o,h){return h instanceof n?h:new n(o,{secret:h})},"fromSecret"),n.prototype.secret=i(function(){return this._secret},"secret"),a(n,"pubBytes",i(function(){return this.eddsa.encodePoint(this.pub())},"pubBytes")),a(n,"pub",i(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())},"pub")),a(n,"privBytes",i(function(){var o=this.eddsa,h=this.hash(),m=o.encodingLength-1,v=h.slice(0,o.encodingLength);return v[0]&=248,v[m]&=127,v[m]|=64,v},"privBytes")),a(n,"priv",i(function(){return this.eddsa.decodeInt(this.privBytes())},"priv")),a(n,"hash",i(function(){return this.eddsa.hash().update(this.secret()).digest()},"hash")),a(n,"messagePrefix",i(function(){return this.hash().slice(this.eddsa.encodingLength)},"messagePrefix")),n.prototype.sign=i(function(o){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(o,this)},"sign"),n.prototype.verify=i(function(o,h){return this.eddsa.verify(o,h,this)},"verify"),n.prototype.getSecret=i(function(o){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),o)},"getSecret"),n.prototype.getPublic=i(function(o){return e.encode(this.pubBytes(),o)},"getPublic"),kp=n,kp}i(zD,"requireKey");var Ap,F6;function UD(){if(F6)return Ap;F6=1;var e=Ir(),t=hi(),r=t.assert,a=t.cachedProperty,n=t.parseBytes;function s(o,h){this.eddsa=o,typeof h!="object"&&(h=n(h)),Array.isArray(h)&&(r(h.length===o.encodingLength*2,"Signature has invalid size"),h={R:h.slice(0,o.encodingLength),S:h.slice(o.encodingLength)}),r(h.R&&h.S,"Signature without R or S"),o.isPoint(h.R)&&(this._R=h.R),h.S instanceof e&&(this._S=h.S),this._Rencoded=Array.isArray(h.R)?h.R:h.Rencoded,this._Sencoded=Array.isArray(h.S)?h.S:h.Sencoded}return i(s,"Signature"),a(s,"S",i(function(){return this.eddsa.decodeInt(this.Sencoded())},"S")),a(s,"R",i(function(){return this.eddsa.decodePoint(this.Rencoded())},"R")),a(s,"Rencoded",i(function(){return this.eddsa.encodePoint(this.R())},"Rencoded")),a(s,"Sencoded",i(function(){return this.eddsa.encodeInt(this.S())},"Sencoded")),s.prototype.toBytes=i(function(){return this.Rencoded().concat(this.Sencoded())},"toBytes"),s.prototype.toHex=i(function(){return t.encode(this.toBytes(),"hex").toUpperCase()},"toHex"),Ap=s,Ap}i(UD,"requireSignature");var jp,$6;function FD(){if($6)return jp;$6=1;var e=Rv(),t=Tv(),r=hi(),a=r.assert,n=r.parseBytes,s=zD(),o=UD();function h(m){if(a(m==="ed25519","only tested with ed25519 so far"),!(this instanceof h))return new h(m);m=t[m].curve,this.curve=m,this.g=m.g,this.g.precompute(m.n.bitLength()+1),this.pointClass=m.point().constructor,this.encodingLength=Math.ceil(m.n.bitLength()/8),this.hash=e.sha512}return i(h,"EDDSA"),jp=h,h.prototype.sign=i(function(v,c){v=n(v);var d=this.keyFromSecret(c),y=this.hashInt(d.messagePrefix(),v),b=this.g.mul(y),x=this.encodePoint(b),k=this.hashInt(x,d.pubBytes(),v).mul(d.priv()),N=y.add(k).umod(this.curve.n);return this.makeSignature({R:b,S:N,Rencoded:x})},"sign"),h.prototype.verify=i(function(v,c,d){if(v=n(v),c=this.makeSignature(c),c.S().gte(c.eddsa.curve.n)||c.S().isNeg())return!1;var y=this.keyFromPublic(d),b=this.hashInt(c.Rencoded(),y.pubBytes(),v),x=this.g.mul(c.S()),k=c.R().add(y.pub().mul(b));return k.eq(x)},"verify"),h.prototype.hashInt=i(function(){for(var v=this.hash(),c=0;c<arguments.length;c++)v.update(arguments[c]);return r.intFromLE(v.digest()).umod(this.curve.n)},"hashInt"),h.prototype.keyFromPublic=i(function(v){return s.fromPublic(this,v)},"keyFromPublic"),h.prototype.keyFromSecret=i(function(v){return s.fromSecret(this,v)},"keyFromSecret"),h.prototype.makeSignature=i(function(v){return v instanceof o?v:new o(this,v)},"makeSignature"),h.prototype.encodePoint=i(function(v){var c=v.getY().toArray("le",this.encodingLength);return c[this.encodingLength-1]|=v.getX().isOdd()?128:0,c},"encodePoint"),h.prototype.decodePoint=i(function(v){v=r.parseBytes(v);var c=v.length-1,d=v.slice(0,c).concat(v[c]&-129),y=(v[c]&128)!==0,b=r.intFromLE(d);return this.curve.pointFromY(b,y)},"decodePoint"),h.prototype.encodeInt=i(function(v){return v.toArray("le",this.encodingLength)},"encodeInt"),h.prototype.decodeInt=i(function(v){return r.intFromLE(v)},"decodeInt"),h.prototype.isPoint=i(function(v){return v instanceof this.pointClass},"isPoint"),jp}i(FD,"requireEddsa");var V6;function Pv(){return V6||(V6=1,(function(e){var t=e;t.version=MD.version,t.utils=hi(),t.rand=Cv(),t.curve=H7(),t.curves=Tv(),t.ec=BD(),t.eddsa=FD()})(ip)),ip}i(Pv,"requireElliptic");var Iu={exports:{}},$D=Iu.exports,Z6;function q7(){return Z6||(Z6=1,(function(e){(function(t,r){function a(p,l){if(!p)throw new Error(l||"Assertion failed")}i(a,"assert");function n(p,l){p.super_=l;var g=i(function(){},"TempCtor");g.prototype=l.prototype,p.prototype=new g,p.prototype.constructor=p}i(n,"inherits");function s(p,l,g){if(s.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((l==="le"||l==="be")&&(g=l,l=10),this._init(p||0,l||10,g||"be"))}i(s,"BN"),typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=ji.Buffer}catch{}s.isBN=i(function(l){return l instanceof s?!0:l!==null&&typeof l=="object"&&l.constructor.wordSize===s.wordSize&&Array.isArray(l.words)},"isBN"),s.max=i(function(l,g){return l.cmp(g)>0?l:g},"max"),s.min=i(function(l,g){return l.cmp(g)<0?l:g},"min"),s.prototype._init=i(function(l,g,w){if(typeof l=="number")return this._initNumber(l,g,w);if(typeof l=="object")return this._initArray(l,g,w);g==="hex"&&(g=16),a(g===(g|0)&&g>=2&&g<=36),l=l.toString().replace(/\s+/g,"");var M=0;l[0]==="-"&&(M++,this.negative=1),M<l.length&&(g===16?this._parseHex(l,M,w):(this._parseBase(l,g,M),w==="le"&&this._initArray(this.toArray(),g,w)))},"init"),s.prototype._initNumber=i(function(l,g,w){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(a(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),g,w)},"_initNumber"),s.prototype._initArray=i(function(l,g,w){if(a(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A,S,f=0;if(w==="be")for(M=l.length-1,A=0;M>=0;M-=3)S=l[M]|l[M-1]<<8|l[M-2]<<16,this.words[A]|=S<<f&67108863,this.words[A+1]=S>>>26-f&67108863,f+=24,f>=26&&(f-=26,A++);else if(w==="le")for(M=0,A=0;M<l.length;M+=3)S=l[M]|l[M+1]<<8|l[M+2]<<16,this.words[A]|=S<<f&67108863,this.words[A+1]=S>>>26-f&67108863,f+=24,f>=26&&(f-=26,A++);return this._strip()},"_initArray");function h(p,l){var g=p.charCodeAt(l);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;a(!1,"Invalid character in "+p)}i(h,"parseHex4Bits");function m(p,l,g){var w=h(p,g);return g-1>=l&&(w|=h(p,g-1)<<4),w}i(m,"parseHexByte"),s.prototype._parseHex=i(function(l,g,w){this.length=Math.ceil((l.length-g)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A=0,S=0,f;if(w==="be")for(M=l.length-1;M>=g;M-=2)f=m(l,g,M)<<A,this.words[S]|=f&67108863,A>=18?(A-=18,S+=1,this.words[S]|=f>>>26):A+=8;else{var _=l.length-g;for(M=_%2===0?g+1:g;M<l.length;M+=2)f=m(l,g,M)<<A,this.words[S]|=f&67108863,A>=18?(A-=18,S+=1,this.words[S]|=f>>>26):A+=8}this._strip()},"_parseHex");function v(p,l,g,w){for(var M=0,A=0,S=Math.min(p.length,g),f=l;f<S;f++){var _=p.charCodeAt(f)-48;M*=w,_>=49?A=_-49+10:_>=17?A=_-17+10:A=_,a(_>=0&&A<w,"Invalid character"),M+=A}return M}i(v,"parseBase"),s.prototype._parseBase=i(function(l,g,w){this.words=[0],this.length=1;for(var M=0,A=1;A<=67108863;A*=g)M++;M--,A=A/g|0;for(var S=l.length-w,f=S%M,_=Math.min(S,S-f)+w,E=0,I=w;I<_;I+=M)E=v(l,I,I+M,g),this.imuln(A),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(f!==0){var D=1;for(E=v(l,I,l.length,g),I=0;I<f;I++)D*=g;this.imuln(D),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},"_parseBase"),s.prototype.copy=i(function(l){l.words=new Array(this.length);for(var g=0;g<this.length;g++)l.words[g]=this.words[g];l.length=this.length,l.negative=this.negative,l.red=this.red},"copy");function c(p,l){p.words=l.words,p.length=l.length,p.negative=l.negative,p.red=l.red}if(i(c,"move"),s.prototype._move=i(function(l){c(l,this)},"_move"),s.prototype.clone=i(function(){var l=new s(null);return this.copy(l),l},"clone"),s.prototype._expand=i(function(l){for(;this.length<l;)this.words[this.length++]=0;return this},"_expand"),s.prototype._strip=i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),s.prototype._normSign=i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}i(d,"inspect");var y=["","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"],b=[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],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=i(function(l,g){l=l||10,g=g|0||1;var w;if(l===16||l==="hex"){w="";for(var M=0,A=0,S=0;S<this.length;S++){var f=this.words[S],_=((f<<M|A)&16777215).toString(16);A=f>>>24-M&16777215,M+=2,M>=26&&(M-=26,S--),A!==0||S!==this.length-1?w=y[6-_.length]+_+w:w=_+w}for(A!==0&&(w=A.toString(16)+w);w.length%g!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(l===(l|0)&&l>=2&&l<=36){var E=b[l],I=x[l];w="";var D=this.clone();for(D.negative=0;!D.isZero();){var L=D.modrn(I).toString(l);D=D.idivn(I),D.isZero()?w=L+w:w=y[E-L.length]+L+w}for(this.isZero()&&(w="0"+w);w.length%g!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}a(!1,"Base should be between 2 and 36")},"toString"),s.prototype.toNumber=i(function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},"toNumber"),s.prototype.toJSON=i(function(){return this.toString(16,2)},"toJSON"),o&&(s.prototype.toBuffer=i(function(l,g){return this.toArrayLike(o,l,g)},"toBuffer")),s.prototype.toArray=i(function(l,g){return this.toArrayLike(Array,l,g)},"toArray");var k=i(function(l,g){return l.allocUnsafe?l.allocUnsafe(g):new l(g)},"allocate");s.prototype.toArrayLike=i(function(l,g,w){this._strip();var M=this.byteLength(),A=w||Math.max(1,M);a(M<=A,"byte array longer than desired length"),a(A>0,"Requested array length <= 0");var S=k(l,A),f=g==="le"?"LE":"BE";return this["_toArrayLike"+f](S,M),S},"toArrayLike"),s.prototype._toArrayLikeLE=i(function(l,g){for(var w=0,M=0,A=0,S=0;A<this.length;A++){var f=this.words[A]<<S|M;l[w++]=f&255,w<l.length&&(l[w++]=f>>8&255),w<l.length&&(l[w++]=f>>16&255),S===6?(w<l.length&&(l[w++]=f>>24&255),M=0,S=0):(M=f>>>24,S+=2)}if(w<l.length)for(l[w++]=M;w<l.length;)l[w++]=0},"_toArrayLikeLE"),s.prototype._toArrayLikeBE=i(function(l,g){for(var w=l.length-1,M=0,A=0,S=0;A<this.length;A++){var f=this.words[A]<<S|M;l[w--]=f&255,w>=0&&(l[w--]=f>>8&255),w>=0&&(l[w--]=f>>16&255),S===6?(w>=0&&(l[w--]=f>>24&255),M=0,S=0):(M=f>>>24,S+=2)}if(w>=0)for(l[w--]=M;w>=0;)l[w--]=0},"_toArrayLikeBE"),Math.clz32?s.prototype._countBits=i(function(l){return 32-Math.clz32(l)},"_countBits"):s.prototype._countBits=i(function(l){var g=l,w=0;return g>=4096&&(w+=13,g>>>=13),g>=64&&(w+=7,g>>>=7),g>=8&&(w+=4,g>>>=4),g>=2&&(w+=2,g>>>=2),w+g},"_countBits"),s.prototype._zeroBits=i(function(l){if(l===0)return 26;var g=l,w=0;return(g&8191)===0&&(w+=13,g>>>=13),(g&127)===0&&(w+=7,g>>>=7),(g&15)===0&&(w+=4,g>>>=4),(g&3)===0&&(w+=2,g>>>=2),(g&1)===0&&w++,w},"_zeroBits"),s.prototype.bitLength=i(function(){var l=this.words[this.length-1],g=this._countBits(l);return(this.length-1)*26+g},"bitLength");function N(p){for(var l=new Array(p.bitLength()),g=0;g<l.length;g++){var w=g/26|0,M=g%26;l[g]=p.words[w]>>>M&1}return l}i(N,"toBitArray"),s.prototype.zeroBits=i(function(){if(this.isZero())return 0;for(var l=0,g=0;g<this.length;g++){var w=this._zeroBits(this.words[g]);if(l+=w,w!==26)break}return l},"zeroBits"),s.prototype.byteLength=i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),s.prototype.toTwos=i(function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},"toTwos"),s.prototype.fromTwos=i(function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},"fromTwos"),s.prototype.isNeg=i(function(){return this.negative!==0},"isNeg"),s.prototype.neg=i(function(){return this.clone().ineg()},"neg"),s.prototype.ineg=i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),s.prototype.iuor=i(function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var g=0;g<l.length;g++)this.words[g]=this.words[g]|l.words[g];return this._strip()},"iuor"),s.prototype.ior=i(function(l){return a((this.negative|l.negative)===0),this.iuor(l)},"ior"),s.prototype.or=i(function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},"or"),s.prototype.uor=i(function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},"uor"),s.prototype.iuand=i(function(l){var g;this.length>l.length?g=l:g=this;for(var w=0;w<g.length;w++)this.words[w]=this.words[w]&l.words[w];return this.length=g.length,this._strip()},"iuand"),s.prototype.iand=i(function(l){return a((this.negative|l.negative)===0),this.iuand(l)},"iand"),s.prototype.and=i(function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},"and"),s.prototype.uand=i(function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},"uand"),s.prototype.iuxor=i(function(l){var g,w;this.length>l.length?(g=this,w=l):(g=l,w=this);for(var M=0;M<w.length;M++)this.words[M]=g.words[M]^w.words[M];if(this!==g)for(;M<g.length;M++)this.words[M]=g.words[M];return this.length=g.length,this._strip()},"iuxor"),s.prototype.ixor=i(function(l){return a((this.negative|l.negative)===0),this.iuxor(l)},"ixor"),s.prototype.xor=i(function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},"xor"),s.prototype.uxor=i(function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},"uxor"),s.prototype.inotn=i(function(l){a(typeof l=="number"&&l>=0);var g=Math.ceil(l/26)|0,w=l%26;this._expand(g),w>0&&g--;for(var M=0;M<g;M++)this.words[M]=~this.words[M]&67108863;return w>0&&(this.words[M]=~this.words[M]&67108863>>26-w),this._strip()},"inotn"),s.prototype.notn=i(function(l){return this.clone().inotn(l)},"notn"),s.prototype.setn=i(function(l,g){a(typeof l=="number"&&l>=0);var w=l/26|0,M=l%26;return this._expand(w+1),g?this.words[w]=this.words[w]|1<<M:this.words[w]=this.words[w]&~(1<<M),this._strip()},"setn"),s.prototype.iadd=i(function(l){var g;if(this.negative!==0&&l.negative===0)return this.negative=0,g=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,g=this.isub(l),l.negative=1,g._normSign();var w,M;this.length>l.length?(w=this,M=l):(w=l,M=this);for(var A=0,S=0;S<M.length;S++)g=(w.words[S]|0)+(M.words[S]|0)+A,this.words[S]=g&67108863,A=g>>>26;for(;A!==0&&S<w.length;S++)g=(w.words[S]|0)+A,this.words[S]=g&67108863,A=g>>>26;if(this.length=w.length,A!==0)this.words[this.length]=A,this.length++;else if(w!==this)for(;S<w.length;S++)this.words[S]=w.words[S];return this},"iadd"),s.prototype.add=i(function(l){var g;return l.negative!==0&&this.negative===0?(l.negative=0,g=this.sub(l),l.negative^=1,g):l.negative===0&&this.negative!==0?(this.negative=0,g=l.sub(this),this.negative=1,g):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},"add"),s.prototype.isub=i(function(l){if(l.negative!==0){l.negative=0;var g=this.iadd(l);return l.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var w=this.cmp(l);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,A;w>0?(M=this,A=l):(M=l,A=this);for(var S=0,f=0;f<A.length;f++)g=(M.words[f]|0)-(A.words[f]|0)+S,S=g>>26,this.words[f]=g&67108863;for(;S!==0&&f<M.length;f++)g=(M.words[f]|0)+S,S=g>>26,this.words[f]=g&67108863;if(S===0&&f<M.length&&M!==this)for(;f<M.length;f++)this.words[f]=M.words[f];return this.length=Math.max(this.length,f),M!==this&&(this.negative=1),this._strip()},"isub"),s.prototype.sub=i(function(l){return this.clone().isub(l)},"sub");function C(p,l,g){g.negative=l.negative^p.negative;var w=p.length+l.length|0;g.length=w,w=w-1|0;var M=p.words[0]|0,A=l.words[0]|0,S=M*A,f=S&67108863,_=S/67108864|0;g.words[0]=f;for(var E=1;E<w;E++){for(var I=_>>>26,D=_&67108863,L=Math.min(E,l.length-1),U=Math.max(0,E-p.length+1);U<=L;U++){var z=E-U|0;M=p.words[z]|0,A=l.words[U]|0,S=M*A+D,I+=S/67108864|0,D=S&67108863}g.words[E]=D|0,_=I|0}return _!==0?g.words[E]=_|0:g.length--,g._strip()}i(C,"smallMulTo");var O=i(function(l,g,w){var M=l.words,A=g.words,S=w.words,f=0,_,E,I,D=M[0]|0,L=D&8191,U=D>>>13,z=M[1]|0,V=z&8191,G=z>>>13,q=M[2]|0,_e=q&8191,ae=q>>>13,se=M[3]|0,ye=se&8191,K=se>>>13,re=M[4]|0,X=re&8191,W=re>>>13,le=M[5]|0,ke=le&8191,pe=le>>>13,fe=M[6]|0,Q=fe&8191,Y=fe>>>13,te=M[7]|0,he=te&8191,oe=te>>>13,ue=M[8]|0,ze=ue&8191,we=ue>>>13,Be=M[9]|0,We=Be&8191,ve=Be>>>13,Ue=A[0]|0,ce=Ue&8191,be=Ue>>>13,Te=A[1]|0,Oe=Te&8191,Ae=Te>>>13,$e=A[2]|0,Ye=$e&8191,Ne=$e>>>13,Ee=A[3]|0,Pe=Ee&8191,Se=Ee>>>13,He=A[4]|0,qe=He&8191,ie=He>>>13,me=A[5]|0,Ce=me&8191,xe=me>>>13,Re=A[6]|0,Ge=Re&8191,ne=Re>>>13,je=A[7]|0,Ve=je&8191,ge=je>>>13,Je=A[8]|0,rt=Je&8191,De=Je>>>13,Qe=A[9]|0,Ie=Qe&8191,Fe=Qe>>>13;w.negative=l.negative^g.negative,w.length=19,_=Math.imul(L,ce),E=Math.imul(L,be),E=E+Math.imul(U,ce)|0,I=Math.imul(U,be);var ut=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(ut>>>26)|0,ut&=67108863,_=Math.imul(V,ce),E=Math.imul(V,be),E=E+Math.imul(G,ce)|0,I=Math.imul(G,be),_=_+Math.imul(L,Oe)|0,E=E+Math.imul(L,Ae)|0,E=E+Math.imul(U,Oe)|0,I=I+Math.imul(U,Ae)|0;var yt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(yt>>>26)|0,yt&=67108863,_=Math.imul(_e,ce),E=Math.imul(_e,be),E=E+Math.imul(ae,ce)|0,I=Math.imul(ae,be),_=_+Math.imul(V,Oe)|0,E=E+Math.imul(V,Ae)|0,E=E+Math.imul(G,Oe)|0,I=I+Math.imul(G,Ae)|0,_=_+Math.imul(L,Ye)|0,E=E+Math.imul(L,Ne)|0,E=E+Math.imul(U,Ye)|0,I=I+Math.imul(U,Ne)|0;var ht=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(ht>>>26)|0,ht&=67108863,_=Math.imul(ye,ce),E=Math.imul(ye,be),E=E+Math.imul(K,ce)|0,I=Math.imul(K,be),_=_+Math.imul(_e,Oe)|0,E=E+Math.imul(_e,Ae)|0,E=E+Math.imul(ae,Oe)|0,I=I+Math.imul(ae,Ae)|0,_=_+Math.imul(V,Ye)|0,E=E+Math.imul(V,Ne)|0,E=E+Math.imul(G,Ye)|0,I=I+Math.imul(G,Ne)|0,_=_+Math.imul(L,Pe)|0,E=E+Math.imul(L,Se)|0,E=E+Math.imul(U,Pe)|0,I=I+Math.imul(U,Se)|0;var Mt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,_=Math.imul(X,ce),E=Math.imul(X,be),E=E+Math.imul(W,ce)|0,I=Math.imul(W,be),_=_+Math.imul(ye,Oe)|0,E=E+Math.imul(ye,Ae)|0,E=E+Math.imul(K,Oe)|0,I=I+Math.imul(K,Ae)|0,_=_+Math.imul(_e,Ye)|0,E=E+Math.imul(_e,Ne)|0,E=E+Math.imul(ae,Ye)|0,I=I+Math.imul(ae,Ne)|0,_=_+Math.imul(V,Pe)|0,E=E+Math.imul(V,Se)|0,E=E+Math.imul(G,Pe)|0,I=I+Math.imul(G,Se)|0,_=_+Math.imul(L,qe)|0,E=E+Math.imul(L,ie)|0,E=E+Math.imul(U,qe)|0,I=I+Math.imul(U,ie)|0;var zt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(zt>>>26)|0,zt&=67108863,_=Math.imul(ke,ce),E=Math.imul(ke,be),E=E+Math.imul(pe,ce)|0,I=Math.imul(pe,be),_=_+Math.imul(X,Oe)|0,E=E+Math.imul(X,Ae)|0,E=E+Math.imul(W,Oe)|0,I=I+Math.imul(W,Ae)|0,_=_+Math.imul(ye,Ye)|0,E=E+Math.imul(ye,Ne)|0,E=E+Math.imul(K,Ye)|0,I=I+Math.imul(K,Ne)|0,_=_+Math.imul(_e,Pe)|0,E=E+Math.imul(_e,Se)|0,E=E+Math.imul(ae,Pe)|0,I=I+Math.imul(ae,Se)|0,_=_+Math.imul(V,qe)|0,E=E+Math.imul(V,ie)|0,E=E+Math.imul(G,qe)|0,I=I+Math.imul(G,ie)|0,_=_+Math.imul(L,Ce)|0,E=E+Math.imul(L,xe)|0,E=E+Math.imul(U,Ce)|0,I=I+Math.imul(U,xe)|0;var Et=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Et>>>26)|0,Et&=67108863,_=Math.imul(Q,ce),E=Math.imul(Q,be),E=E+Math.imul(Y,ce)|0,I=Math.imul(Y,be),_=_+Math.imul(ke,Oe)|0,E=E+Math.imul(ke,Ae)|0,E=E+Math.imul(pe,Oe)|0,I=I+Math.imul(pe,Ae)|0,_=_+Math.imul(X,Ye)|0,E=E+Math.imul(X,Ne)|0,E=E+Math.imul(W,Ye)|0,I=I+Math.imul(W,Ne)|0,_=_+Math.imul(ye,Pe)|0,E=E+Math.imul(ye,Se)|0,E=E+Math.imul(K,Pe)|0,I=I+Math.imul(K,Se)|0,_=_+Math.imul(_e,qe)|0,E=E+Math.imul(_e,ie)|0,E=E+Math.imul(ae,qe)|0,I=I+Math.imul(ae,ie)|0,_=_+Math.imul(V,Ce)|0,E=E+Math.imul(V,xe)|0,E=E+Math.imul(G,Ce)|0,I=I+Math.imul(G,xe)|0,_=_+Math.imul(L,Ge)|0,E=E+Math.imul(L,ne)|0,E=E+Math.imul(U,Ge)|0,I=I+Math.imul(U,ne)|0;var _t=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(_t>>>26)|0,_t&=67108863,_=Math.imul(he,ce),E=Math.imul(he,be),E=E+Math.imul(oe,ce)|0,I=Math.imul(oe,be),_=_+Math.imul(Q,Oe)|0,E=E+Math.imul(Q,Ae)|0,E=E+Math.imul(Y,Oe)|0,I=I+Math.imul(Y,Ae)|0,_=_+Math.imul(ke,Ye)|0,E=E+Math.imul(ke,Ne)|0,E=E+Math.imul(pe,Ye)|0,I=I+Math.imul(pe,Ne)|0,_=_+Math.imul(X,Pe)|0,E=E+Math.imul(X,Se)|0,E=E+Math.imul(W,Pe)|0,I=I+Math.imul(W,Se)|0,_=_+Math.imul(ye,qe)|0,E=E+Math.imul(ye,ie)|0,E=E+Math.imul(K,qe)|0,I=I+Math.imul(K,ie)|0,_=_+Math.imul(_e,Ce)|0,E=E+Math.imul(_e,xe)|0,E=E+Math.imul(ae,Ce)|0,I=I+Math.imul(ae,xe)|0,_=_+Math.imul(V,Ge)|0,E=E+Math.imul(V,ne)|0,E=E+Math.imul(G,Ge)|0,I=I+Math.imul(G,ne)|0,_=_+Math.imul(L,Ve)|0,E=E+Math.imul(L,ge)|0,E=E+Math.imul(U,Ve)|0,I=I+Math.imul(U,ge)|0;var $t=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+($t>>>26)|0,$t&=67108863,_=Math.imul(ze,ce),E=Math.imul(ze,be),E=E+Math.imul(we,ce)|0,I=Math.imul(we,be),_=_+Math.imul(he,Oe)|0,E=E+Math.imul(he,Ae)|0,E=E+Math.imul(oe,Oe)|0,I=I+Math.imul(oe,Ae)|0,_=_+Math.imul(Q,Ye)|0,E=E+Math.imul(Q,Ne)|0,E=E+Math.imul(Y,Ye)|0,I=I+Math.imul(Y,Ne)|0,_=_+Math.imul(ke,Pe)|0,E=E+Math.imul(ke,Se)|0,E=E+Math.imul(pe,Pe)|0,I=I+Math.imul(pe,Se)|0,_=_+Math.imul(X,qe)|0,E=E+Math.imul(X,ie)|0,E=E+Math.imul(W,qe)|0,I=I+Math.imul(W,ie)|0,_=_+Math.imul(ye,Ce)|0,E=E+Math.imul(ye,xe)|0,E=E+Math.imul(K,Ce)|0,I=I+Math.imul(K,xe)|0,_=_+Math.imul(_e,Ge)|0,E=E+Math.imul(_e,ne)|0,E=E+Math.imul(ae,Ge)|0,I=I+Math.imul(ae,ne)|0,_=_+Math.imul(V,Ve)|0,E=E+Math.imul(V,ge)|0,E=E+Math.imul(G,Ve)|0,I=I+Math.imul(G,ge)|0,_=_+Math.imul(L,rt)|0,E=E+Math.imul(L,De)|0,E=E+Math.imul(U,rt)|0,I=I+Math.imul(U,De)|0;var Zt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,_=Math.imul(We,ce),E=Math.imul(We,be),E=E+Math.imul(ve,ce)|0,I=Math.imul(ve,be),_=_+Math.imul(ze,Oe)|0,E=E+Math.imul(ze,Ae)|0,E=E+Math.imul(we,Oe)|0,I=I+Math.imul(we,Ae)|0,_=_+Math.imul(he,Ye)|0,E=E+Math.imul(he,Ne)|0,E=E+Math.imul(oe,Ye)|0,I=I+Math.imul(oe,Ne)|0,_=_+Math.imul(Q,Pe)|0,E=E+Math.imul(Q,Se)|0,E=E+Math.imul(Y,Pe)|0,I=I+Math.imul(Y,Se)|0,_=_+Math.imul(ke,qe)|0,E=E+Math.imul(ke,ie)|0,E=E+Math.imul(pe,qe)|0,I=I+Math.imul(pe,ie)|0,_=_+Math.imul(X,Ce)|0,E=E+Math.imul(X,xe)|0,E=E+Math.imul(W,Ce)|0,I=I+Math.imul(W,xe)|0,_=_+Math.imul(ye,Ge)|0,E=E+Math.imul(ye,ne)|0,E=E+Math.imul(K,Ge)|0,I=I+Math.imul(K,ne)|0,_=_+Math.imul(_e,Ve)|0,E=E+Math.imul(_e,ge)|0,E=E+Math.imul(ae,Ve)|0,I=I+Math.imul(ae,ge)|0,_=_+Math.imul(V,rt)|0,E=E+Math.imul(V,De)|0,E=E+Math.imul(G,rt)|0,I=I+Math.imul(G,De)|0,_=_+Math.imul(L,Ie)|0,E=E+Math.imul(L,Fe)|0,E=E+Math.imul(U,Ie)|0,I=I+Math.imul(U,Fe)|0;var Pt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,_=Math.imul(We,Oe),E=Math.imul(We,Ae),E=E+Math.imul(ve,Oe)|0,I=Math.imul(ve,Ae),_=_+Math.imul(ze,Ye)|0,E=E+Math.imul(ze,Ne)|0,E=E+Math.imul(we,Ye)|0,I=I+Math.imul(we,Ne)|0,_=_+Math.imul(he,Pe)|0,E=E+Math.imul(he,Se)|0,E=E+Math.imul(oe,Pe)|0,I=I+Math.imul(oe,Se)|0,_=_+Math.imul(Q,qe)|0,E=E+Math.imul(Q,ie)|0,E=E+Math.imul(Y,qe)|0,I=I+Math.imul(Y,ie)|0,_=_+Math.imul(ke,Ce)|0,E=E+Math.imul(ke,xe)|0,E=E+Math.imul(pe,Ce)|0,I=I+Math.imul(pe,xe)|0,_=_+Math.imul(X,Ge)|0,E=E+Math.imul(X,ne)|0,E=E+Math.imul(W,Ge)|0,I=I+Math.imul(W,ne)|0,_=_+Math.imul(ye,Ve)|0,E=E+Math.imul(ye,ge)|0,E=E+Math.imul(K,Ve)|0,I=I+Math.imul(K,ge)|0,_=_+Math.imul(_e,rt)|0,E=E+Math.imul(_e,De)|0,E=E+Math.imul(ae,rt)|0,I=I+Math.imul(ae,De)|0,_=_+Math.imul(V,Ie)|0,E=E+Math.imul(V,Fe)|0,E=E+Math.imul(G,Ie)|0,I=I+Math.imul(G,Fe)|0;var Ut=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,_=Math.imul(We,Ye),E=Math.imul(We,Ne),E=E+Math.imul(ve,Ye)|0,I=Math.imul(ve,Ne),_=_+Math.imul(ze,Pe)|0,E=E+Math.imul(ze,Se)|0,E=E+Math.imul(we,Pe)|0,I=I+Math.imul(we,Se)|0,_=_+Math.imul(he,qe)|0,E=E+Math.imul(he,ie)|0,E=E+Math.imul(oe,qe)|0,I=I+Math.imul(oe,ie)|0,_=_+Math.imul(Q,Ce)|0,E=E+Math.imul(Q,xe)|0,E=E+Math.imul(Y,Ce)|0,I=I+Math.imul(Y,xe)|0,_=_+Math.imul(ke,Ge)|0,E=E+Math.imul(ke,ne)|0,E=E+Math.imul(pe,Ge)|0,I=I+Math.imul(pe,ne)|0,_=_+Math.imul(X,Ve)|0,E=E+Math.imul(X,ge)|0,E=E+Math.imul(W,Ve)|0,I=I+Math.imul(W,ge)|0,_=_+Math.imul(ye,rt)|0,E=E+Math.imul(ye,De)|0,E=E+Math.imul(K,rt)|0,I=I+Math.imul(K,De)|0,_=_+Math.imul(_e,Ie)|0,E=E+Math.imul(_e,Fe)|0,E=E+Math.imul(ae,Ie)|0,I=I+Math.imul(ae,Fe)|0;var Nt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,_=Math.imul(We,Pe),E=Math.imul(We,Se),E=E+Math.imul(ve,Pe)|0,I=Math.imul(ve,Se),_=_+Math.imul(ze,qe)|0,E=E+Math.imul(ze,ie)|0,E=E+Math.imul(we,qe)|0,I=I+Math.imul(we,ie)|0,_=_+Math.imul(he,Ce)|0,E=E+Math.imul(he,xe)|0,E=E+Math.imul(oe,Ce)|0,I=I+Math.imul(oe,xe)|0,_=_+Math.imul(Q,Ge)|0,E=E+Math.imul(Q,ne)|0,E=E+Math.imul(Y,Ge)|0,I=I+Math.imul(Y,ne)|0,_=_+Math.imul(ke,Ve)|0,E=E+Math.imul(ke,ge)|0,E=E+Math.imul(pe,Ve)|0,I=I+Math.imul(pe,ge)|0,_=_+Math.imul(X,rt)|0,E=E+Math.imul(X,De)|0,E=E+Math.imul(W,rt)|0,I=I+Math.imul(W,De)|0,_=_+Math.imul(ye,Ie)|0,E=E+Math.imul(ye,Fe)|0,E=E+Math.imul(K,Ie)|0,I=I+Math.imul(K,Fe)|0;var Dt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,_=Math.imul(We,qe),E=Math.imul(We,ie),E=E+Math.imul(ve,qe)|0,I=Math.imul(ve,ie),_=_+Math.imul(ze,Ce)|0,E=E+Math.imul(ze,xe)|0,E=E+Math.imul(we,Ce)|0,I=I+Math.imul(we,xe)|0,_=_+Math.imul(he,Ge)|0,E=E+Math.imul(he,ne)|0,E=E+Math.imul(oe,Ge)|0,I=I+Math.imul(oe,ne)|0,_=_+Math.imul(Q,Ve)|0,E=E+Math.imul(Q,ge)|0,E=E+Math.imul(Y,Ve)|0,I=I+Math.imul(Y,ge)|0,_=_+Math.imul(ke,rt)|0,E=E+Math.imul(ke,De)|0,E=E+Math.imul(pe,rt)|0,I=I+Math.imul(pe,De)|0,_=_+Math.imul(X,Ie)|0,E=E+Math.imul(X,Fe)|0,E=E+Math.imul(W,Ie)|0,I=I+Math.imul(W,Fe)|0;var Ft=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,_=Math.imul(We,Ce),E=Math.imul(We,xe),E=E+Math.imul(ve,Ce)|0,I=Math.imul(ve,xe),_=_+Math.imul(ze,Ge)|0,E=E+Math.imul(ze,ne)|0,E=E+Math.imul(we,Ge)|0,I=I+Math.imul(we,ne)|0,_=_+Math.imul(he,Ve)|0,E=E+Math.imul(he,ge)|0,E=E+Math.imul(oe,Ve)|0,I=I+Math.imul(oe,ge)|0,_=_+Math.imul(Q,rt)|0,E=E+Math.imul(Q,De)|0,E=E+Math.imul(Y,rt)|0,I=I+Math.imul(Y,De)|0,_=_+Math.imul(ke,Ie)|0,E=E+Math.imul(ke,Fe)|0,E=E+Math.imul(pe,Ie)|0,I=I+Math.imul(pe,Fe)|0;var Ht=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,_=Math.imul(We,Ge),E=Math.imul(We,ne),E=E+Math.imul(ve,Ge)|0,I=Math.imul(ve,ne),_=_+Math.imul(ze,Ve)|0,E=E+Math.imul(ze,ge)|0,E=E+Math.imul(we,Ve)|0,I=I+Math.imul(we,ge)|0,_=_+Math.imul(he,rt)|0,E=E+Math.imul(he,De)|0,E=E+Math.imul(oe,rt)|0,I=I+Math.imul(oe,De)|0,_=_+Math.imul(Q,Ie)|0,E=E+Math.imul(Q,Fe)|0,E=E+Math.imul(Y,Ie)|0,I=I+Math.imul(Y,Fe)|0;var Gt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,_=Math.imul(We,Ve),E=Math.imul(We,ge),E=E+Math.imul(ve,Ve)|0,I=Math.imul(ve,ge),_=_+Math.imul(ze,rt)|0,E=E+Math.imul(ze,De)|0,E=E+Math.imul(we,rt)|0,I=I+Math.imul(we,De)|0,_=_+Math.imul(he,Ie)|0,E=E+Math.imul(he,Fe)|0,E=E+Math.imul(oe,Ie)|0,I=I+Math.imul(oe,Fe)|0;var Jt=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,_=Math.imul(We,rt),E=Math.imul(We,De),E=E+Math.imul(ve,rt)|0,I=Math.imul(ve,De),_=_+Math.imul(ze,Ie)|0,E=E+Math.imul(ze,Fe)|0,E=E+Math.imul(we,Ie)|0,I=I+Math.imul(we,Fe)|0;var Ur=(f+_|0)+((E&8191)<<13)|0;f=(I+(E>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,_=Math.imul(We,Ie),E=Math.imul(We,Fe),E=E+Math.imul(ve,Ie)|0,I=Math.imul(ve,Fe);var de=(f+_|0)+((E&8191)<<13)|0;return f=(I+(E>>>13)|0)+(de>>>26)|0,de&=67108863,S[0]=ut,S[1]=yt,S[2]=ht,S[3]=Mt,S[4]=zt,S[5]=Et,S[6]=_t,S[7]=$t,S[8]=Zt,S[9]=Pt,S[10]=Ut,S[11]=Nt,S[12]=Dt,S[13]=Ft,S[14]=Ht,S[15]=Gt,S[16]=Jt,S[17]=Ur,S[18]=de,f!==0&&(S[19]=f,w.length++),w},"comb10MulTo");Math.imul||(O=C);function R(p,l,g){g.negative=l.negative^p.negative,g.length=p.length+l.length;for(var w=0,M=0,A=0;A<g.length-1;A++){var S=M;M=0;for(var f=w&67108863,_=Math.min(A,l.length-1),E=Math.max(0,A-p.length+1);E<=_;E++){var I=A-E,D=p.words[I]|0,L=l.words[E]|0,U=D*L,z=U&67108863;S=S+(U/67108864|0)|0,z=z+f|0,f=z&67108863,S=S+(z>>>26)|0,M+=S>>>26,S&=67108863}g.words[A]=f,w=S,S=M}return w!==0?g.words[A]=w:g.length--,g._strip()}i(R,"bigMulTo");function T(p,l,g){return R(p,l,g)}i(T,"jumboMulTo"),s.prototype.mulTo=i(function(l,g){var w,M=this.length+l.length;return this.length===10&&l.length===10?w=O(this,l,g):M<63?w=C(this,l,g):M<1024?w=R(this,l,g):w=T(this,l,g),w},"mulTo"),s.prototype.mul=i(function(l){var g=new s(null);return g.words=new Array(this.length+l.length),this.mulTo(l,g)},"mul"),s.prototype.mulf=i(function(l){var g=new s(null);return g.words=new Array(this.length+l.length),T(this,l,g)},"mulf"),s.prototype.imul=i(function(l){return this.clone().mulTo(l,this)},"imul"),s.prototype.imuln=i(function(l){var g=l<0;g&&(l=-l),a(typeof l=="number"),a(l<67108864);for(var w=0,M=0;M<this.length;M++){var A=(this.words[M]|0)*l,S=(A&67108863)+(w&67108863);w>>=26,w+=A/67108864|0,w+=S>>>26,this.words[M]=S&67108863}return w!==0&&(this.words[M]=w,this.length++),this.length=l===0?1:this.length,g?this.ineg():this},"imuln"),s.prototype.muln=i(function(l){return this.clone().imuln(l)},"muln"),s.prototype.sqr=i(function(){return this.mul(this)},"sqr"),s.prototype.isqr=i(function(){return this.imul(this.clone())},"isqr"),s.prototype.pow=i(function(l){var g=N(l);if(g.length===0)return new s(1);for(var w=this,M=0;M<g.length&&g[M]===0;M++,w=w.sqr());if(++M<g.length)for(var A=w.sqr();M<g.length;M++,A=A.sqr())g[M]!==0&&(w=w.mul(A));return w},"pow"),s.prototype.iushln=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26,M=67108863>>>26-g<<26-g,A;if(g!==0){var S=0;for(A=0;A<this.length;A++){var f=this.words[A]&M,_=(this.words[A]|0)-f<<g;this.words[A]=_|S,S=f>>>26-g}S&&(this.words[A]=S,this.length++)}if(w!==0){for(A=this.length-1;A>=0;A--)this.words[A+w]=this.words[A];for(A=0;A<w;A++)this.words[A]=0;this.length+=w}return this._strip()},"iushln"),s.prototype.ishln=i(function(l){return a(this.negative===0),this.iushln(l)},"ishln"),s.prototype.iushrn=i(function(l,g,w){a(typeof l=="number"&&l>=0);var M;g?M=(g-g%26)/26:M=0;var A=l%26,S=Math.min((l-A)/26,this.length),f=67108863^67108863>>>A<<A,_=w;if(M-=S,M=Math.max(0,M),_){for(var E=0;E<S;E++)_.words[E]=this.words[E];_.length=S}if(S!==0)if(this.length>S)for(this.length-=S,E=0;E<this.length;E++)this.words[E]=this.words[E+S];else this.words[0]=0,this.length=1;var I=0;for(E=this.length-1;E>=0&&(I!==0||E>=M);E--){var D=this.words[E]|0;this.words[E]=I<<26-A|D>>>A,I=D&f}return _&&I!==0&&(_.words[_.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},"iushrn"),s.prototype.ishrn=i(function(l,g,w){return a(this.negative===0),this.iushrn(l,g,w)},"ishrn"),s.prototype.shln=i(function(l){return this.clone().ishln(l)},"shln"),s.prototype.ushln=i(function(l){return this.clone().iushln(l)},"ushln"),s.prototype.shrn=i(function(l){return this.clone().ishrn(l)},"shrn"),s.prototype.ushrn=i(function(l){return this.clone().iushrn(l)},"ushrn"),s.prototype.testn=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26,M=1<<g;if(this.length<=w)return!1;var A=this.words[w];return!!(A&M)},"testn"),s.prototype.imaskn=i(function(l){a(typeof l=="number"&&l>=0);var g=l%26,w=(l-g)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(g!==0&&w++,this.length=Math.min(w,this.length),g!==0){var M=67108863^67108863>>>g<<g;this.words[this.length-1]&=M}return this._strip()},"imaskn"),s.prototype.maskn=i(function(l){return this.clone().imaskn(l)},"maskn"),s.prototype.iaddn=i(function(l){return a(typeof l=="number"),a(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},"iaddn"),s.prototype._iaddn=i(function(l){this.words[0]+=l;for(var g=0;g<this.length&&this.words[g]>=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},"_iaddn"),s.prototype.isubn=i(function(l){if(a(typeof l=="number"),a(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g<this.length&&this.words[g]<0;g++)this.words[g]+=67108864,this.words[g+1]-=1;return this._strip()},"isubn"),s.prototype.addn=i(function(l){return this.clone().iaddn(l)},"addn"),s.prototype.subn=i(function(l){return this.clone().isubn(l)},"subn"),s.prototype.iabs=i(function(){return this.negative=0,this},"iabs"),s.prototype.abs=i(function(){return this.clone().iabs()},"abs"),s.prototype._ishlnsubmul=i(function(l,g,w){var M=l.length+w,A;this._expand(M);var S,f=0;for(A=0;A<l.length;A++){S=(this.words[A+w]|0)+f;var _=(l.words[A]|0)*g;S-=_&67108863,f=(S>>26)-(_/67108864|0),this.words[A+w]=S&67108863}for(;A<this.length-w;A++)S=(this.words[A+w]|0)+f,f=S>>26,this.words[A+w]=S&67108863;if(f===0)return this._strip();for(a(f===-1),f=0,A=0;A<this.length;A++)S=-(this.words[A]|0)+f,f=S>>26,this.words[A]=S&67108863;return this.negative=1,this._strip()},"_ishlnsubmul"),s.prototype._wordDiv=i(function(l,g){var w=this.length-l.length,M=this.clone(),A=l,S=A.words[A.length-1]|0,f=this._countBits(S);w=26-f,w!==0&&(A=A.ushln(w),M.iushln(w),S=A.words[A.length-1]|0);var _=M.length-A.length,E;if(g!=="mod"){E=new s(null),E.length=_+1,E.words=new Array(E.length);for(var I=0;I<E.length;I++)E.words[I]=0}var D=M.clone()._ishlnsubmul(A,1,_);D.negative===0&&(M=D,E&&(E.words[_]=1));for(var L=_-1;L>=0;L--){var U=(M.words[A.length+L]|0)*67108864+(M.words[A.length+L-1]|0);for(U=Math.min(U/S|0,67108863),M._ishlnsubmul(A,U,L);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(A,1,L),M.isZero()||(M.negative^=1);E&&(E.words[L]=U)}return E&&E._strip(),M._strip(),g!=="div"&&w!==0&&M.iushrn(w),{div:E||null,mod:M}},"_wordDiv"),s.prototype.divmod=i(function(l,g,w){if(a(!l.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,A,S;return this.negative!==0&&l.negative===0?(S=this.neg().divmod(l,g),g!=="mod"&&(M=S.div.neg()),g!=="div"&&(A=S.mod.neg(),w&&A.negative!==0&&A.iadd(l)),{div:M,mod:A}):this.negative===0&&l.negative!==0?(S=this.divmod(l.neg(),g),g!=="mod"&&(M=S.div.neg()),{div:M,mod:S.mod}):(this.negative&l.negative)!==0?(S=this.neg().divmod(l.neg(),g),g!=="div"&&(A=S.mod.neg(),w&&A.negative!==0&&A.isub(l)),{div:S.div,mod:A}):l.length>this.length||this.cmp(l)<0?{div:new s(0),mod:this}:l.length===1?g==="div"?{div:this.divn(l.words[0]),mod:null}:g==="mod"?{div:null,mod:new s(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new s(this.modrn(l.words[0]))}:this._wordDiv(l,g)},"divmod"),s.prototype.div=i(function(l){return this.divmod(l,"div",!1).div},"div"),s.prototype.mod=i(function(l){return this.divmod(l,"mod",!1).mod},"mod"),s.prototype.umod=i(function(l){return this.divmod(l,"mod",!0).mod},"umod"),s.prototype.divRound=i(function(l){var g=this.divmod(l);if(g.mod.isZero())return g.div;var w=g.div.negative!==0?g.mod.isub(l):g.mod,M=l.ushrn(1),A=l.andln(1),S=w.cmp(M);return S<0||A===1&&S===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},"divRound"),s.prototype.modrn=i(function(l){var g=l<0;g&&(l=-l),a(l<=67108863);for(var w=(1<<26)%l,M=0,A=this.length-1;A>=0;A--)M=(w*M+(this.words[A]|0))%l;return g?-M:M},"modrn"),s.prototype.modn=i(function(l){return this.modrn(l)},"modn"),s.prototype.idivn=i(function(l){var g=l<0;g&&(l=-l),a(l<=67108863);for(var w=0,M=this.length-1;M>=0;M--){var A=(this.words[M]|0)+w*67108864;this.words[M]=A/l|0,w=A%l}return this._strip(),g?this.ineg():this},"idivn"),s.prototype.divn=i(function(l){return this.clone().idivn(l)},"divn"),s.prototype.egcd=i(function(l){a(l.negative===0),a(!l.isZero());var g=this,w=l.clone();g.negative!==0?g=g.umod(l):g=g.clone();for(var M=new s(1),A=new s(0),S=new s(0),f=new s(1),_=0;g.isEven()&&w.isEven();)g.iushrn(1),w.iushrn(1),++_;for(var E=w.clone(),I=g.clone();!g.isZero();){for(var D=0,L=1;(g.words[0]&L)===0&&D<26;++D,L<<=1);if(D>0)for(g.iushrn(D);D-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(E),A.isub(I)),M.iushrn(1),A.iushrn(1);for(var U=0,z=1;(w.words[0]&z)===0&&U<26;++U,z<<=1);if(U>0)for(w.iushrn(U);U-- >0;)(S.isOdd()||f.isOdd())&&(S.iadd(E),f.isub(I)),S.iushrn(1),f.iushrn(1);g.cmp(w)>=0?(g.isub(w),M.isub(S),A.isub(f)):(w.isub(g),S.isub(M),f.isub(A))}return{a:S,b:f,gcd:w.iushln(_)}},"egcd"),s.prototype._invmp=i(function(l){a(l.negative===0),a(!l.isZero());var g=this,w=l.clone();g.negative!==0?g=g.umod(l):g=g.clone();for(var M=new s(1),A=new s(0),S=w.clone();g.cmpn(1)>0&&w.cmpn(1)>0;){for(var f=0,_=1;(g.words[0]&_)===0&&f<26;++f,_<<=1);if(f>0)for(g.iushrn(f);f-- >0;)M.isOdd()&&M.iadd(S),M.iushrn(1);for(var E=0,I=1;(w.words[0]&I)===0&&E<26;++E,I<<=1);if(E>0)for(w.iushrn(E);E-- >0;)A.isOdd()&&A.iadd(S),A.iushrn(1);g.cmp(w)>=0?(g.isub(w),M.isub(A)):(w.isub(g),A.isub(M))}var D;return g.cmpn(1)===0?D=M:D=A,D.cmpn(0)<0&&D.iadd(l),D},"_invmp"),s.prototype.gcd=i(function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var g=this.clone(),w=l.clone();g.negative=0,w.negative=0;for(var M=0;g.isEven()&&w.isEven();M++)g.iushrn(1),w.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;w.isEven();)w.iushrn(1);var A=g.cmp(w);if(A<0){var S=g;g=w,w=S}else if(A===0||w.cmpn(1)===0)break;g.isub(w)}while(!0);return w.iushln(M)},"gcd"),s.prototype.invm=i(function(l){return this.egcd(l).a.umod(l)},"invm"),s.prototype.isEven=i(function(){return(this.words[0]&1)===0},"isEven"),s.prototype.isOdd=i(function(){return(this.words[0]&1)===1},"isOdd"),s.prototype.andln=i(function(l){return this.words[0]&l},"andln"),s.prototype.bincn=i(function(l){a(typeof l=="number");var g=l%26,w=(l-g)/26,M=1<<g;if(this.length<=w)return this._expand(w+1),this.words[w]|=M,this;for(var A=M,S=w;A!==0&&S<this.length;S++){var f=this.words[S]|0;f+=A,A=f>>>26,f&=67108863,this.words[S]=f}return A!==0&&(this.words[S]=A,this.length++),this},"bincn"),s.prototype.isZero=i(function(){return this.length===1&&this.words[0]===0},"isZero"),s.prototype.cmpn=i(function(l){var g=l<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var w;if(this.length>1)w=1;else{g&&(l=-l),a(l<=67108863,"Number is too big");var M=this.words[0]|0;w=M===l?0:M<l?-1:1}return this.negative!==0?-w|0:w},"cmpn"),s.prototype.cmp=i(function(l){if(this.negative!==0&&l.negative===0)return-1;if(this.negative===0&&l.negative!==0)return 1;var g=this.ucmp(l);return this.negative!==0?-g|0:g},"cmp"),s.prototype.ucmp=i(function(l){if(this.length>l.length)return 1;if(this.length<l.length)return-1;for(var g=0,w=this.length-1;w>=0;w--){var M=this.words[w]|0,A=l.words[w]|0;if(M!==A){M<A?g=-1:M>A&&(g=1);break}}return g},"ucmp"),s.prototype.gtn=i(function(l){return this.cmpn(l)===1},"gtn"),s.prototype.gt=i(function(l){return this.cmp(l)===1},"gt"),s.prototype.gten=i(function(l){return this.cmpn(l)>=0},"gten"),s.prototype.gte=i(function(l){return this.cmp(l)>=0},"gte"),s.prototype.ltn=i(function(l){return this.cmpn(l)===-1},"ltn"),s.prototype.lt=i(function(l){return this.cmp(l)===-1},"lt"),s.prototype.lten=i(function(l){return this.cmpn(l)<=0},"lten"),s.prototype.lte=i(function(l){return this.cmp(l)<=0},"lte"),s.prototype.eqn=i(function(l){return this.cmpn(l)===0},"eqn"),s.prototype.eq=i(function(l){return this.cmp(l)===0},"eq"),s.red=i(function(l){return new F(l)},"red"),s.prototype.toRed=i(function(l){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},"toRed"),s.prototype.fromRed=i(function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),s.prototype._forceRed=i(function(l){return this.red=l,this},"_forceRed"),s.prototype.forceRed=i(function(l){return a(!this.red,"Already a number in reduction context"),this._forceRed(l)},"forceRed"),s.prototype.redAdd=i(function(l){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},"redAdd"),s.prototype.redIAdd=i(function(l){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},"redIAdd"),s.prototype.redSub=i(function(l){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},"redSub"),s.prototype.redISub=i(function(l){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},"redISub"),s.prototype.redShl=i(function(l){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},"redShl"),s.prototype.redMul=i(function(l){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},"redMul"),s.prototype.redIMul=i(function(l){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},"redIMul"),s.prototype.redSqr=i(function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),s.prototype.redISqr=i(function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),s.prototype.redSqrt=i(function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),s.prototype.redInvm=i(function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),s.prototype.redNeg=i(function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),s.prototype.redPow=i(function(l){return a(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)},"redPow");var P={k256:null,p224:null,p192:null,p25519:null};function B(p,l){this.name=p,this.p=new s(l,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(B,"MPrime"),B.prototype._tmp=i(function(){var l=new s(null);return l.words=new Array(Math.ceil(this.n/13)),l},"_tmp"),B.prototype.ireduce=i(function(l){var g=l,w;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),w=g.bitLength();while(w>this.n);var M=w<this.n?-1:g.ucmp(this.p);return M===0?(g.words[0]=0,g.length=1):M>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},"ireduce"),B.prototype.split=i(function(l,g){l.iushrn(this.n,0,g)},"split"),B.prototype.imulK=i(function(l){return l.imul(this.k)},"imulK");function Z(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Z,"K256"),n(Z,B),Z.prototype.split=i(function(l,g){for(var w=4194303,M=Math.min(l.length,9),A=0;A<M;A++)g.words[A]=l.words[A];if(g.length=M,l.length<=9){l.words[0]=0,l.length=1;return}var S=l.words[9];for(g.words[g.length++]=S&w,A=10;A<l.length;A++){var f=l.words[A]|0;l.words[A-10]=(f&w)<<4|S>>>22,S=f}S>>>=22,l.words[A-10]=S,S===0&&l.length>10?l.length-=10:l.length-=9},"split"),Z.prototype.imulK=i(function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var g=0,w=0;w<l.length;w++){var M=l.words[w]|0;g+=M*977,l.words[w]=g&67108863,g=M*64+(g/67108864|0)}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l},"imulK");function H(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(H,"P224"),n(H,B);function ee(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(ee,"P192"),n(ee,B);function $(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i($,"P25519"),n($,B),$.prototype.imulK=i(function(l){for(var g=0,w=0;w<l.length;w++){var M=(l.words[w]|0)*19+g,A=M&67108863;M>>>=26,l.words[w]=A,g=M}return g!==0&&(l.words[l.length++]=g),l},"imulK"),s._prime=i(function(l){if(P[l])return P[l];var g;if(l==="k256")g=new Z;else if(l==="p224")g=new H;else if(l==="p192")g=new ee;else if(l==="p25519")g=new $;else throw new Error("Unknown prime "+l);return P[l]=g,g},"prime");function F(p){if(typeof p=="string"){var l=s._prime(p);this.m=l.p,this.prime=l}else a(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}i(F,"Red"),F.prototype._verify1=i(function(l){a(l.negative===0,"red works only with positives"),a(l.red,"red works only with red numbers")},"_verify1"),F.prototype._verify2=i(function(l,g){a((l.negative|g.negative)===0,"red works only with positives"),a(l.red&&l.red===g.red,"red works only with red numbers")},"_verify2"),F.prototype.imod=i(function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(c(l,l.umod(this.m)._forceRed(this)),l)},"imod"),F.prototype.neg=i(function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},"neg"),F.prototype.add=i(function(l,g){this._verify2(l,g);var w=l.add(g);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},"add"),F.prototype.iadd=i(function(l,g){this._verify2(l,g);var w=l.iadd(g);return w.cmp(this.m)>=0&&w.isub(this.m),w},"iadd"),F.prototype.sub=i(function(l,g){this._verify2(l,g);var w=l.sub(g);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},"sub"),F.prototype.isub=i(function(l,g){this._verify2(l,g);var w=l.isub(g);return w.cmpn(0)<0&&w.iadd(this.m),w},"isub"),F.prototype.shl=i(function(l,g){return this._verify1(l),this.imod(l.ushln(g))},"shl"),F.prototype.imul=i(function(l,g){return this._verify2(l,g),this.imod(l.imul(g))},"imul"),F.prototype.mul=i(function(l,g){return this._verify2(l,g),this.imod(l.mul(g))},"mul"),F.prototype.isqr=i(function(l){return this.imul(l,l.clone())},"isqr"),F.prototype.sqr=i(function(l){return this.mul(l,l)},"sqr"),F.prototype.sqrt=i(function(l){if(l.isZero())return l.clone();var g=this.m.andln(3);if(a(g%2===1),g===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(l,w)}for(var M=this.m.subn(1),A=0;!M.isZero()&&M.andln(1)===0;)A++,M.iushrn(1);a(!M.isZero());var S=new s(1).toRed(this),f=S.redNeg(),_=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,_).cmp(f)!==0;)E.redIAdd(f);for(var I=this.pow(E,M),D=this.pow(l,M.addn(1).iushrn(1)),L=this.pow(l,M),U=A;L.cmp(S)!==0;){for(var z=L,V=0;z.cmp(S)!==0;V++)z=z.redSqr();a(V<U);var G=this.pow(I,new s(1).iushln(U-V-1));D=D.redMul(G),I=G.redSqr(),L=L.redMul(I),U=V}return D},"sqrt"),F.prototype.invm=i(function(l){var g=l._invmp(this.m);return g.negative!==0?(g.negative=0,this.imod(g).redNeg()):this.imod(g)},"invm"),F.prototype.pow=i(function(l,g){if(g.isZero())return new s(1).toRed(this);if(g.cmpn(1)===0)return l.clone();var w=4,M=new Array(1<<w);M[0]=new s(1).toRed(this),M[1]=l;for(var A=2;A<M.length;A++)M[A]=this.mul(M[A-1],l);var S=M[0],f=0,_=0,E=g.bitLength()%26;for(E===0&&(E=26),A=g.length-1;A>=0;A--){for(var I=g.words[A],D=E-1;D>=0;D--){var L=I>>D&1;if(S!==M[0]&&(S=this.sqr(S)),L===0&&f===0){_=0;continue}f<<=1,f|=L,_++,!(_!==w&&(A!==0||D!==0))&&(S=this.mul(S,M[f]),_=0,f=0)}E=26}return S},"pow"),F.prototype.convertTo=i(function(l){var g=l.umod(this.m);return g===l?g.clone():g},"convertTo"),F.prototype.convertFrom=i(function(l){var g=l.clone();return g.red=null,g},"convertFrom"),s.mont=i(function(l){return new u(l)},"mont");function u(p){F.call(this,p),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(u,"Mont"),n(u,F),u.prototype.convertTo=i(function(l){return this.imod(l.ushln(this.shift))},"convertTo"),u.prototype.convertFrom=i(function(l){var g=this.imod(l.mul(this.rinv));return g.red=null,g},"convertFrom"),u.prototype.imul=i(function(l,g){if(l.isZero()||g.isZero())return l.words[0]=0,l.length=1,l;var w=l.imul(g),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=w.isub(M).iushrn(this.shift),S=A;return A.cmp(this.m)>=0?S=A.isub(this.m):A.cmpn(0)<0&&(S=A.iadd(this.m)),S._forceRed(this)},"imul"),u.prototype.mul=i(function(l,g){if(l.isZero()||g.isZero())return new s(0)._forceRed(this);var w=l.mul(g),M=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=w.isub(M).iushrn(this.shift),S=A;return A.cmp(this.m)>=0?S=A.isub(this.m):A.cmpn(0)<0&&(S=A.iadd(this.m)),S._forceRed(this)},"mul"),u.prototype.invm=i(function(l){var g=this.imod(l._invmp(this.m).mul(this.r2));return g._forceRed(this)},"invm")})(e,$D)})(Iu)),Iu.exports}i(q7,"requireBn");var li={},Np={},Ip={},H6;function VD(){return H6||(H6=1,(function(e){var t=ll(),r=Bt(),a=e;a.define=i(function(o,h){return new n(o,h)},"define");function n(s,o){this.name=s,this.body=o,this.decoders={},this.encoders={}}i(n,"Entity"),n.prototype._createNamed=i(function(o){var h;try{h=ji.runInThisContext("(function "+this.name+`(entity) {
3
3
  this._initNamed(entity);
4
4
  })`)}catch{h=i(function(v){this._initNamed(v)},"named")}return r(h,o),h.prototype._initNamed=i(function(v){o.call(this,v)},"initnamed"),new h(this)},"createNamed"),n.prototype._getDecoder=i(function(o){return o=o||"der",this.decoders.hasOwnProperty(o)||(this.decoders[o]=this._createNamed(t.decoders[o])),this.decoders[o]},"_getDecoder"),n.prototype.decode=i(function(o,h,m){return this._getDecoder(h).decode(o,m)},"decode"),n.prototype._getEncoder=i(function(o){return o=o||"der",this.encoders.hasOwnProperty(o)||(this.encoders[o]=this._createNamed(t.encoders[o])),this.encoders[o]},"_getEncoder"),n.prototype.encode=i(function(o,h,m){return this._getEncoder(h).encode(o,m)},"encode")})(Ip)),Ip}i(VD,"requireApi");var Cp={},Op={},G6;function ZD(){if(G6)return Op;G6=1;var e=Bt();function t(a){this._reporterState={obj:null,path:[],options:a||{},errors:[]}}i(t,"Reporter"),Op.Reporter=t,t.prototype.isError=i(function(n){return n instanceof r},"isError"),t.prototype.save=i(function(){var n=this._reporterState;return{obj:n.obj,pathLen:n.path.length}},"save"),t.prototype.restore=i(function(n){var s=this._reporterState;s.obj=n.obj,s.path=s.path.slice(0,n.pathLen)},"restore"),t.prototype.enterKey=i(function(n){return this._reporterState.path.push(n)},"enterKey"),t.prototype.exitKey=i(function(n){var s=this._reporterState;s.path=s.path.slice(0,n-1)},"exitKey"),t.prototype.leaveKey=i(function(n,s,o){var h=this._reporterState;this.exitKey(n),h.obj!==null&&(h.obj[s]=o)},"leaveKey"),t.prototype.path=i(function(){return this._reporterState.path.join("/")},"path"),t.prototype.enterObject=i(function(){var n=this._reporterState,s=n.obj;return n.obj={},s},"enterObject"),t.prototype.leaveObject=i(function(n){var s=this._reporterState,o=s.obj;return s.obj=n,o},"leaveObject"),t.prototype.error=i(function(n){var s,o=this._reporterState,h=n instanceof r;if(h?s=n:s=new r(o.path.map(function(m){return"["+JSON.stringify(m)+"]"}).join(""),n.message||n,n.stack),!o.options.partial)throw s;return h||o.errors.push(s),s},"error"),t.prototype.wrapResult=i(function(n){var s=this._reporterState;return s.options.partial?{result:this.isError(n)?null:n,errors:s.errors}:n},"wrapResult");function r(a,n){this.path=a,this.rethrow(n)}return i(r,"ReporterError"),e(r,Error),r.prototype.rethrow=i(function(n){if(this.message=n+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(s){this.stack=s.stack}return this},"rethrow"),Op}i(ZD,"requireReporter");var Zl={},J6;function K6(){if(J6)return Zl;J6=1;var e=Bt(),t=vo().Reporter,r=Hn().Buffer;function a(s,o){if(t.call(this,o),!r.isBuffer(s)){this.error("Input not Buffer");return}this.base=s,this.offset=0,this.length=s.length}i(a,"DecoderBuffer"),e(a,t),Zl.DecoderBuffer=a,a.prototype.save=i(function(){return{offset:this.offset,reporter:t.prototype.save.call(this)}},"save"),a.prototype.restore=i(function(o){var h=new a(this.base);return h.offset=o.offset,h.length=this.offset,this.offset=o.offset,t.prototype.restore.call(this,o.reporter),h},"restore"),a.prototype.isEmpty=i(function(){return this.offset===this.length},"isEmpty"),a.prototype.readUInt8=i(function(o){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(o||"DecoderBuffer overrun")},"readUInt8"),a.prototype.skip=i(function(o,h){if(!(this.offset+o<=this.length))return this.error(h||"DecoderBuffer overrun");var m=new a(this.base);return m._reporterState=this._reporterState,m.offset=this.offset,m.length=this.offset+o,this.offset+=o,m},"skip"),a.prototype.raw=i(function(o){return this.base.slice(o?o.offset:this.offset,this.length)},"raw");function n(s,o){if(Array.isArray(s))this.length=0,this.value=s.map(function(h){return h instanceof n||(h=new n(h,o)),this.length+=h.length,h},this);else if(typeof s=="number"){if(!(0<=s&&s<=255))return o.error("non-byte EncoderBuffer value");this.value=s,this.length=1}else if(typeof s=="string")this.value=s,this.length=r.byteLength(s);else if(r.isBuffer(s))this.value=s,this.length=s.length;else return o.error("Unsupported type: "+typeof s)}return i(n,"EncoderBuffer"),Zl.EncoderBuffer=n,n.prototype.join=i(function(o,h){return o||(o=new r(this.length)),h||(h=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(m){m.join(o,h),h+=m.length}):(typeof this.value=="number"?o[h]=this.value:typeof this.value=="string"?o.write(this.value,h):r.isBuffer(this.value)&&this.value.copy(o,h),h+=this.length)),o},"join"),Zl}i(K6,"requireBuffer");var Rp,q6;function HD(){if(q6)return Rp;q6=1;var e=vo().Reporter,t=vo().EncoderBuffer,r=vo().DecoderBuffer,a=di(),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n),o=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function h(v,c){var d={};this._baseState=d,d.enc=v,d.parent=c||null,d.children=null,d.tag=null,d.args=null,d.reverseArgs=null,d.choice=null,d.optional=!1,d.any=!1,d.obj=!1,d.use=null,d.useDecoder=null,d.key=null,d.default=null,d.explicit=null,d.implicit=null,d.contains=null,d.parent||(d.children=[],this._wrap())}i(h,"Node"),Rp=h;var m=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return h.prototype.clone=i(function(){var c=this._baseState,d={};m.forEach(function(b){d[b]=c[b]});var y=new this.constructor(d.parent);return y._baseState=d,y},"clone"),h.prototype._wrap=i(function(){var c=this._baseState;s.forEach(function(d){this[d]=i(function(){var b=new this.constructor(this);return c.children.push(b),b[d].apply(b,arguments)},"_wrappedMethod")},this)},"wrap"),h.prototype._init=i(function(c){var d=this._baseState;a(d.parent===null),c.call(this),d.children=d.children.filter(function(y){return y._baseState.parent===this},this),a.equal(d.children.length,1,"Root node can have only one child")},"init"),h.prototype._useArgs=i(function(c){var d=this._baseState,y=c.filter(function(b){return b instanceof this.constructor},this);c=c.filter(function(b){return!(b instanceof this.constructor)},this),y.length!==0&&(a(d.children===null),d.children=y,y.forEach(function(b){b._baseState.parent=this},this)),c.length!==0&&(a(d.args===null),d.args=c,d.reverseArgs=c.map(function(b){if(typeof b!="object"||b.constructor!==Object)return b;var x={};return Object.keys(b).forEach(function(k){k==(k|0)&&(k|=0);var N=b[k];x[N]=k}),x}))},"useArgs"),o.forEach(function(v){h.prototype[v]=i(function(){var d=this._baseState;throw new Error(v+" not implemented for encoding: "+d.enc)},"_overrided")}),n.forEach(function(v){h.prototype[v]=i(function(){var d=this._baseState,y=Array.prototype.slice.call(arguments);return a(d.tag===null),d.tag=v,this._useArgs(y),this},"_tagMethod")}),h.prototype.use=i(function(c){a(c);var d=this._baseState;return a(d.use===null),d.use=c,this},"use"),h.prototype.optional=i(function(){var c=this._baseState;return c.optional=!0,this},"optional"),h.prototype.def=i(function(c){var d=this._baseState;return a(d.default===null),d.default=c,d.optional=!0,this},"def"),h.prototype.explicit=i(function(c){var d=this._baseState;return a(d.explicit===null&&d.implicit===null),d.explicit=c,this},"explicit"),h.prototype.implicit=i(function(c){var d=this._baseState;return a(d.explicit===null&&d.implicit===null),d.implicit=c,this},"implicit"),h.prototype.obj=i(function(){var c=this._baseState,d=Array.prototype.slice.call(arguments);return c.obj=!0,d.length!==0&&this._useArgs(d),this},"obj"),h.prototype.key=i(function(c){var d=this._baseState;return a(d.key===null),d.key=c,this},"key"),h.prototype.any=i(function(){var c=this._baseState;return c.any=!0,this},"any"),h.prototype.choice=i(function(c){var d=this._baseState;return a(d.choice===null),d.choice=c,this._useArgs(Object.keys(c).map(function(y){return c[y]})),this},"choice"),h.prototype.contains=i(function(c){var d=this._baseState;return a(d.use===null),d.contains=c,this},"contains"),h.prototype._decode=i(function(c,d){var y=this._baseState;if(y.parent===null)return c.wrapResult(y.children[0]._decode(c,d));var b=y.default,x=!0,k=null;if(y.key!==null&&(k=c.enterKey(y.key)),y.optional){var N=null;if(y.explicit!==null?N=y.explicit:y.implicit!==null?N=y.implicit:y.tag!==null&&(N=y.tag),N===null&&!y.any){var C=c.save();try{y.choice===null?this._decodeGeneric(y.tag,c,d):this._decodeChoice(c,d),x=!0}catch{x=!1}c.restore(C)}else if(x=this._peekTag(c,N,y.any),c.isError(x))return x}var O;if(y.obj&&x&&(O=c.enterObject()),x){if(y.explicit!==null){var R=this._decodeTag(c,y.explicit);if(c.isError(R))return R;c=R}var T=c.offset;if(y.use===null&&y.choice===null){if(y.any)var C=c.save();var P=this._decodeTag(c,y.implicit!==null?y.implicit:y.tag,y.any);if(c.isError(P))return P;y.any?b=c.raw(C):c=P}if(d&&d.track&&y.tag!==null&&d.track(c.path(),T,c.length,"tagged"),d&&d.track&&y.tag!==null&&d.track(c.path(),c.offset,c.length,"content"),y.any?b=b:y.choice===null?b=this._decodeGeneric(y.tag,c,d):b=this._decodeChoice(c,d),c.isError(b))return b;if(!y.any&&y.choice===null&&y.children!==null&&y.children.forEach(i(function(H){H._decode(c,d)},"decodeChildren")),y.contains&&(y.tag==="octstr"||y.tag==="bitstr")){var B=new r(b);b=this._getUse(y.contains,c._reporterState.obj)._decode(B,d)}}return y.obj&&x&&(b=c.leaveObject(O)),y.key!==null&&(b!==null||x===!0)?c.leaveKey(k,y.key,b):k!==null&&c.exitKey(k),b},"decode"),h.prototype._decodeGeneric=i(function(c,d,y){var b=this._baseState;return c==="seq"||c==="set"?null:c==="seqof"||c==="setof"?this._decodeList(d,c,b.args[0],y):/str$/.test(c)?this._decodeStr(d,c,y):c==="objid"&&b.args?this._decodeObjid(d,b.args[0],b.args[1],y):c==="objid"?this._decodeObjid(d,null,null,y):c==="gentime"||c==="utctime"?this._decodeTime(d,c,y):c==="null_"?this._decodeNull(d,y):c==="bool"?this._decodeBool(d,y):c==="objDesc"?this._decodeStr(d,c,y):c==="int"||c==="enum"?this._decodeInt(d,b.args&&b.args[0],y):b.use!==null?this._getUse(b.use,d._reporterState.obj)._decode(d,y):d.error("unknown tag: "+c)},"decodeGeneric"),h.prototype._getUse=i(function(c,d){var y=this._baseState;return y.useDecoder=this._use(c,d),a(y.useDecoder._baseState.parent===null),y.useDecoder=y.useDecoder._baseState.children[0],y.implicit!==y.useDecoder._baseState.implicit&&(y.useDecoder=y.useDecoder.clone(),y.useDecoder._baseState.implicit=y.implicit),y.useDecoder},"_getUse"),h.prototype._decodeChoice=i(function(c,d){var y=this._baseState,b=null,x=!1;return Object.keys(y.choice).some(function(k){var N=c.save(),C=y.choice[k];try{var O=C._decode(c,d);if(c.isError(O))return!1;b={type:k,value:O},x=!0}catch{return c.restore(N),!1}return!0},this),x?b:c.error("Choice not matched")},"decodeChoice"),h.prototype._createEncoderBuffer=i(function(c){return new t(c,this.reporter)},"createEncoderBuffer"),h.prototype._encode=i(function(c,d,y){var b=this._baseState;if(!(b.default!==null&&b.default===c)){var x=this._encodeValue(c,d,y);if(x!==void 0&&!this._skipDefault(x,d,y))return x}},"encode"),h.prototype._encodeValue=i(function(c,d,y){var b=this._baseState;if(b.parent===null)return b.children[0]._encode(c,d||new e);var C=null;if(this.reporter=d,b.optional&&c===void 0)if(b.default!==null)c=b.default;else return;var x=null,k=!1;if(b.any)C=this._createEncoderBuffer(c);else if(b.choice)C=this._encodeChoice(c,d);else if(b.contains)x=this._getUse(b.contains,y)._encode(c,d),k=!0;else if(b.children)x=b.children.map(function(T){if(T._baseState.tag==="null_")return T._encode(null,d,c);if(T._baseState.key===null)return d.error("Child should have a key");var P=d.enterKey(T._baseState.key);if(typeof c!="object")return d.error("Child expected, but input is not object");var B=T._encode(c[T._baseState.key],d,c);return d.leaveKey(P),B},this).filter(function(T){return T}),x=this._createEncoderBuffer(x);else if(b.tag==="seqof"||b.tag==="setof"){if(!(b.args&&b.args.length===1))return d.error("Too many args for : "+b.tag);if(!Array.isArray(c))return d.error("seqof/setof, but data is not Array");var N=this.clone();N._baseState.implicit=null,x=this._createEncoderBuffer(c.map(function(T){var P=this._baseState;return this._getUse(P.args[0],c)._encode(T,d)},N))}else b.use!==null?C=this._getUse(b.use,y)._encode(c,d):(x=this._encodePrimitive(b.tag,c),k=!0);var C;if(!b.any&&b.choice===null){var O=b.implicit!==null?b.implicit:b.tag,R=b.implicit===null?"universal":"context";O===null?b.use===null&&d.error("Tag could be omitted only for .use()"):b.use===null&&(C=this._encodeComposite(O,k,R,x))}return b.explicit!==null&&(C=this._encodeComposite(b.explicit,!1,"context",C)),C},"encode"),h.prototype._encodeChoice=i(function(c,d){var y=this._baseState,b=y.choice[c.type];return b||a(!1,c.type+" not found in "+JSON.stringify(Object.keys(y.choice))),b._encode(c.value,d)},"encodeChoice"),h.prototype._encodePrimitive=i(function(c,d){var y=this._baseState;if(/str$/.test(c))return this._encodeStr(d,c);if(c==="objid"&&y.args)return this._encodeObjid(d,y.reverseArgs[0],y.args[1]);if(c==="objid")return this._encodeObjid(d,null,null);if(c==="gentime"||c==="utctime")return this._encodeTime(d,c);if(c==="null_")return this._encodeNull();if(c==="int"||c==="enum")return this._encodeInt(d,y.args&&y.reverseArgs[0]);if(c==="bool")return this._encodeBool(d);if(c==="objDesc")return this._encodeStr(d,c);throw new Error("Unsupported tag: "+c)},"encodePrimitive"),h.prototype._isNumstr=i(function(c){return/^[0-9 ]*$/.test(c)},"isNumstr"),h.prototype._isPrintstr=i(function(c){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(c)},"isPrintstr"),Rp}i(HD,"requireNode");var X6;function vo(){return X6||(X6=1,(function(e){var t=e;t.Reporter=ZD().Reporter,t.DecoderBuffer=K6().DecoderBuffer,t.EncoderBuffer=K6().EncoderBuffer,t.Node=HD()})(Cp)),Cp}i(vo,"requireBase");var Tp={},Pp={},W6;function GD(){return W6||(W6=1,(function(e){var t=X7();e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t._reverse(e.tag)})(Pp)),Pp}i(GD,"requireDer$2");var Q6;function X7(){return Q6||(Q6=1,(function(e){var t=e;t._reverse=i(function(a){var n={};return Object.keys(a).forEach(function(s){(s|0)==s&&(s=s|0);var o=a[s];n[o]=s}),n},"reverse"),t.der=GD()})(Tp)),Tp}i(X7,"requireConstants$1");var Dp={},Lp,Y6;function W7(){if(Y6)return Lp;Y6=1;var e=Bt(),t=ll(),r=t.base,a=t.bignum,n=t.constants.der;function s(v){this.enc="der",this.name=v.name,this.entity=v,this.tree=new o,this.tree._init(v.body)}i(s,"DERDecoder"),Lp=s,s.prototype.decode=i(function(c,d){return c instanceof r.DecoderBuffer||(c=new r.DecoderBuffer(c,d)),this.tree._decode(c,d)},"decode");function o(v){r.Node.call(this,"der",v)}i(o,"DERNode"),e(o,r.Node),o.prototype._peekTag=i(function(c,d,y){if(c.isEmpty())return!1;var b=c.save(),x=h(c,'Failed to peek tag: "'+d+'"');return c.isError(x)?x:(c.restore(b),x.tag===d||x.tagStr===d||x.tagStr+"of"===d||y)},"peekTag"),o.prototype._decodeTag=i(function(c,d,y){var b=h(c,'Failed to decode tag of "'+d+'"');if(c.isError(b))return b;var x=m(c,b.primitive,'Failed to get length of "'+d+'"');if(c.isError(x))return x;if(!y&&b.tag!==d&&b.tagStr!==d&&b.tagStr+"of"!==d)return c.error('Failed to match tag: "'+d+'"');if(b.primitive||x!==null)return c.skip(x,'Failed to match body of: "'+d+'"');var k=c.save(),N=this._skipUntilEnd(c,'Failed to skip indefinite length body: "'+this.tag+'"');return c.isError(N)?N:(x=c.offset-k.offset,c.restore(k),c.skip(x,'Failed to match body of: "'+d+'"'))},"decodeTag"),o.prototype._skipUntilEnd=i(function(c,d){for(;;){var y=h(c,d);if(c.isError(y))return y;var b=m(c,y.primitive,d);if(c.isError(b))return b;var x;if(y.primitive||b!==null?x=c.skip(b):x=this._skipUntilEnd(c,d),c.isError(x))return x;if(y.tagStr==="end")break}},"skipUntilEnd"),o.prototype._decodeList=i(function(c,d,y,b){for(var x=[];!c.isEmpty();){var k=this._peekTag(c,"end");if(c.isError(k))return k;var N=y.decode(c,"der",b);if(c.isError(N)&&k)break;x.push(N)}return x},"decodeList"),o.prototype._decodeStr=i(function(c,d){if(d==="bitstr"){var y=c.readUInt8();return c.isError(y)?y:{unused:y,data:c.raw()}}else if(d==="bmpstr"){var b=c.raw();if(b.length%2===1)return c.error("Decoding of string type: bmpstr length mismatch");for(var x="",k=0;k<b.length/2;k++)x+=String.fromCharCode(b.readUInt16BE(k*2));return x}else if(d==="numstr"){var N=c.raw().toString("ascii");return this._isNumstr(N)?N:c.error("Decoding of string type: numstr unsupported characters")}else{if(d==="octstr")return c.raw();if(d==="objDesc")return c.raw();if(d==="printstr"){var C=c.raw().toString("ascii");return this._isPrintstr(C)?C:c.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(d)?c.raw().toString():c.error("Decoding of string type: "+d+" unsupported")}},"decodeStr"),o.prototype._decodeObjid=i(function(c,d,y){for(var b,x=[],k=0;!c.isEmpty();){var N=c.readUInt8();k<<=7,k|=N&127,(N&128)===0&&(x.push(k),k=0)}N&128&&x.push(k);var C=x[0]/40|0,O=x[0]%40;if(y?b=x:b=[C,O].concat(x.slice(1)),d){var R=d[b.join(" ")];R===void 0&&(R=d[b.join(".")]),R!==void 0&&(b=R)}return b},"decodeObjid"),o.prototype._decodeTime=i(function(c,d){var y=c.raw().toString();if(d==="gentime")var b=y.slice(0,4)|0,x=y.slice(4,6)|0,k=y.slice(6,8)|0,N=y.slice(8,10)|0,C=y.slice(10,12)|0,O=y.slice(12,14)|0;else if(d==="utctime"){var b=y.slice(0,2)|0,x=y.slice(2,4)|0,k=y.slice(4,6)|0,N=y.slice(6,8)|0,C=y.slice(8,10)|0,O=y.slice(10,12)|0;b<70?b=2e3+b:b=1900+b}else return c.error("Decoding "+d+" time is not supported yet");return Date.UTC(b,x-1,k,N,C,O,0)},"decodeTime"),o.prototype._decodeNull=i(function(c){return null},"decodeNull"),o.prototype._decodeBool=i(function(c){var d=c.readUInt8();return c.isError(d)?d:d!==0},"decodeBool"),o.prototype._decodeInt=i(function(c,d){var y=c.raw(),b=new a(y);return d&&(b=d[b.toString(10)]||b),b},"decodeInt"),o.prototype._use=i(function(c,d){return typeof c=="function"&&(c=c(d)),c._getDecoder("der").tree},"use");function h(v,c){var d=v.readUInt8(c);if(v.isError(d))return d;var y=n.tagClass[d>>6],b=(d&32)===0;if((d&31)===31){var x=d;for(d=0;(x&128)===128;){if(x=v.readUInt8(c),v.isError(x))return x;d<<=7,d|=x&127}}else d&=31;var k=n.tag[d];return{cls:y,primitive:b,tag:d,tagStr:k}}i(h,"derDecodeTag");function m(v,c,d){var y=v.readUInt8(d);if(v.isError(y))return y;if(!c&&y===128)return null;if((y&128)===0)return y;var b=y&127;if(b>4)return v.error("length octect is too long");y=0;for(var x=0;x<b;x++){y<<=8;var k=v.readUInt8(d);if(v.isError(k))return k;y|=k}return y}return i(m,"derDecodeLen"),Lp}i(W7,"requireDer$1");var Bp,ex;function JD(){if(ex)return Bp;ex=1;var e=Bt(),t=Hn().Buffer,r=W7();function a(n){r.call(this,n),this.enc="pem"}return i(a,"PEMDecoder"),e(a,r),Bp=a,a.prototype.decode=i(function(s,o){for(var h=s.toString().split(/[\r\n]+/g),m=o.label.toUpperCase(),v=/^-----(BEGIN|END) ([^-]+)-----$/,c=-1,d=-1,y=0;y<h.length;y++){var b=h[y].match(v);if(b!==null&&b[2]===m)if(c===-1){if(b[1]!=="BEGIN")break;c=y}else{if(b[1]!=="END")break;d=y;break}}if(c===-1||d===-1)throw new Error("PEM section not found for: "+m);var x=h.slice(c+1,d).join("");x.replace(/[^a-z0-9\+\/=]+/gi,"");var k=new t(x,"base64");return r.prototype.decode.call(this,k,o)},"decode"),Bp}i(JD,"requirePem$1");var tx;function KD(){return tx||(tx=1,(function(e){var t=e;t.der=W7(),t.pem=JD()})(Dp)),Dp}i(KD,"requireDecoders");var zp={},Up,rx;function Q7(){if(rx)return Up;rx=1;var e=Bt(),t=Hn().Buffer,r=ll(),a=r.base,n=r.constants.der;function s(v){this.enc="der",this.name=v.name,this.entity=v,this.tree=new o,this.tree._init(v.body)}i(s,"DEREncoder"),Up=s,s.prototype.encode=i(function(c,d){return this.tree._encode(c,d).join()},"encode");function o(v){a.Node.call(this,"der",v)}i(o,"DERNode"),e(o,a.Node),o.prototype._encodeComposite=i(function(c,d,y,b){var x=m(c,d,y,this.reporter);if(b.length<128){var C=new t(2);return C[0]=x,C[1]=b.length,this._createEncoderBuffer([C,b])}for(var k=1,N=b.length;N>=256;N>>=8)k++;var C=new t(2+k);C[0]=x,C[1]=128|k;for(var N=1+k,O=b.length;O>0;N--,O>>=8)C[N]=O&255;return this._createEncoderBuffer([C,b])},"encodeComposite"),o.prototype._encodeStr=i(function(c,d){if(d==="bitstr")return this._createEncoderBuffer([c.unused|0,c.data]);if(d==="bmpstr"){for(var y=new t(c.length*2),b=0;b<c.length;b++)y.writeUInt16BE(c.charCodeAt(b),b*2);return this._createEncoderBuffer(y)}else return d==="numstr"?this._isNumstr(c)?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: numstr supports only digits and space"):d==="printstr"?this._isPrintstr(c)?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(d)?this._createEncoderBuffer(c):d==="objDesc"?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: "+d+" unsupported")},"encodeStr"),o.prototype._encodeObjid=i(function(c,d,y){if(typeof c=="string"){if(!d)return this.reporter.error("string objid given, but no values map found");if(!d.hasOwnProperty(c))return this.reporter.error("objid not found in values map");c=d[c].split(/[\s\.]+/g);for(var b=0;b<c.length;b++)c[b]|=0}else if(Array.isArray(c)){c=c.slice();for(var b=0;b<c.length;b++)c[b]|=0}if(!Array.isArray(c))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(c));if(!y){if(c[1]>=40)return this.reporter.error("Second objid identifier OOB");c.splice(0,2,c[0]*40+c[1])}for(var x=0,b=0;b<c.length;b++){var k=c[b];for(x++;k>=128;k>>=7)x++}for(var N=new t(x),C=N.length-1,b=c.length-1;b>=0;b--){var k=c[b];for(N[C--]=k&127;(k>>=7)>0;)N[C--]=128|k&127}return this._createEncoderBuffer(N)},"encodeObjid");function h(v){return v<10?"0"+v:v}i(h,"two"),o.prototype._encodeTime=i(function(c,d){var y,b=new Date(c);return d==="gentime"?y=[h(b.getFullYear()),h(b.getUTCMonth()+1),h(b.getUTCDate()),h(b.getUTCHours()),h(b.getUTCMinutes()),h(b.getUTCSeconds()),"Z"].join(""):d==="utctime"?y=[h(b.getFullYear()%100),h(b.getUTCMonth()+1),h(b.getUTCDate()),h(b.getUTCHours()),h(b.getUTCMinutes()),h(b.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+d+" time is not supported yet"),this._encodeStr(y,"octstr")},"encodeTime"),o.prototype._encodeNull=i(function(){return this._createEncoderBuffer("")},"encodeNull"),o.prototype._encodeInt=i(function(c,d){if(typeof c=="string"){if(!d)return this.reporter.error("String int or enum given, but no values map");if(!d.hasOwnProperty(c))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(c));c=d[c]}if(typeof c!="number"&&!t.isBuffer(c)){var y=c.toArray();!c.sign&&y[0]&128&&y.unshift(0),c=new t(y)}if(t.isBuffer(c)){var b=c.length;c.length===0&&b++;var k=new t(b);return c.copy(k),c.length===0&&(k[0]=0),this._createEncoderBuffer(k)}if(c<128)return this._createEncoderBuffer(c);if(c<256)return this._createEncoderBuffer([0,c]);for(var b=1,x=c;x>=256;x>>=8)b++;for(var k=new Array(b),x=k.length-1;x>=0;x--)k[x]=c&255,c>>=8;return k[0]&128&&k.unshift(0),this._createEncoderBuffer(new t(k))},"encodeInt"),o.prototype._encodeBool=i(function(c){return this._createEncoderBuffer(c?255:0)},"encodeBool"),o.prototype._use=i(function(c,d){return typeof c=="function"&&(c=c(d)),c._getEncoder("der").tree},"use"),o.prototype._skipDefault=i(function(c,d,y){var b=this._baseState,x;if(b.default===null)return!1;var k=c.join();if(b.defaultBuffer===void 0&&(b.defaultBuffer=this._encodeValue(b.default,d,y).join()),k.length!==b.defaultBuffer.length)return!1;for(x=0;x<k.length;x++)if(k[x]!==b.defaultBuffer[x])return!1;return!0},"skipDefault");function m(v,c,d,y){var b;if(v==="seqof"?v="seq":v==="setof"&&(v="set"),n.tagByName.hasOwnProperty(v))b=n.tagByName[v];else if(typeof v=="number"&&(v|0)===v)b=v;else return y.error("Unknown tag: "+v);return b>=31?y.error("Multi-octet tag encoding unsupported"):(c||(b|=32),b|=n.tagClassByName[d||"universal"]<<6,b)}return i(m,"encodeTag"),Up}i(Q7,"requireDer");var Fp,ix;function qD(){if(ix)return Fp;ix=1;var e=Bt(),t=Q7();function r(a){t.call(this,a),this.enc="pem"}return i(r,"PEMEncoder"),e(r,t),Fp=r,r.prototype.encode=i(function(n,s){for(var o=t.prototype.encode.call(this,n),h=o.toString("base64"),m=["-----BEGIN "+s.label+"-----"],v=0;v<h.length;v+=64)m.push(h.slice(v,v+64));return m.push("-----END "+s.label+"-----"),m.join(`
@@ -152,4 +152,4 @@ and limitations under the License.
152
152
  transition-all duration-300 ease-in-out
153
153
  ${C==="agents"&&o>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none"}
154
154
  `,children:o})]}),j.jsx(Mo,{value:"groups",className:"rounded-full data-[state=active]:border-b-0 data-[state=active]:bg-white data-[state=active]:text-black data-[state=active]:font-bold cursor-pointer text-lg py-1",children:"Groups"})]}),j.jsxs(et,{variant:"ghost",onClick:i(()=>{C==="agents"?n("/create"):P()},"onClick"),className:"create-agent-button cursor-pointer gap-1",children:[j.jsx(jf,{className:"w-4 h-4"}),C==="agents"?"Create New Agent":"Create New Group"]})]}),j.jsx(ti,{})]})}),j.jsx(wi,{value:"agents",className:"flex-1 mt-0 bg-background",children:j.jsxs("div",{className:"flex flex-col gap-6 w-full md:max-w-4xl mx-auto px-6 py-2",children:[t&&j.jsx("div",{className:"text-center py-8",children:"Loading agents..."}),r&&j.jsxs("div",{className:"text-center py-8",children:["Error loading agents: ",a instanceof Error?a.message:"Unknown error"]}),s.length===0&&!t&&j.jsx("div",{className:"text-center py-8 flex flex-col items-center gap-4",children:j.jsx("p",{className:"text-muted-foreground",children:"No agents currently running. Start a character to begin."})}),!t&&!r&&j.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 gap-3 agents-section",children:s.sort((B,Z)=>{const H=B.status===pr.ACTIVE?1:0;return(Z.status===pr.ACTIVE?1:0)-H}).map(B=>j.jsx(Kte,{agent:B,onChat:i(Z=>T(B,Z),"onChat")},B.id))})]})}),j.jsx(wi,{value:"groups",className:"flex-1 mt-0 bg-background",children:j.jsx("div",{className:"flex flex-col gap-6 w-full md:max-w-4xl mx-auto px-6 py-2",children:!t&&!r&&j.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 gap-3 groups-section",children:m.map(B=>j.jsx(xC,{serverId:B.id},B.id))})})})]})})}),b?.id&&j.jsx(vI,{isOpen:v,onClose:R,agentId:b.id}),d&&j.jsx(Vc,{onClose:i(()=>{N(null),y(!1)},"onClose"),channelId:k??void 0})]})}i(Xte,"Home");const xC=Cf.memo(({serverId:e})=>{const{data:t,isLoading:r}=cy(e),a=J.useMemo(()=>t?.data?.channels?.filter(n=>n.type===bt.GROUP)||[],[t]);return r?j.jsx("p",{children:"Loading channels for server..."}):!a||a.length===0?j.jsx("p",{className:"text-sm text-muted-foreground",children:"No group channels in this server."}):j.jsx(j.Fragment,{children:a.map(n=>j.jsx(qte,{group:{...n,server_id:e}},n.id))})});xC.displayName="ServerChannels";function Wte(){const t=Af().pathname,r=t.startsWith("/api/")||t.includes("/agents/")||t.includes("/memory/")||t.includes("/speech/");return j.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[70vh] px-4 text-center",children:[j.jsx("div",{className:"flex items-center justify-center mb-8",children:j.jsx("div",{className:"bg-red-900/20 h-24 w-24 rounded-full flex items-center justify-center",children:j.jsx(ci,{className:"h-14 w-14 text-red-500"})})}),j.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Page Not Found"}),j.jsxs("div",{className:"max-w-lg",children:[r?j.jsxs(j.Fragment,{children:[j.jsxs("p",{className:"text-lg mb-6 text-muted-foreground",children:["The endpoint ",j.jsx("span",{className:"font-mono text-red-400",children:t})," does not exist."]}),j.jsxs("div",{className:"bg-red-900/20 border border-red-800/30 rounded-md p-4 mb-8 text-left",children:[j.jsxs("h3",{className:"text-red-400 font-medium mb-2 flex items-center",children:[j.jsx(ci,{className:"h-4 w-4 mr-2"}),"Endpoint Not Found"]}),j.jsx("p",{className:"text-sm text-red-300/80 mb-2",children:"The requested API endpoint does not exist on this server. Please check that:"}),j.jsxs("ul",{className:"text-sm text-red-300/80 list-disc pl-5 space-y-1",children:[j.jsx("li",{children:"The URL is spelled correctly"}),j.jsx("li",{children:"You're using the correct version of the API"}),j.jsx("li",{children:"The endpoint is available in this version of Eliza"})]})]})]}):j.jsx("p",{className:"text-lg mb-6 text-muted-foreground",children:"Sorry, the page you're looking for doesn't exist or has been moved."}),j.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[j.jsx(et,{asChild:!0,variant:"default",children:j.jsxs(WO,{to:"/",children:[j.jsx(QO,{className:"h-4 w-4 mr-2"}),"Go to Home"]})}),j.jsx(et,{asChild:!0,variant:"outline",children:j.jsxs("a",{onClick:i(()=>window.history.back(),"onClick"),children:[j.jsx(Km,{className:"h-4 w-4 mr-2"}),"Go Back"]})})]})]})]})}i(Wte,"NotFound");function Qte(){const{channelId:e}=cv(),[t]=YO(),r=t.get("serverId"),a=Jo(e),n=Jo(r||"");return!a||!n?j.jsx("div",{className:"flex flex-1 justify-center items-center",children:j.jsx("p",{children:"Missing channel or server information."})}):j.jsx(wC,{chatType:bt.GROUP,contextId:a,serverId:n},a)}i(Qte,"GroupRoute");function Yte(){const e=jr();return j.jsx("div",{className:"pt-4 md:pt-8",children:j.jsx(Vc,{onClose:i(()=>e(-1),"onClose")})})}i(Yte,"GroupNew");function ere(){const{agentId:e}=cv(),t=jr(),{data:r,isLoading:a}=kl(e);if(a)return j.jsx("div",{className:"flex items-center justify-center h-full",children:j.jsx(Ar,{className:"h-8 w-8 animate-spin"})});if(!r?.data)return j.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[j.jsx("p",{className:"text-muted-foreground",children:"Agent not found"}),j.jsx(et,{onClick:i(()=>t("/"),"onClick"),children:"Back to Home"})]});const n={...r.data,createdAt:r.data.createdAt??Date.now(),bio:r.data.bio??[],topics:r.data.topics??[],adjectives:r.data.adjectives??[],style:r.data.style??{all:[],chat:[],post:[]},settings:r.data.settings??{secrets:{}}};return j.jsx("div",{className:"flex w-full justify-center px-4 sm:px-6 overflow-y-auto",children:j.jsx("div",{className:"w-full md:max-w-4xl py-6",children:j.jsx(XI,{agent:n,agentId:e,onSaveComplete:i(()=>{},"onSaveComplete")})})})}i(ere,"AgentSettingsRoute");const _C=new tR({defaultOptions:{queries:{staleTime:er.STANDARD,refetchInterval:!1,retry:3,retryDelay:i(e=>Math.min(1e3*2**e,3e4),"retryDelay"),refetchOnWindowFocus:!0,refetchOnReconnect:!0},mutations:{retry:3,retryDelay:i(e=>Math.min(1e3*2**e,3e4),"retryDelay")}}}),SC=i(async()=>{try{await _C.prefetchQuery({queryKey:["agents"],queryFn:i(async()=>({data:await Yt().agents.listAgents()}),"queryFn"),staleTime:er.FREQUENT})}catch(e){console.error("Error prefetching initial data:",e)}},"prefetchInitialData");SC();function tre(){RW();const{status:e}=ly(),[t,r]=J.useState(!1),[a,n]=J.useState(Date.now()),s=xr();J.useEffect(()=>{Ke.info("[AppContent] Mounted/Updated"),SC()},[]);const o=i(()=>{Ke.info("[AppContent] refreshHomePage called. Current homeKey:",a);const h=Date.now();n(h),Ke.info("[AppContent] New homeKey set to:",h),Ke.info("[AppContent] Invalidating queries for Home page refresh."),s.invalidateQueries({queryKey:["agents"]}),s.invalidateQueries({queryKey:["servers"]})},"refreshHomePage");return j.jsxs(ns,{delayDuration:0,children:[j.jsxs(W5,{children:[j.jsx(g8,{refreshHomePage:o}),j.jsxs(Y5,{className:"h-screen flex flex-col md:ml-72 overflow-hidden",children:[j.jsx("div",{className:"md:hidden absolute top-4 left-4 z-50",children:j.jsxs(K5,{open:t,onOpenChange:r,children:[j.jsx(JR,{asChild:!0,children:j.jsxs(et,{variant:"ghost",size:"icon","data-testid":"mobile-menu-button",children:[j.jsx(iR,{className:"h-5 w-5"}),j.jsx("span",{className:"sr-only",children:"Toggle menu"})]})}),j.jsx(gv,{side:"left",className:"w-80 p-0 z-50",children:j.jsx(g8,{isMobile:!0,refreshHomePage:o})})]})}),j.jsx("div",{className:"flex w-full justify-center pt-16 md:pt-0 flex-shrink-0",children:j.jsx("div",{className:"w-full md:max-w-4xl",children:j.jsx(HX,{})})}),j.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:j.jsxs(nR,{children:[j.jsx(mi,{path:"/",element:j.jsx(Xte,{},a)}),j.jsx(mi,{path:"chat/:agentId/:channelId",element:j.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:j.jsx(L_,{})})}),j.jsx(mi,{path:"chat/:agentId",element:j.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:j.jsx(L_,{})})}),j.jsx(mi,{path:"settings/:agentId",element:j.jsx(ere,{})}),j.jsx(mi,{path:"group/new",element:j.jsx(Yte,{})}),j.jsx(mi,{path:"agents/new",element:j.jsx(Gte,{})}),j.jsx(mi,{path:"/create",element:j.jsx("div",{className:"flex w-full justify-center px-4 sm:px-6 overflow-y-auto",children:j.jsx("div",{className:"w-full md:max-w-4xl",children:j.jsx(TN,{})})})}),j.jsx(mi,{path:"/logs",element:j.jsx("div",{className:"flex w-full justify-center",children:j.jsxs("div",{className:"w-full md:max-w-4xl",children:[j.jsx("div",{className:"flex items-center justify-between mb-4",children:j.jsx("h2",{className:"text-2xl p-4 font-bold",children:"System Logs"})}),j.jsx(sI,{})]})})}),j.jsx(mi,{path:"group/:channelId",element:j.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:j.jsx(Qte,{})})}),j.jsx(mi,{path:"settings/",element:j.jsx("div",{className:"flex w-full justify-center overflow-y-auto",children:j.jsx("div",{className:"w-full md:max-w-4xl",children:j.jsx(JX,{})})})}),j.jsx(mi,{path:"*",element:j.jsx(Wte,{})})]})})]})]}),j.jsx(aW,{}),e!=="unauthorized"&&j.jsx(rW,{})]})}i(tre,"AppContent");function rre(){return j.jsx(eR,{client:_C,children:j.jsx("div",{className:"dark antialiased font-sans",style:{colorScheme:"dark"},children:j.jsx(rR,{children:j.jsx(ZK,{children:j.jsx(vX,{children:j.jsx(tre,{})})})})})})}i(rre,"App");const MC=document.getElementById("root");if(!MC)throw new Error("Root element not found");aR.createRoot(MC).render(j.jsx(J.StrictMode,{children:j.jsx(rre,{})}))});export default ire();
155
- //# sourceMappingURL=main-r3TR7Sku.js.map
155
+ //# sourceMappingURL=main-D0cDyU0U.js.map