@syncfusion/ej2-excel-export
Advanced tools
Comparing version 15.4.17 to 15.4.20
/*! | ||
* filename: ej2-excel-export.umd.min.js | ||
* version : 15.4.17 | ||
* version : 15.4.20 | ||
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. | ||
@@ -11,4 +11,4 @@ * Use of this code is subject to the terms of our license. | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-compression","@syncfusion/ej2-base"],t);else{var o="object"==typeof exports?t(require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base")):t(e["@syncfusion/ej2-compression"],e["@syncfusion/ej2-base"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,function(e,t){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){var r,n;r=[o,t,o(5),o(7),o(6),o(2),o(1),o(4),o(3),o(9),o(10),o(12)],void 0!==(n=function(e,t,o,r,n,i,l,s,a,p,d,m){"use strict";function h(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),h(o),h(r),h(n),h(i),h(l),h(s),h(a),h(p),h(d),h(m)}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t,o(3),o(4),o(5),o(6),o(2),o(7),o(8),o(9),o(11),o(12)],void 0!==(n=function(e,t,o,r,n,i,l,s,a,p,d,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,o){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==o?o:"en-US",this.intl=new d.Internationalization(this.culture),this.mSaveType=t,"xlsx"===t){if(this.mArchive=new a.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new n.CellStyle),this.mFonts.push(new n.Font),this.cellStyles.set("Normal",new n.CellStyles),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var r=0;r<e.styles.length;r++)if(void 0!==e.styles[r].name){if(this.cellStyles.has(e.styles[r].name))throw Error("Style name "+e.styles[r].name+" is already existed");var i=new n.CellStyle;i.isGlobalStyle=!0,this.parserCellStyle(e.styles[r],i,"none");var l=new n.CellStyles;l.name=i.name,l.xfId=i.index,this.cellStyles.set(l.name,l);var s={};void 0!==e.styles[r].numberFormat&&(s.format=e.styles[r].numberFormat),void 0!==e.styles[r].type?s.type=e.styles[r].type:s.type="datetime",void 0!==s.format&&this.globalStyles.set(e.styles[r].name,s)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new u,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new p.CsvHelper(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new o.Worksheets;for(var t=e.length,n=0;n<t;n++){var i=e[n],l=new r.Worksheet;this.mergeCells=new r.MergeCells,this.mHyperLinks=[],null!==i.name&&void 0!==i.name?l.name=i.name:l.name="Sheet"+(n+1).toString(),l.index=n+1,null!==i.columns&&void 0!==i.columns&&this.parserColumns(i.columns,l),null!==i.rows&&void 0!==i.rows&&this.parserRows(i.rows,l),null!==i.freeze&&void 0!==i.freeze&&this.parserFreezePanes(i.freeze,l),null!==i.printTitle&&void 0!==i.printTitle&&this.parserPrintTitle(i.printTitle,l),void 0!==i.pageSetup&&void 0!==i.pageSetup.isSummaryRowBelow&&(l.isSummaryRowBelow=i.pageSetup.isSummaryRowBelow),l.index=n+1,l.mergeCells=this.mergeCells,l.hyperLinks=this.mHyperLinks,this.worksheets.push(l)}},e.prototype.mergeOptions=function(e,t){var o={};return this.applyProperties(e,o),this.applyProperties(t,o),o},e.prototype.applyProperties=function(e,t){for(var o=Object.keys(e),r=0;r<o.length;r++)"name"!==o[r]&&(t[o[r]]=e[o[r]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var o=e%26;e=e/26-1,t=String.fromCharCode(65+o)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var o,r="";if(null!==e.fromRow&&void 0!==e.fromRow){var n=e.fromRow,i=void 0;i=null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow,o="$"+n+":$"+i}var l;if(null!==e.fromColumn&&void 0!==e.fromColumn){var s=e.fromColumn,a=void 0;a=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,l="$"+this.getColumnName(s)+":$"+this.getColumnName(a)}void 0!==o&&(r+=t.name+"!"+o),void 0!==l&&void 0!==o?r+=","+t.name+"!"+l:void 0!==l&&(r+=t.name+"!"+l),""!==r&&this.printTitles.set(t.index-1,r)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new r.FreezePane,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var o=e.length;t.columns=[];for(var r=0;r<o;r++){var n=new i.Column;if(null===e[r].index||void 0===e[r].index)throw Error("Column index is missing.");n.index=e[r].index,null!==e[r].width&&void 0!==e[r].width&&(n.width=e[r].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var o=e.length;t.rows=new l.Rows;for(var r=0,n=0;n<o;n++){var i=this.parserRow(e[n],r);r=i.index,t.rows.add(i)}},e.prototype.parserRow=function(e,t){var o=new l.Row;if(null!==e.height&&void 0!==e.height&&(o.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return o.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,o),this.parseCells(e.cells,o),o},e.prototype.parseGrouping=function(e,t){t.grouping=new r.Grouping,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new s.Cells;for(var o=void 0!==e?e.length:0,i=1,l=1,a=0;a<o;a++){var p=e[a],d=new s.Cell;if(null===p.index||void 0===p.index)throw Error("Cell index is missing.");if(d.index=p.index,d.index<i?i=d.index:d.index>l&&(l=d.index),d.refName=this.getCellName(t.index,d.index),null!==p.rowSpan&&void 0!==p.rowSpan?d.rowSpan=p.rowSpan-1:d.rowSpan=0,null!==p.colSpan&&void 0!==p.colSpan?d.colSpan=p.colSpan-1:d.colSpan=0,this.mergeCells=this.processMergeCells(d,t.index,this.mergeCells),null!==p.hyperlink&&void 0!==p.hyperlink){var m=new r.HyperLink;void 0!==p.hyperlink.target&&(m.target=p.hyperlink.target,void 0!==p.hyperlink.displayText?d.value=p.hyperlink.displayText:d.value=p.hyperlink.target,d.type=this.getCellValueType(d.value),m.ref=d.refName,m.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(m),d.cellStyle=new n.CellStyle,this.parserCellStyle(void 0!==p.style?this.mergeOptions(p.style,this.hyperlinkStyle):this.hyperlinkStyle,d.cellStyle,"string"),d.styleIndex=d.cellStyle.index)}null!==p.value&&void 0!==p.value&&(d.value=p.value,d.type=this.getCellValueType(d.value)),null!==p.style&&void 0!==p.style&&void 0===d.styleIndex?(d.cellStyle=new n.CellStyle,d.value instanceof Date?this.parserCellStyle(p.style,d.cellStyle,d.type,14):this.parserCellStyle(p.style,d.cellStyle,d.type),d.styleIndex=d.cellStyle.index):d.value instanceof Date&&(d.cellStyle=new n.CellStyle,this.parserCellStyle({},d.cellStyle,d.type,14),d.styleIndex=d.cellStyle.index),this.parseCellType(d),t.cells.add(d),d.index+1}t.spans=i+":"+l},e.prototype.applyGlobalStyle=function(e,t){var o=0;if(this.cellStyles.has(e.name)){o=this.cellStyles.get(e.name).xfId;var r=this.mCellStyleXfs[o-1];t.name=e.name;var i=this.compareStyleXfs(r);if(i.result)t.index=i.index;else{var l=new n.CellXfs;l.alignment=r.alignment,l.applyAlignment=r.applyAlignment,l.borderId=r.borderId,l.fillId=r.fillId,l.fontId=r.fontId,l.numFmtId=r.numFmtId,l.xfId=o,this.mCellXfs.push(l),this.mStyles.push(t),t.index=this.mCellXfs.length}}},e.prototype.compareStyleXfs=function(e){for(var t=!1,o=1,r=0,n=this.mCellXfs;r<n.length;r++){var i=n[r];if(t=i.alignment===e.alignment&&i.borderId===e.borderId&&i.numFmtId===e.numFmtId&&i.fillId===e.fillId&&i.fontId===e.fontId)break;o++}return{index:o,result:t}},e.prototype.parserCellStyle=function(e,t,o,r){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new n.Borders,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,o):void 0!==r?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var o=this.getNumberFormat(e,t);if(o!==e){var r=this.mNumFmt.get(e);if(void 0!==r&&(r.formatCode=o,this.mNumFmt.has(o))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var l=i[n];l.numFmtId===r.numFmtId&&(l.numFmtId=this.mNumFmt.get(o).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var p=a[s];p.numFmtId===r.numFmtId&&(p.numFmtId=this.mNumFmt.get(o).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var o;switch(t){case"number":try{o=this.intl.getNumberPattern({format:e})}catch(t){o=e}break;case"datetime":try{o=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){o=e}break;case"date":try{o=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){o=e}break;case"time":try{o=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){o=e}break;default:o=e}return o},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){var t=this.compareStyle(e);if(t.result)return t.index;this.mStyles.push(e);var o=void 0;o=e.isGlobalStyle?new n.CellStyleXfs:new n.CellXfs;var r=this.isNewFont(e);if(r.result)o.fontId=r.index;else{var i=new n.Font;i.b=e.bold,i.i=e.italic,i.name=e.fontName,i.sz=e.fontSize,i.u=e.underline,i.color="FF"+e.fontColor.replace("#",""),this.mFonts.push(i),o.fontId=this.mFonts.length-1}if("none"!==e.backColor){var l="FF"+e.backColor.replace("#","");if(this.mFills.has(l)){var s=this.mFills.get(l);o.fillId=s}else{var s=this.mFills.size+2;this.mFills.set(l,s),o.fillId=s}}else o.fillId=0;if(this.isNewBorder(e)?o.borderId=0:(this.mBorders.push(e.borders),o.borderId=this.mBorders.length),o.xfId=0,"GENERAL"!==e.numberFormat)if(this.mNumFmt.has(e.numberFormat)){var a=this.mNumFmt.get(e.numberFormat);o.numFmtId=a.numFmtId}else{var p=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new n.NumFmt(p,e.numberFormat)),o.numFmtId=p}else"GENERAL"===e.numberFormat&&14===e.numFmtId?o.numFmtId=14:o.numFmtId=0;return("left"!==e.hAlign||"bottom"!==e.vAlign||e.wrapText)&&(o.applyAlignment=1,o.alignment=new n.Alignment,o.alignment.horizontal=e.hAlign,o.alignment.vertical=e.vAlign,o.alignment.wrapText=e.wrapText?1:0),e.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellStyleXfs.length):(this.mCellXfs.push(o),this.mCellXfs.length)},e.prototype.isNewFont=function(e){for(var t=!1,o=0,r=0,n=this.mFonts;r<n.length;r++){var i=n[r];o++;var l=void 0;if(void 0!==e.fontColor&&(l="FF"+e.fontColor.replace("#","")),t=i.color===l&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return o-=1,{index:o,result:t}},e.prototype.isNewBorder=function(e){var t=new n.CellStyle;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new n.CellStyle;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,o=0,r=0,n=0,i=this.mStyles;n<i.length;n++){var l=i[n];if(t=l.backColor===e.backColor&&l.bold===e.bold&&l.numFmtId===e.numFmtId&&l.numberFormat===e.numberFormat&&l.type===e.type&&l.fontColor===e.fontColor&&l.fontName===e.fontName&&l.fontSize===e.fontSize&&l.hAlign===e.hAlign&&l.italic===e.italic&&l.underline===e.underline&&l.vAlign===e.vAlign&&l.wrapText===e.wrapText&&l.borders.all.color===e.borders.all.color&&l.borders.all.lineStyle===e.borders.all.lineStyle&&l.borders.left.color===e.borders.left.color&&l.borders.left.lineStyle===e.borders.left.lineStyle&&l.borders.right.color===e.borders.right.color&&l.borders.right.lineStyle===e.borders.right.lineStyle&&l.borders.top.color===e.borders.top.color&&l.borders.top.lineStyle===e.borders.top.lineStyle&&l.borders.bottom.color===e.borders.bottom.color&&l.borders.bottom.lineStyle===e.borders.bottom.lineStyle)break;l.isGlobalStyle?r++:o++}return e.isGlobalStyle&&(o=r+1),{index:o,result:t}},e.prototype.contains=function(e,t){var o=e.indexOf(t);return o>-1&&o<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,o=e.type,r=e.value;switch(o){case"datetime":if(r=this.toOADate(r),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":r=r?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s",this.contains(this.sharedString,r)||this.sharedString.push(r),r=this.sharedString.indexOf(r)}e.saveType=t,e.value=r},e.prototype.save=function(e,t){if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),r=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation(),this.mArchive.save(e).then(function(){this.mArchive.destroy()});else{if(null===r||r[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",o=this.worksheets.length,r=0;r<o;r++)t+='<sheet name="'+this.worksheets[r].name+'" sheetId="'+(r+1).toString()+'" r:id ="rId'+(r+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),n+="</definedNames>",e+=n}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new m.BlobHelper,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?r+="<sheetPr />":r+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',void 0!==e.freezePanes&&(r+=this.saveFreezePanes(e)),void 0!==e.columns){for(var n="<cols>",i=0,l=e.columns;i<l.length;i++){var s=l[i];void 0!==s.width?n+='<col min="'+s.index+'" max="'+s.index+'" width="'+this.pixelsToColumnWidth(s.width)+'" customWidth="1" />':n+='<col min="'+s.index+'" max="'+s.index+'" width="8.43" customWidth="1" />'}r+=n+"</cols>"}if(r+="<sheetData>",o.append(r),r="",void 0!==e.rows)for(var a=0,p=e.rows;a<p.length;a++){var d=p[a],h='<row r="'+d.index+'" spans="'+d.spans+'" ';void 0!==d.height&&(h+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(h+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(h+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(h+='collapsed="1" ')),h+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(h+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(h+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(h+='s="'+f.styleIndex+'" '),h+=" >",void 0!==f.value?h+="<v>"+f.value+"</v></c>":h+="</c>")}h+="</row>",o.append(h)}if(r+="</sheetData>",e.mergeCells.length>0){r+='<mergeCells count="'+e.mergeCells.length+'">';for(var v=0,y=e.mergeCells;v<y.length;v++){r+='<mergeCell ref="'+y[v].ref+'" />'}r+="</mergeCells>"}if(e.hyperLinks.length>0){r+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];r+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}r+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}r+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(r),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',o=0,r=e.hyperLinks;o<r.length;o++){var n=r[o];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveFreezePanes=function(e){var t='<sheetViews><sheetView workbookViewId="0" ><pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ';return 0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/></sheetView></sheetViews>"},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',o="",r=0;r<e;r++)o+="<si><t>",o+=this.processString(this.sharedString[r]),o+="</t></si>";o+="</sst>",this.addToArchive(t+o,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"<")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,">")),e},e.prototype.saveStyles=function(){var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,o){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,""")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,o=this.mFonts;t<o.length;t++){var r=o[t];e+="<font>",r.b&&(e+="<b />"),r.i&&(e+="<i />"),r.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(r.sz)+'" />',e+='<color rgb="'+r.color+'" />',e+='<name val="'+r.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,o){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+o+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,o=this.mBorders;t<o.length;t++){var r=o[t];if(this.isAllBorder(r)){var n=r.all.color.replace("#",""),i=r.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+r.left.lineStyle+'"><color rgb="FF'+r.left.color.replace("#","")+'" /></left><right style="'+r.right.lineStyle+'"><color rgb="FF'+r.right.color.replace("#","")+'" /></right><top style="'+r.top.lineStyle+'"><color rgb="FF'+r.top.color.replace("#","")+'" /></top><bottom style="'+r.bottom.lineStyle+'"><color rgb="FF'+r.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(o,r){t+='<cellStyle name="'+r+'" xfId="'+e.cellStyles.get(r).xfId+'"',"Normal"===r&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,o=this.mCellStyleXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></xf>'):e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,o=this.mCellXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" xfId="'+r.xfId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></xf>'):e+=" />"}return e+"</cellXfs>"},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,o='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(o+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(o+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(o+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(o+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(o+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(o+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(o+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),o+="</cp:coreProperties>",this.addToArchive(o,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,o=0,r=0;r<t;r++,o++)e+='<Relationship Id="rId'+(r+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(r+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",o=this.worksheets.length,r=0;r<o;r++)t+='<Override PartName="/xl/worksheets/sheet'+(r+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,t){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),r=new a.ZipArchiveItem(o,t);this.mArchive.addItem(r)}else{var r=new a.ZipArchiveItem(e,t);this.mArchive.addItem(r)}},e.prototype.processMergeCells=function(e,t,o){if(0!==e.rowSpan||0!==e.colSpan){var n=new r.MergeCell;n.x=e.index,n.width=e.colSpan,n.y=t,n.height=e.rowSpan;var i=this.getCellName(n.y,n.x),l=this.getCellName(t+n.height,e.index+n.width);n.ref=i+":"+l,o.add(n)}return o},e.prototype.dateToTicks=function(e,t,o){var r=[0,31,59,90,120,151,181,212,243,273,304,334,365],n=[0,31,60,91,121,152,182,213,244,274,305,335,366];if(e>=1&&e<=9999&&t>=1&&t<=12){var i=this.isLeapYear(e)?n:r,l=e-1;return 864e9*(365*l+(l/4|0)-(l/100|0)+(l/400|0)+i[t-1]+o-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,o){if(e>=0&&e<24&&t>=0&&t<60&&o>=0&&o<60){return 1e4*(3600*e+60*t+o)*1e3}throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}();t.Workbook=h;var u=function(){function e(){}return e}();t.BuiltInProperties=u}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){ | ||
function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Row=o;var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return i(t,e),t}(Array);t.Rows=r}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Array);t.Worksheets=o}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.isSummaryRowBelow=!0}return e}();t.Worksheet=o;var r=function(){function e(){}return e}();t.HyperLink=r;var n=function(){function e(){}return e}();t.Grouping=n;var l=function(){function e(){}return e}();t.FreezePane=l;var s=function(){function e(){}return e}();t.MergeCell=s;var a=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.add=function(e){for(var r=!1,n=0,i=0,l=o;i<l.length;i++){var a=l[i];if(t.isIntersecting(a,e)){var p=new s;p.x=Math.min(a.x,e.x),p.y=Math.min(a.Y,e.y),p.width=Math.max(a.Width+a.X,e.width+e.x),p.height=Math.max(a.Height+a.Y,e.height+e.y),p.ref=o[n].ref.split(":")[0]+":"+e.ref.split(":")[1],o[n]=p,r=!0}n++}r||o.push(e)},o}return i(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array);t.MergeCells=a}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}return e}();t.CellStyle=o;var r=function(){function e(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}return e}();t.Font=r;var n=function(){function e(){}return e}();t.CellXfs=n;var i=function(){function e(){}return e}();t.Alignment=i;var l=function(){function e(){}return e}();t.CellStyleXfs=l;var s=function(){function e(){this.name="Normal",this.xfId=0}return e}();t.CellStyles=s;var a=function(){function e(e,t){this.numFmtId=e,this.formatCode=t}return e}();t.NumFmt=a;var p=function(){function e(e,t){this.lineStyle=e,this.color=t}return e}();t.Border=p;var d=function(){function e(){this.left=new p("none","#FFFFFF"),this.right=new p("none","#FFFFFF"),this.top=new p("none","#FFFFFF"),this.bottom=new p("none","#FFFFFF"),this.all=new p("none","#FFFFFF")}return e}();t.Borders=d}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Column=o}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Cell=o;var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return i(t,e),t}(Array);t.Cells=r}.apply(t,r))&&(e.exports=n)},function(t,o){t.exports=e},function(e,t,o){var r,n;r=[o,t,o(10)],void 0!==(n=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){if(this.csvStr="",this.formatter=new o.ValueFormatter,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,o=0,r=e;o<r.length;o++){var n=r[o];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,o=0,r=e.cells;o<r.length;o++){var n=r[o];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;void 0!==e.value&&(e.value instanceof Date?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)})):t+=e.value:"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value)),this.csvStr=t},e.prototype.parseCellValue=function(e){return-1!==e.indexOf(",")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob([this.csvStr],{type:"text/plain"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.download=e,o.href=t;var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),o.dispatchEvent(r),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e}();t.CsvHelper=r}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t,o(11),o(11)],void 0!==(n=function(e,t,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var r=e;return o.isNullOrUndefined(t)||o.isNullOrUndefined(e)||(r=t(e)),r},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}();t.ValueFormatter=n}.apply(t,r))&&(e.exports=n)},function(e,o){e.exports=t},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}();t.BlobHelper=o}.apply(t,r))&&(e.exports=n)}])}); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-compression","@syncfusion/ej2-base"],t);else{var o="object"==typeof exports?t(require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-base")):t(e["@syncfusion/ej2-compression"],e["@syncfusion/ej2-base"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,function(e,t){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){var r,n;r=[o,t,o(5),o(7),o(6),o(2),o(1),o(4),o(3),o(9),o(10),o(12)],void 0!==(n=function(e,t,o,r,n,i,l,s,a,p,d,m){"use strict";function h(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),h(o),h(r),h(n),h(i),h(l),h(s),h(a),h(p),h(d),h(m)}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t,o(3),o(4),o(5),o(6),o(2),o(7),o(8),o(9),o(11),o(12)],void 0!==(n=function(e,t,o,r,n,i,l,s,a,p,d,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,o){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==o?o:"en-US",this.intl=new d.Internationalization(this.culture),this.mSaveType=t,"xlsx"===t){if(this.mArchive=new a.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new n.CellStyle),this.mFonts.push(new n.Font),this.cellStyles.set("Normal",new n.CellStyles),this.mCellXfs=[],this.mCellStyleXfs=[],null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var r=0;r<e.styles.length;r++)if(void 0!==e.styles[r].name){if(this.cellStyles.has(e.styles[r].name))throw Error("Style name "+e.styles[r].name+" is already existed");var i=new n.CellStyle;i.isGlobalStyle=!0,this.parserCellStyle(e.styles[r],i,"none");var l=new n.CellStyles;l.name=i.name,l.xfId=i.index,this.cellStyles.set(l.name,l);var s={};void 0!==e.styles[r].numberFormat&&(s.format=e.styles[r].numberFormat),void 0!==e.styles[r].type?s.type=e.styles[r].type:s.type="datetime",void 0!==s.format&&this.globalStyles.set(e.styles[r].name,s)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new u,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new p.CsvHelper(e)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new o.Worksheets;for(var t=e.length,n=0;n<t;n++){var i=e[n],l=new r.Worksheet;this.mergeCells=new r.MergeCells,this.mHyperLinks=[],null!==i.name&&void 0!==i.name?l.name=i.name:l.name="Sheet"+(n+1).toString(),l.index=n+1,null!==i.columns&&void 0!==i.columns&&this.parserColumns(i.columns,l),null!==i.rows&&void 0!==i.rows&&this.parserRows(i.rows,l),null!==i.freeze&&void 0!==i.freeze&&this.parserFreezePanes(i.freeze,l),null!==i.printTitle&&void 0!==i.printTitle&&this.parserPrintTitle(i.printTitle,l),void 0!==i.pageSetup&&void 0!==i.pageSetup.isSummaryRowBelow&&(l.isSummaryRowBelow=i.pageSetup.isSummaryRowBelow),l.index=n+1,l.mergeCells=this.mergeCells,l.hyperLinks=this.mHyperLinks,this.worksheets.push(l)}},e.prototype.mergeOptions=function(e,t){var o={};return this.applyProperties(e,o),this.applyProperties(t,o),o},e.prototype.applyProperties=function(e,t){for(var o=Object.keys(e),r=0;r<o.length;r++)"name"!==o[r]&&(t[o[r]]=e[o[r]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var o=e%26;e=e/26-1,t=String.fromCharCode(65+o)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var o,r="";if(null!==e.fromRow&&void 0!==e.fromRow){var n=e.fromRow,i=void 0;i=null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow,o="$"+n+":$"+i}var l;if(null!==e.fromColumn&&void 0!==e.fromColumn){var s=e.fromColumn,a=void 0;a=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,l="$"+this.getColumnName(s)+":$"+this.getColumnName(a)}void 0!==o&&(r+=t.name+"!"+o),void 0!==l&&void 0!==o?r+=","+t.name+"!"+l:void 0!==l&&(r+=t.name+"!"+l),""!==r&&this.printTitles.set(t.index-1,r)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new r.FreezePane,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var o=e.length;t.columns=[];for(var r=0;r<o;r++){var n=new i.Column;if(null===e[r].index||void 0===e[r].index)throw Error("Column index is missing.");n.index=e[r].index,null!==e[r].width&&void 0!==e[r].width&&(n.width=e[r].width),t.columns.push(n)}},e.prototype.parserRows=function(e,t){var o=e.length;t.rows=new l.Rows;for(var r=0,n=0;n<o;n++){var i=this.parserRow(e[n],r);r=i.index,t.rows.add(i)}},e.prototype.parserRow=function(e,t){var o=new l.Row;if(null!==e.height&&void 0!==e.height&&(o.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return o.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,o),this.parseCells(e.cells,o),o},e.prototype.parseGrouping=function(e,t){t.grouping=new r.Grouping,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new s.Cells;for(var o=void 0!==e?e.length:0,i=1,l=1,a=0;a<o;a++){var p=e[a],d=new s.Cell;if(null===p.index||void 0===p.index)throw Error("Cell index is missing.");if(d.index=p.index,d.index<i?i=d.index:d.index>l&&(l=d.index),d.refName=this.getCellName(t.index,d.index),null!==p.rowSpan&&void 0!==p.rowSpan?d.rowSpan=p.rowSpan-1:d.rowSpan=0,null!==p.colSpan&&void 0!==p.colSpan?d.colSpan=p.colSpan-1:d.colSpan=0,this.mergeCells=this.processMergeCells(d,t.index,this.mergeCells),null!==p.hyperlink&&void 0!==p.hyperlink){var m=new r.HyperLink;void 0!==p.hyperlink.target&&(m.target=p.hyperlink.target,void 0!==p.hyperlink.displayText?d.value=p.hyperlink.displayText:d.value=p.hyperlink.target,d.type=this.getCellValueType(d.value),m.ref=d.refName,m.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(m),d.cellStyle=new n.CellStyle,this.parserCellStyle(void 0!==p.style?this.mergeOptions(p.style,this.hyperlinkStyle):this.hyperlinkStyle,d.cellStyle,"string"),d.styleIndex=d.cellStyle.index)}null!==p.value&&void 0!==p.value&&(d.value=p.value,d.type=this.getCellValueType(d.value)),null!==p.style&&void 0!==p.style&&void 0===d.styleIndex?(d.cellStyle=new n.CellStyle,d.value instanceof Date?this.parserCellStyle(p.style,d.cellStyle,d.type,14):this.parserCellStyle(p.style,d.cellStyle,d.type),d.styleIndex=d.cellStyle.index):d.value instanceof Date&&(d.cellStyle=new n.CellStyle,this.parserCellStyle({},d.cellStyle,d.type,14),d.styleIndex=d.cellStyle.index),this.parseCellType(d),t.cells.add(d),d.index+1}t.spans=i+":"+l},e.prototype.applyGlobalStyle=function(e,t){var o=0;if(this.cellStyles.has(e.name)){o=this.cellStyles.get(e.name).xfId;var r=this.mCellStyleXfs[o-1];t.name=e.name;var i=this.compareStyleXfs(r);if(i.result)t.index=i.index;else{var l=new n.CellXfs;l.alignment=r.alignment,l.applyAlignment=r.applyAlignment,l.borderId=r.borderId,l.fillId=r.fillId,l.fontId=r.fontId,l.numFmtId=r.numFmtId,l.xfId=o,this.mCellXfs.push(l),this.mStyles.push(t),t.index=this.mCellXfs.length}}},e.prototype.compareStyleXfs=function(e){for(var t=!1,o=1,r=0,n=this.mCellXfs;r<n.length;r++){var i=n[r];if(t=i.alignment===e.alignment&&i.borderId===e.borderId&&i.numFmtId===e.numFmtId&&i.fillId===e.fillId&&i.fontId===e.fontId)break;o++}return{index:o,result:t}},e.prototype.parserCellStyle=function(e,t,o,r){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new n.Borders,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,o):void 0!==r?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var o=this.getNumberFormat(e,t);if(o!==e){var r=this.mNumFmt.get(e);if(void 0!==r&&(r.formatCode=o,this.mNumFmt.has(o))){for(var n=0,i=this.mCellStyleXfs;n<i.length;n++){var l=i[n];l.numFmtId===r.numFmtId&&(l.numFmtId=this.mNumFmt.get(o).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var p=a[s];p.numFmtId===r.numFmtId&&(p.numFmtId=this.mNumFmt.get(o).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var o;switch(t){case"number":try{o=this.intl.getNumberPattern({format:e})}catch(t){o=e}break;case"datetime":try{o=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){o=e}break;case"date":try{o=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){o=e}break;case"time":try{o=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){o=e}break;default:o=e}return o},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){var t=this.compareStyle(e);if(t.result)return t.index;this.mStyles.push(e);var o=void 0;o=e.isGlobalStyle?new n.CellStyleXfs:new n.CellXfs;var r=this.isNewFont(e);if(r.result)o.fontId=r.index;else{var i=new n.Font;i.b=e.bold,i.i=e.italic,i.name=e.fontName,i.sz=e.fontSize,i.u=e.underline,i.color="FF"+e.fontColor.replace("#",""),this.mFonts.push(i),o.fontId=this.mFonts.length-1}if("none"!==e.backColor){var l="FF"+e.backColor.replace("#","");if(this.mFills.has(l)){var s=this.mFills.get(l);o.fillId=s}else{var s=this.mFills.size+2;this.mFills.set(l,s),o.fillId=s}}else o.fillId=0;if(this.isNewBorder(e)?o.borderId=0:(this.mBorders.push(e.borders),o.borderId=this.mBorders.length),o.xfId=0,"GENERAL"!==e.numberFormat)if(this.mNumFmt.has(e.numberFormat)){var a=this.mNumFmt.get(e.numberFormat);o.numFmtId=a.numFmtId}else{var p=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new n.NumFmt(p,e.numberFormat)),o.numFmtId=p}else"GENERAL"===e.numberFormat&&14===e.numFmtId?o.numFmtId=14:o.numFmtId=0;return("left"!==e.hAlign||"bottom"!==e.vAlign||e.wrapText)&&(o.applyAlignment=1,o.alignment=new n.Alignment,o.alignment.horizontal=e.hAlign,o.alignment.vertical=e.vAlign,o.alignment.wrapText=e.wrapText?1:0),e.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellStyleXfs.length):(this.mCellXfs.push(o),this.mCellXfs.length)},e.prototype.isNewFont=function(e){for(var t=!1,o=0,r=0,n=this.mFonts;r<n.length;r++){var i=n[r];o++;var l=void 0;if(void 0!==e.fontColor&&(l="FF"+e.fontColor.replace("#","")),t=i.color===l&&i.b===e.bold&&i.i===e.italic&&i.u===e.underline&&i.name===e.fontName&&i.sz===e.fontSize)break}return o-=1,{index:o,result:t}},e.prototype.isNewBorder=function(e){var t=new n.CellStyle;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new n.CellStyle;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,o=0,r=0,n=0,i=this.mStyles;n<i.length;n++){var l=i[n];if(t=l.backColor===e.backColor&&l.bold===e.bold&&l.numFmtId===e.numFmtId&&l.numberFormat===e.numberFormat&&l.type===e.type&&l.fontColor===e.fontColor&&l.fontName===e.fontName&&l.fontSize===e.fontSize&&l.hAlign===e.hAlign&&l.italic===e.italic&&l.underline===e.underline&&l.vAlign===e.vAlign&&l.wrapText===e.wrapText&&l.borders.all.color===e.borders.all.color&&l.borders.all.lineStyle===e.borders.all.lineStyle&&l.borders.left.color===e.borders.left.color&&l.borders.left.lineStyle===e.borders.left.lineStyle&&l.borders.right.color===e.borders.right.color&&l.borders.right.lineStyle===e.borders.right.lineStyle&&l.borders.top.color===e.borders.top.color&&l.borders.top.lineStyle===e.borders.top.lineStyle&&l.borders.bottom.color===e.borders.bottom.color&&l.borders.bottom.lineStyle===e.borders.bottom.lineStyle)break;l.isGlobalStyle?r++:o++}return e.isGlobalStyle&&(o=r+1),{index:o,result:t}},e.prototype.contains=function(e,t){var o=e.indexOf(t);return o>-1&&o<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,o=e.type,r=e.value;switch(o){case"datetime":if(r=this.toOADate(r),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var n=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(n.format,n.type)}t="n";break;case"boolean":r=r?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s",this.contains(this.sharedString,r)||this.sharedString.push(r),r=this.sharedString.indexOf(r)}e.saveType=t,e.value=r},e.prototype.save=function(e,t){var o=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var r=e.match(".xlsx$"),n=e.match(".csv$");if(null!==r&&r[0]==="."+this.mSaveType)this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation(),this.mArchive.save(e).then(function(){o.mArchive.destroy()});else{if(null===n||n[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",o=this.worksheets.length,r=0;r<o;r++)t+='<sheet name="'+this.worksheets[r].name+'" sheetId="'+(r+1).toString()+'" r:id ="rId'+(r+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var n="<definedNames>";this.printTitles.forEach(function(e,t){n+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),n+="</definedNames>",e+=n}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new m.BlobHelper,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?r+="<sheetPr />":r+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',void 0!==e.freezePanes&&(r+=this.saveFreezePanes(e)),void 0!==e.columns){for(var n="<cols>",i=0,l=e.columns;i<l.length;i++){var s=l[i];void 0!==s.width?n+='<col min="'+s.index+'" max="'+s.index+'" width="'+this.pixelsToColumnWidth(s.width)+'" customWidth="1" />':n+='<col min="'+s.index+'" max="'+s.index+'" width="8.43" customWidth="1" />'}r+=n+"</cols>"}if(r+="<sheetData>",o.append(r),r="",void 0!==e.rows)for(var a=0,p=e.rows;a<p.length;a++){var d=p[a],h='<row r="'+d.index+'" spans="'+d.spans+'" ';void 0!==d.height&&(h+='ht="'+this.pixelsToRowHeight(d.height)+'" customHeight="1" '),void 0!==d.grouping&&(d.grouping.isHidden&&(h+='hidden="1" '),void 0!==d.grouping.outlineLevel&&(h+='outlineLevel="'+d.grouping.outlineLevel+'" '),d.grouping.isCollapsed&&(h+='collapsed="1" ')),h+=">";for(var u=0,c=d.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(h+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(h+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(h+='s="'+f.styleIndex+'" '),h+=" >",void 0!==f.value?h+="<v>"+f.value+"</v></c>":h+="</c>")}h+="</row>",o.append(h)}if(r+="</sheetData>",e.mergeCells.length>0){r+='<mergeCells count="'+e.mergeCells.length+'">';for(var v=0,y=e.mergeCells;v<y.length;v++){r+='<mergeCell ref="'+y[v].ref+'" />'}r+="</mergeCells>"}if(e.hyperLinks.length>0){r+="<hyperlinks>";for(var g=0,b=e.hyperLinks;g<b.length;g++){var x=b[g];r+='<hyperlink ref="'+x.ref+'" r:id="rId'+x.rId+'" />'}r+="</hyperlinks>",this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels")}r+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>',o.append(r),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',o=0,r=e.hyperLinks;o<r.length;o++){var n=r[o];t+='<Relationship Id="rId'+n.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+n.target+'" TargetMode="External" />'}return t+="</Relationships>"},e.prototype.saveFreezePanes=function(e){var t='<sheetViews><sheetView workbookViewId="0" ><pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ';return 0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/></sheetView></sheetViews>"},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',o="",r=0;r<e;r++)o+="<si><t>",o+=this.processString(this.sharedString[r]),o+="</t></si>";o+="</sst>",this.addToArchive(t+o,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"<")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,">")),e},e.prototype.saveStyles=function(){var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,o){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,""")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,o=this.mFonts;t<o.length;t++){var r=o[t];e+="<font>",r.b&&(e+="<b />"),r.i&&(e+="<i />"),r.u&&(e+="<u />"),e+='<sz val="'+this.pixelsToRowHeight(r.sz)+'" />',e+='<color rgb="'+r.color+'" />',e+='<name val="'+r.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,o){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+o+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,o=this.mBorders;t<o.length;t++){var r=o[t];if(this.isAllBorder(r)){var n=r.all.color.replace("#",""),i=r.all.lineStyle;e+='<border><left style="'+i+'"><color rgb="FF'+n+'" /></left><right style="'+i+'"><color rgb="FF'+n+'" /></right><top style="'+i+'"><color rgb="FF'+n+'" /></top><bottom style="'+i+'"><color rgb="FF'+n+'" /></bottom></border>'}else e+='<border><left style="'+r.left.lineStyle+'"><color rgb="FF'+r.left.color.replace("#","")+'" /></left><right style="'+r.right.lineStyle+'"><color rgb="FF'+r.right.color.replace("#","")+'" /></right><top style="'+r.top.lineStyle+'"><color rgb="FF'+r.top.color.replace("#","")+'" /></top><bottom style="'+r.bottom.lineStyle+'"><color rgb="FF'+r.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(o,r){t+='<cellStyle name="'+r+'" xfId="'+e.cellStyles.get(r).xfId+'"',"Normal"===r&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,o=this.mCellStyleXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></xf>'):e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,o=this.mCellXfs;t<o.length;t++){var r=o[t];e+='<xf numFmtId="'+r.numFmtId+'" fontId="'+r.fontId+'" fillId="'+r.fillId+'" borderId="'+r.borderId+'" xfId="'+r.xfId+'" ',1===r.applyAlignment?(e+='applyAlignment="1"><alignment ',void 0!==r.alignment.horizontal&&(e+='horizontal="'+r.alignment.horizontal+'" '),void 0!==r.alignment.vertical&&(e+='vertical="'+r.alignment.vertical+'" '),e+='wrapText="'+r.alignment.wrapText+'" /></xf>'):e+=" />"}return e+"</cellXfs>"},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,o='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(o+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(o+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(o+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(o+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(o+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(o+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(o+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(o+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",o+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),o+="</cp:coreProperties>",this.addToArchive(o,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,o=0,r=0;r<t;r++,o++)e+='<Relationship Id="rId'+(r+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(r+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++o).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",o=this.worksheets.length,r=0;r<o;r++)t+='<Override PartName="/xl/worksheets/sheet'+(r+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,t){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),r=new a.ZipArchiveItem(o,t);this.mArchive.addItem(r)}else{var r=new a.ZipArchiveItem(e,t);this.mArchive.addItem(r)}},e.prototype.processMergeCells=function(e,t,o){if(0!==e.rowSpan||0!==e.colSpan){var n=new r.MergeCell;n.x=e.index,n.width=e.colSpan,n.y=t,n.height=e.rowSpan;var i=this.getCellName(n.y,n.x),l=this.getCellName(t+n.height,e.index+n.width);n.ref=i+":"+l,o.add(n)}return o},e.prototype.dateToTicks=function(e,t,o){var r=[0,31,59,90,120,151,181,212,243,273,304,334,365],n=[0,31,60,91,121,152,182,213,244,274,305,335,366];if(e>=1&&e<=9999&&t>=1&&t<=12){var i=this.isLeapYear(e)?n:r,l=e-1;return 864e9*(365*l+(l/4|0)-(l/100|0)+(l/400|0)+i[t-1]+o-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,o){if(e>=0&&e<24&&t>=0&&t<60&&o>=0&&o<60){return 1e4*(3600*e+60*t+o)*1e3}throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}();t.Workbook=h;var u=function(){function e(){}return e}();t.BuiltInProperties=u}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])} | ||
;return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Row=o;var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return i(t,e),t}(Array);t.Rows=r}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(Array);t.Worksheets=o}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.isSummaryRowBelow=!0}return e}();t.Worksheet=o;var r=function(){function e(){}return e}();t.HyperLink=r;var n=function(){function e(){}return e}();t.Grouping=n;var l=function(){function e(){}return e}();t.FreezePane=l;var s=function(){function e(){}return e}();t.MergeCell=s;var a=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.add=function(e){for(var r=!1,n=0,i=0,l=o;i<l.length;i++){var a=l[i];if(t.isIntersecting(a,e)){var p=new s;p.x=Math.min(a.x,e.x),p.y=Math.min(a.Y,e.y),p.width=Math.max(a.Width+a.X,e.width+e.x),p.height=Math.max(a.Height+a.Y,e.height+e.y),p.ref=o[n].ref.split(":")[0]+":"+e.ref.split(":")[1],o[n]=p,r=!0}n++}r||o.push(e)},o}return i(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array);t.MergeCells=a}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=14,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.numberFormat="GENERAL",this.type="datetime",this.borders=new d,this.isGlobalStyle=!1}return e}();t.CellStyle=o;var r=function(){function e(){this.sz=14,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}return e}();t.Font=r;var n=function(){function e(){}return e}();t.CellXfs=n;var i=function(){function e(){}return e}();t.Alignment=i;var l=function(){function e(){}return e}();t.CellStyleXfs=l;var s=function(){function e(){this.name="Normal",this.xfId=0}return e}();t.CellStyles=s;var a=function(){function e(e,t){this.numFmtId=e,this.formatCode=t}return e}();t.NumFmt=a;var p=function(){function e(e,t){this.lineStyle=e,this.color=t}return e}();t.Border=p;var d=function(){function e(){this.left=new p("none","#FFFFFF"),this.right=new p("none","#FFFFFF"),this.top=new p("none","#FFFFFF"),this.bottom=new p("none","#FFFFFF"),this.all=new p("none","#FFFFFF")}return e}();t.Borders=d}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Column=o}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n,i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e}();t.Cell=o;var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var o=!1,r=0,n=0,i=t;n<i.length;n++){i[n].index===e.index&&(t[r]=e,o=!0),r++}o||t.push(e)},t}return i(t,e),t}(Array);t.Cells=r}.apply(t,r))&&(e.exports=n)},function(t,o){t.exports=e},function(e,t,o){var r,n;r=[o,t,o(10)],void 0!==(n=function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){if(this.csvStr="",this.formatter=new o.ValueFormatter,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var t=0;t<e.styles.length;t++)void 0!==e.styles[t].name&&void 0!==e.styles[t].numberFormat&&this.globalStyles.set(e.styles[t].name,e.styles[t].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,o=0,r=e;o<r.length;o++){var n=r[o];if(null===n.index||void 0===n.index)throw Error("Row index is missing.");for(;t<n.index;)this.csvStr+="\n",t++;this.parseRow(n)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,o=0,r=e.cells;o<r.length;o++){var n=r[o];if(null===n.index||void 0===n.index)throw Error("Cell index is missing.");for(;t<n.index;)this.csvStr+=",",t++;this.parseCell(n)}},e.prototype.parseCell=function(e){var t=this.csvStr;void 0!==e.value&&(e.value instanceof Date?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)})):t+=e.value:"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat})):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)})):t+=e.value:t+=this.parseCellValue(e.value)),this.csvStr=t},e.prototype.parseCellValue=function(e){return-1!==e.indexOf(",")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob([this.csvStr],{type:"text/plain"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.download=e,o.href=t;var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),o.dispatchEvent(r),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e}();t.CsvHelper=r}.apply(t,r))&&(e.exports=n)},function(e,t,o){var r,n;r=[o,t,o(11),o(11)],void 0!==(n=function(e,t,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var r=e;return o.isNullOrUndefined(t)||o.isNullOrUndefined(e)||(r=t(e)),r},e.prototype.displayText=function(e,t){return this.toView(e,this.getFormatFunction(t))},e}();t.ValueFormatter=n}.apply(t,r))&&(e.exports=n)},function(e,o){e.exports=t},function(e,t,o){var r,n;r=[o,t],void 0!==(n=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}();t.BlobHelper=o}.apply(t,r))&&(e.exports=n)}])}); | ||
//# sourceMappingURL=ej2-excel-export.umd.min.js.map |
@@ -1,8 +0,13 @@ | ||
var BlobHelper = (function () { | ||
/** | ||
* BlobHelper class | ||
*/ | ||
var BlobHelper = /** @class */ (function () { | ||
function BlobHelper() { | ||
/* tslint:disable:no-any */ | ||
this.parts = []; | ||
} | ||
/* tslint:disable:no-any */ | ||
BlobHelper.prototype.append = function (part) { | ||
this.parts.push(part); | ||
this.blob = undefined; | ||
this.blob = undefined; // Invalidate the blob | ||
}; | ||
@@ -9,0 +14,0 @@ BlobHelper.prototype.getBlob = function () { |
@@ -1,2 +0,5 @@ | ||
var CellStyle = (function () { | ||
/** | ||
* CellStyle class | ||
*/ | ||
var CellStyle = /** @class */ (function () { | ||
function CellStyle() { | ||
@@ -22,3 +25,3 @@ this.numFmtId = 0; | ||
export { CellStyle }; | ||
var Font = (function () { | ||
var Font = /** @class */ (function () { | ||
function Font() { | ||
@@ -35,3 +38,3 @@ this.sz = 14; | ||
export { Font }; | ||
var CellXfs = (function () { | ||
var CellXfs = /** @class */ (function () { | ||
function CellXfs() { | ||
@@ -42,3 +45,3 @@ } | ||
export { CellXfs }; | ||
var Alignment = (function () { | ||
var Alignment = /** @class */ (function () { | ||
function Alignment() { | ||
@@ -49,3 +52,3 @@ } | ||
export { Alignment }; | ||
var CellStyleXfs = (function () { | ||
var CellStyleXfs = /** @class */ (function () { | ||
function CellStyleXfs() { | ||
@@ -56,3 +59,3 @@ } | ||
export { CellStyleXfs }; | ||
var CellStyles = (function () { | ||
var CellStyles = /** @class */ (function () { | ||
function CellStyles() { | ||
@@ -65,3 +68,3 @@ this.name = 'Normal'; | ||
export { CellStyles }; | ||
var NumFmt = (function () { | ||
var NumFmt = /** @class */ (function () { | ||
function NumFmt(id, code) { | ||
@@ -74,3 +77,6 @@ this.numFmtId = id; | ||
export { NumFmt }; | ||
var Border = (function () { | ||
/** | ||
* Border class | ||
*/ | ||
var Border = /** @class */ (function () { | ||
function Border(mLine, mColor) { | ||
@@ -83,3 +89,6 @@ this.lineStyle = mLine; | ||
export { Border }; | ||
var Borders = (function () { | ||
/** | ||
* Border class | ||
*/ | ||
var Borders = /** @class */ (function () { | ||
function Borders() { | ||
@@ -86,0 +95,0 @@ this.left = new Border('none', '#FFFFFF'); |
@@ -11,3 +11,6 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
var Cell = (function () { | ||
/** | ||
* Worksheet class | ||
*/ | ||
var Cell = /** @class */ (function () { | ||
function Cell() { | ||
@@ -18,3 +21,6 @@ } | ||
export { Cell }; | ||
var Cells = (function (_super) { | ||
/** | ||
* Rows class | ||
*/ | ||
var Cells = /** @class */ (function (_super) { | ||
__extends(Cells, _super); | ||
@@ -21,0 +27,0 @@ function Cells() { |
@@ -1,2 +0,5 @@ | ||
var Column = (function () { | ||
/** | ||
* Column class | ||
*/ | ||
var Column = /** @class */ (function () { | ||
function Column() { | ||
@@ -3,0 +6,0 @@ } |
import { ValueFormatter } from './value-formatter'; | ||
var CsvHelper = (function () { | ||
/** | ||
* CsvHelper class | ||
*/ | ||
var CsvHelper = /** @class */ (function () { | ||
/* tslint:disable:no-any */ | ||
function CsvHelper(json) { | ||
@@ -15,7 +19,10 @@ this.csvStr = ''; | ||
} | ||
// Parses Worksheets data to DOM. | ||
if (json.worksheets !== null && json.worksheets !== undefined) { | ||
this.parseWorksheet(json.worksheets[0]); | ||
} | ||
//this.csvStr = 'a1,a2,a3\nb1,b2,b3'; | ||
} | ||
CsvHelper.prototype.parseWorksheet = function (json) { | ||
//Rows | ||
if (json.rows !== null && json.rows !== undefined) { | ||
@@ -25,2 +32,3 @@ this.parseRows(json.rows); | ||
}; | ||
/* tslint:disable:no-any */ | ||
CsvHelper.prototype.parseRows = function (rows) { | ||
@@ -30,2 +38,3 @@ var count = 1; | ||
var row = rows_1[_i]; | ||
//Row index | ||
if (row.index !== null && row.index !== undefined) { | ||
@@ -43,2 +52,3 @@ while (count < row.index) { | ||
}; | ||
/* tslint:disable:no-any */ | ||
CsvHelper.prototype.parseRow = function (row) { | ||
@@ -49,2 +59,3 @@ if (row.cells !== null && row.cells !== undefined) { | ||
var cell = _a[_i]; | ||
//cell index | ||
if (cell.index !== null && cell.index !== undefined) { | ||
@@ -63,2 +74,3 @@ while (count < cell.index) { | ||
}; | ||
/* tslint:disable:no-any */ | ||
CsvHelper.prototype.parseCell = function (cell) { | ||
@@ -69,5 +81,7 @@ var csv = this.csvStr; | ||
if (cell.style !== undefined && cell.style.numberFormat !== undefined) { | ||
/* tslint:disable-next-line:max-line-length */ | ||
csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: cell.style.numberFormat })); | ||
} | ||
else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) { | ||
/* tslint:disable-next-line:max-line-length */ | ||
csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: this.globalStyles.get(cell.style.name) })); | ||
@@ -84,5 +98,7 @@ } | ||
if (cell.style !== undefined && cell.style.numberFormat !== undefined) { | ||
/* tslint:disable-next-line:max-line-length */ | ||
csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: cell.style.numberFormat })); | ||
} | ||
else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) { | ||
/* tslint:disable-next-line:max-line-length */ | ||
csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: this.globalStyles.get(cell.style.name) })); | ||
@@ -108,2 +124,7 @@ } | ||
}; | ||
/** | ||
* Saves the file with specified name and sends the file to client browser | ||
* @param {string} fileName- file name to save. | ||
* @param {Blob} buffer- the content to write in file | ||
*/ | ||
CsvHelper.prototype.save = function (fileName) { | ||
@@ -110,0 +131,0 @@ this.buffer = new Blob([this.csvStr], { type: 'text/plain' }); |
@@ -0,1 +1,4 @@ | ||
/** | ||
* index class | ||
*/ | ||
export * from './cell-style'; | ||
@@ -2,0 +5,0 @@ export * from './cell'; |
@@ -11,3 +11,6 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
var Row = (function () { | ||
/** | ||
* Worksheet class | ||
*/ | ||
var Row = /** @class */ (function () { | ||
function Row() { | ||
@@ -18,3 +21,6 @@ } | ||
export { Row }; | ||
var Rows = (function (_super) { | ||
/** | ||
* Rows class | ||
*/ | ||
var Rows = /** @class */ (function (_super) { | ||
__extends(Rows, _super); | ||
@@ -21,0 +27,0 @@ function Rows() { |
import { isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
import { Internationalization } from '@syncfusion/ej2-base'; | ||
var ValueFormatter = (function () { | ||
// import { IValueFormatter } from '../base/interface'; | ||
/** | ||
* ValueFormatter class to globalize the value. | ||
* @hidden | ||
*/ | ||
var ValueFormatter = /** @class */ (function () { | ||
function ValueFormatter(cultureName) { | ||
this.intl = new Internationalization(); | ||
// if (!isNullOrUndefined(cultureName)) { | ||
// this.intl.culture = cultureName; | ||
// } | ||
} | ||
@@ -15,2 +23,16 @@ ValueFormatter.prototype.getFormatFunction = function (format) { | ||
}; | ||
// public getParserFunction(format: NumberFormatOptions | DateFormatOptions): Function { | ||
// if ((<DateFormatOptions>format).type) { | ||
// return this.intl.getDateParser(<DateFormatOptions>format); | ||
// } else { | ||
// return this.intl.getNumberParser(<DateFormatOptions>format); | ||
// } | ||
// } | ||
// public fromView(value: string, format: Function, type?: string): string | number | Date { | ||
// if (type === 'date' || type === 'datetime' || type === 'number') { | ||
// return format(value); | ||
// } else { | ||
// return value; | ||
// } | ||
// } | ||
ValueFormatter.prototype.toView = function (value, format) { | ||
@@ -23,2 +45,8 @@ var result = value; | ||
}; | ||
// public setCulture(cultureName: string): void { | ||
// if (!isNullOrUndefined(cultureName)) { | ||
// setCulture(cultureName); | ||
// } | ||
// } | ||
/* tslint:disable:no-any */ | ||
ValueFormatter.prototype.displayText = function (value, format) { | ||
@@ -25,0 +53,0 @@ return this.toView(value, this.getFormatFunction(format)); |
@@ -11,3 +11,6 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
var Worksheet = (function () { | ||
/** | ||
* Worksheet class | ||
*/ | ||
var Worksheet = /** @class */ (function () { | ||
function Worksheet() { | ||
@@ -19,3 +22,3 @@ this.isSummaryRowBelow = true; | ||
export { Worksheet }; | ||
var HyperLink = (function () { | ||
var HyperLink = /** @class */ (function () { | ||
function HyperLink() { | ||
@@ -26,3 +29,3 @@ } | ||
export { HyperLink }; | ||
var Grouping = (function () { | ||
var Grouping = /** @class */ (function () { | ||
function Grouping() { | ||
@@ -33,3 +36,3 @@ } | ||
export { Grouping }; | ||
var FreezePane = (function () { | ||
var FreezePane = /** @class */ (function () { | ||
function FreezePane() { | ||
@@ -40,3 +43,3 @@ } | ||
export { FreezePane }; | ||
var MergeCell = (function () { | ||
var MergeCell = /** @class */ (function () { | ||
function MergeCell() { | ||
@@ -47,3 +50,6 @@ } | ||
export { MergeCell }; | ||
var MergeCells = (function (_super) { | ||
/** | ||
* MergeCells class | ||
*/ | ||
var MergeCells = /** @class */ (function (_super) { | ||
__extends(MergeCells, _super); | ||
@@ -50,0 +56,0 @@ function MergeCells() { |
@@ -11,3 +11,6 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
var Worksheets = (function (_super) { | ||
/** | ||
* Worksheets class | ||
*/ | ||
var Worksheets = /** @class */ (function (_super) { | ||
__extends(Worksheets, _super); | ||
@@ -14,0 +17,0 @@ function Worksheets() { |
{ | ||
"name": "@syncfusion/ej2-excel-export", | ||
"version": "15.4.17", | ||
"version": "15.4.20", | ||
"description": "Essential JS 2 Excel Export Library", | ||
@@ -9,4 +9,4 @@ "author": "Syncfusion Inc.", | ||
"dependencies": { | ||
"@syncfusion/ej2-compression": "^15.4.17", | ||
"@syncfusion/ej2-base": "^15.4.17" | ||
"@syncfusion/ej2-compression": "^15.4.20", | ||
"@syncfusion/ej2-base": "^15.4.20" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
944333
13705
0