}returnres};exports.findCompression=function(compressionMethod){for(varmethodincompressions){if(!compressions.hasOwnProperty(method)){continue}if(compressions[method].magic===compressionMethod){returncompressions[method]}}returnnull};exports.isRegExp=function(object){returnObject.prototype.toString.call(object)==="[object RegExp]"}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(_dereq_,module,exports){"use strict";varStringReader=_dereq_("./stringReader");varNodeBufferReader=_dereq_("./nodeBufferReader");varUint8ArrayReader=_dereq_("./uint8ArrayReader");varutils=_dereq_("./utils");varsig=_dereq_("./signature");varZipEntry=_dereq_("./zipEntry");varsupport=_dereq_("./support");varjszipProto=_dereq_("./object");functionZipEntries(data,loadOptions){this.files=[];this.loadOptions=loadOptions;if(data){this.load(data)}}ZipEntries.prototype={checkSignature:function(expectedSignature){varsignature=this.reader.readString(4);if(signature!==expectedSignature){thrownewError("Corrupted zip or bug : unexpected signature "+"("+utils.pretty(signature)+", expected "+utils.pretty(expectedSignature)+")")}},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2);this.diskWithCentralDirStart=this.reader.readInt(2);this.centralDirRecordsOnThisDisk=this.reader.readInt(2);this.centralDirRecords=this.reader.readInt(2);this.centralDirSize=this.reader.readInt(4);this.centralDirOffset=this.reader.readInt(4);this.zipCommentLength=this.reader.readInt(2);this.zipComment=this.reader.readString(this.zipCommentLength);this.zipComment=jszipProto.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8);this.versionMadeBy=this.reader.readString(2);this.versionNeeded=this.reader.readInt(2);this.diskNumber=this.reader.readInt(4);this.diskWithCentralDirStart=this.reader.readInt(4);this.centralDirRecordsOnThisDisk=this.reader.readInt(8);this.centralDirRecords=this.reader.readInt(8);this.centralDirSize=this.reader.readInt(8);this.centralDirOffset=this.reader.readInt(8);this.zip64ExtensibleData={};varextraDataSize=this.zip64EndOfCentralSize-44,index=0,extraFieldId,extraFieldLength,extraFieldValue;while(index<extraDataSize){extraFieldId=this.reader.readInt(2);extraFieldLength=this.reader.readInt(4);extraFieldValue=this.reader.readString(extraFieldLength);this.zip64ExtensibleData[extraFieldId]={id:extraFieldId,length:extraFieldLength,value:extraFieldValue}}},readBlockZip64EndOfCentralLocator:function(){this.diskWithZip64CentralDirStart=this.reader.readInt(4);this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8);this.disksCount=this.reader.readInt(4);if(this.disksCount>1){thrownewError("Multi-volumes zip are not supported")}},readLocalFiles:function(){vari,file;for(i=0;i<this.files.length;i++){file=this.files[i];this.reader.setIndex(file.localHeaderOffset);this.checkSignature(sig.LOCAL_FILE_HEADER);file.readLocalPart(this.reader);file.handleUTF8()}},readCentralDir:function(){varfile;this.reader.setIndex(this.centralDirOffset);while(this.reader.readString(4)===sig.CENTRAL_FILE_HEADER){file=newZipEntry({zip64:this.zip64},this.loadOptions);file.readCentralPart(this.reader);this.files.push(file)}},readEndOfCentral:function(){varoffset=this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);if(offset===-1){thrownewError("Corrupted zip : can't find end of central directory")}this.reader.setIndex(offset);this.checkSignature(sig.CENTRAL_DIRECTORY_END);this.readBlockEndOfCentral();if(this.diskNumber===utils.MAX_VALUE_16BITS||this.diskWithCentralDirStart===utils.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===utils.MAX_VALUE_16BITS||this.centralDirRecords===utils.MAX_VALUE_16BITS||this.centralDirSize===utils.MAX_VALUE_32BITS||this.centralDirOffset===utils.MAX_VALUE_32BITS){this.zip64=true;offset=this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);if(offset===-1){thrownewError("Corrupted zip : can't find the ZIP64 end of central directory locator")}this.reader.setIndex(offset);this.checkSignature(sig.ZIP64_CENTRAL_D
case"boolean":returnwritextag("vt:bool",s?"true":"false")}if(sinstanceofDate)returnwritextag("vt:filetime",write_w3cdtf(s));thrownewError("Unable to serialize "+s)}varXML_HEADER='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';varXMLNS={dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"};XMLNS.main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];functionreadIEEE754(buf,idx,isLE,nl,ml){if(isLE===undefined)isLE=true;if(!nl)nl=8;if(!ml&&nl===8)ml=52;vare,m,el=nl*8-ml-1,eMax=(1<<el)-1,eBias=eMax>>1;varbits=-7,d=isLE?-1:1,i=isLE?nl-1:0,s=buf[idx+i];i+=d;e=s&(1<<-bits)-1;s>>>=-bits;bits+=el;for(;bits>0;e=e*256+buf[idx+i],i+=d,bits-=8);m=e&(1<<-bits)-1;e>>>=-bits;bits+=ml;for(;bits>0;m=m*256+buf[idx+i],i+=d,bits-=8);if(e===eMax)returnm?NaN:(s?-1:1)*Infinity;elseif(e===0)e=1-eBias;else{m=m+Math.pow(2,ml);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-ml)}var__toBuffer,___toBuffer;__toBuffer=___toBuffer=functiontoBuffer_(bufs){varx=[];for(vari=0;i<bufs[0].length;++i){x.push.apply(x,bufs[0][i])}returnx};var__utf16le,___utf16le;__utf16le=___utf16le=functionutf16le_(b,s,e){varss=[];for(vari=s;i<e;i+=2)ss.push(String.fromCharCode(__readUInt16LE(b,i)));returnss.join("")};var__hexlify,___hexlify;__hexlify=___hexlify=functionhexlify_(b,s,l){returnb.slice(s,s+l).map(function(x){return(x<16?"0":"")+x.toString(16)}).join("")};var__utf8,___utf8;__utf8=___utf8=function(b,s,e){varss=[];for(vari=s;i<e;i++)ss.push(String.fromCharCode(__readUInt8(b,i)));returnss.join("")};var__lpstr,___lpstr;__lpstr=___lpstr=functionlpstr_(b,i){varlen=__readUInt32LE(b,i);returnlen>0?__utf8(b,i+4,i+4+len-1):""};var__lpwstr,___lpwstr;__lpwstr=___lpwstr=functionlpwstr_(b,i){varlen=2*__readUInt32LE(b,i);returnlen>0?__utf8(b,i+4,i+4+len-1):""};var__double,___double;__double=___double=function(b,idx){returnreadIEEE754(b,idx)};varis_buf=functionis_buf_a(a){returnArray.isArray(a)};if(has_buf){__utf16le=functionutf16le_b(b,s,e){if(!Buffer.isBuffer(b))return___utf16le(b,s,e);returnb.toString("utf16le",s,e)};__hexlify=function(b,s,l){returnBuffer.isBuffer(b)?b.toString("hex",s,s+l):___hexlify(b,s,l)};__lpstr=functionlpstr_b(b,i){if(!Buffer.isBuffer(b))return___lpstr(b,i);varlen=b.readUInt32LE(i);returnlen>0?b.toString("utf8",i+4,i+4+len-1):""};__lpwstr=functionlpwstr_b(b,i){if(!Buffer.isBuffer(b))return___lpwstr(b,i);varlen=2*b.readUInt32LE(i);returnb.toString("utf16le",i+4,i+4+len-1)};__utf8=functionutf8_b(s,e){returnthis.toString("utf8",s,e)};__toBuffer=function(bufs){returnbufs[0].length>0&&Buffer.isBuffer(bufs[0][0])?Buffer.concat(bufs[0]):___toBuffer(bufs)};bconcat=function(bufs){returnBuffer.isBuffer(bufs[0])?Buffer.concat(bufs):[].concat.apply([],bufs)};__double=functiondouble_(b,i){if(Buffer.isBuffer(b))returnb.readDoubleLE(i);return___double(b,i)};is_buf=functionis_buf_b(a){returnBuffer.isBuffer(a)||Array.isArray(a)}}if(typeofcptable!=="undefined"){__utf16le=function(b,s,e){returncptable.utils.decode(1200,b.slice(s,e))};__utf8=function(b,s,e){returncptable.utils.decode(65001,b.slice(s,e))};__lpstr=function(b,i){varlen=__readUInt32LE(b,i);returnlen>0?cptable.utils.decode(current_codepage,b.slice(i+4,i+4+len-1)):""};__lpwstr=function(b,i){varlen=2*__readUInt32LE(b,i);returnlen>0?cptable.utils.decode(1200,b.slice(i+4,i+4+len-1)):""}}var__readUInt8=function(b,idx){returnb[idx]};var__readUInt16LE=function(b,idx){returnb[idx+1]*(1<<8)+b[idx]};var__readInt16LE=function(b,idx){varu=b[idx+1]*(1<<8)+b[
if(pad)blob.l+=4-(str.length+1&3)&3;returnstr}functionparse_VtStringBase(blob,stringType,pad){if(stringType===31)returnparse_lpwstr(blob);returnparse_lpstr(blob,stringType,pad)}functionparse_VtString(blob,t,pad){returnparse_VtStringBase(blob,t,pad===false?0:4)}functionparse_VtUnalignedString(blob,t){if(!t)thrownewError("dafuq?");returnparse_VtStringBase(blob,t,0)}functionparse_VtVecUnalignedLpstrValue(blob){varlength=blob.read_shift(4);varret=[];for(vari=0;i!=length;++i)ret[i]=blob.read_shift(0,"lpstr");returnret}functionparse_VtVecUnalignedLpstr(blob){returnparse_VtVecUnalignedLpstrValue(blob)}functionparse_VtHeadingPair(blob){varheadingString=parse_TypedPropertyValue(blob,VT_USTR);varheaderParts=parse_TypedPropertyValue(blob,VT_I4);return[headingString,headerParts]}functionparse_VtVecHeadingPairValue(blob){varcElements=blob.read_shift(4);varout=[];for(vari=0;i!=cElements/2;++i)out.push(parse_VtHeadingPair(blob));returnout}functionparse_VtVecHeadingPair(blob){returnparse_VtVecHeadingPairValue(blob)}functionparse_dictionary(blob,CodePage){varcnt=blob.read_shift(4);vardict={};for(varj=0;j!=cnt;++j){varpid=blob.read_shift(4);varlen=blob.read_shift(4);dict[pid]=blob.read_shift(len,CodePage===1200?"utf16le":"utf8").replace(chr0,"").replace(chr1,"!")}if(blob.l&3)blob.l=blob.l>>2+1<<2;returndict}functionparse_BLOB(blob){varsize=blob.read_shift(4);varbytes=blob.slice(blob.l,blob.l+size);if(size&3>0)blob.l+=4-(size&3)&3;returnbytes}functionparse_ClipboardData(blob){varo={};o.Size=blob.read_shift(4);blob.l+=o.Size;returno}functionparse_VtVector(blob,cb){}functionparse_TypedPropertyValue(blob,type,_opts){vart=blob.read_shift(2),ret,opts=_opts||{};blob.l+=2;if(type!==VT_VARIANT)if(t!==type&&VT_CUSTOM.indexOf(type)===-1)thrownewError("Expected type "+type+" saw "+t);switch(type===VT_VARIANT?t:type){case2:ret=blob.read_shift(2,"i");if(!opts.raw)blob.l+=2;returnret;case3:ret=blob.read_shift(4,"i");returnret;case11:returnblob.read_shift(4)!==0;case19:ret=blob.read_shift(4);returnret;case30:returnparse_lpstr(blob,t,4).replace(chr0,"");case31:returnparse_lpwstr(blob);case64:returnparse_FILETIME(blob);case65:returnparse_BLOB(blob);case71:returnparse_ClipboardData(blob);case80:returnparse_VtString(blob,t,!opts.raw&&4).replace(chr0,"");case81:returnparse_VtUnalignedString(blob,t,4).replace(chr0,"");case4108:returnparse_VtVecHeadingPair(blob);case4126:returnparse_VtVecUnalignedLpstr(blob);default:thrownewError("TypedPropertyValue unrecognized type "+type+" "+t)}}functionparse_PropertySet(blob,PIDSI){varstart_addr=blob.l;varsize=blob.read_shift(4);varNumProps=blob.read_shift(4);varProps=[],i=0;varCodePage=0;varDictionary=-1,DictObj;for(i=0;i!=NumProps;++i){varPropID=blob.read_shift(4);varOffset=blob.read_shift(4);Props[i]=[PropID,Offset+start_addr]}varPropH={};for(i=0;i!=NumProps;++i){if(blob.l!==Props[i][1]){varfail=true;if(i>0&&PIDSI)switch(PIDSI[Props[i-1][0]].t){case2:if(blob.l+2===Props[i][1]){blob.l+=2;fail=false}break;case80:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break;case4108:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break}if(!PIDSI&&blob.l<=Props[i][1]){fail=false;blob.l=Props[i][1]}if(fail)thrownewError("Read Error: Expected address "+Props[i][1]+" at "+blob.l+" :"+i)}if(PIDSI){varpiddsi=PIDSI[Props[i][0]];PropH[piddsi.n]=parse_TypedPropertyValue(blob,piddsi.t,{raw:true});if(piddsi.p==="version")PropH[piddsi.n]=String(PropH[piddsi.n]>>16)+"."+String(PropH[piddsi.n]&65535);if(piddsi.n=="CodePage")switch(PropH[piddsi.n]){case0:PropH[piddsi.n]=1252;case1e4:case1252:case874:case1250:case1251:case1253:case1254:case1255:case1256:case1257:case1258:case932:case936:case949:case950:case1200:case1201:case65e3:case-536:case65001:case-535:set_cp(CodePage=PropH[piddsi.n]);break;default:thrownewError("Unsupported CodePage: "+PropH[piddsi.n])}}else{if(Props[i][0]===1){CodePage=PropH.CodePage=parse_TypedPropertyValue(blob,VT_I2);set_cp(CodePage);if(Dictionary!==-1){varoldpos=blob.l;blob.l=Props[Dictionary][1]
case"<strike/>":font.strike=1;break;case"</strike>":break;case"<u":if(!y.val)break;case"<u/>":font.u=1;break;case"</u>":break;case"<b":if(!y.val)break;case"<b/>":font.b=1;break;case"</b>":break;case"<i":if(!y.val)break;case"<i/>":font.i=1;break;case"</i>":break;case"<color":if(y.rgb)font.color=y.rgb.substr(2,6);break;case"<family":font.family=y.val;break;case"<vertAlign":break;case"<scheme":break;default:if(y[0].charCodeAt(1)!==47)throw"Unrecognized rich format "+y[0]}}varstyle=[];if(font.b)style.push("font-weight: bold;");if(font.i)style.push("font-style: italic;");intro.push('<span style="'+style.join("")+'">');outro.push("</span>");returncp};functionparse_r(r){varterms=[[],"",[]];vart=r.match(tregex),cp=65001;if(!isval(t))return"";terms[1]=t[1];varrpr=r.match(rpregex);if(isval(rpr))cp=parse_rpr(rpr[1],terms[0],terms[2]);returnterms[0].join("")+terms[1].replace(nlregex,"<br/>")+terms[2].join("")}returnfunctionparse_rs(rs){returnrs.replace(rregex,"").split(rend).map(parse_r).join("")}}();varsitregex=/<t[^>]*>([^<]*)<\/t>/g,sirregex=/<r>/;functionparse_si(x,opts){varhtml=opts?opts.cellHTML:true;varz={};if(!x)returnnull;vary;if(x.charCodeAt(1)===116){z.t=utf8read(unescapexml(x.substr(x.indexOf(">")+1).split(/<\/t>/)[0]));z.r=x;if(html)z.h=z.t}elseif(y=x.match(sirregex)){z.r=x;z.t=utf8read(unescapexml(x.match(sitregex).join("").replace(tagregex,"")));if(html)z.h=parse_rs(x)}returnz}varsstr0=/<sst([^>]*)>([\s\S]*)<\/sst>/;varsstr1=/<(?:si|sstItem)>/g;varsstr2=/<\/(?:si|sstItem)>/;functionparse_sst_xml(data,opts){vars=[],ss;varsst=data.match(sstr0);if(isval(sst)){ss=sst[2].replace(sstr1,"").split(sstr2);for(vari=0;i!=ss.length;++i){varo=parse_si(ss[i],opts);if(o!=null)s[s.length]=o}sst=parsexmltag(sst[1]);s.Count=sst.count;s.Unique=sst.uniqueCount}returns}RELS.SST="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings";varstraywsregex=/^\s|\s$|[\t\n\r]/;functionwrite_sst_xml(sst,opts){if(!opts.bookSST)return"";varo=[XML_HEADER];o[o.length]=writextag("sst",null,{xmlns:XMLNS.main[0],count:sst.Count,uniqueCount:sst.Unique});for(vari=0;i!=sst.length;++i){if(sst[i]==null)continue;vars=sst[i];varsitag="<si>";if(s.r)sitag+=s.r;else{sitag+="<t";if(s.t.match(straywsregex))sitag+=' xml:space="preserve"';sitag+=">"+escapexml(s.t)+"</t>"}sitag+="</si>";o[o.length]=sitag}if(o.length>2){o[o.length]="</sst>";o[1]=o[1].replace("/>",">")}returno.join("")}functionparse_BrtBeginSst(data,length){return[data.read_shift(4),data.read_shift(4)]}functionparse_sst_bin(data,opts){vars=[];varpass=false;recordhopper(data,functionhopper_sst(val,R,RT){switch(R.n){case"BrtBeginSst":s.Count=val[0];s.Unique=val[1];break;case"BrtSSTItem":s.push(val);break;case"BrtEndSst":returntrue;case"BrtFRTBegin":pass=true;break;case"BrtFRTEnd":pass=false;break;default:if(!pass||opts.WTF)thrownewError("Unexpected record "+RT+" "+R.n)}});returns}functionwrite_BrtBeginSst(sst,o){if(!o)o=new_buf(8);o.write_shift(4,sst.Count);o.write_shift(4,sst.Unique);returno}varwrite_BrtSSTItem=write_RichStr;functionwrite_sst_bin(sst,opts){varba=buf_array();write_record(ba,"BrtBeginSst",write_BrtBeginSst(sst));for(vari=0;i<sst.length;++i)write_record(ba,"BrtSSTItem",write_BrtSSTItem(sst[i]));write_record(ba,"BrtEndSst");returnba.end()}function_JS2ANSI(str){if(typeofcptable!=="undefined")returncptable.utils.encode(1252,str);returnstr.split("").map(function(x){returnx.charCodeAt(0)})}functionparse_Version(blob,length){varo={};o.Major=blob.read_shift(2);o.Minor=blob.read_shift(2);returno}functionparse_EncryptionHeader(blob,length){varo={};o.Flags=blob.read_shift(4);vartmp=blob.read_shift(4);if(tmp!==0)throw"Unrecognized SizeExtra: "+tmp;o.AlgID=blob.read_shift(4);switch(o.AlgID){case0:case26625:case26126:case26127:case26128:break;default:throw"Unrecognized encryption algorithm: "+o.AlgID}parsenoop(blob,length-12);returno}functionparse_EncryptionVerifier(blob,length){returnparsenoop(blob,length)}functionparse_RC4CryptoHeader(blob,length){varo={};varvers=o.EncryptionVersionInfo=parse_Version(blob
varcomment={author:y.authorId&&authors[y.authorId]?authors[y.authorId]:undefined,ref:y.ref,guid:y.guid};varcell=decode_cell(y.ref);if(opts.sheetRows&&opts.sheetRows<=cell.r)return;vartextMatch=x.match(/<text>([^\u2603]*)<\/text>/);if(!textMatch||!textMatch[1])return;varrt=parse_si(textMatch[1]);comment.r=rt.r;comment.t=rt.t;if(opts.cellHTML)comment.h=rt.h;commentList.push(comment)});returncommentList}functionwrite_comments_xml(data,opts){}functionparse_BrtBeginComment(data,length){varout={};out.iauthor=data.read_shift(4);varrfx=parse_UncheckedRfX(data,16);out.rfx=rfx.s;out.ref=encode_cell(rfx.s);data.l+=16;returnout}varparse_BrtCommentAuthor=parse_XLWideString;varparse_BrtCommentText=parse_RichStr;functionparse_comments_bin(data,opts){varout=[];varauthors=[];varc={};varpass=false;recordhopper(data,functionhopper_cmnt(val,R,RT){switch(R.n){case"BrtCommentAuthor":authors.push(val);break;case"BrtBeginComment":c=val;break;case"BrtCommentText":c.t=val.t;c.h=val.h;c.r=val.r;break;case"BrtEndComment":c.author=authors[c.iauthor];deletec.iauthor;if(opts.sheetRows&&opts.sheetRows<=c.rfx.r)break;deletec.rfx;out.push(c);break;case"BrtBeginComments":break;case"BrtEndComments":break;case"BrtBeginCommentAuthors":break;case"BrtEndCommentAuthors":break;case"BrtBeginCommentList":break;case"BrtEndCommentList":break;default:if(!pass||opts.WTF)thrownewError("Unexpected record "+RT+" "+R.n)}});returnout}functionwrite_comments_bin(data,opts){}varrc_to_a1=function(){varrcregex=/(^|[^A-Za-z])R(\[?)(-?\d+|)\]?C(\[?)(-?\d+|)\]?/g;varrcbase;functionrcfunc($$,$1,$2,$3,$4,$5){varR=$3.length>0?parseInt($3,10)|0:0,C=$5.length>0?parseInt($5,10)|0:0;if(C<0&&$4.length===0)C=0;if($4.length>0)C+=rcbase.c;if($2.length>0)R+=rcbase.r;return$1+encode_col(C)+encode_row(R)}returnfunctionrc_to_a1(fstr,base){rcbase=base;returnfstr.replace(rcregex,rcfunc)}}();functionparseread(l){returnfunction(blob,length){blob.l+=l;return}}functionparseread1(blob,length){blob.l+=1;return}functionparse_ColRelU(blob,length){varc=blob.read_shift(2);return[c&16383,c>>14&1,c>>15&1]}functionparse_RgceArea(blob,length){varr=blob.read_shift(2),R=blob.read_shift(2);varc=parse_ColRelU(blob,2);varC=parse_ColRelU(blob,2);return{s:{r:r,c:c[0],cRel:c[1],rRel:c[2]},e:{r:R,c:C[0],cRel:C[1],rRel:C[2]}}}functionparse_RgceAreaRel(blob,length){varr=blob.read_shift(2),R=blob.read_shift(2);varc=parse_ColRelU(blob,2);varC=parse_ColRelU(blob,2);return{s:{r:r,c:c[0],cRel:c[1],rRel:c[2]},e:{r:R,c:C[0],cRel:C[1],rRel:C[2]}}}functionparse_RgceLoc(blob,length){varr=blob.read_shift(2);varc=parse_ColRelU(blob,2);return{r:r,c:c[0],cRel:c[1],rRel:c[2]}}functionparse_RgceLocRel(blob,length){varr=blob.read_shift(2);varcl=blob.read_shift(2);varcRel=(cl&32768)>>15,rRel=(cl&16384)>>14;cl&=16383;if(cRel!==0)while(cl>=256)cl-=256;return{r:r,c:cl,cRel:cRel,rRel:rRel}}functionparse_PtgArea(blob,length){vartype=(blob[blob.l++]&96)>>5;vararea=parse_RgceArea(blob,8);return[type,area]}functionparse_PtgArea3d(blob,length){vartype=(blob[blob.l++]&96)>>5;varixti=blob.read_shift(2);vararea=parse_RgceArea(blob,8);return[type,ixti,area]}functionparse_PtgAreaErr(blob,length){vartype=(blob[blob.l++]&96)>>5;blob.l+=8;return[type]}functionparse_PtgAreaErr3d(blob,length){vartype=(blob[blob.l++]&96)>>5;varixti=blob.read_shift(2);blob.l+=8;return[type,ixti]}functionparse_PtgAreaN(blob,length){vartype=(blob[blob.l++]&96)>>5;vararea=parse_RgceAreaRel(blob,8);return[type,area]}functionparse_PtgArray(blob,length){vartype=(blob[blob.l++]&96)>>5;blob.l+=7;return[type]}functionparse_PtgAttrBaxcel(blob,length){varbitSemi=blob[blob.l+1]&1;varbitBaxcel=1;blob.l+=4;return[bitSemi,bitBaxcel]}functionparse_PtgAttrChoose(blob,length){blob.l+=2;varoffset=blob.read_shift(2);varo=[];for(vari=0;i<=offset;++i)o.push(blob.read_shift(2));returno}functionparse_PtgAttrGoto(blob,length){varbitGoto=blob[blob.l+1]&255?1:0;blob.l+=2;return[bitGoto,blob.read_shift(2)]}functionparse_PtgAttrIf(blob,length){varbitIf=blob[blob.l+1]&255?1:0;blob.l+=2;return[bitIf,blob.read_shift(2)]}functi