mario-core 2.0.125-release → 2.0.126-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Dashboard-DghZp-DY.mjs +206 -0
- package/dist/Dashboard-DlYSjl_v.js +1 -0
- package/dist/EmailTemplateDetail-CTm45E9v.mjs +443 -0
- package/dist/EmailTemplateDetail-gEFgDpUL.js +1 -0
- package/dist/EmailTemplateList-BMUfPdlS.mjs +170 -0
- package/dist/EmailTemplateList-ONLWbg1A.js +1 -0
- package/dist/GalleryList-4orsP-Hj.js +1 -0
- package/dist/GalleryList-DUjEqWiL.mjs +329 -0
- package/dist/Login-DYY40AhH.mjs +1699 -0
- package/dist/Login-mv6rU86S.js +1 -0
- package/dist/NotificationList-B8QA__0a.mjs +3658 -0
- package/dist/NotificationList-BNkeEQdH.js +2 -0
- package/dist/SkillList-CU_1-Iaz.js +1 -0
- package/dist/SkillList-_CGxFVan.mjs +386 -0
- package/dist/TeacherSelector-C9HSJpwB.js +1 -0
- package/dist/TeacherSelector-CeQStIjC.mjs +30 -0
- package/dist/TheContent-CRdTKAO2.js +1 -0
- package/dist/TheContent-DhAC2Pag.mjs +38 -0
- package/dist/UserContainer-BG88LrHG.js +5 -0
- package/dist/UserContainer-CZnWnIxe.mjs +2696 -0
- package/dist/UserDetail-8VoY0zAK.mjs +912 -0
- package/dist/UserDetail-XxeFBQb0.js +1 -0
- package/dist/UserList-drpkL0az.js +7 -0
- package/dist/UserList-tJN8p4bW.mjs +1512 -0
- package/dist/constants-DMGfBpO6.js +1 -0
- package/dist/constants-KowNPaKI.mjs +241 -0
- package/dist/index-B0KHEYvr.js +15 -0
- package/dist/index-BpI8f2Tq.mjs +19607 -0
- package/dist/index.js +1 -1
- package/dist/index.modern.js +150 -147
- package/dist/mailCategoryService-CleISU3d.mjs +11 -0
- package/dist/mailCategoryService-LdvLPQRm.js +1 -0
- package/dist/shared/gradeYear/index.d.ts +1 -0
- package/dist/shared/gradeYear/tierLabel.d.ts +3 -0
- package/dist/userService-Ce6Rl3kx.js +1 -0
- package/dist/userService-CkO5JV9X.mjs +47 -0
- package/package.json +113 -113
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react/jsx-runtime"),ce=require("reactstrap"),Mt=require("./index-B0KHEYvr.js"),ue=require("react"),_e=require("react-redux"),Yr=require("react-router-dom"),Jr=require("react-i18next");function Xr(dt){return Mt.GenIcon({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M103.77,185.94C103.38,187.49,93.63,224,40,224a8,8,0,0,1-8-8c0-53.63,36.51-63.38,38.06-63.77a8,8,0,0,1,3.88,15.53c-.9.25-22.42,6.54-25.56,39.86C81.7,204.48,88,183,88.26,182a8,8,0,0,1,15.51,4Zm93-67.4L192,123.31v58.33A15.91,15.91,0,0,1,187.32,193L153,227.3A15.91,15.91,0,0,1,141.7,232a16.11,16.11,0,0,1-5.1-.83,15.94,15.94,0,0,1-10.78-12.92l-5.37-38.49L76.24,135.55l-38.47-5.37A16,16,0,0,1,28.7,103L63,68.68A15.91,15.91,0,0,1,74.36,64h58.33l4.77-4.77c26.68-26.67,58.83-27.82,71.41-27.07a16,16,0,0,1,15,15C224.6,59.71,223.45,91.86,196.78,118.54ZM40,114.34l37.15,5.18L116.69,80H74.36ZM91.32,128,128,164.68l57.45-57.45a76.46,76.46,0,0,0,22.42-59.16,76.65,76.65,0,0,0-59.11,22.47ZM176,139.31l-39.53,39.53L141.67,216,176,181.64Z"}}]})(dt)}const Wr=[{value:!0,label:"Read"},{value:!1,label:"Unread"}],Gr=({value:dt,onChange:Wt})=>{const Ct={menu:K=>({...K,zIndex:10}),control:(K,ht)=>({...K,borderRadius:"24px",borderColor:(ht.isFocused,"#e5e7eb"),boxShadow:"none",minHeight:"42px","&:hover":{borderColor:"#e5e7eb"}}),valueContainer:K=>({...K,padding:"0 16px"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:K=>({...K,padding:"0 12px 0 0",color:"#9ca3af"})};return J.jsx(Mt.CustomSelector,{defaultValue:dt,options:Wr,onChange:Wt,styles:Ct})},Kr=ue.memo(Gr);function Zr(dt){return dt&&dt.__esModule&&Object.prototype.hasOwnProperty.call(dt,"default")?dt.default:dt}var vn={exports:{}};var Rn;function Vr(){return Rn||(Rn=1,(function(dt,Wt){(function(K,ht){dt.exports=ht()})(window,function(){return(function(Ct){var K={};function ht(S){if(K[S])return K[S].exports;var v=K[S]={i:S,l:!1,exports:{}};return Ct[S].call(v.exports,v,v.exports,ht),v.l=!0,v.exports}return ht.m=Ct,ht.c=K,ht.d=function(S,v,St){ht.o(S,v)||Object.defineProperty(S,v,{enumerable:!0,get:St})},ht.r=function(S){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},ht.t=function(S,v){if(v&1&&(S=ht(S)),v&8||v&4&&typeof S=="object"&&S&&S.__esModule)return S;var St=Object.create(null);if(ht.r(St),Object.defineProperty(St,"default",{enumerable:!0,value:S}),v&2&&typeof S!="string")for(var st in S)ht.d(St,st,(function(qt){return S[qt]}).bind(null,st));return St},ht.n=function(S){var v=S&&S.__esModule?function(){return S.default}:function(){return S};return ht.d(v,"a",v),v},ht.o=function(S,v){return Object.prototype.hasOwnProperty.call(S,v)},ht.p="",ht(ht.s=3)})([(function(Ct,K,ht){var S=this&&this.__extends||(function(){var q=function(T,L){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,M){G.__proto__=M}||function(G,M){for(var mt in M)M.hasOwnProperty(mt)&&(G[mt]=M[mt])},q(T,L)};return function(T,L){q(T,L);function G(){this.constructor=T}T.prototype=L===null?Object.create(L):(G.prototype=L.prototype,new G)}})();Object.defineProperty(K,"__esModule",{value:!0});var v=256,St=(function(){function q(T){T===void 0&&(T="="),this._paddingCharacter=T}return q.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},q.prototype.encode=function(T){for(var L="",G=0;G<T.length-2;G+=3){var M=T[G]<<16|T[G+1]<<8|T[G+2];L+=this._encodeByte(M>>>18&63),L+=this._encodeByte(M>>>12&63),L+=this._encodeByte(M>>>6&63),L+=this._encodeByte(M>>>0&63)}var mt=T.length-G;if(mt>0){var M=T[G]<<16|(mt===2?T[G+1]<<8:0);L+=this._encodeByte(M>>>18&63),L+=this._encodeByte(M>>>12&63),mt===2?L+=this._encodeByte(M>>>6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},q.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},q.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},q.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(T),G=T.length-L,M=new Uint8Array(this.maxDecodedLength(G)),mt=0,rt=0,Yt=0,Kt=0,Bt=0,zt=0,Dt=0;rt<G-4;rt+=4)Kt=this._decodeChar(T.charCodeAt(rt+0)),Bt=this._decodeChar(T.charCodeAt(rt+1)),zt=this._decodeChar(T.charCodeAt(rt+2)),Dt=this._decodeChar(T.charCodeAt(rt+3)),M[mt++]=Kt<<2|Bt>>>4,M[mt++]=Bt<<4|zt>>>2,M[mt++]=zt<<6|Dt,Yt|=Kt&v,Yt|=Bt&v,Yt|=zt&v,Yt|=Dt&v;if(rt<G-1&&(Kt=this._decodeChar(T.charCodeAt(rt)),Bt=this._decodeChar(T.charCodeAt(rt+1)),M[mt++]=Kt<<2|Bt>>>4,Yt|=Kt&v,Yt|=Bt&v),rt<G-2&&(zt=this._decodeChar(T.charCodeAt(rt+2)),M[mt++]=Bt<<4|zt>>>2,Yt|=zt&v),rt<G-3&&(Dt=this._decodeChar(T.charCodeAt(rt+3)),M[mt++]=zt<<6|Dt,Yt|=Dt&v),Yt!==0)throw new Error("Base64Coder: incorrect characters for decoding");return M},q.prototype._encodeByte=function(T){var L=T;return L+=65,L+=25-T>>>8&6,L+=51-T>>>8&-75,L+=61-T>>>8&-15,L+=62-T>>>8&3,String.fromCharCode(L)},q.prototype._decodeChar=function(T){var L=v;return L+=(42-T&T-44)>>>8&-v+T-43+62,L+=(46-T&T-48)>>>8&-v+T-47+63,L+=(47-T&T-58)>>>8&-v+T-48+52,L+=(64-T&T-91)>>>8&-v+T-65+0,L+=(96-T&T-123)>>>8&-v+T-97+26,L},q.prototype._getPaddingLength=function(T){var L=0;if(this._paddingCharacter){for(var G=T.length-1;G>=0&&T[G]===this._paddingCharacter;G--)L++;if(T.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},q})();K.Coder=St;var st=new St;function qt(q){return st.encode(q)}K.encode=qt;function R(q){return st.decode(q)}K.decode=R;var at=(function(q){S(T,q);function T(){return q!==null&&q.apply(this,arguments)||this}return T.prototype._encodeByte=function(L){var G=L;return G+=65,G+=25-L>>>8&6,G+=51-L>>>8&-75,G+=61-L>>>8&-13,G+=62-L>>>8&49,String.fromCharCode(G)},T.prototype._decodeChar=function(L){var G=v;return G+=(44-L&L-46)>>>8&-v+L-45+62,G+=(94-L&L-96)>>>8&-v+L-95+63,G+=(47-L&L-58)>>>8&-v+L-48+52,G+=(64-L&L-91)>>>8&-v+L-65+0,G+=(96-L&L-123)>>>8&-v+L-97+26,G},T})(St);K.URLSafeCoder=at;var V=new at;function F(q){return V.encode(q)}K.encodeURLSafe=F;function _t(q){return V.decode(q)}K.decodeURLSafe=_t,K.encodedLength=function(q){return st.encodedLength(q)},K.maxDecodedLength=function(q){return st.maxDecodedLength(q)},K.decodedLength=function(q){return st.decodedLength(q)}}),(function(Ct,K,ht){Object.defineProperty(K,"__esModule",{value:!0});var S="utf8: invalid string",v="utf8: invalid source encoding";function St(R){for(var at=new Uint8Array(st(R)),V=0,F=0;F<R.length;F++){var _t=R.charCodeAt(F);_t<128?at[V++]=_t:_t<2048?(at[V++]=192|_t>>6,at[V++]=128|_t&63):_t<55296?(at[V++]=224|_t>>12,at[V++]=128|_t>>6&63,at[V++]=128|_t&63):(F++,_t=(_t&1023)<<10,_t|=R.charCodeAt(F)&1023,_t+=65536,at[V++]=240|_t>>18,at[V++]=128|_t>>12&63,at[V++]=128|_t>>6&63,at[V++]=128|_t&63)}return at}K.encode=St;function st(R){for(var at=0,V=0;V<R.length;V++){var F=R.charCodeAt(V);if(F<128)at+=1;else if(F<2048)at+=2;else if(F<55296)at+=3;else if(F<=57343){if(V>=R.length-1)throw new Error(S);V++,at+=4}else throw new Error(S)}return at}K.encodedLength=st;function qt(R){for(var at=[],V=0;V<R.length;V++){var F=R[V];if(F&128){var _t=void 0;if(F<224){if(V>=R.length)throw new Error(v);var q=R[++V];if((q&192)!==128)throw new Error(v);F=(F&31)<<6|q&63,_t=128}else if(F<240){if(V>=R.length-1)throw new Error(v);var q=R[++V],T=R[++V];if((q&192)!==128||(T&192)!==128)throw new Error(v);F=(F&15)<<12|(q&63)<<6|T&63,_t=2048}else if(F<248){if(V>=R.length-2)throw new Error(v);var q=R[++V],T=R[++V],L=R[++V];if((q&192)!==128||(T&192)!==128||(L&192)!==128)throw new Error(v);F=(F&15)<<18|(q&63)<<12|(T&63)<<6|L&63,_t=65536}else throw new Error(v);if(F<_t||F>=55296&&F<=57343)throw new Error(v);if(F>=65536){if(F>1114111)throw new Error(v);F-=65536,at.push(String.fromCharCode(55296|F>>10)),F=56320|F&1023}}at.push(String.fromCharCode(F))}return at.join("")}K.decode=qt}),(function(Ct,K,ht){(function(S){var v=function(i){var f,a=new Float64Array(16);if(i)for(f=0;f<i.length;f++)a[f]=i[f];return a},St=function(){throw new Error("no PRNG")},st=new Uint8Array(16),qt=new Uint8Array(32);qt[0]=9;var R=v(),at=v([1]),V=v([56129,1]),F=v([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),_t=v([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),q=v([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),T=v([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),L=v([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function G(i,f,a,n){i[f]=a>>24&255,i[f+1]=a>>16&255,i[f+2]=a>>8&255,i[f+3]=a&255,i[f+4]=n>>24&255,i[f+5]=n>>16&255,i[f+6]=n>>8&255,i[f+7]=n&255}function M(i,f,a,n,c){var l,p=0;for(l=0;l<c;l++)p|=i[f+l]^a[n+l];return(1&p-1>>>8)-1}function mt(i,f,a,n){return M(i,f,a,n,16)}function rt(i,f,a,n){return M(i,f,a,n,32)}function Yt(i,f,a,n){for(var c=n[0]&255|(n[1]&255)<<8|(n[2]&255)<<16|(n[3]&255)<<24,l=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,p=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,_=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,C=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,U=n[4]&255|(n[5]&255)<<8|(n[6]&255)<<16|(n[7]&255)<<24,A=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,xt=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,k=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,z=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,D=n[8]&255|(n[9]&255)<<8|(n[10]&255)<<16|(n[11]&255)<<24,Q=a[16]&255|(a[17]&255)<<8|(a[18]&255)<<16|(a[19]&255)<<24,Z=a[20]&255|(a[21]&255)<<8|(a[22]&255)<<16|(a[23]&255)<<24,$=a[24]&255|(a[25]&255)<<8|(a[26]&255)<<16|(a[27]&255)<<24,X=a[28]&255|(a[29]&255)<<8|(a[30]&255)<<16|(a[31]&255)<<24,Y=n[12]&255|(n[13]&255)<<8|(n[14]&255)<<16|(n[15]&255)<<24,j=c,B=l,E=p,N=_,I=C,P=U,d=A,x=xt,m=k,g=z,b=D,w=Q,H=Z,tt=$,nt=X,et=Y,u,ot=0;ot<20;ot+=2)u=j+H|0,I^=u<<7|u>>>25,u=I+j|0,m^=u<<9|u>>>23,u=m+I|0,H^=u<<13|u>>>19,u=H+m|0,j^=u<<18|u>>>14,u=P+B|0,g^=u<<7|u>>>25,u=g+P|0,tt^=u<<9|u>>>23,u=tt+g|0,B^=u<<13|u>>>19,u=B+tt|0,P^=u<<18|u>>>14,u=b+d|0,nt^=u<<7|u>>>25,u=nt+b|0,E^=u<<9|u>>>23,u=E+nt|0,d^=u<<13|u>>>19,u=d+E|0,b^=u<<18|u>>>14,u=et+w|0,N^=u<<7|u>>>25,u=N+et|0,x^=u<<9|u>>>23,u=x+N|0,w^=u<<13|u>>>19,u=w+x|0,et^=u<<18|u>>>14,u=j+N|0,B^=u<<7|u>>>25,u=B+j|0,E^=u<<9|u>>>23,u=E+B|0,N^=u<<13|u>>>19,u=N+E|0,j^=u<<18|u>>>14,u=P+I|0,d^=u<<7|u>>>25,u=d+P|0,x^=u<<9|u>>>23,u=x+d|0,I^=u<<13|u>>>19,u=I+x|0,P^=u<<18|u>>>14,u=b+g|0,w^=u<<7|u>>>25,u=w+b|0,m^=u<<9|u>>>23,u=m+w|0,g^=u<<13|u>>>19,u=g+m|0,b^=u<<18|u>>>14,u=et+nt|0,H^=u<<7|u>>>25,u=H+et|0,tt^=u<<9|u>>>23,u=tt+H|0,nt^=u<<13|u>>>19,u=nt+tt|0,et^=u<<18|u>>>14;j=j+c|0,B=B+l|0,E=E+p|0,N=N+_|0,I=I+C|0,P=P+U|0,d=d+A|0,x=x+xt|0,m=m+k|0,g=g+z|0,b=b+D|0,w=w+Q|0,H=H+Z|0,tt=tt+$|0,nt=nt+X|0,et=et+Y|0,i[0]=j>>>0&255,i[1]=j>>>8&255,i[2]=j>>>16&255,i[3]=j>>>24&255,i[4]=B>>>0&255,i[5]=B>>>8&255,i[6]=B>>>16&255,i[7]=B>>>24&255,i[8]=E>>>0&255,i[9]=E>>>8&255,i[10]=E>>>16&255,i[11]=E>>>24&255,i[12]=N>>>0&255,i[13]=N>>>8&255,i[14]=N>>>16&255,i[15]=N>>>24&255,i[16]=I>>>0&255,i[17]=I>>>8&255,i[18]=I>>>16&255,i[19]=I>>>24&255,i[20]=P>>>0&255,i[21]=P>>>8&255,i[22]=P>>>16&255,i[23]=P>>>24&255,i[24]=d>>>0&255,i[25]=d>>>8&255,i[26]=d>>>16&255,i[27]=d>>>24&255,i[28]=x>>>0&255,i[29]=x>>>8&255,i[30]=x>>>16&255,i[31]=x>>>24&255,i[32]=m>>>0&255,i[33]=m>>>8&255,i[34]=m>>>16&255,i[35]=m>>>24&255,i[36]=g>>>0&255,i[37]=g>>>8&255,i[38]=g>>>16&255,i[39]=g>>>24&255,i[40]=b>>>0&255,i[41]=b>>>8&255,i[42]=b>>>16&255,i[43]=b>>>24&255,i[44]=w>>>0&255,i[45]=w>>>8&255,i[46]=w>>>16&255,i[47]=w>>>24&255,i[48]=H>>>0&255,i[49]=H>>>8&255,i[50]=H>>>16&255,i[51]=H>>>24&255,i[52]=tt>>>0&255,i[53]=tt>>>8&255,i[54]=tt>>>16&255,i[55]=tt>>>24&255,i[56]=nt>>>0&255,i[57]=nt>>>8&255,i[58]=nt>>>16&255,i[59]=nt>>>24&255,i[60]=et>>>0&255,i[61]=et>>>8&255,i[62]=et>>>16&255,i[63]=et>>>24&255}function Kt(i,f,a,n){for(var c=n[0]&255|(n[1]&255)<<8|(n[2]&255)<<16|(n[3]&255)<<24,l=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,p=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,_=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,C=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,U=n[4]&255|(n[5]&255)<<8|(n[6]&255)<<16|(n[7]&255)<<24,A=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,xt=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,k=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,z=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,D=n[8]&255|(n[9]&255)<<8|(n[10]&255)<<16|(n[11]&255)<<24,Q=a[16]&255|(a[17]&255)<<8|(a[18]&255)<<16|(a[19]&255)<<24,Z=a[20]&255|(a[21]&255)<<8|(a[22]&255)<<16|(a[23]&255)<<24,$=a[24]&255|(a[25]&255)<<8|(a[26]&255)<<16|(a[27]&255)<<24,X=a[28]&255|(a[29]&255)<<8|(a[30]&255)<<16|(a[31]&255)<<24,Y=n[12]&255|(n[13]&255)<<8|(n[14]&255)<<16|(n[15]&255)<<24,j=c,B=l,E=p,N=_,I=C,P=U,d=A,x=xt,m=k,g=z,b=D,w=Q,H=Z,tt=$,nt=X,et=Y,u,ot=0;ot<20;ot+=2)u=j+H|0,I^=u<<7|u>>>25,u=I+j|0,m^=u<<9|u>>>23,u=m+I|0,H^=u<<13|u>>>19,u=H+m|0,j^=u<<18|u>>>14,u=P+B|0,g^=u<<7|u>>>25,u=g+P|0,tt^=u<<9|u>>>23,u=tt+g|0,B^=u<<13|u>>>19,u=B+tt|0,P^=u<<18|u>>>14,u=b+d|0,nt^=u<<7|u>>>25,u=nt+b|0,E^=u<<9|u>>>23,u=E+nt|0,d^=u<<13|u>>>19,u=d+E|0,b^=u<<18|u>>>14,u=et+w|0,N^=u<<7|u>>>25,u=N+et|0,x^=u<<9|u>>>23,u=x+N|0,w^=u<<13|u>>>19,u=w+x|0,et^=u<<18|u>>>14,u=j+N|0,B^=u<<7|u>>>25,u=B+j|0,E^=u<<9|u>>>23,u=E+B|0,N^=u<<13|u>>>19,u=N+E|0,j^=u<<18|u>>>14,u=P+I|0,d^=u<<7|u>>>25,u=d+P|0,x^=u<<9|u>>>23,u=x+d|0,I^=u<<13|u>>>19,u=I+x|0,P^=u<<18|u>>>14,u=b+g|0,w^=u<<7|u>>>25,u=w+b|0,m^=u<<9|u>>>23,u=m+w|0,g^=u<<13|u>>>19,u=g+m|0,b^=u<<18|u>>>14,u=et+nt|0,H^=u<<7|u>>>25,u=H+et|0,tt^=u<<9|u>>>23,u=tt+H|0,nt^=u<<13|u>>>19,u=nt+tt|0,et^=u<<18|u>>>14;i[0]=j>>>0&255,i[1]=j>>>8&255,i[2]=j>>>16&255,i[3]=j>>>24&255,i[4]=P>>>0&255,i[5]=P>>>8&255,i[6]=P>>>16&255,i[7]=P>>>24&255,i[8]=b>>>0&255,i[9]=b>>>8&255,i[10]=b>>>16&255,i[11]=b>>>24&255,i[12]=et>>>0&255,i[13]=et>>>8&255,i[14]=et>>>16&255,i[15]=et>>>24&255,i[16]=d>>>0&255,i[17]=d>>>8&255,i[18]=d>>>16&255,i[19]=d>>>24&255,i[20]=x>>>0&255,i[21]=x>>>8&255,i[22]=x>>>16&255,i[23]=x>>>24&255,i[24]=m>>>0&255,i[25]=m>>>8&255,i[26]=m>>>16&255,i[27]=m>>>24&255,i[28]=g>>>0&255,i[29]=g>>>8&255,i[30]=g>>>16&255,i[31]=g>>>24&255}function Bt(i,f,a,n){Yt(i,f,a,n)}function zt(i,f,a,n){Kt(i,f,a,n)}var Dt=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Fe(i,f,a,n,c,l,p){var _=new Uint8Array(16),C=new Uint8Array(64),U,A;for(A=0;A<16;A++)_[A]=0;for(A=0;A<8;A++)_[A]=l[A];for(;c>=64;){for(Bt(C,_,p,Dt),A=0;A<64;A++)i[f+A]=a[n+A]^C[A];for(U=1,A=8;A<16;A++)U=U+(_[A]&255)|0,_[A]=U&255,U>>>=8;c-=64,f+=64,n+=64}if(c>0)for(Bt(C,_,p,Dt),A=0;A<c;A++)i[f+A]=a[n+A]^C[A];return 0}function oe(i,f,a,n,c){var l=new Uint8Array(16),p=new Uint8Array(64),_,C;for(C=0;C<16;C++)l[C]=0;for(C=0;C<8;C++)l[C]=n[C];for(;a>=64;){for(Bt(p,l,c,Dt),C=0;C<64;C++)i[f+C]=p[C];for(_=1,C=8;C<16;C++)_=_+(l[C]&255)|0,l[C]=_&255,_>>>=8;a-=64,f+=64}if(a>0)for(Bt(p,l,c,Dt),C=0;C<a;C++)i[f+C]=p[C];return 0}function he(i,f,a,n,c){var l=new Uint8Array(32);zt(l,n,c,Dt);for(var p=new Uint8Array(8),_=0;_<8;_++)p[_]=n[_+16];return oe(i,f,a,p,l)}function Pe(i,f,a,n,c,l,p){var _=new Uint8Array(32);zt(_,l,p,Dt);for(var C=new Uint8Array(8),U=0;U<8;U++)C[U]=l[U+16];return Fe(i,f,a,n,c,C,_)}var be=function(i){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var f,a,n,c,l,p,_,C;f=i[0]&255|(i[1]&255)<<8,this.r[0]=f&8191,a=i[2]&255|(i[3]&255)<<8,this.r[1]=(f>>>13|a<<3)&8191,n=i[4]&255|(i[5]&255)<<8,this.r[2]=(a>>>10|n<<6)&7939,c=i[6]&255|(i[7]&255)<<8,this.r[3]=(n>>>7|c<<9)&8191,l=i[8]&255|(i[9]&255)<<8,this.r[4]=(c>>>4|l<<12)&255,this.r[5]=l>>>1&8190,p=i[10]&255|(i[11]&255)<<8,this.r[6]=(l>>>14|p<<2)&8191,_=i[12]&255|(i[13]&255)<<8,this.r[7]=(p>>>11|_<<5)&8065,C=i[14]&255|(i[15]&255)<<8,this.r[8]=(_>>>8|C<<8)&8191,this.r[9]=C>>>5&127,this.pad[0]=i[16]&255|(i[17]&255)<<8,this.pad[1]=i[18]&255|(i[19]&255)<<8,this.pad[2]=i[20]&255|(i[21]&255)<<8,this.pad[3]=i[22]&255|(i[23]&255)<<8,this.pad[4]=i[24]&255|(i[25]&255)<<8,this.pad[5]=i[26]&255|(i[27]&255)<<8,this.pad[6]=i[28]&255|(i[29]&255)<<8,this.pad[7]=i[30]&255|(i[31]&255)<<8};be.prototype.blocks=function(i,f,a){for(var n=this.fin?0:2048,c,l,p,_,C,U,A,xt,k,z,D,Q,Z,$,X,Y,j,B,E,N=this.h[0],I=this.h[1],P=this.h[2],d=this.h[3],x=this.h[4],m=this.h[5],g=this.h[6],b=this.h[7],w=this.h[8],H=this.h[9],tt=this.r[0],nt=this.r[1],et=this.r[2],u=this.r[3],ot=this.r[4],vt=this.r[5],yt=this.r[6],it=this.r[7],lt=this.r[8],pt=this.r[9];a>=16;)c=i[f+0]&255|(i[f+1]&255)<<8,N+=c&8191,l=i[f+2]&255|(i[f+3]&255)<<8,I+=(c>>>13|l<<3)&8191,p=i[f+4]&255|(i[f+5]&255)<<8,P+=(l>>>10|p<<6)&8191,_=i[f+6]&255|(i[f+7]&255)<<8,d+=(p>>>7|_<<9)&8191,C=i[f+8]&255|(i[f+9]&255)<<8,x+=(_>>>4|C<<12)&8191,m+=C>>>1&8191,U=i[f+10]&255|(i[f+11]&255)<<8,g+=(C>>>14|U<<2)&8191,A=i[f+12]&255|(i[f+13]&255)<<8,b+=(U>>>11|A<<5)&8191,xt=i[f+14]&255|(i[f+15]&255)<<8,w+=(A>>>8|xt<<8)&8191,H+=xt>>>5|n,k=0,z=k,z+=N*tt,z+=I*(5*pt),z+=P*(5*lt),z+=d*(5*it),z+=x*(5*yt),k=z>>>13,z&=8191,z+=m*(5*vt),z+=g*(5*ot),z+=b*(5*u),z+=w*(5*et),z+=H*(5*nt),k+=z>>>13,z&=8191,D=k,D+=N*nt,D+=I*tt,D+=P*(5*pt),D+=d*(5*lt),D+=x*(5*it),k=D>>>13,D&=8191,D+=m*(5*yt),D+=g*(5*vt),D+=b*(5*ot),D+=w*(5*u),D+=H*(5*et),k+=D>>>13,D&=8191,Q=k,Q+=N*et,Q+=I*nt,Q+=P*tt,Q+=d*(5*pt),Q+=x*(5*lt),k=Q>>>13,Q&=8191,Q+=m*(5*it),Q+=g*(5*yt),Q+=b*(5*vt),Q+=w*(5*ot),Q+=H*(5*u),k+=Q>>>13,Q&=8191,Z=k,Z+=N*u,Z+=I*et,Z+=P*nt,Z+=d*tt,Z+=x*(5*pt),k=Z>>>13,Z&=8191,Z+=m*(5*lt),Z+=g*(5*it),Z+=b*(5*yt),Z+=w*(5*vt),Z+=H*(5*ot),k+=Z>>>13,Z&=8191,$=k,$+=N*ot,$+=I*u,$+=P*et,$+=d*nt,$+=x*tt,k=$>>>13,$&=8191,$+=m*(5*pt),$+=g*(5*lt),$+=b*(5*it),$+=w*(5*yt),$+=H*(5*vt),k+=$>>>13,$&=8191,X=k,X+=N*vt,X+=I*ot,X+=P*u,X+=d*et,X+=x*nt,k=X>>>13,X&=8191,X+=m*tt,X+=g*(5*pt),X+=b*(5*lt),X+=w*(5*it),X+=H*(5*yt),k+=X>>>13,X&=8191,Y=k,Y+=N*yt,Y+=I*vt,Y+=P*ot,Y+=d*u,Y+=x*et,k=Y>>>13,Y&=8191,Y+=m*nt,Y+=g*tt,Y+=b*(5*pt),Y+=w*(5*lt),Y+=H*(5*it),k+=Y>>>13,Y&=8191,j=k,j+=N*it,j+=I*yt,j+=P*vt,j+=d*ot,j+=x*u,k=j>>>13,j&=8191,j+=m*et,j+=g*nt,j+=b*tt,j+=w*(5*pt),j+=H*(5*lt),k+=j>>>13,j&=8191,B=k,B+=N*lt,B+=I*it,B+=P*yt,B+=d*vt,B+=x*ot,k=B>>>13,B&=8191,B+=m*u,B+=g*et,B+=b*nt,B+=w*tt,B+=H*(5*pt),k+=B>>>13,B&=8191,E=k,E+=N*pt,E+=I*lt,E+=P*it,E+=d*yt,E+=x*vt,k=E>>>13,E&=8191,E+=m*ot,E+=g*u,E+=b*et,E+=w*nt,E+=H*tt,k+=E>>>13,E&=8191,k=(k<<2)+k|0,k=k+z|0,z=k&8191,k=k>>>13,D+=k,N=z,I=D,P=Q,d=Z,x=$,m=X,g=Y,b=j,w=B,H=E,f+=16,a-=16;this.h[0]=N,this.h[1]=I,this.h[2]=P,this.h[3]=d,this.h[4]=x,this.h[5]=m,this.h[6]=g,this.h[7]=b,this.h[8]=w,this.h[9]=H},be.prototype.finish=function(i,f){var a=new Uint16Array(10),n,c,l,p;if(this.leftover){for(p=this.leftover,this.buffer[p++]=1;p<16;p++)this.buffer[p]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,p=2;p<10;p++)this.h[p]+=n,n=this.h[p]>>>13,this.h[p]&=8191;for(this.h[0]+=n*5,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,p=1;p<10;p++)a[p]=this.h[p]+n,n=a[p]>>>13,a[p]&=8191;for(a[9]-=8192,c=(n^1)-1,p=0;p<10;p++)a[p]&=c;for(c=~c,p=0;p<10;p++)this.h[p]=this.h[p]&c|a[p];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,l=this.h[0]+this.pad[0],this.h[0]=l&65535,p=1;p<8;p++)l=(this.h[p]+this.pad[p]|0)+(l>>>16)|0,this.h[p]=l&65535;i[f+0]=this.h[0]>>>0&255,i[f+1]=this.h[0]>>>8&255,i[f+2]=this.h[1]>>>0&255,i[f+3]=this.h[1]>>>8&255,i[f+4]=this.h[2]>>>0&255,i[f+5]=this.h[2]>>>8&255,i[f+6]=this.h[3]>>>0&255,i[f+7]=this.h[3]>>>8&255,i[f+8]=this.h[4]>>>0&255,i[f+9]=this.h[4]>>>8&255,i[f+10]=this.h[5]>>>0&255,i[f+11]=this.h[5]>>>8&255,i[f+12]=this.h[6]>>>0&255,i[f+13]=this.h[6]>>>8&255,i[f+14]=this.h[7]>>>0&255,i[f+15]=this.h[7]>>>8&255},be.prototype.update=function(i,f,a){var n,c;if(this.leftover){for(c=16-this.leftover,c>a&&(c=a),n=0;n<c;n++)this.buffer[this.leftover+n]=i[f+n];if(a-=c,f+=c,this.leftover+=c,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(a>=16&&(c=a-a%16,this.blocks(i,f,c),f+=c,a-=c),a){for(n=0;n<a;n++)this.buffer[this.leftover+n]=i[f+n];this.leftover+=a}};function Ae(i,f,a,n,c,l){var p=new be(l);return p.update(a,n,c),p.finish(i,f),0}function $e(i,f,a,n,c,l){var p=new Uint8Array(16);return Ae(p,0,a,n,c,l),mt(i,f,p,0)}function Ee(i,f,a,n,c){var l;if(a<32)return-1;for(Pe(i,0,f,0,a,n,c),Ae(i,16,i,32,a-32,i),l=0;l<16;l++)i[l]=0;return 0}function me(i,f,a,n,c){var l,p=new Uint8Array(32);if(a<32||(he(p,0,32,n,c),$e(f,16,f,32,a-32,p)!==0))return-1;for(Pe(i,0,f,0,a,n,c),l=0;l<32;l++)i[l]=0;return 0}function Gt(i,f){var a;for(a=0;a<16;a++)i[a]=f[a]|0}function ke(i){var f,a,n=1;for(f=0;f<16;f++)a=i[f]+n+65535,n=Math.floor(a/65536),i[f]=a-n*65536;i[0]+=n-1+37*(n-1)}function se(i,f,a){for(var n,c=~(a-1),l=0;l<16;l++)n=c&(i[l]^f[l]),i[l]^=n,f[l]^=n}function $t(i,f){var a,n,c,l=v(),p=v();for(a=0;a<16;a++)p[a]=f[a];for(ke(p),ke(p),ke(p),n=0;n<2;n++){for(l[0]=p[0]-65517,a=1;a<15;a++)l[a]=p[a]-65535-(l[a-1]>>16&1),l[a-1]&=65535;l[15]=p[15]-32767-(l[14]>>16&1),c=l[15]>>16&1,l[14]&=65535,se(p,l,1-c)}for(a=0;a<16;a++)i[2*a]=p[a]&255,i[2*a+1]=p[a]>>8}function Ye(i,f){var a=new Uint8Array(32),n=new Uint8Array(32);return $t(a,i),$t(n,f),rt(a,0,n,0)}function Je(i){var f=new Uint8Array(32);return $t(f,i),f[0]&1}function Nt(i,f){var a;for(a=0;a<16;a++)i[a]=f[2*a]+(f[2*a+1]<<8);i[15]&=32767}function Tt(i,f,a){for(var n=0;n<16;n++)i[n]=f[n]+a[n]}function Jt(i,f,a){for(var n=0;n<16;n++)i[n]=f[n]-a[n]}function ct(i,f,a){var n,c,l=0,p=0,_=0,C=0,U=0,A=0,xt=0,k=0,z=0,D=0,Q=0,Z=0,$=0,X=0,Y=0,j=0,B=0,E=0,N=0,I=0,P=0,d=0,x=0,m=0,g=0,b=0,w=0,H=0,tt=0,nt=0,et=0,u=a[0],ot=a[1],vt=a[2],yt=a[3],it=a[4],lt=a[5],pt=a[6],kt=a[7],bt=a[8],Ot=a[9],Pt=a[10],gt=a[11],jt=a[12],Rt=a[13],Ut=a[14],At=a[15];n=f[0],l+=n*u,p+=n*ot,_+=n*vt,C+=n*yt,U+=n*it,A+=n*lt,xt+=n*pt,k+=n*kt,z+=n*bt,D+=n*Ot,Q+=n*Pt,Z+=n*gt,$+=n*jt,X+=n*Rt,Y+=n*Ut,j+=n*At,n=f[1],p+=n*u,_+=n*ot,C+=n*vt,U+=n*yt,A+=n*it,xt+=n*lt,k+=n*pt,z+=n*kt,D+=n*bt,Q+=n*Ot,Z+=n*Pt,$+=n*gt,X+=n*jt,Y+=n*Rt,j+=n*Ut,B+=n*At,n=f[2],_+=n*u,C+=n*ot,U+=n*vt,A+=n*yt,xt+=n*it,k+=n*lt,z+=n*pt,D+=n*kt,Q+=n*bt,Z+=n*Ot,$+=n*Pt,X+=n*gt,Y+=n*jt,j+=n*Rt,B+=n*Ut,E+=n*At,n=f[3],C+=n*u,U+=n*ot,A+=n*vt,xt+=n*yt,k+=n*it,z+=n*lt,D+=n*pt,Q+=n*kt,Z+=n*bt,$+=n*Ot,X+=n*Pt,Y+=n*gt,j+=n*jt,B+=n*Rt,E+=n*Ut,N+=n*At,n=f[4],U+=n*u,A+=n*ot,xt+=n*vt,k+=n*yt,z+=n*it,D+=n*lt,Q+=n*pt,Z+=n*kt,$+=n*bt,X+=n*Ot,Y+=n*Pt,j+=n*gt,B+=n*jt,E+=n*Rt,N+=n*Ut,I+=n*At,n=f[5],A+=n*u,xt+=n*ot,k+=n*vt,z+=n*yt,D+=n*it,Q+=n*lt,Z+=n*pt,$+=n*kt,X+=n*bt,Y+=n*Ot,j+=n*Pt,B+=n*gt,E+=n*jt,N+=n*Rt,I+=n*Ut,P+=n*At,n=f[6],xt+=n*u,k+=n*ot,z+=n*vt,D+=n*yt,Q+=n*it,Z+=n*lt,$+=n*pt,X+=n*kt,Y+=n*bt,j+=n*Ot,B+=n*Pt,E+=n*gt,N+=n*jt,I+=n*Rt,P+=n*Ut,d+=n*At,n=f[7],k+=n*u,z+=n*ot,D+=n*vt,Q+=n*yt,Z+=n*it,$+=n*lt,X+=n*pt,Y+=n*kt,j+=n*bt,B+=n*Ot,E+=n*Pt,N+=n*gt,I+=n*jt,P+=n*Rt,d+=n*Ut,x+=n*At,n=f[8],z+=n*u,D+=n*ot,Q+=n*vt,Z+=n*yt,$+=n*it,X+=n*lt,Y+=n*pt,j+=n*kt,B+=n*bt,E+=n*Ot,N+=n*Pt,I+=n*gt,P+=n*jt,d+=n*Rt,x+=n*Ut,m+=n*At,n=f[9],D+=n*u,Q+=n*ot,Z+=n*vt,$+=n*yt,X+=n*it,Y+=n*lt,j+=n*pt,B+=n*kt,E+=n*bt,N+=n*Ot,I+=n*Pt,P+=n*gt,d+=n*jt,x+=n*Rt,m+=n*Ut,g+=n*At,n=f[10],Q+=n*u,Z+=n*ot,$+=n*vt,X+=n*yt,Y+=n*it,j+=n*lt,B+=n*pt,E+=n*kt,N+=n*bt,I+=n*Ot,P+=n*Pt,d+=n*gt,x+=n*jt,m+=n*Rt,g+=n*Ut,b+=n*At,n=f[11],Z+=n*u,$+=n*ot,X+=n*vt,Y+=n*yt,j+=n*it,B+=n*lt,E+=n*pt,N+=n*kt,I+=n*bt,P+=n*Ot,d+=n*Pt,x+=n*gt,m+=n*jt,g+=n*Rt,b+=n*Ut,w+=n*At,n=f[12],$+=n*u,X+=n*ot,Y+=n*vt,j+=n*yt,B+=n*it,E+=n*lt,N+=n*pt,I+=n*kt,P+=n*bt,d+=n*Ot,x+=n*Pt,m+=n*gt,g+=n*jt,b+=n*Rt,w+=n*Ut,H+=n*At,n=f[13],X+=n*u,Y+=n*ot,j+=n*vt,B+=n*yt,E+=n*it,N+=n*lt,I+=n*pt,P+=n*kt,d+=n*bt,x+=n*Ot,m+=n*Pt,g+=n*gt,b+=n*jt,w+=n*Rt,H+=n*Ut,tt+=n*At,n=f[14],Y+=n*u,j+=n*ot,B+=n*vt,E+=n*yt,N+=n*it,I+=n*lt,P+=n*pt,d+=n*kt,x+=n*bt,m+=n*Ot,g+=n*Pt,b+=n*gt,w+=n*jt,H+=n*Rt,tt+=n*Ut,nt+=n*At,n=f[15],j+=n*u,B+=n*ot,E+=n*vt,N+=n*yt,I+=n*it,P+=n*lt,d+=n*pt,x+=n*kt,m+=n*bt,g+=n*Ot,b+=n*Pt,w+=n*gt,H+=n*jt,tt+=n*Rt,nt+=n*Ut,et+=n*At,l+=38*B,p+=38*E,_+=38*N,C+=38*I,U+=38*P,A+=38*d,xt+=38*x,k+=38*m,z+=38*g,D+=38*b,Q+=38*w,Z+=38*H,$+=38*tt,X+=38*nt,Y+=38*et,c=1,n=l+c+65535,c=Math.floor(n/65536),l=n-c*65536,n=p+c+65535,c=Math.floor(n/65536),p=n-c*65536,n=_+c+65535,c=Math.floor(n/65536),_=n-c*65536,n=C+c+65535,c=Math.floor(n/65536),C=n-c*65536,n=U+c+65535,c=Math.floor(n/65536),U=n-c*65536,n=A+c+65535,c=Math.floor(n/65536),A=n-c*65536,n=xt+c+65535,c=Math.floor(n/65536),xt=n-c*65536,n=k+c+65535,c=Math.floor(n/65536),k=n-c*65536,n=z+c+65535,c=Math.floor(n/65536),z=n-c*65536,n=D+c+65535,c=Math.floor(n/65536),D=n-c*65536,n=Q+c+65535,c=Math.floor(n/65536),Q=n-c*65536,n=Z+c+65535,c=Math.floor(n/65536),Z=n-c*65536,n=$+c+65535,c=Math.floor(n/65536),$=n-c*65536,n=X+c+65535,c=Math.floor(n/65536),X=n-c*65536,n=Y+c+65535,c=Math.floor(n/65536),Y=n-c*65536,n=j+c+65535,c=Math.floor(n/65536),j=n-c*65536,l+=c-1+37*(c-1),c=1,n=l+c+65535,c=Math.floor(n/65536),l=n-c*65536,n=p+c+65535,c=Math.floor(n/65536),p=n-c*65536,n=_+c+65535,c=Math.floor(n/65536),_=n-c*65536,n=C+c+65535,c=Math.floor(n/65536),C=n-c*65536,n=U+c+65535,c=Math.floor(n/65536),U=n-c*65536,n=A+c+65535,c=Math.floor(n/65536),A=n-c*65536,n=xt+c+65535,c=Math.floor(n/65536),xt=n-c*65536,n=k+c+65535,c=Math.floor(n/65536),k=n-c*65536,n=z+c+65535,c=Math.floor(n/65536),z=n-c*65536,n=D+c+65535,c=Math.floor(n/65536),D=n-c*65536,n=Q+c+65535,c=Math.floor(n/65536),Q=n-c*65536,n=Z+c+65535,c=Math.floor(n/65536),Z=n-c*65536,n=$+c+65535,c=Math.floor(n/65536),$=n-c*65536,n=X+c+65535,c=Math.floor(n/65536),X=n-c*65536,n=Y+c+65535,c=Math.floor(n/65536),Y=n-c*65536,n=j+c+65535,c=Math.floor(n/65536),j=n-c*65536,l+=c-1+37*(c-1),i[0]=l,i[1]=p,i[2]=_,i[3]=C,i[4]=U,i[5]=A,i[6]=xt,i[7]=k,i[8]=z,i[9]=D,i[10]=Q,i[11]=Z,i[12]=$,i[13]=X,i[14]=Y,i[15]=j}function Lt(i,f){ct(i,f,f)}function Le(i,f){var a=v(),n;for(n=0;n<16;n++)a[n]=f[n];for(n=253;n>=0;n--)Lt(a,a),n!==2&&n!==4&&ct(a,a,f);for(n=0;n<16;n++)i[n]=a[n]}function Xe(i,f){var a=v(),n;for(n=0;n<16;n++)a[n]=f[n];for(n=250;n>=0;n--)Lt(a,a),n!==1&&ct(a,a,f);for(n=0;n<16;n++)i[n]=a[n]}function Vt(i,f,a){var n=new Uint8Array(32),c=new Float64Array(80),l,p,_=v(),C=v(),U=v(),A=v(),xt=v(),k=v();for(p=0;p<31;p++)n[p]=f[p];for(n[31]=f[31]&127|64,n[0]&=248,Nt(c,a),p=0;p<16;p++)C[p]=c[p],A[p]=_[p]=U[p]=0;for(_[0]=A[0]=1,p=254;p>=0;--p)l=n[p>>>3]>>>(p&7)&1,se(_,C,l),se(U,A,l),Tt(xt,_,U),Jt(_,_,U),Tt(U,C,A),Jt(C,C,A),Lt(A,xt),Lt(k,_),ct(_,U,_),ct(U,C,xt),Tt(xt,_,U),Jt(_,_,U),Lt(C,_),Jt(U,A,k),ct(_,U,V),Tt(_,_,A),ct(U,U,_),ct(_,A,k),ct(A,C,c),Lt(C,xt),se(_,C,l),se(U,A,l);for(p=0;p<16;p++)c[p+16]=_[p],c[p+32]=U[p],c[p+48]=C[p],c[p+64]=A[p];var z=c.subarray(32),D=c.subarray(16);return Le(z,z),ct(D,D,z),$t(i,D),0}function le(i,f){return Vt(i,f,qt)}function We(i,f){return St(f,32),le(i,f)}function pe(i,f,a){var n=new Uint8Array(32);return Vt(n,a,f),zt(i,st,n,Dt)}var je=Ee,on=me;function Ge(i,f,a,n,c,l){var p=new Uint8Array(32);return pe(p,c,l),je(i,f,a,n,p)}function sn(i,f,a,n,c,l){var p=new Uint8Array(32);return pe(p,c,l),on(i,f,a,n,p)}var Ke=[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 Ze(i,f,a,n){for(var c=new Int32Array(16),l=new Int32Array(16),p,_,C,U,A,xt,k,z,D,Q,Z,$,X,Y,j,B,E,N,I,P,d,x,m,g,b,w,H=i[0],tt=i[1],nt=i[2],et=i[3],u=i[4],ot=i[5],vt=i[6],yt=i[7],it=f[0],lt=f[1],pt=f[2],kt=f[3],bt=f[4],Ot=f[5],Pt=f[6],gt=f[7],jt=0;n>=128;){for(I=0;I<16;I++)P=8*I+jt,c[I]=a[P+0]<<24|a[P+1]<<16|a[P+2]<<8|a[P+3],l[I]=a[P+4]<<24|a[P+5]<<16|a[P+6]<<8|a[P+7];for(I=0;I<80;I++)if(p=H,_=tt,C=nt,U=et,A=u,xt=ot,k=vt,z=yt,D=it,Q=lt,Z=pt,$=kt,X=bt,Y=Ot,j=Pt,B=gt,d=yt,x=gt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=(u>>>14|bt<<18)^(u>>>18|bt<<14)^(bt>>>9|u<<23),x=(bt>>>14|u<<18)^(bt>>>18|u<<14)^(u>>>9|bt<<23),m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,d=u&ot^~u&vt,x=bt&Ot^~bt&Pt,m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,d=Ke[I*2],x=Ke[I*2+1],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,d=c[I%16],x=l[I%16],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,E=b&65535|w<<16,N=m&65535|g<<16,d=E,x=N,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=(H>>>28|it<<4)^(it>>>2|H<<30)^(it>>>7|H<<25),x=(it>>>28|H<<4)^(H>>>2|it<<30)^(H>>>7|it<<25),m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,d=H&tt^H&nt^tt&nt,x=it<^it&pt^lt&pt,m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,z=b&65535|w<<16,B=m&65535|g<<16,d=U,x=$,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=E,x=N,m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,U=b&65535|w<<16,$=m&65535|g<<16,tt=p,nt=_,et=C,u=U,ot=A,vt=xt,yt=k,H=z,lt=D,pt=Q,kt=Z,bt=$,Ot=X,Pt=Y,gt=j,it=B,I%16===15)for(P=0;P<16;P++)d=c[P],x=l[P],m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=c[(P+9)%16],x=l[(P+9)%16],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,E=c[(P+1)%16],N=l[(P+1)%16],d=(E>>>1|N<<31)^(E>>>8|N<<24)^E>>>7,x=(N>>>1|E<<31)^(N>>>8|E<<24)^(N>>>7|E<<25),m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,E=c[(P+14)%16],N=l[(P+14)%16],d=(E>>>19|N<<13)^(N>>>29|E<<3)^E>>>6,x=(N>>>19|E<<13)^(E>>>29|N<<3)^(N>>>6|E<<26),m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,c[P]=b&65535|w<<16,l[P]=m&65535|g<<16;d=H,x=it,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[0],x=f[0],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[0]=H=b&65535|w<<16,f[0]=it=m&65535|g<<16,d=tt,x=lt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[1],x=f[1],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[1]=tt=b&65535|w<<16,f[1]=lt=m&65535|g<<16,d=nt,x=pt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[2],x=f[2],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[2]=nt=b&65535|w<<16,f[2]=pt=m&65535|g<<16,d=et,x=kt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[3],x=f[3],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[3]=et=b&65535|w<<16,f[3]=kt=m&65535|g<<16,d=u,x=bt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[4],x=f[4],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[4]=u=b&65535|w<<16,f[4]=bt=m&65535|g<<16,d=ot,x=Ot,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[5],x=f[5],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[5]=ot=b&65535|w<<16,f[5]=Ot=m&65535|g<<16,d=vt,x=Pt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[6],x=f[6],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[6]=vt=b&65535|w<<16,f[6]=Pt=m&65535|g<<16,d=yt,x=gt,m=x&65535,g=x>>>16,b=d&65535,w=d>>>16,d=i[7],x=f[7],m+=x&65535,g+=x>>>16,b+=d&65535,w+=d>>>16,g+=m>>>16,b+=g>>>16,w+=b>>>16,i[7]=yt=b&65535|w<<16,f[7]=gt=m&65535|g<<16,jt+=128,n-=128}return n}function ee(i,f,a){var n=new Int32Array(8),c=new Int32Array(8),l=new Uint8Array(256),p,_=a;for(n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225,c[0]=4089235720,c[1]=2227873595,c[2]=4271175723,c[3]=1595750129,c[4]=2917565137,c[5]=725511199,c[6]=4215389547,c[7]=327033209,Ze(n,c,f,a),a%=128,p=0;p<a;p++)l[p]=f[_-a+p];for(l[a]=128,a=256-128*(a<112?1:0),l[a-9]=0,G(l,a-8,_/536870912|0,_<<3),Ze(n,c,l,a),p=0;p<8;p++)G(i,8*p,n[p],c[p]);return 0}function ne(i,f){var a=v(),n=v(),c=v(),l=v(),p=v(),_=v(),C=v(),U=v(),A=v();Jt(a,i[1],i[0]),Jt(A,f[1],f[0]),ct(a,a,A),Tt(n,i[0],i[1]),Tt(A,f[0],f[1]),ct(n,n,A),ct(c,i[3],f[3]),ct(c,c,_t),ct(l,i[2],f[2]),Tt(l,l,l),Jt(p,n,a),Jt(_,l,c),Tt(C,l,c),Tt(U,n,a),ct(i[0],p,_),ct(i[1],U,C),ct(i[2],C,_),ct(i[3],p,U)}function Ve(i,f,a){var n;for(n=0;n<4;n++)se(i[n],f[n],a)}function Et(i,f){var a=v(),n=v(),c=v();Le(c,f[2]),ct(a,f[0],c),ct(n,f[1],c),$t(i,n),i[31]^=Je(a)<<7}function Ne(i,f,a){var n,c;for(Gt(i[0],R),Gt(i[1],at),Gt(i[2],at),Gt(i[3],R),c=255;c>=0;--c)n=a[c/8|0]>>(c&7)&1,Ve(i,f,n),ne(f,i),ne(i,i),Ve(i,f,n)}function we(i,f){var a=[v(),v(),v(),v()];Gt(a[0],q),Gt(a[1],T),Gt(a[2],at),ct(a[3],q,T),Ne(i,a,f)}function Re(i,f,a){var n=new Uint8Array(64),c=[v(),v(),v(),v()],l;for(a||St(f,32),ee(n,f,32),n[0]&=248,n[31]&=127,n[31]|=64,we(c,n),Et(i,c),l=0;l<32;l++)f[l+32]=i[l];return 0}var Se=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ie(i,f){var a,n,c,l;for(n=63;n>=32;--n){for(a=0,c=n-32,l=n-12;c<l;++c)f[c]+=a-16*f[n]*Se[c-(n-32)],a=Math.floor((f[c]+128)/256),f[c]-=a*256;f[c]+=a,f[n]=0}for(a=0,c=0;c<32;c++)f[c]+=a-(f[31]>>4)*Se[c],a=f[c]>>8,f[c]&=255;for(c=0;c<32;c++)f[c]-=a*Se[c];for(n=0;n<32;n++)f[n+1]+=f[n]>>8,i[n]=f[n]&255}function Ue(i){var f=new Float64Array(64),a;for(a=0;a<64;a++)f[a]=i[a];for(a=0;a<64;a++)i[a]=0;Ie(i,f)}function Qe(i,f,a,n){var c=new Uint8Array(64),l=new Uint8Array(64),p=new Uint8Array(64),_,C,U=new Float64Array(64),A=[v(),v(),v(),v()];ee(c,n,32),c[0]&=248,c[31]&=127,c[31]|=64;var xt=a+64;for(_=0;_<a;_++)i[64+_]=f[_];for(_=0;_<32;_++)i[32+_]=c[32+_];for(ee(p,i.subarray(32),a+32),Ue(p),we(A,p),Et(i,A),_=32;_<64;_++)i[_]=n[_];for(ee(l,i,a+64),Ue(l),_=0;_<64;_++)U[_]=0;for(_=0;_<32;_++)U[_]=p[_];for(_=0;_<32;_++)for(C=0;C<32;C++)U[_+C]+=l[_]*c[C];return Ie(i.subarray(32),U),xt}function an(i,f){var a=v(),n=v(),c=v(),l=v(),p=v(),_=v(),C=v();return Gt(i[2],at),Nt(i[1],f),Lt(c,i[1]),ct(l,c,F),Jt(c,c,i[2]),Tt(l,i[2],l),Lt(p,l),Lt(_,p),ct(C,_,p),ct(a,C,c),ct(a,a,l),Xe(a,a),ct(a,a,c),ct(a,a,l),ct(a,a,l),ct(i[0],a,l),Lt(n,i[0]),ct(n,n,l),Ye(n,c)&&ct(i[0],i[0],L),Lt(n,i[0]),ct(n,n,l),Ye(n,c)?-1:(Je(i[0])===f[31]>>7&&Jt(i[0],R,i[0]),ct(i[3],i[0],i[1]),0)}function Me(i,f,a,n){var c,l=new Uint8Array(32),p=new Uint8Array(64),_=[v(),v(),v(),v()],C=[v(),v(),v(),v()];if(a<64||an(C,n))return-1;for(c=0;c<a;c++)i[c]=f[c];for(c=0;c<32;c++)i[c+32]=n[c];if(ee(p,i,a),Ue(p),Ne(_,C,p),we(C,f.subarray(32)),ne(_,C),Et(l,_),a-=64,rt(f,0,l,0)){for(c=0;c<a;c++)i[c]=0;return-1}for(c=0;c<a;c++)i[c]=f[c+64];return a}var de=32,ae=24,xe=32,fe=16,ve=32,Te=32,ye=32,re=32,Be=32,Qt=ae,fn=xe,cn=fe,Zt=64,ie=32,Xt=64,De=32,Ce=64;S.lowlevel={crypto_core_hsalsa20:zt,crypto_stream_xor:Pe,crypto_stream:he,crypto_stream_salsa20_xor:Fe,crypto_stream_salsa20:oe,crypto_onetimeauth:Ae,crypto_onetimeauth_verify:$e,crypto_verify_16:mt,crypto_verify_32:rt,crypto_secretbox:Ee,crypto_secretbox_open:me,crypto_scalarmult:Vt,crypto_scalarmult_base:le,crypto_box_beforenm:pe,crypto_box_afternm:je,crypto_box:Ge,crypto_box_open:sn,crypto_box_keypair:We,crypto_hash:ee,crypto_sign:Qe,crypto_sign_keypair:Re,crypto_sign_open:Me,crypto_secretbox_KEYBYTES:de,crypto_secretbox_NONCEBYTES:ae,crypto_secretbox_ZEROBYTES:xe,crypto_secretbox_BOXZEROBYTES:fe,crypto_scalarmult_BYTES:ve,crypto_scalarmult_SCALARBYTES:Te,crypto_box_PUBLICKEYBYTES:ye,crypto_box_SECRETKEYBYTES:re,crypto_box_BEFORENMBYTES:Be,crypto_box_NONCEBYTES:Qt,crypto_box_ZEROBYTES:fn,crypto_box_BOXZEROBYTES:cn,crypto_sign_BYTES:Zt,crypto_sign_PUBLICKEYBYTES:ie,crypto_sign_SECRETKEYBYTES:Xt,crypto_sign_SEEDBYTES:De,crypto_hash_BYTES:Ce,gf:v,D:F,L:Se,pack25519:$t,unpack25519:Nt,M:ct,A:Tt,S:Lt,Z:Jt,pow2523:Xe,add:ne,set25519:Gt,modL:Ie,scalarmult:Ne,scalarbase:we};function He(i,f){if(i.length!==de)throw new Error("bad key size");if(f.length!==ae)throw new Error("bad nonce size")}function tn(i,f){if(i.length!==ye)throw new Error("bad public key size");if(f.length!==re)throw new Error("bad secret key size")}function Ht(){for(var i=0;i<arguments.length;i++)if(!(arguments[i]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function en(i){for(var f=0;f<i.length;f++)i[f]=0}S.randomBytes=function(i){var f=new Uint8Array(i);return St(f,i),f},S.secretbox=function(i,f,a){Ht(i,f,a),He(a,f);for(var n=new Uint8Array(xe+i.length),c=new Uint8Array(n.length),l=0;l<i.length;l++)n[l+xe]=i[l];return Ee(c,n,n.length,f,a),c.subarray(fe)},S.secretbox.open=function(i,f,a){Ht(i,f,a),He(a,f);for(var n=new Uint8Array(fe+i.length),c=new Uint8Array(n.length),l=0;l<i.length;l++)n[l+fe]=i[l];return n.length<32||me(c,n,n.length,f,a)!==0?null:c.subarray(xe)},S.secretbox.keyLength=de,S.secretbox.nonceLength=ae,S.secretbox.overheadLength=fe,S.scalarMult=function(i,f){if(Ht(i,f),i.length!==Te)throw new Error("bad n size");if(f.length!==ve)throw new Error("bad p size");var a=new Uint8Array(ve);return Vt(a,i,f),a},S.scalarMult.base=function(i){if(Ht(i),i.length!==Te)throw new Error("bad n size");var f=new Uint8Array(ve);return le(f,i),f},S.scalarMult.scalarLength=Te,S.scalarMult.groupElementLength=ve,S.box=function(i,f,a,n){var c=S.box.before(a,n);return S.secretbox(i,f,c)},S.box.before=function(i,f){Ht(i,f),tn(i,f);var a=new Uint8Array(Be);return pe(a,i,f),a},S.box.after=S.secretbox,S.box.open=function(i,f,a,n){var c=S.box.before(a,n);return S.secretbox.open(i,f,c)},S.box.open.after=S.secretbox.open,S.box.keyPair=function(){var i=new Uint8Array(ye),f=new Uint8Array(re);return We(i,f),{publicKey:i,secretKey:f}},S.box.keyPair.fromSecretKey=function(i){if(Ht(i),i.length!==re)throw new Error("bad secret key size");var f=new Uint8Array(ye);return le(f,i),{publicKey:f,secretKey:new Uint8Array(i)}},S.box.publicKeyLength=ye,S.box.secretKeyLength=re,S.box.sharedKeyLength=Be,S.box.nonceLength=Qt,S.box.overheadLength=S.secretbox.overheadLength,S.sign=function(i,f){if(Ht(i,f),f.length!==Xt)throw new Error("bad secret key size");var a=new Uint8Array(Zt+i.length);return Qe(a,i,i.length,f),a},S.sign.open=function(i,f){if(Ht(i,f),f.length!==ie)throw new Error("bad public key size");var a=new Uint8Array(i.length),n=Me(a,i,i.length,f);if(n<0)return null;for(var c=new Uint8Array(n),l=0;l<c.length;l++)c[l]=a[l];return c},S.sign.detached=function(i,f){for(var a=S.sign(i,f),n=new Uint8Array(Zt),c=0;c<n.length;c++)n[c]=a[c];return n},S.sign.detached.verify=function(i,f,a){if(Ht(i,f,a),f.length!==Zt)throw new Error("bad signature size");if(a.length!==ie)throw new Error("bad public key size");var n=new Uint8Array(Zt+i.length),c=new Uint8Array(Zt+i.length),l;for(l=0;l<Zt;l++)n[l]=f[l];for(l=0;l<i.length;l++)n[l+Zt]=i[l];return Me(c,n,n.length,a)>=0},S.sign.keyPair=function(){var i=new Uint8Array(ie),f=new Uint8Array(Xt);return Re(i,f),{publicKey:i,secretKey:f}},S.sign.keyPair.fromSecretKey=function(i){if(Ht(i),i.length!==Xt)throw new Error("bad secret key size");for(var f=new Uint8Array(ie),a=0;a<f.length;a++)f[a]=i[32+a];return{publicKey:f,secretKey:new Uint8Array(i)}},S.sign.keyPair.fromSeed=function(i){if(Ht(i),i.length!==De)throw new Error("bad seed size");for(var f=new Uint8Array(ie),a=new Uint8Array(Xt),n=0;n<32;n++)a[n]=i[n];return Re(f,a,!0),{publicKey:f,secretKey:a}},S.sign.publicKeyLength=ie,S.sign.secretKeyLength=Xt,S.sign.seedLength=De,S.sign.signatureLength=Zt,S.hash=function(i){Ht(i);var f=new Uint8Array(Ce);return ee(f,i,i.length),f},S.hash.hashLength=Ce,S.verify=function(i,f){return Ht(i,f),i.length===0||f.length===0||i.length!==f.length?!1:M(i,0,f,0,i.length)===0},S.setPRNG=function(i){St=i},(function(){var i=typeof self<"u"?self.crypto||self.msCrypto:null;if(i&&i.getRandomValues){var f=65536;S.setPRNG(function(a,n){var c,l=new Uint8Array(n);for(c=0;c<n;c+=f)i.getRandomValues(l.subarray(c,c+Math.min(n-c,f)));for(c=0;c<n;c++)a[c]=l[c];en(l)})}else i=ht(4),i&&i.randomBytes&&S.setPRNG(function(a,n){var c,l=i.randomBytes(n);for(c=0;c<n;c++)a[c]=l[c];en(l)})})()})(Ct.exports?Ct.exports:self.nacl=self.nacl||{})}),(function(Ct,K,ht){Ct.exports=ht(5).default}),(function(Ct,K){}),(function(Ct,K,ht){ht.r(K);var S=(function(){function e(t,r){this.lastId=0,this.prefix=t,this.name=r}return e.prototype.create=function(t){this.lastId++;var r=this.lastId,o=this.prefix+r,s=this.name+"["+r+"]",h=!1,y=function(){h||(t.apply(null,arguments),h=!0)};return this[r]=y,{number:r,id:o,name:s,callback:y}},e.prototype.remove=function(t){delete this[t.number]},e})(),v=new S("_pusher_script_","Pusher.ScriptReceivers"),St={VERSION:"7.0.3",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},st=St,qt=(function(){function e(t){this.options=t,this.receivers=t.receivers||v,this.loading={}}return e.prototype.load=function(t,r,o){var s=this;if(s.loading[t]&&s.loading[t].length>0)s.loading[t].push(o);else{s.loading[t]=[o];var h=ut.createScriptRequest(s.getPath(t,r)),y=s.receivers.create(function(O){if(s.receivers.remove(y),s.loading[t]){var W=s.loading[t];delete s.loading[t];for(var wt=function(Ft){Ft||h.cleanup()},It=0;It<W.length;It++)W[It](O,wt)}});h.send(y)}},e.prototype.getRoot=function(t){var r,o=ut.getDocument().location.protocol;return t&&t.useTLS||o==="https:"?r=this.options.cdn_https:r=this.options.cdn_http,r.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,r){return this.getRoot(r)+"/"+t+this.options.suffix+".js"},e})(),R=qt,at=new S("_pusher_dependencies","Pusher.DependenciesReceivers"),V=new R({cdn_http:st.cdn_http,cdn_https:st.cdn_https,version:st.VERSION,suffix:st.dependency_suffix,receivers:at}),F={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/authenticating_users"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},_t=function(e){var t="See:",r=F.urls[e];if(!r)return"";var o;return r.fullUrl?o=r.fullUrl:r.path&&(o=F.baseUrl+r.path),o?t+" "+o:""},q={buildLogSuffix:_t},T=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),L=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),G=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),M=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),mt=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),rt=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),Yt=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),Kt=(function(e){T(t,e);function t(r){var o=this.constructor,s=e.call(this,r)||this;return Object.setPrototypeOf(s,o.prototype),s}return t})(Error),Bt=(function(e){T(t,e);function t(r,o){var s=this.constructor,h=e.call(this,o)||this;return h.status=r,Object.setPrototypeOf(h,s.prototype),h}return t})(Error),zt=function(e,t,r){var o=this,s;s=ut.createXHR(),s.open("POST",o.options.authEndpoint,!0),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var h in this.authOptions.headers)s.setRequestHeader(h,this.authOptions.headers[h]);return s.onreadystatechange=function(){if(s.readyState===4)if(s.status===200){var y=void 0,O=!1;try{y=JSON.parse(s.responseText),O=!0}catch{r(new Bt(200,"JSON returned from auth endpoint was invalid, yet status code was 200. Data was: "+s.responseText),{auth:""})}O&&r(null,y)}else{var W=q.buildLogSuffix("authenticationEndpoint");r(new Bt(s.status,"Unable to retrieve auth string from auth endpoint - "+("received status: "+s.status+" from "+o.options.authEndpoint+". ")+("Clients must be authenticated to join private or presence channels. "+W)),{auth:""})}},s.send(this.composeQuery(t)),s},Dt=zt;function Fe(e){return $e(be(e))}var oe=String.fromCharCode,he="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe=function(e){var t=e.charCodeAt(0);return t<128?e:t<2048?oe(192|t>>>6)+oe(128|t&63):oe(224|t>>>12&15)+oe(128|t>>>6&63)+oe(128|t&63)},be=function(e){return e.replace(/[^\x00-\x7F]/g,Pe)},Ae=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),o=[he.charAt(r>>>18),he.charAt(r>>>12&63),t>=2?"=":he.charAt(r>>>6&63),t>=1?"=":he.charAt(r&63)];return o.join("")},$e=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,Ae)},Ee=(function(){function e(t,r,o,s){var h=this;this.clear=r,this.timer=t(function(){h.timer&&(h.timer=s(h.timer))},o)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},e})(),me=Ee,Gt=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})();function ke(e){window.clearTimeout(e)}function se(e){window.clearInterval(e)}var $t=(function(e){Gt(t,e);function t(r,o){return e.call(this,setTimeout,ke,r,function(s){return o(),null})||this}return t})(me),Ye=(function(e){Gt(t,e);function t(r,o){return e.call(this,setInterval,se,r,function(s){return o(),s})||this}return t})(me),Je={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new $t(0,e)},method:function(e){var t=Array.prototype.slice.call(arguments,1);return function(r){return r[e].apply(r,t.concat(arguments))}}},Nt=Je;function Tt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var o=0;o<t.length;o++){var s=t[o];for(var h in s)s[h]&&s[h].constructor&&s[h].constructor===Object?e[h]=Tt(e[h]||{},s[h]):e[h]=s[h]}return e}function Jt(){for(var e=["Pusher"],t=0;t<arguments.length;t++)typeof arguments[t]=="string"?e.push(arguments[t]):e.push(ne(arguments[t]));return e.join(" : ")}function ct(e,t){var r=Array.prototype.indexOf;if(e===null)return-1;if(r&&e.indexOf===r)return e.indexOf(t);for(var o=0,s=e.length;o<s;o++)if(e[o]===t)return o;return-1}function Lt(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(e[r],r,e)}function Le(e){var t=[];return Lt(e,function(r,o){t.push(o)}),t}function Xe(e){var t=[];return Lt(e,function(r){t.push(r)}),t}function Vt(e,t,r){for(var o=0;o<e.length;o++)t.call(r||window,e[o],o,e)}function le(e,t){for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],o,e,r));return r}function We(e,t){var r={};return Lt(e,function(o,s){r[s]=t(o)}),r}function pe(e,t){t=t||function(s){return!!s};for(var r=[],o=0;o<e.length;o++)t(e[o],o,e,r)&&r.push(e[o]);return r}function je(e,t){var r={};return Lt(e,function(o,s){(t&&t(o,s,e,r)||o)&&(r[s]=o)}),r}function on(e){var t=[];return Lt(e,function(r,o){t.push([o,r])}),t}function Ge(e,t){for(var r=0;r<e.length;r++)if(t(e[r],r,e))return!0;return!1}function sn(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r,e))return!1;return!0}function Ke(e){return We(e,function(t){return typeof t=="object"&&(t=ne(t)),encodeURIComponent(Fe(t.toString()))})}function Ze(e){var t=je(e,function(o){return o!==void 0}),r=le(on(Ke(t)),Nt.method("join","=")).join("&");return r}function ee(e){var t=[],r=[];return(function o(s,h){var y,O,W;switch(typeof s){case"object":if(!s)return null;for(y=0;y<t.length;y+=1)if(t[y]===s)return{$ref:r[y]};if(t.push(s),r.push(h),Object.prototype.toString.apply(s)==="[object Array]")for(W=[],y=0;y<s.length;y+=1)W[y]=o(s[y],h+"["+y+"]");else{W={};for(O in s)Object.prototype.hasOwnProperty.call(s,O)&&(W[O]=o(s[O],h+"["+JSON.stringify(O)+"]"))}return W;case"number":case"string":case"boolean":return s}})(e,"$")}function ne(e){try{return JSON.stringify(e)}catch{return JSON.stringify(ee(e))}}var Ve=(function(){function e(){this.globalLog=function(t){window.console&&window.console.log&&window.console.log(t)}}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.log(this.globalLog,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.log(this.globalLogWarn,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.log(this.globalLogError,t)},e.prototype.globalLogWarn=function(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)},e.prototype.globalLogError=function(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)},e.prototype.log=function(t){var r=Jt.apply(this,arguments);if(Oe.log)Oe.log(r);else if(Oe.logToConsole){var o=t.bind(this);o(r)}},e})(),Et=new Ve,Ne=function(e,t,r){this.authOptions.headers!==void 0&&Et.warn("To send headers with the auth request, you must use AJAX, rather than JSONP.");var o=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var s=e.getDocument(),h=s.createElement("script");e.auth_callbacks[o]=function(W){r(null,W)};var y="Pusher.auth_callbacks['"+o+"']";h.src=this.options.authEndpoint+"?callback="+encodeURIComponent(y)+"&"+this.composeQuery(t);var O=s.getElementsByTagName("head")[0]||s.documentElement;O.insertBefore(h,O.firstChild)},we=Ne,Re=(function(){function e(t){this.src=t}return e.prototype.send=function(t){var r=this,o="Error loading "+r.src;r.script=document.createElement("script"),r.script.id=t.id,r.script.src=r.src,r.script.type="text/javascript",r.script.charset="UTF-8",r.script.addEventListener?(r.script.onerror=function(){t.callback(o)},r.script.onload=function(){t.callback(null)}):r.script.onreadystatechange=function(){(r.script.readyState==="loaded"||r.script.readyState==="complete")&&t.callback(null)},r.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(r.errorScript=document.createElement("script"),r.errorScript.id=t.id+"_error",r.errorScript.text=t.name+"('"+o+"');",r.script.async=r.errorScript.async=!1):r.script.async=!0;var s=document.getElementsByTagName("head")[0];s.insertBefore(r.script,s.firstChild),r.errorScript&&s.insertBefore(r.errorScript,r.script.nextSibling)},e.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},e})(),Se=Re,Ie=(function(){function e(t,r){this.url=t,this.data=r}return e.prototype.send=function(t){if(!this.request){var r=Ze(this.data),o=this.url+"/"+t.number+"?"+r;this.request=ut.createScriptRequest(o),this.request.send(t)}},e.prototype.cleanup=function(){this.request&&this.request.cleanup()},e})(),Ue=Ie,Qe=function(e,t){return function(r,o){var s="http"+(t?"s":"")+"://",h=s+(e.host||e.options.host)+e.options.path,y=ut.createJSONPRequest(h,r),O=ut.ScriptReceivers.create(function(W,wt){v.remove(O),y.cleanup(),wt&&wt.host&&(e.host=wt.host),o&&o(W,wt)});y.send(O)}},an={name:"jsonp",getAgent:Qe},Me=an;function de(e,t,r){var o=e+(t.useTLS?"s":""),s=t.useTLS?t.hostTLS:t.hostNonTLS;return o+"://"+s+r}function ae(e,t){var r="/app/"+e,o="?protocol="+st.PROTOCOL+"&client=js&version="+st.VERSION+(t?"&"+t:"");return r+o}var xe={getInitial:function(e,t){var r=(t.httpPath||"")+ae(e,"flash=false");return de("ws",t,r)}},fe={getInitial:function(e,t){var r=(t.httpPath||"/pusher")+ae(e);return de("http",t,r)}},ve={getInitial:function(e,t){return de("http",t,t.httpPath||"/pusher")},getPath:function(e,t){return ae(e)}},Te=(function(){function e(){this._callbacks={}}return e.prototype.get=function(t){return this._callbacks[re(t)]},e.prototype.add=function(t,r,o){var s=re(t);this._callbacks[s]=this._callbacks[s]||[],this._callbacks[s].push({fn:r,context:o})},e.prototype.remove=function(t,r,o){if(!t&&!r&&!o){this._callbacks={};return}var s=t?[re(t)]:Le(this._callbacks);r||o?this.removeCallback(s,r,o):this.removeAllCallbacks(s)},e.prototype.removeCallback=function(t,r,o){Vt(t,function(s){this._callbacks[s]=pe(this._callbacks[s]||[],function(h){return r&&r!==h.fn||o&&o!==h.context}),this._callbacks[s].length===0&&delete this._callbacks[s]},this)},e.prototype.removeAllCallbacks=function(t){Vt(t,function(r){delete this._callbacks[r]},this)},e})(),ye=Te;function re(e){return"_"+e}var Be=(function(){function e(t){this.callbacks=new ye,this.global_callbacks=[],this.failThrough=t}return e.prototype.bind=function(t,r,o){return this.callbacks.add(t,r,o),this},e.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},e.prototype.unbind=function(t,r,o){return this.callbacks.remove(t,r,o),this},e.prototype.unbind_global=function(t){return t?(this.global_callbacks=pe(this.global_callbacks||[],function(r){return r!==t}),this):(this.global_callbacks=[],this)},e.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},e.prototype.emit=function(t,r,o){for(var s=0;s<this.global_callbacks.length;s++)this.global_callbacks[s](t,r);var h=this.callbacks.get(t),y=[];if(o?y.push(r,o):r&&y.push(r),h&&h.length>0)for(var s=0;s<h.length;s++)h[s].fn.apply(h[s].context||window,y);else this.failThrough&&this.failThrough(t,r);return this},e})(),Qt=Be,fn=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),cn=(function(e){fn(t,e);function t(r,o,s,h,y){var O=e.call(this)||this;return O.initialize=ut.transportConnectionInitializer,O.hooks=r,O.name=o,O.priority=s,O.key=h,O.options=y,O.state="new",O.timeline=y.timeline,O.activityTimeout=y.activityTimeout,O.id=O.timeline.generateUniqueID(),O}return t.prototype.handlesActivityChecks=function(){return!!this.hooks.handlesActivityChecks},t.prototype.supportsPing=function(){return!!this.hooks.supportsPing},t.prototype.connect=function(){var r=this;if(this.socket||this.state!=="initialized")return!1;var o=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(o,this.options)}catch(s){return Nt.defer(function(){r.onError(s),r.changeState("closed")}),!1}return this.bindListeners(),Et.debug("Connecting",{transport:this.name,url:o}),this.changeState("connecting"),!0},t.prototype.close=function(){return this.socket?(this.socket.close(),!0):!1},t.prototype.send=function(r){var o=this;return this.state==="open"?(Nt.defer(function(){o.socket&&o.socket.send(r)}),!0):!1},t.prototype.ping=function(){this.state==="open"&&this.supportsPing()&&this.socket.ping()},t.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0},t.prototype.onError=function(r){this.emit("error",{type:"WebSocketError",error:r}),this.timeline.error(this.buildTimelineMessage({error:r.toString()}))},t.prototype.onClose=function(r){r?this.changeState("closed",{code:r.code,reason:r.reason,wasClean:r.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},t.prototype.onMessage=function(r){this.emit("message",r)},t.prototype.onActivity=function(){this.emit("activity")},t.prototype.bindListeners=function(){var r=this;this.socket.onopen=function(){r.onOpen()},this.socket.onerror=function(o){r.onError(o)},this.socket.onclose=function(o){r.onClose(o)},this.socket.onmessage=function(o){r.onMessage(o)},this.supportsPing()&&(this.socket.onactivity=function(){r.onActivity()})},t.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},t.prototype.changeState=function(r,o){this.state=r,this.timeline.info(this.buildTimelineMessage({state:r,params:o})),this.emit(r,o)},t.prototype.buildTimelineMessage=function(r){return Tt({cid:this.id},r)},t})(Qt),Zt=cn,ie=(function(){function e(t){this.hooks=t}return e.prototype.isSupported=function(t){return this.hooks.isSupported(t)},e.prototype.createConnection=function(t,r,o,s){return new Zt(this.hooks,t,r,o,s)},e})(),Xt=ie,De=new Xt({urls:xe,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!ut.getWebSocketAPI()},isSupported:function(){return!!ut.getWebSocketAPI()},getSocket:function(e){return ut.createWebSocket(e)}}),Ce={urls:fe,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},He=Tt({getSocket:function(e){return ut.HTTPFactory.createStreamingSocket(e)}},Ce),tn=Tt({getSocket:function(e){return ut.HTTPFactory.createPollingSocket(e)}},Ce),Ht={isSupported:function(){return ut.isXHRSupported()}},en=new Xt(Tt({},He,Ht)),i=new Xt(Tt({},tn,Ht)),f={ws:De,xhr_streaming:en,xhr_polling:i},a=f,n=new Xt({file:"sockjs",urls:ve,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:V.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),c={isSupported:function(e){var t=ut.isXDRSupported(e.useTLS);return t}},l=new Xt(Tt({},He,c)),p=new Xt(Tt({},tn,c));a.xdr_streaming=l,a.xdr_polling=p,a.sockjs=n;var _=a,C=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),U=(function(e){C(t,e);function t(){var r=e.call(this)||this,o=r;return window.addEventListener!==void 0&&(window.addEventListener("online",function(){o.emit("online")},!1),window.addEventListener("offline",function(){o.emit("offline")},!1)),r}return t.prototype.isOnline=function(){return window.navigator.onLine===void 0?!0:window.navigator.onLine},t})(Qt),A=new U,xt=(function(){function e(t,r,o){this.manager=t,this.transport=r,this.minPingDelay=o.minPingDelay,this.maxPingDelay=o.maxPingDelay,this.pingDelay=void 0}return e.prototype.createConnection=function(t,r,o,s){var h=this;s=Tt({},s,{activityTimeout:this.pingDelay});var y=this.transport.createConnection(t,r,o,s),O=null,W=function(){y.unbind("open",W),y.bind("closed",wt),O=Nt.now()},wt=function(It){if(y.unbind("closed",wt),It.code===1002||It.code===1003)h.manager.reportDeath();else if(!It.wasClean&&O){var Ft=Nt.now()-O;Ft<2*h.maxPingDelay&&(h.manager.reportDeath(),h.pingDelay=Math.max(Ft/2,h.minPingDelay))}};return y.bind("open",W),y},e.prototype.isSupported=function(t){return this.manager.isAlive()&&this.transport.isSupported(t)},e})(),k=xt,z={decodeMessage:function(e){try{var t=JSON.parse(e.data),r=t.data;if(typeof r=="string")try{r=JSON.parse(t.data)}catch{}var o={event:t.event,channel:t.channel,data:r};return t.user_id&&(o.user_id=t.user_id),o}catch(s){throw{type:"MessageParseError",error:s,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=z.decodeMessage(e);if(t.event==="pusher:connection_established"){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}else{if(t.event==="pusher:error")return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"}},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?"backoff":null:e.code===4e3?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},D=z,Q=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Z=(function(e){Q(t,e);function t(r,o){var s=e.call(this)||this;return s.id=r,s.transport=o,s.activityTimeout=o.activityTimeout,s.bindListeners(),s}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(r){return this.transport.send(r)},t.prototype.send_event=function(r,o,s){var h={event:r,data:o};return s&&(h.channel=s),Et.debug("Event sent",h),this.send(D.encodeMessage(h))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var r=this,o={message:function(h){var y;try{y=D.decodeMessage(h)}catch(O){r.emit("error",{type:"MessageParseError",error:O,data:h.data})}if(y!==void 0){switch(Et.debug("Event recd",y),y.event){case"pusher:error":r.emit("error",{type:"PusherError",data:y.data});break;case"pusher:ping":r.emit("ping");break;case"pusher:pong":r.emit("pong");break}r.emit("message",y)}},activity:function(){r.emit("activity")},error:function(h){r.emit("error",h)},closed:function(h){s(),h&&h.code&&r.handleCloseEvent(h),r.transport=null,r.emit("closed")}},s=function(){Lt(o,function(h,y){r.transport.unbind(y,h)})};Lt(o,function(h,y){r.transport.bind(y,h)})},t.prototype.handleCloseEvent=function(r){var o=D.getCloseAction(r),s=D.getCloseError(r);s&&this.emit("error",s),o&&this.emit(o,{action:o,error:s})},t})(Qt),$=Z,X=(function(){function e(t,r){this.transport=t,this.callback=r,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(r){t.unbindListeners();var o;try{o=D.processHandshake(r)}catch(s){t.finish("error",{error:s}),t.transport.close();return}o.action==="connected"?t.finish("connected",{connection:new $(o.id,t.transport),activityTimeout:o.activityTimeout}):(t.finish(o.action,{error:o.error}),t.transport.close())},this.onClosed=function(r){t.unbindListeners();var o=D.getCloseAction(r)||"backoff",s=D.getCloseError(r);t.finish(o,{error:s})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,r){this.callback(Tt({transport:this.transport,action:t},r))},e})(),Y=X,j=(function(){function e(t,r){this.channel=t;var o=r.authTransport;if(typeof ut.getAuthorizers()[o]>"u")throw"'"+o+"' is not a recognized auth transport";this.type=o,this.options=r,this.authOptions=r.auth||{}}return e.prototype.composeQuery=function(t){var r="socket_id="+encodeURIComponent(t)+"&channel_name="+encodeURIComponent(this.channel.name);for(var o in this.authOptions.params)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(this.authOptions.params[o]);return r},e.prototype.authorize=function(t,r){e.authorizers=e.authorizers||ut.getAuthorizers(),e.authorizers[this.type].call(this,ut,t,r)},e})(),B=j,E=(function(){function e(t,r){this.timeline=t,this.options=r||{}}return e.prototype.send=function(t,r){this.timeline.isEmpty()||this.timeline.send(ut.TimelineTransport.getAgent(this,t),r)},e})(),N=E,I=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),P=(function(e){I(t,e);function t(r,o){var s=e.call(this,function(h,y){Et.debug("No callbacks on "+r+" for "+h)})||this;return s.name=r,s.pusher=o,s.subscribed=!1,s.subscriptionPending=!1,s.subscriptionCancelled=!1,s}return t.prototype.authorize=function(r,o){return o(null,{auth:""})},t.prototype.trigger=function(r,o){if(r.indexOf("client-")!==0)throw new L("Event '"+r+"' does not start with 'client-'");if(!this.subscribed){var s=q.buildLogSuffix("triggeringClientEvents");Et.warn("Client event triggered before channel 'subscription_succeeded' event . "+s)}return this.pusher.send_event(r,o,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(r){var o=r.event,s=r.data;if(o==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(r);else if(o.indexOf("pusher_internal:")!==0){var h={};this.emit(o,s,h)}},t.prototype.handleSubscriptionSucceededEvent=function(r){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",r.data)},t.prototype.subscribe=function(){var r=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(o,s){o?(r.subscriptionPending=!1,Et.error(o.toString()),r.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:o.message},o instanceof Bt?{status:o.status}:{}))):r.pusher.send_event("pusher:subscribe",{auth:s.auth,channel_data:s.channel_data,channel:r.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t})(Qt),d=P,x=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),m=(function(e){x(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.authorize=function(r,o){var s=gt.createAuthorizer(this,this.pusher.config);return s.authorize(r,o)},t})(d),g=m,b=(function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var r=this;Lt(this.members,function(o,s){t(r.get(s))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var r=this.get(t.user_id);return r&&(delete this.members[t.user_id],this.count--),r},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e})(),w=b,H=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),tt=(function(e){H(t,e);function t(r,o){var s=e.call(this,r,o)||this;return s.members=new w,s}return t.prototype.authorize=function(r,o){var s=this;e.prototype.authorize.call(this,r,function(h,y){if(!h){if(y=y,y.channel_data===void 0){var O=q.buildLogSuffix("authenticationEndpoint");Et.error("Invalid auth response for channel '"+s.name+"',"+("expected 'channel_data' field. "+O)),o("Invalid auth response");return}var W=JSON.parse(y.channel_data);s.members.setMyID(W.user_id)}o(h,y)})},t.prototype.handleEvent=function(r){var o=r.event;if(o.indexOf("pusher_internal:")===0)this.handleInternalEvent(r);else{var s=r.data,h={};r.user_id&&(h.user_id=r.user_id),this.emit(o,s,h)}},t.prototype.handleInternalEvent=function(r){var o=r.event,s=r.data;switch(o){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(r);break;case"pusher_internal:member_added":var h=this.members.addMember(s);this.emit("pusher:member_added",h);break;case"pusher_internal:member_removed":var y=this.members.removeMember(s);y&&this.emit("pusher:member_removed",y);break}},t.prototype.handleSubscriptionSucceededEvent=function(r){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(r.data),this.emit("pusher:subscription_succeeded",this.members))},t.prototype.disconnect=function(){this.members.reset(),e.prototype.disconnect.call(this)},t})(g),nt=tt,et=ht(1),u=ht(0),ot=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),vt=(function(e){ot(t,e);function t(r,o,s){var h=e.call(this,r,o)||this;return h.key=null,h.nacl=s,h}return t.prototype.authorize=function(r,o){var s=this;e.prototype.authorize.call(this,r,function(h,y){if(h){o(h,y);return}var O=y.shared_secret;if(!O){o(new Error("No shared_secret key in auth payload for encrypted channel: "+s.name),null);return}s.key=Object(u.decode)(O),delete y.shared_secret,o(null,y)})},t.prototype.trigger=function(r,o){throw new rt("Client events are not currently supported for encrypted channels")},t.prototype.handleEvent=function(r){var o=r.event,s=r.data;if(o.indexOf("pusher_internal:")===0||o.indexOf("pusher:")===0){e.prototype.handleEvent.call(this,r);return}this.handleEncryptedEvent(o,s)},t.prototype.handleEncryptedEvent=function(r,o){var s=this;if(!this.key){Et.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!o.ciphertext||!o.nonce){Et.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+o);return}var h=Object(u.decode)(o.ciphertext);if(h.length<this.nacl.secretbox.overheadLength){Et.error("Expected encrypted event ciphertext length to be "+this.nacl.secretbox.overheadLength+", got: "+h.length);return}var y=Object(u.decode)(o.nonce);if(y.length<this.nacl.secretbox.nonceLength){Et.error("Expected encrypted event nonce length to be "+this.nacl.secretbox.nonceLength+", got: "+y.length);return}var O=this.nacl.secretbox.open(h,y,this.key);if(O===null){Et.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,function(W,wt){if(W){Et.error("Failed to make a request to the authEndpoint: "+wt+". Unable to fetch new key, so dropping encrypted event");return}if(O=s.nacl.secretbox.open(h,y,s.key),O===null){Et.error("Failed to decrypt event with new key. Dropping encrypted event");return}s.emit(r,s.getDataToEmit(O))});return}this.emit(r,this.getDataToEmit(O))},t.prototype.getDataToEmit=function(r){var o=Object(et.decode)(r);try{return JSON.parse(o)}catch{return o}},t})(g),yt=vt,it=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),lt=(function(e){it(t,e);function t(r,o){var s=e.call(this)||this;s.state="initialized",s.connection=null,s.key=r,s.options=o,s.timeline=s.options.timeline,s.usingTLS=s.options.useTLS,s.errorCallbacks=s.buildErrorCallbacks(),s.connectionCallbacks=s.buildConnectionCallbacks(s.errorCallbacks),s.handshakeCallbacks=s.buildHandshakeCallbacks(s.errorCallbacks);var h=ut.getNetwork();return h.bind("online",function(){s.timeline.info({netinfo:"online"}),(s.state==="connecting"||s.state==="unavailable")&&s.retryIn(0)}),h.bind("offline",function(){s.timeline.info({netinfo:"offline"}),s.connection&&s.sendActivityCheck()}),s.updateStrategy(),s}return t.prototype.connect=function(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}},t.prototype.send=function(r){return this.connection?this.connection.send(r):!1},t.prototype.send_event=function(r,o,s){return this.connection?this.connection.send_event(r,o,s):!1},t.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},t.prototype.isUsingTLS=function(){return this.usingTLS},t.prototype.startConnecting=function(){var r=this,o=function(s,h){s?r.runner=r.strategy.connect(0,o):h.action==="error"?(r.emit("error",{type:"HandshakeError",error:h.error}),r.timeline.error({handshakeError:h.error})):(r.abortConnecting(),r.handshakeCallbacks[h.action](h))};this.runner=this.strategy.connect(0,o)},t.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},t.prototype.disconnectInternally=function(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var r=this.abandonConnection();r.close()}},t.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},t.prototype.retryIn=function(r){var o=this;this.timeline.info({action:"retry",delay:r}),r>0&&this.emit("connecting_in",Math.round(r/1e3)),this.retryTimer=new $t(r||0,function(){o.disconnectInternally(),o.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var r=this;this.unavailableTimer=new $t(this.options.unavailableTimeout,function(){r.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var r=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new $t(this.options.pongTimeout,function(){r.timeline.error({pong_timed_out:r.options.pongTimeout}),r.retryIn(0)})},t.prototype.resetActivityCheck=function(){var r=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new $t(this.activityTimeout,function(){r.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(r){var o=this;return Tt({},r,{message:function(s){o.resetActivityCheck(),o.emit("message",s)},ping:function(){o.send_event("pusher:pong",{})},activity:function(){o.resetActivityCheck()},error:function(s){o.emit("error",s)},closed:function(){o.abandonConnection(),o.shouldRetry()&&o.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(r){var o=this;return Tt({},r,{connected:function(s){o.activityTimeout=Math.min(o.options.activityTimeout,s.activityTimeout,s.connection.activityTimeout||1/0),o.clearUnavailableTimer(),o.setConnection(s.connection),o.socket_id=o.connection.id,o.updateState("connected",{socket_id:o.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var r=this,o=function(s){return function(h){h.error&&r.emit("error",{type:"WebSocketError",error:h.error}),s(h)}};return{tls_only:o(function(){r.usingTLS=!0,r.updateStrategy(),r.retryIn(0)}),refused:o(function(){r.disconnect()}),backoff:o(function(){r.retryIn(1e3)}),retry:o(function(){r.retryIn(0)})}},t.prototype.setConnection=function(r){this.connection=r;for(var o in this.connectionCallbacks)this.connection.bind(o,this.connectionCallbacks[o]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var r in this.connectionCallbacks)this.connection.unbind(r,this.connectionCallbacks[r]);var o=this.connection;return this.connection=null,o}},t.prototype.updateState=function(r,o){var s=this.state;if(this.state=r,s!==r){var h=r;h==="connected"&&(h+=" with new socket ID "+o.socket_id),Et.debug("State changed",s+" -> "+h),this.timeline.info({state:r,params:o}),this.emit("state_change",{previous:s,current:r}),this.emit(r,o)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t})(Qt),pt=lt,kt=(function(){function e(){this.channels={}}return e.prototype.add=function(t,r){return this.channels[t]||(this.channels[t]=Ot(t,r)),this.channels[t]},e.prototype.all=function(){return Xe(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var r=this.channels[t];return delete this.channels[t],r},e.prototype.disconnect=function(){Lt(this.channels,function(t){t.disconnect()})},e})(),bt=kt;function Ot(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return gt.createEncryptedChannel(e,t,t.config.nacl);var r="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",o=q.buildLogSuffix("encryptedChannelSupport");throw new rt(r+". "+o)}else return e.indexOf("private-")===0?gt.createPrivateChannel(e,t):e.indexOf("presence-")===0?gt.createPresenceChannel(e,t):gt.createChannel(e,t)}var Pt={createChannels:function(){return new bt},createConnectionManager:function(e,t){return new pt(e,t)},createChannel:function(e,t){return new d(e,t)},createPrivateChannel:function(e,t){return new g(e,t)},createPresenceChannel:function(e,t){return new nt(e,t)},createEncryptedChannel:function(e,t,r){return new yt(e,t,r)},createTimelineSender:function(e,t){return new N(e,t)},createAuthorizer:function(e,t){return t.authorizer?t.authorizer(e,t):new B(e,t)},createHandshake:function(e,t){return new Y(e,t)},createAssistantToTheTransportManager:function(e,t,r){return new k(e,t,r)}},gt=Pt,jt=(function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return gt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft>0},e.prototype.reportDeath=function(){this.livesLeft-=1},e})(),Rt=jt,Ut=(function(){function e(t,r){this.strategies=t,this.loop=!!r.loop,this.failFast=!!r.failFast,this.timeout=r.timeout,this.timeoutLimit=r.timeoutLimit}return e.prototype.isSupported=function(){return Ge(this.strategies,Nt.method("isSupported"))},e.prototype.connect=function(t,r){var o=this,s=this.strategies,h=0,y=this.timeout,O=null,W=function(wt,It){It?r(null,It):(h=h+1,o.loop&&(h=h%s.length),h<s.length?(y&&(y=y*2,o.timeoutLimit&&(y=Math.min(y,o.timeoutLimit))),O=o.tryStrategy(s[h],t,{timeout:y,failFast:o.failFast},W)):r(!0))};return O=this.tryStrategy(s[h],t,{timeout:y,failFast:this.failFast},W),{abort:function(){O.abort()},forceMinPriority:function(wt){t=wt,O&&O.forceMinPriority(wt)}}},e.prototype.tryStrategy=function(t,r,o,s){var h=null,y=null;return o.timeout>0&&(h=new $t(o.timeout,function(){y.abort(),s(!0)})),y=t.connect(r,function(O,W){O&&h&&h.isRunning()&&!o.failFast||(h&&h.ensureAborted(),s(O,W))}),{abort:function(){h&&h.ensureAborted(),y.abort()},forceMinPriority:function(O){y.forceMinPriority(O)}}},e})(),At=Ut,Mn=(function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return Ge(this.strategies,Nt.method("isSupported"))},e.prototype.connect=function(t,r){return Bn(this.strategies,t,function(o,s){return function(h,y){if(s[o].error=h,h){Dn(s)&&r(!0);return}Vt(s,function(O){O.forceMinPriority(y.transport.priority)}),r(null,y)}})},e})(),un=Mn;function Bn(e,t,r){var o=le(e,function(s,h,y,O){return s.connect(t,r(h,O))});return{abort:function(){Vt(o,Hn)},forceMinPriority:function(s){Vt(o,function(h){h.forceMinPriority(s)})}}}function Dn(e){return sn(e,function(t){return!!t.error})}function Hn(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}var qn=(function(){function e(t,r,o){this.strategy=t,this.transports=r,this.ttl=o.ttl||1800*1e3,this.usingTLS=o.useTLS,this.timeline=o.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,r){var o=this.usingTLS,s=Fn(o),h=[this.strategy];if(s&&s.timestamp+this.ttl>=Nt.now()){var y=this.transports[s.transport];y&&(this.timeline.info({cached:!0,transport:s.transport,latency:s.latency}),h.push(new At([y],{timeout:s.latency*2+1e3,failFast:!0})))}var O=Nt.now(),W=h.pop().connect(t,function wt(It,Ft){It?(_n(o),h.length>0?(O=Nt.now(),W=h.pop().connect(t,wt)):r(It)):($n(o,Ft.transport.name,Nt.now()-O),r(null,Ft))});return{abort:function(){W.abort()},forceMinPriority:function(wt){t=wt,W&&W.forceMinPriority(wt)}}},e})(),zn=qn;function hn(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function Fn(e){var t=ut.getLocalStorage();if(t)try{var r=t[hn(e)];if(r)return JSON.parse(r)}catch{_n(e)}return null}function $n(e,t,r){var o=ut.getLocalStorage();if(o)try{o[hn(e)]=ne({timestamp:Nt.now(),transport:t,latency:r})}catch{}}function _n(e){var t=ut.getLocalStorage();if(t)try{delete t[hn(e)]}catch{}}var Yn=(function(){function e(t,r){var o=r.delay;this.strategy=t,this.options={delay:o}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,r){var o=this.strategy,s,h=new $t(this.options.delay,function(){s=o.connect(t,r)});return{abort:function(){h.ensureAborted(),s&&s.abort()},forceMinPriority:function(y){t=y,s&&s.forceMinPriority(y)}}},e})(),nn=Yn,Jn=(function(){function e(t,r,o){this.test=t,this.trueBranch=r,this.falseBranch=o}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,r){var o=this.test()?this.trueBranch:this.falseBranch;return o.connect(t,r)},e})(),qe=Jn,Xn=(function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,r){var o=this.strategy.connect(t,function(s,h){h&&o.abort(),r(s,h)});return o},e})(),Wn=Xn;function ze(e){return function(){return e.isSupported()}}var Gn=function(e,t,r){var o={};function s(jn,qr,zr,Fr,$r){var Nn=r(e,jn,qr,zr,Fr,$r);return o[jn]=Nn,Nn}var h=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),y=Object.assign({},h,{useTLS:!0}),O=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),W={loop:!0,timeout:15e3,timeoutLimit:6e4},wt=new Rt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),It=new Rt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),Ft=s("ws","ws",3,h,wt),te=s("wss","ws",3,y,wt),Ur=s("sockjs","sockjs",1,O),On=s("xhr_streaming","xhr_streaming",1,O,It),Mr=s("xdr_streaming","xdr_streaming",1,O,It),Pn=s("xhr_polling","xhr_polling",1,O),Br=s("xdr_polling","xdr_polling",1,O),An=new At([Ft],W),Dr=new At([te],W),Hr=new At([Ur],W),En=new At([new qe(ze(On),On,Mr)],W),kn=new At([new qe(ze(Pn),Pn,Br)],W),Ln=new At([new qe(ze(En),new un([En,new nn(kn,{delay:4e3})]),kn)],W),dn=new qe(ze(Ln),Ln,Hr),xn;return t.useTLS?xn=new un([An,new nn(dn,{delay:2e3})]):xn=new un([An,new nn(Dr,{delay:2e3}),new nn(dn,{delay:5e3})]),new zn(new Wn(new qe(ze(Ft),xn,dn)),o,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},Kn=Gn,Zn=(function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),V.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,r){e.hooks.isInitialized()?(e.changeState("initialized"),r(!0)):(t&&e.onError(t),e.onClose(),r(!1))})):e.onClose()}),Vn={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new G),e.close()},t.onerror=function(r){e.emit("error",r),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},Qn=Vn,tr=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),er=256*1024,nr=(function(e){tr(t,e);function t(r,o,s){var h=e.call(this)||this;return h.hooks=r,h.method=o,h.url=s,h}return t.prototype.start=function(r){var o=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){o.close()},ut.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(r)},t.prototype.close=function(){this.unloader&&(ut.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(r,o){for(;;){var s=this.advanceBuffer(o);if(s)this.emit("chunk",{status:r,data:s});else break}this.isBufferTooLong(o)&&this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(r){var o=r.slice(this.position),s=o.indexOf(`
|
|
2
|
+
`);return s!==-1?(this.position+=s+1,o.slice(0,s)):null},t.prototype.isBufferTooLong=function(r){return this.position===r.length&&r.length>er},t})(Qt),rr=nr,ln;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"})(ln||(ln={}));var ge=ln,ir=1,or=(function(){function e(t,r){this.hooks=t,this.session=mn(1e3)+"/"+cr(8),this.location=sr(r),this.readyState=ge.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,r){this.onClose(t,r,!0)},e.prototype.sendRaw=function(t){if(this.readyState===ge.OPEN)try{return ut.createSocketRequest("POST",bn(ar(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,r,o){this.closeStream(),this.readyState=ge.CLOSED,this.onclose&&this.onclose({code:t,reason:r,wasClean:o})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===ge.OPEN&&this.onActivity();var r,o=t.data.slice(0,1);switch(o){case"o":r=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(r);break;case"a":r=JSON.parse(t.data.slice(1)||"[]");for(var s=0;s<r.length;s++)this.onEvent(r[s]);break;case"m":r=JSON.parse(t.data.slice(1)||"null"),this.onEvent(r);break;case"h":this.hooks.onHeartbeat(this);break;case"c":r=JSON.parse(t.data.slice(1)||"[]"),this.onClose(r[0],r[1],!0);break}}},e.prototype.onOpen=function(t){this.readyState===ge.CONNECTING?(t&&t.hostname&&(this.location.base=fr(this.location.base,t.hostname)),this.readyState=ge.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},e.prototype.onEvent=function(t){this.readyState===ge.OPEN&&this.onmessage&&this.onmessage({data:t})},e.prototype.onActivity=function(){this.onactivity&&this.onactivity()},e.prototype.onError=function(t){this.onerror&&this.onerror(t)},e.prototype.openStream=function(){var t=this;this.stream=ut.createSocketRequest("POST",bn(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",function(r){t.onChunk(r)}),this.stream.bind("finished",function(r){t.hooks.onFinished(t,r)}),this.stream.bind("buffer_too_long",function(){t.reconnect()});try{this.stream.start()}catch(r){Nt.defer(function(){t.onError(r),t.onClose(1006,"Could not start streaming",!1)})}},e.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},e})();function sr(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function ar(e,t){return e.base+"/"+t+"/xhr_send"}function bn(e){var t=e.indexOf("?")===-1?"?":"&";return e+t+"t="+ +new Date+"&n="+ir++}function fr(e,t){var r=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return r[1]+t+r[3]}function mn(e){return Math.floor(Math.random()*e)}function cr(e){for(var t=[],r=0;r<e;r++)t.push(mn(32).toString(32));return t.join("")}var ur=or,hr={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr_streaming"+e.queryString},onHeartbeat:function(e){e.sendRaw("[]")},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){e.onClose(1006,"Connection interrupted ("+t+")",!1)}},lr=hr,pr={getReceiveURL:function(e,t){return e.base+"/"+t+"/xhr"+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw("[]")},onFinished:function(e,t){t===200?e.reconnect():e.onClose(1006,"Connection interrupted ("+t+")",!1)}},dr=pr,xr={getRequest:function(e){var t=ut.getXHRAPI(),r=new t;return r.onreadystatechange=r.onprogress=function(){switch(r.readyState){case 3:r.responseText&&r.responseText.length>0&&e.onChunk(r.status,r.responseText);break;case 4:r.responseText&&r.responseText.length>0&&e.onChunk(r.status,r.responseText),e.emit("finished",r.status),e.close();break}},r},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},vr=xr,yr={createStreamingSocket:function(e){return this.createSocket(lr,e)},createPollingSocket:function(e){return this.createSocket(dr,e)},createSocket:function(e,t){return new ur(e,t)},createXHR:function(e,t){return this.createRequest(vr,e,t)},createRequest:function(e,t,r){return new rr(e,t,r)}},wn=yr;wn.createXDR=function(e,t){return this.createRequest(Qn,e,t)};var gr=wn,_r={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:v,DependenciesReceivers:at,getDefaultStrategy:Kn,Transports:_,transportConnectionInitializer:Zn,HTTPFactory:gr,TimelineTransport:Me,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var r=function(){t.onDocumentBody(e.ready)};window.JSON?r():V.load("json2",{},r)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:Dt,jsonp:we}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new Ue(e,t)},createScriptRequest:function(e){return new Se(e)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var e=this.getXHRAPI();return new e},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return A},createWebSocket:function(e){var t=this.getWebSocketAPI();return new t(e)},createSocketRequest:function(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported:function(e){var t=e?"https:":"http:",r=this.getProtocol();return!!window.XDomainRequest&&r===t},addUnloadListener:function(e){window.addEventListener!==void 0?window.addEventListener("unload",e,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",e)},removeUnloadListener:function(e){window.addEventListener!==void 0?window.removeEventListener("unload",e,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",e)}},ut=_r,pn;(function(e){e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG"})(pn||(pn={}));var rn=pn,br=(function(){function e(t,r,o){this.key=t,this.session=r,this.events=[],this.options=o||{},this.sent=0,this.uniqueID=0}return e.prototype.log=function(t,r){t<=this.options.level&&(this.events.push(Tt({},r,{timestamp:Nt.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},e.prototype.error=function(t){this.log(rn.ERROR,t)},e.prototype.info=function(t){this.log(rn.INFO,t)},e.prototype.debug=function(t){this.log(rn.DEBUG,t)},e.prototype.isEmpty=function(){return this.events.length===0},e.prototype.send=function(t,r){var o=this,s=Tt({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(s,function(h,y){h||o.sent++,r&&r(h,y)}),!0},e.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},e})(),mr=br,wr=(function(){function e(t,r,o,s){this.name=t,this.priority=r,this.transport=o,this.options=s||{}}return e.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},e.prototype.connect=function(t,r){var o=this;if(this.isSupported()){if(this.priority<t)return Sn(new M,r)}else return Sn(new Kt,r);var s=!1,h=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),y=null,O=function(){h.unbind("initialized",O),h.connect()},W=function(){y=gt.createHandshake(h,function(te){s=!0,Ft(),r(null,te)})},wt=function(te){Ft(),r(te)},It=function(){Ft();var te;te=ne(h),r(new mt(te))},Ft=function(){h.unbind("initialized",O),h.unbind("open",W),h.unbind("error",wt),h.unbind("closed",It)};return h.bind("initialized",O),h.bind("open",W),h.bind("error",wt),h.bind("closed",It),h.initialize(),{abort:function(){s||(Ft(),y?y.close():h.close())},forceMinPriority:function(te){s||o.priority<te&&(y?y.close():h.close())}}},e})(),Sr=wr;function Sn(e,t){return Nt.defer(function(){t(e)}),{abort:function(){},forceMinPriority:function(){}}}var Tr=ut.Transports,Cr=function(e,t,r,o,s,h){var y=Tr[r];if(!y)throw new Yt(r);var O=(!e.enabledTransports||ct(e.enabledTransports,t)!==-1)&&(!e.disabledTransports||ct(e.disabledTransports,t)===-1),W;return O?(s=Object.assign({ignoreNullOrigin:e.ignoreNullOrigin},s),W=new Sr(t,o,h?h.getAssistant(y):y,s)):W=Or,W},Or={isSupported:function(){return!1},connect:function(e,t){var r=Nt.defer(function(){t(new Kt)});return{abort:function(){r.ensureAborted()},forceMinPriority:function(){}}}};function Pr(e){var t={activityTimeout:e.activityTimeout||st.activityTimeout,authEndpoint:e.authEndpoint||st.authEndpoint,authTransport:e.authTransport||st.authTransport,cluster:e.cluster||st.cluster,httpPath:e.httpPath||st.httpPath,httpPort:e.httpPort||st.httpPort,httpsPort:e.httpsPort||st.httpsPort,pongTimeout:e.pongTimeout||st.pongTimeout,statsHost:e.statsHost||st.stats_host,unavailableTimeout:e.unavailableTimeout||st.unavailableTimeout,wsPath:e.wsPath||st.wsPath,wsPort:e.wsPort||st.wsPort,wssPort:e.wssPort||st.wssPort,enableStats:Lr(e),httpHost:Ar(e),useTLS:kr(e),wsHost:Er(e)};return"auth"in e&&(t.auth=e.auth),"authorizer"in e&&(t.authorizer=e.authorizer),"disabledTransports"in e&&(t.disabledTransports=e.disabledTransports),"enabledTransports"in e&&(t.enabledTransports=e.enabledTransports),"ignoreNullOrigin"in e&&(t.ignoreNullOrigin=e.ignoreNullOrigin),"timelineParams"in e&&(t.timelineParams=e.timelineParams),"nacl"in e&&(t.nacl=e.nacl),t}function Ar(e){return e.httpHost?e.httpHost:e.cluster?"sockjs-"+e.cluster+".pusher.com":st.httpHost}function Er(e){return e.wsHost?e.wsHost:e.cluster?Tn(e.cluster):Tn(st.cluster)}function Tn(e){return"ws-"+e+".pusher.com"}function kr(e){return ut.getProtocol()==="https:"?!0:e.forceTLS!==!1}function Lr(e){return"enableStats"in e?e.enableStats:"disableStats"in e?!e.disableStats:!1}var Cn=(function(){function e(t,r){var o=this;if(jr(t),r=r||{},!r.cluster&&!(r.wsHost||r.httpHost)){var s=q.buildLogSuffix("javascriptQuickStart");Et.warn("You should always specify a cluster when connecting. "+s)}"disableStats"in r&&Et.warn("The disableStats option is deprecated in favor of enableStats"),this.key=t,this.config=Pr(r),this.channels=gt.createChannels(),this.global_emitter=new Qt,this.sessionID=Math.floor(Math.random()*1e9),this.timeline=new mr(this.key,this.sessionID,{cluster:this.config.cluster,features:e.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:rn.INFO,version:st.VERSION}),this.config.enableStats&&(this.timelineSender=gt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+ut.TimelineTransport.name}));var h=function(y){return ut.getDefaultStrategy(o.config,y,Cr)};this.connection=gt.createConnectionManager(this.key,{getStrategy:h,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",function(){o.subscribeAll(),o.timelineSender&&o.timelineSender.send(o.connection.isUsingTLS())}),this.connection.bind("message",function(y){var O=y.event,W=O.indexOf("pusher_internal:")===0;if(y.channel){var wt=o.channel(y.channel);wt&&wt.handleEvent(y)}W||o.global_emitter.emit(y.event,y.data)}),this.connection.bind("connecting",function(){o.channels.disconnect()}),this.connection.bind("disconnected",function(){o.channels.disconnect()}),this.connection.bind("error",function(y){Et.warn(y)}),e.instances.push(this),this.timeline.info({instances:e.instances.length}),e.isReady&&this.connect()}return e.ready=function(){e.isReady=!0;for(var t=0,r=e.instances.length;t<r;t++)e.instances[t].connect()},e.getClientFeatures=function(){return Le(je({ws:ut.Transports.ws},function(t){return t.isSupported({})}))},e.prototype.channel=function(t){return this.channels.find(t)},e.prototype.allChannels=function(){return this.channels.all()},e.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),r=this.timelineSender;this.timelineSenderTimer=new Ye(6e4,function(){r.send(t)})}},e.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},e.prototype.bind=function(t,r,o){return this.global_emitter.bind(t,r,o),this},e.prototype.unbind=function(t,r,o){return this.global_emitter.unbind(t,r,o),this},e.prototype.bind_global=function(t){return this.global_emitter.bind_global(t),this},e.prototype.unbind_global=function(t){return this.global_emitter.unbind_global(t),this},e.prototype.unbind_all=function(t){return this.global_emitter.unbind_all(),this},e.prototype.subscribeAll=function(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)},e.prototype.subscribe=function(t){var r=this.channels.add(t,this);return r.subscriptionPending&&r.subscriptionCancelled?r.reinstateSubscription():!r.subscriptionPending&&this.connection.state==="connected"&&r.subscribe(),r},e.prototype.unsubscribe=function(t){var r=this.channels.find(t);r&&r.subscriptionPending?r.cancelSubscription():(r=this.channels.remove(t),r&&r.subscribed&&r.unsubscribe())},e.prototype.send_event=function(t,r,o){return this.connection.send_event(t,r,o)},e.prototype.shouldUseTLS=function(){return this.config.useTLS},e.instances=[],e.isReady=!1,e.logToConsole=!1,e.Runtime=ut,e.ScriptReceivers=ut.ScriptReceivers,e.DependenciesReceivers=ut.DependenciesReceivers,e.auth_callbacks=ut.auth_callbacks,e})(),Oe=Cn;function jr(e){if(e==null)throw"You must pass your app key when you instantiate Pusher."}ut.setup(Cn);var Nr=ht(2),Rr=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Ir=(function(e){Rr(t,e);function t(r,o){var s=this;return Oe.logToConsole=t.logToConsole,Oe.log=t.log,o=o||{},o.nacl=Nr,s=e.call(this,r,o)||this,s}return t})(Oe);K.default=Ir})])})})(vn)),vn.exports}var yn,In;function Qr(){return In||(In=1,yn=Vr()),yn}var ti=Qr();const ei=Zr(ti),gn=`${Mt.BASE_URL}/api/notification`,ni=dt=>Mt.api.get(gn,{params:{...dt}}),ri=dt=>Mt.api.put(`${gn}/${dt}`),ii=()=>Mt.api.put(`${gn}/updateAllStatus`),oi={currentPage:1,pageSize:30,searchString:"",isRead:!1},si="Notification list",Un="NOTIFICATION_CHANNEL",ai="NEW_NOTIFICATION",fi=()=>{const dt=_e.useDispatch(),{roles:Wt}=Yr.useParams(),Ct=_e.useSelector(M=>M.common.user),K=Ct?.id,ht=Ct?.studentId,S=_e.useSelector(M=>M.notification.notificationList),v=_e.useSelector(M=>M.common.user?.pusherKey),St=_e.useSelector(M=>M.common.user?.pusherCluster),st=_e.useSelector(M=>M.notification.totalItems),qt=_e.useSelector(M=>M.notification.unReadNotification),[R,at]=ue.useState(oi),[V,F]=ue.useState(!1),_t=M=>at({...R,...M}),q=M=>{const{source:mt,extraData:rt}=M;switch(mt){case"AssessmentAssignment":window.open(`/player/diagnosticsurvey/${Number(rt)}`);break;case"NewConferenceCreated":window.open(`/start-conference/${JSON.parse(rt)?.[0]}/${JSON.parse(rt)?.[1]}/conferenceRubric`);break;case"Class Reflection":window.open(`/start-reflection/${rt?.replace(/[\[\]]/g,"")?.split(",")?.[1]}`);break;case"Class Reflection Completed":window.open(`/result-reflection/${rt?.replace(/[\[\]]/g,"")?.split(",")?.[1]}`);break;case"External Reflection Completed":window.open(`/result-reflection/${JSON.parse(rt)?.[0]}/external`);break;case"NewSessionCreated":window.open(`/start-question/${JSON.parse(rt)?.[0]}/${JSON.parse(rt)?.[1]}`);break;case"NewSessionComplete":window.open(`/start-question/${JSON.parse(rt)?.[0]}/${JSON.parse(rt)?.[1]}`);break;case"ActionPointReminder":window.open("/action-point/to-do");break;case"SendNotiPLP":window.open("/personal-learning-plan");break;case"SendNotiGOAL":window.open(`/my-goals/${JSON.parse(rt)}`);break;case"CertificateApproved":window.open("/dashboard/certification/2");break;case"RequestCheckIn":window.open(`/start-question/${JSON.parse(rt)?.[0]}/${JSON.parse(rt)?.[1]}`);case"NewSurveyCreated":ht&&window.open(`/start-survey/${JSON.parse(rt)?.[0]}/${ht}`);break;case"StudentCompletedSurvey":window.open(`/start-survey/${JSON.parse(rt)?.[0]}/${JSON.parse(rt)?.[1]}`);break}},T=ue.useCallback(async()=>{dt(Mt.setLoading(!0));try{const M=await ni({...R,roles:Wt?.trim()?[Wt]:Ct?.roles}),{items:mt,totalItems:rt}=M.data;dt(Mt.setNotification({notificationList:mt,totalItems:rt}))}catch(M){dt(Mt.setAlert({type:"danger",message:M.response?.data?.title||M.message}))}dt(Mt.setLoading(!1))},[R]);ue.useEffect(()=>{document.title=si},[]),ue.useEffect(()=>{T();let M;if(v&&St&&K)try{M=new ei(v,{cluster:St}),M.subscribe(`${Un}-${K}`).bind(ai,T)}catch(mt){console.error("Failed to initialize Pusher:",mt)}return()=>{if(M&&K)try{M.unsubscribe(`${Un}-${K}`),M.disconnect()}catch(mt){console.error("Failed to disconnect Pusher:",mt)}}},[T,K,v,St]);const L=ue.useCallback((M,mt)=>{try{dt(Mt.setModal({isOpen:!0,type:"warning",message:`Do you want to mark this notification ${mt?"read":"unread"}?`,onConfirm:async()=>{await ri(M),T()}}))}catch(rt){dt(Mt.setAlert({type:"danger",message:rt.response?.data?.title||rt.message}))}},[S,qt]),G=ue.useCallback(async()=>{try{if(S.length===0)throw new Error("There are no unread messages");dt(Mt.setModal({isOpen:!0,type:"warning",message:"Do you want to mark all notification ?",onConfirm:async()=>{F(!0),await ii(),T(),F(!1)}}))}catch(M){dt(Mt.setAlert({type:"danger",message:M.response?.data?.title||M.message}))}},[S]);return{notificationList:S,totalItems:st,unReadNotification:qt,filters:R,changeFilters:_t,updateNotification:L,viewNotification:q,updateAll:G,toggleUpdateAllStatus:V}},ci="_container_1bf04_1",ui="_header_1bf04_7",hi="_markAllBtn_1bf04_14",li="_markAllText_1bf04_21",pi="_markAllCheckbox_1bf04_27",di="_filterContainer_1bf04_35",xi="_filterLabel_1bf04_40",vi="_tableWrapper_1bf04_52",yi="_tableHead_1bf04_60",gi="_thText_1bf04_69",_i="_td_1bf04_73",bi="_rowText_1bf04_77",mi="_rowTime_1bf04_82",wi="_checkboxInput_1bf04_87",Si="_actionBtn_1bf04_95",Ti="_iconContainer_1bf04_104",Ci="_iconGreen_1bf04_114",Oi="_iconOrange_1bf04_118",Pi="_iconRed_1bf04_122",Ai="_iconYellow_1bf04_126",Ei="_flagIcon_1bf04_140",ki="_flagIconRed_1bf04_145",Li="_flagIconYellow_1bf04_149",ji="_tooltipContainer_1bf04_153",Ni="_tooltipText_1bf04_157",Ri="_whiteTooltip_1bf04_163",Ii="_redText_1bf04_173",ft={container:ci,header:ui,markAllBtn:hi,markAllText:li,markAllCheckbox:pi,filterContainer:di,filterLabel:xi,tableWrapper:vi,tableHead:yi,thText:gi,td:_i,rowText:bi,rowTime:mi,checkboxInput:wi,actionBtn:Si,iconContainer:Ti,iconGreen:Ci,iconOrange:Oi,iconRed:Pi,iconYellow:Ai,"explain-icon":"_explain-icon_1bf04_134",flagIcon:Ei,flagIconRed:ki,flagIconYellow:Li,tooltipContainer:ji,tooltipText:Ni,whiteTooltip:Ri,redText:Ii},Ui="Notifications",Mi="/images/info-icon.png",Bi=dt=>{const Wt=(dt.text||"").toLowerCase(),Ct=dt.informaions?.[0]?.toLowerCase();return Wt.includes("red flag")||Ct?.includes("red")?J.jsx("div",{className:`${ft.iconContainer} ${ft.iconRed}`,children:J.jsx("img",{src:"/images/flag-icon.svg",alt:"Red flag",className:`${ft.flagIcon} ${ft.flagIconRed}`})}):Wt.includes("yellow flag")||Ct?.includes("yellow")?J.jsx("div",{className:`${ft.iconContainer} ${ft.iconYellow}`,children:J.jsx("img",{src:"/images/flag-icon.svg",alt:"Yellow flag",className:`${ft.flagIcon} ${ft.flagIconYellow}`})}):Wt.includes("completed a check-in")||Wt.includes("completed a survey")||dt.source==="NewSessionComplete"||dt.source==="Class Reflection Completed"||dt.source==="External Reflection Completed"?J.jsx("div",{className:`${ft.iconContainer} ${ft.iconGreen}`,children:J.jsx(Mt.FaCheck,{color:"white",size:18})}):J.jsx("div",{className:`${ft.iconContainer} ${ft.iconOrange}`,children:J.jsx(Xr,{color:"white",size:18})})},Di=()=>{const{notificationList:dt,totalItems:Wt,filters:Ct,changeFilters:K,updateNotification:ht,viewNotification:S,updateAll:v,toggleUpdateAllStatus:St}=fi(),{t:st}=Jr.useTranslation(),qt=(R,at,V)=>{if(typeof R!="string")return null;const F=R.indexOf(" "),_t=F!==-1?R.substring(0,F):R,q=F!==-1?R.substring(F+1):"";return J.jsxs("div",{className:at!==V-1?"mb-1":"",children:[J.jsx("span",{className:`fw-bold ${ft.redText}`,children:_t})," ",q]},at)};return J.jsxs("div",{className:`animated fadeIn ${ft.container}`,children:[J.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[J.jsx("h4",{className:ft.header,children:Ui}),J.jsxs("div",{className:"d-flex align-items-center",children:[Ct.isRead===!1&&J.jsxs("div",{className:`d-flex align-items-center px-4 me-3 cursor-pointer ${ft.markAllBtn}`,onClick:()=>v(),children:[J.jsx("span",{className:`me-3 ${ft.markAllText}`,children:"Mark all as read"}),J.jsx(ce.Input,{checked:St,type:"checkbox",className:`m-0 position-relative cursor-pointer ${ft.markAllCheckbox}`,onChange:()=>v(),onClick:R=>R.stopPropagation()})]}),J.jsxs("div",{className:ft.filterContainer,children:[J.jsx("span",{className:ft.filterLabel,children:"Filter"}),J.jsx(Kr,{value:Ct.isRead,onChange:R=>K({isRead:R.value})})]})]})]}),J.jsxs(ce.Row,{className:"mb-2",children:[J.jsx(ce.Col,{md:12,children:dt&&dt.length>0?J.jsx("div",{className:ft.tableWrapper,children:J.jsxs(ce.Table,{borderless:!0,hover:!0,style:{margin:0},children:[J.jsx("thead",{className:ft.tableHead,children:J.jsxs("tr",{children:[J.jsx("th",{className:`align-middle ${ft.th} ${ft.thText}`,children:"Text"}),J.jsx("th",{className:`align-middle ${ft.th}`,children:"Time"}),J.jsx("th",{className:`text-center align-middle ${ft.th}`,children:"Is read"}),J.jsx("th",{className:`text-center align-middle ${ft.th}`,children:"Go to session"})]})}),J.jsx("tbody",{children:dt.map((R,at)=>J.jsxs("tr",{style:{borderBottom:at===dt.length-1?"none":"1px solid #f3f4f6"},children:[J.jsx("td",{className:`align-middle ${ft.td}`,children:J.jsxs("div",{className:"d-flex align-items-center",children:[Bi(R),J.jsxs("span",{className:`ms-3 ${ft.rowText}`,children:[R.text,R.text?.toLowerCase().includes("flag")&&J.jsx("img",{id:`info-icon-${R.id}`,src:Mi,alt:"",className:`ms-2 ${ft["explain-icon"]}`})]}),R.text?.toLowerCase().includes("flag")&&J.jsx(ce.UncontrolledTooltip,{placement:"bottom",target:`info-icon-${R.id}`,innerClassName:ft.whiteTooltip,offset:[0,10],children:J.jsx("div",{className:`text-left p-1 ${ft.tooltipContainer}`,children:J.jsx("div",{className:ft.tooltipText,children:R.informaions&&R.informaions.length>0?R.informaions.map((V,F)=>qt(V,F,R.informaions.length)):"View session details to see metrics"})})})]})}),J.jsx("td",{className:`align-middle ${ft.td} ${ft.rowTime}`,children:Mt.formatLocalTime(R.time,"yyyy-MM-DD HH:mm")}),J.jsx("td",{className:`text-center align-middle ${ft.td}`,children:J.jsx(ce.Input,{type:"checkbox",className:`position-relative m-0 shadow-none ${ft.checkboxInput}`,checked:R.isRead,onChange:()=>ht(R.id,!R.isRead)})}),J.jsx("td",{className:`text-center align-middle ${ft.td}`,children:["AssessmentAssignment","NewConferenceCreated","NewSessionCreated","CertificateApproved","Class Reflection","NewSessionComplete","ActionPointReminder","SendNotiPLP","SendNotiGOAL","Class Reflection Completed","External Reflection Completed","RequestCheckIn","NewSurveyCreated","StudentCompletedSurvey"].includes(R.source)&&J.jsx(ce.Button,{outline:!0,color:"secondary",size:"sm",className:ft.actionBtn,onClick:()=>S(R),children:"Go"})})]},R.id))})]})}):J.jsx(Mt.EmptyDataAlert,{label:st("notification")})}),J.jsx(ce.Col,{md:12,className:"mt-4",children:J.jsx(Mt.CustomPagination,{filters:Ct,totalRecordCount:Wt,changePageSize:R=>K({pageSize:R}),changePage:R=>K({currentPage:R})})})]})]})};exports.default=Di;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),u=require("reactstrap"),v=require("react-i18next"),s=require("./index-B0KHEYvr.js"),R=require("formik"),T=require("yup"),D=require("react-redux");function q(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(a,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return a.default=t,Object.freeze(a)}const _=q(T),b=`${s.BASE_URL}/api/Skill`,N=t=>s.api.get(b,{params:t}),$=t=>s.api.get(`${b}/${t}`),A=t=>s.api.post(b,t),F=t=>s.api.put(`${b}/${t.id}`,t),B=t=>s.api.delete(`${b}/${t}`),M=t=>{const[a,i]=m.useState([]);m.useEffect(()=>{o()},[]);const o=async()=>{try{const c=await N();i(c.data.items)}catch(c){console.error(c.message)}},{id:g,isDisabled:l}=t,p=a.map(c=>({id:c.id,value:c.id,label:c.path?`${c.path}/${c.name}`:c.name}));return e.jsx(s.CustomSelector,{options:p,defaultValue:g,...t,isDisabled:l})},O=_.object({name:_.string().required("Name is required"),description:_.string()}),P=(t,a)=>{const{header:i,confirmText:o,onConfirm:g,skillDetail:l,onCancel:p,edited:c,setEdited:r,setEditedTrue:d,setEditedFalse:j,isDisabled:k}=t,{t:h}=v.useTranslation();return e.jsx(R.Formik,{initialValues:l,enableReinitialize:!0,validationSchema:O,onSubmit:(f,x)=>{g(f),x.resetForm()},children:f=>{const{values:x,touched:E,errors:y,handleChange:S,handleBlur:C,handleSubmit:I,resetForm:w}=f;return e.jsx(s.CommonModal,{header:i,confirmText:o,onConfirm:I,ref:a,onCancel:()=>{p(),w()},edited:c,setEdited:r,setEditedFalse:j,children:e.jsxs(u.Row,{children:[e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(s.RequiredLabel,{text:h("name")}),e.jsx(u.Input,{name:"name",placeholder:h("name"),value:x.name,onChange:n=>{S(n),d()},onBlur:C("name")}),E.name&&y.name&&e.jsx(s.ErrorHandler,{text:y.name})]}),e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(u.Label,{children:h("description")}),e.jsx(u.Input,{type:"textarea",rows:5,name:"description",placeholder:h("description"),value:x.description,onChange:n=>{S(n),d()},onBlur:C("description")})]}),e.jsxs(u.Col,{md:12,className:"mb-2",children:[e.jsx(u.Label,{children:h("parent_category")}),e.jsx(M,{isDisabled:k,onChange:n=>{f.setFieldValue("parentSkillId",n.value),d()},id:x.parentSkillId})]})]})})}})},z=m.forwardRef(P),V="Skill list",U=()=>{const t=D.useSelector(r=>r.skills.skillList),a=D.useSelector(r=>r.skills.totalItems),{t:i}=v.useTranslation(),{filters:o,changeFilters:g}=s.useFilters(),l=D.useDispatch(),p=m.useCallback(async()=>{l(s.setLoading(!0));try{const r=await N(o),{items:d,totalItems:j}=r.data;l(s.setSkillList({skillList:d,totalItems:j}))}catch(r){l(s.setAlert({type:"danger",message:r.response?.data?.title||r.message}))}l(s.setLoading(!1))},[l,o]),c=m.useCallback(r=>{l(s.setLoading(!0));try{l(s.setModal({isOpen:!0,type:"warning",message:i("do_you_want_to_remove_this_skill"),onConfirm:async()=>{try{await B(r),l(s.setAlert({type:"success",message:i("remove_skill_successfully")})),g({currentPage:1})}catch(d){l(s.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"}))}}}))}catch(d){l(s.setAlert({type:"danger",message:d.response?.data?.title||d.message||"Error occured"}))}l(s.setLoading(!1))},[o]);return m.useEffect(()=>{document.title=V},[]),m.useEffect(()=>{p()},[o]),{skillList:t,totalItems:a,filters:o,changeFilters:g,getData:p,removeData:c}},L={name:"",description:"",path:"",parentSkillId:null},H=()=>{const t=D.useDispatch(),[a,i]=m.useState(0),[o,g]=m.useState(L),[l,p]=m.useState(!1),c=async()=>{localStorage.setItem(window.location.href,"true"),p(!0)},r=async()=>{localStorage.getItem(window.location.href)&&localStorage.removeItem(window.location.href),p(!1)};m.useEffect(()=>{a?j():g(L)},[a]);const d=()=>{i(0),g(L)};m.useEffect(()=>{r()},[]);const j=m.useCallback(async()=>{t(s.setLoading(!0));try{const h=await $(a);g(h.data)}catch(h){t(s.setAlert({type:"danger",message:h.response?.data?.title||h.message}))}t(s.setLoading(!1))},[a]),k=m.useCallback(async(h,f)=>{t(s.setLoading(!0));try{await(a?F:A)(h),t(s.setAlert({type:"success",message:`${a?"Update":"Create"} skill successfully`})),f&&f(),a&&i(0)}catch(x){t(s.setAlert({type:"danger",message:x.response?.data?.title||x.message}))}t(s.setLoading(!1))},[a,o]);return{id:a,setId:i,skillDetail:o,confirmData:k,initValue:L,reset:d,edited:l,setEdited:p,setEditedTrue:c,setEditedFalse:r}},K=()=>{const t=m.useRef(null),{t:a}=v.useTranslation(),{skillList:i,totalItems:o,filters:g,changeFilters:l,getData:p,removeData:c}=U(),{id:r,setId:d,skillDetail:j,confirmData:k,reset:h,edited:f,setEdited:x,setEditedTrue:E,setEditedFalse:y}=H(),S=n=>{d(n||0),t&&t.current&&t.current.toggle()},C=n=>{k(n,()=>{t&&t.current&&t.current.toggle(),p()}),y()},I=n=>{c(n)},w=()=>h();return e.jsxs("div",{className:"fadeIn animated",children:[e.jsx(z,{ref:t,header:a(r?"edit_skill":"create_skill"),confirmText:a(r?"update":"create"),onCancel:w,onConfirm:C,skillDetail:j,edited:f,setEdited:x,setEditedTrue:E,setEditedFalse:y,isDisabled:r}),e.jsx(s.QuitPrompt,{when:f}),e.jsxs(u.Row,{className:"my-2",children:[e.jsx(u.Col,{md:4,children:e.jsx(s.AddButton,{text:a("create_skill"),onClick:()=>S()})}),e.jsxs(u.Col,{md:4,className:"d-flex align-items-center justify-content-end",children:[a("total_of_skills"),": ",o]})]}),e.jsxs(u.Row,{className:"mb-2",children:[e.jsx(u.Col,{md:8,children:i&&i.length>0?e.jsxs(u.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"align-top",children:a("name")}),e.jsx("th",{className:"align-top",children:a("description")}),e.jsx("th",{className:"text-center",children:a("action")})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsxs("td",{className:"align-middle",children:[e.jsx(s.LinkEditButton,{label:n.name,onClick:()=>S(n.id)}),!!n.path&&e.jsx("p",{className:"mb-0 pl-3",children:e.jsx("i",{children:n.path})})]}),e.jsx("td",{className:"align-middle",children:n.description}),e.jsx("td",{className:"text-center align-middle",children:e.jsx(s.DeleteButtonIcon,{onClick:()=>I(n.id)})})]},n.id))})]}):e.jsx(s.EmptyDataAlert,{label:a("skill")})}),e.jsx(u.Col,{md:8,className:"text-right",children:e.jsx(s.CustomPagination,{totalRecordCount:o,filters:g,changePageSize:n=>l({pageSize:n}),changePage:n=>l({currentPage:n})})})]})]})};exports.default=K;
|