forked from sheetjs/sheetjs
		
	remove flow array comment workarounds
- XLSB use #REF! for unsupported defined name ref (fixes #3059 h/t @NenadC2)
This commit is contained in:
		
							parent
							
								
									d4d4ff3da2
								
							
						
					
					
						commit
						e4a66516e4
					
				| @ -6,26 +6,26 @@ var $cptable; | ||||
| var VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000 ]; | ||||
| /* ECMA-376 Part I 18.4.1 charset to codepage mapping */ | ||||
| var CS2CP = ({ | ||||
| 	/*::[*/0/*::]*/:    1252, /* ANSI */ | ||||
| 	/*::[*/1/*::]*/:   65001, /* DEFAULT */ | ||||
| 	/*::[*/2/*::]*/:   65001, /* SYMBOL */ | ||||
| 	/*::[*/77/*::]*/:  10000, /* MAC */ | ||||
| 	/*::[*/128/*::]*/:   932, /* SHIFTJIS */ | ||||
| 	/*::[*/129/*::]*/:   949, /* HANGUL */ | ||||
| 	/*::[*/130/*::]*/:  1361, /* JOHAB */ | ||||
| 	/*::[*/134/*::]*/:   936, /* GB2312 */ | ||||
| 	/*::[*/136/*::]*/:   950, /* CHINESEBIG5 */ | ||||
| 	/*::[*/161/*::]*/:  1253, /* GREEK */ | ||||
| 	/*::[*/162/*::]*/:  1254, /* TURKISH */ | ||||
| 	/*::[*/163/*::]*/:  1258, /* VIETNAMESE */ | ||||
| 	/*::[*/177/*::]*/:  1255, /* HEBREW */ | ||||
| 	/*::[*/178/*::]*/:  1256, /* ARABIC */ | ||||
| 	/*::[*/186/*::]*/:  1257, /* BALTIC */ | ||||
| 	/*::[*/204/*::]*/:  1251, /* RUSSIAN */ | ||||
| 	/*::[*/222/*::]*/:   874, /* THAI */ | ||||
| 	/*::[*/238/*::]*/:  1250, /* EASTEUROPE */ | ||||
| 	/*::[*/255/*::]*/:  1252, /* OEM */ | ||||
| 	/*::[*/69/*::]*/:   6969  /* MISC */ | ||||
| 	0:    1252, /* ANSI */ | ||||
| 	1:   65001, /* DEFAULT */ | ||||
| 	2:   65001, /* SYMBOL */ | ||||
| 	77:  10000, /* MAC */ | ||||
| 	128:   932, /* SHIFTJIS */ | ||||
| 	129:   949, /* HANGUL */ | ||||
| 	130:  1361, /* JOHAB */ | ||||
| 	134:   936, /* GB2312 */ | ||||
| 	136:   950, /* CHINESEBIG5 */ | ||||
| 	161:  1253, /* GREEK */ | ||||
| 	162:  1254, /* TURKISH */ | ||||
| 	163:  1258, /* VIETNAMESE */ | ||||
| 	177:  1255, /* HEBREW */ | ||||
| 	178:  1256, /* ARABIC */ | ||||
| 	186:  1257, /* BALTIC */ | ||||
| 	204:  1251, /* RUSSIAN */ | ||||
| 	222:   874, /* THAI */ | ||||
| 	238:  1250, /* EASTEUROPE */ | ||||
| 	255:  1252, /* OEM */ | ||||
| 	69:   6969  /* MISC */ | ||||
| }/*:any*/); | ||||
| 
 | ||||
| var set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; }; | ||||
|  | ||||
| @ -68,7 +68,12 @@ function Base64_encode_arr(input) { | ||||
| function Base64_decode(input) { | ||||
|   var o = ""; | ||||
|   var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; | ||||
|   input = input.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/, "").replace(/[^\w\+\/\=]/g, ""); | ||||
|   if (input.slice(0, 5) == "data:") { | ||||
|     var i = input.slice(0, 1024).indexOf(";base64,"); | ||||
|     if (i > -1) | ||||
|       input = input.slice(i + 8); | ||||
|   } | ||||
|   input = input.replace(/[^\w\+\/\=]/g, ""); | ||||
|   for (var i = 0; i < input.length; ) { | ||||
|     e1 = Base64_map.indexOf(input.charAt(i++)); | ||||
|     e2 = Base64_map.indexOf(input.charAt(i++)); | ||||
|  | ||||
| @ -57,7 +57,7 @@ function write_dl(fname/*:string*/, payload/*:any*/, enc/*:?string*/) { | ||||
| 		var out = File(fname); out.open("w"); out.encoding = "binary"; | ||||
| 		if(Array.isArray(payload)) payload = a2s(payload); | ||||
| 		out.write(payload); out.close(); return payload; | ||||
| 	} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; } | ||||
| 	} catch(e) { if(!e.message || e.message.indexOf("onstruct") == -1) throw e; } | ||||
| 	throw new Error("cannot save file " + fname); | ||||
| } | ||||
| 
 | ||||
| @ -71,6 +71,6 @@ function read_binary(path/*:string*/) { | ||||
| 		var infile = File(path); infile.open("r"); infile.encoding = "binary"; | ||||
| 		var data = infile.read(); infile.close(); | ||||
| 		return data; | ||||
| 	} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; } | ||||
| 	} catch(e) { if(!e.message || e.message.indexOf("onstruct") == -1) throw e; } | ||||
| 	throw new Error("Cannot access file " + path); | ||||
| } | ||||
|  | ||||
| @ -195,7 +195,7 @@ function fuzzydate(s/*:string*/)/*:Date*/ { | ||||
| 	M = lnos.match(FDRE2); | ||||
| 	if(M) return fuzzytime2(M); | ||||
| 	M = lnos.match(pdre3); | ||||
| 	if(M) return new Date(Date.UTC(+M[1], +M[2]-1, +M[3], +M[4], +M[5], ((M[6] && parseInt(M[6].slice(1), 10))|| 0), ((M[7] && parseInt(M[7].slice(1), 10))||0))); | ||||
| 	if(M) return new Date(Date.UTC(+M[1], +M[2]-1, +M[3], +M[4], +M[5], ((M[6] && parseInt(M[6].slice(1), 10))|| 0), ((M[7] && parseInt((M[7] + "0000").slice(1,4), 10))||0))); | ||||
| 	var o = new Date(utc_append_works && s.indexOf("UTC") == -1 ? s + " UTC": s), n = new Date(NaN); | ||||
| 	var y = o.getYear(), m = o.getMonth(), d = o.getDate(); | ||||
| 	if(isNaN(d)) return n; | ||||
| @ -223,3 +223,96 @@ function utc_to_local(utc) { | ||||
| function local_to_utc(local) { | ||||
| 	return new Date(Date.UTC(local.getFullYear(), local.getMonth(), local.getDate(), local.getHours(), local.getMinutes(), local.getSeconds(), local.getMilliseconds())); | ||||
| } | ||||
| 
 | ||||
| /* str.match(/<!--[\s\S]*?-->/g) --> str_match_ng(str, "<!--", "-->") */ | ||||
| function str_match_ng(str, s, e) { | ||||
|   var out = []; | ||||
| 
 | ||||
|   var si = str.indexOf(s); | ||||
|   while(si > -1) { | ||||
|     var ei = str.indexOf(e, si + s.length); | ||||
| 		if(ei == -1) break; | ||||
| 
 | ||||
| 		out.push(str.slice(si, ei + e.length)); | ||||
| 		si = str.indexOf(s, ei + e.length); | ||||
| 	} | ||||
| 
 | ||||
|   return out.length > 0 ? out : null; | ||||
| } | ||||
| 
 | ||||
| /* str.replace(/<!--[\s\S]*?-->/g, "") --> str_remove_ng(str, "<!--", "-->") */ | ||||
| function str_remove_ng(str, s, e) { | ||||
|   var out = [], last = 0; | ||||
| 
 | ||||
|   var si = str.indexOf(s); | ||||
| 	if(si == -1) return str; | ||||
|   while(si > -1) { | ||||
| 		out.push(str.slice(last, si)); | ||||
|     var ei = str.indexOf(e, si + s.length); | ||||
| 		if(ei == -1) break; | ||||
| 
 | ||||
| 		if((si = str.indexOf(s, (last = ei + e.length))) == -1) out.push(str.slice(last)); | ||||
| 	} | ||||
| 
 | ||||
|   return out.join(""); | ||||
| } | ||||
| 
 | ||||
| /* str.match(/<tag[^>]*?>([\s\S]*?)</tag>/) --> str_match_xml(str, "tag") */ | ||||
| function str_match_xml(str, tag) { | ||||
| 	var si = str.indexOf('<' + tag); | ||||
| 	if(si === -1) return null; | ||||
| 	var sf = str.indexOf(">", si); | ||||
| 	if(sf === -1) return null; | ||||
| 	var et = "</" + tag + ">"; | ||||
| 	var ei = str.indexOf(et, sf); | ||||
| 	if(ei == -1) return null; | ||||
| 	return [str.slice(si, ei + et.length), str.slice(sf + 1, ei)]; | ||||
| } | ||||
| 
 | ||||
| var str_match_xml_ns = /*#__PURE__*/(function() { | ||||
| 	var str_match_xml_ns_cache = {}; | ||||
| 	return function str_match_xml_ns(str, tag) { | ||||
| 		var res = str_match_xml_ns_cache[tag]; | ||||
| 		if(!res) str_match_xml_ns_cache[tag] = res = [ | ||||
| 			new RegExp('<(?:\\w+:)?'+tag+'[^>]*>', "g"), | ||||
| 			new RegExp('</(?:\\w+:)?'+tag+'>', "g") | ||||
| 		]; | ||||
| 		res[0].lastIndex = res[1].lastIndex = 0; | ||||
| 		var m = res[0].exec(str); | ||||
| 		if(!m) return null; | ||||
| 		var si = m.index; | ||||
| 		var sf = res[0].lastIndex; | ||||
| 		res[1].lastIndex = res[0].lastIndex; | ||||
| 		m = res[1].exec(str); | ||||
| 		if(!m) return null; | ||||
| 		var ei = m.index; | ||||
| 		var ef = res[1].lastIndex; | ||||
| 		return [str.slice(si, ef), str.slice(sf, ei)]; | ||||
| 	}; | ||||
| })(); | ||||
| 
 | ||||
| var str_match_xml_ns_g = /*#__PURE__*/(function() { | ||||
| 	var str_match_xml_ns_cache = {}; | ||||
| 	return function str_match_xml_ns(str, tag) { | ||||
| 		var out = []; | ||||
| 		var res = str_match_xml_ns_cache[tag]; | ||||
| 		if(!res) str_match_xml_ns_cache[tag] = res = [ | ||||
| 			new RegExp('<(?:\\w+:)?'+tag+'[^>]*>', "g"), | ||||
| 			new RegExp('</(?:\\w+:)?'+tag+'>', "g") | ||||
| 		]; | ||||
| 		res[0].lastIndex = res[1].lastIndex = 0; | ||||
| 		var m; | ||||
| 		while((m = res[0].exec(str))) { | ||||
| 			var si = m.index; | ||||
| 			var sf = res[0].lastIndex; | ||||
| 			res[1].lastIndex = res[0].lastIndex; | ||||
| 			m = res[1].exec(str); | ||||
| 			if(!m) return null; | ||||
| 			var ei = m.index; | ||||
| 			var ef = res[1].lastIndex; | ||||
| 			out.push(str.slice(si, ef)); | ||||
| 			res[0].lastIndex = res[1].lastIndex; | ||||
| 		} | ||||
| 		return out.length == 0 ? null : out; | ||||
| 	}; | ||||
| })(); | ||||
|  | ||||
| @ -161,16 +161,6 @@ var utf8write/*:StringConv*/ = has_buf ? function(data) { return Buffer_from(dat | ||||
| 	return out.join(""); | ||||
| }; | ||||
| 
 | ||||
| // matches <foo>...</foo> extracts content
 | ||||
| var matchtag = /*#__PURE__*/(function() { | ||||
| 	var mtcache/*:{[k:string]:RegExp}*/ = ({}/*:any*/); | ||||
| 	return function matchtag(f/*:string*/,g/*:?string*/)/*:RegExp*/ { | ||||
| 		var t = f+"|"+(g||""); | ||||
| 		if(mtcache[t]) return mtcache[t]; | ||||
| 		return (mtcache[t] = new RegExp('<(?:\\w+:)?'+f+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+f+'>',((g||"")/*:any*/))); | ||||
| 	}; | ||||
| })(); | ||||
| 
 | ||||
| var htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() { | ||||
| 	var entities/*:Array<[RegExp, string]>*/ = [ | ||||
| 		['nbsp', ' '], ['middot', '·'], | ||||
| @ -195,16 +185,11 @@ var htmldecode/*:{(s:string):string}*/ = /*#__PURE__*/(function() { | ||||
| 	}; | ||||
| })(); | ||||
| 
 | ||||
| var vtregex = /*#__PURE__*/(function(){ var vt_cache = {}; | ||||
| 	return function vt_regex(bt) { | ||||
| 		if(vt_cache[bt] !== undefined) return vt_cache[bt]; | ||||
| 		return (vt_cache[bt] = new RegExp("<(?:vt:)?" + bt + ">([\\s\\S]*?)</(?:vt:)?" + bt + ">", 'g') ); | ||||
| };})(); | ||||
| var vtvregex = /<\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^>]*)>([\s\S]*)</; | ||||
| function parseVector(data/*:string*/, opts)/*:Array<{v:string,t:string}>*/ { | ||||
| 	var h = parsexmltag(data); | ||||
| 
 | ||||
| 	var matches/*:Array<string>*/ = data.match(vtregex(h.baseType))||[]; | ||||
| 	var matches/*:Array<string>*/ = str_match_xml_ns_g(data, h.baseType)||[]; | ||||
| 	var res/*:Array<any>*/ = []; | ||||
| 	if(matches.length != h.size) { | ||||
| 		if(opts.WTF) throw new Error("unexpected vector length " + matches.length + " != " + h.size); | ||||
|  | ||||
| @ -44,118 +44,118 @@ var VT_CUSTOM   = [VT_STRING, VT_USTR]; | ||||
| 
 | ||||
| /* [MS-OSHARED] 2.3.3.2.2.1 Document Summary Information PIDDSI */ | ||||
| var DocSummaryPIDDSI = { | ||||
| 	/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 }, | ||||
| 	/*::[*/0x02/*::]*/: { n: 'Category', t: VT_STRING }, | ||||
| 	/*::[*/0x03/*::]*/: { n: 'PresentationFormat', t: VT_STRING }, | ||||
| 	/*::[*/0x04/*::]*/: { n: 'ByteCount', t: VT_I4 }, | ||||
| 	/*::[*/0x05/*::]*/: { n: 'LineCount', t: VT_I4 }, | ||||
| 	/*::[*/0x06/*::]*/: { n: 'ParagraphCount', t: VT_I4 }, | ||||
| 	/*::[*/0x07/*::]*/: { n: 'SlideCount', t: VT_I4 }, | ||||
| 	/*::[*/0x08/*::]*/: { n: 'NoteCount', t: VT_I4 }, | ||||
| 	/*::[*/0x09/*::]*/: { n: 'HiddenCount', t: VT_I4 }, | ||||
| 	/*::[*/0x0a/*::]*/: { n: 'MultimediaClipCount', t: VT_I4 }, | ||||
| 	/*::[*/0x0b/*::]*/: { n: 'ScaleCrop', t: VT_BOOL }, | ||||
| 	/*::[*/0x0c/*::]*/: { n: 'HeadingPairs', t: VT_VECTOR_VARIANT /* VT_VECTOR | VT_VARIANT */ }, | ||||
| 	/*::[*/0x0d/*::]*/: { n: 'TitlesOfParts', t: VT_VECTOR_LPSTR /* VT_VECTOR | VT_LPSTR */ }, | ||||
| 	/*::[*/0x0e/*::]*/: { n: 'Manager', t: VT_STRING }, | ||||
| 	/*::[*/0x0f/*::]*/: { n: 'Company', t: VT_STRING }, | ||||
| 	/*::[*/0x10/*::]*/: { n: 'LinksUpToDate', t: VT_BOOL }, | ||||
| 	/*::[*/0x11/*::]*/: { n: 'CharacterCount', t: VT_I4 }, | ||||
| 	/*::[*/0x13/*::]*/: { n: 'SharedDoc', t: VT_BOOL }, | ||||
| 	/*::[*/0x16/*::]*/: { n: 'HyperlinksChanged', t: VT_BOOL }, | ||||
| 	/*::[*/0x17/*::]*/: { n: 'AppVersion', t: VT_I4, p: 'version' }, | ||||
| 	/*::[*/0x18/*::]*/: { n: 'DigSig', t: VT_BLOB }, | ||||
| 	/*::[*/0x1A/*::]*/: { n: 'ContentType', t: VT_STRING }, | ||||
| 	/*::[*/0x1B/*::]*/: { n: 'ContentStatus', t: VT_STRING }, | ||||
| 	/*::[*/0x1C/*::]*/: { n: 'Language', t: VT_STRING }, | ||||
| 	/*::[*/0x1D/*::]*/: { n: 'Version', t: VT_STRING }, | ||||
| 	/*::[*/0xFF/*::]*/: {}, | ||||
| 	0x01: { n: 'CodePage', t: VT_I2 }, | ||||
| 	0x02: { n: 'Category', t: VT_STRING }, | ||||
| 	0x03: { n: 'PresentationFormat', t: VT_STRING }, | ||||
| 	0x04: { n: 'ByteCount', t: VT_I4 }, | ||||
| 	0x05: { n: 'LineCount', t: VT_I4 }, | ||||
| 	0x06: { n: 'ParagraphCount', t: VT_I4 }, | ||||
| 	0x07: { n: 'SlideCount', t: VT_I4 }, | ||||
| 	0x08: { n: 'NoteCount', t: VT_I4 }, | ||||
| 	0x09: { n: 'HiddenCount', t: VT_I4 }, | ||||
| 	0x0a: { n: 'MultimediaClipCount', t: VT_I4 }, | ||||
| 	0x0b: { n: 'ScaleCrop', t: VT_BOOL }, | ||||
| 	0x0c: { n: 'HeadingPairs', t: VT_VECTOR_VARIANT /* VT_VECTOR | VT_VARIANT */ }, | ||||
| 	0x0d: { n: 'TitlesOfParts', t: VT_VECTOR_LPSTR /* VT_VECTOR | VT_LPSTR */ }, | ||||
| 	0x0e: { n: 'Manager', t: VT_STRING }, | ||||
| 	0x0f: { n: 'Company', t: VT_STRING }, | ||||
| 	0x10: { n: 'LinksUpToDate', t: VT_BOOL }, | ||||
| 	0x11: { n: 'CharacterCount', t: VT_I4 }, | ||||
| 	0x13: { n: 'SharedDoc', t: VT_BOOL }, | ||||
| 	0x16: { n: 'HyperlinksChanged', t: VT_BOOL }, | ||||
| 	0x17: { n: 'AppVersion', t: VT_I4, p: 'version' }, | ||||
| 	0x18: { n: 'DigSig', t: VT_BLOB }, | ||||
| 	0x1A: { n: 'ContentType', t: VT_STRING }, | ||||
| 	0x1B: { n: 'ContentStatus', t: VT_STRING }, | ||||
| 	0x1C: { n: 'Language', t: VT_STRING }, | ||||
| 	0x1D: { n: 'Version', t: VT_STRING }, | ||||
| 	0xFF: {}, | ||||
| 	/* [MS-OLEPS] 2.18 */ | ||||
| 	/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 }, | ||||
| 	/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 }, | ||||
| 	/*::[*/0x72627262/*::]*/: {} | ||||
| 	0x80000000: { n: 'Locale', t: VT_UI4 }, | ||||
| 	0x80000003: { n: 'Behavior', t: VT_UI4 }, | ||||
| 	0x72627262: {} | ||||
| }; | ||||
| 
 | ||||
| /* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */ | ||||
| var SummaryPIDSI = { | ||||
| 	/*::[*/0x01/*::]*/: { n: 'CodePage', t: VT_I2 }, | ||||
| 	/*::[*/0x02/*::]*/: { n: 'Title', t: VT_STRING }, | ||||
| 	/*::[*/0x03/*::]*/: { n: 'Subject', t: VT_STRING }, | ||||
| 	/*::[*/0x04/*::]*/: { n: 'Author', t: VT_STRING }, | ||||
| 	/*::[*/0x05/*::]*/: { n: 'Keywords', t: VT_STRING }, | ||||
| 	/*::[*/0x06/*::]*/: { n: 'Comments', t: VT_STRING }, | ||||
| 	/*::[*/0x07/*::]*/: { n: 'Template', t: VT_STRING }, | ||||
| 	/*::[*/0x08/*::]*/: { n: 'LastAuthor', t: VT_STRING }, | ||||
| 	/*::[*/0x09/*::]*/: { n: 'RevNumber', t: VT_STRING }, | ||||
| 	/*::[*/0x0A/*::]*/: { n: 'EditTime', t: VT_FILETIME }, | ||||
| 	/*::[*/0x0B/*::]*/: { n: 'LastPrinted', t: VT_FILETIME }, | ||||
| 	/*::[*/0x0C/*::]*/: { n: 'CreatedDate', t: VT_FILETIME }, | ||||
| 	/*::[*/0x0D/*::]*/: { n: 'ModifiedDate', t: VT_FILETIME }, | ||||
| 	/*::[*/0x0E/*::]*/: { n: 'PageCount', t: VT_I4 }, | ||||
| 	/*::[*/0x0F/*::]*/: { n: 'WordCount', t: VT_I4 }, | ||||
| 	/*::[*/0x10/*::]*/: { n: 'CharCount', t: VT_I4 }, | ||||
| 	/*::[*/0x11/*::]*/: { n: 'Thumbnail', t: VT_CF }, | ||||
| 	/*::[*/0x12/*::]*/: { n: 'Application', t: VT_STRING }, | ||||
| 	/*::[*/0x13/*::]*/: { n: 'DocSecurity', t: VT_I4 }, | ||||
| 	/*::[*/0xFF/*::]*/: {}, | ||||
| 	0x01: { n: 'CodePage', t: VT_I2 }, | ||||
| 	0x02: { n: 'Title', t: VT_STRING }, | ||||
| 	0x03: { n: 'Subject', t: VT_STRING }, | ||||
| 	0x04: { n: 'Author', t: VT_STRING }, | ||||
| 	0x05: { n: 'Keywords', t: VT_STRING }, | ||||
| 	0x06: { n: 'Comments', t: VT_STRING }, | ||||
| 	0x07: { n: 'Template', t: VT_STRING }, | ||||
| 	0x08: { n: 'LastAuthor', t: VT_STRING }, | ||||
| 	0x09: { n: 'RevNumber', t: VT_STRING }, | ||||
| 	0x0A: { n: 'EditTime', t: VT_FILETIME }, | ||||
| 	0x0B: { n: 'LastPrinted', t: VT_FILETIME }, | ||||
| 	0x0C: { n: 'CreatedDate', t: VT_FILETIME }, | ||||
| 	0x0D: { n: 'ModifiedDate', t: VT_FILETIME }, | ||||
| 	0x0E: { n: 'PageCount', t: VT_I4 }, | ||||
| 	0x0F: { n: 'WordCount', t: VT_I4 }, | ||||
| 	0x10: { n: 'CharCount', t: VT_I4 }, | ||||
| 	0x11: { n: 'Thumbnail', t: VT_CF }, | ||||
| 	0x12: { n: 'Application', t: VT_STRING }, | ||||
| 	0x13: { n: 'DocSecurity', t: VT_I4 }, | ||||
| 	0xFF: {}, | ||||
| 	/* [MS-OLEPS] 2.18 */ | ||||
| 	/*::[*/0x80000000/*::]*/: { n: 'Locale', t: VT_UI4 }, | ||||
| 	/*::[*/0x80000003/*::]*/: { n: 'Behavior', t: VT_UI4 }, | ||||
| 	/*::[*/0x72627262/*::]*/: {} | ||||
| 	0x80000000: { n: 'Locale', t: VT_UI4 }, | ||||
| 	0x80000003: { n: 'Behavior', t: VT_UI4 }, | ||||
| 	0x72627262: {} | ||||
| }; | ||||
| 
 | ||||
| /* [MS-XLS] 2.4.63 Country/Region codes */ | ||||
| var CountryEnum = { | ||||
| 	/*::[*/0x0001/*::]*/: "US", // United States
 | ||||
| 	/*::[*/0x0002/*::]*/: "CA", // Canada
 | ||||
| 	/*::[*/0x0003/*::]*/: "", // Latin America (except Brazil)
 | ||||
| 	/*::[*/0x0007/*::]*/: "RU", // Russia
 | ||||
| 	/*::[*/0x0014/*::]*/: "EG", // Egypt
 | ||||
| 	/*::[*/0x001E/*::]*/: "GR", // Greece
 | ||||
| 	/*::[*/0x001F/*::]*/: "NL", // Netherlands
 | ||||
| 	/*::[*/0x0020/*::]*/: "BE", // Belgium
 | ||||
| 	/*::[*/0x0021/*::]*/: "FR", // France
 | ||||
| 	/*::[*/0x0022/*::]*/: "ES", // Spain
 | ||||
| 	/*::[*/0x0024/*::]*/: "HU", // Hungary
 | ||||
| 	/*::[*/0x0027/*::]*/: "IT", // Italy
 | ||||
| 	/*::[*/0x0029/*::]*/: "CH", // Switzerland
 | ||||
| 	/*::[*/0x002B/*::]*/: "AT", // Austria
 | ||||
| 	/*::[*/0x002C/*::]*/: "GB", // United Kingdom
 | ||||
| 	/*::[*/0x002D/*::]*/: "DK", // Denmark
 | ||||
| 	/*::[*/0x002E/*::]*/: "SE", // Sweden
 | ||||
| 	/*::[*/0x002F/*::]*/: "NO", // Norway
 | ||||
| 	/*::[*/0x0030/*::]*/: "PL", // Poland
 | ||||
| 	/*::[*/0x0031/*::]*/: "DE", // Germany
 | ||||
| 	/*::[*/0x0034/*::]*/: "MX", // Mexico
 | ||||
| 	/*::[*/0x0037/*::]*/: "BR", // Brazil
 | ||||
| 	/*::[*/0x003d/*::]*/: "AU", // Australia
 | ||||
| 	/*::[*/0x0040/*::]*/: "NZ", // New Zealand
 | ||||
| 	/*::[*/0x0042/*::]*/: "TH", // Thailand
 | ||||
| 	/*::[*/0x0051/*::]*/: "JP", // Japan
 | ||||
| 	/*::[*/0x0052/*::]*/: "KR", // Korea
 | ||||
| 	/*::[*/0x0054/*::]*/: "VN", // Viet Nam
 | ||||
| 	/*::[*/0x0056/*::]*/: "CN", // China
 | ||||
| 	/*::[*/0x005A/*::]*/: "TR", // Turkey
 | ||||
| 	/*::[*/0x0069/*::]*/: "JS", // Ramastan
 | ||||
| 	/*::[*/0x00D5/*::]*/: "DZ", // Algeria
 | ||||
| 	/*::[*/0x00D8/*::]*/: "MA", // Morocco
 | ||||
| 	/*::[*/0x00DA/*::]*/: "LY", // Libya
 | ||||
| 	/*::[*/0x015F/*::]*/: "PT", // Portugal
 | ||||
| 	/*::[*/0x0162/*::]*/: "IS", // Iceland
 | ||||
| 	/*::[*/0x0166/*::]*/: "FI", // Finland
 | ||||
| 	/*::[*/0x01A4/*::]*/: "CZ", // Czech Republic
 | ||||
| 	/*::[*/0x0376/*::]*/: "TW", // Taiwan
 | ||||
| 	/*::[*/0x03C1/*::]*/: "LB", // Lebanon
 | ||||
| 	/*::[*/0x03C2/*::]*/: "JO", // Jordan
 | ||||
| 	/*::[*/0x03C3/*::]*/: "SY", // Syria
 | ||||
| 	/*::[*/0x03C4/*::]*/: "IQ", // Iraq
 | ||||
| 	/*::[*/0x03C5/*::]*/: "KW", // Kuwait
 | ||||
| 	/*::[*/0x03C6/*::]*/: "SA", // Saudi Arabia
 | ||||
| 	/*::[*/0x03CB/*::]*/: "AE", // United Arab Emirates
 | ||||
| 	/*::[*/0x03CC/*::]*/: "IL", // Israel
 | ||||
| 	/*::[*/0x03CE/*::]*/: "QA", // Qatar
 | ||||
| 	/*::[*/0x03D5/*::]*/: "IR", // Iran
 | ||||
| 	/*::[*/0xFFFF/*::]*/: "US"  // United States
 | ||||
| 	0x0001: "US", // United States
 | ||||
| 	0x0002: "CA", // Canada
 | ||||
| 	0x0003: "", // Latin America (except Brazil)
 | ||||
| 	0x0007: "RU", // Russia
 | ||||
| 	0x0014: "EG", // Egypt
 | ||||
| 	0x001E: "GR", // Greece
 | ||||
| 	0x001F: "NL", // Netherlands
 | ||||
| 	0x0020: "BE", // Belgium
 | ||||
| 	0x0021: "FR", // France
 | ||||
| 	0x0022: "ES", // Spain
 | ||||
| 	0x0024: "HU", // Hungary
 | ||||
| 	0x0027: "IT", // Italy
 | ||||
| 	0x0029: "CH", // Switzerland
 | ||||
| 	0x002B: "AT", // Austria
 | ||||
| 	0x002C: "GB", // United Kingdom
 | ||||
| 	0x002D: "DK", // Denmark
 | ||||
| 	0x002E: "SE", // Sweden
 | ||||
| 	0x002F: "NO", // Norway
 | ||||
| 	0x0030: "PL", // Poland
 | ||||
| 	0x0031: "DE", // Germany
 | ||||
| 	0x0034: "MX", // Mexico
 | ||||
| 	0x0037: "BR", // Brazil
 | ||||
| 	0x003d: "AU", // Australia
 | ||||
| 	0x0040: "NZ", // New Zealand
 | ||||
| 	0x0042: "TH", // Thailand
 | ||||
| 	0x0051: "JP", // Japan
 | ||||
| 	0x0052: "KR", // Korea
 | ||||
| 	0x0054: "VN", // Viet Nam
 | ||||
| 	0x0056: "CN", // China
 | ||||
| 	0x005A: "TR", // Turkey
 | ||||
| 	0x0069: "JS", // Ramastan
 | ||||
| 	0x00D5: "DZ", // Algeria
 | ||||
| 	0x00D8: "MA", // Morocco
 | ||||
| 	0x00DA: "LY", // Libya
 | ||||
| 	0x015F: "PT", // Portugal
 | ||||
| 	0x0162: "IS", // Iceland
 | ||||
| 	0x0166: "FI", // Finland
 | ||||
| 	0x01A4: "CZ", // Czech Republic
 | ||||
| 	0x0376: "TW", // Taiwan
 | ||||
| 	0x03C1: "LB", // Lebanon
 | ||||
| 	0x03C2: "JO", // Jordan
 | ||||
| 	0x03C3: "SY", // Syria
 | ||||
| 	0x03C4: "IQ", // Iraq
 | ||||
| 	0x03C5: "KW", // Kuwait
 | ||||
| 	0x03C6: "SA", // Saudi Arabia
 | ||||
| 	0x03CB: "AE", // United Arab Emirates
 | ||||
| 	0x03CC: "IL", // Israel
 | ||||
| 	0x03CE: "QA", // Qatar
 | ||||
| 	0x03D5: "IR", // Iran
 | ||||
| 	0xFFFF: "US"  // United States
 | ||||
| }; | ||||
| 
 | ||||
| /* [MS-XLS] 2.5.127 */ | ||||
| @ -281,15 +281,15 @@ var XLSIcv = /*#__PURE__*/dup(_XLSIcv); | ||||
| 
 | ||||
| /* [MS-XLSB] 2.5.97.2 */ | ||||
| var BErr = { | ||||
| 	/*::[*/0x00/*::]*/: "#NULL!", | ||||
| 	/*::[*/0x07/*::]*/: "#DIV/0!", | ||||
| 	/*::[*/0x0F/*::]*/: "#VALUE!", | ||||
| 	/*::[*/0x17/*::]*/: "#REF!", | ||||
| 	/*::[*/0x1D/*::]*/: "#NAME?", | ||||
| 	/*::[*/0x24/*::]*/: "#NUM!", | ||||
| 	/*::[*/0x2A/*::]*/: "#N/A", | ||||
| 	/*::[*/0x2B/*::]*/: "#GETTING_DATA", | ||||
| 	/*::[*/0xFF/*::]*/: "#WTF?" | ||||
| 	0x00: "#NULL!", | ||||
| 	0x07: "#DIV/0!", | ||||
| 	0x0F: "#VALUE!", | ||||
| 	0x17: "#REF!", | ||||
| 	0x1D: "#NAME?", | ||||
| 	0x24: "#NUM!", | ||||
| 	0x2A: "#N/A", | ||||
| 	0x2B: "#GETTING_DATA", | ||||
| 	0xFF: "#WTF?" | ||||
| }; | ||||
| //var RBErr = evert_num(BErr);
 | ||||
| var RBErr = { | ||||
|  | ||||
| @ -18,22 +18,12 @@ var CORE_PROPS/*:Array<Array<string> >*/ = [ | ||||
| 	["dcterms:modified", "ModifiedDate", 'date'] | ||||
| ]; | ||||
| 
 | ||||
| var CORE_PROPS_REGEX/*:Array<RegExp>*/ = /*#__PURE__*/(function() { | ||||
| 	var r = new Array(CORE_PROPS.length); | ||||
| 	for(var i = 0; i < CORE_PROPS.length; ++i) { | ||||
| 		var f = CORE_PROPS[i]; | ||||
| 		var g = "(?:"+ f[0].slice(0,f[0].indexOf(":")) +":)"+ f[0].slice(f[0].indexOf(":")+1); | ||||
| 		r[i] = new RegExp("<" + g + "[^>]*>([\\s\\S]*?)<\/" + g + ">"); | ||||
| 	} | ||||
| 	return r; | ||||
| })(); | ||||
| 
 | ||||
| function parse_core_props(data) { | ||||
| 	var p = {}; | ||||
| 	data = utf8read(data); | ||||
| 
 | ||||
| 	for(var i = 0; i < CORE_PROPS.length; ++i) { | ||||
| 		var f = CORE_PROPS[i], cur = data.match(CORE_PROPS_REGEX[i]); | ||||
| 		var f = CORE_PROPS[i], cur = str_match_xml(data, f[0]); | ||||
| 		if(cur != null && cur.length > 0) p[f[1]] = unescapexml(cur[1]); | ||||
| 		if(f[2] === 'date' && p[f[1]]) p[f[1]] = parseDate(p[f[1]]); | ||||
| 	} | ||||
|  | ||||
| @ -71,12 +71,12 @@ function parse_ext_props(data, p, opts) { | ||||
| 	data = utf8read(data); | ||||
| 
 | ||||
| 	EXT_PROPS.forEach(function(f) { | ||||
| 		var xml = (data.match(matchtag(f[0]))||[])[1]; | ||||
| 		var xml = (str_match_xml_ns(data, f[0])||[])[1]; | ||||
| 		switch(f[2]) { | ||||
| 			case "string": if(xml) p[f[1]] = unescapexml(xml); break; | ||||
| 			case "bool": p[f[1]] = xml === "true"; break; | ||||
| 			case "raw": | ||||
| 				var cur = data.match(new RegExp("<" + f[0] + "[^>]*>([\\s\\S]*?)<\/" + f[0] + ">")); | ||||
| 				var cur = str_match_xml(data, f[0]); | ||||
| 				if(cur && cur.length > 0) q[f[1]] = cur[1]; | ||||
| 				break; | ||||
| 		} | ||||
|  | ||||
| @ -122,25 +122,25 @@ function parse_FtCf(blob) { | ||||
| /* [MS-XLS] 2.5.140 - 2.5.154 and friends */ | ||||
| function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); } | ||||
| var FtTab = { | ||||
| 	/*::[*/0x00/*::]*/: parse_FtSkip,      /* FtEnd */ | ||||
| 	/*::[*/0x04/*::]*/: parse_FtSkip,      /* FtMacro */ | ||||
| 	/*::[*/0x05/*::]*/: parse_FtSkip,      /* FtButton */ | ||||
| 	/*::[*/0x06/*::]*/: parse_FtSkip,      /* FtGmo */ | ||||
| 	/*::[*/0x07/*::]*/: parse_FtCf,        /* FtCf */ | ||||
| 	/*::[*/0x08/*::]*/: parse_FtSkip,      /* FtPioGrbit */ | ||||
| 	/*::[*/0x09/*::]*/: parse_FtSkip,      /* FtPictFmla */ | ||||
| 	/*::[*/0x0A/*::]*/: parse_FtSkip,      /* FtCbls */ | ||||
| 	/*::[*/0x0B/*::]*/: parse_FtSkip,      /* FtRbo */ | ||||
| 	/*::[*/0x0C/*::]*/: parse_FtSkip,      /* FtSbs */ | ||||
| 	/*::[*/0x0D/*::]*/: parse_FtNts,       /* FtNts */ | ||||
| 	/*::[*/0x0E/*::]*/: parse_FtSkip,      /* FtSbsFmla */ | ||||
| 	/*::[*/0x0F/*::]*/: parse_FtSkip,      /* FtGboData */ | ||||
| 	/*::[*/0x10/*::]*/: parse_FtSkip,      /* FtEdoData */ | ||||
| 	/*::[*/0x11/*::]*/: parse_FtSkip,      /* FtRboData */ | ||||
| 	/*::[*/0x12/*::]*/: parse_FtSkip,      /* FtCblsData */ | ||||
| 	/*::[*/0x13/*::]*/: parse_FtSkip,      /* FtLbsData */ | ||||
| 	/*::[*/0x14/*::]*/: parse_FtSkip,      /* FtCblsFmla */ | ||||
| 	/*::[*/0x15/*::]*/: parse_FtCmo | ||||
| 	0x00: parse_FtSkip,      /* FtEnd */ | ||||
| 	0x04: parse_FtSkip,      /* FtMacro */ | ||||
| 	0x05: parse_FtSkip,      /* FtButton */ | ||||
| 	0x06: parse_FtSkip,      /* FtGmo */ | ||||
| 	0x07: parse_FtCf,        /* FtCf */ | ||||
| 	0x08: parse_FtSkip,      /* FtPioGrbit */ | ||||
| 	0x09: parse_FtSkip,      /* FtPictFmla */ | ||||
| 	0x0A: parse_FtSkip,      /* FtCbls */ | ||||
| 	0x0B: parse_FtSkip,      /* FtRbo */ | ||||
| 	0x0C: parse_FtSkip,      /* FtSbs */ | ||||
| 	0x0D: parse_FtNts,       /* FtNts */ | ||||
| 	0x0E: parse_FtSkip,      /* FtSbsFmla */ | ||||
| 	0x0F: parse_FtSkip,      /* FtGboData */ | ||||
| 	0x10: parse_FtSkip,      /* FtEdoData */ | ||||
| 	0x11: parse_FtSkip,      /* FtRboData */ | ||||
| 	0x12: parse_FtSkip,      /* FtCblsData */ | ||||
| 	0x13: parse_FtSkip,      /* FtLbsData */ | ||||
| 	0x14: parse_FtSkip,      /* FtCblsFmla */ | ||||
| 	0x15: parse_FtCmo | ||||
| }; | ||||
| function parse_FtArray(blob, length/*::, ot*/) { | ||||
| 	var tgt = blob.l + length; | ||||
|  | ||||
							
								
								
									
										120
									
								
								bits/40_harb.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										120
									
								
								bits/40_harb.js
									
									
									
									
									
								
							| @ -2,60 +2,60 @@ var DBF_SUPPORTED_VERSIONS = [0x02, 0x03, 0x30, 0x31, 0x83, 0x8B, 0x8C, 0xF5]; | ||||
| var DBF = /*#__PURE__*/(function() { | ||||
| var dbf_codepage_map = { | ||||
| 	/* Code Pages Supported by Visual FoxPro */ | ||||
| 	/*::[*/0x01/*::]*/:   437,           /*::[*/0x02/*::]*/:   850, | ||||
| 	/*::[*/0x03/*::]*/:  1252,           /*::[*/0x04/*::]*/: 10000, | ||||
| 	/*::[*/0x64/*::]*/:   852,           /*::[*/0x65/*::]*/:   866, | ||||
| 	/*::[*/0x66/*::]*/:   865,           /*::[*/0x67/*::]*/:   861, | ||||
| 	/*::[*/0x68/*::]*/:   895,           /*::[*/0x69/*::]*/:   620, | ||||
| 	/*::[*/0x6A/*::]*/:   737,           /*::[*/0x6B/*::]*/:   857, | ||||
| 	/*::[*/0x78/*::]*/:   950,           /*::[*/0x79/*::]*/:   949, | ||||
| 	/*::[*/0x7A/*::]*/:   936,           /*::[*/0x7B/*::]*/:   932, | ||||
| 	/*::[*/0x7C/*::]*/:   874,           /*::[*/0x7D/*::]*/:  1255, | ||||
| 	/*::[*/0x7E/*::]*/:  1256,           /*::[*/0x96/*::]*/: 10007, | ||||
| 	/*::[*/0x97/*::]*/: 10029,           /*::[*/0x98/*::]*/: 10006, | ||||
| 	/*::[*/0xC8/*::]*/:  1250,           /*::[*/0xC9/*::]*/:  1251, | ||||
| 	/*::[*/0xCA/*::]*/:  1254,           /*::[*/0xCB/*::]*/:  1253, | ||||
| 	0x01:   437,           0x02:   850, | ||||
| 	0x03:  1252,           0x04: 10000, | ||||
| 	0x64:   852,           0x65:   866, | ||||
| 	0x66:   865,           0x67:   861, | ||||
| 	0x68:   895,           0x69:   620, | ||||
| 	0x6A:   737,           0x6B:   857, | ||||
| 	0x78:   950,           0x79:   949, | ||||
| 	0x7A:   936,           0x7B:   932, | ||||
| 	0x7C:   874,           0x7D:  1255, | ||||
| 	0x7E:  1256,           0x96: 10007, | ||||
| 	0x97: 10029,           0x98: 10006, | ||||
| 	0xC8:  1250,           0xC9:  1251, | ||||
| 	0xCA:  1254,           0xCB:  1253, | ||||
| 
 | ||||
| 	/* shapefile DBF extension */ | ||||
| 	/*::[*/0x00/*::]*/: 20127,           /*::[*/0x08/*::]*/:   865, | ||||
| 	/*::[*/0x09/*::]*/:   437,           /*::[*/0x0A/*::]*/:   850, | ||||
| 	/*::[*/0x0B/*::]*/:   437,           /*::[*/0x0D/*::]*/:   437, | ||||
| 	/*::[*/0x0E/*::]*/:   850,           /*::[*/0x0F/*::]*/:   437, | ||||
| 	/*::[*/0x10/*::]*/:   850,           /*::[*/0x11/*::]*/:   437, | ||||
| 	/*::[*/0x12/*::]*/:   850,           /*::[*/0x13/*::]*/:   932, | ||||
| 	/*::[*/0x14/*::]*/:   850,           /*::[*/0x15/*::]*/:   437, | ||||
| 	/*::[*/0x16/*::]*/:   850,           /*::[*/0x17/*::]*/:   865, | ||||
| 	/*::[*/0x18/*::]*/:   437,           /*::[*/0x19/*::]*/:   437, | ||||
| 	/*::[*/0x1A/*::]*/:   850,           /*::[*/0x1B/*::]*/:   437, | ||||
| 	/*::[*/0x1C/*::]*/:   863,           /*::[*/0x1D/*::]*/:   850, | ||||
| 	/*::[*/0x1F/*::]*/:   852,           /*::[*/0x22/*::]*/:   852, | ||||
| 	/*::[*/0x23/*::]*/:   852,           /*::[*/0x24/*::]*/:   860, | ||||
| 	/*::[*/0x25/*::]*/:   850,           /*::[*/0x26/*::]*/:   866, | ||||
| 	/*::[*/0x37/*::]*/:   850,           /*::[*/0x40/*::]*/:   852, | ||||
| 	/*::[*/0x4D/*::]*/:   936,           /*::[*/0x4E/*::]*/:   949, | ||||
| 	/*::[*/0x4F/*::]*/:   950,           /*::[*/0x50/*::]*/:   874, | ||||
| 	/*::[*/0x57/*::]*/:  1252,           /*::[*/0x58/*::]*/:  1252, | ||||
| 	/*::[*/0x59/*::]*/:  1252,           /*::[*/0x6C/*::]*/:   863, | ||||
| 	/*::[*/0x86/*::]*/:   737,           /*::[*/0x87/*::]*/:   852, | ||||
| 	/*::[*/0x88/*::]*/:   857,           /*::[*/0xCC/*::]*/:  1257, | ||||
| 	0x00: 20127,           0x08:   865, | ||||
| 	0x09:   437,           0x0A:   850, | ||||
| 	0x0B:   437,           0x0D:   437, | ||||
| 	0x0E:   850,           0x0F:   437, | ||||
| 	0x10:   850,           0x11:   437, | ||||
| 	0x12:   850,           0x13:   932, | ||||
| 	0x14:   850,           0x15:   437, | ||||
| 	0x16:   850,           0x17:   865, | ||||
| 	0x18:   437,           0x19:   437, | ||||
| 	0x1A:   850,           0x1B:   437, | ||||
| 	0x1C:   863,           0x1D:   850, | ||||
| 	0x1F:   852,           0x22:   852, | ||||
| 	0x23:   852,           0x24:   860, | ||||
| 	0x25:   850,           0x26:   866, | ||||
| 	0x37:   850,           0x40:   852, | ||||
| 	0x4D:   936,           0x4E:   949, | ||||
| 	0x4F:   950,           0x50:   874, | ||||
| 	0x57:  1252,           0x58:  1252, | ||||
| 	0x59:  1252,           0x6C:   863, | ||||
| 	0x86:   737,           0x87:   852, | ||||
| 	0x88:   857,           0xCC:  1257, | ||||
| 
 | ||||
| 	/*::[*/0xFF/*::]*/: 16969 | ||||
| 	0xFF: 16969 | ||||
| }; | ||||
| var dbf_reverse_map = evert({ | ||||
| 	/*::[*/0x01/*::]*/:   437,           /*::[*/0x02/*::]*/:   850, | ||||
| 	/*::[*/0x03/*::]*/:  1252,           /*::[*/0x04/*::]*/: 10000, | ||||
| 	/*::[*/0x64/*::]*/:   852,           /*::[*/0x65/*::]*/:   866, | ||||
| 	/*::[*/0x66/*::]*/:   865,           /*::[*/0x67/*::]*/:   861, | ||||
| 	/*::[*/0x68/*::]*/:   895,           /*::[*/0x69/*::]*/:   620, | ||||
| 	/*::[*/0x6A/*::]*/:   737,           /*::[*/0x6B/*::]*/:   857, | ||||
| 	/*::[*/0x78/*::]*/:   950,           /*::[*/0x79/*::]*/:   949, | ||||
| 	/*::[*/0x7A/*::]*/:   936,           /*::[*/0x7B/*::]*/:   932, | ||||
| 	/*::[*/0x7C/*::]*/:   874,           /*::[*/0x7D/*::]*/:  1255, | ||||
| 	/*::[*/0x7E/*::]*/:  1256,           /*::[*/0x96/*::]*/: 10007, | ||||
| 	/*::[*/0x97/*::]*/: 10029,           /*::[*/0x98/*::]*/: 10006, | ||||
| 	/*::[*/0xC8/*::]*/:  1250,           /*::[*/0xC9/*::]*/:  1251, | ||||
| 	/*::[*/0xCA/*::]*/:  1254,           /*::[*/0xCB/*::]*/:  1253, | ||||
| 	/*::[*/0x00/*::]*/: 20127 | ||||
| 	0x01:   437,           0x02:   850, | ||||
| 	0x03:  1252,           0x04: 10000, | ||||
| 	0x64:   852,           0x65:   866, | ||||
| 	0x66:   865,           0x67:   861, | ||||
| 	0x68:   895,           0x69:   620, | ||||
| 	0x6A:   737,           0x6B:   857, | ||||
| 	0x78:   950,           0x79:   949, | ||||
| 	0x7A:   936,           0x7B:   932, | ||||
| 	0x7C:   874,           0x7D:  1255, | ||||
| 	0x7E:  1256,           0x96: 10007, | ||||
| 	0x97: 10029,           0x98: 10006, | ||||
| 	0xC8:  1250,           0xC9:  1251, | ||||
| 	0xCA:  1254,           0xCB:  1253, | ||||
| 	0x00: 20127 | ||||
| }); | ||||
| /* TODO: find an actual specification */ | ||||
| function dbf_to_aoa(buf, opts)/*:AOA*/ { | ||||
| @ -404,9 +404,9 @@ var SYLK = /*#__PURE__*/(function() { | ||||
| 		KC:'Ç', Kc:'ç', q:'æ',  z:'œ',  a:'Æ',  j:'Œ', | ||||
| 		DN:209, Dn:241, Hy:255, | ||||
| 		S:169,  c:170,  R:174,  "B ":180, | ||||
| 		/*::[*/0/*::]*/:176,    /*::[*/1/*::]*/:177,  /*::[*/2/*::]*/:178, | ||||
| 		/*::[*/3/*::]*/:179,    /*::[*/5/*::]*/:181,  /*::[*/6/*::]*/:182, | ||||
| 		/*::[*/7/*::]*/:183,    Q:185,  k:186,  b:208,  i:216,  l:222,  s:240,  y:248, | ||||
| 		0:176,  1:177,  2:178, | ||||
| 		3:179,  5:181,  6:182, | ||||
| 		7:183,  Q:185,  k:186,  b:208,  i:216,  l:222,  s:240,  y:248, | ||||
| 		"!":161, '"':162, "#":163, "(":164, "%":165, "'":167, "H ":168, | ||||
| 		"+":171, ";":187, "<":188, "=":189, ">":190, "?":191, "{":223 | ||||
| 	}/*:any*/); | ||||
| @ -941,18 +941,18 @@ var PRN = /*#__PURE__*/(function() { | ||||
| 
 | ||||
| 	// List of accepted CSV separators
 | ||||
| 	var guess_seps = { | ||||
| 		/*::[*/0x2C/*::]*/: ',', | ||||
| 		/*::[*/0x09/*::]*/: "\t", | ||||
| 		/*::[*/0x3B/*::]*/: ';', | ||||
| 		/*::[*/0x7C/*::]*/: '|' | ||||
| 		0x2C: ',', | ||||
| 		0x09: "\t", | ||||
| 		0x3B: ';', | ||||
| 		0x7C: '|' | ||||
| 	}; | ||||
| 
 | ||||
| 	// CSV separator weights to be used in case of equal numbers
 | ||||
| 	var guess_sep_weights = { | ||||
| 		/*::[*/0x2C/*::]*/: 3, | ||||
| 		/*::[*/0x09/*::]*/: 2, | ||||
| 		/*::[*/0x3B/*::]*/: 1, | ||||
| 		/*::[*/0x7C/*::]*/: 0 | ||||
| 		0x2C: 3, | ||||
| 		0x09: 2, | ||||
| 		0x3B: 1, | ||||
| 		0x7C: 0 | ||||
| 	}; | ||||
| 
 | ||||
| 	function guess_sep(str) { | ||||
|  | ||||
							
								
								
									
										410
									
								
								bits/41_lotus.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										410
									
								
								bits/41_lotus.js
									
									
									
									
									
								
							| @ -763,68 +763,68 @@ var WK_ = /*#__PURE__*/(function() { | ||||
| 	} | ||||
| 
 | ||||
| 	var WK1Enum = { | ||||
| 		/*::[*/0x0000/*::]*/: { n:"BOF", f:parseuint16 }, | ||||
| 		/*::[*/0x0001/*::]*/: { n:"EOF" }, | ||||
| 		/*::[*/0x0002/*::]*/: { n:"CALCMODE" }, | ||||
| 		/*::[*/0x0003/*::]*/: { n:"CALCORDER" }, | ||||
| 		/*::[*/0x0004/*::]*/: { n:"SPLIT" }, | ||||
| 		/*::[*/0x0005/*::]*/: { n:"SYNC" }, | ||||
| 		/*::[*/0x0006/*::]*/: { n:"RANGE", f:parse_RANGE }, | ||||
| 		/*::[*/0x0007/*::]*/: { n:"WINDOW1" }, | ||||
| 		/*::[*/0x0008/*::]*/: { n:"COLW1" }, | ||||
| 		/*::[*/0x0009/*::]*/: { n:"WINTWO" }, | ||||
| 		/*::[*/0x000A/*::]*/: { n:"COLW2" }, | ||||
| 		/*::[*/0x000B/*::]*/: { n:"NAME" }, | ||||
| 		/*::[*/0x000C/*::]*/: { n:"BLANK" }, | ||||
| 		/*::[*/0x000D/*::]*/: { n:"INTEGER", f:parse_INTEGER }, | ||||
| 		/*::[*/0x000E/*::]*/: { n:"NUMBER", f:parse_NUMBER }, | ||||
| 		/*::[*/0x000F/*::]*/: { n:"LABEL", f:parse_LABEL }, | ||||
| 		/*::[*/0x0010/*::]*/: { n:"FORMULA", f:parse_FORMULA }, | ||||
| 		/*::[*/0x0018/*::]*/: { n:"TABLE" }, | ||||
| 		/*::[*/0x0019/*::]*/: { n:"ORANGE" }, | ||||
| 		/*::[*/0x001A/*::]*/: { n:"PRANGE" }, | ||||
| 		/*::[*/0x001B/*::]*/: { n:"SRANGE" }, | ||||
| 		/*::[*/0x001C/*::]*/: { n:"FRANGE" }, | ||||
| 		/*::[*/0x001D/*::]*/: { n:"KRANGE1" }, | ||||
| 		/*::[*/0x0020/*::]*/: { n:"HRANGE" }, | ||||
| 		/*::[*/0x0023/*::]*/: { n:"KRANGE2" }, | ||||
| 		/*::[*/0x0024/*::]*/: { n:"PROTEC" }, | ||||
| 		/*::[*/0x0025/*::]*/: { n:"FOOTER" }, | ||||
| 		/*::[*/0x0026/*::]*/: { n:"HEADER" }, | ||||
| 		/*::[*/0x0027/*::]*/: { n:"SETUP" }, | ||||
| 		/*::[*/0x0028/*::]*/: { n:"MARGINS" }, | ||||
| 		/*::[*/0x0029/*::]*/: { n:"LABELFMT" }, | ||||
| 		/*::[*/0x002A/*::]*/: { n:"TITLES" }, | ||||
| 		/*::[*/0x002B/*::]*/: { n:"SHEETJS" }, | ||||
| 		/*::[*/0x002D/*::]*/: { n:"GRAPH" }, | ||||
| 		/*::[*/0x002E/*::]*/: { n:"NGRAPH" }, | ||||
| 		/*::[*/0x002F/*::]*/: { n:"CALCCOUNT" }, | ||||
| 		/*::[*/0x0030/*::]*/: { n:"UNFORMATTED" }, | ||||
| 		/*::[*/0x0031/*::]*/: { n:"CURSORW12" }, | ||||
| 		/*::[*/0x0032/*::]*/: { n:"WINDOW" }, | ||||
| 		/*::[*/0x0033/*::]*/: { n:"STRING", f:parse_STRING }, | ||||
| 		/*::[*/0x0037/*::]*/: { n:"PASSWORD" }, | ||||
| 		/*::[*/0x0038/*::]*/: { n:"LOCKED" }, | ||||
| 		/*::[*/0x003C/*::]*/: { n:"QUERY" }, | ||||
| 		/*::[*/0x003D/*::]*/: { n:"QUERYNAME" }, | ||||
| 		/*::[*/0x003E/*::]*/: { n:"PRINT" }, | ||||
| 		/*::[*/0x003F/*::]*/: { n:"PRINTNAME" }, | ||||
| 		/*::[*/0x0040/*::]*/: { n:"GRAPH2" }, | ||||
| 		/*::[*/0x0041/*::]*/: { n:"GRAPHNAME" }, | ||||
| 		/*::[*/0x0042/*::]*/: { n:"ZOOM" }, | ||||
| 		/*::[*/0x0043/*::]*/: { n:"SYMSPLIT" }, | ||||
| 		/*::[*/0x0044/*::]*/: { n:"NSROWS" }, | ||||
| 		/*::[*/0x0045/*::]*/: { n:"NSCOLS" }, | ||||
| 		/*::[*/0x0046/*::]*/: { n:"RULER" }, | ||||
| 		/*::[*/0x0047/*::]*/: { n:"NNAME" }, | ||||
| 		/*::[*/0x0048/*::]*/: { n:"ACOMM" }, | ||||
| 		/*::[*/0x0049/*::]*/: { n:"AMACRO" }, | ||||
| 		/*::[*/0x004A/*::]*/: { n:"PARSE" }, | ||||
| 		0x0000: { n:"BOF", f:parseuint16 }, | ||||
| 		0x0001: { n:"EOF" }, | ||||
| 		0x0002: { n:"CALCMODE" }, | ||||
| 		0x0003: { n:"CALCORDER" }, | ||||
| 		0x0004: { n:"SPLIT" }, | ||||
| 		0x0005: { n:"SYNC" }, | ||||
| 		0x0006: { n:"RANGE", f:parse_RANGE }, | ||||
| 		0x0007: { n:"WINDOW1" }, | ||||
| 		0x0008: { n:"COLW1" }, | ||||
| 		0x0009: { n:"WINTWO" }, | ||||
| 		0x000A: { n:"COLW2" }, | ||||
| 		0x000B: { n:"NAME" }, | ||||
| 		0x000C: { n:"BLANK" }, | ||||
| 		0x000D: { n:"INTEGER", f:parse_INTEGER }, | ||||
| 		0x000E: { n:"NUMBER", f:parse_NUMBER }, | ||||
| 		0x000F: { n:"LABEL", f:parse_LABEL }, | ||||
| 		0x0010: { n:"FORMULA", f:parse_FORMULA }, | ||||
| 		0x0018: { n:"TABLE" }, | ||||
| 		0x0019: { n:"ORANGE" }, | ||||
| 		0x001A: { n:"PRANGE" }, | ||||
| 		0x001B: { n:"SRANGE" }, | ||||
| 		0x001C: { n:"FRANGE" }, | ||||
| 		0x001D: { n:"KRANGE1" }, | ||||
| 		0x0020: { n:"HRANGE" }, | ||||
| 		0x0023: { n:"KRANGE2" }, | ||||
| 		0x0024: { n:"PROTEC" }, | ||||
| 		0x0025: { n:"FOOTER" }, | ||||
| 		0x0026: { n:"HEADER" }, | ||||
| 		0x0027: { n:"SETUP" }, | ||||
| 		0x0028: { n:"MARGINS" }, | ||||
| 		0x0029: { n:"LABELFMT" }, | ||||
| 		0x002A: { n:"TITLES" }, | ||||
| 		0x002B: { n:"SHEETJS" }, | ||||
| 		0x002D: { n:"GRAPH" }, | ||||
| 		0x002E: { n:"NGRAPH" }, | ||||
| 		0x002F: { n:"CALCCOUNT" }, | ||||
| 		0x0030: { n:"UNFORMATTED" }, | ||||
| 		0x0031: { n:"CURSORW12" }, | ||||
| 		0x0032: { n:"WINDOW" }, | ||||
| 		0x0033: { n:"STRING", f:parse_STRING }, | ||||
| 		0x0037: { n:"PASSWORD" }, | ||||
| 		0x0038: { n:"LOCKED" }, | ||||
| 		0x003C: { n:"QUERY" }, | ||||
| 		0x003D: { n:"QUERYNAME" }, | ||||
| 		0x003E: { n:"PRINT" }, | ||||
| 		0x003F: { n:"PRINTNAME" }, | ||||
| 		0x0040: { n:"GRAPH2" }, | ||||
| 		0x0041: { n:"GRAPHNAME" }, | ||||
| 		0x0042: { n:"ZOOM" }, | ||||
| 		0x0043: { n:"SYMSPLIT" }, | ||||
| 		0x0044: { n:"NSROWS" }, | ||||
| 		0x0045: { n:"NSCOLS" }, | ||||
| 		0x0046: { n:"RULER" }, | ||||
| 		0x0047: { n:"NNAME" }, | ||||
| 		0x0048: { n:"ACOMM" }, | ||||
| 		0x0049: { n:"AMACRO" }, | ||||
| 		0x004A: { n:"PARSE" }, | ||||
| 		// 0x0064
 | ||||
| 		/*::[*/0x0066/*::]*/: { n:"PRANGES??" }, | ||||
| 		/*::[*/0x0067/*::]*/: { n:"RRANGES??" }, | ||||
| 		/*::[*/0x0068/*::]*/: { n:"FNAME??" }, | ||||
| 		/*::[*/0x0069/*::]*/: { n:"MRANGES??" }, | ||||
| 		0x0066: { n:"PRANGES??" }, | ||||
| 		0x0067: { n:"RRANGES??" }, | ||||
| 		0x0068: { n:"FNAME??" }, | ||||
| 		0x0069: { n:"MRANGES??" }, | ||||
| 		// 0x0096
 | ||||
| 		// 0x0099
 | ||||
| 		// 0x009A
 | ||||
| @ -833,160 +833,160 @@ var WK_ = /*#__PURE__*/(function() { | ||||
| 		// 0x00C0
 | ||||
| 		// 0x00C7
 | ||||
| 		// 0x00C9
 | ||||
| 		/*::[*/0x00CC/*::]*/: { n:"SHEETNAMECS", f:parse_SHEETNAMECS }, | ||||
| 		0x00CC: { n:"SHEETNAMECS", f:parse_SHEETNAMECS }, | ||||
| 		// 0x00CD
 | ||||
| 		/*::[*/0x00DE/*::]*/: { n:"SHEETNAMELP", f:parse_SHEETNAMELP }, | ||||
| 		/*::[*/0x00FF/*::]*/: { n:"BOF", f:parseuint16 }, | ||||
| 		/*::[*/0x5402/*::]*/: { n:"WKSNF", f:parseuint16 }, | ||||
| 		/*::[*/0xFFFF/*::]*/: { n:"" } | ||||
| 		0x00DE: { n:"SHEETNAMELP", f:parse_SHEETNAMELP }, | ||||
| 		0x00FF: { n:"BOF", f:parseuint16 }, | ||||
| 		0x5402: { n:"WKSNF", f:parseuint16 }, | ||||
| 		0xFFFF: { n:"" } | ||||
| 	}; | ||||
| 
 | ||||
| 	var WK3Enum = { | ||||
| 		/*::[*/0x0000/*::]*/: { n:"BOF" }, | ||||
| 		/*::[*/0x0001/*::]*/: { n:"EOF" }, | ||||
| 		/*::[*/0x0002/*::]*/: { n:"PASSWORD" }, | ||||
| 		/*::[*/0x0003/*::]*/: { n:"CALCSET" }, | ||||
| 		/*::[*/0x0004/*::]*/: { n:"WINDOWSET" }, | ||||
| 		/*::[*/0x0005/*::]*/: { n:"SHEETCELLPTR" }, | ||||
| 		/*::[*/0x0006/*::]*/: { n:"SHEETLAYOUT" }, | ||||
| 		/*::[*/0x0007/*::]*/: { n:"COLUMNWIDTH" }, | ||||
| 		/*::[*/0x0008/*::]*/: { n:"HIDDENCOLUMN" }, | ||||
| 		/*::[*/0x0009/*::]*/: { n:"USERRANGE" }, | ||||
| 		/*::[*/0x000A/*::]*/: { n:"SYSTEMRANGE" }, | ||||
| 		/*::[*/0x000B/*::]*/: { n:"ZEROFORCE" }, | ||||
| 		/*::[*/0x000C/*::]*/: { n:"SORTKEYDIR" }, | ||||
| 		/*::[*/0x000D/*::]*/: { n:"FILESEAL" }, | ||||
| 		/*::[*/0x000E/*::]*/: { n:"DATAFILLNUMS" }, | ||||
| 		/*::[*/0x000F/*::]*/: { n:"PRINTMAIN" }, | ||||
| 		/*::[*/0x0010/*::]*/: { n:"PRINTSTRING" }, | ||||
| 		/*::[*/0x0011/*::]*/: { n:"GRAPHMAIN" }, | ||||
| 		/*::[*/0x0012/*::]*/: { n:"GRAPHSTRING" }, | ||||
| 		/*::[*/0x0013/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0014/*::]*/: { n:"ERRCELL" }, | ||||
| 		/*::[*/0x0015/*::]*/: { n:"NACELL" }, | ||||
| 		/*::[*/0x0016/*::]*/: { n:"LABEL16", f:parse_LABEL_16}, | ||||
| 		/*::[*/0x0017/*::]*/: { n:"NUMBER17", f:parse_NUMBER_17 }, | ||||
| 		/*::[*/0x0018/*::]*/: { n:"NUMBER18", f:parse_NUMBER_18 }, | ||||
| 		/*::[*/0x0019/*::]*/: { n:"FORMULA19", f:parse_FORMULA_19}, | ||||
| 		/*::[*/0x001A/*::]*/: { n:"FORMULA1A" }, | ||||
| 		/*::[*/0x001B/*::]*/: { n:"XFORMAT", f:parse_XFORMAT }, | ||||
| 		/*::[*/0x001C/*::]*/: { n:"DTLABELMISC" }, | ||||
| 		/*::[*/0x001D/*::]*/: { n:"DTLABELCELL" }, | ||||
| 		/*::[*/0x001E/*::]*/: { n:"GRAPHWINDOW" }, | ||||
| 		/*::[*/0x001F/*::]*/: { n:"CPA" }, | ||||
| 		/*::[*/0x0020/*::]*/: { n:"LPLAUTO" }, | ||||
| 		/*::[*/0x0021/*::]*/: { n:"QUERY" }, | ||||
| 		/*::[*/0x0022/*::]*/: { n:"HIDDENSHEET" }, | ||||
| 		/*::[*/0x0023/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0025/*::]*/: { n:"NUMBER25", f:parse_NUMBER_25 }, | ||||
| 		/*::[*/0x0026/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0027/*::]*/: { n:"NUMBER27", f:parse_NUMBER_27 }, | ||||
| 		/*::[*/0x0028/*::]*/: { n:"FORMULA28", f:parse_FORMULA_28 }, | ||||
| 		/*::[*/0x008E/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0093/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0096/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0097/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0098/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0099/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x009A/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x009B/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x009C/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00A3/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00AE/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00AF/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00B0/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00B1/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00B8/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00B9/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00BA/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00BB/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00BC/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00C3/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00C9/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00CC/*::]*/: { n:"SHEETNAMECS", f:parse_SHEETNAMECS }, | ||||
| 		/*::[*/0x00CD/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00CE/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00CF/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x00D0/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0100/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0103/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0104/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0105/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0106/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0107/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0109/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x010A/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x010B/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x010C/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x010E/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x010F/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0180/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0185/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0186/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0189/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x018C/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0200/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0202/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0201/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0204/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0205/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0280/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0281/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0282/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0283/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0284/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0285/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0286/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0287/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0288/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0292/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0293/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0294/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0295/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0296/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0299/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x029A/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0300/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0304/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0601/*::]*/: { n:"SHEETINFOQP", f:parse_SHEETINFOQP }, | ||||
| 		/*::[*/0x0640/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0642/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0701/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0702/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0703/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0704/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0780/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0800/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0801/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0804/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x0A80/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x2AF6/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x3231/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x6E49/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0x6F44/*::]*/: { n:"??" }, | ||||
| 		/*::[*/0xFFFF/*::]*/: { n:"" } | ||||
| 		0x0000: { n:"BOF" }, | ||||
| 		0x0001: { n:"EOF" }, | ||||
| 		0x0002: { n:"PASSWORD" }, | ||||
| 		0x0003: { n:"CALCSET" }, | ||||
| 		0x0004: { n:"WINDOWSET" }, | ||||
| 		0x0005: { n:"SHEETCELLPTR" }, | ||||
| 		0x0006: { n:"SHEETLAYOUT" }, | ||||
| 		0x0007: { n:"COLUMNWIDTH" }, | ||||
| 		0x0008: { n:"HIDDENCOLUMN" }, | ||||
| 		0x0009: { n:"USERRANGE" }, | ||||
| 		0x000A: { n:"SYSTEMRANGE" }, | ||||
| 		0x000B: { n:"ZEROFORCE" }, | ||||
| 		0x000C: { n:"SORTKEYDIR" }, | ||||
| 		0x000D: { n:"FILESEAL" }, | ||||
| 		0x000E: { n:"DATAFILLNUMS" }, | ||||
| 		0x000F: { n:"PRINTMAIN" }, | ||||
| 		0x0010: { n:"PRINTSTRING" }, | ||||
| 		0x0011: { n:"GRAPHMAIN" }, | ||||
| 		0x0012: { n:"GRAPHSTRING" }, | ||||
| 		0x0013: { n:"??" }, | ||||
| 		0x0014: { n:"ERRCELL" }, | ||||
| 		0x0015: { n:"NACELL" }, | ||||
| 		0x0016: { n:"LABEL16", f:parse_LABEL_16}, | ||||
| 		0x0017: { n:"NUMBER17", f:parse_NUMBER_17 }, | ||||
| 		0x0018: { n:"NUMBER18", f:parse_NUMBER_18 }, | ||||
| 		0x0019: { n:"FORMULA19", f:parse_FORMULA_19}, | ||||
| 		0x001A: { n:"FORMULA1A" }, | ||||
| 		0x001B: { n:"XFORMAT", f:parse_XFORMAT }, | ||||
| 		0x001C: { n:"DTLABELMISC" }, | ||||
| 		0x001D: { n:"DTLABELCELL" }, | ||||
| 		0x001E: { n:"GRAPHWINDOW" }, | ||||
| 		0x001F: { n:"CPA" }, | ||||
| 		0x0020: { n:"LPLAUTO" }, | ||||
| 		0x0021: { n:"QUERY" }, | ||||
| 		0x0022: { n:"HIDDENSHEET" }, | ||||
| 		0x0023: { n:"??" }, | ||||
| 		0x0025: { n:"NUMBER25", f:parse_NUMBER_25 }, | ||||
| 		0x0026: { n:"??" }, | ||||
| 		0x0027: { n:"NUMBER27", f:parse_NUMBER_27 }, | ||||
| 		0x0028: { n:"FORMULA28", f:parse_FORMULA_28 }, | ||||
| 		0x008E: { n:"??" }, | ||||
| 		0x0093: { n:"??" }, | ||||
| 		0x0096: { n:"??" }, | ||||
| 		0x0097: { n:"??" }, | ||||
| 		0x0098: { n:"??" }, | ||||
| 		0x0099: { n:"??" }, | ||||
| 		0x009A: { n:"??" }, | ||||
| 		0x009B: { n:"??" }, | ||||
| 		0x009C: { n:"??" }, | ||||
| 		0x00A3: { n:"??" }, | ||||
| 		0x00AE: { n:"??" }, | ||||
| 		0x00AF: { n:"??" }, | ||||
| 		0x00B0: { n:"??" }, | ||||
| 		0x00B1: { n:"??" }, | ||||
| 		0x00B8: { n:"??" }, | ||||
| 		0x00B9: { n:"??" }, | ||||
| 		0x00BA: { n:"??" }, | ||||
| 		0x00BB: { n:"??" }, | ||||
| 		0x00BC: { n:"??" }, | ||||
| 		0x00C3: { n:"??" }, | ||||
| 		0x00C9: { n:"??" }, | ||||
| 		0x00CC: { n:"SHEETNAMECS", f:parse_SHEETNAMECS }, | ||||
| 		0x00CD: { n:"??" }, | ||||
| 		0x00CE: { n:"??" }, | ||||
| 		0x00CF: { n:"??" }, | ||||
| 		0x00D0: { n:"??" }, | ||||
| 		0x0100: { n:"??" }, | ||||
| 		0x0103: { n:"??" }, | ||||
| 		0x0104: { n:"??" }, | ||||
| 		0x0105: { n:"??" }, | ||||
| 		0x0106: { n:"??" }, | ||||
| 		0x0107: { n:"??" }, | ||||
| 		0x0109: { n:"??" }, | ||||
| 		0x010A: { n:"??" }, | ||||
| 		0x010B: { n:"??" }, | ||||
| 		0x010C: { n:"??" }, | ||||
| 		0x010E: { n:"??" }, | ||||
| 		0x010F: { n:"??" }, | ||||
| 		0x0180: { n:"??" }, | ||||
| 		0x0185: { n:"??" }, | ||||
| 		0x0186: { n:"??" }, | ||||
| 		0x0189: { n:"??" }, | ||||
| 		0x018C: { n:"??" }, | ||||
| 		0x0200: { n:"??" }, | ||||
| 		0x0202: { n:"??" }, | ||||
| 		0x0201: { n:"??" }, | ||||
| 		0x0204: { n:"??" }, | ||||
| 		0x0205: { n:"??" }, | ||||
| 		0x0280: { n:"??" }, | ||||
| 		0x0281: { n:"??" }, | ||||
| 		0x0282: { n:"??" }, | ||||
| 		0x0283: { n:"??" }, | ||||
| 		0x0284: { n:"??" }, | ||||
| 		0x0285: { n:"??" }, | ||||
| 		0x0286: { n:"??" }, | ||||
| 		0x0287: { n:"??" }, | ||||
| 		0x0288: { n:"??" }, | ||||
| 		0x0292: { n:"??" }, | ||||
| 		0x0293: { n:"??" }, | ||||
| 		0x0294: { n:"??" }, | ||||
| 		0x0295: { n:"??" }, | ||||
| 		0x0296: { n:"??" }, | ||||
| 		0x0299: { n:"??" }, | ||||
| 		0x029A: { n:"??" }, | ||||
| 		0x0300: { n:"??" }, | ||||
| 		0x0304: { n:"??" }, | ||||
| 		0x0601: { n:"SHEETINFOQP", f:parse_SHEETINFOQP }, | ||||
| 		0x0640: { n:"??" }, | ||||
| 		0x0642: { n:"??" }, | ||||
| 		0x0701: { n:"??" }, | ||||
| 		0x0702: { n:"??" }, | ||||
| 		0x0703: { n:"??" }, | ||||
| 		0x0704: { n:"??" }, | ||||
| 		0x0780: { n:"??" }, | ||||
| 		0x0800: { n:"??" }, | ||||
| 		0x0801: { n:"??" }, | ||||
| 		0x0804: { n:"??" }, | ||||
| 		0x0A80: { n:"??" }, | ||||
| 		0x2AF6: { n:"??" }, | ||||
| 		0x3231: { n:"??" }, | ||||
| 		0x6E49: { n:"??" }, | ||||
| 		0x6F44: { n:"??" }, | ||||
| 		0xFFFF: { n:"" } | ||||
| 	}; | ||||
| 
 | ||||
| 	/* TODO: fill out and verify this table across QP versions */ | ||||
| 	var QPWNFTable = { | ||||
| 		/*::[*/0x05/*::*/: "dd-mmm-yy", | ||||
| 		/*::[*/0x06/*::*/: "dd-mmm", | ||||
| 		/*::[*/0x07/*::*/: "mmm-yy", | ||||
| 		/*::[*/0x08/*::*/: "mm/dd/yy", // Long Date Intl
 | ||||
| 		/*::[*/0x0A/*::*/: "hh:mm:ss AM/PM", | ||||
| 		/*::[*/0x0B/*::*/: "hh:mm AM/PM", | ||||
| 		/*::[*/0x0E/*::*/: "dd-mmm-yyyy", | ||||
| 		/*::[*/0x0F/*::*/: "mmm-yyyy", | ||||
| 		0x05: "dd-mmm-yy", | ||||
| 		0x06: "dd-mmm", | ||||
| 		0x07: "mmm-yy", | ||||
| 		0x08: "mm/dd/yy", // Long Date Intl
 | ||||
| 		0x0A: "hh:mm:ss AM/PM", | ||||
| 		0x0B: "hh:mm AM/PM", | ||||
| 		0x0E: "dd-mmm-yyyy", | ||||
| 		0x0F: "mmm-yyyy", | ||||
| 
 | ||||
| 		/* It is suspected that the the low nybble specifies decimal places */ | ||||
| 		/*::[*/0x0022/*::*/: "0.00", | ||||
| 		/*::[*/0x0032/*::*/: "0.00;[Red]0.00", | ||||
| 		/*::[*/0x0042/*::*/: "0.00;\(0.00\)", | ||||
| 		/*::[*/0x0052/*::*/: "0.00;[Red]\(0.00\)", | ||||
| 		/*::[*/0x00A2/*::*/: '"$"#,##0.00;\\("$"#,##0.00\\)', | ||||
| 		/*::[*/0x0120/*::*/: '0%', | ||||
| 		/*::[*/0x0130/*::*/: '0E+00', | ||||
| 		/*::[*/0x0140/*::*/: '# ?/?' | ||||
| 		0x0022: "0.00", | ||||
| 		0x0032: "0.00;[Red]0.00", | ||||
| 		0x0042: "0.00;\(0.00\)", | ||||
| 		0x0052: "0.00;[Red]\(0.00\)", | ||||
| 		0x00A2: '"$"#,##0.00;\\("$"#,##0.00\\)', | ||||
| 		0x0120: '0%', | ||||
| 		0x0130: '0E+00', | ||||
| 		0x0140: '# ?/?' | ||||
| 	}; | ||||
| 
 | ||||
| 	function parse_qpw_str(p) { | ||||
|  | ||||
| @ -107,15 +107,14 @@ function parse_rpr(rpr) { | ||||
| } | ||||
| 
 | ||||
| var parse_rs = /*#__PURE__*/(function() { | ||||
| 	var tregex = matchtag("t"), rpregex = matchtag("rPr"); | ||||
| 	/* 18.4.4 r CT_RElt */ | ||||
| 	function parse_r(r) { | ||||
| 		/* 18.4.12 t ST_Xstring */ | ||||
| 		var t = r.match(tregex)/*, cp = 65001*/; | ||||
| 		var t = str_match_xml_ns(r, "t")/*, cp = 65001*/; | ||||
| 		if(!t) return {t:"s", v:""}; | ||||
| 
 | ||||
| 		var o/*:Cell*/ = ({t:'s', v:unescapexml(t[1])}/*:any*/); | ||||
| 		var rpr = r.match(rpregex); | ||||
| 		var rpr = str_match_xml_ns(r, "rPr"); | ||||
| 		if(rpr) o.s = parse_rpr(rpr[1]); | ||||
| 		return o; | ||||
| 	} | ||||
|  | ||||
| @ -17,7 +17,7 @@ function rtf_to_sheet_str(str, opts) { | ||||
|   var dense = o.dense; | ||||
|   if (dense) | ||||
|     ws["!data"] = []; | ||||
|   var rows = str.match(/\\trowd[\s\S]*?\\row\b/g); | ||||
|   var rows = str_match_ng(str, "\\trowd", "\\row"); | ||||
|   if (!rows) | ||||
|     throw new Error("RTF missing table"); | ||||
|   var range = { s: { c: 0, r: 0 }, e: { c: 0, r: rows.length - 1 } }; | ||||
|  | ||||
| @ -379,7 +379,7 @@ var bordersRegex = /<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/; | ||||
| return function parse_sty_xml(data, themes, opts) { | ||||
| 	var styles = {}; | ||||
| 	if(!data) return styles; | ||||
| 	data = data.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 	data = str_remove_ng(data, "<!--", "-->").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 	/* 18.8.39 styleSheet CT_Stylesheet */ | ||||
| 	var t; | ||||
| 
 | ||||
|  | ||||
| @ -13,7 +13,7 @@ function parse_drawing(data, rels/*:any*/) { | ||||
| 	   the actual type is based on the URI of the graphicData | ||||
| 		TODO: handle embedded charts and other types of graphics | ||||
| 	*/ | ||||
| 	var id = (data.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1]; | ||||
| 	var id = (data.match(/<c:chart [^<>]*r:id="([^<>"]*)"/)||["",""])[1]; | ||||
| 
 | ||||
| 	return rels['!id'][id].Target; | ||||
| } | ||||
|  | ||||
							
								
								
									
										196
									
								
								bits/62_fxls.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										196
									
								
								bits/62_fxls.js
									
									
									
									
									
								
							| @ -495,112 +495,112 @@ function parse_PtgAttrNoop(blob/*::, length, opts*/) { | ||||
| 
 | ||||
| /* [MS-XLS] 2.5.198.25 ; [MS-XLSB] 2.5.97.16 */ | ||||
| var PtgTypes = { | ||||
| 	/*::[*/0x01/*::]*/: { n:'PtgExp', f:parse_PtgExp }, | ||||
| 	/*::[*/0x02/*::]*/: { n:'PtgTbl', f:parse_PtgTbl }, | ||||
| 	/*::[*/0x03/*::]*/: { n:'PtgAdd', f:parseread1 }, | ||||
| 	/*::[*/0x04/*::]*/: { n:'PtgSub', f:parseread1 }, | ||||
| 	/*::[*/0x05/*::]*/: { n:'PtgMul', f:parseread1 }, | ||||
| 	/*::[*/0x06/*::]*/: { n:'PtgDiv', f:parseread1 }, | ||||
| 	/*::[*/0x07/*::]*/: { n:'PtgPower', f:parseread1 }, | ||||
| 	/*::[*/0x08/*::]*/: { n:'PtgConcat', f:parseread1 }, | ||||
| 	/*::[*/0x09/*::]*/: { n:'PtgLt', f:parseread1 }, | ||||
| 	/*::[*/0x0A/*::]*/: { n:'PtgLe', f:parseread1 }, | ||||
| 	/*::[*/0x0B/*::]*/: { n:'PtgEq', f:parseread1 }, | ||||
| 	/*::[*/0x0C/*::]*/: { n:'PtgGe', f:parseread1 }, | ||||
| 	/*::[*/0x0D/*::]*/: { n:'PtgGt', f:parseread1 }, | ||||
| 	/*::[*/0x0E/*::]*/: { n:'PtgNe', f:parseread1 }, | ||||
| 	/*::[*/0x0F/*::]*/: { n:'PtgIsect', f:parseread1 }, | ||||
| 	/*::[*/0x10/*::]*/: { n:'PtgUnion', f:parseread1 }, | ||||
| 	/*::[*/0x11/*::]*/: { n:'PtgRange', f:parseread1 }, | ||||
| 	/*::[*/0x12/*::]*/: { n:'PtgUplus', f:parseread1 }, | ||||
| 	/*::[*/0x13/*::]*/: { n:'PtgUminus', f:parseread1 }, | ||||
| 	/*::[*/0x14/*::]*/: { n:'PtgPercent', f:parseread1 }, | ||||
| 	/*::[*/0x15/*::]*/: { n:'PtgParen', f:parseread1 }, | ||||
| 	/*::[*/0x16/*::]*/: { n:'PtgMissArg', f:parseread1 }, | ||||
| 	/*::[*/0x17/*::]*/: { n:'PtgStr', f:parse_PtgStr }, | ||||
| 	/*::[*/0x1A/*::]*/: { n:'PtgSheet', f:parse_PtgSheet }, | ||||
| 	/*::[*/0x1B/*::]*/: { n:'PtgEndSheet', f:parse_PtgEndSheet }, | ||||
| 	/*::[*/0x1C/*::]*/: { n:'PtgErr', f:parse_PtgErr }, | ||||
| 	/*::[*/0x1D/*::]*/: { n:'PtgBool', f:parse_PtgBool }, | ||||
| 	/*::[*/0x1E/*::]*/: { n:'PtgInt', f:parse_PtgInt }, | ||||
| 	/*::[*/0x1F/*::]*/: { n:'PtgNum', f:parse_PtgNum }, | ||||
| 	/*::[*/0x20/*::]*/: { n:'PtgArray', f:parse_PtgArray }, | ||||
| 	/*::[*/0x21/*::]*/: { n:'PtgFunc', f:parse_PtgFunc }, | ||||
| 	/*::[*/0x22/*::]*/: { n:'PtgFuncVar', f:parse_PtgFuncVar }, | ||||
| 	/*::[*/0x23/*::]*/: { n:'PtgName', f:parse_PtgName }, | ||||
| 	/*::[*/0x24/*::]*/: { n:'PtgRef', f:parse_PtgRef }, | ||||
| 	/*::[*/0x25/*::]*/: { n:'PtgArea', f:parse_PtgArea }, | ||||
| 	/*::[*/0x26/*::]*/: { n:'PtgMemArea', f:parse_PtgMemArea }, | ||||
| 	/*::[*/0x27/*::]*/: { n:'PtgMemErr', f:parse_PtgMemErr }, | ||||
| 	/*::[*/0x28/*::]*/: { n:'PtgMemNoMem', f:parse_PtgMemNoMem }, | ||||
| 	/*::[*/0x29/*::]*/: { n:'PtgMemFunc', f:parse_PtgMemFunc }, | ||||
| 	/*::[*/0x2A/*::]*/: { n:'PtgRefErr', f:parse_PtgRefErr }, | ||||
| 	/*::[*/0x2B/*::]*/: { n:'PtgAreaErr', f:parse_PtgAreaErr }, | ||||
| 	/*::[*/0x2C/*::]*/: { n:'PtgRefN', f:parse_PtgRefN }, | ||||
| 	/*::[*/0x2D/*::]*/: { n:'PtgAreaN', f:parse_PtgAreaN }, | ||||
| 	/*::[*/0x2E/*::]*/: { n:'PtgMemAreaN', f:parse_PtgMemAreaN }, | ||||
| 	/*::[*/0x2F/*::]*/: { n:'PtgMemNoMemN', f:parse_PtgMemNoMemN }, | ||||
| 	/*::[*/0x39/*::]*/: { n:'PtgNameX', f:parse_PtgNameX }, | ||||
| 	/*::[*/0x3A/*::]*/: { n:'PtgRef3d', f:parse_PtgRef3d }, | ||||
| 	/*::[*/0x3B/*::]*/: { n:'PtgArea3d', f:parse_PtgArea3d }, | ||||
| 	/*::[*/0x3C/*::]*/: { n:'PtgRefErr3d', f:parse_PtgRefErr3d }, | ||||
| 	/*::[*/0x3D/*::]*/: { n:'PtgAreaErr3d', f:parse_PtgAreaErr3d }, | ||||
| 	/*::[*/0xFF/*::]*/: {} | ||||
| 	0x01: { n:'PtgExp', f:parse_PtgExp }, | ||||
| 	0x02: { n:'PtgTbl', f:parse_PtgTbl }, | ||||
| 	0x03: { n:'PtgAdd', f:parseread1 }, | ||||
| 	0x04: { n:'PtgSub', f:parseread1 }, | ||||
| 	0x05: { n:'PtgMul', f:parseread1 }, | ||||
| 	0x06: { n:'PtgDiv', f:parseread1 }, | ||||
| 	0x07: { n:'PtgPower', f:parseread1 }, | ||||
| 	0x08: { n:'PtgConcat', f:parseread1 }, | ||||
| 	0x09: { n:'PtgLt', f:parseread1 }, | ||||
| 	0x0A: { n:'PtgLe', f:parseread1 }, | ||||
| 	0x0B: { n:'PtgEq', f:parseread1 }, | ||||
| 	0x0C: { n:'PtgGe', f:parseread1 }, | ||||
| 	0x0D: { n:'PtgGt', f:parseread1 }, | ||||
| 	0x0E: { n:'PtgNe', f:parseread1 }, | ||||
| 	0x0F: { n:'PtgIsect', f:parseread1 }, | ||||
| 	0x10: { n:'PtgUnion', f:parseread1 }, | ||||
| 	0x11: { n:'PtgRange', f:parseread1 }, | ||||
| 	0x12: { n:'PtgUplus', f:parseread1 }, | ||||
| 	0x13: { n:'PtgUminus', f:parseread1 }, | ||||
| 	0x14: { n:'PtgPercent', f:parseread1 }, | ||||
| 	0x15: { n:'PtgParen', f:parseread1 }, | ||||
| 	0x16: { n:'PtgMissArg', f:parseread1 }, | ||||
| 	0x17: { n:'PtgStr', f:parse_PtgStr }, | ||||
| 	0x1A: { n:'PtgSheet', f:parse_PtgSheet }, | ||||
| 	0x1B: { n:'PtgEndSheet', f:parse_PtgEndSheet }, | ||||
| 	0x1C: { n:'PtgErr', f:parse_PtgErr }, | ||||
| 	0x1D: { n:'PtgBool', f:parse_PtgBool }, | ||||
| 	0x1E: { n:'PtgInt', f:parse_PtgInt }, | ||||
| 	0x1F: { n:'PtgNum', f:parse_PtgNum }, | ||||
| 	0x20: { n:'PtgArray', f:parse_PtgArray }, | ||||
| 	0x21: { n:'PtgFunc', f:parse_PtgFunc }, | ||||
| 	0x22: { n:'PtgFuncVar', f:parse_PtgFuncVar }, | ||||
| 	0x23: { n:'PtgName', f:parse_PtgName }, | ||||
| 	0x24: { n:'PtgRef', f:parse_PtgRef }, | ||||
| 	0x25: { n:'PtgArea', f:parse_PtgArea }, | ||||
| 	0x26: { n:'PtgMemArea', f:parse_PtgMemArea }, | ||||
| 	0x27: { n:'PtgMemErr', f:parse_PtgMemErr }, | ||||
| 	0x28: { n:'PtgMemNoMem', f:parse_PtgMemNoMem }, | ||||
| 	0x29: { n:'PtgMemFunc', f:parse_PtgMemFunc }, | ||||
| 	0x2A: { n:'PtgRefErr', f:parse_PtgRefErr }, | ||||
| 	0x2B: { n:'PtgAreaErr', f:parse_PtgAreaErr }, | ||||
| 	0x2C: { n:'PtgRefN', f:parse_PtgRefN }, | ||||
| 	0x2D: { n:'PtgAreaN', f:parse_PtgAreaN }, | ||||
| 	0x2E: { n:'PtgMemAreaN', f:parse_PtgMemAreaN }, | ||||
| 	0x2F: { n:'PtgMemNoMemN', f:parse_PtgMemNoMemN }, | ||||
| 	0x39: { n:'PtgNameX', f:parse_PtgNameX }, | ||||
| 	0x3A: { n:'PtgRef3d', f:parse_PtgRef3d }, | ||||
| 	0x3B: { n:'PtgArea3d', f:parse_PtgArea3d }, | ||||
| 	0x3C: { n:'PtgRefErr3d', f:parse_PtgRefErr3d }, | ||||
| 	0x3D: { n:'PtgAreaErr3d', f:parse_PtgAreaErr3d }, | ||||
| 	0xFF: {} | ||||
| }; | ||||
| /* These are duplicated in the PtgTypes table */ | ||||
| var PtgDupes = { | ||||
| 	/*::[*/0x40/*::]*/: 0x20, /*::[*/0x60/*::]*/: 0x20, | ||||
| 	/*::[*/0x41/*::]*/: 0x21, /*::[*/0x61/*::]*/: 0x21, | ||||
| 	/*::[*/0x42/*::]*/: 0x22, /*::[*/0x62/*::]*/: 0x22, | ||||
| 	/*::[*/0x43/*::]*/: 0x23, /*::[*/0x63/*::]*/: 0x23, | ||||
| 	/*::[*/0x44/*::]*/: 0x24, /*::[*/0x64/*::]*/: 0x24, | ||||
| 	/*::[*/0x45/*::]*/: 0x25, /*::[*/0x65/*::]*/: 0x25, | ||||
| 	/*::[*/0x46/*::]*/: 0x26, /*::[*/0x66/*::]*/: 0x26, | ||||
| 	/*::[*/0x47/*::]*/: 0x27, /*::[*/0x67/*::]*/: 0x27, | ||||
| 	/*::[*/0x48/*::]*/: 0x28, /*::[*/0x68/*::]*/: 0x28, | ||||
| 	/*::[*/0x49/*::]*/: 0x29, /*::[*/0x69/*::]*/: 0x29, | ||||
| 	/*::[*/0x4A/*::]*/: 0x2A, /*::[*/0x6A/*::]*/: 0x2A, | ||||
| 	/*::[*/0x4B/*::]*/: 0x2B, /*::[*/0x6B/*::]*/: 0x2B, | ||||
| 	/*::[*/0x4C/*::]*/: 0x2C, /*::[*/0x6C/*::]*/: 0x2C, | ||||
| 	/*::[*/0x4D/*::]*/: 0x2D, /*::[*/0x6D/*::]*/: 0x2D, | ||||
| 	/*::[*/0x4E/*::]*/: 0x2E, /*::[*/0x6E/*::]*/: 0x2E, | ||||
| 	/*::[*/0x4F/*::]*/: 0x2F, /*::[*/0x6F/*::]*/: 0x2F, | ||||
| 	/*::[*/0x58/*::]*/: 0x22, /*::[*/0x78/*::]*/: 0x22, | ||||
| 	/*::[*/0x59/*::]*/: 0x39, /*::[*/0x79/*::]*/: 0x39, | ||||
| 	/*::[*/0x5A/*::]*/: 0x3A, /*::[*/0x7A/*::]*/: 0x3A, | ||||
| 	/*::[*/0x5B/*::]*/: 0x3B, /*::[*/0x7B/*::]*/: 0x3B, | ||||
| 	/*::[*/0x5C/*::]*/: 0x3C, /*::[*/0x7C/*::]*/: 0x3C, | ||||
| 	/*::[*/0x5D/*::]*/: 0x3D, /*::[*/0x7D/*::]*/: 0x3D | ||||
| 	0x40: 0x20, 0x60: 0x20, | ||||
| 	0x41: 0x21, 0x61: 0x21, | ||||
| 	0x42: 0x22, 0x62: 0x22, | ||||
| 	0x43: 0x23, 0x63: 0x23, | ||||
| 	0x44: 0x24, 0x64: 0x24, | ||||
| 	0x45: 0x25, 0x65: 0x25, | ||||
| 	0x46: 0x26, 0x66: 0x26, | ||||
| 	0x47: 0x27, 0x67: 0x27, | ||||
| 	0x48: 0x28, 0x68: 0x28, | ||||
| 	0x49: 0x29, 0x69: 0x29, | ||||
| 	0x4A: 0x2A, 0x6A: 0x2A, | ||||
| 	0x4B: 0x2B, 0x6B: 0x2B, | ||||
| 	0x4C: 0x2C, 0x6C: 0x2C, | ||||
| 	0x4D: 0x2D, 0x6D: 0x2D, | ||||
| 	0x4E: 0x2E, 0x6E: 0x2E, | ||||
| 	0x4F: 0x2F, 0x6F: 0x2F, | ||||
| 	0x58: 0x22, 0x78: 0x22, | ||||
| 	0x59: 0x39, 0x79: 0x39, | ||||
| 	0x5A: 0x3A, 0x7A: 0x3A, | ||||
| 	0x5B: 0x3B, 0x7B: 0x3B, | ||||
| 	0x5C: 0x3C, 0x7C: 0x3C, | ||||
| 	0x5D: 0x3D, 0x7D: 0x3D | ||||
| }; | ||||
| 
 | ||||
| var Ptg18 = { | ||||
| 	/*::[*/0x01/*::]*/: { n:'PtgElfLel', f:parse_PtgElfLel }, | ||||
| 	/*::[*/0x02/*::]*/: { n:'PtgElfRw', f:parse_PtgElfRw }, | ||||
| 	/*::[*/0x03/*::]*/: { n:'PtgElfCol', f:parse_PtgElfCol }, | ||||
| 	/*::[*/0x06/*::]*/: { n:'PtgElfRwV', f:parse_PtgElfRwV }, | ||||
| 	/*::[*/0x07/*::]*/: { n:'PtgElfColV', f:parse_PtgElfColV }, | ||||
| 	/*::[*/0x0A/*::]*/: { n:'PtgElfRadical', f:parse_PtgElfRadical }, | ||||
| 	/*::[*/0x0B/*::]*/: { n:'PtgElfRadicalS', f:parse_PtgElfRadicalS }, | ||||
| 	/*::[*/0x0D/*::]*/: { n:'PtgElfColS', f:parse_PtgElfColS }, | ||||
| 	/*::[*/0x0F/*::]*/: { n:'PtgElfColSV', f:parse_PtgElfColSV }, | ||||
| 	/*::[*/0x10/*::]*/: { n:'PtgElfRadicalLel', f:parse_PtgElfRadicalLel }, | ||||
| 	/*::[*/0x19/*::]*/: { n:'PtgList', f:parse_PtgList }, | ||||
| 	/*::[*/0x1D/*::]*/: { n:'PtgSxName', f:parse_PtgSxName }, | ||||
| 	/*::[*/0xFF/*::]*/: {} | ||||
| 	0x01: { n:'PtgElfLel', f:parse_PtgElfLel }, | ||||
| 	0x02: { n:'PtgElfRw', f:parse_PtgElfRw }, | ||||
| 	0x03: { n:'PtgElfCol', f:parse_PtgElfCol }, | ||||
| 	0x06: { n:'PtgElfRwV', f:parse_PtgElfRwV }, | ||||
| 	0x07: { n:'PtgElfColV', f:parse_PtgElfColV }, | ||||
| 	0x0A: { n:'PtgElfRadical', f:parse_PtgElfRadical }, | ||||
| 	0x0B: { n:'PtgElfRadicalS', f:parse_PtgElfRadicalS }, | ||||
| 	0x0D: { n:'PtgElfColS', f:parse_PtgElfColS }, | ||||
| 	0x0F: { n:'PtgElfColSV', f:parse_PtgElfColSV }, | ||||
| 	0x10: { n:'PtgElfRadicalLel', f:parse_PtgElfRadicalLel }, | ||||
| 	0x19: { n:'PtgList', f:parse_PtgList }, | ||||
| 	0x1D: { n:'PtgSxName', f:parse_PtgSxName }, | ||||
| 	0xFF: {} | ||||
| }; | ||||
| var Ptg19 = { | ||||
| 	/*::[*/0x00/*::]*/: { n:'PtgAttrNoop', f:parse_PtgAttrNoop }, | ||||
| 	/*::[*/0x01/*::]*/: { n:'PtgAttrSemi', f:parse_PtgAttrSemi }, | ||||
| 	/*::[*/0x02/*::]*/: { n:'PtgAttrIf', f:parse_PtgAttrIf }, | ||||
| 	/*::[*/0x04/*::]*/: { n:'PtgAttrChoose', f:parse_PtgAttrChoose }, | ||||
| 	/*::[*/0x08/*::]*/: { n:'PtgAttrGoto', f:parse_PtgAttrGoto }, | ||||
| 	/*::[*/0x10/*::]*/: { n:'PtgAttrSum', f:parse_PtgAttrSum }, | ||||
| 	/*::[*/0x20/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel }, | ||||
| 	/*::[*/0x21/*::]*/: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel }, | ||||
| 	/*::[*/0x40/*::]*/: { n:'PtgAttrSpace', f:parse_PtgAttrSpace }, | ||||
| 	/*::[*/0x41/*::]*/: { n:'PtgAttrSpaceSemi', f:parse_PtgAttrSpaceSemi }, | ||||
| 	/*::[*/0x80/*::]*/: { n:'PtgAttrIfError', f:parse_PtgAttrIfError }, | ||||
| 	/*::[*/0xFF/*::]*/: {} | ||||
| 	0x00: { n:'PtgAttrNoop', f:parse_PtgAttrNoop }, | ||||
| 	0x01: { n:'PtgAttrSemi', f:parse_PtgAttrSemi }, | ||||
| 	0x02: { n:'PtgAttrIf', f:parse_PtgAttrIf }, | ||||
| 	0x04: { n:'PtgAttrChoose', f:parse_PtgAttrChoose }, | ||||
| 	0x08: { n:'PtgAttrGoto', f:parse_PtgAttrGoto }, | ||||
| 	0x10: { n:'PtgAttrSum', f:parse_PtgAttrSum }, | ||||
| 	0x20: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel }, | ||||
| 	0x21: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel }, | ||||
| 	0x40: { n:'PtgAttrSpace', f:parse_PtgAttrSpace }, | ||||
| 	0x41: { n:'PtgAttrSpaceSemi', f:parse_PtgAttrSpaceSemi }, | ||||
| 	0x80: { n:'PtgAttrIfError', f:parse_PtgAttrIfError }, | ||||
| 	0xFF: {} | ||||
| }; | ||||
| 
 | ||||
| /* [MS-XLS] 2.5.198.103 ; [MS-XLSB] 2.5.97.87 */ | ||||
|  | ||||
| @ -323,7 +323,6 @@ var parse_ws_xml_data = /*#__PURE__*/(function() { | ||||
| 	var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/; | ||||
| 	var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/; | ||||
| 	var refregex = /ref=["']([^"']*)["']/; | ||||
| 	var match_v = matchtag("v"), match_f = matchtag("f"); | ||||
| 
 | ||||
| return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, themes, styles, wb) { | ||||
| 	var ri = 0, x = "", cells/*:Array<string>*/ = [], cref/*:?Array<string>*/ = [], idx=0, i=0, cc=0, d="", p/*:any*/; | ||||
| @ -402,9 +401,9 @@ return function parse_ws_xml_data(sdata/*:string*/, s, opts, guess/*:Range*/, th | ||||
| 			d = x.slice(i); | ||||
| 			p = ({t:""}/*:any*/); | ||||
| 
 | ||||
| 			if((cref=d.match(match_v))!= null && /*::cref != null && */cref[1] !== '') p.v=unescapexml(cref[1]); | ||||
| 			if((cref=str_match_xml_ns(d, "v"))!= null && /*::cref != null && */cref[1] !== '') p.v=unescapexml(cref[1]); | ||||
| 			if(opts.cellFormula) { | ||||
| 				if((cref=d.match(match_f))!= null /*:: && cref != null*/) { | ||||
| 				if((cref=str_match_xml_ns(d, "f"))!= null /*:: && cref != null*/) { | ||||
| 					if(cref[1] == "") { | ||||
| 						if(/*::cref != null && cref[0] != null && */cref[0].indexOf('t="shared"') > -1) { | ||||
| 							// TODO: parse formula
 | ||||
|  | ||||
| @ -69,8 +69,14 @@ function parse_BrtName(data, length, opts) { | ||||
| 	data.l += 1; //var chKey = data.read_shift(1);
 | ||||
| 	var itab = data.read_shift(4); | ||||
| 	var name = parse_XLNameWideString(data); | ||||
| 	var formula = parse_XLSBNameParsedFormula(data, 0, opts); | ||||
| 	var comment = parse_XLNullableWideString(data); | ||||
| 	var formula; | ||||
| 	var comment = ""; | ||||
| 	try { | ||||
| 		formula = parse_XLSBNameParsedFormula(data, 0, opts); | ||||
| 		try { | ||||
| 			comment = parse_XLNullableWideString(data); | ||||
| 		} catch(e){} | ||||
| 	} catch(e) { console.error("Could not parse defined name " + name); } | ||||
| 	if(flags & 0x20) name = "_xlnm." + name; | ||||
| 	//if(0 /* fProc */) {
 | ||||
| 		// unusedstring1: XLNullableWideString
 | ||||
| @ -141,7 +147,7 @@ function parse_wb_bin(data, opts)/*:WorkbookFile*/ { | ||||
| 
 | ||||
| 			case 0x0027: /* 'BrtName' */ | ||||
| 				if(val.Sheet != null) opts.SID = val.Sheet; | ||||
| 				val.Ref = stringify_formula(val.Ptg, null, null, supbooks, opts); | ||||
| 				val.Ref = val.Ptg ? stringify_formula(val.Ptg, null, null, supbooks, opts) : "#REF!"; | ||||
| 				delete opts.SID; | ||||
| 				delete val.Ptg; | ||||
| 				Names.push(val); | ||||
|  | ||||
| @ -222,7 +222,7 @@ function parse_xlml_xml(d, _opts)/*:Workbook*/ { | ||||
| 	var rowinfo/*:Array<RowInfo>*/ = [], rowobj = {}, cc = 0, rr = 0; | ||||
| 	var Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false} }/*:any*/), wsprops = {}; | ||||
| 	xlmlregex.lastIndex = 0; | ||||
| 	str = str.replace(/<!--([\s\S]*?)-->/mg,""); | ||||
| 	str = str_remove_ng(str, "<!--", "-->"); | ||||
| 	var raw_Rn3 = ""; | ||||
| 	while((Rn = xlmlregex.exec(str))) switch((Rn[3] = (raw_Rn3 = Rn[3]).toLowerCase())) { | ||||
| 		case 'data' /*case 'Data'*/: | ||||
|  | ||||
| @ -330,17 +330,17 @@ function parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ { | ||||
| 				} break; | ||||
| 				case 0x0009: case 0x0209: case 0x0409: case 0x0809 /* BOF */: { | ||||
| 					if(opts.biff === 8) opts.biff = { | ||||
| 						/*::[*/0x0009/*::]*/:2, | ||||
| 						/*::[*/0x0209/*::]*/:3, | ||||
| 						/*::[*/0x0409/*::]*/:4 | ||||
| 						0x0009: 2, | ||||
| 						0x0209: 3, | ||||
| 						0x0409: 4 | ||||
| 					}[RecordType] || { | ||||
| 						/*::[*/0x0200/*::]*/:2, | ||||
| 						/*::[*/0x0300/*::]*/:3, | ||||
| 						/*::[*/0x0400/*::]*/:4, | ||||
| 						/*::[*/0x0500/*::]*/:5, | ||||
| 						/*::[*/0x0600/*::]*/:8, | ||||
| 						/*::[*/0x0002/*::]*/:2, | ||||
| 						/*::[*/0x0007/*::]*/:2 | ||||
| 						0x0200: 2, | ||||
| 						0x0300: 3, | ||||
| 						0x0400: 4, | ||||
| 						0x0500: 5, | ||||
| 						0x0600: 8, | ||||
| 						0x0002: 2, | ||||
| 						0x0007: 2 | ||||
| 					}[val.BIFFVer] || 8; | ||||
| 					opts.biffguess = val.BIFFVer == 0; | ||||
| 					if(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); } | ||||
|  | ||||
							
								
								
									
										2580
									
								
								bits/77_parsetab.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2580
									
								
								bits/77_parsetab.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -3,7 +3,7 @@ function html_to_sheet(str/*:string*/, _opts)/*:Workbook*/ { | ||||
| 	var opts = _opts || {}; | ||||
| 	var dense = (opts.dense != null) ? opts.dense : DENSE; | ||||
| 	var ws/*:Worksheet*/ = ({}/*:any*/); if(dense) ws["!data"] = []; | ||||
| 	str = str.replace(/<!--.*?-->/g, ""); | ||||
| 	str = str_remove_ng(str, "<!--", "-->"); | ||||
| 	var mtch/*:any*/ = str.match(/<table/i); | ||||
| 	if(!mtch) throw new Error("Invalid HTML: could not find <table>"); | ||||
| 	var mtch2/*:any*/ = str.match(/<\/table/i); | ||||
|  | ||||
| @ -17,7 +17,7 @@ function parse_ods_styles(d/*:string*/, _opts, _nfm) { | ||||
| 	var number_format_map = _nfm || {}; | ||||
| 	var str = xlml_normalize(d); | ||||
| 	xlmlregex.lastIndex = 0; | ||||
| 	str = str.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 	str = str_remove_ng(str, "<!--", "-->").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 	var Rn, NFtag, NF = "", tNF = "", y, etpos = 0, tidx = -1, infmt = false, payload = ""; | ||||
| 	while((Rn = xlmlregex.exec(str))) { | ||||
| 		switch((Rn[3]=Rn[3].replace(/_.*$/,""))) { | ||||
| @ -264,7 +264,7 @@ function parse_content_xml(d/*:string*/, _opts, _nfm)/*:Workbook*/ { | ||||
| 		var isstub = false, intable = false; | ||||
| 		var i = 0; | ||||
| 		xlmlregex.lastIndex = 0; | ||||
| 		str = str.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 		str = str_remove_ng(str, "<!--", "-->").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,""); | ||||
| 		while((Rn = xlmlregex.exec(str))) switch((Rn[3]=Rn[3].replace(/_.*$/,""))) { | ||||
| 
 | ||||
| 			case 'table': case '工作表': // 9.1.2 <table:table>
 | ||||
|  | ||||
| @ -125,6 +125,7 @@ function make_csv_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Arr | ||||
| 		/* NOTE: Excel CSV does not support array formulae */ | ||||
| 		row.push(txt); | ||||
| 	} | ||||
| 	if(o.strip) while(row[row.length - 1] === "") --row.length; | ||||
| 	if(o.blankrows === false && isempty) return null; | ||||
| 	return row.join(FS); | ||||
| } | ||||
| @ -136,7 +137,6 @@ function sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ { | ||||
| 	var r = safe_decode_range(sheet["!ref"]); | ||||
| 	var FS = o.FS !== undefined ? o.FS : ",", fs = FS.charCodeAt(0); | ||||
| 	var RS = o.RS !== undefined ? o.RS : "\n", rs = RS.charCodeAt(0); | ||||
| 	var endregex = new RegExp((FS=="|" ? "\\|" : FS)+"+$"); | ||||
| 	var row = "", cols/*:Array<string>*/ = []; | ||||
| 	var colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet["!cols"] || []; | ||||
| 	var rowinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet["!rows"] || []; | ||||
| @ -146,7 +146,6 @@ function sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ { | ||||
| 		if ((rowinfo[R]||{}).hidden) continue; | ||||
| 		row = make_csv_row(sheet, r, R, cols, fs, rs, FS, o); | ||||
| 		if(row == null) { continue; } | ||||
| 		if(o.strip) row = row.replace(endregex,""); | ||||
| 		if(row || (o.blankrows !== false)) out.push((w++ ? RS : "") + row); | ||||
| 	} | ||||
| 	return out.join(""); | ||||
| @ -309,7 +308,7 @@ function book_append_sheet(wb/*:Workbook*/, ws/*:Worksheet*/, name/*:?string*/, | ||||
| 	var i = 1; | ||||
| 	if(!name) for(; i <= 0xFFFF; ++i, name = undefined) if(wb.SheetNames.indexOf(name = "Sheet" + i) == -1) break; | ||||
| 	if(!name || wb.SheetNames.length >= 0xFFFF) throw new Error("Too many worksheets"); | ||||
| 	if(roll && wb.SheetNames.indexOf(name) >= 0) { | ||||
| 	if(roll && wb.SheetNames.indexOf(name) >= 0 && name.length < 32) { | ||||
| 		var m = name.match(/(^.*?)(\d+)$/); | ||||
| 		i = m && +m[2] || 0; | ||||
| 		var root = m && m[1] || name; | ||||
|  | ||||
| @ -8,7 +8,6 @@ function write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) { | ||||
| 	var r = safe_decode_range(sheet["!ref"]); | ||||
| 	var FS = o.FS !== undefined ? o.FS : ",", fs = FS.charCodeAt(0); | ||||
| 	var RS = o.RS !== undefined ? o.RS : "\n", rs = RS.charCodeAt(0); | ||||
| 	var endregex = new RegExp((FS=="|" ? "\\|" : FS)+"+$"); | ||||
| 	var row/*:?string*/ = "", cols/*:Array<string>*/ = []; | ||||
| 	var colinfo/*:Array<ColInfo>*/ = o.skipHidden && sheet["!cols"] || []; | ||||
| 	var rowinfo/*:Array<RowInfo>*/ = o.skipHidden && sheet["!rows"] || []; | ||||
| @ -22,7 +21,6 @@ function write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) { | ||||
| 			if ((rowinfo[R-1]||{}).hidden) continue; | ||||
| 			row = make_csv_row(sheet, r, R-1, cols, fs, rs, FS, o); | ||||
| 			if(row != null) { | ||||
| 				if(o.strip) row = row.replace(endregex,""); | ||||
| 				if(row || (o.blankrows !== false)) return stream.push((w++ ? RS : "") + row); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| @ -68,7 +68,12 @@ function Base64_encode_arr(input) { | ||||
| function Base64_decode(input) { | ||||
|   var o = ""; | ||||
|   var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0; | ||||
|   input = input.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/, "").replace(/[^\w\+\/\=]/g, ""); | ||||
|   if (input.slice(0, 5) == "data:") { | ||||
|     var i = input.slice(0, 1024).indexOf(";base64,"); | ||||
|     if (i > -1) | ||||
|       input = input.slice(i + 8); | ||||
|   } | ||||
|   input = input.replace(/[^\w\+\/\=]/g, ""); | ||||
|   for (var i = 0; i < input.length; ) { | ||||
|     e1 = Base64_map.indexOf(input.charAt(i++)); | ||||
|     e2 = Base64_map.indexOf(input.charAt(i++)); | ||||
|  | ||||
| @ -59,8 +59,11 @@ function Base64_encode_arr(input: Uint8Array|number[]): string { | ||||
| function Base64_decode(input: string): string { | ||||
| 	var o = ""; | ||||
| 	var c1=0, c2=0, c3=0, e1=0, e2=0, e3=0, e4=0; | ||||
| 	input = input.replace(/^data:([^\/]+\/[^\/]+)?;base64\,/,'') | ||||
| 	             .replace(/[^\w\+\/\=]/g, "") | ||||
| 	if(input.slice(0,5) == "data:") { | ||||
|     var i = input.slice(0, 1024).indexOf(";base64,"); | ||||
|     if(i > -1) input = input.slice(i+8); | ||||
|   } | ||||
| 	input = input.replace(/[^\w\+\/\=]/g, ""); | ||||
| 	for(var i = 0; i < input.length;) { | ||||
| 		e1 = Base64_map.indexOf(input.charAt(i++)); | ||||
| 		e2 = Base64_map.indexOf(input.charAt(i++)); | ||||
|  | ||||
| @ -17,7 +17,7 @@ function rtf_to_sheet_str(str, opts) { | ||||
|   var dense = o.dense; | ||||
|   if (dense) | ||||
|     ws["!data"] = []; | ||||
|   var rows = str.match(/\\trowd[\s\S]*?\\row\b/g); | ||||
|   var rows = str_match_ng(str, "\\trowd", "\\row"); | ||||
|   if (!rows) | ||||
|     throw new Error("RTF missing table"); | ||||
|   var range = { s: { c: 0, r: 0 }, e: { c: 0, r: rows.length - 1 } }; | ||||
|  | ||||
| @ -31,7 +31,7 @@ function rtf_to_sheet_str(str: string, opts: ParsingOptions): WorkSheet { | ||||
| 	var dense = o.dense; | ||||
| 	if(dense) ws["!data"] = []; | ||||
| 
 | ||||
| 	var rows = str.match(/\\trowd[\s\S]*?\\row\b/g); | ||||
| 	var rows = str_match_ng(str, "\\trowd", "\\row"); | ||||
| 	if(!rows) throw new Error("RTF missing table"); | ||||
| 	var range: Range = {s: {c:0, r:0}, e: {c:0, r:rows.length - 1}}; | ||||
| 	var row: CellObject[] = []; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user