2016-12-31 08:11:36 +00:00
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
2017-03-28 22:07:46 +00:00
! function ( e ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = e ( ) ; else if ( "function" == typeof define && define . amd ) { JSZip = e ( ) ; define ( [ ] , e ) } else { var f ; "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof $ && $ . global ? f = $ . global : "undefined" != typeof self && ( f = self ) , f . JSZip = e ( ) } } ( function ( ) { var define , module , exports ; return function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; throw new Error ( "Cannot find module '" + o + "'" ) } var f = n [ o ] = { exports : { } } ; t [ o ] [ 0 ] . call ( f . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ? n : e ) } , f , f . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ( { 1 : [ function ( _dereq _ , module , exports ) { "use strict" ; var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ; exports . encode = function ( input , utf8 ) { var output = "" ; var chr1 , chr2 , chr3 , enc1 , enc2 , enc3 , enc4 ; var i = 0 ; while ( i < input . length ) { chr1 = input . charCodeAt ( i ++ ) ; chr2 = input . charCodeAt ( i ++ ) ; chr3 = input . charCodeAt ( i ++ ) ; enc1 = chr1 >> 2 ; enc2 = ( chr1 & 3 ) << 4 | chr2 >> 4 ; enc3 = ( chr2 & 15 ) << 2 | chr3 >> 6 ; enc4 = chr3 & 63 ; if ( isNaN ( chr2 ) ) { enc3 = enc4 = 64 } else if ( isNaN ( chr3 ) ) { enc4 = 64 } output = output + _keyStr . charAt ( enc1 ) + _keyStr . charAt ( enc2 ) + _keyStr . charAt ( enc3 ) + _keyStr . charAt ( enc4 ) } return output } ; exports . decode = function ( input , utf8 ) { var output = "" ; var chr1 , chr2 , chr3 ; var enc1 , enc2 , enc3 , enc4 ; var i = 0 ; input = input . replace ( /[^A-Za-z0-9\+\/\=]/g , "" ) ; while ( i < input . length ) { enc1 = _keyStr . indexOf ( input . charAt ( i ++ ) ) ; enc2 = _keyStr . indexOf ( input . charAt ( i ++ ) ) ; enc3 = _keyStr . indexOf ( input . charAt ( i ++ ) ) ; enc4 = _keyStr . indexOf ( input . charAt ( i ++ ) ) ; chr1 = enc1 << 2 | enc2 >> 4 ; chr2 = ( enc2 & 15 ) << 4 | enc3 >> 2 ; chr3 = ( enc3 & 3 ) << 6 | enc4 ; output = output + String . fromCharCode ( chr1 ) ; if ( enc3 != 64 ) { output = output + String . fromCharCode ( chr2 ) } if ( enc4 != 64 ) { output = output + String . fromCharCode ( chr3 ) } } return output } } , { } ] , 2 : [ function ( _dereq _ , module , exports ) { "use strict" ; function CompressedObject ( ) { this . compressedSize = 0 ; this . uncompressedSize = 0 ; this . crc32 = 0 ; this . compressionMethod = null ; this . compressedContent = null } CompressedObject . prototype = { getContent : function ( ) { return null } , getCompressedContent : function ( ) { return null } } ; module . exports = CompressedObject } , { } ] , 3 : [ function ( _dereq _ , module , exports ) { "use strict" ; exports . STORE = { magic : "\0\0" , compress : function ( content ) { return content } , uncompress : function ( content ) { return content } , compressInputType : null , uncompressInputType : null } ; exports . DEFLATE = _dereq _ ( "./flate" ) } , { "./flate" : 8 } ] , 4 : [ function ( _dereq _ , module , exports ) { "use strict" ; var utils = _dereq _ ( "./utils" ) ; var table = [ 0 , 1996959894 , 3993919788 , 2567524794 , 124634137 , 1886057615 , 3915621685 , 2657392035 , 249268274 , 2044508324 , 3772115230 , 2547177864 , 162941995 , 2125561021 , 3887607047 , 2428444049 , 498536548 , 1789927666 , 4089016648 , 2227061214 , 450548861 , 1843258603 , 4107580753 , 2211677639 , 325883990 , 1684777152 , 4251122042 , 2321926636 , 335633487 , 1661365465 , 4195302755 , 2366115317 , 997073096 , 1281953886 , 3579855332 , 2724688242 , 1006888145 , 1258607687 , 3524101629 , 2768942443 , 901097722 , 1119000684 , 3686517206 , 2898065728 , 853044451 , 1172266101 , 3705015759 , 2882616665 , 651767980 , 1373503546 , 3369554304 , 3218104598 , 565507253 , 1454621731 , 3485111705 , 3099436303 , 671266974 , 1594198024 , 3322730930 , 2970347812 , 795835527 , 1483230225 , 3244367275 , 3060149565 , 1994146192 , 31158534 , 2563907772 , 4023717930 , 1907459465 , 112637215 , 2680153253 , 3904427059 , 2013776290 , 251722036 , 2517215374 , 3775830040 , 2137656763 , 141376813 , 2439277719 , 3865271297 , 1802195444 , 476864866 , 2238001368 , 4066508878 , 1812370925 , 453092731 , 2181625025 , 4111451223 , 1706088902 , 314042704 , 2344532202 , 4240017532 , 1658658271 , 366619977 , 2362670323 , 4224994405 , 1303535960 , 984961486 , 2747007092 , 3569037538 , 1256170817 , 1037604311 , 2765210733 , 3554079995 , 1131014506 , 879679996 , 2909243462 , 3663771856 , 1141124467 , 855842277 , 2852801631 , 3708648649 , 1342533948 , 654459306 , 3188396048 , 3373015174 , 1466479909 , 544179635 , 3110523913 , 3462522015 , 1591671054 , 702138776 , 2966460450 , 3352799412 , 1504918807 , 783551873 , 3082640443 , 3233442989 , 3988292384 , 2596254646 , 62317068 , 1957810842 , 3939845945 , 2647816111 , 81470997 , 1943803523 , 3814918930 , 2489596804 , 2
} return res } ; exports . findCompression = function ( compressionMethod ) { for ( var method in compressions ) { if ( ! compressions . hasOwnProperty ( method ) ) { continue } if ( compressions [ method ] . magic === compressionMethod ) { return compressions [ method ] } } return null } ; exports . isRegExp = function ( object ) { return Object . prototype . toString . call ( object ) === "[object RegExp]" } } , { "./compressions" : 3 , "./nodeBuffer" : 11 , "./support" : 17 } ] , 22 : [ function ( _dereq _ , module , exports ) { "use strict" ; var StringReader = _dereq _ ( "./stringReader" ) ; var NodeBufferReader = _dereq _ ( "./nodeBufferReader" ) ; var Uint8ArrayReader = _dereq _ ( "./uint8ArrayReader" ) ; var utils = _dereq _ ( "./utils" ) ; var sig = _dereq _ ( "./signature" ) ; var ZipEntry = _dereq _ ( "./zipEntry" ) ; var support = _dereq _ ( "./support" ) ; var jszipProto = _dereq _ ( "./object" ) ; function ZipEntries ( data , loadOptions ) { this . files = [ ] ; this . loadOptions = loadOptions ; if ( data ) { this . load ( data ) } } ZipEntries . prototype = { checkSignature : function ( expectedSignature ) { var signature = this . reader . readString ( 4 ) ; if ( signature !== expectedSignature ) { throw new Error ( "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 = { } ; var extraDataSize = 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 ) { throw new Error ( "Multi-volumes zip are not supported" ) } } , readLocalFiles : function ( ) { var i , 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 ( ) { var file ; this . reader . setIndex ( this . centralDirOffset ) ; while ( this . reader . readString ( 4 ) === sig . CENTRAL _FILE _HEADER ) { file = new ZipEntry ( { zip64 : this . zip64 } , this . loadOptions ) ; file . readCentralPart ( this . reader ) ; this . files . push ( file ) } } , readEndOfCentral : function ( ) { var offset = this . reader . lastIndexOfSignature ( sig . CENTRAL _DIRECTORY _END ) ; if ( offset === - 1 ) { throw new Error ( "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 ) { throw new Error ( "Corrupted zip : can't find the ZIP64 end of central directory locator" ) } this . reader . setIndex ( offset ) ; this . checkSignature ( sig . ZIP64 _CENTRAL _D
var bflush ; for ( ; ; ) { if ( s . lookahead === 0 ) { fill _window ( s ) ; if ( s . lookahead === 0 ) { if ( flush === Z _NO _FLUSH ) { return BS _NEED _MORE } break } } s . match _length = 0 ; bflush = trees . _tr _tally ( s , 0 , s . window [ s . strstart ] ) ; s . lookahead -- ; s . strstart ++ ; if ( bflush ) { flush _block _only ( s , false ) ; if ( s . strm . avail _out === 0 ) { return BS _NEED _MORE } } } s . insert = 0 ; if ( flush === Z _FINISH ) { flush _block _only ( s , true ) ; if ( s . strm . avail _out === 0 ) { return BS _FINISH _STARTED } return BS _FINISH _DONE } if ( s . last _lit ) { flush _block _only ( s , false ) ; if ( s . strm . avail _out === 0 ) { return BS _NEED _MORE } } return BS _BLOCK _DONE } var Config = function ( good _length , max _lazy , nice _length , max _chain , func ) { this . good _length = good _length ; this . max _lazy = max _lazy ; this . nice _length = nice _length ; this . max _chain = max _chain ; this . func = func } ; var configuration _table ; configuration _table = [ new Config ( 0 , 0 , 0 , 0 , deflate _stored ) , new Config ( 4 , 4 , 8 , 4 , deflate _fast ) , new Config ( 4 , 5 , 16 , 8 , deflate _fast ) , new Config ( 4 , 6 , 32 , 32 , deflate _fast ) , new Config ( 4 , 4 , 16 , 16 , deflate _slow ) , new Config ( 8 , 16 , 32 , 32 , deflate _slow ) , new Config ( 8 , 16 , 128 , 128 , deflate _slow ) , new Config ( 8 , 32 , 128 , 256 , deflate _slow ) , new Config ( 32 , 128 , 258 , 1024 , deflate _slow ) , new Config ( 32 , 258 , 258 , 4096 , deflate _slow ) ] ; function lm _init ( s ) { s . window _size = 2 * s . w _size ; zero ( s . head ) ; s . max _lazy _match = configuration _table [ s . level ] . max _lazy ; s . good _match = configuration _table [ s . level ] . good _length ; s . nice _match = configuration _table [ s . level ] . nice _length ; s . max _chain _length = configuration _table [ s . level ] . max _chain ; s . strstart = 0 ; s . block _start = 0 ; s . lookahead = 0 ; s . insert = 0 ; s . match _length = s . prev _length = MIN _MATCH - 1 ; s . match _available = 0 ; s . ins _h = 0 } function DeflateState ( ) { this . strm = null ; this . status = 0 ; this . pending _buf = null ; this . pending _buf _size = 0 ; this . pending _out = 0 ; this . pending = 0 ; this . wrap = 0 ; this . gzhead = null ; this . gzindex = 0 ; this . method = Z _DEFLATED ; this . last _flush = - 1 ; this . w _size = 0 ; this . w _bits = 0 ; this . w _mask = 0 ; this . window = null ; this . window _size = 0 ; this . prev = null ; this . head = null ; this . ins _h = 0 ; this . hash _size = 0 ; this . hash _bits = 0 ; this . hash _mask = 0 ; this . hash _shift = 0 ; this . block _start = 0 ; this . match _length = 0 ; this . prev _match = 0 ; this . match _available = 0 ; this . strstart = 0 ; this . match _start = 0 ; this . lookahead = 0 ; this . prev _length = 0 ; this . max _chain _length = 0 ; this . max _lazy _match = 0 ; this . level = 0 ; this . strategy = 0 ; this . good _match = 0 ; this . nice _match = 0 ; this . dyn _ltree = new utils . Buf16 ( HEAP _SIZE * 2 ) ; this . dyn _dtree = new utils . Buf16 ( ( 2 * D _CODES + 1 ) * 2 ) ; this . bl _tree = new utils . Buf16 ( ( 2 * BL _CODES + 1 ) * 2 ) ; zero ( this . dyn _ltree ) ; zero ( this . dyn _dtree ) ; zero ( this . bl _tree ) ; this . l _desc = null ; this . d _desc = null ; this . bl _desc = null ; this . bl _count = new utils . Buf16 ( MAX _BITS + 1 ) ; this . heap = new utils . Buf16 ( 2 * L _CODES + 1 ) ; zero ( this . heap ) ; this . heap _len = 0 ; this . heap _max = 0 ; this . depth = new utils . Buf16 ( 2 * L _CODES + 1 ) ; zero ( this . depth ) ; this . l _buf = 0 ; this . lit _bufsize = 0 ; this . last _lit = 0 ; this . d _buf = 0 ; this . opt _len = 0 ; this . static _len = 0 ; this . matches = 0 ; this . insert = 0 ; this . bi _buf = 0 ; this . bi _valid = 0 } function deflateResetKeep ( strm ) { var s ; if ( ! strm || ! strm . state ) { return err ( strm , Z _STREAM _ERROR ) } strm . total _in = strm . total _out = 0 ; strm . data _type = Z _UNKNOWN ; s = strm . state ; s . pending = 0 ; s . pending _out = 0 ; if ( s . wrap < 0 ) { s . wrap = - s . wrap } s . status = s . wrap ? INIT _STATE : BUSY _STATE ; strm . adler = s . wrap === 2 ? 0 : 1 ; s . last _flush = Z _NO _FLUSH ; trees . _tr _init ( s ) ; return Z _OK } function deflateReset ( strm ) { var ret = deflateResetKeep ( strm ) ; if ( ret === Z _OK ) { lm _init ( strm . state ) } return ret } function deflateSetHeader ( strm , head ) { if ( ! strm || ! strm . state ) { return Z _STREAM _ERROR } if ( strm . state . wrap !== 2 ) { return Z _STREAM _ERROR } strm . state . gzhead = head ; return Z _OK } function deflateInit2 ( strm , level , method , windowBits , memLevel , strategy ) { if ( ! strm ) { return Z _STREAM _ERROR } var wrap = 1 ; if ( level === Z _DEFAULT _COMPRESSION ) { level = 6 } if ( windowBits < 0 ) { wrap = 0 ; windowBits = - windowBits } else if ( windowBits > 15 ) { wrap = 2 ; windowBits -= 16 } if ( memLevel < 1 || memLevel > MAX _MEM _LEVEL || method !== Z _DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z _FIXED ) { return err ( strm , Z _STREAM _ERROR ) } if ( windowBits === 8 ) { windowBits = 9 } var s = new DeflateState ; strm . state = s ; s . strm = strm ; s . wrap = wrap ; s . gzhead = null ; s . w _bits = windowBits ; s . w _size = 1 << s . w _bits ; s . w _mask = s . w _size - 1 ; s . hash _bits = memLevel + 7 ; s . hash _size = 1 << s . hash _bits ; s . hash _mask = s . hash _size - 1 ; s . hash _shift = ~ ~ ( ( s . hash _b
2017-04-09 04:07:43 +00:00
exports . inflateInfo = "pako inflate (from Nodeca project)" } , { "../utils/common" : 27 , "./adler32" : 29 , "./crc32" : 31 , "./inffast" : 34 , "./inftrees" : 36 } ] , 36 : [ function ( _dereq _ , module , exports ) { "use strict" ; var utils = _dereq _ ( "../utils/common" ) ; var MAXBITS = 15 ; var ENOUGH _LENS = 852 ; var ENOUGH _DISTS = 592 ; var CODES = 0 ; var LENS = 1 ; var DISTS = 2 ; var lbase = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 13 , 15 , 17 , 19 , 23 , 27 , 31 , 35 , 43 , 51 , 59 , 67 , 83 , 99 , 115 , 131 , 163 , 195 , 227 , 258 , 0 , 0 ] ; var lext = [ 16 , 16 , 16 , 16 , 16 , 16 , 16 , 16 , 17 , 17 , 17 , 17 , 18 , 18 , 18 , 18 , 19 , 19 , 19 , 19 , 20 , 20 , 20 , 20 , 21 , 21 , 21 , 21 , 16 , 72 , 78 ] ; var dbase = [ 1 , 2 , 3 , 4 , 5 , 7 , 9 , 13 , 17 , 25 , 33 , 49 , 65 , 97 , 129 , 193 , 257 , 385 , 513 , 769 , 1025 , 1537 , 2049 , 3073 , 4097 , 6145 , 8193 , 12289 , 16385 , 24577 , 0 , 0 ] ; var dext = [ 16 , 16 , 16 , 16 , 17 , 17 , 18 , 18 , 19 , 19 , 20 , 20 , 21 , 21 , 22 , 22 , 23 , 23 , 24 , 24 , 25 , 25 , 26 , 26 , 27 , 27 , 28 , 28 , 29 , 29 , 64 , 64 ] ; module . exports = function inflate _table ( type , lens , lens _index , codes , table , table _index , work , opts ) { var bits = opts . bits ; var len = 0 ; var sym = 0 ; var min = 0 , max = 0 ; var root = 0 ; var curr = 0 ; var drop = 0 ; var left = 0 ; var used = 0 ; var huff = 0 ; var incr ; var fill ; var low ; var mask ; var next ; var base = null ; var base _index = 0 ; var end ; var count = new utils . Buf16 ( MAXBITS + 1 ) ; var offs = new utils . Buf16 ( MAXBITS + 1 ) ; var extra = null ; var extra _index = 0 ; var here _bits , here _op , here _val ; for ( len = 0 ; len <= MAXBITS ; len ++ ) { count [ len ] = 0 } for ( sym = 0 ; sym < codes ; sym ++ ) { count [ lens [ lens _index + sym ] ] ++ } root = bits ; for ( max = MAXBITS ; max >= 1 ; max -- ) { if ( count [ max ] !== 0 ) { break } } if ( root > max ) { root = max } if ( max === 0 ) { table [ table _index ++ ] = 1 << 24 | 64 << 16 | 0 ; table [ table _index ++ ] = 1 << 24 | 64 << 16 | 0 ; opts . bits = 1 ; return 0 } for ( min = 1 ; min < max ; min ++ ) { if ( count [ min ] !== 0 ) { break } } if ( root < min ) { root = min } left = 1 ; for ( len = 1 ; len <= MAXBITS ; len ++ ) { left <<= 1 ; left -= count [ len ] ; if ( left < 0 ) { return - 1 } } if ( left > 0 && ( type === CODES || max !== 1 ) ) { return - 1 } offs [ 1 ] = 0 ; for ( len = 1 ; len < MAXBITS ; len ++ ) { offs [ len + 1 ] = offs [ len ] + count [ len ] } for ( sym = 0 ; sym < codes ; sym ++ ) { if ( lens [ lens _index + sym ] !== 0 ) { work [ offs [ lens [ lens _index + sym ] ] ++ ] = sym } } if ( type === CODES ) { base = extra = work ; end = 19 } else if ( type === LENS ) { base = lbase ; base _index -= 257 ; extra = lext ; extra _index -= 257 ; end = 256 } else { base = dbase ; extra = dext ; end = - 1 } huff = 0 ; sym = 0 ; len = min ; next = table _index ; curr = root ; drop = 0 ; low = - 1 ; used = 1 << root ; mask = used - 1 ; if ( type === LENS && used > ENOUGH _LENS || type === DISTS && used > ENOUGH _DISTS ) { return 1 } var i = 0 ; for ( ; ; ) { i ++ ; here _bits = len - drop ; if ( work [ sym ] < end ) { here _op = 0 ; here _val = work [ sym ] } else if ( work [ sym ] > end ) { here _op = extra [ extra _index + work [ sym ] ] ; here _val = base [ base _index + work [ sym ] ] } else { here _op = 32 + 64 ; here _val = 0 } incr = 1 << len - drop ; fill = 1 << curr ; min = fill ; do { fill -= incr ; table [ next + ( huff >> drop ) + fill ] = here _bits << 24 | here _op << 16 | here _val | 0 } while ( fill !== 0 ) ; incr = 1 << len - 1 ; while ( huff & incr ) { incr >>= 1 } if ( incr !== 0 ) { huff &= incr - 1 ; huff += incr } else { huff = 0 } sym ++ ; if ( -- count [ len ] === 0 ) { if ( len === max ) { break } len = lens [ lens _index + work [ sym ] ] } if ( len > root && ( huff & mask ) !== low ) { if ( drop === 0 ) { drop = root } next += min ; curr = len - drop ; left = 1 << curr ; while ( curr + drop < max ) { left -= count [ curr + drop ] ; if ( left <= 0 ) { break } curr ++ ; left <<= 1 } used += 1 << curr ; if ( type === LENS && used > ENOUGH _LENS || type === DISTS && used > ENOUGH _DISTS ) { return 1 } low = huff & mask ; table [ low ] = root << 24 | curr << 16 | next - table _index | 0 } } if ( huff !== 0 ) { table [ next + huff ] = len - drop << 24 | 64 << 16 | 0 } opts . bits = root ; return 0 } } , { "../utils/common" : 27 } ] , 37 : [ function ( _dereq _ , module , exports ) { "use strict" ; module . exports = { 2 : "need dictionary" , 1 : "stream end" , 0 : "" , "-1" : "file error" , "-2" : "stream error" , "-3" : "data error" , "-4" : "insufficient memory" , "-5" : "buffer error" , "-6" : "incompatible version" } } , { } ] , 38 : [ function ( _dereq _ , module , exports ) { "use strict" ; var utils = _dereq _ ( "../utils/common" ) ; var Z _FIXED = 4 ; var Z _BINARY = 0 ; var Z _TEXT = 1 ; var Z _UNKNOWN = 2 ; function zero ( buf ) { var len = buf . length ; while ( -- len >= 0 ) { buf [ len ] = 0 } } var STORED _BLOCK = 0 ; var STATIC _TREES = 1 ; var DYN _TREES = 2 ; var MIN _MATCH = 3 ; var MAX _MATCH = 258 ; var LENGTH _CODES = 29 ; var LITERALS = 256 ; var L _CODES = LITERALS + 1 + LENGTH _CODES ; var D _CODES = 30 ; var BL _CODES = 19 ; var HEAP _SIZE = 2 * L _CODES + 1 ; var MAX _BITS = 15 ; var Buf _size = 16 ; var MAX _BL _BITS = 7 ; var END _BLOCK = 256 ; var REP _3 _6 = 16 ; var REPZ _3 _10 = 17 ; var REPZ _11 _138 = 18 ; var extra _lbits = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 0 ] ; var extra _dbits = [ 0 , 0 , 0 , 0 , 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5 , 5 , 6 , 6 , 7 , 7 , 8 , 8 , 9 , 9 , 10 , 10 , 11 , 11 , 12 , 12 , 13 , 13 ] ; var extra _blbits = [ 0 , 0 , 0
2017-04-03 06:04:35 +00:00
} if ( r = fmt . match ( frac1 ) ) return write _num _f2 ( r , aval , sign ) ; if ( fmt . match ( /^#+0+$/ ) ) return sign + pad0 ( aval , fmt . length - fmt . indexOf ( "0" ) ) ; if ( r = fmt . match ( dec1 ) ) { o = ( "" + val ) . replace ( /^([^\.]+)$/ , "$1." + r [ 1 ] ) . replace ( /\.$/ , "." + r [ 1 ] ) ; o = o . replace ( /\.(\d*)$/ , function ( $$ , $1 ) { return "." + $1 + fill ( "0" , r [ 1 ] . length - $1 . length ) } ) ; return fmt . indexOf ( "0." ) !== - 1 ? o : o . replace ( /^0\./ , "." ) } fmt = fmt . replace ( /^#+([0.])/ , "$1" ) ; if ( r = fmt . match ( /^(0*)\.(#*)$/ ) ) { return sign + ( "" + aval ) . replace ( /\.(\d*[1-9])0*$/ , ".$1" ) . replace ( /^(-?\d*)$/ , "$1." ) . replace ( /^0\./ , r [ 1 ] . length ? "0." : "." ) } if ( r = fmt . match ( /^#,##0(\.?)$/ ) ) return sign + commaify ( "" + aval ) ; if ( r = fmt . match ( /^#,##0\.([#0]*0)$/ ) ) { return val < 0 ? "-" + write _num _int ( type , fmt , - val ) : commaify ( "" + val ) + "." + fill ( "0" , r [ 1 ] . length ) } if ( r = fmt . match ( /^#,#*,#0/ ) ) return write _num _int ( type , fmt . replace ( /^#,#*,/ , "" ) , val ) ; if ( r = fmt . match ( /^([0#]+)(\\?-([0#]+))+$/ ) ) { o = _strrev ( write _num _int ( type , fmt . replace ( /[\\-]/g , "" ) , val ) ) ; ri = 0 ; return _strrev ( _strrev ( fmt . replace ( /\\/g , "" ) ) . replace ( /[0#]/g , function ( x ) { return ri < o . length ? o . charAt ( ri ++ ) : x === "0" ? "0" : "" } ) ) } if ( fmt . match ( phone ) ) { o = write _num _int ( type , "##########" , val ) ; return "(" + o . substr ( 0 , 3 ) + ") " + o . substr ( 3 , 3 ) + "-" + o . substr ( 6 ) } var oa = "" ; if ( r = fmt . match ( /^([#0?]+)( ?)\/( ?)([#0?]+)/ ) ) { ri = Math . min ( r [ 4 ] . length , 7 ) ; ff = frac ( aval , Math . pow ( 10 , ri ) - 1 , false ) ; o = "" + sign ; oa = write _num ( "n" , r [ 1 ] , ff [ 1 ] ) ; if ( oa . charAt ( oa . length - 1 ) == " " ) oa = oa . substr ( 0 , oa . length - 1 ) + "0" ; o += oa + r [ 2 ] + "/" + r [ 3 ] ; oa = rpad _ ( ff [ 2 ] , ri ) ; if ( oa . length < r [ 4 ] . length ) oa = hashq ( r [ 4 ] . substr ( r [ 4 ] . length - oa . length ) ) + oa ; o += oa ; return o } if ( r = fmt . match ( /^# ([#0?]+)( ?)\/( ?)([#0?]+)/ ) ) { ri = Math . min ( Math . max ( r [ 1 ] . length , r [ 4 ] . length ) , 7 ) ; ff = frac ( aval , Math . pow ( 10 , ri ) - 1 , true ) ; return sign + ( ff [ 0 ] || ( ff [ 1 ] ? "" : "0" ) ) + " " + ( ff [ 1 ] ? pad _ ( ff [ 1 ] , ri ) + r [ 2 ] + "/" + r [ 3 ] + rpad _ ( ff [ 2 ] , ri ) : fill ( " " , 2 * ri + 1 + r [ 2 ] . length + r [ 3 ] . length ) ) } if ( r = fmt . match ( /^[#0?]+$/ ) ) { o = "" + val ; if ( fmt . length <= o . length ) return o ; return hashq ( fmt . substr ( 0 , fmt . length - o . length ) ) + o } if ( r = fmt . match ( /^([#0]+)\.([#0]+)$/ ) ) { o = "" + val . toFixed ( Math . min ( r [ 2 ] . length , 10 ) ) . replace ( /([^0])0+$/ , "$1" ) ; ri = o . indexOf ( "." ) ; var lres = fmt . indexOf ( "." ) - ri , rres = fmt . length - o . length - lres ; return hashq ( fmt . substr ( 0 , lres ) + o + fmt . substr ( fmt . length - rres ) ) } if ( r = fmt . match ( /^00,000\.([#0]*0)$/ ) ) { return val < 0 ? "-" + write _num _int ( type , fmt , - val ) : commaify ( "" + val ) . replace ( /^\d,\d{3}$/ , "0$&" ) . replace ( /^\d*$/ , function ( $$ ) { return "00," + ( $$ . length < 3 ? pad0 ( 0 , 3 - $$ . length ) : "" ) + $$ } ) + "." + pad0 ( 0 , r [ 1 ] . length ) } switch ( fmt ) { case "#,###" : var x = commaify ( "" + aval ) ; return x !== "0" ? sign + x : "" ; default : } throw new Error ( "unsupported format |" + fmt + "|" ) } return function write _num ( type , fmt , val ) { return ( val | 0 ) === val ? write _num _int ( type , fmt , val ) : write _num _flt ( type , fmt , val ) } } ( ) ; function split _fmt ( fmt ) { var out = [ ] ; var in _str = false , cc ; for ( var i = 0 , j = 0 ; i < fmt . length ; ++ i ) switch ( cc = fmt . charCodeAt ( i ) ) { case 34 : in _str = ! in _str ; break ; case 95 : case 42 : case 92 : ++ i ; break ; case 59 : out [ out . length ] = fmt . substr ( j , i - j ) ; j = i + 1 } out [ out . length ] = fmt . substr ( j ) ; if ( in _str === true ) throw new Error ( "Format |" + fmt + "| unterminated string " ) ; return out } SSF . _split = split _fmt ; var abstime = /\[[HhMmSs]*\]/ ; function fmt _is _date ( fmt ) { var i = 0 , cc = 0 , c = "" , o = "" ; while ( i < fmt . length ) { switch ( c = fmt . charAt ( i ) ) { case "G" : if ( isgeneral ( fmt , i ) ) i += 6 ; i ++ ; break ; case '"' : for ( ; ( cc = fmt . charCodeAt ( ++ i ) ) !== 34 && i < fmt . length ; ) ++ i ; ++ i ; break ; case "\\" : i += 2 ; break ; case "_" : i += 2 ; break ; case "@" : ++ i ; break ; case "B" : case "b" : if ( fmt . charAt ( i + 1 ) === "1" || fmt . charAt ( i + 1 ) === "2" ) return true ; case "M" : case "D" : case "Y" : case "H" : case "S" : case "E" : case "m" : case "d" : case "y" : case "h" : case "s" : case "e" : case "g" : return true ; case "A" : if ( fmt . substr ( i , 3 ) === "A/P" ) return true ; if ( fmt . substr ( i , 5 ) === "AM/PM" ) return true ; ++ i ; break ; case "[" : o = c ; while ( fmt . charAt ( i ++ ) !== "]" && i < fmt . length ) o += fmt . charAt ( i ) ; if ( o . match ( abstime ) ) return true ; break ; case "." : case "0" : case "#" : while ( i < fmt . length && ( "0#?.,E+-%" . indexOf ( c = fmt . charAt ( ++ i ) ) > - 1 || c == "\\" && fmt . charAt ( i + 1 ) == "-" && "0#" . indexOf ( fmt . charAt ( i + 2 ) ) > - 1 ) ) ; break ; case "?" : while ( fmt . charAt ( ++ i ) === c ) ; break ; case "*" : ++ i ; if ( fmt . charAt ( i ) == " " || fmt . charAt ( i ) == "*" ) ++ i ; break ; case "(" : case ")" : ++ i ; break ; case "1" : case "2" : case "3" : case "4" : case "5" : case "6" : case "7" : case "8" : case "9" : while ( i < fmt . length && "0123456789" . in
2017-04-09 04:07:43 +00:00
} ) . join ( "" ) } ; var _ _utf8 , _ _ _utf8 ; _ _utf8 = _ _ _utf8 = function ( b , s , e ) { var ss = [ ] ; for ( var i = s ; i < e ; i ++ ) ss . push ( String . fromCharCode ( _ _readUInt8 ( b , i ) ) ) ; return ss . join ( "" ) } ; var _ _lpstr , _ _ _lpstr ; _ _lpstr = _ _ _lpstr = function lpstr _ ( b , i ) { var len = _ _readUInt32LE ( b , i ) ; return len > 0 ? _ _utf8 ( b , i + 4 , i + 4 + len - 1 ) : "" } ; var _ _lpwstr , _ _ _lpwstr ; _ _lpwstr = _ _ _lpwstr = function lpwstr _ ( b , i ) { var len = 2 * _ _readUInt32LE ( b , i ) ; return len > 0 ? _ _utf8 ( b , i + 4 , i + 4 + len - 1 ) : "" } ; var _ _double , _ _ _double ; _ _double = _ _ _double = function ( b , idx ) { return read _double _le ( b , idx ) } ; var is _buf = function is _buf _a ( a ) { return Array . isArray ( a ) } ; if ( has _buf ) { _ _utf16le = function utf16le _b ( b , s , e ) { if ( ! Buffer . isBuffer ( b ) ) return _ _ _utf16le ( b , s , e ) ; return b . toString ( "utf16le" , s , e ) } ; _ _hexlify = function ( b , s , l ) { return Buffer . isBuffer ( b ) ? b . toString ( "hex" , s , s + l ) : _ _ _hexlify ( b , s , l ) } ; _ _lpstr = function lpstr _b ( b , i ) { if ( ! Buffer . isBuffer ( b ) ) return _ _ _lpstr ( b , i ) ; var len = b . readUInt32LE ( i ) ; return len > 0 ? b . toString ( "utf8" , i + 4 , i + 4 + len - 1 ) : "" } ; _ _lpwstr = function lpwstr _b ( b , i ) { if ( ! Buffer . isBuffer ( b ) ) return _ _ _lpwstr ( b , i ) ; var len = 2 * b . readUInt32LE ( i ) ; return b . toString ( "utf16le" , i + 4 , i + 4 + len - 1 ) } ; _ _utf8 = function utf8 _b ( b , s , e ) { return b . toString ( "utf8" , s , e ) } ; _ _toBuffer = function ( bufs ) { return bufs [ 0 ] . length > 0 && Buffer . isBuffer ( bufs [ 0 ] [ 0 ] ) ? Buffer . concat ( bufs [ 0 ] ) : _ _ _toBuffer ( bufs ) } ; bconcat = function ( bufs ) { return Buffer . isBuffer ( bufs [ 0 ] ) ? Buffer . concat ( bufs ) : [ ] . concat . apply ( [ ] , bufs ) } ; _ _double = function double _ ( b , i ) { if ( Buffer . isBuffer ( b ) ) return b . readDoubleLE ( i ) ; return _ _ _double ( b , i ) } ; is _buf = function is _buf _b ( a ) { return Buffer . isBuffer ( a ) || Array . isArray ( a ) } } if ( typeof cptable !== "undefined" ) { _ _utf16le = function ( b , s , e ) { return cptable . utils . decode ( 1200 , b . slice ( s , e ) ) } ; _ _utf8 = function ( b , s , e ) { return cptable . utils . decode ( 65001 , b . slice ( s , e ) ) } ; _ _lpstr = function ( b , i ) { var len = _ _readUInt32LE ( b , i ) ; return len > 0 ? cptable . utils . decode ( current _codepage , b . slice ( i + 4 , i + 4 + len - 1 ) ) : "" } ; _ _lpwstr = function ( b , i ) { var len = 2 * _ _readUInt32LE ( b , i ) ; return len > 0 ? cptable . utils . decode ( 1200 , b . slice ( i + 4 , i + 4 + len - 1 ) ) : "" } } var _ _readUInt8 = function ( b , idx ) { return b [ idx ] } ; var _ _readUInt16LE = function ( b , idx ) { return b [ idx + 1 ] * ( 1 << 8 ) + b [ idx ] } ; var _ _readInt16LE = function ( b , idx ) { var u = b [ idx + 1 ] * ( 1 << 8 ) + b [ idx ] ; return u < 32768 ? u : ( 65535 - u + 1 ) * - 1 } ; var _ _readUInt32LE = function ( b , idx ) { return b [ idx + 3 ] * ( 1 << 24 ) + ( b [ idx + 2 ] << 16 ) + ( b [ idx + 1 ] << 8 ) + b [ idx ] } ; var _ _readInt32LE = function ( b , idx ) { return b [ idx + 3 ] << 24 | b [ idx + 2 ] << 16 | b [ idx + 1 ] << 8 | b [ idx ] } ; var _ _ _unhexlify = function ( s ) { return s . match ( /../g ) . map ( function ( x ) { return parseInt ( x , 16 ) } ) } ; var _ _unhexlify = typeof Buffer !== "undefined" ? function ( s ) { return Buffer . isBuffer ( s ) ? new Buffer ( s , "hex" ) : _ _ _unhexlify ( s ) } : _ _ _unhexlify ; function ReadShift ( size , t ) { var o = "" , oI , oR , oo = [ ] , w , vv , i , loc ; switch ( t ) { case "dbcs" : loc = this . l ; if ( has _buf && Buffer . isBuffer ( this ) ) o = this . slice ( this . l , this . l + 2 * size ) . toString ( "utf16le" ) ; else for ( i = 0 ; i != size ; ++ i ) { o += String . fromCharCode ( _ _readUInt16LE ( this , loc ) ) ; loc += 2 } size *= 2 ; break ; case "utf8" : o = _ _utf8 ( this , this . l , this . l + size ) ; break ; case "utf16le" : size *= 2 ; o = _ _utf16le ( this , this . l , this . l + size ) ; break ; case "wstr" : if ( typeof cptable !== "undefined" ) o = cptable . utils . decode ( current _codepage , this . slice ( this . l , this . l + 2 * size ) ) ; else return ReadShift . call ( this , size , "dbcs" ) ; size = 2 * size ; break ; case "lpstr" : o = _ _lpstr ( this , this . l ) ; size = 5 + o . length ; break ; case "lpwstr" : o = _ _lpwstr ( this , this . l ) ; size = 5 + o . length ; if ( o [ o . length - 1 ] == "\0" ) size += 2 ; break ; case "cstr" : size = 0 ; o = "" ; while ( ( w = _ _readUInt8 ( this , this . l + size ++ ) ) !== 0 ) oo . push ( _getchar ( w ) ) ; o = oo . join ( "" ) ; break ; case "_wstr" : size = 0 ; o = "" ; while ( ( w = _ _readUInt16LE ( this , this . l + size ) ) !== 0 ) { oo . push ( _getchar ( w ) ) ; size += 2 } size += 2 ; o = oo . join ( "" ) ; break ; case "dbcs-cont" : o = "" ; loc = this . l ; for ( i = 0 ; i != size ; ++ i ) { if ( this . lens && this . lens . indexOf ( loc ) !== - 1 ) { w = _ _readUInt8 ( this , loc ) ; this . l = loc + 1 ; vv = ReadShift . call ( this , size - i , w ? "dbcs-cont" : "sbcs-cont" ) ; return oo . join ( "" ) + vv } oo . push ( _getchar ( _ _readUInt16LE ( this , loc ) ) ) ; loc += 2 } o = oo . join ( "" ) ; size *= 2 ; break ; case "sbcs-cont" : o = "" ; loc = this . l ; for ( i = 0 ; i != size ; ++ i ) { if ( this . lens && this . lens . indexOf ( loc ) !== - 1 ) { w = _ _readUInt8 ( this , loc ) ; this . l = loc + 1 ; vv = ReadShift . call ( this , size - i , w ? "dbcs-cont" : "sbcs-cont" ) ; return oo . join ( "" ) + vv } oo . push ( _getchar ( _ _readUInt8 ( this , loc ) ) ) ;
XMLNS . EXT _PROPS = "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" ; RELS . EXT _PROPS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" ; function parse _ext _props ( data , p ) { var q = { } ; if ( ! p ) p = { } ; EXT _PROPS . forEach ( function ( f ) { switch ( f [ 2 ] ) { case "string" : p [ f [ 1 ] ] = ( data . match ( matchtag ( f [ 0 ] ) ) || [ ] ) [ 1 ] ; break ; case "bool" : p [ f [ 1 ] ] = ( data . match ( matchtag ( f [ 0 ] ) ) || [ ] ) [ 1 ] === "true" ; break ; case "raw" : var cur = data . match ( new RegExp ( "<" + f [ 0 ] + "[^>]*>(.*)</" + f [ 0 ] + ">" ) ) ; if ( cur && cur . length > 0 ) q [ f [ 1 ] ] = cur [ 1 ] ; break } } ) ; if ( q . HeadingPairs && q . TitlesOfParts ) { var v = parseVector ( q . HeadingPairs ) ; var parts = parseVector ( q . TitlesOfParts ) . map ( function ( x ) { return x . v } ) ; var idx = 0 , len = 0 ; for ( var i = 0 ; i !== v . length ; i += 2 ) { len = + v [ i + 1 ] . v ; switch ( v [ i ] . v ) { case "Worksheets" : case "工作表" : case "Листы" : case "ワークシート" : case "גליונות עבודה" : case "Arbeitsblätter" : case "Çalı şma Sayfaları " : case "Feuilles de calcul" : case "Fogli di lavoro" : case "Folhas de cálculo" : case "Planilhas" : case "Werkbladen" : p . Worksheets = len ; p . SheetNames = parts . slice ( idx , idx + len ) ; break ; case "Named Ranges" : case "Benannte Bereiche" : p . NamedRanges = len ; p . DefinedNames = parts . slice ( idx , idx + len ) ; break ; case "Charts" : case "Diagramme" : p . Chartsheets = len ; p . ChartNames = parts . slice ( idx , idx + len ) ; break } idx += len } } return p } var EXT _PROPS _XML _ROOT = writextag ( "Properties" , null , { xmlns : XMLNS . EXT _PROPS , "xmlns:vt" : XMLNS . vt } ) ; function write _ext _props ( cp , opts ) { var o = [ ] , p = { } , W = writextag ; if ( ! cp ) cp = { } ; cp . Application = "SheetJS" ; o [ o . length ] = XML _HEADER ; o [ o . length ] = EXT _PROPS _XML _ROOT ; EXT _PROPS . forEach ( function ( f ) { if ( cp [ f [ 1 ] ] === undefined ) return ; var v ; switch ( f [ 2 ] ) { case "string" : v = cp [ f [ 1 ] ] ; break ; case "bool" : v = cp [ f [ 1 ] ] ? "true" : "false" ; break } if ( v !== undefined ) o [ o . length ] = W ( f [ 0 ] , v ) } ) ; o [ o . length ] = W ( "HeadingPairs" , W ( "vt:vector" , W ( "vt:variant" , "<vt:lpstr>Worksheets</vt:lpstr>" ) + W ( "vt:variant" , W ( "vt:i4" , String ( cp . Worksheets ) ) ) , { size : 2 , baseType : "variant" } ) ) ; o [ o . length ] = W ( "TitlesOfParts" , W ( "vt:vector" , cp . SheetNames . map ( function ( s ) { return "<vt:lpstr>" + escapexml ( s ) + "</vt:lpstr>" } ) . join ( "" ) , { size : cp . Worksheets , baseType : "lpstr" } ) ) ; if ( o . length > 2 ) { o [ o . length ] = "</Properties>" ; o [ 1 ] = o [ 1 ] . replace ( "/>" , ">" ) } return o . join ( "" ) } XMLNS . CUST _PROPS = "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" ; RELS . CUST _PROPS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" ; var custregex = /<[^>]+>[^<]*/g ; function parse _cust _props ( data , opts ) { var p = { } , name = "" ; var m = data . match ( custregex ) ; if ( m ) for ( var i = 0 ; i != m . length ; ++ i ) { var x = m [ i ] , y = parsexmltag ( x ) ; switch ( y [ 0 ] ) { case "<?xml" : break ; case "<Properties" : break ; case "<property" : name = y . name ; break ; case "</property>" : name = null ; break ; default : if ( x . indexOf ( "<vt:" ) === 0 ) { var toks = x . split ( ">" ) ; var type = toks [ 0 ] . substring ( 4 ) , text = toks [ 1 ] ; switch ( type ) { case "lpstr" : case "bstr" : case "lpwstr" : p [ name ] = unescapexml ( text ) ; break ; case "bool" : p [ name ] = parsexmlbool ( text , "<vt:bool>" ) ; break ; case "i1" : case "i2" : case "i4" : case "i8" : case "int" : case "uint" : p [ name ] = parseInt ( text , 10 ) ; break ; case "r4" : case "r8" : case "decimal" : p [ name ] = parseFloat ( text ) ; break ; case "filetime" : case "date" : p [ name ] = parseDate ( text ) ; break ; case "cy" : case "error" : p [ name ] = unescapexml ( text ) ; break ; default : if ( opts . WTF && typeof console !== "undefined" ) console . warn ( "Unexpected" , x , type , toks ) } } else if ( x . substr ( 0 , 2 ) === "</" ) { } else if ( opts . WTF ) throw new Error ( x ) } } return p } var CUST _PROPS _XML _ROOT = writextag ( "Properties" , null , { xmlns : XMLNS . CUST _PROPS , "xmlns:vt" : XMLNS . vt } ) ; function write _cust _props ( cp , opts ) { var o = [ XML _HEADER , CUST _PROPS _XML _ROOT ] ; if ( ! cp ) return o . join ( "" ) ; var pid = 1 ; keys ( cp ) . forEach ( function custprop ( k ) { ++ pid ; o [ o . length ] = writextag ( "property" , write _vt ( cp [ k ] ) , { fmtid : "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" , pid : pid , name : k } ) } ) ; if ( o . length > 2 ) { o [ o . length ] = "</Properties>" ; o [ 1 ] = o [ 1 ] . replace ( "/>" , ">" ) } return o . join ( "" ) } function xlml _set _prop ( Props , tag , val ) { switch ( tag ) { case "Description" : tag = "Comments" ; break ; case "Created" : tag = "CreatedDate" ; break ; case "LastSaved" : tag = "ModifiedDate" ; break } Props [ tag ] = val } var XLMLDocumentProperties = [ [ "Title" , "Title" ] , [ "Subject" , "Subject" ] , [ "Author" , "Author" ] , [ "Keywords" , "Keywords" ] , [ "Comments" , " D
var parse _FilterMode = parsenoop ; var parse _AutoFilterInfo = parsenoop ; var parse _AutoFilter = parsenoop ; var parse _Setup = parsenoop ; var parse _ScenMan = parsenoop ; var parse _SCENARIO = parsenoop ; var parse _SxView = parsenoop ; var parse _Sxvd = parsenoop ; var parse _SXVI = parsenoop ; var parse _SxIvd = parsenoop ; var parse _SXLI = parsenoop ; var parse _SXPI = parsenoop ; var parse _DocRoute = parsenoop ; var parse _RecipName = parsenoop ; var parse _SXDI = parsenoop ; var parse _SXDB = parsenoop ; var parse _SXFDB = parsenoop ; var parse _SXDBB = parsenoop ; var parse _SXNum = parsenoop ; var parse _SxErr = parsenoop ; var parse _SXInt = parsenoop ; var parse _SXString = parsenoop ; var parse _SXDtr = parsenoop ; var parse _SxNil = parsenoop ; var parse _SXTbl = parsenoop ; var parse _SXTBRGIITM = parsenoop ; var parse _SxTbpg = parsenoop ; var parse _ObProj = parsenoop ; var parse _SXStreamID = parsenoop ; var parse _DBCell = parsenoop ; var parse _SXRng = parsenoop ; var parse _SxIsxoper = parsenoop ; var parse _BookBool = parsenoop ; var parse _DbOrParamQry = parsenoop ; var parse _OleObjectSize = parsenoop ; var parse _SXVS = parsenoop ; var parse _BkHim = parsenoop ; var parse _MsoDrawingGroup = parsenoop ; var parse _MsoDrawing = parsenoop ; var parse _MsoDrawingSelection = parsenoop ; var parse _PhoneticInfo = parsenoop ; var parse _SxRule = parsenoop ; var parse _SXEx = parsenoop ; var parse _SxFilt = parsenoop ; var parse _SxDXF = parsenoop ; var parse _SxItm = parsenoop ; var parse _SxName = parsenoop ; var parse _SxSelect = parsenoop ; var parse _SXPair = parsenoop ; var parse _SxFmla = parsenoop ; var parse _SxFormat = parsenoop ; var parse _SXVDEx = parsenoop ; var parse _SXFormula = parsenoop ; var parse _SXDBEx = parsenoop ; var parse _RRDInsDel = parsenoop ; var parse _RRDHead = parsenoop ; var parse _RRDChgCell = parsenoop ; var parse _RRDRenSheet = parsenoop ; var parse _RRSort = parsenoop ; var parse _RRDMove = parsenoop ; var parse _RRFormat = parsenoop ; var parse _RRAutoFmt = parsenoop ; var parse _RRInsertSh = parsenoop ; var parse _RRDMoveBegin = parsenoop ; var parse _RRDMoveEnd = parsenoop ; var parse _RRDInsDelBegin = parsenoop ; var parse _RRDInsDelEnd = parsenoop ; var parse _RRDConflict = parsenoop ; var parse _RRDDefName = parsenoop ; var parse _RRDRstEtxp = parsenoop ; var parse _LRng = parsenoop ; var parse _CUsr = parsenoop ; var parse _CbUsr = parsenoop ; var parse _UsrInfo = parsenoop ; var parse _UsrExcl = parsenoop ; var parse _FileLock = parsenoop ; var parse _RRDInfo = parsenoop ; var parse _BCUsrs = parsenoop ; var parse _UsrChk = parsenoop ; var parse _UserBView = parsenoop ; var parse _UserSViewBegin = parsenoop ; var parse _UserSViewEnd = parsenoop ; var parse _RRDUserView = parsenoop ; var parse _Qsi = parsenoop ; var parse _CondFmt = parsenoop ; var parse _CF = parsenoop ; var parse _DVal = parsenoop ; var parse _DConBin = parsenoop ; var parse _Lel = parsenoop ; var parse _XLSCodeName = parse _XLUnicodeString ; var parse _SXFDBType = parsenoop ; var parse _ObNoMacros = parsenoop ; var parse _Dv = parsenoop ; var parse _Index = parsenoop ; var parse _Table = parsenoop ; var parse _BigName = parsenoop ; var parse _ContinueBigName = parsenoop ; var parse _WebPub = parsenoop ; var parse _QsiSXTag = parsenoop ; var parse _DBQueryExt = parsenoop ; var parse _ExtString = parsenoop ; var parse _TxtQry = parsenoop ; var parse _Qsir = parsenoop ; var parse _Qsif = parsenoop ; var parse _RRDTQSIF = parsenoop ; var parse _OleDbConn = parsenoop ; var parse _WOpt = parsenoop ; var parse _SXViewEx = parsenoop ; var parse _SXTH = parsenoop ; var parse _SXPIEx = parsenoop ; var parse _SXVDTEx = parsenoop ; var parse _SXViewEx9 = parsenoop ; var parse _ContinueFrt = parsenoop ; var parse _RealTimeData = parsenoop ; var parse _ChartFrtInfo = parsenoop ; var parse _FrtWrapper = parsenoop ; var parse _StartBlock = parsenoop ; var parse _EndBlock = parsenoop ; var parse _StartObject = parsenoop ; var parse _EndObject = parsenoop ; var parse _CatLab = parsenoop ; var parse _YMult = parsenoop ; var parse _SXViewLink = parsenoop ; var parse _PivotChartBits = parsenoop ; var parse _FrtFontList = parsenoop ; var parse _SheetExt = parsenoop ; var parse _BookExt = parsenoop ; var parse _SXAddl = parsenoop ; var parse _CrErr = parsenoop ; var parse _HFPicture = parsenoop ; var parse _Feat = parsenoop ; var parse _DataLabExt = parsenoop ; var parse _DataLabExtContents = parsenoop ; var parse _CellWatch = parsenoop ; var parse _FeatHdr11 = parsenoop ; var parse _Feature11 = parsenoop ; var parse _DropDownObjIds = parsenoop ; var parse _ContinueFrt11 = parsenoop ; var parse _DConn = parsenoop ; var parse _List12 = parsenoop ; var parse _Feature12 = parsenoop ; var parse _CondFmt12
o . Salt = blob . read _shift ( 16 ) ; o . EncryptedVerifier = blob . read _shift ( 16 ) ; o . EncryptedVerifierHash = blob . read _shift ( 16 ) ; return o } function crypto _CreatePasswordVerifier _Method1 ( Password ) { var Verifier = 0 , PasswordArray ; var PasswordDecoded = _JS2ANSI ( Password ) ; var len = PasswordDecoded . length + 1 , i , PasswordByte ; var Intermediate1 , Intermediate2 , Intermediate3 ; PasswordArray = new _raw _buf ( len ) ; PasswordArray [ 0 ] = PasswordDecoded . length ; for ( i = 1 ; i != len ; ++ i ) PasswordArray [ i ] = PasswordDecoded [ i - 1 ] ; for ( i = len - 1 ; i >= 0 ; -- i ) { PasswordByte = PasswordArray [ i ] ; Intermediate1 = ( Verifier & 16384 ) === 0 ? 0 : 1 ; Intermediate2 = Verifier << 1 & 32767 ; Intermediate3 = Intermediate1 | Intermediate2 ; Verifier = Intermediate3 ^ PasswordByte } return Verifier ^ 52811 } var crypto _CreateXorArray _Method1 = function ( ) { var PadArray = [ 187 , 255 , 255 , 186 , 255 , 255 , 185 , 128 , 0 , 190 , 15 , 0 , 191 , 15 , 0 ] ; var InitialCode = [ 57840 , 7439 , 52380 , 33984 , 4364 , 3600 , 61902 , 12606 , 6258 , 57657 , 54287 , 34041 , 10252 , 43370 , 20163 ] ; var XorMatrix = [ 44796 , 19929 , 39858 , 10053 , 20106 , 40212 , 10761 , 31585 , 63170 , 64933 , 60267 , 50935 , 40399 , 11199 , 17763 , 35526 , 1453 , 2906 , 5812 , 11624 , 23248 , 885 , 1770 , 3540 , 7080 , 14160 , 28320 , 56640 , 55369 , 41139 , 20807 , 41614 , 21821 , 43642 , 17621 , 28485 , 56970 , 44341 , 19019 , 38038 , 14605 , 29210 , 60195 , 50791 , 40175 , 10751 , 21502 , 43004 , 24537 , 18387 , 36774 , 3949 , 7898 , 15796 , 31592 , 63184 , 47201 , 24803 , 49606 , 37805 , 14203 , 28406 , 56812 , 17824 , 35648 , 1697 , 3394 , 6788 , 13576 , 27152 , 43601 , 17539 , 35078 , 557 , 1114 , 2228 , 4456 , 30388 , 60776 , 51953 , 34243 , 7079 , 14158 , 28316 , 14128 , 28256 , 56512 , 43425 , 17251 , 34502 , 7597 , 13105 , 26210 , 52420 , 35241 , 883 , 1766 , 3532 , 4129 , 8258 , 16516 , 33032 , 4657 , 9314 , 18628 ] ; var Ror = function ( Byte ) { return ( Byte / 2 | Byte * 128 ) & 255 } ; var XorRor = function ( byte1 , byte2 ) { return Ror ( byte1 ^ byte2 ) } ; var CreateXorKey _Method1 = function ( Password ) { var XorKey = InitialCode [ Password . length - 1 ] ; var CurrentElement = 104 ; for ( var i = Password . length - 1 ; i >= 0 ; -- i ) { var Char = Password [ i ] ; for ( var j = 0 ; j != 7 ; ++ j ) { if ( Char & 64 ) XorKey ^= XorMatrix [ CurrentElement ] ; Char *= 2 ; -- CurrentElement } } return XorKey } ; return function ( password ) { var Password = _JS2ANSI ( password ) ; var XorKey = CreateXorKey _Method1 ( Password ) ; var Index = Password . length ; var ObfuscationArray = new _raw _buf ( 16 ) ; for ( var i = 0 ; i != 16 ; ++ i ) ObfuscationArray [ i ] = 0 ; var Temp , PasswordLastChar , PadIndex ; if ( ( Index & 1 ) === 1 ) { Temp = XorKey >> 8 ; ObfuscationArray [ Index ] = XorRor ( PadArray [ 0 ] , Temp ) ; -- Index ; Temp = XorKey & 255 ; PasswordLastChar = Password [ Password . length - 1 ] ; ObfuscationArray [ Index ] = XorRor ( PasswordLastChar , Temp ) } while ( Index > 0 ) { -- Index ; Temp = XorKey >> 8 ; ObfuscationArray [ Index ] = XorRor ( Password [ Index ] , Temp ) ; -- Index ; Temp = XorKey & 255 ; ObfuscationArray [ Index ] = XorRor ( Password [ Index ] , Temp ) } Index = 15 ; PadIndex = 15 - Password . length ; while ( PadIndex > 0 ) { Temp = XorKey >> 8 ; ObfuscationArray [ Index ] = XorRor ( PadArray [ PadIndex ] , Temp ) ; -- Index ; -- PadIndex ; Temp = XorKey & 255 ; ObfuscationArray [ Index ] = XorRor ( Password [ Index ] , Temp ) ; -- Index ; -- PadIndex } return ObfuscationArray } } ( ) ; var crypto _DecryptData _Method1 = function ( password , Data , XorArrayIndex , XorArray , O ) { if ( ! O ) O = Data ; if ( ! XorArray ) XorArray = crypto _CreateXorArray _Method1 ( password ) ; var Index , Value ; for ( Index = 0 ; Index != Data . length ; ++ Index ) { Value = Data [ Index ] ; Value ^= XorArray [ XorArrayIndex ] ; Value = ( Value >> 5 | Value << 3 ) & 255 ; O [ Index ] = Value ; ++ XorArrayIndex } return [ O , XorArrayIndex , XorArray ] } ; var crypto _MakeXorDecryptor = function ( password ) { var XorArrayIndex = 0 , XorArray = crypto _CreateXorArray _Method1 ( password ) ; return function ( Data ) { var O = crypto _DecryptData _Method1 ( "" , Data , XorArrayIndex , XorArray ) ; XorArrayIndex = O [ 1 ] ; return O [ 0 ] } } ; function parse _XORObfuscation ( blob , length , opts , out ) { var o = { key : parseuint16 ( blob ) , verificationBytes : parseuint16 ( blob ) } ; if ( opts . password ) o . verifier = crypto _CreatePasswordVerifier _Method1 ( opts . password ) ; out . valid = o . verificationBytes === o . verifier ; if ( out . valid ) out . insitu _decrypt = crypto _MakeXorDecryptor ( opts . password ) ; return o } function parse _FilePassHeader ( blob , length , oo ) { var o = oo || { } ; o . Info = blob . read _shift ( 2 ) ; blob . l -= 2 ; if ( o . Info === 1 ) o . Data = parse _RC4Header ( blob , length ) ; else o . Data = parse _RC4CryptoHeader ( blob , length ) ; return o } function parse _FilePass ( blob , length , opts ) { var o = { Type : blob . read _shift ( 2 ) } ; if ( o . Type ) parse _FilePassHeader ( blob , length - 2 , o ) ; else parse _XORObfuscation ( blob , length - 2 , opts , o ) ; return o } function hex2RGB
} ) . forEach ( function ( c , i ) { o = o . concat ( [ "<v:shape" + wxt _helper ( { id : "_x0000_s" + ++ _shapeid , type : "#_x0000_t202" , style : "position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10;visibility:hidden" , fillcolor : "#ECFAD4" , strokecolor : "#edeaa1" } ) + ">" , writextag ( "v:fill" , writextag ( "o:fill" , null , { type : "gradientUnscaled" , "v:ext" : "view" } ) , { color2 : "#BEFF82" , angle : "-180" , type : "gradient" } ) , writextag ( "v:shadow" , null , { on : "t" , obscured : "t" } ) , writextag ( "v:path" , null , { "o:connecttype" : "none" } ) , '<v:textbox><div style="text-align:left"></div></v:textbox>' , '<x:ClientData ObjectType="Note">' , "<x:MoveWithCells/>" , "<x:SizeWithCells/>" , writetag ( "x:Anchor" , [ c . c , 0 , c . r , 0 , c . c + 3 , 100 , c . r + 5 , 100 ] . join ( "," ) ) , writetag ( "x:AutoFill" , "False" ) , writetag ( "x:Row" , String ( c . r ) ) , writetag ( "x:Column" , String ( c . c ) ) , "</x:ClientData>" , "</v:shape>" ] ) } ) ; o . push ( "</xml>" ) ; return o . join ( "" ) } RELS . CMNT = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" ; function parse _comments ( zip , dirComments , sheets , sheetRels , opts ) { for ( var i = 0 ; i != dirComments . length ; ++ i ) { var canonicalpath = dirComments [ i ] ; var comments = parse _cmnt ( getzipdata ( zip , canonicalpath . replace ( /^\// , "" ) , true ) , canonicalpath , opts ) ; if ( ! comments || ! comments . length ) continue ; var sheetNames = keys ( sheets ) ; for ( var j = 0 ; j != sheetNames . length ; ++ j ) { var sheetName = sheetNames [ j ] ; var rels = sheetRels [ sheetName ] ; if ( rels ) { var rel = rels [ canonicalpath ] ; if ( rel ) insertCommentsIntoSheet ( sheetName , sheets [ sheetName ] , comments ) } } } } function insertCommentsIntoSheet ( sheetName , sheet , comments ) { var dense = Array . isArray ( sheet ) ; var cell , r ; comments . forEach ( function ( comment ) { if ( dense ) { r = decode _cell ( comment . ref ) ; if ( ! sheet [ r . r ] ) sheet [ r . r ] = [ ] ; cell = sheet [ r . r ] [ r . c ] } else cell = sheet [ comment . ref ] ; if ( ! cell ) { cell = { } ; if ( dense ) sheet [ r . r ] [ r . c ] = cell ; else sheet [ comment . ref ] = cell ; var range = safe _decode _range ( sheet [ "!ref" ] || "BDWGO1000001:A1" ) ; var thisCell = decode _cell ( comment . ref ) ; if ( range . s . r > thisCell . r ) range . s . r = thisCell . r ; if ( range . e . r < thisCell . r ) range . e . r = thisCell . r ; if ( range . s . c > thisCell . c ) range . s . c = thisCell . c ; if ( range . e . c < thisCell . c ) range . e . c = thisCell . c ; var encoded = encode _range ( range ) ; if ( encoded !== sheet [ "!ref" ] ) sheet [ "!ref" ] = encoded } if ( ! cell . c ) cell . c = [ ] ; var o = { a : comment . author , t : comment . t , r : comment . r } ; if ( comment . h ) o . h = comment . h ; cell . c . push ( o ) } ) } function parse _comments _xml ( data , opts ) { if ( data . match ( /<(?:\w+:)?comments *\/>/ ) ) return [ ] ; var authors = [ ] ; var commentList = [ ] ; var authtag = data . match ( /<(?:\w+:)?authors>([^\u2603]*)<\/(?:\w+:)?authors>/ ) ; if ( authtag && authtag [ 1 ] ) authtag [ 1 ] . split ( /<\/\w*:?author>/ ) . forEach ( function ( x ) { if ( x === "" || x . trim ( ) === "" ) return ; var a = x . match ( /<(?:\w+:)?author[^>]*>(.*)/ ) ; if ( a ) authors . push ( a [ 1 ] ) } ) ; var cmnttag = data . match ( /<(?:\w+:)?commentList>([^\u2603]*)<\/(?:\w+:)?commentList>/ ) ; if ( cmnttag && cmnttag [ 1 ] ) cmnttag [ 1 ] . split ( /<\/\w*:?comment>/ ) . forEach ( function ( x , index ) { if ( x === "" || x . trim ( ) === "" ) return ; var cm = x . match ( /<(?:\w+:)?comment[^>]*>/ ) ; if ( ! cm ) return ; var y = parsexmltag ( cm [ 0 ] ) ; var comment = { author : y . authorId && authors [ y . authorId ] ? authors [ y . authorId ] : "sheetjsghost" , ref : y . ref , guid : y . guid } ; var cell = decode _cell ( y . ref ) ; if ( opts . sheetRows && opts . sheetRows <= cell . r ) return ; var textMatch = x . match ( /<(?:\w+:)?text>([^\u2603]*)<\/(?:\w+:)?text>/ ) ; var rt = ! ! textMatch && ! ! textMatch [ 1 ] && parse _si ( textMatch [ 1 ] ) || { r : "" , t : "" , h : "" } ; comment . r = rt . r ; if ( rt . r == "<t></t>" ) rt . t = rt . h = "" ; comment . t = rt . t . replace ( /\r\n/g , "\n" ) . replace ( /\r/g , "\n" ) ; if ( opts . cellHTML ) comment . h = rt . h ; commentList . push ( comment ) } ) ; return commentList } var CMNT _XML _ROOT = writextag ( "comments" , null , { xmlns : XMLNS . main [ 0 ] } ) ; function write _comments _xml ( data , opts ) { var o = [ XML _HEADER , CMNT _XML _ROOT ] ; var iauthor = [ ] ; o . push ( "<authors>" ) ; data . map ( function ( x ) { return x [ 1 ] } ) . forEach ( function ( comment ) { comment . map ( function ( x ) { return escapexml ( x . a ) } ) . forEach ( function ( a ) { if ( iauthor . indexOf ( a ) > - 1 ) return ; iauthor . push ( a ) ; o . push ( "<author>" + a + "</author>" ) } ) } ) ; o . push ( "</authors>" ) ; o . push ( "<commentList>" ) ; data . forEach ( function ( d ) { d [ 1 ] . forEach ( function ( c ) { o . push ( '<comment ref="' + d [ 0 ] + '" authorId="' + iauthor . indexOf ( escapexml ( c . a ) ) + '"><text>' ) ; o . push ( writetag ( "t" , c . t == null ? "" : c . t ) ) ; o . push ( "</text></comment>" ) } ) } ) ; o . push (
313 : "PIVOT.FIELD.PROPERTIES" , 314 : "PIVOT.FIELD" , 315 : "PIVOT.ITEM" , 316 : "PIVOT.ADD.FIELDS" , 318 : "OPTIONS.CALCULATION" , 319 : "OPTIONS.EDIT" , 320 : "OPTIONS.VIEW" , 321 : "ADDIN.MANAGER" , 322 : "MENU.EDITOR" , 323 : "ATTACH.TOOLBARS" , 324 : "VBAActivate" , 325 : "OPTIONS.CHART" , 328 : "VBA.INSERT.FILE" , 330 : "VBA.PROCEDURE.DEFINITION" , 336 : "ROUTING.SLIP" , 338 : "ROUTE.DOCUMENT" , 339 : "MAIL.LOGON" , 342 : "INSERT.PICTURE" , 343 : "EDIT.TOOL" , 344 : "GALLERY.DOUGHNUT" , 350 : "CHART.TREND" , 352 : "PIVOT.ITEM.PROPERTIES" , 354 : "WORKBOOK.INSERT" , 355 : "OPTIONS.TRANSITION" , 356 : "OPTIONS.GENERAL" , 370 : "FILTER.ADVANCED" , 373 : "MAIL.ADD.MAILER" , 374 : "MAIL.DELETE.MAILER" , 375 : "MAIL.REPLY" , 376 : "MAIL.REPLY.ALL" , 377 : "MAIL.FORWARD" , 378 : "MAIL.NEXT.LETTER" , 379 : "DATA.LABEL" , 380 : "INSERT.TITLE" , 381 : "FONT.PROPERTIES" , 382 : "MACRO.OPTIONS" , 383 : "WORKBOOK.HIDE" , 384 : "WORKBOOK.UNHIDE" , 385 : "WORKBOOK.DELETE" , 386 : "WORKBOOK.NAME" , 388 : "GALLERY.CUSTOM" , 390 : "ADD.CHART.AUTOFORMAT" , 391 : "DELETE.CHART.AUTOFORMAT" , 392 : "CHART.ADD.DATA" , 393 : "AUTO.OUTLINE" , 394 : "TAB.ORDER" , 395 : "SHOW.DIALOG" , 396 : "SELECT.ALL" , 397 : "UNGROUP.SHEETS" , 398 : "SUBTOTAL.CREATE" , 399 : "SUBTOTAL.REMOVE" , 400 : "RENAME.OBJECT" , 412 : "WORKBOOK.SCROLL" , 413 : "WORKBOOK.NEXT" , 414 : "WORKBOOK.PREV" , 415 : "WORKBOOK.TAB.SPLIT" , 416 : "FULL.SCREEN" , 417 : "WORKBOOK.PROTECT" , 420 : "SCROLLBAR.PROPERTIES" , 421 : "PIVOT.SHOW.PAGES" , 422 : "TEXT.TO.COLUMNS" , 423 : "FORMAT.CHARTTYPE" , 424 : "LINK.FORMAT" , 425 : "TRACER.DISPLAY" , 430 : "TRACER.NAVIGATE" , 431 : "TRACER.CLEAR" , 432 : "TRACER.ERROR" , 433 : "PIVOT.FIELD.GROUP" , 434 : "PIVOT.FIELD.UNGROUP" , 435 : "CHECKBOX.PROPERTIES" , 436 : "LABEL.PROPERTIES" , 437 : "LISTBOX.PROPERTIES" , 438 : "EDITBOX.PROPERTIES" , 439 : "PIVOT.REFRESH" , 440 : "LINK.COMBO" , 441 : "OPEN.TEXT" , 442 : "HIDE.DIALOG" , 443 : "SET.DIALOG.FOCUS" , 444 : "ENABLE.OBJECT" , 445 : "PUSHBUTTON.PROPERTIES" , 446 : "SET.DIALOG.DEFAULT" , 447 : "FILTER" , 448 : "FILTER.SHOW.ALL" , 449 : "CLEAR.OUTLINE" , 450 : "FUNCTION.WIZARD" , 451 : "ADD.LIST.ITEM" , 452 : "SET.LIST.ITEM" , 453 : "REMOVE.LIST.ITEM" , 454 : "SELECT.LIST.ITEM" , 455 : "SET.CONTROL.VALUE" , 456 : "SAVE.COPY.AS" , 458 : "OPTIONS.LISTS.ADD" , 459 : "OPTIONS.LISTS.DELETE" , 460 : "SERIES.AXES" , 461 : "SERIES.X" , 462 : "SERIES.Y" , 463 : "ERRORBAR.X" , 464 : "ERRORBAR.Y" , 465 : "FORMAT.CHART" , 466 : "SERIES.ORDER" , 467 : "MAIL.LOGOFF" , 468 : "CLEAR.ROUTING.SLIP" , 469 : "APP.ACTIVATE.MICROSOFT" , 470 : "MAIL.EDIT.MAILER" , 471 : "ON.SHEET" , 472 : "STANDARD.WIDTH" , 473 : "SCENARIO.MERGE" , 474 : "SUMMARY.INFO" , 475 : "FIND.FILE" , 476 : "ACTIVE.CELL.FONT" , 477 : "ENABLE.TIPWIZARD" , 478 : "VBA.MAKE.ADDIN" , 480 : "INSERTDATATABLE" , 481 : "WORKGROUP.OPTIONS" , 482 : "MAIL.SEND.MAILER" , 485 : "AUTOCORRECT" , 489 : "POST.DOCUMENT" , 491 : "PICKLIST" , 493 : "VIEW.SHOW" , 494 : "VIEW.DEFINE" , 495 : "VIEW.DELETE" , 509 : "SHEET.BACKGROUND" , 510 : "INSERT.MAP.OBJECT" , 511 : "OPTIONS.MENONO" , 517 : "MSOCHECKS" , 518 : "NORMAL" , 519 : "LAYOUT" , 520 : "RM.PRINT.AREA" , 521 : "CLEAR.PRINT.AREA" , 522 : "ADD.PRINT.AREA" , 523 : "MOVE.BRK" , 545 : "HIDECURR.NOTE" , 546 : "HIDEALL.NOTES" , 547 : "DELETE.NOTE" , 548 : "TRAVERSE.NOTES" , 549 : "ACTIVATE.NOTES" , 620 : "PROTECT.REVISIONS" , 621 : "UNPROTECT.REVISIONS" , 647 : "OPTIONS.ME" , 653 : "WEB.PUBLISH" , 667 : "NEWWEBQUERY" , 673 : "PIVOT.TABLE.CHART" , 753 : "OPTIONS.SAVE" , 755 : "OPTIONS.SPELL" , 808 : "HIDEALL.INKANNOTS" } ; var Ftab = { 0 : "COUNT" , 1 : "IF" , 2 : "ISNA" , 3 : "ISERROR" , 4 : "SUM" , 5 : "AVERAGE" , 6 : "MIN" , 7 : "MAX" , 8 : "ROW" , 9 : "COLUMN" , 10 : "NA" , 11 : "NPV" , 12 : "STDEV" , 13 : "DOLLAR" , 14 : "FIXED" , 15 : "SIN" , 16 : "COS" , 17 : "TAN" , 18 : "ATAN" , 19 : "PI" , 20 : "SQRT" , 21 : "EXP" , 22 : "LN" , 23 : "LOG10" , 24 : "ABS" , 25 : "INT" , 26 : "SIGN" , 27 : "ROUND" , 28 : "LOOKUP" , 29 : "INDEX" , 30 : "REPT" , 31 : "MID" , 32 : "LEN" , 33 : "VALUE" , 34 : "TRUE" , 35 : "FALSE" , 36 : "AND" , 37 : "OR" , 38 : "NOT" , 39 : "MOD" , 40 : "DCOUNT" , 41 : "DSUM" , 42 : "DAVERAGE" , 43 : "DMIN" , 44 : "DMAX" , 45 : "DSTDEV" , 46 : "VAR" , 47 : "DVAR" , 48 : "TEXT" , 49 : "LINEST" , 50 : "TREND" , 51 : "LOGEST" , 52 : "GROWTH" , 53 : "GOTO" , 54 : "HALT" , 55 : "RETURN" , 56 : "PV" , 57 : "FV" , 58 : "NPER" , 59 : "PMT" , 60 : "RATE" , 61 : "MIRR" , 62 : "IRR" , 63 : "RAND" , 64 : "MATCH" , 65 : "DATE" , 66 : "TIME" , 67 : "DAY" , 68 : "MONTH" , 69 : "YEAR" , 70 : "WEEKDAY" , 71 : "HOUR" , 72 : "MINUTE" , 73 : "SECOND" , 74 : "NOW" , 75 : "AREAS" , 76 : "ROWS" , 77 : "COLUMNS" , 78 : "OFFSET" , 79 : "ABSREF" , 80 : "RELREF" , 81 : "ARGUMENT" , 82 : "SEARCH" , 83 : "TRANSPOSE" , 84 : "ERROR" , 85 : "STEP" , 86 : "TYPE" , 87 : "ECHO" , 88 : "SET.NAME" , 89 : "CALLER" , 90 : "DEREF" , 91 : "WINDOWS" , 92 : "SERIES" , 93 : "DOCUMENTS" , 94 : "ACTIVE.CELL" , 95 : "SELECTION" , 96 : "RESULT" , 97 : "ATAN2" , 98 : "ASIN" , 99 : "ACOS" , 100 : " CHO
if ( opts . cellFormula ) { data . l += 2 ; var formula = parse _XLSBCellParsedFormula ( data , end - data . l , opts ) ; o [ 3 ] = stringify _formula ( formula , null , cell , opts . supbooks , opts ) } else data . l = end ; return o } function parse _BrtFmlaString ( data , length , opts ) { var end = data . l + length ; var cell = parse _XLSBCell ( data ) ; cell . r = opts [ "!row" ] ; var value = parse _XLWideString ( data ) ; var o = [ cell , value , "str" ] ; if ( opts . cellFormula ) { data . l += 2 ; var formula = parse _XLSBCellParsedFormula ( data , end - data . l , opts ) ; o [ 3 ] = stringify _formula ( formula , null , cell , opts . supbooks , opts ) } else data . l = end ; return o } var parse _BrtMergeCell = parse _UncheckedRfX ; var write _BrtMergeCell = write _UncheckedRfX ; function write _BrtBeginMergeCells ( cnt , o ) { if ( o == null ) o = new _buf ( 4 ) ; o . write _shift ( 4 , cnt ) ; return o } function parse _BrtHLink ( data , length , opts ) { var end = data . l + length ; var rfx = parse _UncheckedRfX ( data , 16 ) ; var relId = parse _XLNullableWideString ( data ) ; var loc = parse _XLWideString ( data ) ; var tooltip = parse _XLWideString ( data ) ; var display = parse _XLWideString ( data ) ; data . l = end ; return { rfx : rfx , relId : relId , loc : loc , Tooltip : tooltip , display : display } } function write _BrtHLink ( l , rId , o ) { if ( o == null ) o = new _buf ( 50 + 4 * l [ 1 ] . Target . length ) ; write _UncheckedRfX ( { s : decode _cell ( l [ 0 ] ) , e : decode _cell ( l [ 0 ] ) } , o ) ; write _RelID ( "rId" + rId , o ) ; var locidx = l [ 1 ] . Target . indexOf ( "#" ) ; var location = locidx == - 1 ? "" : l [ 1 ] . Target . substr ( locidx + 1 ) ; write _XLWideString ( location || "" , o ) ; write _XLWideString ( l [ 1 ] . Tooltip || "" , o ) ; write _XLWideString ( "" , o ) ; return o . slice ( 0 , o . l ) } function parse _BrtArrFmla ( data , length , opts ) { var end = data . l + length ; var rfx = parse _RfX ( data , 16 ) ; var fAlwaysCalc = data . read _shift ( 1 ) ; var o = [ rfx ] ; o [ 2 ] = fAlwaysCalc ; if ( opts . cellFormula ) { var formula = parse _XLSBArrayParsedFormula ( data , end - data . l , opts ) ; o [ 1 ] = formula } else data . l = end ; return o } function parse _BrtShrFmla ( data , length , opts ) { var end = data . l + length ; var rfx = parse _UncheckedRfX ( data , 16 ) ; var o = [ rfx ] ; if ( opts . cellFormula ) { var formula = parse _XLSBSharedParsedFormula ( data , end - data . l , opts ) ; o [ 1 ] = formula ; data . l = end } else data . l = end ; return o } function write _BrtColInfo ( C , col , o ) { if ( o == null ) o = new _buf ( 18 ) ; var p = col _obj _w ( C , col ) ; o . write _shift ( - 4 , C ) ; o . write _shift ( - 4 , C ) ; o . write _shift ( 4 , p . width * 256 ) ; o . write _shift ( 4 , 0 ) ; o . write _shift ( 1 , 2 ) ; o . write _shift ( 1 , 0 ) ; return o } function parse _ws _bin ( data , _opts , rels , wb , themes , styles ) { if ( ! data ) return data ; var opts = _opts || { } ; if ( ! rels ) rels = { "!id" : { } } ; if ( DENSE != null && opts . dense == null ) opts . dense = DENSE ; var s = opts . dense ? [ ] : { } ; var ref ; var refguess = { s : { r : 2e6 , c : 2e6 } , e : { r : 0 , c : 0 } } ; var pass = false , end = false ; var row , p , cf , R , C , addr , sstr , rr , cell ; var mergecells = [ ] ; opts . biff = 12 ; opts [ "!row" ] = 0 ; var ai = 0 , af = false ; var array _formulae = [ ] ; var shared _formulae = { } ; var supbooks = [ [ ] ] ; supbooks . sharedf = shared _formulae ; supbooks . arrayf = array _formulae ; opts . supbooks = supbooks ; for ( var i = 0 ; i < wb . Names [ "!names" ] . length ; ++ i ) supbooks [ 0 ] [ i + 1 ] = wb . Names [ wb . Names [ "!names" ] [ i ] ] ; var colinfo = [ ] , rowinfo = [ ] ; var defwidth = 0 , defheight = 0 ; var seencol = false ; recordhopper ( data , function ws _parse ( val , R _n , RT ) { if ( end ) return ; switch ( RT ) { case 148 : ref = val ; break ; case 0 : row = val ; if ( opts . sheetRows && opts . sheetRows <= row . r ) end = true ; rr = encode _row ( R = row . r ) ; opts [ "!row" ] = row . r ; break ; case 2 : case 3 : case 4 : case 5 : case 6 : case 7 : case 8 : case 9 : case 10 : case 11 : p = { t : val [ 2 ] } ; switch ( val [ 2 ] ) { case "n" : p . v = val [ 1 ] ; break ; case "s" : sstr = strs [ val [ 1 ] ] ; p . v = sstr . t ; p . r = sstr . r ; break ; case "b" : p . v = val [ 1 ] ? true : false ; break ; case "e" : p . v = val [ 1 ] ; p . w = BErr [ p . v ] ; break ; case "str" : p . t = "s" ; p . v = utf8read ( val [ 1 ] ) ; break } if ( cf = styles . CellXf [ val [ 0 ] . iStyleRef ] ) safe _format ( p , cf . ifmt , null , opts , themes , styles ) ; C = val [ 0 ] . c ; if ( opts . dense ) { if ( ! s [ R ] ) s [ R ] = [ ] ; s [ R ] [ C ] = p } else s [ encode _col ( C ) + rr ] = p ; if ( opts . cellFormula ) { af = false ; for ( ai = 0 ; ai < array _formulae . length ; ++ ai ) { var aii = array _formulae [ ai ] ; if ( row . r >= aii [ 0 ] . s . r && row . r <= aii [ 0 ] . e . r ) if ( C >= aii [ 0 ] . s . c && C <= aii [ 0 ] . e . c ) { p . F = encode _range ( aii [ 0 ] ) ; af = true } } if ( ! af && val . length > 3 ) p . f = val [ 3 ] } if ( refguess . s . r > row . r ) refguess . s . r = row . r ; if ( refguess . s . c > C ) refguess . s . c = C ; if ( refguess . e . r < row . r ) refguess . e . r = row . r ; if ( refguess . e . c < C ) refguess . e . c = C ; if ( opts . cellDates && cf && p . t == "n" && SSF . is _date ( SSF . _table [ cf . ifmt ] ) ) { var _d = SSF . parse _date _code ( p . v ) ; if ( _d ) { p . t = "d" ; p . v = new Date ( Date . UTC ( _d . y , _d . m - 1 , _d . d , _d . H , _d . M , _d . S , _d . u ) ) } } break ; ca
} else { refguess = { s : { r : 2e6 , c : 2e6 } , e : { r : 0 , c : 0 } } ; r = c = 0 ; state . push ( [ Rn [ 3 ] , false ] ) ; tmp = xlml _parsexmltag ( Rn [ 0 ] ) ; sheetname = unescapexml ( tmp . Name ) ; cursheet = opts . dense ? [ ] : { } ; mergecells = [ ] ; arrayf = [ ] ; rowinfo = [ ] ; wsprops = { name : sheetname , Hidden : 0 } ; Workbook . Sheets . push ( wsprops ) } break ; case "Table" : if ( Rn [ 1 ] === "/" ) { if ( ( tmp = state . pop ( ) ) [ 0 ] !== Rn [ 3 ] ) throw new Error ( "Bad state: " + tmp . join ( "|" ) ) } else if ( Rn [ 0 ] . slice ( - 2 ) == "/>" ) break ; else { table = xlml _parsexmltag ( Rn [ 0 ] ) ; state . push ( [ Rn [ 3 ] , false ] ) ; cstys = [ ] ; seencol = false } break ; case "Style" : if ( Rn [ 1 ] === "/" ) process _style _xlml ( styles , stag , opts ) ; else stag = xlml _parsexmltag ( Rn [ 0 ] ) ; break ; case "NumberFormat" : stag . nf = unescapexml ( xlml _parsexmltag ( Rn [ 0 ] ) . Format || "General" ) ; if ( XLMLFormatMap [ stag . nf ] ) stag . nf = XLMLFormatMap [ stag . nf ] ; for ( var ssfidx = 0 ; ssfidx != 392 ; ++ ssfidx ) if ( SSF . _table [ ssfidx ] == stag . nf ) break ; if ( ssfidx == 392 ) for ( ssfidx = 57 ; ssfidx != 392 ; ++ ssfidx ) if ( SSF . _table [ ssfidx ] == null ) { SSF . load ( stag . nf , ssfidx ) ; break } break ; case "Column" : if ( state [ state . length - 1 ] [ 0 ] !== "Table" ) break ; csty = xlml _parsexmltag ( Rn [ 0 ] ) ; csty . wpx = parseInt ( csty . Width , 10 ) ; if ( ! seencol && csty . wpx > 10 ) { seencol = true ; find _mdw _wpx ( csty . wpx ) ; for ( var _col = 0 ; _col < cstys . length ; ++ _col ) if ( cstys [ _col ] ) process _col ( cstys [ _col ] ) } if ( seencol ) process _col ( csty ) ; cstys [ csty . Index - 1 || cstys . length ] = csty ; for ( var i = 0 ; i < + csty . Span ; ++ i ) cstys [ cstys . length ] = dup ( csty ) ; break ; case "NamedRange" : break ; case "NamedCell" : break ; case "B" : break ; case "I" : break ; case "U" : break ; case "S" : break ; case "Sub" : break ; case "Sup" : break ; case "Span" : break ; case "Border" : break ; case "Alignment" : break ; case "Borders" : break ; case "Font" : if ( Rn [ 0 ] . slice ( - 2 ) === "/>" ) break ; else if ( Rn [ 1 ] === "/" ) ss += str . slice ( fidx , Rn . index ) ; else fidx = Rn . index + Rn [ 0 ] . length ; break ; case "Interior" : if ( ! opts . cellStyles ) break ; stag . Interior = xlml _parsexmltag ( Rn [ 0 ] ) ; break ; case "Protection" : break ; case "Author" : case "Title" : case "Description" : case "Created" : case "Keywords" : case "Subject" : case "Category" : case "Company" : case "LastAuthor" : case "LastSaved" : case "LastPrinted" : case "Version" : case "Revision" : case "TotalTime" : case "HyperlinkBase" : case "Manager" : if ( Rn [ 0 ] . slice ( - 2 ) === "/>" ) break ; else if ( Rn [ 1 ] === "/" ) xlml _set _prop ( Props , Rn [ 3 ] , str . slice ( pidx , Rn . index ) ) ; else pidx = Rn . index + Rn [ 0 ] . length ; break ; case "Paragraphs" : break ; case "Styles" : case "Workbook" : if ( Rn [ 1 ] === "/" ) { if ( ( tmp = state . pop ( ) ) [ 0 ] !== Rn [ 3 ] ) throw new Error ( "Bad state: " + tmp . join ( "|" ) ) } else state . push ( [ Rn [ 3 ] , false ] ) ; break ; case "Comment" : if ( Rn [ 1 ] === "/" ) { if ( ( tmp = state . pop ( ) ) [ 0 ] !== Rn [ 3 ] ) throw new Error ( "Bad state: " + tmp . join ( "|" ) ) ; xlml _clean _comment ( comment ) ; comments . push ( comment ) } else { state . push ( [ Rn [ 3 ] , false ] ) ; tmp = xlml _parsexmltag ( Rn [ 0 ] ) ; comment = { a : tmp . Author } } break ; case "Name" : break ; case "ComponentOptions" : case "DocumentProperties" : case "CustomDocumentProperties" : case "OfficeDocumentSettings" : case "PivotTable" : case "PivotCache" : case "Names" : case "MapInfo" : case "PageBreaks" : case "QueryTable" : case "DataValidation" : case "AutoFilter" : case "Sorting" : case "Schema" : case "data" : case "ConditionalFormatting" : case "SmartTagType" : case "SmartTags" : case "ExcelWorkbook" : case "WorkbookOptions" : case "WorksheetOptions" : if ( Rn [ 1 ] === "/" ) { if ( ( tmp = state . pop ( ) ) [ 0 ] !== Rn [ 3 ] ) throw new Error ( "Bad state: " + tmp . join ( "|" ) ) } else if ( Rn [ 0 ] . charAt ( Rn [ 0 ] . length - 2 ) !== "/" ) state . push ( [ Rn [ 3 ] , true ] ) ; break ; default : if ( state . length == 0 && Rn [ 3 ] == "document" ) return parse _fods ( str , opts ) ; if ( state . length == 0 && Rn [ 3 ] == "UOF" ) return parse _fods ( str , opts ) ; var seen = true ; switch ( state [ state . length - 1 ] [ 0 ] ) { case "OfficeDocumentSettings" : switch ( Rn [ 3 ] ) { case "AllowPNG" : break ; case "RemovePersonalInformation" : break ; case "DownloadComponents" : break ; case "LocationOfComponents" : break ; case "Colors" : break ; case "Color" : break ; case "Index" : break ; case "RGB" : break ; case "PixelsPerInch" : break ; case "TargetScreenSize" : break ; case "ReadOnlyRecommended" : break ; default : seen = false } break ; case "ComponentOptions" : switch ( Rn [ 3 ] ) { case "Toolbar" : break ; case "HideOfficeLogo" : break ; case "SpreadsheetAutoFit" : break ; case "Label" : break ; case "Caption" : break ; case "MaxHeight" : break ; case "MaxWidth" : break ; case "NextSheetNumber" : break ; default : seen = false } break ; case "ExcelWorkbook" : switch ( Rn [ 3 ] ) { case "WindowHeight" : break ; case "WindowWidth" : break ; case "WindowTopX" : break ; case "WindowTopY" : break ; case " T
case "TopMargin" : case "BottomMargin" : case "HeaderFooter" : case "HFPicture" : case "PLV" : case "HorizontalPageBreaks" : case "VerticalPageBreaks" : case "Backup" : case "CompressPictures" : case "Compat12" : break ; case "Continue" : case "ContinueFrt12" : break ; case "FrtFontList" : case "FrtWrapper" : break ; default : switch ( R . n ) { case "ExternCount" : break ; case "TabIdConf" : case "Radar" : case "RadarArea" : case "DropBar" : case "Intl" : case "CoordList" : case "SerAuxErrBar" : break ; case "BIFF2FONTCLR" : case "BIFF2FMTCNT" : case "BIFF2FONTXTRA" : break ; case "BIFF2XF" : case "BIFF3XF" : case "BIFF4XF" : break ; case "BIFF4FMTCNT" : case "BIFF2ROW" : case "BIFF2WINDOW2" : break ; case "SCENARIO" : case "DConBin" : case "PicF" : case "DataLabExt" : case "Lel" : case "BopPop" : case "BopPopCustom" : case "RealTimeData" : case "Name" : break ; default : if ( options . WTF ) throw "Unrecognized Record " + R . n } } } } } else blob . l += length } var sheetnamesraw = Object . keys ( Directory ) . sort ( function ( a , b ) { return Number ( a ) - Number ( b ) } ) . map ( function ( x ) { return Directory [ x ] . name } ) ; var sheetnames = sheetnamesraw . slice ( ) ; wb . Directory = sheetnamesraw ; wb . SheetNames = sheetnamesraw ; if ( ! options . bookSheets ) wb . Sheets = Sheets ; wb . Preamble = Preamble ; wb . Strings = sst ; wb . SSF = SSF . get _table ( ) ; if ( opts . enc ) wb . Encryption = opts . enc ; wb . Metadata = { } ; if ( country !== undefined ) wb . Metadata . Country = country ; wb . Workbook = Workbook ; return wb } function parse _xlscfb ( cfb , options ) { if ( ! options ) options = { } ; fix _read _opts ( options ) ; reset _cp ( ) ; var CompObj , Summary , Workbook ; if ( cfb . FullPaths ) { if ( cfb . find ( "EncryptedPackage" ) ) throw new Error ( "File is password-protected" ) ; CompObj = cfb . find ( "!CompObj" ) ; Summary = cfb . find ( "!SummaryInformation" ) ; Workbook = cfb . find ( "/Workbook" ) } else { prep _blob ( cfb , 0 ) ; Workbook = { content : cfb } } if ( ! Workbook ) Workbook = cfb . find ( "/Book" ) ; var CompObjP , SummaryP , WorkbookP ; if ( CompObj ) CompObjP = parse _compobj ( CompObj ) ; if ( options . bookProps && ! options . bookSheets ) WorkbookP = { } ; else { if ( Workbook ) WorkbookP = parse _workbook ( Workbook . content , options , ! ! Workbook . find ) ; else if ( cfb . find ( "PerfectOffice_MAIN" ) ) WorkbookP = WK _ . to _workbook ( cfb . find ( "PerfectOffice_MAIN" ) . content , options ) ; else if ( cfb . find ( "NativeContent_MAIN" ) ) WorkbookP = WK _ . to _workbook ( cfb . find ( "NativeContent_MAIN" ) . content , options ) ; else throw new Error ( "Cannot find Workbook stream" ) } if ( cfb . FullPaths ) parse _props ( cfb ) ; var props = { } ; for ( var y in cfb . Summary ) props [ y ] = cfb . Summary [ y ] ; for ( y in cfb . DocSummary ) props [ y ] = cfb . DocSummary [ y ] ; WorkbookP . Props = WorkbookP . Custprops = props ; if ( options . bookFiles ) WorkbookP . cfb = cfb ; return WorkbookP } function parse _props ( cfb ) { var DSI = cfb . find ( "!DocumentSummaryInformation" ) ; if ( DSI ) try { cfb . DocSummary = parse _PropertySetStream ( DSI , DocSummaryPIDDSI ) } catch ( e ) { } var SI = cfb . find ( "!SummaryInformation" ) ; if ( SI ) try { cfb . Summary = parse _PropertySetStream ( SI , SummaryPIDSI ) } catch ( e ) { } } var XLSBRecordEnum = { 0 : { n : "BrtRowHdr" , f : parse _BrtRowHdr } , 1 : { n : "BrtCellBlank" , f : parse _BrtCellBlank } , 2 : { n : "BrtCellRk" , f : parse _BrtCellRk } , 3 : { n : "BrtCellError" , f : parse _BrtCellError } , 4 : { n : "BrtCellBool" , f : parse _BrtCellBool } , 5 : { n : "BrtCellReal" , f : parse _BrtCellReal } , 6 : { n : "BrtCellSt" , f : parse _BrtCellSt } , 7 : { n : "BrtCellIsst" , f : parse _BrtCellIsst } , 8 : { n : "BrtFmlaString" , f : parse _BrtFmlaString } , 9 : { n : "BrtFmlaNum" , f : parse _BrtFmlaNum } , 10 : { n : "BrtFmlaBool" , f : parse _BrtFmlaBool } , 11 : { n : "BrtFmlaError" , f : parse _BrtFmlaError } , 16 : { n : "BrtFRTArchID$" , f : parse _BrtFRTArchID$ } , 19 : { n : "BrtSSTItem" , f : parse _RichStr } , 20 : { n : "BrtPCDIMissing" , f : parsenoop } , 21 : { n : "BrtPCDINumber" , f : parsenoop } , 22 : { n : "BrtPCDIBoolean" , f : parsenoop } , 23 : { n : "BrtPCDIError" , f : parsenoop } , 24 : { n : "BrtPCDIString" , f : parsenoop } , 25 : { n : "BrtPCDIDatetime" , f : parsenoop } , 26 : { n : "BrtPCDIIndex" , f : parsenoop } , 27 : { n : "BrtPCDIAMissing" , f : parsenoop } , 28 : { n : "BrtPCDIANumber" , f : parsenoop } , 29 : { n : "BrtPCDIABoolean" , f : parsenoop } , 30 : { n : "BrtPCDIAError" , f : parsenoop } , 31 : { n : "BrtPCDIAString" , f : parsenoop } , 32 : { n : "BrtPCDIADatetime" , f : parsenoop } , 33 : { n : "BrtPCRRecord" , f : parsenoop } , 34 : { n : "BrtPCRRecordDt" , f : parsenoop } , 35 : { n : "BrtFRTBegin" , f : parsenoop } , 36 : { n : "BrtFRTEnd" , f : parsenoop } , 37 : { n : "BrtACBegin" , f : parsenoop } , 38 : { n : "BrtACEnd" , f : parsenoop } , 39 : { n : "BrtName" , f : parse _BrtName } , 40 : { n : "BrtIndexRowBlock" , f : parsenoop } , 42 : { n : "BrtIndexBlock" , f : parsenoop } , 43 : { n : "BrtFont" , f : parse _BrtFont } , 44 : { n : "BrtFmt" , f : parse _BrtFmt } , 45 : { n : " BrtFil
n : "BrtAbsPath15" , f : parsenoop } , 2072 : { n : "BrtBeginPivotTableUISettings" , f : parsenoop } , 2073 : { n : "BrtEndPivotTableUISettings" , f : parsenoop } , 2075 : { n : "BrtTableSlicerCacheIDs" , f : parsenoop } , 2076 : { n : "BrtTableSlicerCacheID" , f : parsenoop } , 2077 : { n : "BrtBeginTableSlicerCache" , f : parsenoop } , 2078 : { n : "BrtEndTableSlicerCache" , f : parsenoop } , 2079 : { n : "BrtSxFilter15" , f : parsenoop } , 2080 : { n : "BrtBeginTimelineCachePivotCacheIDs" , f : parsenoop } , 2081 : { n : "BrtEndTimelineCachePivotCacheIDs" , f : parsenoop } , 2082 : { n : "BrtTimelineCachePivotCacheID" , f : parsenoop } , 2083 : { n : "BrtBeginTimelineCacheIDs" , f : parsenoop } , 2084 : { n : "BrtEndTimelineCacheIDs" , f : parsenoop } , 2085 : { n : "BrtBeginTimelineCacheID" , f : parsenoop } , 2086 : { n : "BrtEndTimelineCacheID" , f : parsenoop } , 2087 : { n : "BrtBeginTimelinesEx" , f : parsenoop } , 2088 : { n : "BrtEndTimelinesEx" , f : parsenoop } , 2089 : { n : "BrtBeginTimelineEx" , f : parsenoop } , 2090 : { n : "BrtEndTimelineEx" , f : parsenoop } , 2091 : { n : "BrtWorkBookPr15" , f : parsenoop } , 2092 : { n : "BrtPCDH15" , f : parsenoop } , 2093 : { n : "BrtBeginTimelineStyle" , f : parsenoop } , 2094 : { n : "BrtEndTimelineStyle" , f : parsenoop } , 2095 : { n : "BrtTimelineStyleElement" , f : parsenoop } , 2096 : { n : "BrtBeginTimelineStylesheetExt15" , f : parsenoop } , 2097 : { n : "BrtEndTimelineStylesheetExt15" , f : parsenoop } , 2098 : { n : "BrtBeginTimelineStyles" , f : parsenoop } , 2099 : { n : "BrtEndTimelineStyles" , f : parsenoop } , 2100 : { n : "BrtBeginTimelineStyleElements" , f : parsenoop } , 2101 : { n : "BrtEndTimelineStyleElements" , f : parsenoop } , 2102 : { n : "BrtDxf15" , f : parsenoop } , 2103 : { n : "BrtBeginDxfs15" , f : parsenoop } , 2104 : { n : "brtEndDxfs15" , f : parsenoop } , 2105 : { n : "BrtSlicerCacheHideItemsWithNoData" , f : parsenoop } , 2106 : { n : "BrtBeginItemUniqueNames" , f : parsenoop } , 2107 : { n : "BrtEndItemUniqueNames" , f : parsenoop } , 2108 : { n : "BrtItemUniqueName" , f : parsenoop } , 2109 : { n : "BrtBeginExtConn15" , f : parsenoop } , 2110 : { n : "BrtEndExtConn15" , f : parsenoop } , 2111 : { n : "BrtBeginOledbPr15" , f : parsenoop } , 2112 : { n : "BrtEndOledbPr15" , f : parsenoop } , 2113 : { n : "BrtBeginDataFeedPr15" , f : parsenoop } , 2114 : { n : "BrtEndDataFeedPr15" , f : parsenoop } , 2115 : { n : "BrtTextPr15" , f : parsenoop } , 2116 : { n : "BrtRangePr15" , f : parsenoop } , 2117 : { n : "BrtDbCommand15" , f : parsenoop } , 2118 : { n : "BrtBeginDbTables15" , f : parsenoop } , 2119 : { n : "BrtEndDbTables15" , f : parsenoop } , 2120 : { n : "BrtDbTable15" , f : parsenoop } , 2121 : { n : "BrtBeginDataModel" , f : parsenoop } , 2122 : { n : "BrtEndDataModel" , f : parsenoop } , 2123 : { n : "BrtBeginModelTables" , f : parsenoop } , 2124 : { n : "BrtEndModelTables" , f : parsenoop } , 2125 : { n : "BrtModelTable" , f : parsenoop } , 2126 : { n : "BrtBeginModelRelationships" , f : parsenoop } , 2127 : { n : "BrtEndModelRelationships" , f : parsenoop } , 2128 : { n : "BrtModelRelationship" , f : parsenoop } , 2129 : { n : "BrtBeginECTxtWiz15" , f : parsenoop } , 2130 : { n : "BrtEndECTxtWiz15" , f : parsenoop } , 2131 : { n : "BrtBeginECTWFldInfoLst15" , f : parsenoop } , 2132 : { n : "BrtEndECTWFldInfoLst15" , f : parsenoop } , 2133 : { n : "BrtBeginECTWFldInfo15" , f : parsenoop } , 2134 : { n : "BrtFieldListActiveItem" , f : parsenoop } , 2135 : { n : "BrtPivotCacheIdVersion" , f : parsenoop } , 2136 : { n : "BrtSXDI15" , f : parsenoop } , 65535 : { n : "" , f : parsenoop } } ; var evert _RE = evert _key ( XLSBRecordEnum , "n" ) ; var XLSRecordEnum = { 3 : { n : "BIFF2NUM" , f : parse _BIFF2NUM } , 4 : { n : "BIFF2STR" , f : parse _BIFF2STR } , 6 : { n : "Formula" , f : parse _Formula } , 9 : { n : "BOF" , f : parse _BOF } , 10 : { n : "EOF" , f : parse _EOF } , 12 : { n : "CalcCount" , f : parse _CalcCount } , 13 : { n : "CalcMode" , f : parse _CalcMode } , 14 : { n : "CalcPrecision" , f : parse _CalcPrecision } , 15 : { n : "CalcRefMode" , f : parse _CalcRefMode } , 16 : { n : "CalcDelta" , f : parse _CalcDelta } , 17 : { n : "CalcIter" , f : parse _CalcIter } , 18 : { n : "Protect" , f : parse _Protect } , 19 : { n : "Password" , f : parse _Password } , 20 : { n : "Header" , f : parse _Header } , 21 : { n : "Footer" , f : parse _Footer } , 23 : { n : "ExternSheet" , f : parse _ExternSheet } , 24 : { n : "Lbl" , f : parse _Lbl } , 25 : { n : "WinProtect" , f : parse _WinProtect } , 26 : { n : "VerticalPageBreaks" , f : parse _VerticalPageBreaks } , 27 : { n : "HorizontalPageBreaks" , f : parse _HorizontalPageBreaks } , 28 : { n : "Note" , f : parse _Note } , 29 : { n : "Selection" , f : parse _Selection } , 34 : { n : "Date1904" , f : parse _Date1904 } , 35 : { n : "ExternName" , f : parse _ExternName } , 38 : { n : "LeftMargin" , f : parse _LeftMargin } , 39 : { n : "RightMargin" , f : parse _RightMargin } , 40 : { n : "TopMargin" , f : parse _TopMargin } , 41 : { n : "BottomMargin" , f : parse _BottomMargin } , 42 : { n : "PrintRowCol" , f : parse _PrintRowCol } , 43 : { n : "PrintGrid" , f : parse _PrintGrid } , 47 : { n : "FilePass" , f : parse _FilePass } , 49 : { n : "Font" , f : parse _Font } , 51
var marr = ws [ "!merges" ] || [ ] , mi = 0 ; var dense = Array . isArray ( ws ) ; for ( R = 0 ; R < range . s . r ; ++ R ) o . push ( " <table:table-row></table:table-row>\n" ) ; for ( ; R <= range . e . r ; ++ R ) { o . push ( " <table:table-row>\n" ) ; for ( C = 0 ; C < range . s . c ; ++ C ) o . push ( null _cell _xml ) ; for ( ; C <= range . e . c ; ++ C ) { var skip = false , mxml = "" ; for ( mi = 0 ; mi != marr . length ; ++ mi ) { if ( marr [ mi ] . s . c > C ) continue ; if ( marr [ mi ] . s . r > R ) continue ; if ( marr [ mi ] . e . c < C ) continue ; if ( marr [ mi ] . e . r < R ) continue ; if ( marr [ mi ] . s . c != C || marr [ mi ] . s . r != R ) skip = true ; mxml = 'table:number-columns-spanned="' + ( marr [ mi ] . e . c - marr [ mi ] . s . c + 1 ) + '" table:number-rows-spanned="' + ( marr [ mi ] . e . r - marr [ mi ] . s . r + 1 ) + '" ' ; break } if ( skip ) { o . push ( covered _cell _xml ) ; continue } var ref = encode _cell ( { r : R , c : C } ) , cell = dense ? ( ws [ R ] || [ ] ) [ C ] : ws [ ref ] ; var fmla = "" ; if ( cell && cell . f ) { fmla = ' table:formula="' + escapexml ( csf _to _ods _formula ( cell . f ) ) + '"' ; if ( cell . F ) { if ( cell . F . substr ( 0 , ref . length ) == ref ) { var _Fref = decode _range ( cell . F ) ; fmla += ' table:number-matrix-columns-spanned="' + ( _Fref . e . c - _Fref . s . c + 1 ) + '"' ; fmla += ' table:number-matrix-rows-spanned="' + ( _Fref . e . r - _Fref . s . r + 1 ) + '"' } else fmla = "" } } if ( cell ) switch ( cell . t ) { case "b" : o . push ( cell _begin + mxml + vt + '"boolean" office:boolean-value="' + ( cell . v ? "true" : "false" ) + '"' + fmla + ">" + p _begin + ( cell . v ? "TRUE" : "FALSE" ) + p _end + cell _end ) ; break ; case "n" : o . push ( cell _begin + mxml + vt + '"float" office:value="' + cell . v + '"' + fmla + ">" + p _begin + ( cell . w || cell . v ) + p _end + cell _end ) ; break ; case "s" : case "str" : o . push ( cell _begin + mxml + vt + '"string"' + fmla + ">" + p _begin + escapexml ( cell . v ) + p _end + cell _end ) ; break ; case "d" : o . push ( cell _begin + mxml + vt + '"date" office:date-value="' + parseDate ( cell . v ) . toISOString ( ) + '"' + fmla + ">" + p _begin + ( cell . w || parseDate ( cell . v ) . toISOString ( ) ) + p _end + cell _end ) ; break ; default : o . push ( null _cell _xml ) } else o . push ( null _cell _xml ) } o . push ( " </table:table-row>\n" ) } o . push ( " </table:table>\n" ) ; return o . join ( "" ) } ; return function wcx ( wb , opts ) { var o = [ XML _HEADER ] ; if ( opts . bookType == "fods" ) o . push ( '<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">' ) ; els