function parse_cs_bin(data, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {
	if(!data) return data;
	if(!rels) rels = {'!id':{}};
	var s = {'!type':"chart", '!chart':null, '!rel':""};
	var state/*:Array<string>*/ = [];
	var pass = false;
	recordhopper(data, function cs_parse(val, R_n, RT) {
		switch(RT) {

			case 0x0226: /* 'BrtDrawing' */
				s['!rel'] = val; break;

			case 0x028B: /* 'BrtCsProp' */
				if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
				if(val.name) wb.Sheets[idx].CodeName = val.name;
				break;

			case 0x0232: /* 'BrtBkHim' */
			case 0x028C: /* 'BrtCsPageSetup' */
			case 0x029D: /* 'BrtCsProtection' */
			case 0x02A7: /* 'BrtCsProtectionIso' */
			case 0x0227: /* 'BrtLegacyDrawing' */
			case 0x0228: /* 'BrtLegacyDrawingHF' */
			case 0x01DC: /* 'BrtMargins' */
			case 0x0C00: /* 'BrtUid' */
				break;

			case 0x0023: /* 'BrtFRTBegin' */
				pass = true; break;
			case 0x0024: /* 'BrtFRTEnd' */
				pass = false; break;
			case 0x0025: /* 'BrtACBegin' */
				state.push(R_n); break;
			case 0x0026: /* 'BrtACEnd' */
				state.pop(); break;

			default:
				if((R_n||"").indexOf("Begin") > 0) state.push(R_n);
				else if((R_n||"").indexOf("End") > 0) state.pop();
				else if(!pass || opts.WTF) throw new Error("Unexpected record " + RT + " " + R_n);
		}
	}, opts);

	if(rels['!id'][s['!rel']]) s['!chart'] = rels['!id'][s['!rel']];
	return s;
}
function parse_cs_bin(data, opts, idx/*:number*/, rels, wb/*::, themes, styles*/)/*:Worksheet*/ {
	if(!data) return data;
	if(!rels) rels = {'!id':{}};
	var s = {'!type':"chart", '!chart':null, '!rel':""};
	var state/*:Array<string>*/ = [];
	var pass = false;
	recordhopper(data, function cs_parse(val, R_n, RT) {
		switch(RT) {

			case 0x0226: /* 'BrtDrawing' */
				s['!rel'] = val; break;

			case 0x028B: /* 'BrtCsProp' */
				if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
				if(val.name) wb.Sheets[idx].CodeName = val.name;
				break;

			case 0x0232: /* 'BrtBkHim' */
			case 0x028C: /* 'BrtCsPageSetup' */
			case 0x029D: /* 'BrtCsProtection' */
			case 0x02A7: /* 'BrtCsProtectionIso' */
			case 0x0227: /* 'BrtLegacyDrawing' */
			case 0x0228: /* 'BrtLegacyDrawingHF' */
			case 0x01DC: /* 'BrtMargins' */
			case 0x0C00: /* 'BrtUid' */
				break;

			case 0x0023: /* 'BrtFRTBegin' */
				pass = true; break;
			case 0x0024: /* 'BrtFRTEnd' */
				pass = false; break;
			case 0x0025: /* 'BrtACBegin' */
				state.push(R_n); break;
			case 0x0026: /* 'BrtACEnd' */
				state.pop(); break;

			default:
				if((R_n||"").indexOf("Begin") > 0) state.push(R_n);
				else if((R_n||"").indexOf("End") > 0) state.pop();
				else if(!pass || opts.WTF) throw new Error("Unexpected record " + RT + " " + R_n);
		}
	}, opts);

	if(rels['!id'][s['!rel']]) s['!chart'] = rels['!id'][s['!rel']];
	return s;
}
function parse_cs_bin ( data , opts , idx /*:number*/ , rels , wb /*::, themes, styles*/ ) /*:Worksheet*/ { if ( ! data ) return data ; if ( ! rels ) rels = { '!id' : { } } ; var s = { '!type' : "chart" , '!chart' : null , '!rel' : "" } ; var state /*:Array<string>*/ = [ ] ; var pass = false ; recordhopper ( data , function cs_parse ( val , R_n , RT ) { switch ( RT ) { case 0x0226 : /* 'BrtDrawing' */ s [ '!rel' ] = val ; break ; case 0x028B : /* 'BrtCsProp' */ if ( ! wb . Sheets [ idx ] ) wb . Sheets [ idx ] = { } ; if ( val . name ) wb . Sheets [ idx ] . CodeName = val . name ; break ; case 0x0232 : /* 'BrtBkHim' */ case 0x028C : /* 'BrtCsPageSetup' */ case 0x029D : /* 'BrtCsProtection' */ case 0x02A7 : /* 'BrtCsProtectionIso' */ case 0x0227 : /* 'BrtLegacyDrawing' */ case 0x0228 : /* 'BrtLegacyDrawingHF' */ case 0x01DC : /* 'BrtMargins' */ case 0x0C00 : /* 'BrtUid' */ break ; case 0x0023 : /* 'BrtFRTBegin' */ pass = true ; break ; case 0x0024 : /* 'BrtFRTEnd' */ pass = false ; break ; case 0x0025 : /* 'BrtACBegin' */ state . push ( R_n ) ; break ; case 0x0026 : /* 'BrtACEnd' */ state . pop ( ) ; break ; default : if ( ( R_n || "" ) . indexOf ( "Begin" ) > 0 ) state . push ( R_n ) ; else if ( ( R_n || "" ) . indexOf ( "End" ) > 0 ) state . pop ( ) ; else if ( ! pass || opts . WTF ) throw new Error ( "Unexpected record " + RT + " " + R_n ) ; } } , opts ) ; if ( rels [ '!id' ] [ s [ '!rel' ] ] ) s [ '!chart' ] = rels [ '!id' ] [ s [ '!rel' ] ] ; return s ; }
/* [MS-XLSB] 2.1.7.7 Chart Sheet
/ * [ MS - XLSB ] 2 . 1 . 7 . 7 Chart Sheet
Parse chart data