diff --git a/plugins/javascript/state-store/grabzitwebrecorder.js b/plugins/javascript/state-store/grabzitwebrecorder.js index 3b39839d..aa14e0ad 100644 --- a/plugins/javascript/state-store/grabzitwebrecorder.js +++ b/plugins/javascript/state-store/grabzitwebrecorder.js @@ -35,7 +35,7 @@ function GrabzIt(key) { if (opts == null) { - return opts; + return {}; } var results = {}; @@ -101,18 +101,13 @@ function GrabzIt(key) { var qs = 'key='+encodeURIComponent(this.key)+'&'+sKey+'=' + encodeURIComponent(sValue); - if (this.options == null) - { - return qs; - } - for(var k in this.options) { if (k != 'format' && k != 'cache' && k != 'customwatermarkid' && k != 'quality' && k != 'country' && k != 'filename' && k != 'errorid' && k != 'errorclass' && k != 'onfinish' && k != 'onerror' && k != 'delay' && k != 'bwidth' && k != 'bheight' && k != 'height' && k != 'width' && k != 'target' && k != 'requestas' && k != 'download' && k != 'suppresserrors' && k != 'displayid' && k != 'displayclass' && k != 'background' && k != 'pagesize' && k != 'orientation' && k != 'includelinks' && k != 'includeoutline' && k != 'title' && k != 'coverurl' && k != 'mtop' && k != 'mleft' && k != 'mbottom' && k != 'mright' && k != 'tabletoinclude' && k != 'includeheadernames' && k != 'includealltables' && k != 'start' && k != 'duration' && k != 'speed' && k != 'fps' && k != 'repeat' && k != 'reverse' && - k != 'templateid' && k != 'noresult') + k != 'templateid' && k != 'noresult' && k != 'hide') { throw "Option " + k + " not recognized!"; } @@ -223,6 +218,11 @@ function GrabzIt(key) { throw "No valid element was provided to attach the screenshot to"; } + + if (this.options['download'] != '1') + { + delete this.options['download']; + } if (this.post) { diff --git a/plugins/javascript/state-store/grabzitwebrecorder.min.js b/plugins/javascript/state-store/grabzitwebrecorder.min.js index 4fcb4f2c..61484836 100644 --- a/plugins/javascript/state-store/grabzitwebrecorder.min.js +++ b/plugins/javascript/state-store/grabzitwebrecorder.min.js @@ -1 +1 @@ -function GrabzIt(a){return new function(a){this.key=a,this.data=null,this.dataKey=null,this.options=null,this.post=!1,this.elem=null,this.ConvertURL=function(a,b){return this.data=a,this.dataKey="url",this.options=this._cleanOptions(b),this.post=!1,this},this.ConvertHTML=function(a,b){return this.data=a,this.dataKey="html",this.options=this._cleanOptions(b),this.post=!0,this},this._cleanOptions=function(a){if(null==a)return a;var b={};for(var c in a)null!=c&&(b[c.toLowerCase()]=a[c]);return b},this._createXHTTP=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},this._post=function(a){var b=this._createXHTTP(),c=this;b.onreadystatechange=function(){4==this.readyState&&200==this.status&&c.elem.appendChild(c._handlePost(JSON.parse(this.responseText)))},b.open("POST",this._getBaseWebServiceUrl(),!0),b.setRequestHeader("Content-type","application/x-www-form-urlencoded"),b.send(a)},this._getRootURL=function(){var a="//";return"https:"!=window.location.protocol&&"http:"!=window.location.protocol&&(a="http://"),a+"api.grabz.it/services/"},this._getBaseWebServiceUrl=function(){return this._getRootURL()+"javascript.ashx"},this._createQueryString=function(a,b){var c="key="+encodeURIComponent(this.key)+"&"+a+"="+encodeURIComponent(b);if(null==this.options)return c;for(var d in this.options){if("format"!=d&&"cache"!=d&&"customwatermarkid"!=d&&"quality"!=d&&"country"!=d&&"filename"!=d&&"errorid"!=d&&"errorclass"!=d&&"onfinish"!=d&&"onerror"!=d&&"delay"!=d&&"bwidth"!=d&&"bheight"!=d&&"height"!=d&&"width"!=d&&"target"!=d&&"requestas"!=d&&"download"!=d&&"suppresserrors"!=d&&"displayid"!=d&&"displayclass"!=d&&"background"!=d&&"pagesize"!=d&&"orientation"!=d&&"includelinks"!=d&&"includeoutline"!=d&&"title"!=d&&"coverurl"!=d&&"mtop"!=d&&"mleft"!=d&&"mbottom"!=d&&"mright"!=d&&"tabletoinclude"!=d&&"includeheadernames"!=d&&"includealltables"!=d&&"start"!=d&&"duration"!=d&&"speed"!=d&&"fps"!=d&&"repeat"!=d&&"reverse"!=d&&"templateid"!=d&&"noresult"!=d)throw"Option "+d+" not recognized!";var e=this.options[d];null!=e&&(c+="&"+d+"="+encodeURIComponent(e))}return c},this._createScriptNode=function(a){var b=document.createElement("script");return b.src=a,b},this._handlePost=function(a){if(null!=a){if(null==a.ID||""==a.ID)throw a.Message;return this._createScriptNode(this._getBaseWebServiceUrl()+"?"+this._createQueryString("id",a.ID))}},this.DataURI=function(a){var b=null;null!=this.options.onfinish&&(b=this.options.onfinish);var c="grabzItCallback"+Math.floor(Math.random()*(1e9+1));this.options.onfinish=c,this.options.noresult=1;var d=this;window[c]=function(c){var e=d._createXHTTP();e.onreadystatechange=function(){if(4==this.readyState&&200==this.status){var d=new FileReader;d.onload=function(d){if(null!=a&&a(d.target.result),null!=b){var e=new Function(b+"('"+c+"')");e()}},d.readAsDataURL(this.response)}},e.open("GET",d._getRootURL()+"getjspicture.ashx?id="+c,!0),e.responseType="blob",e.send()},this.Create()},this.Create=function(){var a=document.documentElement;null!=document.body&&(a=document.body),this.AddTo(a)},this.AddTo=function(a){if("string"==typeof a||a instanceof String){if(this.elem=document.getElementById(a),null==this.elem)throw"An element with the id "+a+" was not found"}else 1===a.nodeType&&(this.elem=a);if(null==this.elem)throw"No valid element was provided to attach the screenshot to";return this.post?void this._post(this._createQueryString(this.dataKey,this.data)):void this.elem.appendChild(this._createScriptNode(this._getBaseWebServiceUrl()+"?"+this._createQueryString(this.dataKey,this.data)))}}(a)}function GrabzItWebRecorder(){this.timeoutIds=new Array,this.intervalIds=new Array,this.targetId="",this.record=function(a){this.targetId=a},this.freeze=function(){for(var a=0;a(\r\n|\n|\r)/gm,">"),d=GrabzItLZString.compressToBase64(c);return d.length>2048?(alert("The size of the web data you are trying to send to GrabzIt is too large. Try to reduce this by specifiying a id of a element that more tightly wraps the data you are interested in recording."),""):d},this.minifyNode=function(a){if(void 0!==a){if(a.tagName&&"a"==a.tagName.toLowerCase()){var b=a.getAttribute("href");null!=b&&""!=b&&a.setAttribute("href","#")}if(a.tagName&&"img"==a.tagName.toLowerCase()){var c=a.getAttribute("src");null!=c&&a.setAttribute("src",c.replace(/^(https?):\/\//,"//"))}if(1==a.nodeType){var d=a.getAttribute("value");if(null!=d&&""!=d&&(null==a.tagName||"input"!=a.tagName.toLowerCase()||null==a.getAttribute("type")||"checkbox"!=a.getAttribute("type").toLowerCase()&&"radio"!=a.getAttribute("type").toLowerCase())||a.removeAttribute("value"),null!=a.tagName&&"select"==a.tagName.toLowerCase())for(var e=0;e>8,d=255&a.charCodeAt(j/2),e=j/2+1>8:NaN):(c=255&a.charCodeAt((j-1)/2),(j+1)/2>8,e=255&a.charCodeAt((j+1)/2)):d=e=NaN),j+=3,f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),b=b+GrabzItLZString._keyStr.charAt(f)+GrabzItLZString._keyStr.charAt(g)+GrabzItLZString._keyStr.charAt(h)+GrabzItLZString._keyStr.charAt(i);return b},decompressFromBase64:function(a){if(null==a)return"";var d,e,f,g,h,i,j,k,b="",c=0,l=0,m=GrabzItLZString._f;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,f=(15&i)<<4|j>>2,g=(3&j)<<6|k,c%2==0?(d=e<<8,64!=j&&(b+=m(d|f)),64!=k&&(d=g<<8)):(b+=m(d|e),64!=j&&(d=f<<8),64!=k&&(b+=m(d|g))),c+=3;return GrabzItLZString.decompress(b)},compressToUTF16:function(a){if(null==a)return"";var c,d,e,b="",f=0,g=GrabzItLZString._f;for(a=GrabzItLZString.compress(a),c=0;c>1)+32),e=(1&d)<<14;break;case 1:b+=g(e+(d>>2)+32),e=(3&d)<<13;break;case 2:b+=g(e+(d>>3)+32),e=(7&d)<<12;break;case 3:b+=g(e+(d>>4)+32),e=(15&d)<<11;break;case 4:b+=g(e+(d>>5)+32),e=(31&d)<<10;break;case 5:b+=g(e+(d>>6)+32),e=(63&d)<<9;break;case 6:b+=g(e+(d>>7)+32),e=(127&d)<<8;break;case 7:b+=g(e+(d>>8)+32),e=(255&d)<<7;break;case 8:b+=g(e+(d>>9)+32),e=(511&d)<<6;break;case 9:b+=g(e+(d>>10)+32),e=(1023&d)<<5;break;case 10:b+=g(e+(d>>11)+32),e=(2047&d)<<4;break;case 11:b+=g(e+(d>>12)+32),e=(4095&d)<<3;break;case 12:b+=g(e+(d>>13)+32),e=(8191&d)<<2;break;case 13:b+=g(e+(d>>14)+32),e=(16383&d)<<1;break;case 14:b+=g(e+(d>>15)+32,(32767&d)+32),f=0}return b+g(e+32)},decompressFromUTF16:function(a){if(null==a)return"";for(var c,d,b="",e=0,f=0,g=GrabzItLZString._f;f>14),c=(16383&d)<<2;break;case 2:b+=g(c|d>>13),c=(8191&d)<<3;break;case 3:b+=g(c|d>>12),c=(4095&d)<<4;break;case 4:b+=g(c|d>>11),c=(2047&d)<<5;break;case 5:b+=g(c|d>>10),c=(1023&d)<<6;break;case 6:b+=g(c|d>>9),c=(511&d)<<7;break;case 7:b+=g(c|d>>8),c=(255&d)<<8;break;case 8:b+=g(c|d>>7),c=(127&d)<<9;break;case 9:b+=g(c|d>>6),c=(63&d)<<10;break;case 10:b+=g(c|d>>5),c=(31&d)<<11;break;case 11:b+=g(c|d>>4),c=(15&d)<<12;break;case 12:b+=g(c|d>>3),c=(7&d)<<13;break;case 13:b+=g(c|d>>2),c=(3&d)<<14;break;case 14:b+=g(c|d>>1),c=(1&d)<<15;break;case 15:b+=g(c|d),e=0}f++}return GrabzItLZString.decompress(b)},compress:function(a){if(null==a)return"";var b,c,o,d={},e={},f="",g="",h="",i=2,j=3,k=2,l="",m=0,n=0,p=GrabzItLZString._f;for(o=0;o>=1}else{for(c=1,b=0;b>=1}i--,0==i&&(i=Math.pow(2,k),k++),delete e[h]}else for(c=d[h],b=0;b>=1;i--,0==i&&(i=Math.pow(2,k),k++),d[g]=j++,h=String(f)}if(""!==h){if(Object.prototype.hasOwnProperty.call(e,h)){if(h.charCodeAt(0)<256){for(b=0;b>=1}else{for(c=1,b=0;b>=1}i--,0==i&&(i=Math.pow(2,k),k++),delete e[h]}else for(c=d[h],b=0;b>=1;i--,0==i&&(i=Math.pow(2,k),k++)}for(c=2,b=0;b>=1;for(;;){if(m<<=1,15==n){l+=p(m);break}n++}return l},decompress:function(a){if(null==a)return"";if(""==a)return null;var c,i,j,k,l,m,n,o,b=[],d=4,e=4,f=3,g="",h="",p=GrabzItLZString._f,q={string:a,val:a.charCodeAt(0),position:32768,index:1};for(i=0;i<3;i+=1)b[i]=i;for(k=0,m=Math.pow(2,2),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;switch(c=k){case 0:for(k=0,m=Math.pow(2,8),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;o=p(k);break;case 1:for(k=0,m=Math.pow(2,16),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;o=p(k);break;case 2:return""}for(b[3]=o,j=h=o;;){if(q.index>q.string.length)return"";for(k=0,m=Math.pow(2,f),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;switch(o=k){case 0:for(k=0,m=Math.pow(2,8),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;b[e++]=p(k),o=e-1,d--;break;case 1:for(k=0,m=Math.pow(2,16),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;b[e++]=p(k),o=e-1,d--;break;case 2:return h}if(0==d&&(d=Math.pow(2,f),f++),b[o])g=b[o];else{if(o!==e)return null;g=j+j.charAt(0)}h+=g,b[e++]=j+g.charAt(0),d--,j=g,0==d&&(d=Math.pow(2,f),f++)}}},GrabzItWebRecorder=new GrabzItWebRecorder;window.GrabzItSetTimeout=window.setTimeout,window.setTimeout=function(a,b){var c=window.GrabzItSetTimeout(a,b);return GrabzItWebRecorder.setTimeoutId(c),c},window.GrabzItSetInterval=window.setInterval,window.setInterval=function(a,b){var c=window.GrabzItSetInterval(a,b);return GrabzItWebRecorder.setIntervalId(c),c}; \ No newline at end of file +function GrabzIt(a){return new function(a){this.key=a,this.data=null,this.dataKey=null,this.options=null,this.post=!1,this.elem=null,this.ConvertURL=function(a,b){return this.data=a,this.dataKey="url",this.options=this._cleanOptions(b),this.post=!1,this},this.ConvertHTML=function(a,b){return this.data=a,this.dataKey="html",this.options=this._cleanOptions(b),this.post=!0,this},this._cleanOptions=function(a){if(null==a)return{};var b={};for(var c in a)null!=c&&(b[c.toLowerCase()]=a[c]);return b},this._createXHTTP=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},this._post=function(a){var b=this._createXHTTP(),c=this;b.onreadystatechange=function(){4==this.readyState&&200==this.status&&c.elem.appendChild(c._handlePost(JSON.parse(this.responseText)))},b.open("POST",this._getBaseWebServiceUrl(),!0),b.setRequestHeader("Content-type","application/x-www-form-urlencoded"),b.send(a)},this._getRootURL=function(){var a="//";return"https:"!=window.location.protocol&&"http:"!=window.location.protocol&&(a="http://"),a+"api.grabz.it/services/"},this._getBaseWebServiceUrl=function(){return this._getRootURL()+"javascript.ashx"},this._createQueryString=function(a,b){var c="key="+encodeURIComponent(this.key)+"&"+a+"="+encodeURIComponent(b);for(var d in this.options){if("format"!=d&&"cache"!=d&&"customwatermarkid"!=d&&"quality"!=d&&"country"!=d&&"filename"!=d&&"errorid"!=d&&"errorclass"!=d&&"onfinish"!=d&&"onerror"!=d&&"delay"!=d&&"bwidth"!=d&&"bheight"!=d&&"height"!=d&&"width"!=d&&"target"!=d&&"requestas"!=d&&"download"!=d&&"suppresserrors"!=d&&"displayid"!=d&&"displayclass"!=d&&"background"!=d&&"pagesize"!=d&&"orientation"!=d&&"includelinks"!=d&&"includeoutline"!=d&&"title"!=d&&"coverurl"!=d&&"mtop"!=d&&"mleft"!=d&&"mbottom"!=d&&"mright"!=d&&"tabletoinclude"!=d&&"includeheadernames"!=d&&"includealltables"!=d&&"start"!=d&&"duration"!=d&&"speed"!=d&&"fps"!=d&&"repeat"!=d&&"reverse"!=d&&"templateid"!=d&&"noresult"!=d&&"hide"!=d)throw"Option "+d+" not recognized!";var e=this.options[d];null!=e&&(c+="&"+d+"="+encodeURIComponent(e))}return c},this._createScriptNode=function(a){var b=document.createElement("script");return b.src=a,b},this._handlePost=function(a){if(null!=a){if(null==a.ID||""==a.ID)throw a.Message;return this._createScriptNode(this._getBaseWebServiceUrl()+"?"+this._createQueryString("id",a.ID))}},this.DataURI=function(a){var b=null;null!=this.options.onfinish&&(b=this.options.onfinish);var c="grabzItCallback"+Math.floor(Math.random()*(1e9+1));this.options.onfinish=c,this.options.noresult=1;var d=this;window[c]=function(c){var e=d._createXHTTP();e.onreadystatechange=function(){if(4==this.readyState&&200==this.status){var d=new FileReader;d.onload=function(d){if(null!=a&&a(d.target.result),null!=b){var e=new Function(b+"('"+c+"')");e()}},d.readAsDataURL(this.response)}},e.open("GET",d._getRootURL()+"getjspicture.ashx?id="+c,!0),e.responseType="blob",e.send()},this.Create()},this.Create=function(){var a=document.documentElement;null!=document.body&&(a=document.body),this.AddTo(a)},this.AddTo=function(a){if("string"==typeof a||a instanceof String){if(this.elem=document.getElementById(a),null==this.elem)throw"An element with the id "+a+" was not found"}else 1===a.nodeType&&(this.elem=a);if(null==this.elem)throw"No valid element was provided to attach the screenshot to";return"1"!=this.options.download&&delete this.options.download,this.post?void this._post(this._createQueryString(this.dataKey,this.data)):void this.elem.appendChild(this._createScriptNode(this._getBaseWebServiceUrl()+"?"+this._createQueryString(this.dataKey,this.data)))}}(a)}function GrabzItWebRecorder(){this.timeoutIds=new Array,this.intervalIds=new Array,this.targetId="",this.record=function(a){this.targetId=a},this.freeze=function(){for(var a=0;a(\r\n|\n|\r)/gm,">"),d=GrabzItLZString.compressToBase64(c);return d.length>2048?(alert("The size of the web data you are trying to send to GrabzIt is too large. Try to reduce this by specifiying a id of a element that more tightly wraps the data you are interested in recording."),""):d},this.minifyNode=function(a){if(void 0!==a){if(a.tagName&&"a"==a.tagName.toLowerCase()){var b=a.getAttribute("href");null!=b&&""!=b&&a.setAttribute("href","#")}if(a.tagName&&"img"==a.tagName.toLowerCase()){var c=a.getAttribute("src");null!=c&&a.setAttribute("src",c.replace(/^(https?):\/\//,"//"))}if(1==a.nodeType){var d=a.getAttribute("value");if(null!=d&&""!=d&&(null==a.tagName||"input"!=a.tagName.toLowerCase()||null==a.getAttribute("type")||"checkbox"!=a.getAttribute("type").toLowerCase()&&"radio"!=a.getAttribute("type").toLowerCase())||a.removeAttribute("value"),null!=a.tagName&&"select"==a.tagName.toLowerCase())for(var e=0;e>8,d=255&a.charCodeAt(j/2),e=j/2+1>8:NaN):(c=255&a.charCodeAt((j-1)/2),(j+1)/2>8,e=255&a.charCodeAt((j+1)/2)):d=e=NaN),j+=3,f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),b=b+GrabzItLZString._keyStr.charAt(f)+GrabzItLZString._keyStr.charAt(g)+GrabzItLZString._keyStr.charAt(h)+GrabzItLZString._keyStr.charAt(i);return b},decompressFromBase64:function(a){if(null==a)return"";var d,e,f,g,h,i,j,k,b="",c=0,l=0,m=GrabzItLZString._f;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,f=(15&i)<<4|j>>2,g=(3&j)<<6|k,c%2==0?(d=e<<8,64!=j&&(b+=m(d|f)),64!=k&&(d=g<<8)):(b+=m(d|e),64!=j&&(d=f<<8),64!=k&&(b+=m(d|g))),c+=3;return GrabzItLZString.decompress(b)},compressToUTF16:function(a){if(null==a)return"";var c,d,e,b="",f=0,g=GrabzItLZString._f;for(a=GrabzItLZString.compress(a),c=0;c>1)+32),e=(1&d)<<14;break;case 1:b+=g(e+(d>>2)+32),e=(3&d)<<13;break;case 2:b+=g(e+(d>>3)+32),e=(7&d)<<12;break;case 3:b+=g(e+(d>>4)+32),e=(15&d)<<11;break;case 4:b+=g(e+(d>>5)+32),e=(31&d)<<10;break;case 5:b+=g(e+(d>>6)+32),e=(63&d)<<9;break;case 6:b+=g(e+(d>>7)+32),e=(127&d)<<8;break;case 7:b+=g(e+(d>>8)+32),e=(255&d)<<7;break;case 8:b+=g(e+(d>>9)+32),e=(511&d)<<6;break;case 9:b+=g(e+(d>>10)+32),e=(1023&d)<<5;break;case 10:b+=g(e+(d>>11)+32),e=(2047&d)<<4;break;case 11:b+=g(e+(d>>12)+32),e=(4095&d)<<3;break;case 12:b+=g(e+(d>>13)+32),e=(8191&d)<<2;break;case 13:b+=g(e+(d>>14)+32),e=(16383&d)<<1;break;case 14:b+=g(e+(d>>15)+32,(32767&d)+32),f=0}return b+g(e+32)},decompressFromUTF16:function(a){if(null==a)return"";for(var c,d,b="",e=0,f=0,g=GrabzItLZString._f;f>14),c=(16383&d)<<2;break;case 2:b+=g(c|d>>13),c=(8191&d)<<3;break;case 3:b+=g(c|d>>12),c=(4095&d)<<4;break;case 4:b+=g(c|d>>11),c=(2047&d)<<5;break;case 5:b+=g(c|d>>10),c=(1023&d)<<6;break;case 6:b+=g(c|d>>9),c=(511&d)<<7;break;case 7:b+=g(c|d>>8),c=(255&d)<<8;break;case 8:b+=g(c|d>>7),c=(127&d)<<9;break;case 9:b+=g(c|d>>6),c=(63&d)<<10;break;case 10:b+=g(c|d>>5),c=(31&d)<<11;break;case 11:b+=g(c|d>>4),c=(15&d)<<12;break;case 12:b+=g(c|d>>3),c=(7&d)<<13;break;case 13:b+=g(c|d>>2),c=(3&d)<<14;break;case 14:b+=g(c|d>>1),c=(1&d)<<15;break;case 15:b+=g(c|d),e=0}f++}return GrabzItLZString.decompress(b)},compress:function(a){if(null==a)return"";var b,c,o,d={},e={},f="",g="",h="",i=2,j=3,k=2,l="",m=0,n=0,p=GrabzItLZString._f;for(o=0;o>=1}else{for(c=1,b=0;b>=1}i--,0==i&&(i=Math.pow(2,k),k++),delete e[h]}else for(c=d[h],b=0;b>=1;i--,0==i&&(i=Math.pow(2,k),k++),d[g]=j++,h=String(f)}if(""!==h){if(Object.prototype.hasOwnProperty.call(e,h)){if(h.charCodeAt(0)<256){for(b=0;b>=1}else{for(c=1,b=0;b>=1}i--,0==i&&(i=Math.pow(2,k),k++),delete e[h]}else for(c=d[h],b=0;b>=1;i--,0==i&&(i=Math.pow(2,k),k++)}for(c=2,b=0;b>=1;for(;;){if(m<<=1,15==n){l+=p(m);break}n++}return l},decompress:function(a){if(null==a)return"";if(""==a)return null;var c,i,j,k,l,m,n,o,b=[],d=4,e=4,f=3,g="",h="",p=GrabzItLZString._f,q={string:a,val:a.charCodeAt(0),position:32768,index:1};for(i=0;i<3;i+=1)b[i]=i;for(k=0,m=Math.pow(2,2),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;switch(c=k){case 0:for(k=0,m=Math.pow(2,8),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;o=p(k);break;case 1:for(k=0,m=Math.pow(2,16),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;o=p(k);break;case 2:return""}for(b[3]=o,j=h=o;;){if(q.index>q.string.length)return"";for(k=0,m=Math.pow(2,f),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;switch(o=k){case 0:for(k=0,m=Math.pow(2,8),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;b[e++]=p(k),o=e-1,d--;break;case 1:for(k=0,m=Math.pow(2,16),n=1;n!=m;)l=q.val&q.position,q.position>>=1,0==q.position&&(q.position=32768,q.val=q.string.charCodeAt(q.index++)),k|=(l>0?1:0)*n,n<<=1;b[e++]=p(k),o=e-1,d--;break;case 2:return h}if(0==d&&(d=Math.pow(2,f),f++),b[o])g=b[o];else{if(o!==e)return null;g=j+j.charAt(0)}h+=g,b[e++]=j+g.charAt(0),d--,j=g,0==d&&(d=Math.pow(2,f),f++)}}},GrabzItWebRecorder=new GrabzItWebRecorder;window.GrabzItSetTimeout=window.setTimeout,window.setTimeout=function(a,b){var c=window.GrabzItSetTimeout(a,b);return GrabzItWebRecorder.setTimeoutId(c),c},window.GrabzItSetInterval=window.setInterval,window.setInterval=function(a,b){var c=window.GrabzItSetInterval(a,b);return GrabzItWebRecorder.setIntervalId(c),c}; \ No newline at end of file