static.vendors.js.stomp.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kafka-webview-ui Show documentation
Show all versions of kafka-webview-ui Show documentation
A full-featured web-based Apache Kafka consumer. Kafka WebView presents an easy-to-use web based interface for
reading data out of kafka topics and providing basic filtering and searching capabilities.
The newest version!
(function(){var t,n,e,i,r={}.hasOwnProperty,o=[].slice;t={LF:"\n",NULL:"\0"},e=function(){function n(t,n,e){this.command=t,this.headers=null!=n?n:{},this.body=null!=e?e:""}var e;return n.prototype.toString=function(){var e,i,o,s,u;e=[this.command],(o=!1===this.headers["content-length"])&&delete this.headers["content-length"],u=this.headers;for(i in u)r.call(u,i)&&(s=u[i],e.push(i+":"+s));return this.body&&!o&&e.push("content-length:"+n.sizeOfUTF8(this.body)),e.push(t.LF+this.body),e.join(t.LF)},n.sizeOfUTF8=function(t){return t?encodeURI(t).match(/%..|./g).length:0},e=function(e){var i,r,o,s,u,c,a,h,f,p,l,d,g,b,v,m,y;for(s=e.search(RegExp(""+t.LF+t.LF)),o=(u=e.substring(0,s).split(t.LF)).shift(),c={},d=function(t){return t.replace(/^\s+|\s+$/g,"")},g=0,v=(m=u.reverse()).length;gy)&&(r=e.charAt(a))!==t.NULL;a=l<=y?++b:--b)i+=r;return new n(o,c,i)},n.unmarshall=function(n){var i;return function(){var r,o,s,u;for(u=[],r=0,o=(s=n.split(RegExp(""+t.NULL+t.LF+"*"))).length;r0&&u.push(e(i));return u}()},n.marshall=function(e,i,r){return new n(e,i,r).toString()+t.NULL},n}(),n=function(){function n(t){this.ws=t,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16384,this.subscriptions={}}var r;return n.prototype.debug=function(t){var n;return"undefined"!=typeof window&&null!==window&&null!=(n=window.console)?n.log(t):void 0},r=function(){return Date.now?Date.now():(new Date).valueOf},n.prototype._transmit=function(t,n,i){var r;for(r=e.marshall(t,n,i),"function"==typeof this.debug&&this.debug(">>> "+r);;){if(!(r.length>this.maxWebSocketFrameSize))return this.ws.send(r);this.ws.send(r.substring(0,this.maxWebSocketFrameSize)),r=r.substring(this.maxWebSocketFrameSize),"function"==typeof this.debug&&this.debug("remaining = "+r.length)}},n.prototype._setupHeartbeat=function(n){var e,o,s,u,c,a;if((c=n.version)===i.VERSIONS.V1_1||c===i.VERSIONS.V1_2)return a=function(){var t,e,i,r;for(r=[],t=0,e=(i=n["heart-beat"].split(",")).length;t>> PING"):void 0}}(this))),0!==this.heartbeat.incoming&&0!==o?(s=Math.max(this.heartbeat.incoming,o),"function"==typeof this.debug&&this.debug("check PONG every "+s+"ms"),this.ponger=i.setInterval(s,function(t){return function(){var n;if((n=r()-t.serverActivity)>2*s)return"function"==typeof t.debug&&t.debug("did not receive server activity for the last "+n+"ms"),t.ws.close()}}(this))):void 0},n.prototype._parseConnect=function(){var t,n,e,i;switch(t=1<=arguments.length?o.call(arguments,0):[],i={},t.length){case 2:i=t[0],n=t[1];break;case 3:t[1]instanceof Function?(i=t[0],n=t[1],e=t[2]):(i.login=t[0],i.passcode=t[1],n=t[2]);break;case 4:i.login=t[0],i.passcode=t[1],n=t[2],e=t[3];break;default:i.login=t[0],i.passcode=t[1],n=t[2],e=t[3],i.host=t[4]}return[i,n,e]},n.prototype.connect=function(){var n,s,u,c;return n=1<=arguments.length?o.call(arguments,0):[],c=this._parseConnect.apply(this,n),u=c[0],this.connectCallback=c[1],s=c[2],"function"==typeof this.debug&&this.debug("Opening Web Socket..."),this.ws.onmessage=function(n){return function(i){var o,u,c,a,h,f,p,l,d,g,b,v;if(a="undefined"!=typeof ArrayBuffer&&i.data instanceof ArrayBuffer?(o=new Uint8Array(i.data),"function"==typeof n.debug&&n.debug("--- got data length: "+o.length),function(){var t,n,e;for(e=[],t=0,n=o.length;t