define((function(){"use strict"; /** * Modules in this bundle * @license * * snappyjs: * license: MIT (http://opensource.org/licenses/MIT) * author: Zhipeng Jia * version: 0.6.0 * * This header is generated by licensify (https://github.com/twada/licensify) */var r=[0,255,65535,16777215,4294967295];function e(r,e,n,t,f){var o;for(o=0;o>>t!==e)return-1;if(n|=e<>>2))>60){if(p+3>=u)return!1;i=o-60,o=1+((o=a[p]+(a[p+1]<<8)+(a[p+2]<<16)+(a[p+3]<<24))&r[i]),p+=i}if(p+o>u)return!1;e(a,p,t,c,o),p+=o,c+=o}else{switch(3&f){case 1:o=4+(f>>>2&7),s=a[p]+(f>>>5<<8),p+=1;break;case 2:if(p+1>=u)return!1;o=1+(f>>>2),s=a[p]+(a[p+1]<<8),p+=2;break;case 3:if(p+3>=u)return!1;o=1+(f>>>2),s=a[p]+(a[p+1]<<8)+(a[p+2]<<16)+(a[p+3]<<24),p+=4}if(0===s||s>c)return!1;n(t,c,s,o),c+=o}return!0};return function(r){if(!(o(r)||i(r)||(e=r,f()&&Buffer.isBuffer(e))))throw new TypeError("Argument compressed must be type of ArrayBuffer, Buffer, or Uint8Array");var e,n=!1,s=!1;o(r)?n=!0:i(r)&&(s=!0,r=new Uint8Array(r));var a,u,p=new t(r),c=p.readUncompressedLength();if(-1===c)throw new Error("Invalid Snappy bitstream");if(n){if(a=new Uint8Array(c),!p.uncompressToBuffer(a))throw new Error("Invalid Snappy bitstream")}else if(s){if(a=new ArrayBuffer(c),u=new Uint8Array(a),!p.uncompressToBuffer(u))throw new Error("Invalid Snappy bitstream")}else if(a=Buffer.alloc(c),!p.uncompressToBuffer(a))throw new Error("Invalid Snappy bitstream");return a}}));