UNPKG

node-geogebra

Version:

Generate graphics with geogebra from nodejs

1 lines 1.04 kB
!function(t){"use strict";function e(t,e){var n={raw:!0,chunkSize:1048576};e&&"number"==typeof e.level&&(n.level=e.level),this._backEnd=t?new pako.Deflate(n):new pako.Inflate(n),this._chunks=[],this._dataLength=0,this._backEnd.onData=this._onData.bind(this)}function n(t){e.call(this,!0,t)}function a(){e.call(this,!1)}e.prototype._onData=function(t){this._chunks.push(t),this._dataLength+=t.length},e.prototype._fetchData=function(){var t=this._backEnd;if(0!==t.err)throw new Error(t.msg);var e,n=this._chunks;if(1===n.length)e=n[0];else if(n.length>1){e=new Uint8Array(this._dataLength);for(var a=0,h=n.length,r=0;a<h;a++){var i=n[a];e.set(i,r),r+=i.length}}return n.length=0,this._dataLength=0,e},e.prototype.append=function(t,e){return this._backEnd.push(t,!1),this._fetchData()},e.prototype.flush=function(){return this._backEnd.push(new Uint8Array(0),!0),this._fetchData()},n.prototype=Object.create(e.prototype),a.prototype=Object.create(e.prototype);var h=t.zip||t;h.Deflater=h._pako_Deflater=n,h.Inflater=h._pako_Inflater=a}(this);