text: !function(a,b){if("object"==typeof exports)module.exports=b(require,exports,module);else if("function"==typeof define&&define.amd)define(["require","exports","module"],b);else{var c=function(b){return a[b]},d=a,e={exports:d};a.woff2otf=b(c,d,e)}}(this,function(a,b,c){"use strict";function d(a){return a%4!==0?4-a%4:0}function e(){var a=this;a.unpack16=a._read.bind(a,g),a.unpack32=a._read.bind(a,h)}var f=a("pako/lib/inflate").inflate,g=1,h=2,i=2001684038;e.prototype.convert=function(a){var b=this;b.dataViewIn=new DataView(a),b.offsetIn=0;var c=b._readWOFFHeader();if(c.signature!==i)throw new Error("Cannot convert non-WOFF file");for(var e=b._calcEntrySelector(c),j=16*Math.pow(2,e),k=16*c.numTables-j,l=new Array(c.numTables),m=12,n=0,o=0;o<c.numTables;o++)l[o]=b._readNextDirectoryRecord(),m+=16,n+=l[o].origLength;var p=new Uint8Array(m+n+4*c.numTables),q=p.buffer;b.dataViewOut=new DataView(q),b.offsetOut=0,b._write(c.flavor,h),b._write(c.numTables,g),b._write(j,g),b._write(e,g),b._write(k,g),l.forEach(function(a){b._write(a.tag,h),b._write(a.origChecksum,h),b._write(m,h),b._write(a.origLength,h),a.outOffset=m,m+=a.origLength+d(m)});var r,s,t,u=0;return l.forEach(function(b){t=new Uint8Array(a.slice(b.offset,b.offset+b.compLength)),s=b.compLength!==b.origLength?f(t):t,p.set(s,b.outOffset),m=b.outOffset+b.origLength,r=d(m),p.set(new Uint8Array(r),b.outOffset+b.origLength),u=m+r}),q.slice(0,u)},e.prototype._readWOFFHeader=function(){var a=this,b=a.unpack16,c=a.unpack32;return{signature:c(),flavor:c(),length:c(),numTables:b(),reserved:b(),totalSfntSize:c(),majorVersion:b(),minorVersion:b(),metaOffset:c(),metaLength:c(),metaOrigLength:c(),privOffset:c(),privLength:c()}},e.prototype._readNextDirectoryRecord=function(){var a=this,b=a.unpack32;return{tag:b(),offset:b(),compLength:b(),origLength:b(),origChecksum:b()}},e.prototype._calcEntrySelector=function(a){for(var b=0;Math.pow(2,b)<=a.numTables;)b++;return b-1},e.prototype._write=function(a,b){var c=this,d=c.dataViewOut,e=c.offsetOut;b===g?(d.setUint16(e,a),c.offsetOut+=2):b===h&&(d.setUint32(e,a),c.offsetOut+=4)},e.prototype._read=function(a){var b,c=this,d=c.dataViewIn,e=c.offsetIn;return a===g?(b=d.getUint16(e),c.offsetIn+=2):a===h&&(b=d.getUint32(e),c.offsetIn+=4),b};var j;return c.exports=function(a){return(j||(j=new e)).convert(a)},c.exports});
  