/*! For license information please see silver.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[8559],{77149:function(t,e,n){"use strict";var r=n(6941),i=n(84554),o=n(65829);n(77564);window.Pusher=n(86606),window.Echo=new i.Z({broadcaster:"pusher",key:"2f56877bc7388f6893bf",cluster:"eu",encrypted:!0,namespace:"Modules.Member.Events.LiveChat"}),window.axios=n(9669),window.axios.defaults.headers.common={"X-CSRF-TOKEN":r.Z.getToken(),"X-Requested-With":"XMLHttpRequest"},window.Echo.connector.pusher.connection.bind("connected",(function(){window.axios.defaults.headers.common["X-Socket-ID"]=window.Echo.socketId()}));var s,a=new THREE.LoadingManager,c=$("#primary_colour").val(),u=$("#secondary_colour").val(),h=$("#accent_colour").val(),l=$("#floor_colour").val(),f=$("#hotspot_colour").val(),p=$("#banner_url").val(),d=$("#book_stand_url").val(),y=$("#screen_url").val(),v=$("#logo_url").val(),g=new THREE.TextureLoader(a),m=document.getElementById("stand");if(m)s=new THREE.WebGLRenderer({antialias:!0,alpha:!0,canvas:m,powerPreference:"high-performance"});else{s=new THREE.WebGLRenderer({antialias:!0,alpha:!0,powerPreference:"high-performance"});var b=document.getElementsByClassName("exhibitions-home");b.length>0?b[0].prepend(s.domElement):document.body.prepend(s.domElement)}var w=document.getElementsByClassName("microsite").length>0,E=window.innerWidth,_=window.innerHeight;w&&(_=window.innerHeight-112),s.setClearColor(15066597),s.setPixelRatio(window.devicePixelRatio),s.setSize(E,_),s.shadowMap.enabled=!0,s.physicallyCorrectLights=!0,s.shadowMap.type=THREE.PCFSoftShadowMap,s.toneMapping=THREE.ACESFilmicToneMapping,s.toneMappingExposure=.25,s.outputEncoding=THREE.sRGBEncoding,THREE.Cache.enabled=!0;var k=new THREE.PerspectiveCamera(29.979213154087123,1.6666666269302368,.009999999776482582,1e10);k.position.set(-5,1.5,10);var S=new THREE.Scene,T=g.load("/images/model-background.jpg");S.background=T;var A=new THREE.AmbientLight(16777215,1.25),C=new THREE.DirectionalLight(16777215,5),R=new THREE.DirectionalLight(16777215,7.5);C.castShadow=!0,R.castShadow=!0,C.shadow.mapSize.width=512,R.shadow.mapSize.width=512,C.shadow.mapSize.height=512,R.shadow.mapSize.height=512,C.shadow.camera.near=.5,R.shadow.camera.near=.5,C.shadow.camera.far=500,R.shadow.camera.far=500,C.position.set(-6,3,3),R.position.set(3,6,6),S.add(A),S.add(C),S.add(R);var x=new THREE.OrbitControls(k,s.domElement);x.enabled=!0,x.enablePan=!0,x.target.set(0,1.25,-.2),x.minDistance=5,x.maxDistance=10,x.rotateSpeed=.5,x.maxPolarAngle=Math.PI/2,x.minPolarAngle=Math.PI/2,x.minAzimuthAngle=-1.212611986159712,x.maxAzimuthAngle=-.013094791152698045,x.update(),x.addEventListener("change",(function(){P&&(P.rotation.y=x.getAzimuthalAngle()),B&&(B.rotation.y=x.getAzimuthalAngle()),U&&(U.rotation.y=x.getAzimuthalAngle()),O&&(O.rotation.y=x.getAzimuthalAngle()),j&&(j.rotation.y=x.getAzimuthalAngle()),H&&(H.rotation.y=x.getAzimuthalAngle()),L&&(L.rotation.y=x.getAzimuthalAngle()),D&&(D.rotation.y=x.getAzimuthalAngle()),N&&(N.rotation.y=x.getAzimuthalAngle()),M&&(M.rotation.y=x.getAzimuthalAngle()),z&&(z.rotation.y=x.getAzimuthalAngle()),Y&&(Y.rotation.y=x.getAzimuthalAngle()),F&&(F.rotation.y=x.getAzimuthalAngle()),q&&(q.rotation.y=x.getAzimuthalAngle()),I&&(I.rotation.y=x.getAzimuthalAngle())}),!1);var P,O,L,M,I,B,U,j,H,D,N,z,Y,F,q,X,W,G,J,K,Q=new GLTFLoader(a),Z=document.getElementById("jobs"),V=[[-.325,1.825,.63],[-.625,1.825,.63],[-.925,1.825,.63],[-1.225,1.825,.63],[-.325,1.825,-.2],[-.625,1.825,-.2],[-.925,1.825,-.2],[-1.225,1.825,-.2],[-.325,1.825,-.85],[-.625,1.825,-.85],[-.925,1.825,-.85],[-1.225,1.825,-.85]];new THREE.Interaction(s,S,k);Q.load("/js/exhibitions/models/silver-stand.glb",(function(t){for(var e=0;e<t.scene.children.length;e++)if(t.scene.children[e].children.length>0)for(var n=0;n<t.scene.children[e].children.length;n++)t.scene.children[e].children[n].castShadow=!0,t.scene.children[e].children[n].receiveShadow=!0;t.scene.children[0].children[4].children[1].visible=!1,t.scene.children[0].children[3].children[0].visible=!1;for(var r=0,i=0;i<t.scene.children[0].children[5].children.length;i++){var o=new THREE.SpotLight(16777215);o.position.set(V[r][0],V[r][1],V[r][2]),o.castShadow=!0;var s=new THREE.Object3D;s.position.set(V[r][0],0,V[r][2]),S.add(s),o.target=s,S.add(o),r++}if(p&&new THREE.TextureLoader(a).load(p,(function(e){t.scene.children[0].children[0].children[0].traverse((function(t){t.isMesh&&(t.material=new THREE.MeshPhongMaterial({color:16777215,map:e}))}))})),c&&(t.scene.children[0].children[13].traverse((function(t){t.isMesh&&(t.material.color=new THREE.Color(c))})),t.scene.children[0].children[12].traverse((function(t){t.isMesh&&(t.material.color=new THREE.Color(c))}))),u&&t.scene.children[0].children[2].children[0].children[1].traverse((function(t){t.isMesh&&(t.material.color=new THREE.Color(u))})),h&&t.scene.children[0].children[2].children[4].children[0].traverse((function(t){t.isMesh&&(t.material.color=new THREE.Color(h))})),v&&t.scene.children[0].children[11].traverse((function(t){if(t.isMesh){var e=new THREE.BoxGeometry(1.27,.36,.001),n=g.load(v),r=new THREE.MeshBasicMaterial({map:n,color:new THREE.Color("#FFFFFF")});r.transparent=!1,r.opacity=1;var i=new THREE.Mesh(e,r);i.position.set(.3405,1.61,.52),S.add(i)}})),l&&t.scene.children[0].children[2].children[4].children[1].traverse((function(t){t.isMesh&&(t.material.color=new THREE.Color(l))})),t.scene.children[0].children[10].scale.x+=5,t.scene.children[0].children[10].scale.z+=5,t.scene.children[0].children[10].castShadow=!1,t.scene.children[0].children[10].receiveShadow=!1,t.scene.children[0].children[10].visible=!1,d)for(var f=new THREE.TextureLoader(a).load(d),m=0;m<t.scene.children[0].children[1].children[0].children.length;m++)t.scene.children[0].children[1].children[0].children[m].traverse((function(t){t.isMesh&&(t.material=new THREE.MeshBasicMaterial({color:16777215,map:f}))}));if(y){var b=g.load(y),w=new THREE.Mesh(new THREE.BoxBufferGeometry(1,.5,.001),new THREE.MeshPhongMaterial({color:16777215,map:b}));w.position.set(-.675,1.315,-1.299999),S.add(w)}t.scene.children[0].children[4].children[1].visible=!1,S.add(t.scene)}),(function(t){if(t.loaded===t.total){var e=function(){$(".popup-card").removeClass("visible")},n=new THREE.CircleBufferGeometry(.1,32),r=new THREE.MeshPhongMaterial({color:f,side:THREE.DoubleSide});X=new THREE.Group,(P=new THREE.Mesh(n,r)).position.set(-1.765,1,.92),P.rotation.y=x.getAzimuthalAngle(),B=new THREE.Mesh(new THREE.BoxBufferGeometry(.12,.015,.01),new THREE.MeshBasicMaterial({color:1320021})),U=new THREE.Mesh(new THREE.BoxBufferGeometry(.015,.12,.01),new THREE.MeshBasicMaterial({color:1320021})),B.position.set(-1.765,1,.92),U.position.set(-1.765,1,.92),B.scale.x=.5,B.scale.y=.5,U.scale.x=.5,U.scale.y=.5,B.rotation.y=x.getAzimuthalAngle(),U.rotation.y=x.getAzimuthalAngle(),X.add(P),X.add(B),X.add(U),S.add(X),W=new THREE.Group,(O=new THREE.Mesh(n,r)).position.set(-1.35,1.25,-1.3),O.rotation.y=x.getAzimuthalAngle(),j=new THREE.Mesh(new THREE.BoxBufferGeometry(.12,.015,.01),new THREE.MeshBasicMaterial({color:1320021})),H=new THREE.Mesh(new THREE.BoxBufferGeometry(.015,.12,.01),new THREE.MeshBasicMaterial({color:1320021})),j.position.set(-1.35,1.25,-1.3),H.position.set(-1.35,1.25,-1.3),j.scale.x=.5,j.scale.y=.5,H.scale.x=.5,H.scale.y=.5,j.rotation.y=x.getAzimuthalAngle(),H.rotation.y=x.getAzimuthalAngle(),W.add(O),W.add(j),W.add(H),S.add(W),G=new THREE.Group,(L=new THREE.Mesh(n,r)).position.set(1.9,1.25,1.5),L.rotation.y=x.getAzimuthalAngle(),D=new THREE.Mesh(new THREE.BoxBufferGeometry(.12,.015,.01),new THREE.MeshBasicMaterial({color:1320021})),N=new THREE.Mesh(new THREE.BoxBufferGeometry(.015,.12,.01),new THREE.MeshBasicMaterial({color:1320021})),D.position.set(1.9,1.25,1.5),N.position.set(1.9,1.25,1.5),D.scale.x=.5,D.scale.y=.5,N.scale.x=.5,N.scale.y=.5,D.rotation.y=x.getAzimuthalAngle(),N.rotation.y=x.getAzimuthalAngle(),G.add(L),G.add(D),G.add(N),S.add(G),J=new THREE.Group,(M=new THREE.Mesh(n,r)).position.set(.25,2,.75),M.rotation.y=x.getAzimuthalAngle(),z=new THREE.Mesh(new THREE.BoxBufferGeometry(.12,.015,.01),new THREE.MeshBasicMaterial({color:1320021})),Y=new THREE.Mesh(new THREE.BoxBufferGeometry(.015,.12,.01),new THREE.MeshBasicMaterial({color:1320021})),z.position.set(.25,2,.75),Y.position.set(.25,2,.75),z.scale.x=.5,z.scale.y=.5,Y.scale.x=.5,Y.scale.y=.5,z.rotation.y=x.getAzimuthalAngle(),Y.rotation.y=x.getAzimuthalAngle(),J.add(M),J.add(z),J.add(Y),S.add(J),X.cursor="pointer",W.cursor="pointer",G.cursor="pointer",J.cursor="pointer",X.on("mouseover",(function(t){$(".tooltip").text("Brochures"),$(".tooltip").show()})),X.on("mouseout",(function(t){$(".tooltip").hide()})),W.on("mouseover",(function(t){$(".tooltip").text("Video"),$(".tooltip").show()})),W.on("mouseout",(function(t){$(".tooltip").hide()})),G.on("mouseover",(function(t){$(".tooltip").text("Banner Artwork"),$(".tooltip").show()})),G.on("mouseout",(function(t){$(".tooltip").hide()})),J.on("mouseover",(function(t){$(".tooltip").text("Introduction"),$(".tooltip").show()})),J.on("mouseout",(function(t){$(".tooltip").hide()})),X.on("touchstart",(function(t){e(),$("#brochures")&&($("#brochures").hasClass("visible")||$("#brochures").addClass("visible"))})),X.on("click",(function(t){e(),$("#brochures")&&($("#brochures").hasClass("visible")||$("#brochures").addClass("visible"))})),$(document).on("click","button.close-popup",(function(t){t.preventDefault();var e=$(this).parent().parent().prop("id");"popup-3d-tours"!==e&&$("#"+e).hasClass("visible")&&$("#"+e).removeClass("visible")})),W.on("touchstart",(function(t){e(),$("#video").length&&($("#video").hasClass("visible")||$("#video").addClass("visible"))})),W.on("click",(function(t){e(),$("#video").length&&($("#video").hasClass("visible")||$("#video").addClass("visible"))})),G.on("touchstart",(function(t){e(),$("#banner-artwork").length>0&&($("#banner-artwork").hasClass("visible")||$("#banner-artwork").addClass("visible"))})),G.on("click",(function(t){e(),$("#banner-artwork").length>0&&($("#banner-artwork").hasClass("visible")||$("#banner-artwork").addClass("visible"))})),J.on("touchstart",(function(t){$("#introduction").length&&($("#introduction").hasClass("visible")||$("#introduction").addClass("visible"))})),J.on("click",(function(t){$("#introduction").length&&($("#introduction").hasClass("visible")||$("#introduction").addClass("visible"))})),Z&&(K=new THREE.Group,(I=new THREE.Mesh(n,r)).position.set(.65,.85,-.25),I.rotation.y=x.getAzimuthalAngle(),F=new THREE.Mesh(new THREE.BoxBufferGeometry(.12,.015,.01),new THREE.MeshBasicMaterial({color:1320021})),q=new THREE.Mesh(new THREE.BoxBufferGeometry(.015,.12,.01),new THREE.MeshBasicMaterial({color:1320021})),F.position.set(.65,.85,-.25),q.position.set(.65,.85,-.25),F.scale.x=.5,F.scale.y=.5,q.scale.x=.5,q.scale.y=.5,F.rotation.y=x.getAzimuthalAngle(),q.rotation.y=x.getAzimuthalAngle(),K.add(I),K.add(F),K.add(q),S.add(K),K.cursor="pointer",K.on("mouseover",(function(t){$(".tooltip").text("Jobs"),$(".tooltip").show()})),K.on("mouseout",(function(t){$(".tooltip").hide()})),K.on("click",(function(t){$("#jobs").length&&($("#jobs").hasClass("visible")||$("#jobs").addClass("visible"))})),K.on("touchstart",(function(t){$("#jobs").length&&($("#jobs").hasClass("visible")||$("#jobs").addClass("visible"))})))}}),(function(t){console.error("Error:",t)})),s.render(S,k),window.addEventListener("resize",(function(){E=window.innerWidth,_=w?window.innerHeight-112:window.innerHeight,k.aspect=E/_,k.updateProjectionMatrix(),s.setSize(E,_),s.render(S,k)}),!1),function t(){requestAnimationFrame(t),x.update(),s.render(S,k)}(),$(document).on("mousemove",(function(t){$(".tooltip").css("top",t.clientY),$(".tooltip").css("left",t.clientX)})),$(document).on("click",".accordion-item",(function(t){t.preventDefault(),$(".accordion-body").slideUp(),$(this).find(".accordion-body").slideDown(300)})),$(document).on("click","#fab-chat",(function(t){t.preventDefault(),$(this).hide(),$("#chat-popup").addClass("visible")})),$(document).on("click","#chat-btn",(function(t){t.preventDefault(),$("#fab-chat").hide(),$("#chat-popup").addClass("visible")})),$(document).on("click","#greeting_video_toggle",(function(t){t.preventDefault(),$("#greeting-video").addClass("visible")}));var tt=0,et=0,nt=0;a.onProgress=function(t,e,n){var r=document.getElementById("progress"),i=document.getElementById("progress-text");if(r){tt=Math.max(tt,e/n*100),nt=parseInt(tt);Math.max(50,nt-et);var o=setInterval((function(){et<nt?(et++,r.style.width=et+"%",i&&(i.innerHTML=et+'<small class="percent__sign">%</small>')):clearInterval(o)}),10)}},a.onLoad=function(){var t=document.getElementById("loading-screen");t&&window.setTimeout((function(){t.style.top="-100vh",!0&&window.setTimeout((function(){t.style.display="none"}),2e3)}),1e3)},$(document).on("click","#expand-menu",(function(t){t.preventDefault(),anime.timeline({easing:"easeInOutQuad",duration:500,direction:"normal"}).add({targets:"#side-nav .navigation-content",opacity:[1,0],duration:250,delay:0,complete:function(t){$("#side-nav").css("display","none")}}).add({targets:"#side-nav-expanded",width:["120px","492px"],duration:350,begin:function(t){t.animatables.forEach((function(t){t.target.style.display="block"}))}},"-=50").add({targets:"#side-nav-expanded .navigation-content",opacity:[0,1],duration:300,begin:function(t){t.animatables.forEach((function(t){t.target.style.display="block"}))}},"-=50"),anime({targets:".content",width:"492px",easing:"easeInOutQuad",duration:500,delay:50}),E=window.innerWidth-492,localStorage.setItem("sideMenu","false")})),$(document).on("click","#collapse-menu",(function(t){t.preventDefault(),anime.timeline({easing:"easeInOutQuad",direction:"normal"}).add({targets:"#side-nav-expanded .navigation-content",opacity:0,duration:250,begin:function(t){t.animatables.forEach((function(t){t.target.style.display="block"}))},complete:function(t){t.animatables.forEach((function(t){t.target.style.display="none"}))}}).add({targets:"#side-nav-expanded",width:"120px",duration:350,begin:function(t){t.animatables.forEach((function(t){t.target.style.display="block"}))},complete:function(t){t.animatables.forEach((function(t){t.target.style.display="none"}))}},"-=75").add({targets:"#side-nav .navigation-content",opacity:[0,1],duration:350,delay:0,begin:function(t){$("#side-nav").css("display","block")}},"-=50");var e=$("#side-nav").prop("width");$("#side-nav").prop("offsetWidth");anime({targets:".content",paddingLeft:e,easing:"easeInOutQuad",duration:500,delay:50}),E=window.innerWidth-120,localStorage.setItem("sideMenu","true")}));var rt=!1,it=!1,ot=window.location.pathname;if(ot&&ot.length>0){"/"==ot[0]&&(ot=ot.replace("/",""));var st=ot.split("/");ot=st[0]}$(".btn-3d-tour").click((function(t){if(t.preventDefault(),!$("#popup-3d-tours").hasClass("visible")){var e=$("a.btn-tour__card.active").data("id")||$("a.btn-tour__card").first().data("id");axios.post("/"+ot+"/matterport/"+e),anime({targets:"#popup-3d-tours",translateX:["-102%","0%"],duration:750,easing:"easeOutExpo",delay:0,begin:function(t){for(var e=0;e<t.animatables.length;e++)t.animatables[e].target.style.display="block";rt&&$("#popup-3d-tours iframe").attr("src",$("#popup-3d-tours iframe").attr("data-src")),it||($(".tours-wrapper .tours-scroll").width()<$(".tours-wrapper .tours-scroll").prop("scrollWidth")?$(".tours-wrapper .tours-scroll").prop("scrollLeft")<5?($(".tours-wrapper .tours-scroll").parent().removeClass("scroll-end"),$(".tours-wrapper .tours-scroll").parent().addClass("scroll-start")):$(".tours-wrapper .tours-scroll").prop("scrollLeft")+$(".tours-wrapper .tours-scroll").width()+5>=$(".tours-wrapper .tours-scroll").prop("scrollWidth")?($(".tours-wrapper .tours-scroll").parent().removeClass("scroll-start"),$(".tours-wrapper .tours-scroll").parent().addClass("scroll-end")):($(".tours-wrapper .tours-scroll").parent().addClass("scroll-start"),$(".tours-wrapper .tours-scroll").parent().addClass("scroll-end")):($(".tours-wrapper .tours-scroll").parent().removeClass("scroll-start"),$(".tours-wrapper .tours-scroll").parent().removeClass("scroll-end")),it=!0)},complete:function(t){for(var e=0;e<t.animatables.length;e++){t.animatables[e].target.classList.add("visible"),t.animatables[e].target.style.display="block";var n=new o.Z("#popup-3d-tours h1",{types:"chars",absolute:!0});anime({targets:n.chars,opacity:[0,1],translateY:[20,0],duration:240,easing:"easeOutExpo",delay:anime.stagger(20)})}}})}})),$("#close-3d-tours").click((function(t){t.preventDefault(),anime({targets:"#popup-3d-tours",translateX:"-101%",easing:"easeInExpo",duration:500,complete:function(t){for(var e=0;e<t.animatables.length;e++)t.animatables[e].target.style.display="none",t.animatables[e].target.classList.remove("visible");rt&&$("#popup-3d-tours iframe").attr("src","")}})})),$("a.btn-tour__card").click((function(t){t.preventDefault(),t.stopPropagation(),$("a.btn-tour__card").removeClass("active"),$(this).addClass("active");var e=$(this).data("src").trim();$("#popup-3d-tours iframe").attr("src",e),$("#popup-3d-tours iframe").attr("data-src",e);var n=$(this).data("id");axios.post("/"+ot+"/matterport/"+n)})),$(".tours-wrapper").imagesLoaded().progress((function(t,e){e.isLoaded||$(e.img).closest(".tour-item").remove()})).always((function(t){$("a.btn-tour__card").first().addClass("active"),$("#popup-3d-tours iframe").attr("data-src",$("a.btn-tour__card").first().data("src"))})),$("#popup-3d-tours iframe").removeAttr("width"),$("#popup-3d-tours iframe").removeAttr("height"),$("#popup-3d-tours iframe").css("width","100%"),$("#popup-3d-tours iframe").css("height","100%"),rt=!0;var at,ct,ut=!1;$(".tours-wrapper .tours-scroll").each((function(t,e){$(e).prop("scrollWidth")>$(e).width()&&($(e).prop("scrollLeft")>5&&$(e).parent().addClass("scroll-start"),$(e).prop("scrollLeft")+$(e).width()>=$(e).prop("scrollWidth")&&$(e).parent().addClass("scroll-end"));var n=e;$(e).parent().find(".nav-prev").on("mousedown",(function(t){t.preventDefault(),$(n).animate({scrollLeft:$(n).prop("scrollLeft")-Math.floor(($(".tours-wrapper").width()+120)/($(".tour-item").width()+16))*($(".tour-item").width()+16)},350)})),$(e).parent().find(".nav-next").on("mousedown",(function(t){t.preventDefault(),$(n).animate({scrollLeft:$(n).prop("scrollLeft")+Math.floor(($(".tours-wrapper").width()+120)/($(".tour-item").width()+16))*($(".tour-item").width()+16)},350)}))})),$(".tours-wrapper .tours-scroll").on("scroll",(function(t){$(this).prop("scrollLeft")<5?($(this).parent().removeClass("scroll-end"),$(this).parent().addClass("scroll-start")):$(this).prop("scrollLeft")+$(this).width()+125>=$(this).prop("scrollWidth")?($(this).parent().removeClass("scroll-start"),$(this).parent().addClass("scroll-end")):($(this).parent().addClass("scroll-start"),$(this).parent().addClass("scroll-end"))})),$(".tours-wrapper .tours-scroll").on("mousedown",(function(t){ut=!0,at=t.pageX-$(".tours-wrapper .tours-scroll").offset().left,ct=$(".tours-wrapper .tours-scroll").scrollLeft()})),$(".tours-wrapper .tours-scroll").on("mouseleave",(function(t){ut=!1})),$(".tours-wrapper .tours-scroll").on("mouseup",(function(t){ut=!1})),$(".tours-wrapper .tours-scroll").on("mousemove",(function(t){if(t.preventDefault(),ut){t.stopPropagation();var e=t.pageX-$(".tours-wrapper .tours-scroll").offset().left-at;$(".tours-wrapper .tours-scroll").scrollLeft(ct-e)}}))},6941:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,{Z:function(){return i}});var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,i;return e=t,i=[{key:"getToken",value:function(){return $("meta[name='csrf-token']").attr("content")}}],(n=null)&&r(e.prototype,n),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},79742:function(t,e){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=c(t),s=o[0],a=o[1],u=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),h=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[h++]=255&e);1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,c=r-i;a<c;a+=s)o.push(u(t,a,a+s>c?c:a+s));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48764:function(t,e,n){"use strict";var r=n(79742),i=n(80645),o=n(5826);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(h(e),t=a(t,e<0?0:0|p(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return N(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return R(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=n;o<a;o++)if(u(t,o)===u(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===c)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var l=!0,f=0;f<c;f++)if(u(t,o+f)!==u(e,f)){l=!1;break}if(l)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function w(t,e,n,r){return Y(N(e,t.length-n),t,n,r)}function E(t,e,n,r){return Y(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function _(t,e,n,r){return E(t,e,n,r)}function k(t,e,n,r){return Y(z(e),t,n,r)}function S(t,e,n,r){return Y(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,c,u=t[i],h=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=n)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(h=c);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=l}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=C));return n}(r)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return h(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return l(null,t)},c.allocUnsafeSlow=function(t){return l(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(r,i),h=t.slice(e,n),l=0;l<a;++l)if(u[l]!==h[l]){o=u[l],s=h[l];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return E(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function R(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function P(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=D(t[o]);return i}function O(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function I(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function U(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,o){return o||U(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function $(t,e,n,r,o){return o||U(t,0,n,8),i.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return $(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return $(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=c.isBuffer(t)?t:N(new c(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},7158:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i<n.length;i++){var o=n[i];r&&r[o]&&(this.off(t,o),delete r[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})?r.call(e,n,e,t):r)||(t.exports=i)},80645:function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,h=-7,l=n?i-1:0,f=n?-1:1,p=t[e+l];for(l+=f,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+l],l+=f,h-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=u}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,c,u=8*o-i-1,h=(1<<u)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?f/c:f*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[n+p]=255&s,p+=d,s/=256,u-=8);t[n+p-d]|=128*y}},77564:function(t,e,n){var r,i;!function(o,s){"use strict";r=[n(7158)],i=function(t){return function(t,e){var n=t.jQuery,r=t.console;function i(t,e){for(var n in e)t[n]=e[n];return t}var o=Array.prototype.slice;function s(t){return Array.isArray(t)?t:"object"==typeof t&&"number"==typeof t.length?o.call(t):[t]}function a(t,e,o){if(!(this instanceof a))return new a(t,e,o);var c=t;"string"==typeof t&&(c=document.querySelectorAll(t)),c?(this.elements=s(c),this.options=i({},this.options),"function"==typeof e?o=e:i(this.options,e),o&&this.on("always",o),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))):r.error("Bad element for imagesLoaded "+(c||t))}a.prototype=Object.create(e.prototype),a.prototype.options={},a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},a.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var n=t.querySelectorAll("img"),r=0;r<n.length;r++){var i=n[r];this.addImage(i)}if("string"==typeof this.options.background){var o=t.querySelectorAll(this.options.background);for(r=0;r<o.length;r++){var s=o[r];this.addElementBackgroundImages(s)}}}};var c={1:!0,9:!0,11:!0};function u(t){this.img=t}function h(t,e){this.url=t,this.element=e,this.img=new Image}return a.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var n=/url\((['"])?(.*?)\1\)/gi,r=n.exec(e.backgroundImage);null!==r;){var i=r&&r[2];i&&this.addBackground(i,t),r=n.exec(e.backgroundImage)}},a.prototype.addImage=function(t){var e=new u(t);this.images.push(e)},a.prototype.addBackground=function(t,e){var n=new h(t,e);this.images.push(n)},a.prototype.check=function(){var t=this;function e(e,n,r){setTimeout((function(){t.progress(e,n,r)}))}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach((function(t){t.once("progress",e),t.check()})):this.complete()},a.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+n,t,e)},a.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},u.prototype=Object.create(e.prototype),u.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},u.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},u.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},u.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},u.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},h.prototype=Object.create(u.prototype),h.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},h.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},h.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},a.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((n=e).fn.imagesLoaded=function(t,e){return new a(this,t,e).jqDeferred.promise(n(this))})},a.makeJQueryPlugin(),a}(o,t)}.apply(e,r),void 0===i||(t.exports=i)}("undefined"!=typeof window?window:this)},5826:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},84554:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s.apply(this,arguments)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function h(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}n.d(e,{Z:function(){return R}});var f=function(){function t(){r(this,t)}return o(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t,e){return this.stopListening(".client-"+t,e)}}]),t}(),p=function(){function t(e){r(this,t),this.setNamespace(e)}return o(t,[{key:"format",value:function(t){return"."===t.charAt(0)||"\\"===t.charAt(0)?t.substr(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),d=function(t){a(n,t);var e=l(n);function n(t,i,o){var s;return r(this,n),(s=e.call(this)).name=i,s.pusher=t,s.options=o,s.eventFormatter=new p(s.options.namespace),s.subscribe(),s}return o(n,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"listenToAll",value:function(t){var e=this;return this.subscription.bind_global((function(n,r){if(!n.startsWith("pusher:")){var i=e.options.namespace.replace(/\./g,"\\"),o=n.startsWith(i)?n.substring(i.length+1):"."+n;t(o,r)}})),this}},{key:"stopListening",value:function(t,e){return e?this.subscription.unbind(this.eventFormatter.format(t),e):this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"stopListeningToAll",value:function(t){return t?this.subscription.unbind_global(t):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(t){return this.on("pusher:subscription_succeeded",(function(){t()})),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",(function(e){t(e)})),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),n}(f),y=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(d),v=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(d),g=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),n}(d),m=function(t){a(n,t);var e=l(n);function n(t,i,o){var s;return r(this,n),(s=e.call(this)).events={},s.listeners={},s.name=i,s.socket=t,s.options=o,s.eventFormatter=new p(s.options.namespace),s.subscribe(),s}return o(n,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t,e){return this.unbindEvent(this.eventFormatter.format(t),e),this}},{key:"subscribed",value:function(t){return this.on("connect",(function(e){t(e)})),this}},{key:"error",value:function(t){return this}},{key:"on",value:function(t,e){var n=this;return this.listeners[t]=this.listeners[t]||[],this.events[t]||(this.events[t]=function(e,r){n.name===e&&n.listeners[t]&&n.listeners[t].forEach((function(t){return t(r)}))},this.socket.on(t,this.events[t])),this.listeners[t].push(e),this}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.unbindEvent(e)}))}},{key:"unbindEvent",value:function(t,e){this.listeners[t]=this.listeners[t]||[],e&&(this.listeners[t]=this.listeners[t].filter((function(t){return t!==e}))),e&&0!==this.listeners[t].length||(this.events[t]&&(this.socket.removeListener(t,this.events[t]),delete this.events[t]),delete this.listeners[t])}}]),n}(f),b=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),n}(m),w=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),n}(b),E=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(t,e){return this}},{key:"stopListening",value:function(t,e){return this}},{key:"subscribed",value:function(t){return this}},{key:"error",value:function(t){return this}},{key:"on",value:function(t,e){return this}}]),n}(f),_=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"whisper",value:function(t,e){return this}}]),n}(E),k=function(t){a(n,t);var e=l(n);function n(){return r(this,n),e.apply(this,arguments)}return o(n,[{key:"here",value:function(t){return this}},{key:"joining",value:function(t){return this}},{key:"leaving",value:function(t){return this}},{key:"whisper",value:function(t,e){return this}}]),n}(E),S=function(){function t(e){r(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",broadcaster:"pusher",csrfToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return o(t,[{key:"setOptions",value:function(t){return this.options=s(this._defaultOptions,t),this.csrfToken()&&(this.options.auth.headers["X-CSRF-TOKEN"]=this.csrfToken()),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),T=function(t){a(n,t);var e=l(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).channels={},t}return o(n,[{key:"connect",value:function(){void 0!==this.options.client?this.pusher=this.options.client:this.pusher=new Pusher(this.options.key,this.options)}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new d(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new y(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new v(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new g(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t,n){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),n}(S),A=function(t){a(n,t);var e=l(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).channels={},t}return o(n,[{key:"connect",value:function(){var t=this,e=this.getSocketIO();return this.socket=e(this.options.host,this.options),this.socket.on("reconnect",(function(){Object.values(t.channels).forEach((function(t){t.subscribe()}))})),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new m(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new b(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new w(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),n}(S),C=function(t){a(n,t);var e=l(n);function n(){var t;return r(this,n),(t=e.apply(this,arguments)).channels={},t}return o(n,[{key:"connect",value:function(){}},{key:"listen",value:function(t,e,n){return new E}},{key:"channel",value:function(t){return new E}},{key:"privateChannel",value:function(t){return new _}},{key:"presenceChannel",value:function(t){return new k}},{key:"leave",value:function(t){}},{key:"leaveChannel",value:function(t){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),n}(S),R=function(){function t(e){r(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return o(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){"pusher"==this.options.broadcaster?this.connector=new T(this.options):"socket.io"==this.options.broadcaster?this.connector=new A(this.options):"null"==this.options.broadcaster?this.connector=new C(this.options):"function"==typeof this.options.broadcaster&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,r){t.socketId()&&r.setRequestHeader("X-Socket-Id",t.socketId())}))}}]),t}()},34155:function(t){var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,c=[],u=!1,h=-1;function l(){u&&a&&(u=!1,a.length?c=a.concat(c):h=-1,c.length&&f())}function f(){if(!u){var t=s(l);u=!0;for(var e=c.length;e;){for(a=c,c=[];++h<e;)a&&a[h].run();h=-1,e=c.length}a=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},86606:function(t,e,n){var r,i=n(48764).Buffer;window,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){!function(t){"use strict";var e=function(t){var e,n=new Float64Array(16);if(t)for(e=0;e<t.length;e++)n[e]=t[e];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),c=e([56129,1]),u=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e,n,r){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=r>>24&255,t[e+5]=r>>16&255,t[e+6]=r>>8&255,t[e+7]=255&r}function y(t,e,n,r,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^n[r+o];return(1&s-1>>>8)-1}function v(t,e,n,r){return y(t,e,n,r,16)}function g(t,e,n,r){return y(t,e,n,r,32)}function m(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,E=o,_=s,k=a,S=c,T=u,A=h,C=l,R=f,x=p,P=d,O=y,L=v,M=g,I=m,B=b,U=w,j=0;j<20;j+=2)E^=(i=(M^=(i=(x^=(i=(T^=(i=E+M|0)<<7|i>>>25)+E|0)<<9|i>>>23)+T|0)<<13|i>>>19)+x|0)<<18|i>>>14,A^=(i=(_^=(i=(I^=(i=(P^=(i=A+_|0)<<7|i>>>25)+A|0)<<9|i>>>23)+P|0)<<13|i>>>19)+I|0)<<18|i>>>14,O^=(i=(C^=(i=(k^=(i=(B^=(i=O+C|0)<<7|i>>>25)+O|0)<<9|i>>>23)+B|0)<<13|i>>>19)+k|0)<<18|i>>>14,U^=(i=(L^=(i=(R^=(i=(S^=(i=U+L|0)<<7|i>>>25)+U|0)<<9|i>>>23)+S|0)<<13|i>>>19)+R|0)<<18|i>>>14,E^=(i=(S^=(i=(k^=(i=(_^=(i=E+S|0)<<7|i>>>25)+E|0)<<9|i>>>23)+_|0)<<13|i>>>19)+k|0)<<18|i>>>14,A^=(i=(T^=(i=(R^=(i=(C^=(i=A+T|0)<<7|i>>>25)+A|0)<<9|i>>>23)+C|0)<<13|i>>>19)+R|0)<<18|i>>>14,O^=(i=(P^=(i=(x^=(i=(L^=(i=O+P|0)<<7|i>>>25)+O|0)<<9|i>>>23)+L|0)<<13|i>>>19)+x|0)<<18|i>>>14,U^=(i=(B^=(i=(I^=(i=(M^=(i=U+B|0)<<7|i>>>25)+U|0)<<9|i>>>23)+M|0)<<13|i>>>19)+I|0)<<18|i>>>14;E=E+o|0,_=_+s|0,k=k+a|0,S=S+c|0,T=T+u|0,A=A+h|0,C=C+l|0,R=R+f|0,x=x+p|0,P=P+d|0,O=O+y|0,L=L+v|0,M=M+g|0,I=I+m|0,B=B+b|0,U=U+w|0,t[0]=E>>>0&255,t[1]=E>>>8&255,t[2]=E>>>16&255,t[3]=E>>>24&255,t[4]=_>>>0&255,t[5]=_>>>8&255,t[6]=_>>>16&255,t[7]=_>>>24&255,t[8]=k>>>0&255,t[9]=k>>>8&255,t[10]=k>>>16&255,t[11]=k>>>24&255,t[12]=S>>>0&255,t[13]=S>>>8&255,t[14]=S>>>16&255,t[15]=S>>>24&255,t[16]=T>>>0&255,t[17]=T>>>8&255,t[18]=T>>>16&255,t[19]=T>>>24&255,t[20]=A>>>0&255,t[21]=A>>>8&255,t[22]=A>>>16&255,t[23]=A>>>24&255,t[24]=C>>>0&255,t[25]=C>>>8&255,t[26]=C>>>16&255,t[27]=C>>>24&255,t[28]=R>>>0&255,t[29]=R>>>8&255,t[30]=R>>>16&255,t[31]=R>>>24&255,t[32]=x>>>0&255,t[33]=x>>>8&255,t[34]=x>>>16&255,t[35]=x>>>24&255,t[36]=P>>>0&255,t[37]=P>>>8&255,t[38]=P>>>16&255,t[39]=P>>>24&255,t[40]=O>>>0&255,t[41]=O>>>8&255,t[42]=O>>>16&255,t[43]=O>>>24&255,t[44]=L>>>0&255,t[45]=L>>>8&255,t[46]=L>>>16&255,t[47]=L>>>24&255,t[48]=M>>>0&255,t[49]=M>>>8&255,t[50]=M>>>16&255,t[51]=M>>>24&255,t[52]=I>>>0&255,t[53]=I>>>8&255,t[54]=I>>>16&255,t[55]=I>>>24&255,t[56]=B>>>0&255,t[57]=B>>>8&255,t[58]=B>>>16&255,t[59]=B>>>24&255,t[60]=U>>>0&255,t[61]=U>>>8&255,t[62]=U>>>16&255,t[63]=U>>>24&255}(t,e,n,r)}function b(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,E=0;E<20;E+=2)o^=(i=(g^=(i=(p^=(i=(u^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(m^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+m|0)<<18|i>>>14,y^=(i=(l^=(i=(a^=(i=(b^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+b|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(v^=(i=(f^=(i=(c^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(c^=(i=(a^=(i=(s^=(i=o+c|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(u^=(i=(f^=(i=(l^=(i=h+u|0)<<7|i>>>25)+h|0)<<9|i>>>23)+l|0)<<13|i>>>19)+f|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(v^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(b^=(i=(m^=(i=(g^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+m|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=l>>>0&255,t[17]=l>>>8&255,t[18]=l>>>16&255,t[19]=l>>>24&255,t[20]=f>>>0&255,t[21]=f>>>8&255,t[22]=f>>>16&255,t[23]=f>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,n,r)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(t,e,n,r,i,o,s){var a,c,u=new Uint8Array(16),h=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(m(h,u,s,w),c=0;c<64;c++)t[e+c]=n[r+c]^h[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(m(h,u,s,w),c=0;c<i;c++)t[e+c]=n[r+c]^h[c];return 0}function _(t,e,n,r,i){var o,s,a=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=r[s];for(;n>=64;){for(m(c,a,i,w),s=0;s<64;s++)t[e+s]=c[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;n-=64,e+=64}if(n>0)for(m(c,a,i,w),s=0;s<n;s++)t[e+s]=c[s];return 0}function k(t,e,n,r,i){var o=new Uint8Array(32);b(o,r,i,w);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=r[a+16];return _(t,e,n,s,o)}function S(t,e,n,r,i,o,s){var a=new Uint8Array(32);b(a,o,s,w);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return E(t,e,n,r,i,c,a)}var T=function(t){var e,n,r,i,o,s,a,c;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,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,n=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|n<<3),r=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,n,r,i,o){var s=new T(o);return s.update(n,r,i),s.finish(t,e),0}function C(t,e,n,r,i,o){var s=new Uint8Array(16);return A(s,0,n,r,i,o),v(t,e,s,0)}function R(t,e,n,r,i){var o;if(n<32)return-1;for(S(t,0,e,0,n,r,i),A(t,16,t,32,n-32,t),o=0;o<16;o++)t[o]=0;return 0}function x(t,e,n,r,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(k(s,0,32,r,i),0!==C(e,16,e,32,n-32,s))return-1;for(S(t,0,e,0,n,r,i),o=0;o<32;o++)t[o]=0;return 0}function P(t,e){var n;for(n=0;n<16;n++)t[n]=0|e[n]}function O(t){var e,n,r=1;for(e=0;e<16;e++)n=t[e]+r+65535,r=Math.floor(n/65536),t[e]=n-65536*r;t[0]+=r-1+37*(r-1)}function L(t,e,n){for(var r,i=~(n-1),o=0;o<16;o++)r=i&(t[o]^e[o]),t[o]^=r,e[o]^=r}function M(t,n){var r,i,o,s=e(),a=e();for(r=0;r<16;r++)a[r]=n[r];for(O(a),O(a),O(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,L(a,s,1-o)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function I(t,e){var n=new Uint8Array(32),r=new Uint8Array(32);return M(n,t),M(r,e),g(n,0,r,0)}function B(t){var e=new Uint8Array(32);return M(e,t),1&e[0]}function U(t,e){var n;for(n=0;n<16;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function j(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]+n[r]}function $(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]-n[r]}function H(t,e,n){var r,i,o=0,s=0,a=0,c=0,u=0,h=0,l=0,f=0,p=0,d=0,y=0,v=0,g=0,m=0,b=0,w=0,E=0,_=0,k=0,S=0,T=0,A=0,C=0,R=0,x=0,P=0,O=0,L=0,M=0,I=0,B=0,U=n[0],j=n[1],$=n[2],H=n[3],D=n[4],N=n[5],z=n[6],Y=n[7],F=n[8],q=n[9],X=n[10],W=n[11],G=n[12],J=n[13],K=n[14],Q=n[15];o+=(r=e[0])*U,s+=r*j,a+=r*$,c+=r*H,u+=r*D,h+=r*N,l+=r*z,f+=r*Y,p+=r*F,d+=r*q,y+=r*X,v+=r*W,g+=r*G,m+=r*J,b+=r*K,w+=r*Q,s+=(r=e[1])*U,a+=r*j,c+=r*$,u+=r*H,h+=r*D,l+=r*N,f+=r*z,p+=r*Y,d+=r*F,y+=r*q,v+=r*X,g+=r*W,m+=r*G,b+=r*J,w+=r*K,E+=r*Q,a+=(r=e[2])*U,c+=r*j,u+=r*$,h+=r*H,l+=r*D,f+=r*N,p+=r*z,d+=r*Y,y+=r*F,v+=r*q,g+=r*X,m+=r*W,b+=r*G,w+=r*J,E+=r*K,_+=r*Q,c+=(r=e[3])*U,u+=r*j,h+=r*$,l+=r*H,f+=r*D,p+=r*N,d+=r*z,y+=r*Y,v+=r*F,g+=r*q,m+=r*X,b+=r*W,w+=r*G,E+=r*J,_+=r*K,k+=r*Q,u+=(r=e[4])*U,h+=r*j,l+=r*$,f+=r*H,p+=r*D,d+=r*N,y+=r*z,v+=r*Y,g+=r*F,m+=r*q,b+=r*X,w+=r*W,E+=r*G,_+=r*J,k+=r*K,S+=r*Q,h+=(r=e[5])*U,l+=r*j,f+=r*$,p+=r*H,d+=r*D,y+=r*N,v+=r*z,g+=r*Y,m+=r*F,b+=r*q,w+=r*X,E+=r*W,_+=r*G,k+=r*J,S+=r*K,T+=r*Q,l+=(r=e[6])*U,f+=r*j,p+=r*$,d+=r*H,y+=r*D,v+=r*N,g+=r*z,m+=r*Y,b+=r*F,w+=r*q,E+=r*X,_+=r*W,k+=r*G,S+=r*J,T+=r*K,A+=r*Q,f+=(r=e[7])*U,p+=r*j,d+=r*$,y+=r*H,v+=r*D,g+=r*N,m+=r*z,b+=r*Y,w+=r*F,E+=r*q,_+=r*X,k+=r*W,S+=r*G,T+=r*J,A+=r*K,C+=r*Q,p+=(r=e[8])*U,d+=r*j,y+=r*$,v+=r*H,g+=r*D,m+=r*N,b+=r*z,w+=r*Y,E+=r*F,_+=r*q,k+=r*X,S+=r*W,T+=r*G,A+=r*J,C+=r*K,R+=r*Q,d+=(r=e[9])*U,y+=r*j,v+=r*$,g+=r*H,m+=r*D,b+=r*N,w+=r*z,E+=r*Y,_+=r*F,k+=r*q,S+=r*X,T+=r*W,A+=r*G,C+=r*J,R+=r*K,x+=r*Q,y+=(r=e[10])*U,v+=r*j,g+=r*$,m+=r*H,b+=r*D,w+=r*N,E+=r*z,_+=r*Y,k+=r*F,S+=r*q,T+=r*X,A+=r*W,C+=r*G,R+=r*J,x+=r*K,P+=r*Q,v+=(r=e[11])*U,g+=r*j,m+=r*$,b+=r*H,w+=r*D,E+=r*N,_+=r*z,k+=r*Y,S+=r*F,T+=r*q,A+=r*X,C+=r*W,R+=r*G,x+=r*J,P+=r*K,O+=r*Q,g+=(r=e[12])*U,m+=r*j,b+=r*$,w+=r*H,E+=r*D,_+=r*N,k+=r*z,S+=r*Y,T+=r*F,A+=r*q,C+=r*X,R+=r*W,x+=r*G,P+=r*J,O+=r*K,L+=r*Q,m+=(r=e[13])*U,b+=r*j,w+=r*$,E+=r*H,_+=r*D,k+=r*N,S+=r*z,T+=r*Y,A+=r*F,C+=r*q,R+=r*X,x+=r*W,P+=r*G,O+=r*J,L+=r*K,M+=r*Q,b+=(r=e[14])*U,w+=r*j,E+=r*$,_+=r*H,k+=r*D,S+=r*N,T+=r*z,A+=r*Y,C+=r*F,R+=r*q,x+=r*X,P+=r*W,O+=r*G,L+=r*J,M+=r*K,I+=r*Q,w+=(r=e[15])*U,s+=38*(_+=r*$),a+=38*(k+=r*H),c+=38*(S+=r*D),u+=38*(T+=r*N),h+=38*(A+=r*z),l+=38*(C+=r*Y),f+=38*(R+=r*F),p+=38*(x+=r*q),d+=38*(P+=r*X),y+=38*(O+=r*W),v+=38*(L+=r*G),g+=38*(M+=r*J),m+=38*(I+=r*K),b+=38*(B+=r*Q),o=(r=(o+=38*(E+=r*j))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=l,t[7]=f,t[8]=p,t[9]=d,t[10]=y,t[11]=v,t[12]=g,t[13]=m,t[14]=b,t[15]=w}function D(t,e){H(t,e,e)}function N(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)D(i,i),2!==r&&4!==r&&H(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function z(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)D(i,i),1!==r&&H(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function Y(t,n,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=e(),h=e(),l=e(),f=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=n[o];for(s[31]=127&n[31]|64,s[0]&=248,U(a,r),o=0;o<16;o++)h[o]=a[o],f[o]=u[o]=l[o]=0;for(u[0]=f[0]=1,o=254;o>=0;--o)L(u,h,i=s[o>>>3]>>>(7&o)&1),L(l,f,i),j(p,u,l),$(u,u,l),j(l,h,f),$(h,h,f),D(f,p),D(d,u),H(u,l,u),H(l,h,p),j(p,u,l),$(u,u,l),D(h,u),$(l,f,d),H(u,l,c),j(u,u,f),H(l,l,u),H(u,f,d),H(f,h,a),D(h,p),L(u,h,i),L(l,f,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=l[o],a[o+48]=h[o],a[o+64]=f[o];var y=a.subarray(32),v=a.subarray(16);return N(y,y),H(v,v,y),M(t,v),0}function F(t,e){return Y(t,e,o)}function q(t,e){return r(e,32),F(t,e)}function X(t,e,n){var r=new Uint8Array(32);return Y(r,n,e),b(t,i,r,w)}T.prototype.blocks=function(t,e,n){for(var r,i,o,s,a,c,u,h,l,f,p,d,y,v,g,m,b,w,E,_=this.fin?0:2048,k=this.h[0],S=this.h[1],T=this.h[2],A=this.h[3],C=this.h[4],R=this.h[5],x=this.h[6],P=this.h[7],O=this.h[8],L=this.h[9],M=this.r[0],I=this.r[1],B=this.r[2],U=this.r[3],j=this.r[4],$=this.r[5],H=this.r[6],D=this.r[7],N=this.r[8],z=this.r[9];n>=16;)f=l=0,f+=(k+=8191&(r=255&t[e+0]|(255&t[e+1])<<8))*M,f+=(S+=8191&(r>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*z),f+=(T+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*N),f+=(A+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*D),l=(f+=(C+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*H))>>>13,f&=8191,f+=(R+=a>>>1&8191)*(5*$),f+=(x+=8191&(a>>>14|(c=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*j),f+=(P+=8191&(c>>>11|(u=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*U),f+=(O+=8191&(u>>>8|(h=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*B),p=l+=(f+=(L+=h>>>5|_)*(5*I))>>>13,p+=k*I,p+=S*M,p+=T*(5*z),p+=A*(5*N),l=(p+=C*(5*D))>>>13,p&=8191,p+=R*(5*H),p+=x*(5*$),p+=P*(5*j),p+=O*(5*U),l+=(p+=L*(5*B))>>>13,p&=8191,d=l,d+=k*B,d+=S*I,d+=T*M,d+=A*(5*z),l=(d+=C*(5*N))>>>13,d&=8191,d+=R*(5*D),d+=x*(5*H),d+=P*(5*$),d+=O*(5*j),y=l+=(d+=L*(5*U))>>>13,y+=k*U,y+=S*B,y+=T*I,y+=A*M,l=(y+=C*(5*z))>>>13,y&=8191,y+=R*(5*N),y+=x*(5*D),y+=P*(5*H),y+=O*(5*$),v=l+=(y+=L*(5*j))>>>13,v+=k*j,v+=S*U,v+=T*B,v+=A*I,l=(v+=C*M)>>>13,v&=8191,v+=R*(5*z),v+=x*(5*N),v+=P*(5*D),v+=O*(5*H),g=l+=(v+=L*(5*$))>>>13,g+=k*$,g+=S*j,g+=T*U,g+=A*B,l=(g+=C*I)>>>13,g&=8191,g+=R*M,g+=x*(5*z),g+=P*(5*N),g+=O*(5*D),m=l+=(g+=L*(5*H))>>>13,m+=k*H,m+=S*$,m+=T*j,m+=A*U,l=(m+=C*B)>>>13,m&=8191,m+=R*I,m+=x*M,m+=P*(5*z),m+=O*(5*N),b=l+=(m+=L*(5*D))>>>13,b+=k*D,b+=S*H,b+=T*$,b+=A*j,l=(b+=C*U)>>>13,b&=8191,b+=R*B,b+=x*I,b+=P*M,b+=O*(5*z),w=l+=(b+=L*(5*N))>>>13,w+=k*N,w+=S*D,w+=T*H,w+=A*$,l=(w+=C*j)>>>13,w&=8191,w+=R*U,w+=x*B,w+=P*I,w+=O*M,E=l+=(w+=L*(5*z))>>>13,E+=k*z,E+=S*N,E+=T*D,E+=A*H,l=(E+=C*$)>>>13,E&=8191,E+=R*j,E+=x*U,E+=P*B,E+=O*I,k=f=8191&(l=(l=((l+=(E+=L*M)>>>13)<<2)+l|0)+(f&=8191)|0),S=p+=l>>>=13,T=d&=8191,A=y&=8191,C=v&=8191,R=g&=8191,x=m&=8191,P=b&=8191,O=w&=8191,L=E&=8191,e+=16,n-=16;this.h[0]=k,this.h[1]=S,this.h[2]=T,this.h[3]=A,this.h[4]=C,this.h[5]=R,this.h[6]=x,this.h[7]=P,this.h[8]=O,this.h[9]=L},T.prototype.finish=function(t,e){var n,r,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=n,n=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*n,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,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this.h[o]=this.h[o]&r|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},T.prototype.update=function(t,e,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=t[e+r];if(n-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(t,e,i),e+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=t[e+r];this.leftover+=n}};var W=R,G=x,J=[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 K(t,e,n,r){for(var i,o,s,a,c,u,h,l,f,p,d,y,v,g,m,b,w,E,_,k,S,T,A,C,R,x,P=new Int32Array(16),O=new Int32Array(16),L=t[0],M=t[1],I=t[2],B=t[3],U=t[4],j=t[5],$=t[6],H=t[7],D=e[0],N=e[1],z=e[2],Y=e[3],F=e[4],q=e[5],X=e[6],W=e[7],G=0;r>=128;){for(_=0;_<16;_++)k=8*_+G,P[_]=n[k+0]<<24|n[k+1]<<16|n[k+2]<<8|n[k+3],O[_]=n[k+4]<<24|n[k+5]<<16|n[k+6]<<8|n[k+7];for(_=0;_<80;_++)if(i=L,o=M,s=I,a=B,c=U,u=j,h=$,f=D,p=N,d=z,y=Y,v=F,g=q,m=X,A=65535&(T=W),C=T>>>16,R=65535&(S=H),x=S>>>16,A+=65535&(T=(F>>>14|U<<18)^(F>>>18|U<<14)^(U>>>9|F<<23)),C+=T>>>16,R+=65535&(S=(U>>>14|F<<18)^(U>>>18|F<<14)^(F>>>9|U<<23)),x+=S>>>16,A+=65535&(T=F&q^~F&X),C+=T>>>16,R+=65535&(S=U&j^~U&$),x+=S>>>16,A+=65535&(T=J[2*_+1]),C+=T>>>16,R+=65535&(S=J[2*_]),x+=S>>>16,S=P[_%16],C+=(T=O[_%16])>>>16,R+=65535&S,x+=S>>>16,R+=(C+=(A+=65535&T)>>>16)>>>16,A=65535&(T=E=65535&A|C<<16),C=T>>>16,R=65535&(S=w=65535&R|(x+=R>>>16)<<16),x=S>>>16,A+=65535&(T=(D>>>28|L<<4)^(L>>>2|D<<30)^(L>>>7|D<<25)),C+=T>>>16,R+=65535&(S=(L>>>28|D<<4)^(D>>>2|L<<30)^(D>>>7|L<<25)),x+=S>>>16,C+=(T=D&N^D&z^N&z)>>>16,R+=65535&(S=L&M^L&I^M&I),x+=S>>>16,l=65535&(R+=(C+=(A+=65535&T)>>>16)>>>16)|(x+=R>>>16)<<16,b=65535&A|C<<16,A=65535&(T=y),C=T>>>16,R=65535&(S=a),x=S>>>16,C+=(T=E)>>>16,R+=65535&(S=w),x+=S>>>16,M=i,I=o,B=s,U=a=65535&(R+=(C+=(A+=65535&T)>>>16)>>>16)|(x+=R>>>16)<<16,j=c,$=u,H=h,L=l,N=f,z=p,Y=d,F=y=65535&A|C<<16,q=v,X=g,W=m,D=b,_%16==15)for(k=0;k<16;k++)S=P[k],A=65535&(T=O[k]),C=T>>>16,R=65535&S,x=S>>>16,S=P[(k+9)%16],A+=65535&(T=O[(k+9)%16]),C+=T>>>16,R+=65535&S,x+=S>>>16,w=P[(k+1)%16],A+=65535&(T=((E=O[(k+1)%16])>>>1|w<<31)^(E>>>8|w<<24)^(E>>>7|w<<25)),C+=T>>>16,R+=65535&(S=(w>>>1|E<<31)^(w>>>8|E<<24)^w>>>7),x+=S>>>16,w=P[(k+14)%16],C+=(T=((E=O[(k+14)%16])>>>19|w<<13)^(w>>>29|E<<3)^(E>>>6|w<<26))>>>16,R+=65535&(S=(w>>>19|E<<13)^(E>>>29|w<<3)^w>>>6),x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,P[k]=65535&R|x<<16,O[k]=65535&A|C<<16;A=65535&(T=D),C=T>>>16,R=65535&(S=L),x=S>>>16,S=t[0],C+=(T=e[0])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[0]=L=65535&R|x<<16,e[0]=D=65535&A|C<<16,A=65535&(T=N),C=T>>>16,R=65535&(S=M),x=S>>>16,S=t[1],C+=(T=e[1])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[1]=M=65535&R|x<<16,e[1]=N=65535&A|C<<16,A=65535&(T=z),C=T>>>16,R=65535&(S=I),x=S>>>16,S=t[2],C+=(T=e[2])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[2]=I=65535&R|x<<16,e[2]=z=65535&A|C<<16,A=65535&(T=Y),C=T>>>16,R=65535&(S=B),x=S>>>16,S=t[3],C+=(T=e[3])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[3]=B=65535&R|x<<16,e[3]=Y=65535&A|C<<16,A=65535&(T=F),C=T>>>16,R=65535&(S=U),x=S>>>16,S=t[4],C+=(T=e[4])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[4]=U=65535&R|x<<16,e[4]=F=65535&A|C<<16,A=65535&(T=q),C=T>>>16,R=65535&(S=j),x=S>>>16,S=t[5],C+=(T=e[5])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[5]=j=65535&R|x<<16,e[5]=q=65535&A|C<<16,A=65535&(T=X),C=T>>>16,R=65535&(S=$),x=S>>>16,S=t[6],C+=(T=e[6])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[6]=$=65535&R|x<<16,e[6]=X=65535&A|C<<16,A=65535&(T=W),C=T>>>16,R=65535&(S=H),x=S>>>16,S=t[7],C+=(T=e[7])>>>16,R+=65535&S,x+=S>>>16,x+=(R+=(C+=(A+=65535&T)>>>16)>>>16)>>>16,t[7]=H=65535&R|x<<16,e[7]=W=65535&A|C<<16,G+=128,r-=128}return r}function Q(t,e,n){var r,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,K(i,o,e,n),n%=128,r=0;r<n;r++)s[r]=e[a-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,d(s,n-8,a/536870912|0,a<<3),K(i,o,s,n),r=0;r<8;r++)d(t,8*r,i[r],o[r]);return 0}function Z(t,n){var r=e(),i=e(),o=e(),s=e(),a=e(),c=e(),u=e(),l=e(),f=e();$(r,t[1],t[0]),$(f,n[1],n[0]),H(r,r,f),j(i,t[0],t[1]),j(f,n[0],n[1]),H(i,i,f),H(o,t[3],n[3]),H(o,o,h),H(s,t[2],n[2]),j(s,s,s),$(a,i,r),$(c,s,o),j(u,s,o),j(l,i,r),H(t[0],a,c),H(t[1],l,u),H(t[2],u,c),H(t[3],a,l)}function V(t,e,n){var r;for(r=0;r<4;r++)L(t[r],e[r],n)}function tt(t,n){var r=e(),i=e(),o=e();N(o,n[2]),H(r,n[0],o),H(i,n[1],o),M(t,i),t[31]^=B(r)<<7}function et(t,e,n){var r,i;for(P(t[0],s),P(t[1],a),P(t[2],a),P(t[3],s),i=255;i>=0;--i)V(t,e,r=n[i/8|0]>>(7&i)&1),Z(e,t),Z(t,t),V(t,e,r)}function nt(t,n){var r=[e(),e(),e(),e()];P(r[0],l),P(r[1],f),P(r[2],a),H(r[3],l,f),et(t,r,n)}function rt(t,n,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,nt(a,s),tt(t,a),o=0;o<32;o++)n[o+32]=t[o];return 0}var it=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 ot(t,e){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i<o;++i)e[i]+=n-16*e[r]*it[i-(r-32)],n=e[i]+128>>8,e[i]-=256*n;e[i]+=n,e[r]=0}for(n=0,i=0;i<32;i++)e[i]+=n-(e[31]>>4)*it[i],n=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=n*it[i];for(r=0;r<32;r++)e[r+1]+=e[r]>>8,t[r]=255&e[r]}function st(t){var e,n=new Float64Array(64);for(e=0;e<64;e++)n[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,n)}function at(t,n,r,i){var o,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),h=new Float64Array(64),l=[e(),e(),e(),e()];Q(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var f=r+64;for(o=0;o<r;o++)t[64+o]=n[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for(Q(u,t.subarray(32),r+32),st(u),nt(l,u),tt(t,l),o=32;o<64;o++)t[o]=i[o];for(Q(c,t,r+64),st(c),o=0;o<64;o++)h[o]=0;for(o=0;o<32;o++)h[o]=u[o];for(o=0;o<32;o++)for(s=0;s<32;s++)h[o+s]+=c[o]*a[s];return ot(t.subarray(32),h),f}function ct(t,n,r,i){var o,c=new Uint8Array(32),h=new Uint8Array(64),l=[e(),e(),e(),e()],f=[e(),e(),e(),e()];if(r<64)return-1;if(function(t,n){var r=e(),i=e(),o=e(),c=e(),h=e(),l=e(),f=e();return P(t[2],a),U(t[1],n),D(o,t[1]),H(c,o,u),$(o,o,t[2]),j(c,t[2],c),D(h,c),D(l,h),H(f,l,h),H(r,f,o),H(r,r,c),z(r,r),H(r,r,o),H(r,r,c),H(r,r,c),H(t[0],r,c),D(i,t[0]),H(i,i,c),I(i,o)&&H(t[0],t[0],p),D(i,t[0]),H(i,i,c),I(i,o)?-1:(B(t[0])===n[31]>>7&&$(t[0],s,t[0]),H(t[3],t[0],t[1]),0)}(f,i))return-1;for(o=0;o<r;o++)t[o]=n[o];for(o=0;o<32;o++)t[o+32]=i[o];if(Q(h,t,r),st(h),et(l,f,h),nt(f,n.subarray(32)),Z(l,f),tt(c,l),r-=64,g(n,0,c,0)){for(o=0;o<r;o++)t[o]=0;return-1}for(o=0;o<r;o++)t[o]=n[o+64];return r}var ut,ht=16,lt=64,ft=32,pt=64;function dt(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function yt(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function vt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:S,crypto_stream:k,crypto_stream_salsa20_xor:E,crypto_stream_salsa20:_,crypto_onetimeauth:A,crypto_onetimeauth_verify:C,crypto_verify_16:v,crypto_verify_32:g,crypto_secretbox:R,crypto_secretbox_open:x,crypto_scalarmult:Y,crypto_scalarmult_base:F,crypto_box_beforenm:X,crypto_box_afternm:W,crypto_box:function(t,e,n,r,i,o){var s=new Uint8Array(32);return X(s,i,o),W(t,e,n,r,s)},crypto_box_open:function(t,e,n,r,i,o){var s=new Uint8Array(32);return X(s,i,o),G(t,e,n,r,s)},crypto_box_keypair:q,crypto_hash:Q,crypto_sign:at,crypto_sign_keypair:rt,crypto_sign_open:ct,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ht,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:lt,crypto_sign_PUBLICKEYBYTES:ft,crypto_sign_SECRETKEYBYTES:pt,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:u,L:it,pack25519:M,unpack25519:U,M:H,A:j,S:D,Z:$,pow2523:z,add:Z,set25519:P,modL:ot,scalarmult:et,scalarbase:nt},t.randomBytes=function(t){var e=new Uint8Array(t);return r(e,t),e},t.secretbox=function(t,e,n){yt(t,e,n),dt(n,e);for(var r=new Uint8Array(32+t.length),i=new Uint8Array(r.length),o=0;o<t.length;o++)r[o+32]=t[o];return R(i,r,r.length,e,n),i.subarray(ht)},t.secretbox.open=function(t,e,n){yt(t,e,n),dt(n,e);for(var r=new Uint8Array(ht+t.length),i=new Uint8Array(r.length),o=0;o<t.length;o++)r[o+ht]=t[o];return r.length<32||0!==x(i,r,r.length,e,n)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=ht,t.scalarMult=function(t,e){if(yt(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var n=new Uint8Array(32);return Y(n,t,e),n},t.scalarMult.base=function(t){if(yt(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return F(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,n,r,i){var o=t.box.before(r,i);return t.secretbox(e,n,o)},t.box.before=function(t,e){yt(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var n=new Uint8Array(32);return X(n,t,e),n},t.box.after=t.secretbox,t.box.open=function(e,n,r,i){var o=t.box.before(r,i);return t.secretbox.open(e,n,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(yt(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return F(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(yt(t,e),e.length!==pt)throw new Error("bad secret key size");var n=new Uint8Array(lt+t.length);return at(n,t,t.length,e),n},t.sign.open=function(t,e){if(yt(t,e),e.length!==ft)throw new Error("bad public key size");var n=new Uint8Array(t.length),r=ct(n,t,t.length,e);if(r<0)return null;for(var i=new Uint8Array(r),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached=function(e,n){for(var r=t.sign(e,n),i=new Uint8Array(lt),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached.verify=function(t,e,n){if(yt(t,e,n),e.length!==lt)throw new Error("bad signature size");if(n.length!==ft)throw new Error("bad public key size");var r,i=new Uint8Array(lt+t.length),o=new Uint8Array(lt+t.length);for(r=0;r<lt;r++)i[r]=e[r];for(r=0;r<t.length;r++)i[r+lt]=t[r];return ct(o,i,i.length,n)>=0},t.sign.keyPair=function(){var t=new Uint8Array(ft),e=new Uint8Array(pt);return rt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(yt(t),t.length!==pt)throw new Error("bad secret key size");for(var e=new Uint8Array(ft),n=0;n<e.length;n++)e[n]=t[32+n];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(yt(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(ft),n=new Uint8Array(pt),r=0;r<32;r++)n[r]=t[r];return rt(e,n,!0),{publicKey:e,secretKey:n}},t.sign.publicKeyLength=ft,t.sign.secretKeyLength=pt,t.sign.seedLength=32,t.sign.signatureLength=lt,t.hash=function(t){yt(t);var e=new Uint8Array(64);return Q(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return yt(t,e),0!==t.length&&0!==e.length&&t.length===e.length&&0===y(t,0,e,0,t.length)},t.setPRNG=function(t){r=t},(ut="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&ut.getRandomValues?t.setPRNG((function(t,e){var n,r=new Uint8Array(e);for(n=0;n<e;n+=65536)ut.getRandomValues(r.subarray(n,n+Math.min(e-n,65536)));for(n=0;n<e;n++)t[n]=r[n];vt(r)})):(ut=n(3))&&ut.randomBytes&&t.setPRNG((function(t,e){var n,r=ut.randomBytes(e);for(n=0;n<e;n++)t[n]=r[n];vt(r)}))}(t.exports?t.exports:self.nacl=self.nacl||{})},function(t,e,n){!function(e,n){"use strict";t.exports?t.exports=n():(e.nacl||(e.nacl={}),e.nacl.util=n())}(this,(function(){"use strict";var t={};function e(t){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t))throw new TypeError("invalid encoding")}return t.decodeUTF8=function(t){if("string"!=typeof t)throw new TypeError("expected string");var e,n=unescape(encodeURIComponent(t)),r=new Uint8Array(n.length);for(e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r},t.encodeUTF8=function(t){var e,n=[];for(e=0;e<t.length;e++)n.push(String.fromCharCode(t[e]));return decodeURIComponent(escape(n.join("")))},"undefined"==typeof atob?void 0!==i.from?(t.encodeBase64=function(t){return i.from(t).toString("base64")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(i.from(t,"base64"),0))}):(t.encodeBase64=function(t){return new i(t).toString("base64")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(new i(t,"base64"),0))}):(t.encodeBase64=function(t){var e,n=[],r=t.length;for(e=0;e<r;e++)n.push(String.fromCharCode(t[e]));return btoa(n.join(""))},t.decodeBase64=function(t){e(t);var n,r=atob(t),i=new Uint8Array(r.length);for(n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i}),t}))},function(t,e,n){t.exports=n(4).default},function(t,e){},function(t,e,n){"use strict";n.r(e);for(var r=function(){function t(t,e){this.lastId=0,this.prefix=t,this.name=e}return t.prototype.create=function(t){this.lastId++;var e=this.lastId,n=this.prefix+e,r=this.name+"["+e+"]",i=!1,o=function(){i||(t.apply(null,arguments),i=!0)};return this[e]=o,{number:e,id:n,name:r,callback:o}},t.prototype.remove=function(t){delete this[t.number]},t}(),i=new r("_pusher_script_","Pusher.ScriptReceivers"),o={VERSION:"5.1.1",PROTOCOL:7,host:"ws.pusherapp.com",ws_port:80,wss_port:443,ws_path:"",sockjs_host:"sockjs.pusher.com",sockjs_http_port:80,sockjs_https_port:443,sockjs_path:"/pusher",stats_host:"stats.pusher.com",channel_auth_endpoint:"/pusher/auth",channel_auth_transport:"ajax",activity_timeout:12e4,pong_timeout:3e4,unavailable_timeout:1e4,cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},s=function(){function t(t){this.options=t,this.receivers=t.receivers||i,this.loading={}}return t.prototype.load=function(t,e,n){var r=this;if(r.loading[t]&&r.loading[t].length>0)r.loading[t].push(n);else{r.loading[t]=[n];var i=Ce.createScriptRequest(r.getPath(t,e)),o=r.receivers.create((function(e){if(r.receivers.remove(o),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var s=function(t){t||i.cleanup()},a=0;a<n.length;a++)n[a](e,s)}}));i.send(o)}},t.prototype.getRoot=function(t){var e=Ce.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version},t.prototype.getPath=function(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"},t}(),a=new r("_pusher_dependencies","Pusher.DependenciesReceivers"),c=new s({cdn_http:o.cdn_http,cdn_https:o.cdn_https,version:o.VERSION,suffix:o.dependency_suffix,receivers:a}),u=String.fromCharCode,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={},f=0,p=h.length;f<p;f++)l[h.charAt(f)]=f;var d,y=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?u(192|e>>>6)+u(128|63&e):u(224|e>>>12&15)+u(128|e>>>6&63)+u(128|63&e)},v=function(t){return t.replace(/[^\x00-\x7F]/g,y)},g=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[h.charAt(n>>>18),h.charAt(n>>>12&63),e>=2?"=":h.charAt(n>>>6&63),e>=1?"=":h.charAt(63&n)].join("")},m=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,g)},b=function(){function t(t,e,n,r){var i=this;this.clear=e,this.timer=t((function(){i.timer&&(i.timer=r(i.timer))}),n)}return t.prototype.isRunning=function(){return null!==this.timer},t.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},t}(),w=(d=function(t,e){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},d(t,e)},function(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function E(t){window.clearTimeout(t)}function _(t){window.clearInterval(t)}var k=function(t){function e(e,n){return t.call(this,setTimeout,E,e,(function(t){return n(),null}))||this}return w(e,t),e}(b),S=function(t){function e(e,n){return t.call(this,setInterval,_,e,(function(t){return n(),t}))||this}return w(e,t),e}(b),T={now:function(){return Date.now?Date.now():(new Date).valueOf()},defer:function(t){return new k(0,t)},method:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,r.concat(arguments))}}},A=T;function C(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)i[o]&&i[o].constructor&&i[o].constructor===Object?t[o]=C(t[o]||{},i[o]):t[o]=i[o]}return t}function R(){for(var t=["Pusher"],e=0;e<arguments.length;e++)"string"==typeof arguments[e]?t.push(arguments[e]):t.push(H(arguments[e]));return t.join(" : ")}function x(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}function P(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function O(t){var e=[];return P(t,(function(t,n){e.push(n)})),e}function L(t,e,n){for(var r=0;r<t.length;r++)e.call(n||window,t[r],r,t)}function M(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r,t,n));return n}function I(t,e){e=e||function(t){return!!t};for(var n=[],r=0;r<t.length;r++)e(t[r],r,t,n)&&n.push(t[r]);return n}function B(t,e){var n={};return P(t,(function(r,i){(e&&e(r,i,t,n)||Boolean(r))&&(n[i]=r)})),n}function U(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function j(t){return e=function(t){return"object"==typeof t&&(t=H(t)),encodeURIComponent((e=t.toString(),m(v(e))));var e},n={},P(t,(function(t,r){n[r]=e(t)})),n;var e,n}function $(t){var e,n,r=B(t,(function(t){return void 0!==t}));return M((e=j(r),n=[],P(e,(function(t,e){n.push([e,t])})),n),A.method("join","=")).join("&")}function H(t){try{return JSON.stringify(t)}catch(r){return JSON.stringify((e=[],n=[],function t(r,i){var o,s,a;switch(typeof r){case"object":if(!r)return null;for(o=0;o<e.length;o+=1)if(e[o]===r)return{$ref:n[o]};if(e.push(r),n.push(i),"[object Array]"===Object.prototype.toString.apply(r))for(a=[],o=0;o<r.length;o+=1)a[o]=t(r[o],i+"["+o+"]");else for(s in a={},r)Object.prototype.hasOwnProperty.call(r,s)&&(a[s]=t(r[s],i+"["+JSON.stringify(s)+"]"));return a;case"number":case"string":case"boolean":return r}}(t,"$")))}var e,n}var D=function(){function t(){this.globalLog=function(t){window.console&&window.console.log&&window.console.log(t)}}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLog,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLogWarn,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.log(this.globalLogError,t)},t.prototype.globalLogWarn=function(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)},t.prototype.globalLogError=function(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)},t.prototype.log=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=R.apply(this,arguments);if(Ue.log)Ue.log(r);else if(Ue.logToConsole){var i=t.bind(this);i(r)}},t}(),N=new D,z={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"}}},Y=function(t){var e,n=z.urls[t];return n?(n.fullUrl?e=n.fullUrl:n.path&&(e=z.baseUrl+n.path),e?"See: "+e:""):""},F=function(t,e,n){var r,i=this;for(var o in(r=Ce.createXHR()).open("POST",i.options.authEndpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),this.authOptions.headers)r.setRequestHeader(o,this.authOptions.headers[o]);return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){n(!0,"JSON returned from auth endpoint was invalid, yet status code was 200. Data was: "+r.responseText)}e&&n(!1,t)}else{var o=Y("authenticationEndpoint");N.error("Unable to retrieve auth string from auth endpoint - received status "+r.status+" from "+i.options.authEndpoint+". Clients must be authenticated to join private or presence channels. "+o),n(!0,r.status)}},r.send(this.composeQuery(e)),r},q=function(t,e,n){void 0!==this.authOptions.headers&&N.warn("To send headers with the auth request, you must use AJAX, rather than JSONP.");var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var i=t.getDocument(),o=i.createElement("script");t.auth_callbacks[r]=function(t){n(!1,t)};var s="Pusher.auth_callbacks['"+r+"']";o.src=this.options.authEndpoint+"?callback="+encodeURIComponent(s)+"&"+this.composeQuery(e);var a=i.getElementsByTagName("head")[0]||i.documentElement;a.insertBefore(o,a.firstChild)},X=function(){function t(t){this.src=t}return t.prototype.send=function(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var r=document.getElementsByTagName("head")[0];r.insertBefore(e.script,r.firstChild),e.errorScript&&r.insertBefore(e.errorScript,e.script.nextSibling)},t.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},t}(),W=function(){function t(t,e){this.url=t,this.data=e}return t.prototype.send=function(t){if(!this.request){var e=$(this.data),n=this.url+"/"+t.number+"?"+e;this.request=Ce.createScriptRequest(n),this.request.send(t)}},t.prototype.cleanup=function(){this.request&&this.request.cleanup()},t}(),G={name:"jsonp",getAgent:function(t,e){return function(n,r){var o="http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,s=Ce.createJSONPRequest(o,n),a=Ce.ScriptReceivers.create((function(e,n){i.remove(a),s.cleanup(),n&&n.host&&(t.host=n.host),r&&r(e,n)}));s.send(a)}}};function J(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function K(t,e){return"/app/"+t+"?protocol="+o.PROTOCOL+"&client=js&version="+o.VERSION+(e?"&"+e:"")}var Q={getInitial:function(t,e){return J("ws",e,(e.httpPath||"")+K(t,"flash=false"))}},Z={getInitial:function(t,e){return J("http",e,(e.httpPath||"/pusher")+K(t))}},V={getInitial:function(t,e){return J("http",e,e.httpPath||"/pusher")},getPath:function(t,e){return K(t)}},tt=function(){function t(){this._callbacks={}}return t.prototype.get=function(t){return this._callbacks[et(t)]},t.prototype.add=function(t,e,n){var r=et(t);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:e,context:n})},t.prototype.remove=function(t,e,n){if(t||e||n){var r=t?[et(t)]:O(this._callbacks);e||n?this.removeCallback(r,e,n):this.removeAllCallbacks(r)}else this._callbacks={}},t.prototype.removeCallback=function(t,e,n){L(t,(function(t){this._callbacks[t]=I(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)},t.prototype.removeAllCallbacks=function(t){L(t,(function(t){delete this._callbacks[t]}),this)},t}();function et(t){return"_"+t}var nt=function(){function t(t){this.callbacks=new tt,this.global_callbacks=[],this.failThrough=t}return t.prototype.bind=function(t,e,n){return this.callbacks.add(t,e,n),this},t.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},t.prototype.unbind=function(t,e,n){return this.callbacks.remove(t,e,n),this},t.prototype.unbind_global=function(t){return t?(this.global_callbacks=I(this.global_callbacks||[],(function(e){return e!==t})),this):(this.global_callbacks=[],this)},t.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},t.prototype.emit=function(t,e,n){for(var r=0;r<this.global_callbacks.length;r++)this.global_callbacks[r](t,e);var i=this.callbacks.get(t),o=[];if(n?o.push(e,n):e&&o.push(e),i&&i.length>0)for(r=0;r<i.length;r++)i[r].fn.apply(i[r].context||window,o);else this.failThrough&&this.failThrough(t,e);return this},t}(),rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(t){function e(e,n,r,i,o){var s=t.call(this)||this;return s.initialize=Ce.transportConnectionInitializer,s.hooks=e,s.name=n,s.priority=r,s.key=i,s.options=o,s.state="new",s.timeline=o.timeline,s.activityTimeout=o.activityTimeout,s.id=s.timeline.generateUniqueID(),s}return rt(e,t),e.prototype.handlesActivityChecks=function(){return Boolean(this.hooks.handlesActivityChecks)},e.prototype.supportsPing=function(){return Boolean(this.hooks.supportsPing)},e.prototype.connect=function(){var t=this;if(this.socket||"initialized"!==this.state)return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(e){return A.defer((function(){t.onError(e),t.changeState("closed")})),!1}return this.bindListeners(),N.debug("Connecting",{transport:this.name,url:e}),this.changeState("connecting"),!0},e.prototype.close=function(){return!!this.socket&&(this.socket.close(),!0)},e.prototype.send=function(t){var e=this;return"open"===this.state&&(A.defer((function(){e.socket&&e.socket.send(t)})),!0)},e.prototype.ping=function(){"open"===this.state&&this.supportsPing()&&this.socket.ping()},e.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},e.prototype.onError=function(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))},e.prototype.onClose=function(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0},e.prototype.onMessage=function(t){this.emit("message",t)},e.prototype.onActivity=function(){this.emit("activity")},e.prototype.bindListeners=function(){var t=this;this.socket.onopen=function(){t.onOpen()},this.socket.onerror=function(e){t.onError(e)},this.socket.onclose=function(e){t.onClose(e)},this.socket.onmessage=function(e){t.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=function(){t.onActivity()})},e.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))},e.prototype.changeState=function(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)},e.prototype.buildTimelineMessage=function(t){return C({cid:this.id},t)},e}(nt),ot=it,st=function(){function t(t){this.hooks=t}return t.prototype.isSupported=function(t){return this.hooks.isSupported(t)},t.prototype.createConnection=function(t,e,n,r){return new ot(this.hooks,t,e,n,r)},t}(),at=new st({urls:Q,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(Ce.getWebSocketAPI())},isSupported:function(){return Boolean(Ce.getWebSocketAPI())},getSocket:function(t){return Ce.createWebSocket(t)}}),ct={urls:Z,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},ut=C({getSocket:function(t){return Ce.HTTPFactory.createStreamingSocket(t)}},ct),ht=C({getSocket:function(t){return Ce.HTTPFactory.createPollingSocket(t)}},ct),lt={isSupported:function(){return Ce.isXHRSupported()}},ft={ws:at,xhr_streaming:new st(C({},ut,lt)),xhr_polling:new st(C({},ht,lt))},pt=new st({file:"sockjs",urls:V,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:c.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),dt={isSupported:function(t){return Ce.isXDRSupported(t.useTLS)}},yt=new st(C({},ut,dt)),vt=new st(C({},ht,dt));ft.xdr_streaming=yt,ft.xdr_polling=vt,ft.sockjs=pt;var gt=ft,mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=new(function(t){function e(){var e=t.call(this)||this,n=e;return void 0!==window.addEventListener&&(window.addEventListener("online",(function(){n.emit("online")}),!1),window.addEventListener("offline",(function(){n.emit("offline")}),!1)),e}return mt(e,t),e.prototype.isOnline=function(){return void 0===window.navigator.onLine||window.navigator.onLine},e}(nt)),wt=function(){function t(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}return t.prototype.createConnection=function(t,e,n,r){var i=this;r=C({},r,{activityTimeout:this.pingDelay});var o=this.transport.createConnection(t,e,n,r),s=null,a=function(){o.unbind("open",a),o.bind("closed",c),s=A.now()},c=function(t){if(o.unbind("closed",c),1002===t.code||1003===t.code)i.manager.reportDeath();else if(!t.wasClean&&s){var e=A.now()-s;e<2*i.maxPingDelay&&(i.manager.reportDeath(),i.pingDelay=Math.max(e/2,i.minPingDelay))}};return o.bind("open",a),o},t.prototype.isSupported=function(t){return this.manager.isAlive()&&this.transport.isSupported(t)},t}(),Et={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var r={event:e.event,channel:e.channel,data:n};return e.user_id&&(r.user_id=e.user_id),r}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=Et.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}},_t=Et,kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),St=function(t){function e(e,n){var r=t.call(this)||this;return r.id=e,r.transport=n,r.activityTimeout=n.activityTimeout,r.bindListeners(),r}return kt(e,t),e.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},e.prototype.send=function(t){return this.transport.send(t)},e.prototype.send_event=function(t,e,n){var r={event:t,data:e};return n&&(r.channel=n),N.debug("Event sent",r),this.send(_t.encodeMessage(r))},e.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},e.prototype.close=function(){this.transport.close()},e.prototype.bindListeners=function(){var t=this,e={message:function(e){var n;try{n=_t.decodeMessage(e)}catch(n){t.emit("error",{type:"MessageParseError",error:n,data:e.data})}if(void 0!==n){switch(N.debug("Event recd",n),n.event){case"pusher:error":t.emit("error",{type:"PusherError",data:n.data});break;case"pusher:ping":t.emit("ping");break;case"pusher:pong":t.emit("pong")}t.emit("message",n)}},activity:function(){t.emit("activity")},error:function(e){t.emit("error",{type:"WebSocketError",error:e})},closed:function(e){n(),e&&e.code&&t.handleCloseEvent(e),t.transport=null,t.emit("closed")}},n=function(){P(e,(function(e,n){t.transport.unbind(n,e)}))};P(e,(function(e,n){t.transport.bind(n,e)}))},e.prototype.handleCloseEvent=function(t){var e=_t.getCloseAction(t),n=_t.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})},e}(nt),Tt=function(){function t(t,e){this.transport=t,this.callback=e,this.bindListeners()}return t.prototype.close=function(){this.unbindListeners(),this.transport.close()},t.prototype.bindListeners=function(){var t=this;this.onMessage=function(e){var n;t.unbindListeners();try{n=_t.processHandshake(e)}catch(e){return t.finish("error",{error:e}),void t.transport.close()}"connected"===n.action?t.finish("connected",{connection:new St(n.id,t.transport),activityTimeout:n.activityTimeout}):(t.finish(n.action,{error:n.error}),t.transport.close())},this.onClosed=function(e){t.unbindListeners();var n=_t.getCloseAction(e)||"backoff",r=_t.getCloseError(e);t.finish(n,{error:r})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},t.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},t.prototype.finish=function(t,e){this.callback(C({transport:this.transport,action:t},e))},t}(),At=function(){function t(t,e){this.channel=t;var n=e.authTransport;if(void 0===Ce.getAuthorizers()[n])throw"'"+n+"' is not a recognized auth transport";this.type=n,this.options=e,this.authOptions=(e||{}).auth||{}}return t.prototype.composeQuery=function(t){var e="socket_id="+encodeURIComponent(t)+"&channel_name="+encodeURIComponent(this.channel.name);for(var n in this.authOptions.params)e+="&"+encodeURIComponent(n)+"="+encodeURIComponent(this.authOptions.params[n]);return e},t.prototype.authorize=function(e,n){t.authorizers=t.authorizers||Ce.getAuthorizers(),t.authorizers[this.type].call(this,Ce,e,n)},t}(),Ct=function(){function t(t,e){this.timeline=t,this.options=e||{}}return t.prototype.send=function(t,e){this.timeline.isEmpty()||this.timeline.send(Ce.TimelineTransport.getAgent(this,t),e)},t}(),Rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Pt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Ot=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Lt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Mt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),It=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Bt=function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return Object.setPrototypeOf(r,n.prototype),r}return Rt(e,t),e}(Error),Ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jt=function(t){function e(e,n){var r=t.call(this,(function(t,n){N.debug("No callbacks on "+e+" for "+t)}))||this;return r.name=e,r.pusher=n,r.subscribed=!1,r.subscriptionPending=!1,r.subscriptionCancelled=!1,r}return Ut(e,t),e.prototype.authorize=function(t,e){return e(!1,{auth:""})},e.prototype.trigger=function(t,e){if(0!==t.indexOf("client-"))throw new xt("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=Y("triggeringClientEvents");N.warn("Client event triggered before channel 'subscription_succeeded' event . "+n)}return this.pusher.send_event(t,e,this.name)},e.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},e.prototype.handleEvent=function(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})},e.prototype.handleSubscriptionSucceededEvent=function(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)},e.prototype.subscribe=function(){var t=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(function(e,n){e?(N.error(n),t.emit("pusher:subscription_error",n)):t.pusher.send_event("pusher:subscribe",{auth:n.auth,channel_data:n.channel_data,channel:t.name})})))},e.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},e.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},e.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},e}(nt),$t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $t(e,t),e.prototype.authorize=function(t,e){return Vt.createAuthorizer(this,this.pusher.config).authorize(t,e)},e}(jt),Dt=Ht,Nt=function(){function t(){this.reset()}return t.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},t.prototype.each=function(t){var e=this;P(this.members,(function(n,r){t(e.get(r))}))},t.prototype.setMyID=function(t){this.myID=t},t.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},t.prototype.addMember=function(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},t.prototype.removeMember=function(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e},t.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},t}(),zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.members=new Nt,r}return zt(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,(function(t,e){if(!t){if(void 0===e.channel_data){var i=Y("authenticationEndpoint");return N.error("Invalid auth response for channel '"+r.name+"',expected 'channel_data' field. "+i),void n("Invalid auth response")}var o=JSON.parse(e.channel_data);r.members.setMyID(o.user_id)}n(t,e)}))},e.prototype.handleEvent=function(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,r={};t.user_id&&(r.user_id=t.user_id),this.emit(e,n,r)}},e.prototype.handleInternalEvent=function(t){var e=t.event,n=t.data;switch(e){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:member_added":var r=this.members.addMember(n);this.emit("pusher:member_added",r);break;case"pusher_internal:member_removed":var i=this.members.removeMember(n);i&&this.emit("pusher:member_removed",i)}},e.prototype.handleSubscriptionSucceededEvent=function(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))},e.prototype.disconnect=function(){this.members.reset(),t.prototype.disconnect.call(this)},e}(Dt),Ft=n(0),qt=n(1),Xt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.key=null,e}return Xt(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,(function(t,e){if(t)n(!0,e);else{var i=e.shared_secret;if(i)r.key=Object(qt.decodeBase64)(i),delete e.shared_secret,n(!1,e);else{var o="No shared_secret key in auth payload for encrypted channel: "+r.name;n(!0,o)}}}))},e.prototype.trigger=function(t,e){throw new Mt("Client events are not currently supported for encrypted channels")},e.prototype.handleEvent=function(e){var n=e.event,r=e.data;0!==n.indexOf("pusher_internal:")&&0!==n.indexOf("pusher:")?this.handleEncryptedEvent(n,r):t.prototype.handleEvent.call(this,e)},e.prototype.handleEncryptedEvent=function(t,e){var n=this;if(this.key)if(e.ciphertext&&e.nonce){var r=Object(qt.decodeBase64)(e.ciphertext);if(r.length<Ft.secretbox.overheadLength)N.error("Expected encrypted event ciphertext length to be "+Ft.secretbox.overheadLength+", got: "+r.length);else{var i=Object(qt.decodeBase64)(e.nonce);if(i.length<Ft.secretbox.nonceLength)N.error("Expected encrypted event nonce length to be "+Ft.secretbox.nonceLength+", got: "+i.length);else{var o=Ft.secretbox.open(r,i,this.key);if(null===o)return N.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,(function(e,s){e?N.error("Failed to make a request to the authEndpoint: "+s+". Unable to fetch new key, so dropping encrypted event"):null!==(o=Ft.secretbox.open(r,i,n.key))?n.emitJSON(t,Object(qt.encodeUTF8)(o)):N.error("Failed to decrypt event with new key. Dropping encrypted event")}));this.emitJSON(t,Object(qt.encodeUTF8)(o))}}}else N.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);else N.debug("Received encrypted event before key has been retrieved from the authEndpoint")},e.prototype.emitJSON=function(t,e){try{this.emit(t,JSON.parse(e))}catch(n){this.emit(t,e)}return this},e}(Dt),Gt=Wt,Jt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e,n){var r=t.call(this)||this;r.key=e,r.options=n||{},r.state="initialized",r.connection=null,r.usingTLS=!!n.useTLS,r.timeline=r.options.timeline,r.errorCallbacks=r.buildErrorCallbacks(),r.connectionCallbacks=r.buildConnectionCallbacks(r.errorCallbacks),r.handshakeCallbacks=r.buildHandshakeCallbacks(r.errorCallbacks);var i=Ce.getNetwork();return i.bind("online",(function(){r.timeline.info({netinfo:"online"}),"connecting"!==r.state&&"unavailable"!==r.state||r.retryIn(0)})),i.bind("offline",(function(){r.timeline.info({netinfo:"offline"}),r.connection&&r.sendActivityCheck()})),r.updateStrategy(),r}return Jt(e,t),e.prototype.connect=function(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))},e.prototype.send=function(t){return!!this.connection&&this.connection.send(t)},e.prototype.send_event=function(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)},e.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},e.prototype.isUsingTLS=function(){return this.usingTLS},e.prototype.startConnecting=function(){var t=this,e=function(n,r){n?t.runner=t.strategy.connect(0,e):"error"===r.action?(t.emit("error",{type:"HandshakeError",error:r.error}),t.timeline.error({handshakeError:r.error})):(t.abortConnecting(),t.handshakeCallbacks[r.action](r))};this.runner=this.strategy.connect(0,e)},e.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},e.prototype.disconnectInternally=function(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()},e.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},e.prototype.retryIn=function(t){var e=this;this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new k(t||0,(function(){e.disconnectInternally(),e.connect()}))},e.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},e.prototype.setUnavailableTimer=function(){var t=this;this.unavailableTimer=new k(this.options.unavailableTimeout,(function(){t.updateState("unavailable")}))},e.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},e.prototype.sendActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new k(this.options.pongTimeout,(function(){t.timeline.error({pong_timed_out:t.options.pongTimeout}),t.retryIn(0)}))},e.prototype.resetActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new k(this.activityTimeout,(function(){t.sendActivityCheck()})))},e.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},e.prototype.buildConnectionCallbacks=function(t){var e=this;return C({},t,{message:function(t){e.resetActivityCheck(),e.emit("message",t)},ping:function(){e.send_event("pusher:pong",{})},activity:function(){e.resetActivityCheck()},error:function(t){e.emit("error",{type:"WebSocketError",error:t})},closed:function(){e.abandonConnection(),e.shouldRetry()&&e.retryIn(1e3)}})},e.prototype.buildHandshakeCallbacks=function(t){var e=this;return C({},t,{connected:function(t){e.activityTimeout=Math.min(e.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),e.clearUnavailableTimer(),e.setConnection(t.connection),e.socket_id=e.connection.id,e.updateState("connected",{socket_id:e.socket_id})}})},e.prototype.buildErrorCallbacks=function(){var t=this,e=function(e){return function(n){n.error&&t.emit("error",{type:"WebSocketError",error:n.error}),e(n)}};return{tls_only:e((function(){t.usingTLS=!0,t.updateStrategy(),t.retryIn(0)})),refused:e((function(){t.disconnect()})),backoff:e((function(){t.retryIn(1e3)})),retry:e((function(){t.retryIn(0)}))}},e.prototype.setConnection=function(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()},e.prototype.abandonConnection=function(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}},e.prototype.updateState=function(t,e){var n=this.state;if(this.state=t,n!==t){var r=t;"connected"===r&&(r+=" with new socket ID "+e.socket_id),N.debug("State changed",n+" -> "+r),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}},e.prototype.shouldRetry=function(){return"connecting"===this.state||"connected"===this.state},e}(nt),Qt=function(){function t(){this.channels={}}return t.prototype.add=function(t,e){return this.channels[t]||(this.channels[t]=function(t,e){return 0===t.indexOf("private-encrypted-")?Vt.createEncryptedChannel(t,e):0===t.indexOf("private-")?Vt.createPrivateChannel(t,e):0===t.indexOf("presence-")?Vt.createPresenceChannel(t,e):Vt.createChannel(t,e)}(t,e)),this.channels[t]},t.prototype.all=function(){return function(t){var e=[];return P(t,(function(t){e.push(t)})),e}(this.channels)},t.prototype.find=function(t){return this.channels[t]},t.prototype.remove=function(t){var e=this.channels[t];return delete this.channels[t],e},t.prototype.disconnect=function(){P(this.channels,(function(t){t.disconnect()}))},t}(),Zt=Qt,Vt={createChannels:function(){return new Zt},createConnectionManager:function(t,e){return new Kt(t,e)},createChannel:function(t,e){return new jt(t,e)},createPrivateChannel:function(t,e){return new Dt(t,e)},createPresenceChannel:function(t,e){return new Yt(t,e)},createEncryptedChannel:function(t,e){return new Gt(t,e)},createTimelineSender:function(t,e){return new Ct(t,e)},createAuthorizer:function(t,e){return e.authorizer?e.authorizer(t,e):new At(t,e)},createHandshake:function(t,e){return new Tt(t,e)},createAssistantToTheTransportManager:function(t,e,n){return new wt(t,e,n)}},te=function(){function t(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return t.prototype.getAssistant=function(t){return Vt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},t.prototype.isAlive=function(){return this.livesLeft>0},t.prototype.reportDeath=function(){this.livesLeft-=1},t}(),ee=function(){function t(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}return t.prototype.isSupported=function(){return U(this.strategies,A.method("isSupported"))},t.prototype.connect=function(t,e){var n=this,r=this.strategies,i=0,o=this.timeout,s=null,a=function(c,u){u?e(null,u):(i+=1,n.loop&&(i%=r.length),i<r.length?(o&&(o*=2,n.timeoutLimit&&(o=Math.min(o,n.timeoutLimit))),s=n.tryStrategy(r[i],t,{timeout:o,failFast:n.failFast},a)):e(!0))};return s=this.tryStrategy(r[i],t,{timeout:o,failFast:this.failFast},a),{abort:function(){s.abort()},forceMinPriority:function(e){t=e,s&&s.forceMinPriority(e)}}},t.prototype.tryStrategy=function(t,e,n,r){var i=null,o=null;return n.timeout>0&&(i=new k(n.timeout,(function(){o.abort(),r(!0)}))),o=t.connect(e,(function(t,e){t&&i&&i.isRunning()&&!n.failFast||(i&&i.ensureAborted(),r(t,e))})),{abort:function(){i&&i.ensureAborted(),o.abort()},forceMinPriority:function(t){o.forceMinPriority(t)}}},t}(),ne=function(){function t(t){this.strategies=t}return t.prototype.isSupported=function(){return U(this.strategies,A.method("isSupported"))},t.prototype.connect=function(t,e){return function(t,e,n){var r=M(t,(function(t,r,i,o){return t.connect(e,n(r,o))}));return{abort:function(){L(r,re)},forceMinPriority:function(t){L(r,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t,(function(t,n){return function(r,i){n[t].error=r,r?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(L(n,(function(t){t.forceMinPriority(i.transport.priority)})),e(null,i))}}))},t}();function re(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}var ie=function(){function t(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.usingTLS,r=function(t){var e=Ce.getLocalStorage();if(e)try{var n=e[se(t)];if(n)return JSON.parse(n)}catch(e){ae(t)}return null}(n),i=[this.strategy];if(r&&r.timestamp+this.ttl>=A.now()){var o=this.transports[r.transport];o&&(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),i.push(new ee([o],{timeout:2*r.latency+1e3,failFast:!0})))}var s=A.now(),a=i.pop().connect(t,(function r(o,c){o?(ae(n),i.length>0?(s=A.now(),a=i.pop().connect(t,r)):e(o)):(function(t,e,n){var r=Ce.getLocalStorage();if(r)try{r[se(t)]=H({timestamp:A.now(),transport:e,latency:n})}catch(t){}}(n,c.transport.name,A.now()-s),e(null,c))}));return{abort:function(){a.abort()},forceMinPriority:function(e){t=e,a&&a.forceMinPriority(e)}}},t}(),oe=ie;function se(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function ae(t){var e=Ce.getLocalStorage();if(e)try{delete e[se(t)]}catch(t){}}var ce=function(){function t(t,e){var n=e.delay;this.strategy=t,this.options={delay:n}}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n,r=this.strategy,i=new k(this.options.delay,(function(){n=r.connect(t,e)}));return{abort:function(){i.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}},t}(),ue=function(){function t(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}return t.prototype.isSupported=function(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()},t.prototype.connect=function(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)},t}(),he=function(){function t(t){this.strategy=t}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.strategy.connect(t,(function(t,r){r&&n.abort(),e(t,r)}));return n},t}();function le(t){return function(){return t.isSupported()}}var fe,pe=function(t,e){var n={};function r(r,i,o,s,a){var c=e(t,r,i,o,s,a);return n[r]=c,c}var i,o={hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath},s=C({},o,{useTLS:!0}),a={hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath},c={loop:!0,timeout:15e3,timeoutLimit:6e4},u=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activity_timeout}),h=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activity_timeout}),l=r("ws","ws",3,o,u),f=r("wss","ws",3,s,u),p=r("sockjs","sockjs",1,a),d=r("xhr_streaming","xhr_streaming",1,a,h),y=r("xdr_streaming","xdr_streaming",1,a,h),v=r("xhr_polling","xhr_polling",1,a),g=r("xdr_polling","xdr_polling",1,a),m=new ee([l],c),b=new ee([f],c),w=new ee([p],c),E=new ee([new ue(le(d),d,y)],c),_=new ee([new ue(le(v),v,g)],c),k=new ee([new ue(le(E),new ne([E,new ce(_,{delay:4e3})]),_)],c),S=new ue(le(k),k,w);return i=t.useTLS?new ne([m,new ce(S,{delay:2e3})]):new ne([m,new ce(b,{delay:2e3}),new ce(S,{delay:5e3})]),new oe(new he(new ue(le(l),i,S)),n,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},de={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new Pt),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}},ye=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(t){function e(e,n,r){var i=t.call(this)||this;return i.hooks=e,i.method=n,i.url=r,i}return ye(e,t),e.prototype.start=function(t){var e=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){e.close()},Ce.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)},e.prototype.close=function(){this.unloader&&(Ce.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},e.prototype.onChunk=function(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")},e.prototype.advanceBuffer=function(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null},e.prototype.isBufferTooLong=function(t){return this.position===t.length&&t.length>262144},e}(nt);!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(fe||(fe={}));var ge=fe,me=1;function be(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+me++}function we(t){return Math.floor(Math.random()*t)}var Ee,_e=function(){function t(t,e){this.hooks=t,this.session=we(1e3)+"/"+function(t){for(var e=[],n=0;n<t;n++)e.push(we(32).toString(32));return e.join("")}(8),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ge.CONNECTING,this.openStream()}return t.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},t.prototype.ping=function(){this.hooks.sendHeartbeat(this)},t.prototype.close=function(t,e){this.onClose(t,e,!0)},t.prototype.sendRaw=function(t){if(this.readyState!==ge.OPEN)return!1;try{return Ce.createSocketRequest("POST",be((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n},t.prototype.reconnect=function(){this.closeStream(),this.openStream()},t.prototype.onClose=function(t,e,n){this.closeStream(),this.readyState=ge.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})},t.prototype.onChunk=function(t){var e;if(200===t.status)switch(this.readyState===ge.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}},t.prototype.onOpen=function(t){var e,n,r;this.readyState===ge.CONNECTING?(t&&t.hostname&&(this.location.base=(e=this.location.base,n=t.hostname,(r=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e))[1]+n+r[3])),this.readyState=ge.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)},t.prototype.onEvent=function(t){this.readyState===ge.OPEN&&this.onmessage&&this.onmessage({data:t})},t.prototype.onActivity=function(){this.onactivity&&this.onactivity()},t.prototype.onError=function(t){this.onerror&&this.onerror(t)},t.prototype.openStream=function(){var t=this;this.stream=Ce.createSocketRequest("POST",be(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(function(e){t.onChunk(e)})),this.stream.bind("finished",(function(e){t.hooks.onFinished(t,e)})),this.stream.bind("buffer_too_long",(function(){t.reconnect()}));try{this.stream.start()}catch(e){A.defer((function(){t.onError(e),t.onClose(1006,"Could not start streaming",!1)}))}},t.prototype.closeStream=function(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)},t}(),ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Te={getRequest:function(t){var e=new(Ce.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},Ae={createStreamingSocket:function(t){return this.createSocket(ke,t)},createPollingSocket:function(t){return this.createSocket(Se,t)},createSocket:function(t,e){return new _e(t,e)},createXHR:function(t,e){return this.createRequest(Te,t,e)},createRequest:function(t,e,n){return new ve(t,e,n)},createXDR:function(t,e){return this.createRequest(de,t,e)}},Ce={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:i,DependenciesReceivers:a,getDefaultStrategy:pe,Transports:gt,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),c.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:Ae,TimelineTransport:G,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(t){var e=this;window.Pusher=t;var n=function(){e.onDocumentBody(t.ready)};window.JSON?n():c.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:F,jsonp:q}},onDocumentBody:function(t){var e=this;document.body?t():setTimeout((function(){e.onDocumentBody(t)}),0)},createJSONPRequest:function(t,e){return new W(t,e)},createScriptRequest:function(t){return new X(t)},getLocalStorage:function(){try{return window.localStorage}catch(t){return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){return new(this.getXHRAPI())},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return bt},createWebSocket:function(t){return new(this.getWebSocketAPI())(t)},createSocketRequest:function(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported:function(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener:function(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener:function(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)}};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(Ee||(Ee={}));var Re=Ee,xe=function(){function t(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}return t.prototype.log=function(t,e){t<=this.options.level&&(this.events.push(C({},e,{timestamp:A.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},t.prototype.error=function(t){this.log(Re.ERROR,t)},t.prototype.info=function(t){this.log(Re.INFO,t)},t.prototype.debug=function(t){this.log(Re.DEBUG,t)},t.prototype.isEmpty=function(){return 0===this.events.length},t.prototype.send=function(t,e){var n=this,r=C({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(r,(function(t,r){t||n.sent++,e&&e(t,r)})),!0},t.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},t}(),Pe=function(){function t(t,e,n,r){this.name=t,this.priority=e,this.transport=n,this.options=r||{}}return t.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},t.prototype.connect=function(t,e){var n=this;if(!this.isSupported())return Oe(new Bt,e);if(this.priority<t)return Oe(new Ot,e);var r=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),o=null,s=function(){i.unbind("initialized",s),i.connect()},a=function(){o=Vt.createHandshake(i,(function(t){r=!0,h(),e(null,t)}))},c=function(t){h(),e(t)},u=function(){var t;h(),t=H(i),e(new Lt(t))},h=function(){i.unbind("initialized",s),i.unbind("open",a),i.unbind("error",c),i.unbind("closed",u)};return i.bind("initialized",s),i.bind("open",a),i.bind("error",c),i.bind("closed",u),i.initialize(),{abort:function(){r||(h(),o?o.close():i.close())},forceMinPriority:function(t){r||n.priority<t&&(o?o.close():i.close())}}},t}();function Oe(t,e){return A.defer((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}var Le=Ce.Transports,Me=function(t,e,n,r,i,o){var s=Le[n];if(!s)throw new It(n);return t.enabledTransports&&-1===x(t.enabledTransports,e)||t.disabledTransports&&-1!==x(t.disabledTransports,e)?Ie:new Pe(e,r,o?o.getAssistant(s):s,C({key:t.key,useTLS:t.useTLS,timeline:t.timeline,ignoreNullOrigin:t.ignoreNullOrigin},i))},Ie={isSupported:function(){return!1},connect:function(t,e){var n=A.defer((function(){e(new Bt)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}},Be=function(){function t(e,n){var r,i=this;if(function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(e),!(n=n||{}).cluster&&!n.wsHost&&!n.httpHost){var s=Y("javascriptQuickStart");N.warn("You should always specify a cluster when connecting. "+s)}"disableStats"in n&&(N.warn("The disableStats option is deprecated in favor of enableStats"),"enableStats"in n||(n.enableStats=!n.disableStats)),this.key=e,this.config=C({wsHost:o.host,wsPort:o.ws_port,wssPort:o.wss_port,wsPath:o.ws_path,httpHost:o.sockjs_host,httpPort:o.sockjs_http_port,httpsPort:o.sockjs_https_port,httpPath:o.sockjs_path,statsHost:o.stats_host,authEndpoint:o.channel_auth_endpoint,authTransport:o.channel_auth_transport,activity_timeout:o.activity_timeout,pong_timeout:o.pong_timeout,unavailable_timeout:o.unavailable_timeout},n.cluster?{wsHost:"ws-"+(r=n.cluster)+".pusher.com",httpHost:"sockjs-"+r+".pusher.com"}:{},n),this.channels=Vt.createChannels(),this.global_emitter=new nt,this.sessionID=Math.floor(1e9*Math.random()),this.timeline=new xe(this.key,this.sessionID,{cluster:this.config.cluster,features:t.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Re.INFO,version:o.VERSION}),this.config.enableStats&&(this.timelineSender=Vt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Ce.TimelineTransport.name})),this.connection=Vt.createConnectionManager(this.key,C({getStrategy:function(t){var e=C({},i.config,t);return Ce.getDefaultStrategy(e,Me)},timeline:this.timeline,activityTimeout:this.config.activity_timeout,pongTimeout:this.config.pong_timeout,unavailableTimeout:this.config.unavailable_timeout},this.config,{useTLS:this.shouldUseTLS()})),this.connection.bind("connected",(function(){i.subscribeAll(),i.timelineSender&&i.timelineSender.send(i.connection.isUsingTLS())})),this.connection.bind("message",(function(t){var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=i.channel(t.channel);n&&n.handleEvent(t)}e||i.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(function(){i.channels.disconnect()})),this.connection.bind("disconnected",(function(){i.channels.disconnect()})),this.connection.bind("error",(function(t){N.warn(t)})),t.instances.push(this),this.timeline.info({instances:t.instances.length}),t.isReady&&this.connect()}return t.ready=function(){t.isReady=!0;for(var e=0,n=t.instances.length;e<n;e++)t.instances[e].connect()},t.getClientFeatures=function(){return O(B({ws:Ce.Transports.ws},(function(t){return t.isSupported({})})))},t.prototype.channel=function(t){return this.channels.find(t)},t.prototype.allChannels=function(){return this.channels.all()},t.prototype.connect=function(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new S(6e4,(function(){e.send(t)}))}},t.prototype.disconnect=function(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)},t.prototype.bind=function(t,e,n){return this.global_emitter.bind(t,e,n),this},t.prototype.unbind=function(t,e,n){return this.global_emitter.unbind(t,e,n),this},t.prototype.bind_global=function(t){return this.global_emitter.bind_global(t),this},t.prototype.unbind_global=function(t){return this.global_emitter.unbind_global(t),this},t.prototype.unbind_all=function(t){return this.global_emitter.unbind_all(),this},t.prototype.subscribeAll=function(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)},t.prototype.subscribe=function(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e},t.prototype.unsubscribe=function(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&"connected"===this.connection.state&&e.unsubscribe()},t.prototype.send_event=function(t,e,n){return this.connection.send_event(t,e,n)},t.prototype.shouldUseTLS=function(){return"https:"===Ce.getProtocol()||!0===this.config.forceTLS||Boolean(this.config.encrypted)},t.instances=[],t.isReady=!1,t.logToConsole=!1,t.Runtime=Ce,t.ScriptReceivers=Ce.ScriptReceivers,t.DependenciesReceivers=Ce.DependenciesReceivers,t.auth_callbacks=Ce.auth_callbacks,t}(),Ue=e.default=Be;Ce.setup(Be)}])},t.exports=r()},65829:function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}function i(t,e){return Object.getOwnPropertyNames(Object(t)).reduce((function(n,r){var i=Object.getOwnPropertyDescriptor(Object(t),r),o=Object.getOwnPropertyDescriptor(Object(e),r);return Object.defineProperty(n,r,o||i)}),{})}function o(t){var e=i(t);return(e.types||e.split)&&(e.types=e.types||e.split),(e.absolute||e.position)&&(e.absolute=e.absolute||/absolute/.test(t.position)),e}function s(t){return null!==t&&"object"==typeof t}function a(t){return Array.isArray(t)?t:null==t?[]:function(t){return s(t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0}(t.length)}(t)?Array.prototype.slice.call(t):[t]}function c(t){return s(t)&&/^(1|3|11)$/.test(t.nodeType)}function u(t){return"string"==typeof t}function h(t){var e,n=t;return u(t)&&(n=/^(#[a-z]\w+)$/.test(t.trim())?document.getElementById(t.trim().slice(1)):document.querySelectorAll(t)),(e=n,a(e).reduce((function(t,e){return t.concat(a(e))}),[])).filter(c)}function l(t,e,n){var r={},i=null;return s(t)&&(i=t[l.expando]||(t[l.expando]=++l.uid),r=l.cache[i]||(l.cache[i]={})),void 0===n?void 0===e?r:r[e]:void 0!==e?(r[e]=n,n):void 0}function f(t){var e=t&&t[l.expando];e&&(delete t[e],delete l.cache[e])}function p(t,e){for(var n=a(t),r=n.length,i=0;i<r;i++)e(n[i],i,n)}l.expando="splitType".concat(1*new Date),l.cache={},l.uid=0;var d="\\ud800-\\udfff",y="\\u0300-\\u036f\\ufe20-\\ufe23",v="\\u20d0-\\u20f0",g="\\ufe0e\\ufe0f",m="[".concat(d,"]"),b="[".concat(y).concat(v,"]"),w="\\ud83c[\\udffb-\\udfff]",E="(?:".concat(b,"|").concat(w,")"),_="[^".concat(d,"]"),k="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",T="\\u200d",A="".concat(E,"?"),C="[".concat(g,"]?"),R=C+A+("(?:\\u200d(?:"+[_,k,S].join("|")+")"+C+A+")*"),x="(?:".concat(["".concat(_).concat(b,"?"),b,k,S,m].join("|"),"\n)"),P=RegExp("".concat(w,"(?=").concat(w,")|").concat(x).concat(R),"g"),O=RegExp("[".concat([T,d,y,v,g].join(""),"]"));function L(t){return O.test(t)}function M(t){return L(t)?function(t){return t.match(P)||[]}(t):function(t){return t.split("")}(t)}function I(t){return null==t?"":String(t)}function B(t,e){var n=document.createElement(t);return e?(Object.keys(e).forEach((function(t){var r=e[t];null!==r&&("textContent"===t||"innerHTML"===t?n[t]=r:"children"===t?p(r,(function(t){c(t)&&n.appendChild(t)})):n.setAttribute(t,String(r).trim()))})),n):n}var U={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:"lines, words, chars",absolute:!1,tagName:"div"},j=function(){return document.createDocumentFragment()},$=function(t){return document.createTextNode(t)};function H(t,e){var n,r,o=function(t){var e=u(t)||Array.isArray(t)?String(t):"";return{lines:/line/i.test(e),words:/word/i.test(e),chars:/(char)|(character)/i.test(e)}}((e=i(U,e)).types),s=e.tagName,a="B".concat(1*new Date,"R"),c="absolute"===e.position||e.absolute,h=[],f=[];r=o.lines?B("div"):j();var d=function(t,e){var n=t.textContent;if(e){var r=t.innerHTML,i=document.createElement("div");i.innerHTML=r.replace(/<br\s*\/?>/g," ".concat(e," ")),n=i.textContent}return n.replace(/\s+/g," ").trim()}(t,a);if(n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return(t=t?String(t):"").split(e)}(d).reduce((function(t,n,i,c){var h,l;return n===a?(r.appendChild(B("br")),t):(o.chars&&(l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t=I(t))&&u(t)&&!e&&L(t)?M(t):t.split(e)}(n).map((function(t){return B(s,{class:"".concat(e.splitClass," ").concat(e.charClass),style:"display: inline-block;",textContent:t})})),f=f.concat(l)),o.words||o.lines?(h=B(s,{class:"".concat(e.wordClass," ").concat(e.splitClass),style:"display: inline-block; position: ".concat(o.words?"relative":"static"),children:o.chars?l:null,textContent:o.chars?null:n}),r.appendChild(h)):p(l,(function(t){r.appendChild(t)})),i!==c.length-1&&r.appendChild($(" ")),o.words?t.concat(h):t)}),[]),t.innerHTML="",t.appendChild(r),!c&&!o.lines)return{chars:f,words:n,lines:[]};var y,v,g,m,b,w=[],E=[],_=l(t,"nodes",t.getElementsByTagName(s)),k=t.parentElement,S=t.nextElementSibling,T=window.getComputedStyle(t).textAlign;return c&&(m={left:r.offsetLeft,top:r.offsetTop,width:r.offsetWidth},g=t.offsetWidth,v=t.offsetHeight,l(t).cssWidth=t.style.width,l(t).cssHeight=t.style.height),p(_,(function(t){if(t!==r){var e,n=t.parentElement===r;o.lines&&n&&((e=l(t,"top",t.offsetTop))!==b&&(b=e,w.push(E=[])),E.push(t)),c&&(l(t).top=e||t.offsetTop,l(t).left=t.offsetLeft,l(t).width=t.offsetWidth,l(t).height=y||(y=t.offsetHeight))}})),k&&k.removeChild(t),o.lines&&(r=j(),h=w.map((function(t){var n=B(s,{class:"".concat(e.splitClass," ").concat(e.lineClass),style:"display: block; text-align: ".concat(T,"; width: 100%;")});return r.appendChild(n),c&&(l(n).type="line",l(n).top=l(t[0]).top,l(n).height=y),p(t,(function(t,e,r){o.words?n.appendChild(t):o.chars?p(t.children,(function(t){n.appendChild(t)})):n.appendChild($(t.textContent)),e!==r.length-1&&n.appendChild($(" "))})),n})),t.replaceChild(r,t.firstChild)),c&&(t.style.width="".concat(t.style.width||g,"px"),t.style.height="".concat(v,"px"),p(_,(function(t){var e="line"===l(t).type,n=!e&&"line"===l(t.parentElement).type;t.style.top="".concat(n?0:l(t).top,"px"),t.style.left="".concat(e?m.left:l(t).left-(n?m.left:0),"px"),t.style.height="".concat(l(t).height,"px"),t.style.width="".concat(e?m.width:l(t).width,"px"),t.style.position="absolute"}))),k&&(S?k.insertBefore(t,S):k.appendChild(t)),{lines:h,words:o.words?n:[],chars:f}}var D=i(U,{}),N=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isSplit=!1,this.settings=i(D,o(n)),this.elements=h(e)||[],this.elements.length&&(this.originals=this.elements.map((function(t){return l(t,"html",l(t).html||t.innerHTML)})),this.settings.types&&this.split())}return r(t,null,[{key:"defaults",get:function(){return D},set:function(t){D=i(D,o(t))}}]),r(t,[{key:"split",value:function(t){var e=this;this.revert(),this.lines=[],this.words=[],this.chars=[];var n=[window.pageXOffset,window.pageYOffset];void 0!==t&&(this.settings=i(this.settings,o(t))),this.elements.forEach((function(t){var n=H(t,e.settings),r=n.lines,i=n.words,o=n.chars;e.lines=e.lines.concat(r),e.words=e.words.concat(i),e.chars=e.chars.concat(o),l(t).isSplit=!0})),this.isSplit=!0,window.scrollTo(n[0],n[1]),this.elements.forEach((function(t){a(l(t).nodes||[]).forEach(f)}))}},{key:"revert",value:function(){var t=this;this.isSplit&&(this.lines=null,this.words=null,this.chars=null),this.elements.forEach((function(e){l(e).isSplit&&l(e).html&&(e.innerHTML=l(e).html,e.style.height=l(e).cssHeight||"",e.style.width=l(e).cssWidth||"",t.isSplit=!1)}))}}]),t}();e.Z=N}},function(t){t.O(0,[8898],(function(){return e=77149,t(t.s=e);var e}));t.O()}]);
//# sourceMappingURL=silver.js.map