(function(e){function t(t){for(var n,a,o=t[0],l=t[1],u=t[2],c=0,h=[];c0&&void 0!==arguments[0]?arguments[0]:{};this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0,e.col&&(this.col=e.col),e.row&&(this.row=e.row)};n.asInstance=function(e){return e instanceof n||null==e?e:new n(e)},n.prototype={worksheet:null,get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set col(e){e!==this.col&&(this.nativeCol=Math.floor(e),this.nativeColOff=Math.floor((e-this.nativeCol)*this.colWidth))},get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set row(e){e!==this.row&&(this.nativeRow=Math.floor(e),this.nativeRowOff=Math.floor((e-this.nativeRow)*this.rowHeight))},get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4},get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}}},{}],4:[function(e,t,r){"use strict";var n=e("../utils/col-cache"),a=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/shared-formula"),o=s.slideFormula,l=t.exports=function(e,t,r){if(!e||!t)throw new Error("A Cell needs a Row");this._row=e,this._column=t,n.validateAddress(r),this._address=r,this._value=w.create(l.Types.Null,this),this.style=this._mergeStyle(e.style,t.style,{}),this._mergeCount=0};l.Types=i.ValueType,l.prototype={get worksheet(){return this._row.worksheet},get workbook(){return this._row.worksheet.workbook},destroy:function(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address},get numFmt(){return this.style.numFmt},set numFmt(e){this.style.numFmt=e},get font(){return this.style.font},set font(e){this.style.font=e},get alignment(){return this.style.alignment},set alignment(e){this.style.alignment=e},get border(){return this.style.border},set border(e){this.style.border=e},get fill(){return this.style.fill},set fill(e){this.style.fill=e},_mergeStyle:function(e,t,r){var n=e&&e.numFmt||t&&t.numFmt;n&&(r.numFmt=n);var a=e&&e.font||t&&t.font;a&&(r.font=a);var i=e&&e.alignment||t&&t.alignment;i&&(r.alignment=i);var s=e&&e.border||t&&t.border;s&&(r.border=s);var o=e&&e.fill||t&&t.fill;return o&&(r.fill=o),r},get address(){return this._address},get row(){return this._row.number},get col(){return this._column.number},get $col$row(){return"$"+this._column.letter+"$"+this.row},get type(){return this._value.type},get effectiveType(){return this._value.effectiveType},toCsvString:function(){return this._value.toCsvString()},addMergeRef:function(){this._mergeCount++},releaseMergeRef:function(){this._mergeCount--},get isMerged(){return this._mergeCount>0||this.type===l.Types.Merge},merge:function(e){this._value.release(),this._value=w.create(l.Types.Merge,this,e),this.style=e.style},unmerge:function(){this.type===l.Types.Merge&&(this._value.release(),this._value=w.create(l.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))},isMergedTo:function(e){return this._value.type===l.Types.Merge&&this._value.isMergedTo(e)},get master(){return this.type===l.Types.Merge?this._value.master:this},get isHyperlink(){return this._value.type===l.Types.Hyperlink},get hyperlink(){return this._value.hyperlink},get value(){return this._value.value},set value(e){this.type!==l.Types.Merge?(this._value.release(),this._value=w.create(w.getType(e),this,e)):this._value.master.value=e},get text(){return this._value.toString()},get html(){return a.escapeHtml(this.text)},toString:function(){return this.text},_upgradeToHyperlink:function(e){this.type===l.Types.String&&(this._value=w.create(l.Types.Hyperlink,this,{text:this._value.value,hyperlink:e}))},get formula(){return this._value.formula},get result(){return this._value.result},get formulaType(){return this._value.formulaType},get fullAddress(){var e=this._row.worksheet;return{sheetName:e.name,address:this.address,row:this.row,col:this.col}},get name(){return this.names[0]},set name(e){this.names=[e]},get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set names(e){var t=this,r=this.workbook.definedNames;this.workbook.definedNames.removeAllNames(t.fullAddress),e.forEach((function(e){r.addEx(t.fullAddress,e)}))},addName:function(e){this.workbook.definedNames.addEx(this.fullAddress,e)},removeName:function(e){this.workbook.definedNames.removeEx(this.fullAddress,e)},removeAllNames:function(){this.workbook.definedNames.removeAllNames(this.fullAddress)},get _dataValidations(){return this.worksheet.dataValidations},get dataValidation(){return this._dataValidations.find(this.address)},set dataValidation(e){this._dataValidations.add(this.address,e)},get model(){var e=this._value.model;return e.style=this.style,e},set model(e){this._value.release(),this._value=w.create(e.type,this),this._value.model=e,e.style?this.style=e.style:this.style={}}};var u=function(e){this.model={address:e.address,type:l.Types.Null}};u.prototype={get value(){return null},set value(e){},get type(){return l.Types.Null},get effectiveType(){return l.Types.Null},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return""},release:function(){},toString:function(){return""}};var c=function(e,t){this.model={address:e.address,type:l.Types.Number,value:t}};c.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.Number},get effectiveType(){return l.Types.Number},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return""+this.model.value},release:function(){},toString:function(){return this.model.value.toString()}};var h=function(e,t){this.model={address:e.address,type:l.Types.String,value:t}};h.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.String},get effectiveType(){return l.Types.String},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return'"'+this.model.value.replace(/"/g,'""')+'"'},release:function(){},toString:function(){return this.model.value}};var d=function(e,t){this.model={address:e.address,type:l.Types.String,value:t}};d.prototype={get value(){return this.model.value},set value(e){this.model.value=e},toString:function(){return this.model.value.richText.map((function(e){return e.text})).join("")},get type(){return l.Types.RichText},get effectiveType(){return l.Types.RichText},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return'"'+this.text.replace(/"/g,'""')+'"'},release:function(){}};var f=function(e,t){this.model={address:e.address,type:l.Types.Date,value:t}};f.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.Date},get effectiveType(){return l.Types.Date},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return this.model.value.toISOString()},release:function(){},toString:function(){return this.model.value.toString()}};var p=function(e,t){this.model=Object.assign({address:e.address,type:l.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip?{tooltip:t.tooltip}:{})};p.prototype={get value(){return Object.assign({text:this.model.text,hyperlink:this.model.hyperlink},this.model.tooltip?{tooltip:this.model.tooltip}:{})},set value(e){this.model=Object.assign({text:e.text,hyperlink:e.hyperlink},e&&e.tooltip?{tooltip:e.tooltip}:{})},get text(){return this.model.text},set text(e){this.model.text=e},get hyperlink(){return this.model.hyperlink},set hyperlink(e){this.model.hyperlink=e},get type(){return l.Types.Hyperlink},get effectiveType(){return l.Types.Hyperlink},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return this.model.hyperlink},release:function(){},toString:function(){return this.model.text}};var m=function(e,t){this.model={address:e.address,type:l.Types.Merge,master:t?t.address:void 0},this._master=t,t&&t.addMergeRef()};m.prototype={get value(){return this._master.value},set value(e){e instanceof l?(this._master&&this._master.releaseMergeRef(),e.addMergeRef(),this._master=e):this._master.value=e},isMergedTo:function(e){return e===this._master},get master(){return this._master},get type(){return l.Types.Merge},get effectiveType(){return this._master.effectiveType},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return""},release:function(){this._master.releaseMergeRef()},toString:function(){return this.value.toString()}};var g=function(e,t){this.cell=e,this.model={address:e.address,type:l.Types.Formula,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}};g.prototype={get value(){return this.model.formula?{formula:this.model.formula,result:this.model.result}:{sharedFormula:this.model.sharedFormula,result:this.model.result}},set value(e){this.model.formula=e.formula,this.model.sharedFormula=e.sharedFormula,this.model.result=e.result},validate:function(e){switch(w.getType(e)){case l.Types.Null:case l.Types.String:case l.Types.Number:case l.Types.Date:break;case l.Types.Hyperlink:case l.Types.Formula:default:throw new Error("Cannot process that type of result value")}},get dependencies(){var e=this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),t=this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g);return{ranges:e,cells:t}},get formula(){return this.model.formula||this._getTranslatedFormula()},set formula(e){this.model.formula=e},get formulaType(){return this.model.formula?i.FormulaType.Master:this.model.sharedFormula?i.FormulaType.Shared:i.FormulaType.None},get result(){return this.model.result},set result(e){this.model.result=e},get type(){return l.Types.Formula},get effectiveType(){var e=this.model.result;return null===e||void 0===e?i.ValueType.Null:e instanceof String||"string"===typeof e?i.ValueType.String:"number"===typeof e?i.ValueType.Number:e instanceof Date?i.ValueType.Date:e.text&&e.hyperlink?i.ValueType.Hyperlink:e.formula?i.ValueType.Formula:i.ValueType.Null},get address(){return this.model.address},set address(e){this.model.address=e},_getTranslatedFormula:function(){if(!this._translatedFormula&&this.model.sharedFormula){var e=this.cell.worksheet,t=e.findCell(this.model.sharedFormula);this._translatedFormula=t&&o(t.formula,t.address,this.model.address)}return this._translatedFormula},toCsvString:function(){return""+(this.model.result||"")},release:function(){},toString:function(){return this.model.result?this.model.result.toString():""}};var _=function(e,t){this.model={address:e.address,type:l.Types.SharedString,value:t}};_.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.SharedString},get effectiveType(){return l.Types.SharedString},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return""+this.model.value},release:function(){},toString:function(){return this.model.value.toString()}};var y=function(e,t){this.model={address:e.address,type:l.Types.Boolean,value:t}};y.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.Boolean},get effectiveType(){return l.Types.Boolean},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return this.model.value?1:0},release:function(){},toString:function(){return this.model.value.toString()}};var v=function(e,t){this.model={address:e.address,type:l.Types.Error,value:t}};v.prototype={get value(){return this.model.value},set value(e){this.model.value=e},get type(){return l.Types.Error},get effectiveType(){return l.Types.Error},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return this.toString()},release:function(){},toString:function(){return this.model.value.error.toString()}};var b=function(e,t){this.model={address:e.address,type:l.Types.String,value:JSON.stringify(t),rawValue:t}};b.prototype={get value(){return this.model.rawValue},set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)},get type(){return l.Types.String},get effectiveType(){return l.Types.String},get address(){return this.model.address},set address(e){this.model.address=e},toCsvString:function(){return this.model.value},release:function(){},toString:function(){return this.model.value}};var w={getType:function(e){return null===e||void 0===e?l.Types.Null:e instanceof String||"string"===typeof e?l.Types.String:"number"===typeof e?l.Types.Number:"boolean"===typeof e?l.Types.Boolean:e instanceof Date?l.Types.Date:e.text&&e.hyperlink?l.Types.Hyperlink:e.formula||e.sharedFormula?l.Types.Formula:e.richText?l.Types.RichText:e.sharedString?l.Types.SharedString:e.error?l.Types.Error:l.Types.JSON},types:[{t:l.Types.Null,f:u},{t:l.Types.Number,f:c},{t:l.Types.String,f:h},{t:l.Types.Date,f:f},{t:l.Types.Hyperlink,f:p},{t:l.Types.Formula,f:g},{t:l.Types.Merge,f:m},{t:l.Types.JSON,f:b},{t:l.Types.SharedString,f:_},{t:l.Types.RichText,f:d},{t:l.Types.Boolean,f:y},{t:l.Types.Error,f:v}].reduce((function(e,t){return e[t.t]=t.f,e}),[]),create:function(e,t,r){var n=this.types[e];if(!n)throw new Error("Could not create Value of type "+e);return new n(t,r)}}},{"../utils/col-cache":15,"../utils/shared-formula":17,"../utils/under-dash":20,"./enums":8}],5:[function(e,t,r){"use strict";var n=e("../utils/under-dash"),a=e("./enums"),i=e("../utils/col-cache"),s=t.exports=function(e,t,r){this._worksheet=e,this._number=t,!1!==r&&(this.defn=r)};s.prototype={get number(){return this._number},get worksheet(){return this._worksheet},get letter(){return i.n2l(this._number)},get isCustomWidth(){return void 0!==this.width&&8!==this.width},get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}},set defn(e){e?(this.key=e.key,this.width=e.width,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this.key,delete this.width,this.style={},this.outlineLevel=0)},get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]},get header(){return this._header},set header(e){var t=this;void 0!==e?(this._header=e,this.headers.forEach((function(e,r){t._worksheet.getCell(r+1,t.number).value=e}))):this._header=void 0},get key(){return this._key},set key(e){var t=this._key&&this._worksheet.getColumnKey(this._key);t===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)},get hidden(){return!!this._hidden},set hidden(e){this._hidden=e},get outlineLevel(){return this._outlineLevel||0},set outlineLevel(e){this._outlineLevel=e},get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)},toString:function(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})},equivalentTo:function(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&n.isEqual(this.style,e.style)},get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;var e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill)},get headerCount(){return this.headers.length},eachCell:function(e,t){var r=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,(function(e,n){t(e.getCell(r),n)}))},get values(){var e=[];return this.eachCell((function(t,r){t&&t.type!==a.ValueType.Null&&(e[r]=t.value)})),e},set values(e){var t=this;if(e){var r=this.number,n=0;e.hasOwnProperty("0")&&(n=1),e.forEach((function(e,a){t._worksheet.getCell(a+n,r).value=e}))}},_applyStyle:function(e,t){return this.style[e]=t,this.eachCell((function(r){r[e]=t})),t},get numFmt(){return this.style.numFmt},set numFmt(e){this._applyStyle("numFmt",e)},get font(){return this.style.font},set font(e){this._applyStyle("font",e)},get alignment(){return this.style.alignment},set alignment(e){this._applyStyle("alignment",e)},get border(){return this.style.border},set border(e){this._applyStyle("border",e)},get fill(){return this.style.fill},set fill(e){this._applyStyle("fill",e)}},s.toModel=function(e){var t=[],r=null;return e&&e.forEach((function(e,n){e.isDefault?r&&(r=null):r&&e.equivalentTo(r)?r.max=n+1:(r={min:n+1,max:n+1,width:e.width,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(r))})),t.length?t:void 0},s.fromModel=function(e,t){t=t||[];var r=[],n=1,a=0;while(athis.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)},expandRow:function(e){if(e){var t=e.dimensions;t&&this.expand(e.number,t.min,e.number,t.max)}},expandToAddress:function(e){var t=n.decodeEx(e);this.expand(t.row,t.col,t.row,t.col)},get tl(){return n.n2l(this.left)+this.top},get $t$l(){return"$"+n.n2l(this.left)+"$"+this.top},get br(){return n.n2l(this.right)+this.bottom},get $b$r(){return"$"+n.n2l(this.right)+"$"+this.bottom},get range(){return this._serialisedSheetName+this.tl+":"+this.br},get $range(){return this._serialisedSheetName+this.$t$l+":"+this.$b$r},get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl},get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l},get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)},toString:function(){return this.range},intersects:function(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(!(e.bottomthis.bottom)&&(!(e.rightthis.right))))},contains:function(e){var t=n.decodeEx(e);return this.containsEx(t)},containsEx:function(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&(e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right)}}},{"./../utils/col-cache":15}],10:[function(e,t,r){"use strict";var n=e("../utils/under-dash"),a=e("./enums"),i=e("./../utils/col-cache"),s=e("./cell"),o=t.exports=function(e,t){this._worksheet=e,this._number=t,this._cells=[],this.style={},this.outlineLevel=0};o.prototype={get number(){return this._number},get worksheet(){return this._worksheet},commit:function(){this._worksheet._commitRow(this)},destroy:function(){delete this._worksheet,delete this._cells,delete this.style},findCell:function(e){return this._cells[e-1]},getCellEx:function(e){var t=this._cells[e.col-1];if(!t){var r=this._worksheet.getColumn(e.col);t=new s(this,r,e.address),this._cells[e.col-1]=t}return t},getCell:function(e){if("string"===typeof e){var t=this._worksheet.getColumnKey(e);e=t?t.number:i.l2n(e)}return this._cells[e-1]||this.getCellEx({address:i.encodeAddress(this._number,e),row:this._number,col:e})},splice:function(e,t){var r=Array.prototype.slice.call(arguments,2),n=e+t,a=r.length-t,i=this._cells.length,s=void 0,o=void 0,l=void 0;if(a<0)for(s=e+r.length;s<=i;s++)l=this._cells[s-1],o=this._cells[s-a-1],o?(l=this.getCell(s),l.value=o.value,l.style=o.style):l&&(l.value=null,l.style={});else if(a>0)for(s=i;s>=n;s--)o=this._cells[s-1],o?(l=this.getCell(s+a),l.value=o.value,l.style=o.style):this._cells[s+a-1]=void 0;for(s=0;sr.col)&&(e=r.col),t0?{min:e,max:t}:null},_applyStyle:function(e,t){return this.style[e]=t,this._cells.forEach((function(r){r&&(r[e]=t)})),t},get numFmt(){return this.style.numFmt},set numFmt(e){this._applyStyle("numFmt",e)},get font(){return this.style.font},set font(e){this._applyStyle("font",e)},get alignment(){return this.style.alignment},set alignment(e){this._applyStyle("alignment",e)},get border(){return this.style.border},set border(e){this._applyStyle("border",e)},get fill(){return this.style.fill},set fill(e){this._applyStyle("fill",e)},get hidden(){return!!this._hidden},set hidden(e){this._hidden=e},get outlineLevel(){return this._outlineLevel||0},set outlineLevel(e){this._outlineLevel=e},get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)},get model(){var e=[],t=0,r=0;return this._cells.forEach((function(n){if(n){var a=n.model;a&&((!t||t>n.col)&&(t=n.col),re?t.orderNo:e}),0),i=Object.assign({},t,{id:r,name:e,orderNo:a+1,workbook:this}),s=new n(i);return this._worksheets[r]=s,s},removeWorksheetEx:function(e){delete this._worksheets[e.id]},removeWorksheet:function(e){var t=this.getWorksheet(e);t&&t.destroy()},getWorksheet:function(e){return void 0===e?this._worksheets.find((function(e){return e})):"number"===typeof e?this._worksheets[e]:"string"===typeof e?this._worksheets.find((function(t){return t&&t.name===e})):void 0},get worksheets(){return this._worksheets.slice(1).sort((function(e,t){return e.orderNo-t.orderNo})).filter(Boolean)},eachSheet:function(e){this.worksheets.forEach((function(t){e(t,t.id)}))},get definedNames(){return this._definedNames},clearThemes:function(){this._themes=void 0},addImage:function(e){var t=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),t},getImage:function(e){return this.media[e]},get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map((function(e){return e.model})),sheets:this.worksheets.map((function(e){return e.model})).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media}},set model(e){var t=this;this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this._worksheets=[],e.worksheets.forEach((function(r){var a=r.id,i=r.name,s=e.sheets.findIndex((function(e){return e.id===a})),o=r.state,l=t._worksheets[a]=new n({id:a,name:i,orderNo:s,state:o,workbook:t});l.model=r})),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}},{"./../csv/csv":2,"./../xlsx/xlsx":89,"./defined-names":7,"./worksheet":12}],12:[function(e,t,r){"use strict";var n=e("../utils/under-dash"),a=e("./../utils/col-cache"),i=e("./range"),s=e("./row"),o=e("./column"),l=e("./enums"),u=e("./anchor"),c=e("./data-validations"),h=function(e){e=e||{},this.id=e.id,this.orderNo=e.orderNo,this.name=e.name||"Sheet"+this.id,this.state=e.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this._workbook=e.workbook,this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},e.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!e.pageSetup||!e.pageSetup.fitToWidth&&!e.pageSetup.fitToHeight||e.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},e.pageSetup),this.dataValidations=new c,this.views=e.views||[],this.autoFilter=e.autoFilter||null,this._media=[]};h.prototype={get workbook(){return this._workbook},destroy:function(){this._workbook.removeWorksheetEx(this)},get dimensions(){var e=new i;return this._rows.forEach((function(t){if(t){var r=t.dimensions;r&&e.expand(t.number,r.min,t.number,r.max)}})),e},get columns(){return this._columns},set columns(e){var t=this;this._headerRowCount=e.reduce((function(e,t){var r=(t.header?1:t.headers&&t.headers.length)||0;return Math.max(e,r)}),0);var r=1,n=this._columns=[];e.forEach((function(e){var a=new o(t,r++,!1);n.push(a),a.defn=e}))},getColumnKey:function(e){return this._keys[e]},setColumnKey:function(e,t){this._keys[e]=t},deleteColumnKey:function(e){delete this._keys[e]},eachColumnKey:function(e){n.each(this._keys,e)},getColumn:function(e){if("string"===typeof e){var t=this._keys[e];if(t)return t;e=a.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){var r=this._columns.length+1;while(r<=e)this._columns.push(new o(this,r++))}return this._columns[e-1]},spliceColumns:function(e,t){var r=this,n=void 0,a=Array.prototype.slice.call(arguments,2),i=this._rows,s=i.length;if(a.length>0){var o=function(){var i=[e,t];a.forEach((function(e){i.push(e[n]||null)}));var s=r.getRow(n+1);s.splice.apply(s,i)};for(n=0;n0)for(n=c;n>=u;n--)this.getColumn(n+l).defn=this.getColumn(n).defn;for(n=e;n0&&void 0===e[t-1])t--;return t},get _nextRow(){return this._lastRowNumber+1},get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]},findRow:function(e){return this._rows[e-1]},get rowCount(){return this._lastRowNumber},get actualRowCount(){var e=0;return this.eachRow((function(){e++})),e},getRow:function(e){var t=this._rows[e-1];return t||(t=this._rows[e-1]=new s(this,e)),t},addRow:function(e){var t=this.getRow(this._nextRow);return t.values=e,t},addRows:function(e){var t=this;e.forEach((function(e){t.addRow(e)}))},spliceRows:function(e,t){var r=this,n=Array.prototype.slice.call(arguments,2),a=e+t,i=n.length-t,s=this._rows.length,o=void 0,l=void 0;if(i<0)for(o=a;o<=s;o++)l=this._rows[o-1],l?function(){var e=r.getRow(o+i);e.values=l.values,e.style=l.style,l.eachCell({includeEmpty:!0},(function(t,r){e.getCell(r).style=t.style})),r._rows[o-1]=void 0}():this._rows[o+i-1]=void 0;else if(i>0)for(o=s;o>=a;o--)l=this._rows[o-1],l?function(){var e=r.getRow(o+i);e.values=l.values,e.style=l.style,l.eachCell({includeEmpty:!0},(function(t,r){e.getCell(r).style=t.style}))}():this._rows[o+i-1]=void 0;for(o=0;oe.top||a>e.left)&&this.getCell(r,a).merge(t);this._merges[t.address]=e},_unMergeMaster:function(e){var t=this._merges[e.address];if(t){for(var r=t.top;r<=t.bottom;r++)for(var n=t.left;n<=t.right;n++)this.getCell(r,n).unmerge();delete this._merges[e.address]}},get hasMerges(){return n.some(this._merges,(function(){return!0}))},unMergeCells:function(){for(var e=new i(Array.prototype.slice.call(arguments,0)),t=e.top;t<=e.bottom;t++)for(var r=e.left;r<=e.right;r++){var n=this.findCell(t,r);n&&(n.type===l.ValueType.Merge?this._unMergeMaster(n.master):this._merges[n.address]&&this._unMergeMaster(n))}},fillFormula:function(e,t,r){var n=a.decode(e),i=n.top,s=n.left,o=n.bottom,l=n.right,u=l-s+1,c=a.encodeAddress(i,s),h=void 0;h="function"===typeof r?r:Array.isArray(r)?Array.isArray(r[0])?function(e,t){return r[e-i][t-s]}:function(e,t){return r[(e-i)*u+(t-s)]}:function(){};for(var d=!0,f=i;f<=o;f++)for(var p=s;p<=l;p++)d?(this.getCell(f,p).value={formula:t,result:h(f,p)},d=!1):this.getCell(f,p).value={sharedFormula:c,result:h(f,p)}},addImage:function(e,t){!t.tl||t.tl instanceof u||(t.tl=new u(t.tl),t.tl.worksheet=this),!t.br||t.br instanceof u||(t.br=new u(t.br),t.br.worksheet=this),this._media.push({type:"image",imageId:e,range:t})},getImages:function(){return this._media.filter((function(e){return"image"===e.type}))},addBackgroundImage:function(e){this._media.push({type:"background",imageId:e})},getBackgroundImageId:function(){return this._media.filter((function(e){return"background"===e.type})).map((function(e){return e.imageId}))[0]},get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set tabColor(e){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=e},get model(){var e={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media};e.cols=o.toModel(this.columns);var t=e.rows=[],r=e.dimensions=new i;return this._rows.forEach((function(e){var n=e&&e.model;n&&(r.expand(n.number,n.min,n.number,n.max),t.push(n))})),e.merges=[],n.each(this._merges,(function(t){e.merges.push(t.range)})),e},_parseRows:function(e){var t=this;this._rows=[],e.rows.forEach((function(e){var r=new s(t,e.number);t._rows[r.number-1]=r,r.model=e}))},_parseMergeCells:function(e){var t=this;n.each(e.mergeCells,(function(e){t.mergeCells(e)}))},set model(e){var t=this;this.name=e.name,this._columns=o.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new c(e.dataValidations),this.properties=e.properties,this.pageSetup=e.pageSetup,this.views=e.views,this.autoFilter=e.autoFilter,this._media=e.media,this._media.filter((function(e){return"image"===e.type&&"string"!==typeof e.range})).forEach((function(e){e.range.tl.worksheet=t,e.range.br.worksheet=t}))}},t.exports=h},{"../utils/under-dash":20,"./../utils/col-cache":15,"./anchor":3,"./column":5,"./data-validations":6,"./enums":8,"./range":9,"./row":10}],13:[function(e,t,r){"use strict";var n=e("./config/set-value");n("promise",e("promish/dist/promish-node"),!1);var a={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach((function(e){a[e]=i[e]})),t.exports=a},{"./config/set-value":1,"./doc/enums":8,"./doc/workbook":11,"promish/dist/promish-node":200}],14:[function(e,t,r){"use strict";var n=e("./under-dash"),a=e("./col-cache"),i=function(e){this.template=e,this.sheets={}};i.prototype={addCell:function(e){this.addCellEx(a.decodeEx(e))},getCell:function(e){return this.findCellEx(a.decodeEx(e),!0)},findCell:function(e){return this.findCellEx(a.decodeEx(e),!1)},findCellAt:function(e,t,r){var n=this.sheets[e],a=n&&n[t];return a&&a[r]},addCellEx:function(e){if(e.top)for(var t=e.top;t<=e.bottom;t++)for(var r=e.left;r<=e.right;r++)this.getCellAt(e.sheetName,t,r);else this.findCellEx(e,!0)},getCellEx:function(e){return this.findCellEx(e,!0)},findCellEx:function(e,t){var r=this.findSheet(e,t),n=this.findSheetRow(r,e,t);return this.findRowCell(n,e,t)},getCellAt:function(e,t,r){var n=this.sheets[e]||(this.sheets[e]=[]),i=n[t]||(n[t]=[]);return i[r]||(i[r]={sheetName:e,address:a.n2l(r)+t,row:t,col:r})},removeCellEx:function(e){var t=this.findSheet(e);if(t){var r=this.findSheetRow(t,e);r&&delete r[e.col]}},forEach:function(e){n.each(this.sheets,(function(t){t&&t.forEach((function(t){t&&t.forEach((function(t){t&&e(t)}))}))}))},map:function(e){var t=[];return this.forEach((function(r){t.push(e(r))})),t},findSheet:function(e,t){var r=e.sheetName;return this.sheets[r]?this.sheets[r]:t?this.sheets[r]=[]:void 0},findSheetRow:function(e,t,r){var n=t.row;return e&&e[n]?e[n]:r?e[n]=[]:void 0},findRowCell:function(e,t,r){var n=t.col;return e&&e[n]?e[n]:r?e[n]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}},t.exports=i},{"./col-cache":15,"./under-dash":20}],15:[function(e,t,r){"use strict";var n=t.exports={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2n:{},_n2l:[],_level:function(e){return e<=26?1:e<=676?2:3},_fill:function(e){var t,r,n,a,i,s=1;if(e>=1)while(s<=26)t=this._dictionary[s-1],this._n2l[s]=t,this._l2n[t]=s,s++;if(e>=2)while(s<=702)r=s-27,n=r%26,a=Math.floor(r/26),t=this._dictionary[a]+this._dictionary[n],this._n2l[s]=t,this._l2n[t]=s,s++;if(e>=3)while(s<=16384)r=s-703,n=r%26,a=Math.floor(r/26)%26,i=Math.floor(r/676),t=this._dictionary[i]+this._dictionary[a]+this._dictionary[n],this._n2l[s]=t,this._l2n[t]=s,s++},l2n:function(e){if(this._l2n[e]||this._fill(e.length),!this._l2n[e])throw new Error("Out of bounds. Invalid column letter: "+e);return this._l2n[e]},n2l:function(e){if(e<1||e>16384)throw new Error(e+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress:function(e){if(!e.match(/^[A-Z]+\d+$/))throw new Error("Invalid Address: "+e);return!0},decodeAddress:function(e){var t=this._hash[e];if(t)return t;var r,n,a=e.match(/[A-Z]+/);a&&(r=a[0],n=this.l2n(r));var i,s,o=e.match(/\d+/);o&&(i=o[0],s=parseInt(i,10)),e=(r||"")+(i||"");var l={address:e,col:n,row:s,$col$row:"$"+(r||"")+"$"+(i||"")};return n<=100&&s<=100&&(this._hash[e]=l,this._hash[l.$col$row]=l),l},getAddress:function(e,t){if(t){var r=this.n2l(t)+e;return this.decodeAddress(r)}return this.decodeAddress(e)},decode:function(e){var t=e.split(":");if(2===t.length){var r=this.decodeAddress(t[0]),n=this.decodeAddress(t[1]),a={top:Math.min(r.row,n.row),left:Math.min(r.col,n.col),bottom:Math.max(r.row,n.row),right:Math.max(r.col,n.col)};return a.tl=this.n2l(a.left)+a.top,a.br=this.n2l(a.right)+a.bottom,a.dimensions=a.tl+":"+a.br,a}return this.decodeAddress(e)},decodeEx:function(e){var t=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=t[1]||t[2],n=t[3],a=n.split(":");if(a.length>1){var i=this.decodeAddress(a[0]),s=this.decodeAddress(a[1]),o=Math.min(i.row,s.row),l=Math.min(i.col,s.col),u=Math.max(i.row,s.row),c=Math.max(i.col,s.col);return i=this.n2l(l)+o,s=this.n2l(c)+u,{top:o,left:l,bottom:u,right:c,sheetName:r,tl:{address:i,col:l,row:o,$col$row:"$"+this.n2l(l)+"$"+o,sheetName:r},br:{address:s,col:c,row:u,$col$row:"$"+this.n2l(c)+"$"+u,sheetName:r},dimensions:i+":"+s}}if(n.startsWith("#"))return r?{sheetName:r,error:n}:{error:n};var h=this.decodeAddress(n);return r?Object.assign({sheetName:r},h):h},encodeAddress:function(e,t){return n.n2l(t)+e},encode:function(){switch(arguments.length){case 2:return n.encodeAddress(arguments[0],arguments[1]);case 4:return n.encodeAddress(arguments[0],arguments[1])+":"+n.encodeAddress(arguments[2],arguments[3]);default:throw new Error("Can only encode with 2 or 4 arguments")}}}},{}],16:[function(e,t,r){"use strict";t.exports={Promish:null}},{}],17:[function(e,t,r){"use strict";var n=e("./col-cache"),a=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,i=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i,s=function(e,t,r){var s=n.decode(t),o=n.decode(r);return e.replace(a,(function(e,t,r,a,l){if(l)return e;var u=i.exec(a);if(u){var c=u[1],h=u[2].toUpperCase(),d=u[3],f=u[4];if(h.length>3||3===h.length&&h>"XFD")return e;var p=n.l2n(h),m=parseInt(f,10);c||(p+=o.col-s.col),d||(m+=o.row-s.row);var g=(t||"")+(c||"")+n.n2l(p)+(d||"")+m;return g}return e}))};t.exports={slideFormula:s}},{"./col-cache":15}],18:[function(e,t,r){(function(r,n){"use strict";var a=e("stream"),i=e("./promish"),s=e("./utils"),o=e("./string-buf"),l=function(e,t){this._data=e,this._encoding=t};l.prototype={get length(){return this.toBuffer().length},copy:function(e,t,r,n){return this.toBuffer().copy(e,t,r,n)},toBuffer:function(){return this._buffer||(this._buffer=new n(this._data,this._encoding)),this._buffer}};var u=function(e){this._data=e};u.prototype={get length(){return this._data.length},copy:function(e,t,r,n){return this._data._buf.copy(e,t,r,n)},toBuffer:function(){return this._data.toBuffer()}};var c=function(e){this._data=e};c.prototype={get length(){return this._data.length},copy:function(e,t,r,n){this._data.copy(e,t,r,n)},toBuffer:function(){return this._data}};var h=function(e){this.size=e,this.buffer=new n(e),this.iRead=0,this.iWrite=0};h.prototype={toBuffer:function(){if(0===this.iRead&&this.iWrite===this.size)return this.buffer;var e=new n(this.iWrite-this.iRead);return this.buffer.copy(e,0,this.iRead,this.iWrite),e},get length(){return this.iWrite-this.iRead},get eod(){return this.iRead===this.iWrite},get full(){return this.iWrite===this.size},read:function(e){var t;return 0===e?null:void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite,t):(t=new n(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e,t)},write:function(e,t,r){var n=Math.min(r,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}};var d=t.exports=function(e){e=e||{},this.bufSize=e.bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};s.inherits(d,a.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map((function(e){return e.toBuffer()})))}},_getWritableBuffer:function(){if(this.buffers.length){var e=this.buffers[this.buffers.length-1];if(!e.full)return e}var t=new h(this.bufSize);return this.buffers.push(t),t},_pipe:function(e){var t=function(t){return new i.Promish((function(r){t.write(e.toBuffer(),(function(){r()}))}))},r=this.pipes.map(t);return r.length?i.Promish.all(r).then(s.nop):i.Promish.resolve()},_writeToBuffers:function(e){var t=0,r=e.length;while(t1)this._pipe(this.buffers.shift())}else this.corked?(this._writeToBuffers(i),r.nextTick(a)):this._pipe(i).then(a);else this.paused||this.emit("data",i.toBuffer()),this._writeToBuffers(i),this.emit("readable");return!0},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)while(this.buffers.length)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(e,t,r){var n=this,a=function(e){e?r(e):(n._flush(),n.pipes.forEach((function(e){e.end()})),n.emit("finish"))};e?this.write(e,t,a):a()},read:function(e){var t;if(e){t=[];while(e&&this.buffers.length&&!this.buffers[0].eod){var r=this.buffers[0],a=r.read(e);e-=a.length,t.push(a),r.eod&&r.full&&this.buffers.shift()}return n.concat(t)}return t=this.buffers.map((function(e){return e.toBuffer()})).filter(Boolean),this.buffers=[],n.concat(t)},setEncoding:function(e){this.encoding=e},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe:function(e){this.pipes=this.pipes.filter((function(t){return t!==e}))},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}})}).call(this,e("_process"),e("buffer").Buffer)},{"./promish":16,"./string-buf":19,"./utils":21,_process:198,buffer:96,stream:216}],19:[function(e,t,r){(function(e){"use strict";var r=t.exports=function(t){this._buf=new e(t&&t.size||16384),this._encoding=t&&t.encoding||"utf8",this._inPos=0,this._buffer=void 0};r.prototype={get length(){return this._inPos},get capacity(){return this._buf.length},get buffer(){return this._buf},toBuffer:function(){return this._buffer||(this._buffer=new e(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer},reset:function(e){e=e||0,this._buffer=void 0,this._inPos=e},_grow:function(t){var r=2*this._buf.length;while(r=this._buf.length-4)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t},addStringBuf:function(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),e._buf.copy(this._buf,this._inPos,0,e.length),this._inPos+=e.length)}}}).call(this,e("buffer").Buffer)},{buffer:96}],20:[function(e,t,r){"use strict";var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach((function(r){t(e[r],r)})))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some((function(r){return t(e[r],r)})))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every((function(r){return t(e[r],r)})))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map((function(r){return t(e[r],r)})):[]},isEqual:function(e,t){var r="undefined"===typeof e?"undefined":n(e),i="undefined"===typeof t?"undefined":n(t),s=Array.isArray(e),o=Array.isArray(t);if(r!==i)return!1;switch("undefined"===typeof e?"undefined":n(e)){case"object":return s||o?!(!s||!o)&&(e.length===t.length&&e.every((function(e,r){var n=t[r];return a.isEqual(e,n)}))):a.every(e,(function(e,r){var n=t[r];return a.isEqual(e,n)}));default:return e===t}},escapeHtml:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}};t.exports=a},{}],21:[function(e,r,n){(function(t,n){"use strict";var a=e("fs"),i=e("./promish"),s=function(e,t,r,n){e.super_=t,n||(n=r,r=null),r&&Object.keys(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}));var a={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach((function(e){a[e]=Object.getOwnPropertyDescriptor(n,e)})),e.prototype=Object.create(t.prototype,a)},o=r.exports={nop:function(){},promiseImmediate:function(e){return new i.Promish((function(r){t.setImmediate?n((function(){r(e)})):setTimeout((function(){r(e)}),1)}))},inherits:s,dateToExcel:function(e,t){return 25569+e.getTime()/864e5-(t?1462:0)},excelToDate:function(e,t){var r=Math.round(24*(e-25569+(t?1462:0))*3600*1e3);return new Date(r)},parsePath:function(e){var t=e.lastIndexOf("/");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath:function(e){var t=o.parsePath(e);return t.path+"/_rels/"+t.name+".rels"},xmlEncode:function(e){return e.replace(/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return""}}))},xmlDecode:function(e){return e.replace(/&([a-z]*);/,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return e}}))},validInt:function(e){var t=parseInt(e,10);return isNaN(t)?0:t},isDateFmt:function(e){if(!e)return!1;e=e.replace(/\[[^\]]*]/g,""),e=e.replace(/"[^"]*"/g,"");var t=null!==e.match(/[ymdhMsb]+/);return t},fs:{exists:function(e){return new i.Promish((function(t){a.exists(e,(function(e){t(e)}))}))}},toIsoDateString:function(e){return e.toIsoString().subsstr(0,10)}}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},e("timers").setImmediate)},{"./promish":16,fs:95,timers:219}],22:[function(e,t,r){"use strict";var n=e("./under-dash"),a=e("./utils"),i="<",s=">",o="",u='="',c='"',h=" ";function d(e,t,r){e.push(h),e.push(t),e.push(u),e.push(a.xmlEncode(r.toString())),e.push(c)}function f(e,t){t&&n.each(t,(function(t,r){void 0!==t&&d(e,r,t)}))}var p=t.exports=function(){this._xml=[],this._stack=[],this._rollbacks=[]};p.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},p.prototype={get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0},openXml:function(e){var t=this._xml;t.push("\n")},openNode:function(e,t){var r=this.tos,n=this._xml;r&&this.open&&n.push(s),this._stack.push(e),n.push(i),n.push(e),f(n,t),this.leaf=!0,this.open=!0},addAttribute:function(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d(this._xml,e,t)},addAttributes:function(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");f(this._xml,e)},writeText:function(e){var t=this._xml;this.open&&(t.push(s),this.open=!1),this.leaf=!1,t.push(a.xmlEncode(e.toString()))},writeXml:function(e){this.open&&(this._xml.push(s),this.open=!1),this.leaf=!1,this._xml.push(e)},closeNode:function(){var e=this._stack.pop(),t=this._xml;this.leaf?t.push(l):(t.push(o),t.push(e),t.push(s)),this.open=!1,this.leaf=!1},leafNode:function(e,t,r){this.openNode(e,t),void 0!==r&&this.writeText(r),this.closeNode()},closeAll:function(){while(this._stack.length)this.closeNode()},addRollback:function(){this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open})},commit:function(){this._rollbacks.pop()},rollback:function(){var e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open},get xml(){return this.closeAll(),this._xml.join("")}}},{"./under-dash":20,"./utils":21}],23:[function(e,t,r){"use strict";var n=e("events"),a=e("./promish"),i=e("jszip"),s=e("./utils"),o=e("./stream-buf"),l=function(e){var t=this;this.count=0,this.jsZip=new i,this.stream=new o,this.stream.on("finish",(function(){t._process()})),this.getEntryType=e.getEntryType||function(){return"string"}};s.inherits(l,n.EventEmitter,{_finished:function(){var e=this;--this.count||a.Promish.resolve().then((function(){e.emit("finished")}))},_process:function(){var e=this,t=this.stream.read();this.jsZip.loadAsync(t).then((function(t){t.forEach((function(t,r){r.dir||(e.count++,r.async(e.getEntryType(t)).then((function(r){var n=new o;n.path=t,n.write(r),n.autodrain=function(){e._finished()},n.on("finish",(function(){e._finished()})),e.emit("entry",n)})).catch((function(t){e.emit("error",t)})))}))})).catch((function(t){e.emit("error",t)}))},write:function(e,t,r){if(this.error)throw r&&r(error),error;return this.stream.write(e,t,r)},cork:function(){return this.stream.cork()},uncork:function(){return this.stream.uncork()},end:function(){return this.stream.end()},destroy:function(e){this.emit("finished"),this.error=e}});var u=function(){this.zip=new i,this.stream=new o};s.inherits(u,n.EventEmitter,{append:function(e,t){t.hasOwnProperty("base64")&&t.base64?this.zip.file(t.name,e,{base64:!0}):this.zip.file(t.name,e)},finalize:function(){var e=this,t={type:"nodebuffer",compression:"DEFLATE"};return this.zip.generateAsync(t).then((function(t){e.stream.end(t),e.emit("finish")}))},read:function(e){return this.stream.read(e)},setEncoding:function(e){return this.stream.setEncoding(e)},pause:function(){return this.stream.pause()},resume:function(){return this.stream.resume()},isPaused:function(){return this.stream.isPaused()},pipe:function(e,t){return this.stream.pipe(e,t)},unpipe:function(e){return this.stream.unpipe(e)},unshift:function(e){return this.stream.unshift(e)},wrap:function(e){return this.stream.wrap(e)}}),t.exports={ZipReader:l,ZipWriter:u}},{"./promish":16,"./stream-buf":18,"./utils":21,events:123,jszip:151}],24:[function(e,t,r){"use strict";t.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],25:[function(e,t,r){"use strict";t.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"}},{}],26:[function(e,t,r){"use strict";var n=e("sax"),a=e("../../utils/promish"),i=e("../../utils/xml-stream"),s=t.exports=function(){};s.prototype={prepare:function(){},render:function(){},parseOpen:function(){},parseText:function(){},parseClose:function(){},reconcile:function(){},reset:function(){if(this.model=null,this.map)for(var e=Object.keys(this.map),t=0;tthis.maxItems))throw new Error("Max "+this.childXform.tag+" count exceeded");return!0}return!1},reconcile:function(e,t){if(e){var r=this.childXform;e.forEach((function(e){r.reconcile(e,t)}))}}})},{"../../utils/utils":21,"./base-xform":26}],48:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../../../utils/col-cache"),i=e("../base-xform"),s=t.exports=function(){};n.inherits(s,i,{get tag(){return"autoFilter"},render:function(e,t){if(t)if("string"===typeof t)e.leafNode("autoFilter",{ref:t});else{var r=function(e){return"string"===typeof e?e:a.getAddress(e.row,e.column).address},n=r(t.from),i=r(t.to);n&&i&&e.leafNode("autoFilter",{ref:n+":"+i})}},parseOpen:function(e){"autoFilter"===e.name&&(this.model=e.attributes.ref)}})},{"../../../utils/col-cache":15,"../../../utils/utils":21,"../base-xform":26}],49:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("../../../doc/enums"),s=e("../../../doc/range"),o=e("../strings/rich-text-xform");function l(e){if(null===e||void 0===e)return i.ValueType.Null;if(e instanceof String||"string"===typeof e)return i.ValueType.String;if("number"===typeof e)return i.ValueType.Number;if("boolean"===typeof e)return i.ValueType.Boolean;if(e instanceof Date)return i.ValueType.Date;if(e.text&&e.hyperlink)return i.ValueType.Hyperlink;if(e.formula)return i.ValueType.Formula;if(e.error)return i.ValueType.Error;throw new Error("I could not understand type of value")}function u(e){switch(e.type){case i.ValueType.Formula:return l(e.result);default:return e.type}}var c=t.exports=function(){this.richTextXForm=new o};n.inherits(c,a,{get tag(){return"c"},prepare:function(e,t){var r=t.styles.addStyleModel(e.style||{},u(e));switch(r&&(e.styleId=r),e.type){case i.ValueType.String:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.value));break;case i.ValueType.Date:t.date1904&&(e.date1904=!0);break;case i.ValueType.Hyperlink:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.text)),t.hyperlinks.push(Object.assign({address:e.address,target:e.hyperlink},e.tooltip?{tooltip:e.tooltip}:{}));break;case i.ValueType.Merge:t.merges.add(e);break;case i.ValueType.Formula:if(t.date1904&&(e.date1904=!0),e.formula)t.formulae[e.address]=e;else if(e.sharedFormula){var n=t.formulae[e.sharedFormula];if(!n)throw new Error("Shared Formula master must exist above and or left of clone");void 0!==n.si?(e.si=n.si,n.ref.expandToAddress(e.address)):(e.si=n.si=t.siFormulae++,n.ref=new s(n.address,e.address))}break;default:break}},renderFormula:function(e,t){var r=null;switch(t.ref?r={t:"shared",ref:t.ref.range,si:t.si}:void 0!==t.si&&(r={t:"shared",si:t.si}),l(t.result)){case i.ValueType.Null:e.leafNode("f",r,t.formula);break;case i.ValueType.String:e.addAttribute("t","str"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result);break;case i.ValueType.Number:e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result);break;case i.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result?1:0);break;case i.ValueType.Error:e.addAttribute("t","e"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result.error);break;case i.ValueType.Date:e.leafNode("f",r,t.formula),e.leafNode("v",null,n.dateToExcel(t.result,t.date1904));break;default:throw new Error("I could not understand type of value")}},render:function(e,t){if(t.type!==i.ValueType.Null||t.styleId){switch(e.openNode("c"),e.addAttribute("r",t.address),t.styleId&&e.addAttribute("s",t.styleId),t.type){case i.ValueType.Null:break;case i.ValueType.Number:e.leafNode("v",null,t.value);break;case i.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("v",null,t.value?"1":"0");break;case i.ValueType.Error:e.addAttribute("t","e"),e.leafNode("v",null,t.value.error);break;case i.ValueType.String:if(void 0!==t.ssId)e.addAttribute("t","s"),e.leafNode("v",null,t.ssId);else if(t.value&&t.value.richText){e.addAttribute("t","inlineStr"),e.openNode("is");var r=this;t.value.richText.forEach((function(t){r.richTextXForm.render(e,t)})),e.closeNode("is")}else e.addAttribute("t","str"),e.leafNode("v",null,t.value);break;case i.ValueType.Date:e.leafNode("v",null,n.dateToExcel(t.value,t.date1904));break;case i.ValueType.Hyperlink:void 0!==t.ssId?(e.addAttribute("t","s"),e.leafNode("v",null,t.ssId)):(e.addAttribute("t","str"),e.leafNode("v",null,t.text));break;case i.ValueType.Formula:this.renderFormula(e,t);break;case i.ValueType.Merge:break;default:break}e.closeNode()}},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"c":var t=this.model={address:e.attributes.r};return this.t=e.attributes.t,e.attributes.s&&(t.styleId=parseInt(e.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=e.attributes.si,"shared"===e.attributes.t&&(this.model.sharedFormula=!0),this.model.ref=e.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){if(this.parser)this.parser.parseText(e);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+e:e;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+e:e:this.model.value=this.model.value?this.model.value+e:e;break;default:break}},parseClose:function(e){switch(e){case"c":var t=this.model;if(t.formula||t.sharedFormula)t.type=i.ValueType.Formula,t.value&&("str"===this.t?t.result=n.xmlDecode(t.value):"b"===this.t?t.result=0!==parseInt(t.value,10):"e"===this.t?t.result={error:t.value}:t.result=parseFloat(t.value),t.value=void 0);else if(void 0!==t.value)switch(this.t){case"s":t.type=i.ValueType.String,t.value=parseInt(t.value,10);break;case"str":t.type=i.ValueType.String,t.value=n.xmlDecode(t.value);break;case"inlineStr":t.type=i.ValueType.String;break;case"b":t.type=i.ValueType.Boolean,t.value=0!==parseInt(t.value,10);break;case"e":t.type=i.ValueType.Error,t.value={error:t.value};break;default:t.type=i.ValueType.Number,t.value=parseFloat(t.value);break}else t.styleId?t.type=i.ValueType.Null:t.type=i.ValueType.Merge;return!1;case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(e),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(e),!0)}},reconcile:function(e,t){var r=e.styleId&&t.styles.getStyleModel(e.styleId);switch(r&&(e.style=r),void 0!==e.styleId&&(e.styleId=void 0),e.type){case i.ValueType.String:"number"===typeof e.value&&(e.value=t.sharedStrings.getString(e.value)),e.value.richText&&(e.type=i.ValueType.RichText);break;case i.ValueType.Number:r&&n.isDateFmt(r.numFmt)&&(e.type=i.ValueType.Date,e.value=n.excelToDate(e.value,t.date1904));break;case i.ValueType.Formula:void 0!==e.result&&r&&n.isDateFmt(r.numFmt)&&(e.result=n.excelToDate(e.result,t.date1904)),e.sharedFormula&&(e.formula?(t.formulae[e.si]=e,delete e.sharedFormula):e.sharedFormula=t.formulae[e.si].address,delete e.si);break;default:break}var a=t.hyperlinkMap[e.address];a&&(e.type===i.ValueType.Formula?(e.text=e.result,e.result=void 0):(e.text=e.value,e.value=void 0),e.type=i.ValueType.Hyperlink,e.hyperlink=a)}})},{"../../../doc/enums":8,"../../../doc/range":9,"../../../utils/utils":21,"../base-xform":26,"../strings/rich-text-xform":76}],50:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"col"},prepare:function(e,t){var r=t.styles.addStyleModel(e.style||{});r&&(e.styleId=r)},render:function(e,t){e.openNode("col"),e.addAttribute("min",t.min),e.addAttribute("max",t.max),t.width&&e.addAttribute("width",t.width),t.styleId&&e.addAttribute("style",t.styleId),t.hidden&&e.addAttribute("hidden","1"),t.bestFit&&e.addAttribute("bestFit","1"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1"),e.addAttribute("customWidth","1"),e.closeNode()},parseOpen:function(e){if("col"===e.name){var t=this.model={min:parseInt(e.attributes.min||"0",10),max:parseInt(e.attributes.max||"0",10),width:void 0===e.attributes.width?void 0:parseFloat(e.attributes.width||"0")};return e.attributes.style&&(t.styleId=parseInt(e.attributes.style,10)),e.attributes.hidden&&(t.hidden=!0),e.attributes.bestFit&&(t.bestFit=!0),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),e.attributes.collapsed&&(t.collapsed=!0),!0}return!1},parseText:function(){},parseClose:function(){return!1},reconcile:function(e,t){e.styleId&&(e.style=t.styles.getStyleModel(e.styleId))}})},{"../../../utils/utils":21,"../base-xform":26}],51:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../base-xform");function s(e,t,r,n){var a=t[r];void 0!==a?e[r]=a:void 0!==n&&(e[r]=n)}function o(e){switch(e){case"1":case"true":return!0;default:return!1}}function l(e,t,r,n){var a=t[r];void 0!==a?e[r]=o(a):void 0!==n&&(e[r]=n)}var u=t.exports=function(){};a.inherits(u,i,{get tag(){return"dataValidations"},render:function(e,t){var r=t&&Object.keys(t).length;r&&(e.openNode("dataValidations",{count:r}),n.each(t,(function(t,r){e.openNode("dataValidation"),"any"!==t.type&&(e.addAttribute("type",t.type),t.operator&&"list"!==t.type&&"between"!==t.operator&&e.addAttribute("operator",t.operator),t.allowBlank&&e.addAttribute("allowBlank","1")),t.showInputMessage&&e.addAttribute("showInputMessage","1"),t.promptTitle&&e.addAttribute("promptTitle",t.promptTitle),t.prompt&&e.addAttribute("prompt",t.prompt),t.showErrorMessage&&e.addAttribute("showErrorMessage","1"),t.errorStyle&&e.addAttribute("errorStyle",t.errorStyle),t.errorTitle&&e.addAttribute("errorTitle",t.errorTitle),t.error&&e.addAttribute("error",t.error),e.addAttribute("sqref",r),(t.formulae||[]).forEach((function(r,n){e.openNode("formula"+(n+1)),"date"===t.type?e.writeText(a.dateToExcel(r)):e.writeText(r),e.closeNode()})),e.closeNode()})),e.closeNode())},parseOpen:function(e){switch(e.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=e.attributes.sqref;var t=this._definedName=e.attributes.type?{type:e.attributes.type,formulae:[]}:{type:"any"};switch(e.attributes.type&&l(t,e.attributes,"allowBlank"),l(t,e.attributes,"showInputMessage"),l(t,e.attributes,"showErrorMessage"),t.type){case"any":case"list":case"custom":break;default:s(t,e.attributes,"operator","between");break}return s(t,e.attributes,"promptTitle"),s(t,e.attributes,"prompt"),s(t,e.attributes,"errorStyle"),s(t,e.attributes,"errorTitle"),s(t,e.attributes,"error"),!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}},parseText:function(e){this._formula.push(e)},parseClose:function(e){switch(e){case"dataValidations":return!1;case"dataValidation":return this._definedName.formulae&&this._definedName.formulae.length||(delete this._definedName.formulae,delete this._definedName.operator),this.model[this._address]=this._definedName,!0;case"formula1":case"formula2":var t=this._formula.join("");switch(this._definedName.type){case"whole":case"textLength":t=parseInt(t,10);break;case"decimal":t=parseFloat(t);break;case"date":t=a.excelToDate(parseFloat(t));break;default:break}return this._definedName.formulae.push(t),!0;default:return!0}}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26}],52:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"dimension"},render:function(e,t){t&&e.leafNode("dimension",{ref:t})},parseOpen:function(e){return"dimension"===e.name&&(this.model=e.attributes.ref,!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],53:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"drawing"},render:function(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})},parseOpen:function(e){switch(e.name){case this.tag:return this.model={rId:e.attributes["r:id"]},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],54:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"hyperlink"},render:function(e,t){e.leafNode("hyperlink",Object.assign({ref:t.address,"r:id":t.rId},t.tooltip?{tooltip:t.tooltip}:{}))},parseOpen:function(e){return"hyperlink"===e.name&&(this.model=Object.assign({address:e.attributes.ref,rId:e.attributes["r:id"]},e.attributes.tooltip?{tooltip:e.attributes.tooltip}:{}),!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],55:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"mergeCell"},render:function(e,t){e.leafNode("mergeCell",{ref:t})},parseOpen:function(e){return"mergeCell"===e.name&&(this.model=e.attributes.ref,!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],56:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../doc/range"),i=e("../../../utils/col-cache"),s=e("../../../doc/enums"),o=t.exports=function(){this.merges={}};o.prototype={add:function(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{var t=e.master+":"+e.address;this.merges[e.master]=new a(t)}},get mergeCells(){return n.map(this.merges,(function(e){return e.range}))},reconcile:function(e,t){n.each(e,(function(e){for(var r=i.decode(e),n=r.top;n<=r.bottom;n++)for(var a=t[n-1],o=r.left;o<=r.right;o++){var l=a.cells[o-1];l?l.type===s.ValueType.Merge&&(l.master=r.tl):a.cells[o]={type:s.ValueType.Null,address:i.encodeAddress(n,o)}}}))},getMasterAddress:function(e){var t=this.hash[e];return t&&t.tl}}},{"../../../doc/enums":8,"../../../doc/range":9,"../../../utils/col-cache":15,"../../../utils/under-dash":20}],57:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){},s=function(e){return"undefined"!==typeof e};n.inherits(i,a,{get tag(){return"outlinePr"},render:function(e,t){return!(!t||!s(t.summaryBelow)&&!s(t.summaryRight))&&(e.leafNode(this.tag,{summaryBelow:s(t.summaryBelow)?Number(t.summaryBelow):void 0,summaryRight:s(t.summaryRight)?Number(t.summaryRight):void 0}),!0)},parseOpen:function(e){return e.name===this.tag&&(this.model={summaryBelow:s(e.attributes.summaryBelow)?Boolean(Number(e.attributes.summaryBelow)):void 0,summaryRight:s(e.attributes.summaryRight)?Boolean(Number(e.attributes.summaryRight)):void 0},!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],58:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"brk"},render:function(e,t){e.leafNode("brk",t)},parseOpen:function(e){return"brk"===e.name&&(this.model=e.attributes.ref,!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],59:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../base-xform"),s=t.exports=function(){};a.inherits(s,i,{get tag(){return"pageMargins"},render:function(e,t){if(t){var r={left:t.left,right:t.right,top:t.top,bottom:t.bottom,header:t.header,footer:t.footer};n.some(r,(function(e){return void 0!==e}))&&e.leafNode(this.tag,r)}},parseOpen:function(e){switch(e.name){case this.tag:return this.model={left:parseFloat(e.attributes.left||.7),right:parseFloat(e.attributes.right||.7),top:parseFloat(e.attributes.top||.75),bottom:parseFloat(e.attributes.bottom||.75),header:parseFloat(e.attributes.header||.3),footer:parseFloat(e.attributes.footer||.3)},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26}],60:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"pageSetUpPr"},render:function(e,t){return!(!t||!t.fitToPage)&&(e.leafNode(this.tag,{fitToPage:t.fitToPage?"1":void 0}),!0)},parseOpen:function(e){return e.name===this.tag&&(this.model={fitToPage:"1"===e.attributes.fitToPage},!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],61:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../base-xform");function s(e){return e?"1":void 0}function o(e){switch(e){case"overThenDown":return e;default:return}}function l(e){switch(e){case"atEnd":case"asDisplyed":return e;default:return}}function u(e){switch(e){case"dash":case"blank":case"NA":return e;default:return}}function c(e){return void 0!==e?parseInt(e,10):void 0}var h=t.exports=function(){};a.inherits(h,i,{get tag(){return"pageSetup"},render:function(e,t){if(t){var r={paperSize:t.paperSize,orientation:t.orientation,horizontalDpi:t.horizontalDpi,verticalDpi:t.verticalDpi,pageOrder:o(t.pageOrder),blackAndWhite:s(t.blackAndWhite),draft:s(t.draft),cellComments:l(t.cellComments),errors:u(t.errors),scale:t.scale,fitToWidth:t.fitToWidth,fitToHeight:t.fitToHeight,firstPageNumber:t.firstPageNumber,useFirstPageNumber:s(t.firstPageNumber),usePrinterDefaults:s(t.usePrinterDefaults),copies:t.copies};n.some(r,(function(e){return void 0!==e}))&&e.leafNode(this.tag,r)}},parseOpen:function(e){switch(e.name){case this.tag:return this.model={paperSize:c(e.attributes.paperSize),orientation:e.attributes.orientation||"portrait",horizontalDpi:parseInt(e.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(e.attributes.verticalDpi||"4294967295",10),pageOrder:e.attributes.pageOrder||"downThenOver",blackAndWhite:"1"===e.attributes.blackAndWhite,draft:"1"===e.attributes.draft,cellComments:e.attributes.cellComments||"None",errors:e.attributes.errors||"displayed",scale:parseInt(e.attributes.scale||"100",10),fitToWidth:parseInt(e.attributes.fitToWidth||"1",10),fitToHeight:parseInt(e.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(e.attributes.firstPageNumber||"1",10),useFirstPageNumber:"1"===e.attributes.useFirstPageNumber,usePrinterDefaults:"1"===e.attributes.usePrinterDefaults,copies:parseInt(e.attributes.copies||"1",10)},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26}],62:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"picture"},render:function(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})},parseOpen:function(e){switch(e.name){case this.tag:return this.model={rId:e.attributes["r:id"]},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],63:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../base-xform");function s(e){return e?"1":void 0}var o=t.exports=function(){};a.inherits(o,i,{get tag(){return"printOptions"},render:function(e,t){if(t){var r={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)};n.some(r,(function(e){return void 0!==e}))&&e.leafNode(this.tag,r)}},parseOpen:function(e){switch(e.name){case this.tag:return this.model={showRowColHeaders:"1"===e.attributes.headings,showGridLines:"1"===e.attributes.gridLines,horizontalCentered:"1"===e.attributes.horizontalCentered,verticalCentered:"1"===e.attributes.verticalCentered},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26}],64:[function(e,t,r){"use strict";var n=e("./page-breaks-xform"),a=e("../../../utils/utils"),i=e("../list-xform"),s=t.exports=function(){var e={tag:"rowBreaks",count:!0,childXform:new n};i.call(this,e)};a.inherits(s,i,{render:function(e,t){if(t&&t.length){e.openNode(this.tag,this.$),this.count&&(e.addAttribute(this.$count,t.length),e.addAttribute("manualBreakCount",t.length));var r=this.childXform;t.forEach((function(t){r.render(e,t)})),e.closeNode()}else this.empty&&e.leafNode(this.tag)}})},{"../../../utils/utils":21,"../list-xform":47,"./page-breaks-xform":58}],65:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("./cell-xform"),s=t.exports=function(){this.map={c:new i}};n.inherits(s,a,{get tag(){return"row"},prepare:function(e,t){var r=t.styles.addStyleModel(e.style);r&&(e.styleId=r);var n=this.map.c;e.cells.forEach((function(e){n.prepare(e,t)}))},render:function(e,t,r){e.openNode("row"),e.addAttribute("r",t.number),t.height&&(e.addAttribute("ht",t.height),e.addAttribute("customHeight","1")),t.hidden&&e.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&e.addAttribute("spans",t.min+":"+t.max),t.styleId&&(e.addAttribute("s",t.styleId),e.addAttribute("customFormat","1")),e.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1");var n=this.map.c;t.cells.forEach((function(t){n.render(e,t,r)})),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;if("row"===e.name){this.numRowsSeen+=1;var t=e.attributes.spans?e.attributes.spans.split(":").map((function(e){return parseInt(e,10)})):[void 0,void 0],r=this.model={number:parseInt(e.attributes.r,10),min:t[0],max:t[1],cells:[]};return e.attributes.s&&(r.styleId=parseInt(e.attributes.s,10)),e.attributes.hidden&&(r.hidden=!0),e.attributes.bestFit&&(r.bestFit=!0),e.attributes.ht&&(r.height=parseFloat(e.attributes.ht)),e.attributes.outlineLevel&&(r.outlineLevel=parseInt(e.attributes.outlineLevel,10)),e.attributes.collapsed&&(r.collapsed=!0),!0}return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.cells.push(this.parser.model),this.parser=void 0),!0)},reconcile:function(e,t){e.style=e.styleId?t.styles.getStyleModel(e.styleId):{},void 0!==e.styleId&&(e.styleId=void 0);var r=this.map.c;e.cells.forEach((function(e){r.reconcile(e,t)}))}})},{"../../../utils/utils":21,"../base-xform":26,"./cell-xform":49}],66:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../base-xform"),s=t.exports=function(){};a.inherits(s,i,{get tag(){return"sheetFormatPr"},render:function(e,t){if(t){var r={defaultRowHeight:t.defaultRowHeight,outlineLevelRow:t.outlineLevelRow,outlineLevelCol:t.outlineLevelCol,"x14ac:dyDescent":t.dyDescent};n.some(r,(function(e){return void 0!==e}))&&e.leafNode("sheetFormatPr",r)}},parseOpen:function(e){return"sheetFormatPr"===e.name&&(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(e.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(e.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol||"0",10)},!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26}],67:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("../style/color-xform"),s=e("./page-setup-properties-xform"),o=e("./outline-properties-xform"),l=t.exports=function(){this.map={tabColor:new i("tabColor"),pageSetUpPr:new s,outlinePr:new o}};n.inherits(l,a,{get tag(){return"sheetPr"},render:function(e,t){if(t){e.addRollback(),e.openNode("sheetPr");var r=!1;r=this.map.tabColor.render(e,t.tabColor)||r,r=this.map.pageSetUpPr.render(e,t.pageSetup)||r,r=this.map.outlinePr.render(e,t.outlineProperties)||r,r?(e.closeNode(),e.commit()):e.rollback()}},parseOpen:function(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):!!this.map[e.name]&&(this.parser=this.map[e.name],this.parser.parseOpen(e),!0)},parseText:function(e){return!!this.parser&&(this.parser.parseText(e),!0)},parseClose:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}})},{"../../../utils/utils":21,"../base-xform":26,"../style/color-xform":82,"./outline-properties-xform":57,"./page-setup-properties-xform":60}],68:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../../../utils/col-cache"),i=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"},o=t.exports=function(){};n.inherits(o,i,{get tag(){return"sheetView"},prepare:function(e){switch(e.state){case"frozen":case"split":break;default:e.state="normal";break}},render:function(e,t){e.openNode("sheetView",{workbookViewId:t.workbookViewId||0});var r,n,i,s,o=function(t,r,n){n&&e.addAttribute(t,r)};switch(o("rightToLeft","1",!0===t.rightToLeft),o("tabSelected","1",t.tabSelected),o("showRuler","0",!1===t.showRuler),o("showRowColHeaders","0",!1===t.showRowColHeaders),o("showGridLines","0",!1===t.showGridLines),o("zoomScale",t.zoomScale,t.zoomScale),o("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),o("view",t.style,t.style),t.state){case"frozen":n=t.xSplit||0,i=t.ySplit||0,r=t.topLeftCell||a.getAddress(i+1,n+1).address,s=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:r,activePane:s,state:"frozen"}),e.leafNode("selection",{pane:s,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":"topLeft"===t.activePane&&(t.activePane=void 0),e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),e.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&e.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell});break;default:break}e.closeNode()},parseOpen:function(e){switch(e.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(e.attributes.workbookViewId,10),rightToLeft:"1"===e.attributes.rightToLeft,tabSelected:"1"===e.attributes.tabSelected,showRuler:!("0"===e.attributes.showRuler),showRowColHeaders:!("0"===e.attributes.showRowColHeaders),showGridLines:!("0"===e.attributes.showGridLines),zoomScale:parseInt(e.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(e.attributes.zoomScaleNormal||"100",10),style:e.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(e.attributes.xSplit||"0",10),ySplit:parseInt(e.attributes.ySplit||"0",10),topLeftCell:e.attributes.topLeftCell,activePane:e.attributes.activePane||"topLeft",state:e.attributes.state},!0;case"selection":var t=e.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:e.attributes.activeCell},!0;default:return!1}},parseText:function(){},parseClose:function(e){var t,r;switch(e){case"sheetView":return this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},"split"===this.model.state&&(t.activePane=this.pane.activePane),r=this.selections[this.pane.activePane],r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},r=this.selections.topLeft,r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1;default:return!0}},reconcile:function(){}})},{"../../../utils/col-cache":15,"../../../utils/utils":21,"../base-xform":26}],69:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../../../utils/xml-stream"),s=e("../../rel-type"),o=e("./merges"),l=e("../base-xform"),u=e("../list-xform"),c=e("./row-xform"),h=e("./col-xform"),d=e("./dimension-xform"),f=e("./hyperlink-xform"),p=e("./merge-cell-xform"),m=e("./data-validations-xform"),g=e("./sheet-properties-xform"),_=e("./sheet-format-properties-xform"),y=e("./sheet-view-xform"),v=e("./page-margins-xform"),b=e("./page-setup-xform"),w=e("./print-options-xform"),x=e("./auto-filter-xform"),k=e("./picture-xform"),T=e("./drawing-xform"),S=e("./row-breaks-xform"),E=t.exports=function(e){var t=e&&e.maxRows;this.map={sheetPr:new g,dimension:new d,sheetViews:new u({tag:"sheetViews",count:!1,childXform:new y}),sheetFormatPr:new _,cols:new u({tag:"cols",count:!1,childXform:new h}),sheetData:new u({tag:"sheetData",count:!1,empty:!0,childXform:new c,maxItems:t}),autoFilter:new x,mergeCells:new u({tag:"mergeCells",count:!0,childXform:new p}),rowBreaks:new S,hyperlinks:new u({tag:"hyperlinks",count:!1,childXform:new f}),pageMargins:new v,dataValidations:new m,pageSetup:new b,printOptions:new w,picture:new k,drawing:new T}};a.inherits(E,l,{WORKSHEET_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"}},{prepare:function(e,t){t.merges=new o,e.hyperlinks=t.hyperlinks=[],t.formulae={},t.siFormulae=0,this.map.cols.prepare(e.cols,t),this.map.sheetData.prepare(e.rows,t),e.mergeCells=t.merges.mergeCells;var r,n=e.rels=[];function a(e){return"rId"+(e.length+1)}e.hyperlinks.forEach((function(e){r=a(n),e.rId=r,n.push({Id:r,Type:s.Hyperlink,Target:e.target,TargetMode:"External"})}));var i,l=[];e.media.forEach((function(o){if("background"===o.type)r=a(n),i=t.media[o.imageId],n.push({Id:r,Type:s.Image,Target:"../media/"+i.name+"."+i.extension}),e.background={rId:r},e.image=t.media[o.imageId];else if("image"===o.type){var u=e.drawing;i=t.media[o.imageId],u||(u=e.drawing={rId:a(n),name:"drawing"+ ++t.drawingsCount,anchors:[],rels:[]},t.drawings.push(u),n.push({Id:u.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/"+u.name+".xml"}));var c=l[o.imageId];c||(c=a(u.rels),l[o.imageId]=c,u.rels.push({Id:c,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/"+i.name+"."+i.extension})),u.anchors.push({picture:{rId:c},range:o.range})}}))},render:function(e,t){e.openXml(i.StdDocAttributes),e.openNode("worksheet",E.WORKSHEET_ATTRIBUTES);var r=t.properties?{defaultRowHeight:t.properties.defaultRowHeight,dyDescent:t.properties.dyDescent,outlineLevelCol:t.properties.outlineLevelCol,outlineLevelRow:t.properties.outlineLevelRow}:void 0,n={outlineProperties:t.properties&&t.properties.outlineProperties,tabColor:t.properties&&t.properties.tabColor,pageSetup:t.pageSetup&&t.pageSetup.fitToPage?{fitToPage:t.pageSetup.fitToPage}:void 0},a=t.pageSetup&&t.pageSetup.margins,s={showRowColHeaders:t.showRowColHeaders,showGridLines:t.showGridLines,horizontalCentered:t.horizontalCentered,verticalCentered:t.verticalCentered};this.map.sheetPr.render(e,n),this.map.dimension.render(e,t.dimensions),this.map.sheetViews.render(e,t.views),this.map.sheetFormatPr.render(e,r),this.map.cols.render(e,t.cols),this.map.sheetData.render(e,t.rows),this.map.autoFilter.render(e,t.autoFilter),this.map.mergeCells.render(e,t.mergeCells),this.map.dataValidations.render(e,t.dataValidations),this.map.hyperlinks.render(e,t.hyperlinks),this.map.pageMargins.render(e,a),this.map.printOptions.render(e,s),this.map.pageSetup.render(e,t.pageSetup),this.map.rowBreaks.render(e,t.rowBreaks),this.map.drawing.render(e,t.drawing),this.map.picture.render(e,t.background),e.closeNode()},parseOpen:function(e){return this.parser?(this.parser.parseOpen(e),!0):"worksheet"===e.name?(n.each(this.map,(function(e){e.reset()})),!0):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0)},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case"worksheet":var t=this.map.sheetFormatPr.model;this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(t.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(t.outlineProperties=this.map.sheetPr.model.outlinePropertiesx);var r={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},n=Object.assign(r,this.map.pageSetup.model,this.map.printOptions.model);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:t,views:this.map.sheetViews.model,pageSetup:n,background:this.map.picture.model,drawing:this.map.drawing.model},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),!1;default:return!0}},reconcile:function(e,t){var r=(e.relationships||[]).reduce((function(e,t){return e[t.Id]=t,e}),{});if(t.hyperlinkMap=(e.hyperlinks||[]).reduce((function(e,t){return t.rId&&(e[t.address]=r[t.rId].Target),e}),{}),t.formulae={},e.rows=e.rows&&e.rows.filter(Boolean)||[],e.rows.forEach((function(e){e.cells=e.cells&&e.cells.filter(Boolean)||[]})),this.map.cols.reconcile(e.cols,t),this.map.sheetData.reconcile(e.rows,t),e.media=[],e.drawing){var n=r[e.drawing.rId],a=n.Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(a){var i=a[1],s=t.drawings[i];s.anchors.forEach((function(t){if(t.medium){var r={type:"image",imageId:t.medium.index,range:t.range};e.media.push(r)}}))}}var o=e.background&&r[e.background.rId];if(o){var l=o.Target.split("/media/")[1],u=t.mediaIndex&&t.mediaIndex[l];void 0!==u&&e.media.push({type:"background",imageId:u})}delete e.relationships,delete e.hyperlinks}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../../../utils/xml-stream":22,"../../rel-type":25,"../base-xform":26,"../list-xform":47,"./auto-filter-xform":48,"./col-xform":50,"./data-validations-xform":51,"./dimension-xform":52,"./drawing-xform":53,"./hyperlink-xform":54,"./merge-cell-xform":55,"./merges":56,"./page-margins-xform":59,"./page-setup-xform":61,"./picture-xform":62,"./print-options-xform":63,"./row-breaks-xform":64,"./row-xform":65,"./sheet-format-properties-xform":66,"./sheet-properties-xform":67,"./sheet-view-xform":68}],70:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.tag=e.tag,this.attr=e.attr};n.inherits(i,a,{render:function(e,t){t&&(e.openNode(this.tag),e.closeNode())},parseOpen:function(e){e.name===this.tag&&(this.model=!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],71:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this._format=e.format||function(e){try{return isNaN(e.getTime())?"":e.toISOString()}catch(t){return""}},this._parse=e.parse||function(e){return new Date(e)}};n.inherits(i,a,{render:function(e,t){t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(t)):e.writeText(this._format(t)),e.closeNode())},parseOpen:function(e){e.name===this.tag&&(this.attr?this.model=this._parse(e.attributes[this.attr]):this.text=[])},parseText:function(e){this.attr||this.text.push(e)},parseClose:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}})},{"../../../utils/utils":21,"../base-xform":26}],72:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this.zero=e.zero};n.inherits(i,a,{render:function(e,t){(t||this.zero)&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())},parseOpen:function(e){return e.name===this.tag&&(this.attr?this.model=parseInt(e.attributes[this.attr],10):this.text=[],!0)},parseText:function(e){this.attr||this.text.push(e)},parseClose:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}})},{"../../../utils/utils":21,"../base-xform":26}],73:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs};n.inherits(i,a,{render:function(e,t){void 0!==t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())},parseOpen:function(e){e.name===this.tag&&(this.attr?this.model=e.attributes[this.attr]:this.text=[])},parseText:function(e){this.attr||this.text.push(e)},parseClose:function(){return this.attr||(this.model=this.text.join("")),!1}})},{"../../../utils/utils":21,"../base-xform":26}],74:[function(e,t,r){"use strict";var n=e("../../utils/utils"),a=e("./base-xform"),i=e("../../utils/xml-stream");function s(e,t){e.openNode(t.tag,t.$),t.c&&t.c.forEach((function(t){s(e,t)})),t.t&&e.writeText(t.t),e.closeNode()}var o=t.exports=function(e){this._model=e};n.inherits(o,a,{render:function(e){if(!this._xml){var t=new i;s(t,this._model),this._xml=t.xml}e.writeXml(this._xml)},parseOpen:function(){return!0},parseText:function(){},parseClose:function(e){switch(e){case this._model.tag:return!1;default:return!0}}})},{"../../utils/utils":21,"../../utils/xml-stream":22,"./base-xform":26}],75:[function(e,t,r){"use strict";var n=e("./text-xform"),a=e("./rich-text-xform"),i=e("../../../utils/utils"),s=e("../base-xform"),o=t.exports=function(){this.map={r:new a,t:new n}};i.inherits(o,s,{get tag(){return"rPh"},render:function(e,t){if(e.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){var r=this.map.r;t.richText.forEach((function(t){r.render(e,t)}))}else t&&this.map.t.render(e,t.text);e.closeNode()},parseOpen:function(e){var t=e.name;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":var t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break;case"t":this.model.text=this.parser.model;break;default:break}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}})},{"../../../utils/utils":21,"../base-xform":26,"./rich-text-xform":76,"./text-xform":79}],76:[function(e,t,r){"use strict";var n=e("./text-xform"),a=e("../style/font-xform"),i=e("../../../utils/utils"),s=e("../base-xform"),o=t.exports=function(e){this.model=e};o.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},i.inherits(o,s,{get tag(){return"r"},get textXform(){return this._textXform||(this._textXform=new n)},get fontXform(){return this._fontXform||(this._fontXform=new a(o.FONT_OPTIONS))},render:function(e,t){t=t||this.model,e.openNode("r"),t.font&&this.fontXform.render(e,t.font),this.textXform.render(e,t.text),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){switch(e){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":21,"../base-xform":26,"../style/font-xform":84,"./text-xform":79}],77:[function(e,t,r){"use strict";var n=e("./text-xform"),a=e("./rich-text-xform"),i=e("./phonetic-text-xform"),s=e("../../../utils/utils"),o=e("../base-xform"),l=t.exports=function(e){this.model=e,this.map={r:new a,t:new n,rPh:new i}};s.inherits(l,o,{get tag(){return"si"},render:function(e,t){if(e.openNode(this.tag),t&&t.hasOwnProperty("richText")&&t.richText){var r=this.map.r;t.richText.forEach((function(t){r.render(e,t)}))}else void 0!==t&&null!==t&&this.map.t.render(e,t);e.closeNode()},parseOpen:function(e){var t=e.name;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":var t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break;case"t":this.model=this.parser.model;break;default:break}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}})},{"../../../utils/utils":21,"../base-xform":26,"./phonetic-text-xform":75,"./rich-text-xform":76,"./text-xform":79}],78:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./shared-string-xform"),o=t.exports=function(e){this.model=e||{values:[],count:0},this.hash={},this.rich={}};n.inherits(o,i,{get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)},get values(){return this.model.values},get uniqueCount(){return this.model.values.length},get count(){return this.model.count},getString:function(e){return this.model.values[e]},add:function(e){return e.richText?this.addRichText(e):this.addText(e)},addText:function(e){var t=this.hash[e];return void 0===t&&(t=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,t},addRichText:function(e){var t=this.sharedStringXform.toXml(e),r=this.rich[t];return void 0===r&&(r=this.rich[t]=this.model.values.length,this.model.values.push(e)),this.model.count++,r},render:function(e,t){t=t||this._values,e.openXml(a.StdDocAttributes),e.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});var r=this.sharedStringXform;t.values.forEach((function(t){r.render(e,t)})),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(e),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser)return this.parser.parseClose(e)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(e){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+e)}}})},{"../../../utils/utils":21,"../../../utils/xml-stream":22,"../base-xform":26,"./shared-string-xform":77}],79:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(){};n.inherits(i,a,{get tag(){return"t"},render:function(e,t){e.openNode("t")," "!==t[0]&&" "!==t[t.length-1]||e.addAttribute("xml:space","preserve"),e.writeText(t),e.closeNode()},get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))},parseOpen:function(e){switch(e.name){case"t":return this._text=[],!0;default:return!1}},parseText:function(e){this._text.push(e)},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],80:[function(e,t,r){"use strict";var n=e("../../../doc/enums"),a=e("../../../utils/utils"),i=e("../base-xform"),s={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((function(e,t){return e[t]=!0,e}),{}),horizontal:function(e){return this.horizontalValues[e]?e:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((function(e,t){return e[t]=!0,e}),{}),vertical:function(e){return"middle"===e?"center":this.verticalValues[e]?e:void 0},wrapText:function(e){return!!e||void 0},shrinkToFit:function(e){return!!e||void 0},textRotation:function(e){switch(e){case"vertical":return e;default:return e=a.validInt(e),e>=-90&&e<=90?e:void 0}},indent:function(e){return e=a.validInt(e),Math.max(0,e)},readingOrder:function(e){switch(e){case"ltr":return n.ReadingOrder.LeftToRight;case"rtl":return n.ReadingOrder.RightToLeft;default:return}}},o={toXml:function(e){if(e=s.textRotation(e),e){if("vertical"===e)return 255;var t=Math.round(e);if(t>=0&&t<=90)return t;if(t<0&&t>=-90)return 90-t}},toModel:function(e){var t=a.validInt(e);if(void 0!==t){if(255===t)return"vertical";if(t>=0&&t<=90)return t;if(t>90&&t<=180)return 90-t}}},l=t.exports=function(){};a.inherits(l,i,{get tag(){return"alignment"},render:function(e,t){e.addRollback(),e.openNode("alignment");var r=!1;function n(t,n){n&&(e.addAttribute(t,n),r=!0)}n("horizontal",s.horizontal(t.horizontal)),n("vertical",s.vertical(t.vertical)),n("wrapText",!!s.wrapText(t.wrapText)&&"1"),n("shrinkToFit",!!s.shrinkToFit(t.shrinkToFit)&&"1"),n("indent",s.indent(t.indent)),n("textRotation",o.toXml(t.textRotation)),n("readingOrder",s.readingOrder(t.readingOrder)),e.closeNode(),r?e.commit():e.rollback()},parseOpen:function(e){var t={},r=!1;function n(e,n,a){e&&(t[n]=a,r=!0)}n(e.attributes.horizontal,"horizontal",e.attributes.horizontal),n(e.attributes.vertical,"vertical","center"===e.attributes.vertical?"middle":e.attributes.vertical),n(e.attributes.wrapText,"wrapText",!!e.attributes.wrapText),n(e.attributes.shrinkToFit,"shrinkToFit",!!e.attributes.shrinkToFit),n(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),n(e.attributes.textRotation,"textRotation",o.toModel(e.attributes.textRotation)),n(e.attributes.readingOrder,"readingOrder","2"===e.attributes.readingOrder?"rtl":"ltr"),this.model=r?t:null},parseText:function(){},parseClose:function(){return!1}})},{"../../../doc/enums":8,"../../../utils/utils":21,"../base-xform":26}],81:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("./color-xform"),s=function(e){this.name=e,this.map={color:new i}};n.inherits(s,a,{get tag(){return this.name},render:function(e,t,r){var n=t&&t.color||r||this.defaultColor;e.openNode(this.name),t&&t.style&&(e.addAttribute("style",t.style),n&&this.map.color.render(e,n)),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:var t=e.attributes.style;return this.model=t?{style:t}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)},validStyleValues:["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((function(e,t){return e[t]=!0,e}),{}),validStyle:function(e){return this.validStyleValues[e]}});var o=t.exports=function(){this.map={top:new s("top"),left:new s("left"),bottom:new s("bottom"),right:new s("right"),diagonal:new s("diagonal")}};n.inherits(o,a,{render:function(e,t){var r=t.color;function n(n,a){n&&!n.color&&t.color&&(n=Object.assign({},n,{color:t.color})),a.render(e,n,r)}e.openNode("border"),t.diagonal&&t.diagonal.style&&(t.diagonal.up&&e.addAttribute("diagonalUp","1"),t.diagonal.down&&e.addAttribute("diagonalDown","1")),n(t.left,this.map.left),n(t.right,this.map.right),n(t.top,this.map.top),n(t.bottom,this.map.bottom),n(t.diagonal,this.map.diagonal),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"border":return this.reset(),this.diagonalUp=!!e.attributes.diagonalUp,this.diagonalDown=!!e.attributes.diagonalDown,!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if("border"===e){var t=this.model={},r=function(e,r,n){r&&(n&&Object.assign(r,n),t[e]=r)};r("left",this.map.left.model),r("right",this.map.right.model),r("top",this.map.top.model),r("bottom",this.map.bottom.model),r("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}})},{"../../../utils/utils":21,"../base-xform":26,"./color-xform":82}],82:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.name=e||"color"};n.inherits(i,a,{get tag(){return this.name},render:function(e,t){return!!t&&(e.openNode(this.name),t.argb?e.addAttribute("rgb",t.argb):void 0!==t.theme?(e.addAttribute("theme",t.theme),void 0!==t.tint&&e.addAttribute("tint",t.tint)):void 0!==t.indexed?e.addAttribute("indexed",t.indexed):e.addAttribute("auto","1"),e.closeNode(),!0)},parseOpen:function(e){return e.name===this.name&&(e.attributes.rgb?this.model={argb:e.attributes.rgb}:e.attributes.theme?(this.model={theme:parseInt(e.attributes.theme,10)},e.attributes.tint&&(this.model.tint=parseFloat(e.attributes.tint))):e.attributes.indexed?this.model={indexed:parseInt(e.attributes.indexed,10)}:this.model=void 0,!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],83:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("./color-xform"),s=function(){this.map={color:new i}};n.inherits(s,a,{get tag(){return"stop"},render:function(e,t){e.openNode("stop"),e.addAttribute("position",t.position),this.map.color.render(e,t.color),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"stop":return this.model={position:parseFloat(e.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(){},parseClose:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.color=this.parser.model,this.parser=void 0),!0)}});var o=function(){this.map={fgColor:new i("fgColor"),bgColor:new i("bgColor")}};n.inherits(o,a,{get name(){return"pattern"},get tag(){return"patternFill"},render:function(e,t){e.openNode("patternFill"),e.addAttribute("patternType",t.pattern),t.fgColor&&this.map.fgColor.render(e,t.fgColor),t.bgColor&&this.map.bgColor.render(e,t.bgColor),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"patternFill":return this.model={type:"pattern",pattern:e.attributes.patternType},!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.parser.model&&(this.model[e]=this.parser.model),this.parser=void 0),!0)}});var l=function(){this.map={stop:new s}};n.inherits(l,a,{get name(){return"gradient"},get tag(){return"gradientFill"},render:function(e,t){switch(e.openNode("gradientFill"),t.gradient){case"angle":e.addAttribute("degree",t.degree);break;case"path":e.addAttribute("type","path"),t.center.left&&(e.addAttribute("left",t.center.left),void 0===t.center.right&&e.addAttribute("right",t.center.left)),t.center.right&&e.addAttribute("right",t.center.right),t.center.top&&(e.addAttribute("top",t.center.top),void 0===t.center.bottom&&e.addAttribute("bottom",t.center.top)),t.center.bottom&&e.addAttribute("bottom",t.center.bottom);break;default:break}var r=this.map.stop;t.stops.forEach((function(t){r.render(e,t)})),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"gradientFill":var t=this.model={stops:[]};return e.attributes.degree?(t.gradient="angle",t.degree=parseInt(e.attributes.degree,10)):"path"===e.attributes.type&&(t.gradient="path",t.center={left:e.attributes.left?parseFloat(e.attributes.left):0,top:e.attributes.top?parseFloat(e.attributes.top):0},e.attributes.right!==e.attributes.left&&(t.center.right=e.attributes.right?parseFloat(e.attributes.right):0),e.attributes.bottom!==e.attributes.top&&(t.center.bottom=e.attributes.bottom?parseFloat(e.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}});var u=t.exports=function(){this.map={patternFill:new o,gradientFill:new l}};n.inherits(u,a,{StopXform:s,PatternFillXform:o,GradientFillXform:l},{get tag(){return"fill"},render:function(e,t){switch(e.addRollback(),e.openNode("fill"),t.type){case"pattern":this.map.patternFill.render(e,t);break;case"gradient":this.map.gradientFill.render(e,t);break;default:return void e.rollback()}e.closeNode(),e.commit()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"fill":return this.model={},!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)},validPatternValues:["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((function(e,t){return e[t]=!0,e}),{}),validStyle:function(e){return this.validStyleValues[e]}})},{"../../../utils/utils":21,"../base-xform":26,"./color-xform":82}],84:[function(e,t,r){"use strict";var n=e("./color-xform"),a=e("../simple/boolean-xform"),i=e("../simple/integer-xform"),s=e("../simple/string-xform"),o=e("./underline-xform"),l=e("../../../utils/under-dash"),u=e("../../../utils/utils"),c=e("../base-xform"),h=t.exports=function(e){this.options=e||h.OPTIONS,this.map={b:{prop:"bold",xform:new a({tag:"b",attr:"val"})},i:{prop:"italic",xform:new a({tag:"i",attr:"val"})},u:{prop:"underline",xform:new o},charset:{prop:"charset",xform:new i({tag:"charset",attr:"val"})},color:{prop:"color",xform:new n},condense:{prop:"condense",xform:new a({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new a({tag:"extend",attr:"val"})},family:{prop:"family",xform:new i({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new a({tag:"outline",attr:"val"})},scheme:{prop:"scheme",xform:new s({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new a({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new a({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new i({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new s({tag:this.options.fontNameTag,attr:"val"})}};h.OPTIONS={tagName:"font",fontNameTag:"name"},u.inherits(h,c,{get tag(){return this.options.tagName},render:function(e,t){var r=this.map;e.openNode(this.options.tagName),l.each(this.map,(function(n,a){r[a].xform.render(e,t[n.prop])})),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;if(this.map[e.name])return this.parser=this.map[e.name].xform,this.parser.parseOpen(e);switch(e.name){case this.options.tagName:return this.model={},!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser&&!this.parser.parseClose(e)){var t=this.map[e];return this.parser.model&&(this.model[t.prop]=this.parser.model),this.parser=void 0,!0}switch(e){case this.options.tagName:return!1;default:return!0}}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../base-xform":26,"../simple/boolean-xform":70,"../simple/integer-xform":72,"../simple/string-xform":73,"./color-xform":82,"./underline-xform":88}],85:[function(e,t,r){"use strict";var n=e("../../../utils/under-dash"),a=e("../../../utils/utils"),i=e("../../defaultnumformats"),s=e("../base-xform");function o(){var e={};return n.each(i,(function(t,r){t.f&&(e[t.f]=parseInt(r,10))})),e}var l=o(),u=t.exports=function(e,t){this.id=e,this.formatCode=t};a.inherits(u,s,{get tag(){return"numFmt"},getDefaultFmtId:function(e){return l[e]},getDefaultFmtCode:function(e){return i[e]&&i[e].f}},{render:function(e,t){e.leafNode("numFmt",{numFmtId:t.id,formatCode:t.formatCode})},parseOpen:function(e){switch(e.name){case"numFmt":return this.model={id:parseInt(e.attributes.numFmtId,10),formatCode:e.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/under-dash":20,"../../../utils/utils":21,"../../defaultnumformats":24,"../base-xform":26}],86:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=e("./alignment-xform"),s=t.exports=function(e){this.xfId=!(!e||!e.xfId),this.map={alignment:new i}};n.inherits(s,a,{get tag(){return"xf"},render:function(e,t){e.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&e.addAttribute("xfId",t.xfId||0),t.numFmtId&&e.addAttribute("applyNumberFormat","1"),t.fontId&&e.addAttribute("applyFont","1"),t.fillId&&e.addAttribute("applyFill","1"),t.borderId&&e.addAttribute("applyBorder","1"),t.alignment&&(e.addAttribute("applyAlignment","1"),this.map.alignment.render(e,t.alignment)),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"xf":return this.model={numFmtId:parseInt(e.attributes.numFmtId,10),fontId:parseInt(e.attributes.fontId,10),fillId:parseInt(e.attributes.fillId,10),borderId:parseInt(e.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(e.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){return this.parser?(this.parser.parseClose(e)||(this.model.alignment=this.parser.model,this.parser=void 0),!0):"xf"!==e}})},{"../../../utils/utils":21,"../base-xform":26,"./alignment-xform":80}],87:[function(e,t,r){"use strict";var n=e("../../../utils/promish"),a=e("../../../utils/utils"),i=e("../../../doc/enums"),s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("../static-xform"),u=e("../list-xform"),c=e("./font-xform"),h=e("./fill-xform"),d=e("./border-xform"),f=e("./numfmt-xform"),p=e("./style-xform"),m=164,g=t.exports=function(e){this.map={numFmts:new u({tag:"numFmts",count:!0,childXform:new f}),fonts:new u({tag:"fonts",count:!0,childXform:new c,$:{"x14ac:knownFonts":1}}),fills:new u({tag:"fills",count:!0,childXform:new h}),borders:new u({tag:"borders",count:!0,childXform:new d}),cellStyleXfs:new u({tag:"cellStyleXfs",count:!0,childXform:new p}),cellXfs:new u({tag:"cellXfs",count:!0,childXform:new p({xfId:!0})}),numFmt:new f,font:new c,fill:new h,border:new d,style:new p({xfId:!0}),cellStyles:g.STATIC_XFORMS.cellStyles,dxfs:g.STATIC_XFORMS.dxfs,tableStyles:g.STATIC_XFORMS.tableStyles,extLst:g.STATIC_XFORMS.extLst},e&&this.init()};a.inherits(g,o,{STYLESHEET_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},STATIC_XFORMS:{cellStyles:new l({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new l({tag:"dxfs",$:{count:0}}),tableStyles:new l({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new l({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})}},{initIndex:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}},init:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[]},this.initIndex(),this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"})},render:function(e,t){t=t||this.model,e.openXml(s.StdDocAttributes),e.openNode("styleSheet",g.STYLESHEET_ATTRIBUTES),this.index?(t.numFmts&&t.numFmts.length&&(e.openNode("numFmts",{count:t.numFmts.length}),t.numFmts.forEach((function(t){e.writeXml(t)})),e.closeNode()),e.openNode("fonts",{count:t.fonts.length}),t.fonts.forEach((function(t){e.writeXml(t)})),e.closeNode(),e.openNode("fills",{count:t.fills.length}),t.fills.forEach((function(t){e.writeXml(t)})),e.closeNode(),e.openNode("borders",{count:t.borders.length}),t.borders.forEach((function(t){e.writeXml(t)})),e.closeNode(),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),e.openNode("cellXfs",{count:t.styles.length}),t.styles.forEach((function(t){e.writeXml(t)})),e.closeNode()):(this.map.numFmts.render(e,t.numFmts),this.map.fonts.render(e,t.fonts),this.map.fills.render(e,t.fills),this.map.borders.render(e,t.borders),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(e,t.styles)),g.STATIC_XFORMS.cellStyles.render(e),g.STATIC_XFORMS.dxfs.render(e),g.STATIC_XFORMS.tableStyles.render(e),g.STATIC_XFORMS.extLst.render(e),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case"styleSheet":var t=this.model={},r=function(e,r){r.model&&r.model.length&&(t[e]=r.model)};if(r("numFmts",this.map.numFmts),r("fonts",this.map.fonts),r("fills",this.map.fills),r("borders",this.map.borders),r("styles",this.map.cellXfs),this.index={model:[],numFmt:[]},t.numFmts){var n=this.index.numFmt;t.numFmts.forEach((function(e){n[e.id]=e.formatCode}))}return!1;default:return!0}},addStyleModel:function(e,t){if(!e)return 0;if(this.weakMap&&this.weakMap.has(e))return this.weakMap.get(e);var r={};if(t=t||i.ValueType.Number,e.numFmt)r.numFmtId=this._addNumFmtStr(e.numFmt);else switch(t){case i.ValueType.Number:r.numFmtId=this._addNumFmtStr("General");break;case i.ValueType.Date:r.numFmtId=this._addNumFmtStr("mm-dd-yy");break;default:break}e.font&&(r.fontId=this._addFont(e.font)),e.border&&(r.borderId=this._addBorder(e.border)),e.fill&&(r.fillId=this._addFill(e.fill)),e.alignment&&(r.alignment=e.alignment);var n=this._addStyle(r);return this.weakMap&&this.weakMap.set(e,n),n},getStyleModel:function(e){var t=this.model.styles[e];if(!t)return null;var r=this.index.model[e];if(r)return r;if(r=this.index.model[e]={},t.numFmtId){var n=this.index.numFmt[t.numFmtId]||f.getDefaultFmtCode(t.numFmtId);n&&(r.numFmt=n)}function a(e,t,n){if(n){var a=t[n];a&&(r[e]=a)}}return a("font",this.model.fonts,t.fontId),a("border",this.model.borders,t.borderId),a("fill",this.model.fills,t.fillId),t.alignment&&(r.alignment=t.alignment),r},_addStyle:function(e){var t=this.map.style.toXml(e),r=this.index.style[t];return void 0===r&&(r=this.index.style[t]=this.model.styles.length,this.model.styles.push(t)),r},_addNumFmtStr:function(e){var t=f.getDefaultFmtId(e);if(void 0!==t)return t;if(t=this.index.numFmt[e],void 0!==t)return t;t=this.index.numFmt[e]=m+this.model.numFmts.length;var r=this.map.numFmt.toXml({id:t,formatCode:e});return this.model.numFmts.push(r),t},_addFont:function(e){var t=this.map.font.toXml(e),r=this.index.font[t];return void 0===r&&(r=this.index.font[t]=this.model.fonts.length,this.model.fonts.push(t)),r},_addBorder:function(e){var t=this.map.border.toXml(e),r=this.index.border[t];return void 0===r&&(r=this.index.border[t]=this.model.borders.length,this.model.borders.push(t)),r},_addFill:function(e){var t=this.map.fill.toXml(e),r=this.index.fill[t];return void 0===r&&(r=this.index.fill[t]=this.model.fills.length,this.model.fills.push(t)),r}}),g.Mock=function(){g.call(this),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}},a.inherits(g.Mock,g,{parseStream:function(e){return e.autodrain(),n.Promish.resolve()},addStyleModel:function(e,t){switch(t){case i.ValueType.Date:return this.dateStyleId;default:return 0}},get dateStyleId(){if(!this._dateStyleId){var e={numFmtId:f.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(e)}return this._dateStyleId},getStyleModel:function(){return{}}})},{"../../../doc/enums":8,"../../../utils/promish":16,"../../../utils/utils":21,"../../../utils/xml-stream":22,"../base-xform":26,"../list-xform":47,"../static-xform":74,"./border-xform":81,"./fill-xform":83,"./font-xform":84,"./numfmt-xform":85,"./style-xform":86}],88:[function(e,t,r){"use strict";var n=e("../../../utils/utils"),a=e("../base-xform"),i=t.exports=function(e){this.model=e};i.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},n.inherits(i,a,{get tag(){return"u"},render:function(e,t){if(t=t||this.model,!0===t)e.leafNode("u");else{var r=i.Attributes[t];r&&e.leafNode("u",r)}},parseOpen:function(e){"u"===e.name&&(this.model=e.attributes.val||!0)},parseText:function(){},parseClose:function(){return!1}})},{"../../../utils/utils":21,"../base-xform":26}],89:[function(e,t,r){(function(r){"use strict";var n=e("fs"),a=e("../utils/zip-stream"),i=e("../utils/stream-buf"),s=e("../utils/promish"),o=e("../utils/utils"),l=e("../utils/xml-stream"),u=e("./xform/style/styles-xform"),c=e("./xform/core/core-xform"),h=e("./xform/strings/shared-strings-xform"),d=e("./xform/core/relationships-xform"),f=e("./xform/core/content-types-xform"),p=e("./xform/core/app-xform"),m=e("./xform/book/workbook-xform"),g=e("./xform/sheet/worksheet-xform"),_=e("./xform/drawing/drawing-xform"),y=e("./xml/theme1.js"),v=t.exports=function(e){this.workbook=e};function b(e,t){return new s.Promish((function(r,a){n.readFile(e,t,(function(e,t){e?a(e):r(t)}))}))}v.RelType=e("./rel-type"),v.prototype={readFile:function(e,t){var r,a=this;return o.fs.exists(e).then((function(i){if(!i)throw new Error("File not found: "+e);return r=n.createReadStream(e),a.read(r,t).catch((function(e){throw r.close(),e}))})).then((function(e){return r.close(),e}))},parseRels:function(e){var t=new d;return t.parseStream(e)},parseWorkbook:function(e){var t=new m;return t.parseStream(e)},parseSharedStrings:function(e){var t=new h;return t.parseStream(e)},reconcile:function(e,t){var r=new m,n=new g(t),a=new _;r.reconcile(e);var i={media:e.media,mediaIndex:e.mediaIndex};Object.keys(e.drawings).forEach((function(t){var r=e.drawings[t],n=e.drawingRels[t];n&&(i.rels=n.reduce((function(e,t){return e[t.Id]=t,e}),{}),a.reconcile(r,i))}));var s={styles:e.styles,sharedStrings:e.sharedStrings,media:e.media,mediaIndex:e.mediaIndex,date1904:e.properties&&e.properties.date1904,drawings:e.drawings};e.worksheets.forEach((function(t){t.relationships=e.worksheetRels[t.sheetNo],n.reconcile(t,s)})),delete e.worksheetHash,delete e.worksheetRels,delete e.globalRels,delete e.sharedStrings,delete e.workbookRels,delete e.sheetDefs,delete e.styles,delete e.mediaIndex,delete e.drawings,delete e.drawingRels},processWorksheetEntry:function(e,t,r){var n=e.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(n){var a=n[1],i=new g(r);return i.parseStream(e).then((function(r){r.sheetNo=a,t.worksheetHash[e.path]=r,t.worksheets.push(r)}))}},processWorksheetRelsEntry:function(e,t){var r=e.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/);if(r){var n=r[1],a=new d;return a.parseStream(e).then((function(e){t.worksheetRels[n]=e}))}},processMediaEntry:function(e,t){var r=e.path.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/);if(r){var n=r[1],a=n.lastIndexOf(".");if(-1===a)return;var o=n.substr(a+1),l=n.substr(0,a);return new s.Promish((function(r,a){var s=new i;s.on("finish",(function(){t.mediaIndex[n]=t.media.length,t.mediaIndex[l]=t.media.length;var e={type:"image",name:l,extension:o,buffer:s.toBuffer()};t.media.push(e),r()})),e.on("error",(function(e){a(e)})),e.pipe(s)}))}},processDrawingEntry:function(e,t){var r=e.path.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/);if(r){var n=r[1],a=new _;return a.parseStream(e).then((function(e){t.drawings[n]=e}))}},processDrawingRelsEntry:function(e,t){var r=e.path.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/);if(r){var n=r[1],a=new d;return a.parseStream(e).then((function(e){t.drawingRels[n]=e}))}},processThemeEntry:function(e,t){var r=e.path.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/);if(r)return new s.Promish((function(n,a){var s=r[1],o=new i;e.on("error",a),o.on("error",a),o.on("finish",(function(){t.themes[s]=o.read().toString(),n()})),e.pipe(o)}))},processIgnoreEntry:function(e){e.autodrain()},createInputStream:function(e){var t=this,r={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{}},n=[],i=new a.ZipReader({getEntryType:function(e){return e.match(/xl\/media\//)?"nodebuffer":"string"}});return i.on("entry",(function(a){var s=null,o=a.path;switch("/"===o[0]&&(o=o.substr(1)),o){case"_rels/.rels":s=t.parseRels(a).then((function(e){r.globalRels=e}));break;case"xl/workbook.xml":s=t.parseWorkbook(a).then((function(e){r.sheets=e.sheets,r.definedNames=e.definedNames,r.views=e.views,r.properties=e.properties}));break;case"xl/_rels/workbook.xml.rels":s=t.parseRels(a).then((function(e){r.workbookRels=e}));break;case"xl/sharedStrings.xml":r.sharedStrings=new h,s=r.sharedStrings.parseStream(a);break;case"xl/styles.xml":r.styles=new u,s=r.styles.parseStream(a);break;case"docProps/app.xml":var l=new p;s=l.parseStream(a).then((function(e){Object.assign(r,{company:e.company,manager:e.manager})}));break;case"docProps/core.xml":var d=new c;s=d.parseStream(a).then((function(e){Object.assign(r,e)}));break;default:s=t.processWorksheetEntry(a,r,e)||t.processWorksheetRelsEntry(a,r)||t.processThemeEntry(a,r)||t.processMediaEntry(a,r)||t.processDrawingEntry(a,r)||t.processDrawingRelsEntry(a,r)||t.processIgnoreEntry(a);break}s&&(s=s.catch((function(e){throw i.destroy(e),e})),n.push(s),s=null)})),i.on("finished",(function(){s.Promish.all(n).then((function(){t.reconcile(r,e),t.workbook.model=r})).then((function(){i.emit("done")})).catch((function(e){i.emit("error",e)}))})),i},read:function(e,t){t=t||{};var r=this,n=this.createInputStream(t);return new s.Promish((function(t,a){n.on("done",(function(){t(r.workbook)})).on("error",(function(e){a(e)})),e.pipe(n)}))},load:function(e,t){var n=this;void 0===t&&(t={});var a=this.createInputStream();return new s.Promish((function(i,s){if(a.on("done",(function(){i(n.workbook)})).on("error",(function(e){s(e)})),t.base64){var o=new r(e.toString(),"base64");a.write(o)}else a.write(e);a.end()}))},addMedia:function(e,t){return s.Promish.all(t.media.map((function(t){if("image"===t.type){var r="xl/media/"+t.name+"."+t.extension;if(t.filename)return b(t.filename).then((function(t){e.append(t,{name:r})}));if(t.buffer)return new s.Promish((function(n){e.append(t.buffer,{name:r}),n()}));if(t.base64)return new s.Promish((function(n){var a=t.base64,i=a.substring(a.indexOf(",")+1);e.append(i,{name:r,base64:!0}),n()}))}return s.Promish.reject(new Error("Unsupported media"))})))},addDrawings:function(e,t){var r=new _,n=new d,a=[];return t.worksheets.forEach((function(t){var i=t.drawing;i&&a.push(new s.Promish((function(t){r.prepare(i,{});var a=r.toXml(i);e.append(a,{name:"xl/drawings/"+i.name+".xml"}),a=n.toXml(i.rels),e.append(a,{name:"xl/drawings/_rels/"+i.name+".xml.rels"}),t()})))})),s.Promish.all(a)},addContentTypes:function(e,t){return new s.Promish((function(r){var n=new f,a=n.toXml(t);e.append(a,{name:"[Content_Types].xml"}),r()}))},addApp:function(e,t){return new s.Promish((function(r){var n=new p,a=n.toXml(t);e.append(a,{name:"docProps/app.xml"}),r()}))},addCore:function(e,t){return new s.Promish((function(r){var n=new c;e.append(n.toXml(t),{name:"docProps/core.xml"}),r()}))},addThemes:function(e,t){return new s.Promish((function(r){var n=t.themes||{theme1:y};Object.keys(n).forEach((function(t){var r=n[t],a="xl/theme/"+t+".xml";e.append(r,{name:a})})),r()}))},addOfficeRels:function(e){return new s.Promish((function(t){var r=new d,n=r.toXml([{Id:"rId1",Type:v.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:v.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:v.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);e.append(n,{name:"_rels/.rels"}),t()}))},addWorkbookRels:function(e,t){var r=1,n=[{Id:"rId"+r++,Type:v.RelType.Styles,Target:"styles.xml"},{Id:"rId"+r++,Type:v.RelType.Theme,Target:"theme/theme1.xml"}];return t.sharedStrings.count&&n.push({Id:"rId"+r++,Type:v.RelType.SharedStrings,Target:"sharedStrings.xml"}),t.worksheets.forEach((function(e){e.rId="rId"+r++,n.push({Id:e.rId,Type:v.RelType.Worksheet,Target:"worksheets/sheet"+e.id+".xml"})})),new s.Promish((function(t){var r=new d,a=r.toXml(n);e.append(a,{name:"xl/_rels/workbook.xml.rels"}),t()}))},addSharedStrings:function(e,t){return t.sharedStrings&&t.sharedStrings.count?new s.Promish((function(r){e.append(t.sharedStrings.xml,{name:"xl/sharedStrings.xml"}),r()})):s.Promish.resolve()},addStyles:function(e,t){return new s.Promish((function(r){var n=t.styles.xml;n&&e.append(n,{name:"xl/styles.xml"}),r()}))},addWorkbook:function(e,t){return new s.Promish((function(r){var n=new m;e.append(n.toXml(t),{name:"xl/workbook.xml"}),r()}))},addWorksheets:function(e,t){return new s.Promish((function(r){var n=new g,a=new d;t.worksheets.forEach((function(t){var r=new l;n.render(r,t),e.append(r.xml,{name:"xl/worksheets/sheet"+t.id+".xml"}),t.rels&&t.rels.length&&(r=new l,a.render(r,t.rels),e.append(r.xml,{name:"xl/worksheets/_rels/sheet"+t.id+".xml.rels"}))})),r()}))},_finalize:function(e){var t=this;return new s.Promish((function(r,n){e.on("finish",(function(){r(t)})),e.on("error",n),e.finalize()}))},prepareModel:function(e,t){e.creator=e.creator||"ExcelJS",e.lastModifiedBy=e.lastModifiedBy||"ExcelJS",e.created=e.created||new Date,e.modified=e.modified||new Date,e.useSharedStrings=void 0===t.useSharedStrings||t.useSharedStrings,e.useStyles=void 0===t.useStyles||t.useStyles,e.sharedStrings=new h,e.styles=e.useStyles?new u(!0):new u.Mock;var r=new m,n=new g;r.prepare(e);var a={sharedStrings:e.sharedStrings,styles:e.styles,date1904:e.properties.date1904,drawingsCount:0,media:e.media};a.drawings=e.drawings=[],e.worksheets.forEach((function(e){n.prepare(e,a)}))},write:function(e,t){var r=this;t=t||{};var n=this.workbook.model,i=new a.ZipWriter;return i.pipe(e),this.prepareModel(n,t),s.Promish.resolve().then((function(){return r.addContentTypes(i,n)})).then((function(){return r.addOfficeRels(i,n)})).then((function(){return r.addWorkbookRels(i,n)})).then((function(){return r.addWorksheets(i,n)})).then((function(){return r.addSharedStrings(i,n)})).then((function(){return r.addDrawings(i,n)})).then((function(){var e=[r.addThemes(i,n),r.addStyles(i,n)];return s.Promish.all(e)})).then((function(){return r.addMedia(i,n)})).then((function(){var e=[r.addApp(i,n),r.addCore(i,n)];return s.Promish.all(e)})).then((function(){return r.addWorkbook(i,n)})).then((function(){return r._finalize(i)}))},writeFile:function(e,t){var r=this,a=n.createWriteStream(e);return new s.Promish((function(e,n){a.on("finish",(function(){e()})),a.on("error",(function(e){n(e)})),r.write(a,t).then((function(){a.end()})).catch((function(e){n(e)}))}))},writeBuffer:function(e){var t=this,r=new i;return t.write(r,e).then((function(){return r.read()}))}}}).call(this,e("buffer").Buffer)},{"../utils/promish":16,"../utils/stream-buf":18,"../utils/utils":21,"../utils/xml-stream":22,"../utils/zip-stream":23,"./rel-type":25,"./xform/book/workbook-xform":31,"./xform/core/app-xform":34,"./xform/core/content-types-xform":35,"./xform/core/core-xform":36,"./xform/core/relationships-xform":38,"./xform/drawing/drawing-xform":42,"./xform/sheet/worksheet-xform":69,"./xform/strings/shared-strings-xform":78,"./xform/style/styles-xform":87,"./xml/theme1.js":90,buffer:96,fs:95}],90:[function(e,t,r){"use strict";t.exports='\n '},{}],91:[function(t,r,n){(function(){"use strict";function a(e,t){Array.prototype.slice;var r=t.isArguments;function n(e,t){var r=-1,n=0,a=e.length,i=[];t=t||0,r+=t;while(++ra?1:r>>0;if(0===i)return-1;var u=i;arguments.length>2&&(u=Number(arguments[2]),u!==u?u=0:0!==u&&u!==1/0&&u!==-1/0&&(u=(u>0||-1)*s(o(u))));for(var c=u>=0?l(u,i-1):i-o(u);c>=0;c--)if(c in n&&n[c]===t)return c;return-1}function T(e,t,r){if(e&&p&&p===e.filter)return e.filter(t,r);if(!a(e)||"function"!==typeof t)throw new TypeError;for(var n=Object(e),i=n.length>>>0,s=[],o=0;o>>0,s=0;s>>0,s=0;s>>0,s=[],o=0;o2;if(e&&d&&d===e.reduce)return n?e.reduce(t,r):e.reduce(t);if(!a(e)||"function"!==typeof t)throw new TypeError;var i=0,s=e.length>>0;if(arguments.length<3){if(0===s)throw new TypeError("Array length is 0 and no second argument");r=e[0],i=1}else r=arguments[2];while(i2;if(e&&f&&f===e.reduceRight)return n?e.reduceRight(t,r):e.reduceRight(t);if(!a(e)||"function"!==typeof t)throw new TypeError;var i=Object(e),s=i.length>>>0;if(0===s&&2===arguments.length)throw new TypeError;var o=s-1;if(arguments.length>=3)r=arguments[2];else do{if(o in e){r=e[o--];break}}while(1);while(o>=0)o in i&&(r=t.call(void 0,r,i[o],o,i)),o--;return r}function N(e){var r=[];if(null!==e){var n=_(arguments);if(1===n.length)if(a(e))r=e;else if(t.isHash(e))for(var i in e)e.hasOwnProperty(i)&&r.push([i,e[i]]);else r.push(e);else S(n,(function(e){r=r.concat(N(e))}))}return r}function R(e){return e=e||[],e.length?A(e,(function(e,t){return e+t})):0}function I(e){if(e=e||[],e.length){var r=R(e);if(t.isNumber(r))return r/e.length;throw new Error("Cannot average an array of non numbers.")}return 0}function M(e,t){return w(e,t)}function P(e,t){return w(e,t)[0]}function F(e,t){return w(e,t)[e.length-1]}function L(e){var t=e,r=q(_(arguments,1));return a(e)&&(t=T(e,(function(e){return-1===x(r,e)}))),t}function B(e){var t,r=[],n=-1,a=0;if(e){t=e.length;while(++n0?(r.push(r.shift()),t--):(r.unshift(r.pop()),t++),j(r,t)):r}function z(e,t){var r=[];if(a(e)){var n=e.slice(0);"number"!==typeof t&&(t=e.length),t?t<=e.length&&(r=A(e,(function(e,r,a){var i;return i=t>1?v(r,j(n,a).slice(1),t):[[r]],e.concat(i)}),[])):r=[[]]}return r}function H(){var e=[],r=_(arguments);if(r.length>1){var n=r.shift();a(n)&&(e=A(n,(function(e,n,i){for(var s=[n],o=0;o1){for(var r=0,n=t.length;r1?_(arguments):arguments[0],a(e)){r=e[0],n=0,t=e.length;while(++n1?r:N(e),A(t,(function(e,t){return e.concat(t)}),[])}function K(e,t){t=t.split(".");var r=e.slice(0);return S(t,(function(e){var t=e.match(/(\w+)\(\)$/);r=O(r,(function(r){return t?r[t[1]]():r[e]}))})),r}function Q(e,t,r){return r=_(arguments,2),O(e,(function(e){var a=n(t)?e[t]:t;return a.apply(e,r)}))}var ee={toArray:N,sum:R,avg:I,sort:M,min:P,max:F,difference:L,removeDuplicates:B,unique:U,rotate:j,permutations:z,zip:H,transpose:W,valuesAt:V,union:Y,intersect:G,powerSet:Z,cartesian:X,compact:$,multiply:J,flatten:q,pluck:K,invoke:Q,forEach:S,map:O,filter:T,reduce:A,reduceRight:D,some:C,every:E,indexOf:x,lastIndexOf:k};return e.define(a,ee).expose(ee)}"undefined"!==typeof n?"undefined"!==typeof r&&r.exports&&(r.exports=a(t("extended"),t("is-extended"),t("arguments-extended"))):"function"===typeof e&&e.amd?e(["extended","is-extended","arguments-extended"],(function(e,t,r){return a(e,t,r)})):this.arrayExtended=a(this.extended,this.isExtended,this.argumentsExtended)}).call(this)},{"arguments-extended":91,extended:124,"is-extended":140}],93:[function(e,t,r){"use strict";r.byteLength=c,r.toByteArray=d,r.fromByteArray=m;for(var n=[],a=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function c(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function h(e,t,r){return 3*(t+r)/4-r}function d(e){for(var t,r=u(e),n=r[0],s=r[1],o=new i(h(e,n,s)),l=0,c=s>0?n-4:n,d=0;d>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===s&&(t=a[e.charCodeAt(d)]<<2|a[e.charCodeAt(d+1)]>>4,o[l++]=255&t),1===s&&(t=a[e.charCodeAt(d)]<<10|a[e.charCodeAt(d+1)]<<4|a[e.charCodeAt(d+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function f(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function p(e,t,r){for(var n,a=[],i=t;il?l:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],94:[function(e,t,r){},{}],95:[function(e,t,r){arguments[4][94][0].apply(r,arguments)},{dup:94}],96:[function(e,t,r){(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var n=e("base64-js"),a=e("ieee754");r.Buffer=t,r.SlowBuffer=_,r.INSPECT_MAX_BYTES=50;var i=2147483647;function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,r,n){if("string"===typeof e)return d(e,r);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return p(e,r,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return t.from(a,r,n);var i=m(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e,t,r){return u(e),e<=0?o(e):void 0!==t?"string"===typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}function h(e){return u(e),o(e<0?0:0|g(e))}function d(e,r){if("string"===typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|y(e,r),a=o(n),i=a.write(e,r);return i!==n&&(a=a.slice(0,i)),a}function f(e){for(var t=e.length<0?0:0|g(e.length),r=o(t),n=0;n=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function _(e){return+e!=e&&(e=0),t.alloc(+e)}function y(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(i)return a?-1:Y(e).length;r=(""+r).toLowerCase(),i=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return D(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,r,n,a,i){if(0===e.length)return-1;if("string"===typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,q(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof r&&(r=t.from(r,a)),t.isBuffer(r))return 0===r.length?-1:x(e,r,n,a,i);if("number"===typeof r)return r&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):x(e,[r],n,a,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,a){var i,s=1,o=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){var c=-1;for(i=r;io&&(r=o-l),i=r;i>=0;i--){for(var h=!0,d=0;da&&(n=a)):n=a;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s239?4:u>223?3:u>191?2:1;if(a+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:i=e[a+1],128===(192&i)&&(l=(31&u)<<6|63&i,l>127&&(c=l));break;case 3:i=e[a+1],s=e[a+2],128===(192&i)&&128===(192&s)&&(l=(15&u)<<12|(63&i)<<6|63&s,l>2047&&(l<55296||l>57343)&&(c=l));break;case 4:i=e[a+1],s=e[a+2],o=e[a+3],128===(192&i)&&128===(192&s)&&128===(192&o)&&(l=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&o,l>65535&&l<1114112&&(c=l))}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),a+=h}return R(n)}r.kMaxLength=i,t.TYPED_ARRAY_SUPPORT=s(),t.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),"undefined"!==typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(e,t,r){return l(e,t,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(e,t,r){return c(e,t,r)},t.allocUnsafe=function(e){return h(e)},t.allocUnsafeSlow=function(e){return h(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(J(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),J(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,a=r.length,i=0,s=Math.min(n,a);it&&(e+=" ... "),""},t.prototype.compare=function(e,r,n,a,i){if(J(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||n>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===e)return 0;for(var s=i-a,o=n-r,l=Math.min(s,o),u=this.slice(a,i),c=e.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return k(this,e,t,r);case"utf8":case"utf-8":return T(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function R(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);var r="",n=0;while(nn)&&(r=n);for(var a="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function B(e,r,n,a,i,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||re.length)throw new RangeError("Index out of range")}function U(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,t,r,4,34028234663852886e22,-34028234663852886e22),a.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,t,r,8,17976931348623157e292,-17976931348623157e292),a.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r>>=0,t>>>=0,r||L(e,t,this.length);var n=this[e],a=1,i=0;while(++i>>=0,t>>>=0,r||L(e,t,this.length);var n=this[e+--t],a=1;while(t>0&&(a*=256))n+=this[e+--t]*a;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);var n=this[e],a=1,i=0;while(++i=a&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||L(e,t,this.length);var n=t,a=1,i=this[e+--n];while(n>0&&(a*=256))i+=this[e+--n]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},t.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),a.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),a.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),a.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),a.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;B(this,e,t,r,a,0)}var i=1,s=0;this[t]=255&e;while(++s>>=0,r>>>=0,!n){var a=Math.pow(2,8*r)-1;B(this,e,t,r,a,0)}var i=r-1,s=1;this[t+i]=255&e;while(--i>=0&&(s*=256))this[t+i]=e/s&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);B(this,e,t,r,a-1,-a)}var i=0,s=1,o=0;this[t]=255&e;while(++i>0)-o&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);B(this,e,t,r,a-1,-a)}var i=r-1,s=1,o=0;this[t+i]=255&e;while(--i>=0&&(s*=256))e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,a){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),r>=e.length&&(r=e.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-r=0;--s)e[s+r]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,a),r);return i},t.prototype.fill=function(e,r,n,a){if("string"===typeof e){if("string"===typeof r?(a=r,r=0,n=this.length):"string"===typeof n&&(a=n,n=this.length),void 0!==a&&"string"!==typeof a)throw new TypeError("encoding must be a string");if("string"===typeof a&&!t.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===e.length){var i=e.charCodeAt(0);("utf8"===a&&i<128||"latin1"===a)&&(e=i)}}else"number"===typeof e&&(e&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(s=r;s55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){for(var t=[],r=0;r>8,a=r%256,i.push(a),i.push(n)}return i}function X(e){return n.toByteArray(W(e))}function $(e,t,r,n){for(var a=0;a=t.length||a>=e.length)break;t[a+r]=e[a]}return a}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!==e}}).call(this,e("buffer").Buffer)},{"base64-js":93,buffer:96,ieee754:136}],97:[function(e,t,r){e("../modules/web.immediate"),t.exports=e("../modules/_core").setImmediate},{"../modules/_core":101,"../modules/web.immediate":117}],98:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],99:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":112}],100:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],101:[function(e,t,r){var n=t.exports={version:"2.3.0"};"number"==typeof __e&&(__e=n)},{}],102:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,a){return e.call(t,r,n,a)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":98}],103:[function(e,t,r){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":106}],104:[function(e,t,r){var n=e("./_is-object"),a=e("./_global").document,i=n(a)&&n(a.createElement);t.exports=function(e){return i?a.createElement(e):{}}},{"./_global":107,"./_is-object":112}],105:[function(e,t,r){var n=e("./_global"),a=e("./_core"),i=e("./_ctx"),s=e("./_hide"),o="prototype",l=function(e,t,r){var u,c,h,d=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,_=e&l.W,y=f?a:a[t]||(a[t]={}),v=y[o],b=f?n:p?n[t]:(n[t]||{})[o];for(u in f&&(r=t),r)c=!d&&b&&void 0!==b[u],c&&u in y||(h=c?b[u]:r[u],y[u]=f&&"function"!=typeof b[u]?r[u]:g&&c?i(h,n):_&&b[u]==h?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[o]=e[o],t}(h):m&&"function"==typeof h?i(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[u]=h,e&l.R&&v&&!v[u]&&s(v,u,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},{"./_core":101,"./_ctx":102,"./_global":107,"./_hide":108}],106:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],107:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],108:[function(e,t,r){var n=e("./_object-dp"),a=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":103,"./_object-dp":113,"./_property-desc":114}],109:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":107}],110:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")((function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":103,"./_dom-create":104,"./_fails":106}],111:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],112:[function(e,t,r){t.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},{}],113:[function(e,t,r){var n=e("./_an-object"),a=e("./_ie8-dom-define"),i=e("./_to-primitive"),s=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),a)try{return s(e,t,r)}catch(o){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":99,"./_descriptors":103,"./_ie8-dom-define":110,"./_to-primitive":116}],114:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],115:[function(e,t,r){var n,a,i,s=e("./_ctx"),o=e("./_invoke"),l=e("./_html"),u=e("./_dom-create"),c=e("./_global"),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,m=0,g={},_="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},v=function(e){y.call(e.data)};d&&f||(d=function(e){var t=[],r=1;while(arguments.length>r)t.push(arguments[r++]);return g[++m]=function(){o("function"==typeof e?e:Function(e),t)},n(m),m},f=function(e){delete g[e]},"process"==e("./_cof")(h)?n=function(e){h.nextTick(s(y,e,1))}:p?(a=new p,i=a.port2,a.port1.onmessage=v,n=s(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",v,!1)):n=_ in u("script")?function(e){l.appendChild(u("script"))[_]=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),t.exports={set:d,clear:f}},{"./_cof":100,"./_ctx":102,"./_dom-create":104,"./_global":107,"./_html":109,"./_invoke":111}],116:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,a;if(t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!n(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!n(a=r.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":112}],117:[function(e,t,r){var n=e("./_export"),a=e("./_task");n(n.G+n.B,{setImmediate:a.set,clearImmediate:a.clear})},{"./_export":105,"./_task":115}],118:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function n(e){return"boolean"===typeof e}function a(e){return null===e}function i(e){return null==e}function s(e){return"number"===typeof e}function o(e){return"string"===typeof e}function l(e){return"symbol"===typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===g(e)}function h(e){return"object"===typeof e&&null!==e}function d(e){return"[object Date]"===g(e)}function f(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"===typeof e}function m(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function g(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=a,r.isNullOrUndefined=i,r.isNumber=s,r.isString=o,r.isSymbol=l,r.isUndefined=u,r.isRegExp=c,r.isObject=h,r.isDate=d,r.isError=f,r.isFunction=p,r.isPrimitive=m,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":139}],119:[function(t,r,n){(function(){"use strict";function a(e,t,r){function n(e,t,r,n){e=""+e,r=r||" ";var a=e.length;while(ar)if(n){var s=e.length;i=e.substring(s-r,s)}else i=e.substring(0,r)}else i=a(""+i,r);return i}function i(e,r,n){if(!t.isArray(e)||"function"!==typeof r)throw new TypeError;for(var a=Object(e),i=a.length>>>0,s=0;s0?5:-5,n=t>0?(t-5)/5:(t+5)/5),6===i&&t>0?s=1:0===i&&t<0&&(s=-1);var o=i+r;return 0!==o&&6!==o||(s=t>0?2:-2),[7*n+r+s,"Date",!1]},year:function(e,t){return[t,"FullYear",!0]},week:function(e,t){return[7*t,"Date",!1]},quarter:function(e,t){return[3*t,"Month",!0]},month:function(e,t){return[t,"Month",!0]}};function n(e,t,n){return e=e.replace(/s$/,""),r.hasOwnProperty(e)?r[e](t,n):[n,"UTC"+e.charAt(0).toUpperCase()+e.substring(1)+"s",!1]}var a={quarter:function(t,r,n){var a=r.getFullYear()-t.getFullYear(),i=t[n?"getUTCMonth":"getMonth"](),s=r[n?"getUTCMonth":"getMonth"](),o=e(i/3)+1,l=e(s/3)+1;return l+=4*a,l-o},weekday:function(e,t,r){var n,a=i("day",e,t,r),s=a%7;if(0===s)a=5*i("week",e,t,r);else{var o=0,l=e[r?"getUTCDay":"getDay"](),u=t[r?"getUTCDay":"getDay"]();n=parseInt(a/7,10);var c=new Date(+e);c.setDate(c[r?"getUTCDate":"getDate"]()+7*n);var h=c[r?"getUTCDay":"getDay"]();a>0?6===l||6===u?o=-1:0===l?o=0:(0===u||h+s>5)&&(o=-2):a<0&&(6===l?o=0:0===l||0===u?o=1:(6===u||h+s<0)&&(o=2)),a+=o,a-=2*n}return a},year:function(e,t){return t.getFullYear()-e.getFullYear()},month:function(e,t,r){var n=e[r?"getUTCMonth":"getMonth"](),a=t[r?"getUTCMonth":"getMonth"]();return a-n+12*(t.getFullYear()-e.getFullYear())},week:function(e,r,n){return t(i("day",e,r,n)/7)},day:function(e,t){return 1.1574074074074074e-8*(t.getTime()-e.getTime())},hour:function(e,t){return 2.7777777777777776e-7*(t.getTime()-e.getTime())},minute:function(e,t){return 16666666666666667e-21*(t.getTime()-e.getTime())},second:function(e,t){return.001*(t.getTime()-e.getTime())},millisecond:function(e,t){return t.getTime()-e.getTime()}};function i(e,r,n,i){return e=e.replace(/s$/,""),t(a[e](r,n,i))}return{addTransform:n,differenceTransform:i}}(),o=s.addTransform,l=s.differenceTransform,u=Math.floor,c=Math.round,h=Math.min,d=Math.pow,f=Math.ceil,p=Math.abs,m=["January","February","March","April","May","June","July","August","September","October","November","December"],g=["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."],_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],v=["Before Christ","Anno Domini"],b=["BC","AD"];function w(e,t){return S.difference(new Date(e.getFullYear(),0,1,e.getHours()),e,null,t)+1}function x(e,t,r){t=t||0;var n=e[r?"getUTCFullYear":"getFullYear"](),a=new Date(n,0,1).getDay(),i=(a-t+7)%7,s=u((w(e)+i-1)/7);return a===t&&s++,s}function k(e){var t=e.toString(),r="",n=t.indexOf("(");return n>-1&&(r=t.substring(++n,t.indexOf(")"))),r}function T(e,t){return e.replace(/([a-z])\1*/gi,(function(e){var r,n=e.charAt(0),a=e.length,i="0?",s="0{0,2}";if("y"===n)r="\\d{2,4}";else if("M"===n)r=a>2?"\\S+?":"1[0-2]|"+i+"[1-9]";else if("D"===n)r="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+s+"[1-9][0-9]|"+i+"[1-9]";else if("d"===n)r="3[01]|[12]\\d|"+i+"[1-9]";else if("w"===n)r="[1-4][0-9]|5[0-3]|"+i+"[1-9]";else if("E"===n)r="\\S+";else if("h"===n)r="1[0-2]|"+i+"[1-9]";else if("K"===n)r="1[01]|"+i+"\\d";else if("H"===n)r="1\\d|2[0-3]|"+i+"\\d";else if("k"===n)r="1\\d|2[0-4]|"+i+"[1-9]";else if("m"===n||"s"===n)r="[0-5]\\d";else if("S"===n)r="\\d{"+a+"}";else if("a"===n){var o="AM",l="PM";r=o+"|"+l,o!==o.toLowerCase()&&(r+="|"+o.toLowerCase()),l!==l.toLowerCase()&&(r+="|"+l.toLowerCase()),r=r.replace(/\./g,"\\.")}else r="v"===n||"z"===n||"Z"===n||"G"===n||"q"===n||"Q"===n?".*":" "===n?"\\s*":n+"*";return t&&t.push(e),"("+r+")"})).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var S={getDaysInMonth:function(e){var t=e.getMonth(),r=[31,28,31,30,31,30,31,31,30,31,30,31];return 1===t&&S.isLeapYear(e)?29:r[t]},isLeapYear:function(e,t){var r=e[t?"getUTCFullYear":"getFullYear"]();return r%400===0||r%4===0&&r%100!==0},isWeekend:function(e,t){var r=(e||new Date)[t?"getUTCDay":"getDay"]();return 0===r||6===r},getTimezoneName:k,compare:function(e,t,r){return e=new Date(+e),t=new Date(+(t||new Date)),"date"===r?(e.setHours(0,0,0,0),t.setHours(0,0,0,0)):"time"===r&&(e.setFullYear(0,0,0),t.setFullYear(0,0,0)),e>t?1:e1&&(2===D?C=a(""+C,2,!0):O=!0);else if("Q"===A.toUpperCase())C=f((s+1)/3),O=!0;else if("M"===A)D<3?(C=s+1,O=!0):C=(3===D?g:m)[s];else if("w"===A)C=x(e,0,r),O=!0;else if("D"===A)C=w(e,r),O=!0;else if("E"===A)D<3?(C=o+1,O=!0):C=(-3===D?y:_)[o];else if("a"===A)C=h<12?"AM":"PM";else if("h"===A)C=h%12||12,O=!0;else if("K"===A)C=h%12,O=!0;else if("k"===A)C=h||24,O=!0;else if("S"===A)C=c(E*d(10,D-3)),O=!0;else if("z"===A||"v"===A||"Z"===A){if(C=k(e),"z"!==A&&"v"!==A||C||(D=4),!C||"Z"===A){var N=e.getTimezoneOffset(),R=[N>=0?"-":"+",n(u(p(N)/60),2,"0"),n(p(N)%60,2,"0")];4===D&&(R.splice(0,0,"GMT"),R.splice(3,0,":")),C=R.join("")}}else C=t;else C=""+T,O=!0;else C=""+h,O=!0;return O&&(C=n(C,D,"0")),C}))}},E={};function C(e){E[e+"sFromNow"]=function(t){return S.add(new Date,e,t)},E[e+"sAgo"]=function(t){return S.add(new Date,e,-t)}}for(var O=["year","month","day","hour","minute","second"],A=0,D=O.length;A2){var f,p,v=m;3===i&&(v=g),e=e.replace(".","").toLowerCase();var b=!1;for(f=0,p=v.length;fx.length)return!1}else e=k}else if("D"===s||"d"===s)"D"===s&&(l[1]=0),l[2]=e;else if("a"===s){var T="am",S="pm",E=/\./g;e=e.replace(E,"").toLowerCase(),u=e===S?"p":e===T?"a":""}else"k"===s||"h"===s||"H"===s||"K"===s?("k"===s&&24===+e&&(e=0),l[3]=e):"m"===s?l[4]=e:"s"===s?l[5]=e:"S"===s&&(l[6]=e)}return!0}));if(c){var d=+l[3];"p"===u&&d<12?l[3]=d+12:"a"===u&&12===d&&(l[3]=0);var f=new Date(l[0],l[1],l[2],l[3],l[4],l[5],l[6]),p=-1!==r.indexOf(n,"d"),v=-1!==r.indexOf(n,"M"),b=l[1],w=l[2],x=f.getMonth(),k=f.getDate();return v&&x>b||p&&k>w?null:f}return null}},R=e.define(t.isDate,S).define(t.isString,N).define(t.isNumber,E);for(A in S)S.hasOwnProperty(A)&&(R[A]=S[A]);for(A in N)N.hasOwnProperty(A)&&(R[A]=N[A]);for(A in E)E.hasOwnProperty(A)&&(R[A]=E[A]);return R}"undefined"!==typeof n?"undefined"!==typeof r&&r.exports&&(r.exports=a(t("extended"),t("is-extended"),t("array-extended"))):"function"===typeof e&&e.amd?e(["extended","is-extended","array-extended"],(function(e,t,r){return a(e,t,r)})):this.dateExtended=a(this.extended,this.isExtended,this.arrayExtended)}).call(this)},{"array-extended":92,extended:124,"is-extended":140}],120:[function(t,r,n){(function(){function t(){var e,t=Array.prototype.slice,r=0,n=new Function,a=/(super)/g;function i(e,r){return r=r||0,t.call(e,r)}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t;return null!==e&&e!==t&&"object"===typeof e}function l(e){var t=o(e);return t&&e.constructor===Object}var u=function(e){return"[object Arguments]"===Object.prototype.toString.call(e)};function c(e,t){if(e&&e.length)for(var r=0,n=e.length;ro){e=e?u(e)||s(e)?e:[e]:[];var l,c=i.name,h=i.f;do{if(l=n[o][c],"function"===typeof l&&(l=l._f||l)!==h)return i.pos=1+o,l.apply(this,e)}while(a>++o)}return null}function f(){var e=this.__meta,t=e.supers,r=t.length,n=e.superMeta,a=n.pos;if(r>a){var i,s=n.name,o=n.f;do{if(i=t[a][s],"function"===typeof i&&(i=i._f||i)!==o)return n.pos=1+a,i.bind(this)}while(r>++a)}return null}function p(e){var t=this.__getters__;return t.hasOwnProperty(e)?t[e].apply(this):this[e]}function m(e,t){var r=this.__setters__;if(!l(e))return r.hasOwnProperty(e)?r[e].apply(this,i(arguments,1)):this[e]=t;for(var n in e){var a=e[n];r.hasOwnProperty(n)?r[e].call(this,a):this[n]=a}}function g(){var e=this.__meta||{},t=e.supers,r=t.length,n=e.superMeta,a=n.pos;if(r>a){var i,s=n.name,o=n.f;do{if(i=t[a][s],"function"===typeof i&&(i=i._f||i)!==o)return n.pos=1+a,i.apply(this,arguments)}while(r>++a)}return null}function _(e,t){if(e.toString().match(a)){var r=function(){var r,n=this.__meta||{},a=n.superMeta;switch(n.superMeta={f:e,pos:0,name:t},arguments.length){case 0:r=e.call(this);break;case 1:r=e.call(this,arguments[0]);break;case 2:r=e.call(this,arguments[0],arguments[1]);break;case 3:r=e.call(this,arguments[0],arguments[1],arguments[2]);break;default:r=e.apply(this,arguments)}return n.superMeta=a,r};return r._f=e,r}return e._f=e,e}function y(e,t){var r=t.setters||{},n=e.__setters__,a=e.__getters__;for(var i in r)n.hasOwnProperty(i)||(n[i]=r[i]);for(i in r=t.getters||{},r)a.hasOwnProperty(i)||(a[i]=r[i]);for(var s in t)if("getters"!==s&&"setters"!==s){var o=t[s];"function"===typeof o?e.hasOwnProperty(s)||(e[s]=_(g,s)):e[s]=o}}function v(){for(var e=i(arguments),t=e.length,r=this.prototype,n=r.__meta,a=this.__meta,s=r.__meta.bases,o=s.slice(),l=a.supers||[],u=n.supers||[],c=0;c=0)b(s[o--],t,n);t.unshift(e)}}function w(e,t){var r=t.setters,n=e.__setters__,a=e.__getters__;if(r)for(var i in r)n[i]=r[i];if(r=t.getters||{},r)for(i in r)a[i]=r[i];for(i in t)if("getters"!=i&&"setters"!=i){var s=t[i];if("function"===typeof s){var o=s.__meta||{};o.isConstructor?e[i]=s:e[i]=_(s,i)}else e[i]=s}}function x(e,t){return e&&t?e[t]=this:e.exports=e=this,this}function k(e){return E(this,e)}function T(e){n.prototype=e.prototype;var t=new n;return n.prototype=null,t}function S(t,n,a){var i={},o=[],u="declare"+ ++r,c=[],p=[],m=[],y=[],x={supers:m,unique:u,bases:c,superMeta:{f:null,pos:0,name:null}},k={supers:y,unique:u,bases:p,isConstructor:!0,superMeta:{f:null,pos:0,name:null}};if(l(n)&&!a&&(a=n,n=e),"function"===typeof n||s(n)?(o=s(n)?n:[n],n=o.shift(),t.__meta=k,i=T(n),i.__meta=x,i.__getters__=h({},i.__getters__||{}),i.__setters__=h({},i.__setters__||{}),t.__getters__=h({},t.__getters__||{}),t.__setters__=h({},t.__setters__||{}),b(n.prototype,m,c),b(n,y,p)):(t.__meta=k,i.__meta=x,i.__getters__=i.__getters__||{},i.__setters__=i.__setters__||{},t.__getters__=t.__getters__||{},t.__setters__=t.__setters__||{}),t.prototype=i,a){var S=x.proto=a.instance||{},E=k.proto=a.static||{};E.init=E.init||g,w(i,S),w(t,E),S.hasOwnProperty("constructor")?i.constructor=_(S.constructor,"constructor"):i.constructor=S.constructor=_(g,"constructor")}else x.proto={},k.proto={},t.init=_(g,"init"),i.constructor=_(g,"constructor");o.length&&v.apply(t,o),n&&h(t,h(h({},n),t)),i._super=t._super=d,i._getSuper=t._getSuper=f,i._static=t}function E(e,t){function r(){switch(arguments.length){case 0:this.constructor.call(this);break;case 1:this.constructor.call(this,arguments[0]);break;case 2:this.constructor.call(this,arguments[0],arguments[1]);break;case 3:this.constructor.call(this,arguments[0],arguments[1],arguments[2]);break;default:this.constructor.apply(this,arguments)}}return S(r,e,t),r.init()||r}function C(e,t){var r;function n(){return r||(this.constructor.apply(this,arguments),r=this),r}return S(n,e,t),n.init()||n}return u(arguments)||(u=function(e){return!(!e||!e.hasOwnProperty("callee"))}),e=E({instance:{get:p,set:m},static:{get:p,set:m,mixin:v,extend:k,as:x}}),E.singleton=C,E}"undefined"!==typeof n?"undefined"!==typeof r&&r.exports&&(r.exports=t()):"function"===typeof e&&e.amd?e(t):this.declare=t()})()},{}],121:[function(e,t,r){t.exports=e("./declare.js")},{"./declare.js":120}],122:[function(r,n,a){(function(t,a){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE * @version 3.0.2 */ (function(){"use strict";function i(e){return"function"===typeof e||"object"===typeof e&&null!==e}function s(e){return"function"===typeof e}function o(e){return"object"===typeof e&&null!==e}var l;l=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var u,c,h=l,d=0,f=function(e,t){C[d]=e,C[d+1]=t,d+=2,2===d&&(c?c(O):E())};function p(e){c=e}function m(e){f=e}var g="undefined"!==typeof window?window:void 0,_=g||{},y=_.MutationObserver||_.WebKitMutationObserver,v="undefined"!==typeof t&&"[object process]"==={}.toString.call(t),b="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function w(){return function(){t.nextTick(O)}}function x(){return function(){u(O)}}function k(){var e=0,t=new y(O),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function T(){var e=new MessageChannel;return e.port1.onmessage=O,function(){e.port2.postMessage(0)}}function S(){return function(){setTimeout(O,1)}}var E,C=new Array(1e3);function O(){for(var e=0;e0&&o.length>i)){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"===typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else o=s[t]=r,++e._eventsCount;return e}function _(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(r=s[e],!r)return!1;var u="function"===typeof r;switch(n=arguments.length,n){case 1:h(r,u,this);break;case 2:d(r,u,this,arguments[1]);break;case 3:f(r,u,this,arguments[1],arguments[2]);break;case 4:p(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(n-1),i=1;i=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():w(r,i),1===r.length&&(a[e]=r[0]),a.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.removeAllListeners=function(e){var t,r,i;if(r=this._events,!r)return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[e]&&(0===--this._eventsCount?this._events=n(null):delete r[e]),this;if(0===arguments.length){var s,o=a(r);for(i=0;i=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return v(this,e,!0)},s.prototype.rawListeners=function(e){return v(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},s.prototype.listenerCount=b,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],124:[function(t,r,n){(function(){"use strict";function a(e){(function(){function e(e,t){var r,n;for(r in t)t.hasOwnProperty(r)&&(n=t[r],r in e&&e[r]===n||(e[r]=n));return e}})();function t(){var t=e.define();return t.expose({register:function(e,r){r||(r=e,e=null);var n=typeof r;if(e)t[e]=r;else if(r&&"function"===n)t.extend(r);else{if("object"!==n)throw new TypeError("extended.register must be called with an extender function");t.expose(r)}return t},define:function(){return e.define.apply(e,arguments)}}),t}function r(){return t()}return r.define=function(){return e.define.apply(e,arguments)},r}"undefined"!==typeof n?"undefined"!==typeof r&&r.exports&&(r.exports=a(t("extender"))):"function"===typeof e&&e.amd?e(["extender"],(function(e){return a(e)})):this.extended=a(this.extender)}).call(this)},{extender:126}],125:[function(t,r,n){(function(){function a(e){var t,r=Array.prototype.slice;function n(e,t){if(e&&e.length)for(var r=0,n=e.length;r=c?r=null:r++;else if(s&&!g){if(!a)throw new Error("Parse Error: expected: '"+d+"' got: '"+g+"'. at '"+e.substr(r).replace(/[r\n]/g,"\\n'"));r=null}else{if(!s&&g&&-1===g.search(p))throw new Error("Parse Error: expected: '"+d+"' got: '"+g+"'. at '"+e.substr(r,10).replace(/[\r\n]/g,"\\n'"));!a||g&&_.test(g)||(r=null)}return null!==r&&t.push(v(o)),r}function w(e,t,r){var n=e.substr(t).search(_);return n=-1===n?r?null:e.length+1:t+n+1,n}function x(t,r,a,i){var s=t.substr(a),o=s.search(p);if(-1===o){if(!f.test(s))throw new Error("Parse Error: delimiter '"+n+"' not found at '"+s.replace(/\n/g,"\\n'"));o=s.length}var l=s.charAt(o);if(-1!==l.search(n))if(i&&a+(o+1)>=t.length)a=null;else{r.push(v(s.substr(0,o))),a+=o+1;var u=t.charAt(a);!e.strictColumnHandling&&(_.test(u)||a>=t.length)&&r.push(""),e.strictColumnHandling||!y.test(u)||i||r.push(u)}else _.test(l)?(r.push(v(s.substr(0,o))),a+=o):i?a=null:(r.push(v(s.substr(0,o))),a+=o+1);return a}function k(e,t){var r,n,a,i=e.substr(t);return-1!==(a=i.search(g))&&(n=i.match(g)[1].length,r=e.substr(t+a,n),t+=a+n-1),{token:r,cursor:t}}return a(e,"comment")&&(t=e.comment,r=!0),function(e,n){var a,s,o,l=0,u=e.length,c=[],h=[],f=0;while(l1)throw new Error("delimiter option must be one character long");t=n.escape(t)}else t=u;return e.delimiter=t,this.parser=c(e),this._headers=e.headers,this._renameHeaders=e.renameHeaders,this._ignoreEmpty=e.ignoreEmpty,this._discardUnmappedColumns=e.discardUnmappedColumns,this._strictColumnHandling=e.strictColumnHandling,this.__objectMode=e.objectMode,this.__buffered=[],this}s.inherits(f,o.Transform);var p=f.prototype.on,m=f.prototype.emit;n(f).extend({__pausedDone:null,__endEmitted:!1,__emittedData:!1,__handleLine:function(e,t,r,a){var i=this._ignoreEmpty,s=this;return n.isBoolean(i)&&i&&(!e||l.test(e.join("")))?a(null,null):r?a(null,e):void this.__transform(e,(function(e,r){e?a(e):s.__validate(r,(function(e,n,i){e?a(e):n?a(null,r):(s.emit("data-invalid",r,t,i),a(null,null))}))}))},__processRows:function(e,t,r){var a,i=this;n.asyncEach(e,(function(e,t){e&&i.__handleLine(e,a=++i._rowCount,!1,(function(e,r){e?t(e):(r?i.isStreamPaused()?i.__buffered.push([r,a]):i.__emitRecord(r,a):a=--i._rowCount,t())}))}),(function(e){e?r(e):r(null,t.line)}))},__processHeaders:function(e,t){var r=this._headers,i=this._renameHeaders,s=this._discardUnmappedColumns,o=this._strictColumnHandling,l=this;function u(e,r){if(e)t(e);else if(n.isArray(r)){var i=r.length,u=l.__transform;l.__transform=function(e,t){var n,c={},h=-1;if(e.length>i){if(!s)return o?(l.emit("data-invalid",e),u(null,t)):(l.emit("error",new Error("Unexpected Error: column header mismatch expected: "+i+" columns got: "+e.length)),u(null,t));e.splice(i)}else if(o&&e.length1?(a=this.__removeBOM(a),this._parse(a,!0,(function(e,t){e?r(e):(i.lines=t,i.isStreamPaused()?i.__pausedDone=r:r())}))):(this.lines=a,this.isStreamPaused()?this.__pausedDone=r:r())},__doFlush:function(e){try{e()}catch(t){e(t)}},_flush:function(e){var t=this;this.lines?this._parse(this.lines,!1,(function(r){r?e(r):t.isStreamPaused()?t.__pausedDone=function(){t.__doFlush(e)}:t.__doFlush(e)})):this.isStreamPaused()?this.__pausedDone=function(){t.__doFlush(e)}:this.__doFlush(e)},__validate:function(e,t){return t(null,!0)},__transform:function(e,t){return t(null,e)},__flushPausedBuffer:function(){var e=this.__buffered,t=e.length;if(t){var r;while(e.length)if(r=e.shift(),this.__emitRecord(r[0],r[1]),this.isStreamPaused())return;e.length=0}if(this.__pausedDone){var n=this.__pausedDone;this.__pausedDone=null,n()}},isStreamPaused:function(){return this.__paused},emit:function(e){"end"===e?this.__endEmitted||(this.__endEmitted=!0,i(m,["end",++this._rowCount],this)):(d||("pause"===e?this.__paused=!0:"resume"===e&&(this.__paused=!1,this.__flushPausedBuffer())),i(m,arguments,this))},on:function(e){return"data"!==e&&"readable"!==e||(this._emitData=!0),i(p,arguments,this),this},validate:function(e){return n.isFunction(e)||this.emit("error",new TypeError("fast-csv.Parser#validate requires a function")),2===e.length?this.__validate=e:this.__validate=function(t,r){return r(null,e(t))},this},transform:function(e){return n.isFunction(e)||this.emit("error",new TypeError("fast-csv.Parser#transform requires a function")),2===e.length?this.__transform=e:this.__transform=function(t,r){return r(null,e(t))},this}}),t.exports=f}).call(this,e("_process"))},{"../extended":128,"./parser":134,_process:198,fs:95,stream:216,string_decoder:218,util:222}],136:[function(e,t,r){r.read=function(e,t,r,n,a){var i,s,o=8*a-n-1,l=(1<>1,c=-7,h=r?a-1:0,d=r?-1:1,f=e[t+h];for(h+=d,i=f&(1<<-c)-1,f>>=-c,c+=o;c>0;i=256*i+e[t+h],h+=d,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),i-=u}return(f?-1:1)*s*Math.pow(2,i-n)},r.write=function(e,t,r,n,a,i){var s,o,l,u=8*i-a-1,c=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=c?(o=0,s=c):s+h>=1?(o=(t*l-1)*Math.pow(2,a),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,a),s=0));a>=8;e[r+f]=255&o,f+=p,o/=256,a-=8);for(s=s<0;e[r+f]=255&s,f+=p,s/=256,u-=8);e[r+f-p]|=128*m}},{}],137:[function(e,r,n){(function(e){"use strict";var t,n,a=e.MutationObserver||e.WebKitMutationObserver;if(a){var i=0,s=new a(c),o=e.document.createTextNode("");s.observe(o,{characterData:!0}),t=function(){o.data=i=++i%2}}else if(e.setImmediate||"undefined"===typeof e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,t=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;var r=u.length;while(r){t=u,u=[],e=-1;while(++e * @license MIT */ t.exports=function(e){return null!=e&&(n(e)||a(e)||!!e._isBuffer)}},{}],140:[function(t,r,n){(function(a){(function(){"use strict";function i(e){var t=Array.prototype.slice,r=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function i(e,t){var r=-1,n=0,a=e.length,i=[];t=t||0,r+=t;while(++r=0;a--)if(i[a]!==l[a])return!1;for(a=i.length-1;a>=0;a--)if(n=i[a],!o(e[n],r[n]))return!1}catch(u){return!1}return!0}var u=function(e){return"[object Function]"===n.call(e)};function c(e){return null!==e&&"object"===typeof e}function h(e){var t=c(e);return t&&e.constructor===Object&&!e.nodeType&&!e.setInterval}function d(e){return y(e)?0===e.length:c(e)?0===s(e).length:!k(e)&&!w(e)||0===e.length}function f(e){return!0===e||!1===e||"[object Boolean]"===n.call(e)}function p(e){return"undefined"===typeof e}function m(e){return!p(e)}function g(e){return p(e)||_(e)}function _(e){return null===e}"undefined"===typeof window||u(window.alert)||function(e){u=function(t){return"[object Function]"===n.call(t)||t===e}}(window.alert);var y=function(e){return"[object Arguments]"===n.call(e)};function v(e,t){return!!u(t)&&e instanceof t}function b(e){return"[object RegExp]"===n.call(e)}y(arguments)||(y=function(e){return!(!e||!r.call(e,"callee"))});var w=Array.isArray||function(e){return"[object Array]"===n.call(e)};function x(e){return"[object Date]"===n.call(e)}function k(e){return"[object String]"===n.call(e)}function T(e){return"[object Number]"===n.call(e)}function S(e){return!0===e}function E(e){return!1===e}function C(e){return!_(e)}function O(e,t){return e==t}function A(e,t){return e!=t}function D(e,t){return e===t}function N(e,t){return e!==t}function R(e,t){if(w(t)&&Array.prototype.indexOf||k(t))return t.indexOf(e)>-1;if(w(t))for(var r=0,n=t.length;rt}function L(e,t){return e>=t}function B(e,t){return k(t)?null!==(""+e).match(t):!!b(t)&&t.test(e)}function U(e,t){return!B(e,t)}function j(e,t){return R(t,e)}function z(e,t){return!R(t,e)}function H(e,t,r){return!!(w(e)&&e.length>r)&&O(e[r],t)}function W(e,t,r){return!!w(e)&&!O(e[r],t)}function V(e,t){return r.call(e,t)}function Y(e,t){return!V(e,t)}function G(e,t){return!!V(e,"length")&&e.length===t}function Z(e,t){return!!V(e,"length")&&e.length!==t}var X={isFunction:u,isObject:c,isEmpty:d,isHash:h,isNumber:T,isString:k,isDate:x,isArray:w,isBoolean:f,isUndefined:p,isDefined:m,isUndefinedOrNull:g,isNull:_,isArguments:y,instanceOf:v,isRegExp:b,deepEqual:o,isTrue:S,isFalse:E,isNotNull:C,isEq:O,isNeq:A,isSeq:D,isSneq:N,isIn:R,isNotIn:I,isLt:M,isLte:P,isGt:F,isGte:L,isLike:B,isNotLike:U,contains:j,notContains:z,has:V,notHas:Y,isLength:G,isNotLength:Z,containsAt:H,notContainsAt:W},$={constructor:function(){this._testers=[]},noWrap:{tester:function(){var e=this._testers;return function(t){for(var r=!1,n=0,a=e.length;n1&&(r[1]||r[0]))return r[1];if(!n&&t)return t.apply(this,a)}}}};function q(e){$[e]=function(){this._testers.push(X[e])}}function K(e){J[e]=function(){var t,r=i(arguments,1),n=X[e],a=!0;if(r.length<=n.length-1)throw new TypeError("A handler must be defined when calling using switch");if(t=r.pop(),f(t)&&(a=t,t=r.pop()),!u(t))throw new TypeError("handler must be defined");this._cases.push((function(e){return n.apply(X,e.concat(r))?[a,t.apply(this,e)]:[!1]}))}}for(var Q in X)r.call(X,Q)&&(K(Q),q(Q));var ee=e.define(X).expose(X);return ee.tester=e.define($),ee.switcher=e.define(J),ee}"undefined"!==typeof n?"undefined"!==typeof r&&r.exports&&(r.exports=i(t("extended"))):"function"===typeof e&&e.amd?e(["extended"],(function(e){return i(e)})):this.isExtended=i(this.extended)}).call(this)}).call(this,t("buffer").Buffer)},{buffer:96,extended:124}],141:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],142:[function(e,t,r){"use strict";var n=e("./utils"),a=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){var t,r,a,s,o,l,u,c=[],h=0,d=e.length,f=d,p="string"!==n.getTypeOf(e);while(h>2,o=(3&t)<<4|r>>4,l=f>1?(15&r)<<2|a>>6:64,u=f>2?63&a:64,c.push(i.charAt(s)+i.charAt(o)+i.charAt(l)+i.charAt(u));return c.join("")},r.decode=function(e){var t,r,n,s,o,l,u,c=0,h=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var f,p=3*e.length/4;if(e.charAt(e.length-1)===i.charAt(64)&&p--,e.charAt(e.length-2)===i.charAt(64)&&p--,p%1!==0)throw new Error("Invalid base64 input, bad content length.");f=a.uint8array?new Uint8Array(0|p):new Array(0|p);while(c>4,r=(15&o)<<4|l>>2,n=(3&l)<<6|u,f[h++]=t,64!==l&&(f[h++]=r),64!==u&&(f[h++]=n);return f}},{"./support":171,"./utils":173}],143:[function(e,t,r){"use strict";var n=e("./external"),a=e("./stream/DataWorker"),i=e("./stream/DataLengthProbe"),s=e("./stream/Crc32Probe");i=e("./stream/DataLengthProbe");function o(e,t,r,n,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=a}o.prototype={getContentWorker:function(){var e=new a(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo["data_length"]!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new a(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new i("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new i("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":147,"./stream/Crc32Probe":166,"./stream/DataLengthProbe":167,"./stream/DataWorker":168}],144:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":148,"./stream/GenericWorker":169}],145:[function(e,t,r){"use strict";var n=e("./utils");function a(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}var i=a();function s(e,t,r,n){var a=i,s=n+r;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}function o(e,t,r,n){var a=i,s=n+r;e^=-1;for(var o=n;o>>8^a[255&(e^t.charCodeAt(o))];return-1^e}t.exports=function(e,t){if("undefined"===typeof e||!e.length)return 0;var r="string"!==n.getTypeOf(e);return r?s(0|t,e,e.length,0):o(0|t,e,e.length,0)}},{"./utils":173}],146:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],147:[function(e,t,r){"use strict";var n=null;n="undefined"!==typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:177}],148:[function(e,t,r){"use strict";var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array,a=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),o=n?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=new a[e]({raw:!0,level:t.level||-1}),this.meta={};var r=this;this._pako.onData=function(e){r.push({data:e,meta:r.meta})}}r.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,this._pako.push(i.transformTo(o,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":169,"./utils":173,pako:181}],149:[function(e,t,r){"use strict";var n=e("../utils"),a=e("../stream/GenericWorker"),i=e("../utf8"),s=e("../crc32"),o=e("../signature"),l=function(e,t){var r,n="";for(r=0;r>>=8;return n},u=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16},c=function(e,t){return 63&(e||0)},h=function(e,t,r,a,h,d){var f,p,m=e["file"],g=e["compression"],_=d!==i.utf8encode,y=n.transformTo("string",d(m.name)),v=n.transformTo("string",i.utf8encode(m.name)),b=m.comment,w=n.transformTo("string",d(b)),x=n.transformTo("string",i.utf8encode(b)),k=v.length!==m.name.length,T=x.length!==b.length,S="",E="",C="",O=m.dir,A=m.date,D={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(D.crc32=e["crc32"],D.compressedSize=e["compressedSize"],D.uncompressedSize=e["uncompressedSize"]);var N=0;t&&(N|=8),_||!k&&!T||(N|=2048);var R=0,I=0;O&&(R|=16),"UNIX"===h?(I=798,R|=u(m.unixPermissions,O)):(I=20,R|=c(m.dosPermissions,O)),f=A.getUTCHours(),f<<=6,f|=A.getUTCMinutes(),f<<=5,f|=A.getUTCSeconds()/2,p=A.getUTCFullYear()-1980,p<<=4,p|=A.getUTCMonth()+1,p<<=5,p|=A.getUTCDate(),k&&(E=l(1,1)+l(s(y),4)+v,S+="up"+l(E.length,2)+E),T&&(C=l(1,1)+l(s(w),4)+x,S+="uc"+l(C.length,2)+C);var M="";M+="\n\0",M+=l(N,2),M+=g.magic,M+=l(f,2),M+=l(p,2),M+=l(D.crc32,4),M+=l(D.compressedSize,4),M+=l(D.uncompressedSize,4),M+=l(y.length,2),M+=l(S.length,2);var P=o.LOCAL_FILE_HEADER+M+y+S,F=o.CENTRAL_FILE_HEADER+l(I,2)+M+l(w.length,2)+"\0\0\0\0"+l(R,4)+l(a,4)+y+S+w;return{fileRecord:P,dirRecord:F}},d=function(e,t,r,a,i){var s="",u=n.transformTo("string",i(a));return s=o.CENTRAL_DIRECTORY_END+"\0\0\0\0"+l(e,2)+l(e,2)+l(t,4)+l(r,4)+l(u.length,2)+u,s},f=function(e){var t="";return t=o.DATA_DESCRIPTOR+l(e["crc32"],4)+l(e["compressedSize"],4)+l(e["uncompressedSize"],4),t};function p(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(p,a),p.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},p.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e["file"].name;var t=this.streamFiles&&!e["file"].dir;if(t){var r=h(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e["file"].dir,r=h(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:f(e),meta:{percent:100}});else{this.push({data:r.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null},p.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t="undefined"!==typeof t?t:o.createFolders,e=m(e),this.files[e]||f.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)this.files.hasOwnProperty(t)&&(n=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,n))},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1===arguments.length){if(_(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,f.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(_(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=g.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n=0;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===a)return i-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),a=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&a===i[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":173,"./DataReader":159}],159:[function(e,t,r){"use strict";var n=e("../utils");function a(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=a},{"../utils":173}],160:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader"),a=e("../utils");function i(e){n.call(this,e)}a.inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":173,"./Uint8ArrayReader":162}],161:[function(e,t,r){"use strict";var n=e("./DataReader"),a=e("../utils");function i(e){n.call(this,e)}a.inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":173,"./DataReader":159}],162:[function(e,t,r){"use strict";var n=e("./ArrayReader"),a=e("../utils");function i(e){n.call(this,e)}a.inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":173,"./ArrayReader":158}],163:[function(e,t,r){"use strict";var n=e("../utils"),a=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),o=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||a.uint8array?"nodebuffer"===t?new o(e):a.uint8array?new l(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new s(e)}},{"../support":171,"../utils":173,"./ArrayReader":158,"./NodeBufferReader":160,"./StringReader":161,"./Uint8ArrayReader":162}],164:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],165:[function(e,t,r){"use strict";var n=e("./GenericWorker"),a=e("../utils");function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}a.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:a.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":173,"./GenericWorker":169}],166:[function(e,t,r){"use strict";var n=e("./GenericWorker"),a=e("../crc32"),i=e("../utils");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i.inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=a(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":145,"../utils":173,"./GenericWorker":169}],167:[function(e,t,r){"use strict";var n=e("../utils"),a=e("./GenericWorker");function i(e){a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,a),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}a.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":173,"./GenericWorker":169}],168:[function(e,t,r){"use strict";var n=e("../utils"),a=e("./GenericWorker"),i=16384;function s(e){a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(s,a),s.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=i,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":173,"./GenericWorker":169}],169:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],170:[function(e,t,r){(function(r){"use strict";var n=e("../utils"),a=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),o=e("../support"),l=e("../external"),u=null;if(o.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(p){}function c(e,t,r,a){var i=null;switch(e){case"blob":return n.newBlob(r,a);case"base64":return i=h(t,r),s.encode(i);default:return i=h(t,r),n.transformTo(e,i)}}function h(e,t){var n,a=0,i=null,s=0;for(n=0;n=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;o[254]=o[254]=1;var u=function(e){var t,r,n,i,s,o=e.length,l=0;for(i=0;i>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},c=function(e,t){var r;t=t||e.length,t>e.length&&(t=e.length),r=t-1;while(r>=0&&128===(192&e[r]))r--;return r<0||0===r?t:r+o[e[r]]>t?r:t},h=function(e){var t,r,a,i,s=e.length,l=new Array(2*s);for(r=0,t=0;t4)l[r++]=65533,t+=i-1;else{a&=2===i?31:3===i?15:7;while(i>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)};function d(){s.call(this,"utf-8 decode"),this.leftOver=null}function f(){s.call(this,"utf-8 encode")}r.utf8encode=function(e){return a.nodebuffer?i.newBuffer(e,"utf-8"):u(e)},r.utf8decode=function(e){return a.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):(e=n.transformTo(a.uint8array?"uint8array":"array",e),h(e))},n.inherits(d,s),d.prototype.processChunk=function(e){var t=n.transformTo(a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var i=t;t=new Uint8Array(i.length+this.leftOver.length),t.set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=c(t),o=t;s!==t.length&&(a.uint8array?(o=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(o=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(o),meta:e.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=d,n.inherits(f,s),f.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=f},{"./nodejsUtils":155,"./stream/GenericWorker":169,"./support":171,"./utils":173}],173:[function(e,t,r){"use strict";var n=e("./support"),a=e("./base64"),i=e("./nodejsUtils"),s=e("core-js/library/fn/set-immediate"),o=e("./external");function l(e){var t=null;return t=n.uint8array?new Uint8Array(e.length):new Array(e.length),c(e,t)}function u(e){return e}function c(e,t){for(var r=0;r1)try{return h.stringifyByChunk(e,n,t)}catch(i){t=Math.floor(t/2)}return h.stringifyByChar(e)}function f(e,t){for(var r=0;r1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(r,i.CENTRAL_FILE_HEADER)||(this.reader.zero=s);else if(s<0)throw new Error("Corrupted zip: missing "+Math.abs(s)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":163,"./signature":164,"./support":171,"./utf8":172,"./utils":173,"./zipEntry":175}],175:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),a=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),o=e("./utf8"),l=e("./compressions"),u=e("./support"),c=0,h=3,d=function(e){for(var t in l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null};function f(e,t){this.options=e,this.loadOptions=t}f.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=d(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e===c&&(this.dosPermissions=63&this.externalFileAttributes),e===h&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,a=e.index+this.extraFieldsLength;this.extraFields||(this.extraFields={});while(e.index>>0,n=0;n0)for(r=0;r0?"future":"past"];return I(r)?r(t):r.replace(/%s/i,t)}var $={};function J(e,t){var r=e.toLowerCase();$[r]=$[r+"s"]=$[t]=e}function q(e){return"string"===typeof e?$[e]||$[e.toLowerCase()]:void 0}function K(e){var t,r,n={};for(r in e)f(e,r)&&(t=q(r),t&&(n[t]=e[r]));return n}var Q={};function ee(e,t){Q[e]=t}function te(e){var t=[];for(var r in e)t.push({unit:r,priority:Q[r]});return t.sort((function(e,t){return e.priority-t.priority})),t}function re(e,t,r){var n=""+Math.abs(e),a=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var ne=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ie={},se={};function oe(e,t,r,n){var a=n;"string"===typeof n&&(a=function(){return this[n]()}),e&&(se[e]=a),t&&(se[t[0]]=function(){return re(a.apply(this,arguments),t[1],t[2])}),r&&(se[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function le(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ue(e){var t,r,n=e.match(ne);for(t=0,r=n.length;t=0&&ae.test(e))e=e.replace(ae,n),ae.lastIndex=0,r-=1;return e}var de=/\d/,fe=/\d\d/,pe=/\d{3}/,me=/\d{4}/,ge=/[+-]?\d{6}/,_e=/\d\d?/,ye=/\d\d\d\d?/,ve=/\d\d\d\d\d\d?/,be=/\d{1,3}/,we=/\d{1,4}/,xe=/[+-]?\d{1,6}/,ke=/\d+/,Te=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ee=/Z|[+-]\d\d(?::?\d\d)?/gi,Ce=/[+-]?\d+(\.\d{1,3})?/,Oe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ae={};function De(e,t,r){Ae[e]=I(t)?t:function(e,n){return e&&r?r:t}}function Ne(e,t){return f(Ae,e)?Ae[e](t._strict,t._locale):new RegExp(Re(e))}function Re(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,a){return t||r||n||a})))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Me={};function Pe(e,t){var r,n=t;for("string"===typeof e&&(e=[e]),c(t)&&(n=function(e,r){r[t]=E(e)}),r=0;r68?1900:2e3)};var $e,Je=Ke("FullYear",!0);function qe(){return Xe(this.year())}function Ke(e,t){return function(r){return null!=r?(et(this,e,r),a.updateOffset(this,t),this):Qe(this,e)}}function Qe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function et(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&Xe(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),at(r,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function tt(e){return e=q(e),I(this[e])?this[e]():this}function rt(e,t){if("object"===typeof e){e=K(e);for(var r=te(e),n=0;n=0?(o=new Date(e+400,t,r,n,a,i,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,n,a,i,s),o}function wt(e){var t;if(e<100&&e>=0){var r=Array.prototype.slice.call(arguments);r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function xt(e,t,r){var n=7+t-r,a=(7+wt(e,0,n).getUTCDay()-t)%7;return-a+n-1}function kt(e,t,r,n,a){var i,s,o=(7+r-n)%7,l=xt(e,n,a),u=1+7*(t-1)+o+l;return u<=0?(i=e-1,s=Ze(i)+u):u>Ze(e)?(i=e+1,s=u-Ze(e)):(i=e,s=u),{year:i,dayOfYear:s}}function Tt(e,t,r){var n,a,i=xt(e.year(),t,r),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?(a=e.year()-1,n=s+St(a,t,r)):s>St(e.year(),t,r)?(n=s-St(e.year(),t,r),a=e.year()+1):(a=e.year(),n=s),{week:n,year:a}}function St(e,t,r){var n=xt(e,t,r),a=xt(e+1,t,r);return(Ze(e)-n+a)/7}function Et(e){return Tt(e,this._week.dow,this._week.doy).week}oe("w",["ww",2],"wo","week"),oe("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),ee("week",5),ee("isoWeek",5),De("w",_e),De("ww",_e,fe),De("W",_e),De("WW",_e,fe),Fe(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=E(e)}));var Ct={dow:0,doy:6};function Ot(){return this._week.dow}function At(){return this._week.doy}function Dt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Nt(e){var t=Tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Rt(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function It(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Mt(e,t){return e.slice(t,7).concat(e.slice(0,t))}oe("d",0,"do","day"),oe("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),oe("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),oe("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),oe("e",0,0,"weekday"),oe("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),ee("day",11),ee("weekday",11),ee("isoWeekday",11),De("d",_e),De("e",_e),De("E",_e),De("dd",(function(e,t){return t.weekdaysMinRegex(e)})),De("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),De("dddd",(function(e,t){return t.weekdaysRegex(e)})),Fe(["dd","ddd","dddd"],(function(e,t,r,n){var a=r._locale.weekdaysParse(e,n,r._strict);null!=a?t.d=a:_(r).invalidWeekday=e})),Fe(["d","e","E"],(function(e,t,r,n){t[n]=E(e)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function Ft(e,t){var r=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Mt(r,this._week.dow):e?r[e.day()]:r}var Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function Bt(e){return!0===e?Mt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}var Ut="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function jt(e){return!0===e?Mt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function zt(e,t,r){var n,a,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=m([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?(a=$e.call(this._weekdaysParse,s),-1!==a?a:null):"ddd"===t?(a=$e.call(this._shortWeekdaysParse,s),-1!==a?a:null):(a=$e.call(this._minWeekdaysParse,s),-1!==a?a:null):"dddd"===t?(a=$e.call(this._weekdaysParse,s),-1!==a?a:(a=$e.call(this._shortWeekdaysParse,s),-1!==a?a:(a=$e.call(this._minWeekdaysParse,s),-1!==a?a:null))):"ddd"===t?(a=$e.call(this._shortWeekdaysParse,s),-1!==a?a:(a=$e.call(this._weekdaysParse,s),-1!==a?a:(a=$e.call(this._minWeekdaysParse,s),-1!==a?a:null))):(a=$e.call(this._minWeekdaysParse,s),-1!==a?a:(a=$e.call(this._weekdaysParse,s),-1!==a?a:(a=$e.call(this._shortWeekdaysParse,s),-1!==a?a:null)))}function Ht(e,t,r){var n,a,i;if(this._weekdaysParseExact)return zt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=m([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Rt(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Yt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}var Gt=Oe;function Zt(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Gt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}var Xt=Oe;function $t(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var Jt=Oe;function qt(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,r,n,a,i,s=[],o=[],l=[],u=[];for(t=0;t<7;t++)r=m([2e3,1]).day(t),n=this.weekdaysMin(r,""),a=this.weekdaysShort(r,""),i=this.weekdays(r,""),s.push(n),o.push(a),l.push(i),u.push(n),u.push(a),u.push(i);for(s.sort(e),o.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)o[t]=Ie(o[t]),l[t]=Ie(l[t]),u[t]=Ie(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Qt(){return this.hours()%12||12}function er(){return this.hours()||24}function tr(e,t){oe(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function rr(e,t){return t._meridiemParse}function nr(e){return"p"===(e+"").toLowerCase().charAt(0)}oe("H",["HH",2],0,"hour"),oe("h",["hh",2],0,Qt),oe("k",["kk",2],0,er),oe("hmm",0,0,(function(){return""+Qt.apply(this)+re(this.minutes(),2)})),oe("hmmss",0,0,(function(){return""+Qt.apply(this)+re(this.minutes(),2)+re(this.seconds(),2)})),oe("Hmm",0,0,(function(){return""+this.hours()+re(this.minutes(),2)})),oe("Hmmss",0,0,(function(){return""+this.hours()+re(this.minutes(),2)+re(this.seconds(),2)})),tr("a",!0),tr("A",!1),J("hour","h"),ee("hour",13),De("a",rr),De("A",rr),De("H",_e),De("h",_e),De("k",_e),De("HH",_e,fe),De("hh",_e,fe),De("kk",_e,fe),De("hmm",ye),De("hmmss",ve),De("Hmm",ye),De("Hmmss",ve),Pe(["H","HH"],ze),Pe(["k","kk"],(function(e,t,r){var n=E(e);t[ze]=24===n?0:n})),Pe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Pe(["h","hh"],(function(e,t,r){t[ze]=E(e),_(r).bigHour=!0})),Pe("hmm",(function(e,t,r){var n=e.length-2;t[ze]=E(e.substr(0,n)),t[He]=E(e.substr(n)),_(r).bigHour=!0})),Pe("hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[ze]=E(e.substr(0,n)),t[He]=E(e.substr(n,2)),t[We]=E(e.substr(a)),_(r).bigHour=!0})),Pe("Hmm",(function(e,t,r){var n=e.length-2;t[ze]=E(e.substr(0,n)),t[He]=E(e.substr(n))})),Pe("Hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[ze]=E(e.substr(0,n)),t[He]=E(e.substr(n,2)),t[We]=E(e.substr(a))}));var ar=/[ap]\.?m?\.?/i;function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var sr,or=Ke("Hours",!0),lr={calendar:L,longDateFormat:U,invalidDate:z,ordinal:W,dayOfMonthOrdinalParse:V,relativeTime:G,months:st,monthsShort:lt,week:Ct,weekdays:Pt,weekdaysMin:Ut,weekdaysShort:Lt,meridiemParse:ar},ur={},cr={};function hr(e){return e?e.toLowerCase().replace("_","-"):e}function dr(e){var t,r,n,a,i=0;while(i0){if(n=fr(a.slice(0,t).join("-")),n)return n;if(r&&r.length>=t&&C(a,r,!0)>=t-1)break;t--}i++}return sr}function fr(e){var n=null;if(!ur[e]&&"undefined"!==typeof r&&r&&r.exports)try{n=sr._abbr;var a=t;a("./locale/"+e),pr(n)}catch(i){}return ur[e]}function pr(e,t){var r;return e&&(r=u(t)?_r(e):mr(e,t),r?sr=r:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sr._abbr}function mr(e,t){if(null!==t){var r,n=lr;if(t.abbr=e,null!=ur[e])R("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ur[e]._config;else if(null!=t.parentLocale)if(null!=ur[t.parentLocale])n=ur[t.parentLocale]._config;else{if(r=fr(t.parentLocale),null==r)return cr[t.parentLocale]||(cr[t.parentLocale]=[]),cr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ur[e]=new F(P(n,t)),cr[e]&&cr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),ur[e]}return delete ur[e],null}function gr(e,t){if(null!=t){var r,n,a=lr;n=fr(e),null!=n&&(a=n._config),t=P(a,t),r=new F(t),r.parentLocale=ur[e],ur[e]=r,pr(e)}else null!=ur[e]&&(null!=ur[e].parentLocale?ur[e]=ur[e].parentLocale:null!=ur[e]&&delete ur[e]);return ur[e]}function _r(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sr;if(!s(e)){if(t=fr(e),t)return t;e=[e]}return dr(e)}function yr(){return D(ur)}function vr(e){var t,r=e._a;return r&&-2===_(e).overflow&&(t=r[Ue]<0||r[Ue]>11?Ue:r[je]<1||r[je]>at(r[Be],r[Ue])?je:r[ze]<0||r[ze]>24||24===r[ze]&&(0!==r[He]||0!==r[We]||0!==r[Ve])?ze:r[He]<0||r[He]>59?He:r[We]<0||r[We]>59?We:r[Ve]<0||r[Ve]>999?Ve:-1,_(e)._overflowDayOfYear&&(tje)&&(t=je),_(e)._overflowWeeks&&-1===t&&(t=Ye),_(e)._overflowWeekday&&-1===t&&(t=Ge),_(e).overflow=t),e}function br(e,t,r){return null!=e?e:null!=t?t:r}function wr(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function xr(e){var t,r,n,a,i,s=[];if(!e._d){for(n=wr(e),e._w&&null==e._a[je]&&null==e._a[Ue]&&kr(e),null!=e._dayOfYear&&(i=br(e._a[Be],n[Be]),(e._dayOfYear>Ze(i)||0===e._dayOfYear)&&(_(e)._overflowDayOfYear=!0),r=wt(i,0,e._dayOfYear),e._a[Ue]=r.getUTCMonth(),e._a[je]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ze]&&0===e._a[He]&&0===e._a[We]&&0===e._a[Ve]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?wt:bt).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==a&&(_(e).weekdayMismatch=!0)}}function kr(e){var t,r,n,a,i,s,o,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)i=1,s=4,r=br(t.GG,e._a[Be],Tt(Xr(),1,4).year),n=br(t.W,1),a=br(t.E,1),(a<1||a>7)&&(l=!0);else{i=e._locale._week.dow,s=e._locale._week.doy;var u=Tt(Xr(),i,s);r=br(t.gg,e._a[Be],u.year),n=br(t.w,u.week),null!=t.d?(a=t.d,(a<0||a>6)&&(l=!0)):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}n<1||n>St(r,i,s)?_(e)._overflowWeeks=!0:null!=l?_(e)._overflowWeekday=!0:(o=kt(r,n,a,i,s),e._a[Be]=o.year,e._dayOfYear=o.dayOfYear)}var Tr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Er=/Z|[+-]\d\d(?::?\d\d)?/,Cr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Or=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ar=/^\/?Date\((\-?\d+)/i;function Dr(e){var t,r,n,a,i,s,o=e._i,l=Tr.exec(o)||Sr.exec(o);if(l){for(_(e).iso=!0,t=0,r=Cr.length;t0&&_(e).unusedInput.push(s),o=o.slice(o.indexOf(r)+r.length),u+=r.length),se[i]?(r?_(e).empty=!1:_(e).unusedTokens.push(i),Le(i,r,e)):e._strict&&!r&&_(e).unusedTokens.push(i);_(e).charsLeftOver=l-u,o.length>0&&_(e).unusedInput.push(o),e._a[ze]<=12&&!0===_(e).bigHour&&e._a[ze]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[ze]=zr(e._locale,e._a[ze],e._meridiem),xr(e),vr(e)}else Br(e);else Dr(e)}function zr(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?(n=e.isPM(r),n&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Hr(e){var t,r,n,a,i;if(0===e._f.length)return _(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e:v()}));function qr(e,t){var r,n;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Xr();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wn(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),e=Yr(e),e._a){var t=e._isUTC?m(e._a):Xr(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function xn(){return!!this.isValid()&&!this._isUTC}function kn(){return!!this.isValid()&&this._isUTC}function Tn(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}a.updateOffset=function(){};var Sn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,En=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cn(e,t){var r,n,a,i=e,s=null;return on(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(i={},t?i[t]=e:i.milliseconds=e):(s=Sn.exec(e))?(r="-"===s[1]?-1:1,i={y:0,d:E(s[je])*r,h:E(s[ze])*r,m:E(s[He])*r,s:E(s[We])*r,ms:E(ln(1e3*s[Ve]))*r}):(s=En.exec(e))?(r="-"===s[1]?-1:1,i={y:On(s[2],r),M:On(s[3],r),w:On(s[4],r),d:On(s[5],r),h:On(s[6],r),m:On(s[7],r),s:On(s[8],r)}):null==i?i={}:"object"===typeof i&&("from"in i||"to"in i)&&(a=Dn(Xr(i.from),Xr(i.to)),i={},i.ms=a.milliseconds,i.M=a.months),n=new sn(i),on(e)&&f(e,"_locale")&&(n._locale=e._locale),n}function On(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function An(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Dn(e,t){var r;return e.isValid()&&t.isValid()?(t=dn(t,e),e.isBefore(t)?r=An(e,t):(r=An(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Nn(e,t){return function(r,n){var a,i;return null===n||isNaN(+n)||(R(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),r="string"===typeof r?+r:r,a=Cn(r,n),Rn(this,a,e),this}}function Rn(e,t,r,n){var i=t._milliseconds,s=ln(t._days),o=ln(t._months);e.isValid()&&(n=null==n||n,o&&dt(e,Qe(e,"Month")+o*r),s&&et(e,"Date",Qe(e,"Date")+s*r),i&&e._d.setTime(e._d.valueOf()+i*r),n&&a.updateOffset(e,s||o))}Cn.fn=sn.prototype,Cn.invalid=an;var In=Nn(1,"add"),Mn=Nn(-1,"subtract");function Pn(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Fn(e,t){var r=e||Xr(),n=dn(r,this).startOf("day"),i=a.calendarFormat(this,n)||"sameElse",s=t&&(I(t[i])?t[i].call(this,r):t[i]);return this.format(s||this.localeData().calendar(i,this,Xr(r)))}function Ln(){return new k(this)}function Bn(e,t){var r=T(e)?e:Xr(e);return!(!this.isValid()||!r.isValid())&&(t=q(t)||"millisecond","millisecond"===t?this.valueOf()>r.valueOf():r.valueOf()9999?ce(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ce(r,"Z")):ce(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Xn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]';return this.format(r+n+a+i)}function $n(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=ce(this,e);return this.localeData().postformat(t)}function Jn(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xr(e).isValid())?Cn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function qn(e){return this.from(Xr(),e)}function Kn(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xr(e).isValid())?Cn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Qn(e){return this.to(Xr(),e)}function ea(e){var t;return void 0===e?this._locale._abbr:(t=_r(e),null!=t&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ta=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ra(){return this._locale}var na=1e3,aa=60*na,ia=60*aa,sa=3506328*ia;function oa(e,t){return(e%t+t)%t}function la(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-sa:new Date(e,t,r).valueOf()}function ua(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-sa:Date.UTC(e,t,r)}function ca(e){var t;if(e=q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?ua:la;switch(e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=oa(t+(this._isUTC?0:this.utcOffset()*aa),ia);break;case"minute":t=this._d.valueOf(),t-=oa(t,aa);break;case"second":t=this._d.valueOf(),t-=oa(t,na);break}return this._d.setTime(t),a.updateOffset(this,!0),this}function ha(e){var t;if(e=q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?ua:la;switch(e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ia-oa(t+(this._isUTC?0:this.utcOffset()*aa),ia)-1;break;case"minute":t=this._d.valueOf(),t+=aa-oa(t,aa)-1;break;case"second":t=this._d.valueOf(),t+=na-oa(t,na)-1;break}return this._d.setTime(t),a.updateOffset(this,!0),this}function da(){return this._d.valueOf()-6e4*(this._offset||0)}function fa(){return Math.floor(this.valueOf()/1e3)}function pa(){return new Date(this.valueOf())}function ma(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ga(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function _a(){return this.isValid()?this.toISOString():null}function ya(){return y(this)}function va(){return p({},_(this))}function ba(){return _(this).overflow}function wa(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function xa(e,t){oe(0,[e,e.length],0,t)}function ka(e){return Ca.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ta(e){return Ca.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Sa(){return St(this.year(),1,4)}function Ea(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Ca(e,t,r,n,a){var i;return null==e?Tt(this,n,a).year:(i=St(e,n,a),t>i&&(t=i),Oa.call(this,e,t,r,n,a))}function Oa(e,t,r,n,a){var i=kt(e,t,r,n,a),s=wt(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Aa(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}oe(0,["gg",2],0,(function(){return this.weekYear()%100})),oe(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),ee("weekYear",1),ee("isoWeekYear",1),De("G",Te),De("g",Te),De("GG",_e,fe),De("gg",_e,fe),De("GGGG",we,me),De("gggg",we,me),De("GGGGG",xe,ge),De("ggggg",xe,ge),Fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=E(e)})),Fe(["gg","GG"],(function(e,t,r,n){t[n]=a.parseTwoDigitYear(e)})),oe("Q",0,"Qo","quarter"),J("quarter","Q"),ee("quarter",7),De("Q",de),Pe("Q",(function(e,t){t[Ue]=3*(E(e)-1)})),oe("D",["DD",2],"Do","date"),J("date","D"),ee("date",9),De("D",_e),De("DD",_e,fe),De("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Pe(["D","DD"],je),Pe("Do",(function(e,t){t[je]=E(e.match(_e)[0])}));var Da=Ke("Date",!0);function Na(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}oe("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),ee("dayOfYear",4),De("DDD",be),De("DDDD",pe),Pe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=E(e)})),oe("m",["mm",2],0,"minute"),J("minute","m"),ee("minute",14),De("m",_e),De("mm",_e,fe),Pe(["m","mm"],He);var Ra=Ke("Minutes",!1);oe("s",["ss",2],0,"second"),J("second","s"),ee("second",15),De("s",_e),De("ss",_e,fe),Pe(["s","ss"],We);var Ia,Ma=Ke("Seconds",!1);for(oe("S",0,0,(function(){return~~(this.millisecond()/100)})),oe(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),oe(0,["SSS",3],0,"millisecond"),oe(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),oe(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),oe(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),oe(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),oe(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),oe(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),J("millisecond","ms"),ee("millisecond",16),De("S",be,de),De("SS",be,fe),De("SSS",be,pe),Ia="SSSS";Ia.length<=9;Ia+="S")De(Ia,ke);function Pa(e,t){t[Ve]=E(1e3*("0."+e))}for(Ia="S";Ia.length<=9;Ia+="S")Pe(Ia,Pa);var Fa=Ke("Milliseconds",!1);function La(){return this._isUTC?"UTC":""}function Ba(){return this._isUTC?"Coordinated Universal Time":""}oe("z",0,0,"zoneAbbr"),oe("zz",0,0,"zoneName");var Ua=k.prototype;function ja(e){return Xr(1e3*e)}function za(){return Xr.apply(null,arguments).parseZone()}function Ha(e){return e}Ua.add=In,Ua.calendar=Fn,Ua.clone=Ln,Ua.diff=Vn,Ua.endOf=ha,Ua.format=$n,Ua.from=Jn,Ua.fromNow=qn,Ua.to=Kn,Ua.toNow=Qn,Ua.get=tt,Ua.invalidAt=ba,Ua.isAfter=Bn,Ua.isBefore=Un,Ua.isBetween=jn,Ua.isSame=zn,Ua.isSameOrAfter=Hn,Ua.isSameOrBefore=Wn,Ua.isValid=ya,Ua.lang=ta,Ua.locale=ea,Ua.localeData=ra,Ua.max=Jr,Ua.min=$r,Ua.parsingFlags=va,Ua.set=rt,Ua.startOf=ca,Ua.subtract=Mn,Ua.toArray=ma,Ua.toObject=ga,Ua.toDate=pa,Ua.toISOString=Zn,Ua.inspect=Xn,Ua.toJSON=_a,Ua.toString=Gn,Ua.unix=fa,Ua.valueOf=da,Ua.creationData=wa,Ua.year=Je,Ua.isLeapYear=qe,Ua.weekYear=ka,Ua.isoWeekYear=Ta,Ua.quarter=Ua.quarters=Aa,Ua.month=ft,Ua.daysInMonth=pt,Ua.week=Ua.weeks=Dt,Ua.isoWeek=Ua.isoWeeks=Nt,Ua.weeksInYear=Ea,Ua.isoWeeksInYear=Sa,Ua.date=Da,Ua.day=Ua.days=Wt,Ua.weekday=Vt,Ua.isoWeekday=Yt,Ua.dayOfYear=Na,Ua.hour=Ua.hours=or,Ua.minute=Ua.minutes=Ra,Ua.second=Ua.seconds=Ma,Ua.millisecond=Ua.milliseconds=Fa,Ua.utcOffset=pn,Ua.utc=gn,Ua.local=_n,Ua.parseZone=yn,Ua.hasAlignedHourOffset=vn,Ua.isDST=bn,Ua.isLocal=xn,Ua.isUtcOffset=kn,Ua.isUtc=Tn,Ua.isUTC=Tn,Ua.zoneAbbr=La,Ua.zoneName=Ba,Ua.dates=A("dates accessor is deprecated. Use date instead.",Da),Ua.months=A("months accessor is deprecated. Use month instead",ft),Ua.years=A("years accessor is deprecated. Use year instead",Je),Ua.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mn),Ua.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wn);var Wa=F.prototype;function Va(e,t,r,n){var a=_r(),i=m().set(n,t);return a[r](i,e)}function Ya(e,t,r){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Va(e,t,r,"month");var n,a=[];for(n=0;n<12;n++)a[n]=Va(e,n,r,"month");return a}function Ga(e,t,r,n){"boolean"===typeof e?(c(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,c(t)&&(r=t,t=void 0),t=t||"");var a,i=_r(),s=e?i._week.dow:0;if(null!=r)return Va(t,(r+s)%7,n,"day");var o=[];for(a=0;a<7;a++)o[a]=Va(t,(a+s)%7,n,"day");return o}function Za(e,t){return Ya(e,t,"months")}function Xa(e,t){return Ya(e,t,"monthsShort")}function $a(e,t,r){return Ga(e,t,r,"weekdays")}function Ja(e,t,r){return Ga(e,t,r,"weekdaysShort")}function qa(e,t,r){return Ga(e,t,r,"weekdaysMin")}Wa.calendar=B,Wa.longDateFormat=j,Wa.invalidDate=H,Wa.ordinal=Y,Wa.preparse=Ha,Wa.postformat=Ha,Wa.relativeTime=Z,Wa.pastFuture=X,Wa.set=M,Wa.months=ot,Wa.monthsShort=ut,Wa.monthsParse=ht,Wa.monthsRegex=yt,Wa.monthsShortRegex=gt,Wa.week=Et,Wa.firstDayOfYear=At,Wa.firstDayOfWeek=Ot,Wa.weekdays=Ft,Wa.weekdaysMin=jt,Wa.weekdaysShort=Bt,Wa.weekdaysParse=Ht,Wa.weekdaysRegex=Zt,Wa.weekdaysShortRegex=$t,Wa.weekdaysMinRegex=qt,Wa.isPM=nr,Wa.meridiem=ir,pr("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=1===E(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),a.lang=A("moment.lang is deprecated. Use moment.locale instead.",pr),a.langData=A("moment.langData is deprecated. Use moment.localeData instead.",_r);var Ka=Math.abs;function Qa(){var e=this._data;return this._milliseconds=Ka(this._milliseconds),this._days=Ka(this._days),this._months=Ka(this._months),e.milliseconds=Ka(e.milliseconds),e.seconds=Ka(e.seconds),e.minutes=Ka(e.minutes),e.hours=Ka(e.hours),e.months=Ka(e.months),e.years=Ka(e.years),this}function ei(e,t,r,n){var a=Cn(t,r);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function ti(e,t){return ei(this,e,t,1)}function ri(e,t){return ei(this,e,t,-1)}function ni(e){return e<0?Math.floor(e):Math.ceil(e)}function ai(){var e,t,r,n,a,i=this._milliseconds,s=this._days,o=this._months,l=this._data;return i>=0&&s>=0&&o>=0||i<=0&&s<=0&&o<=0||(i+=864e5*ni(si(o)+s),s=0,o=0),l.milliseconds=i%1e3,e=S(i/1e3),l.seconds=e%60,t=S(e/60),l.minutes=t%60,r=S(t/60),l.hours=r%24,s+=S(r/24),a=S(ii(s)),o+=a,s-=ni(si(a)),n=S(o/12),o%=12,l.days=s,l.months=o,l.years=n,this}function ii(e){return 4800*e/146097}function si(e){return 146097*e/4800}function oi(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=q(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+ii(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(si(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function li(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*E(this._months/12):NaN}function ui(e){return function(){return this.as(e)}}var ci=ui("ms"),hi=ui("s"),di=ui("m"),fi=ui("h"),pi=ui("d"),mi=ui("w"),gi=ui("M"),_i=ui("Q"),yi=ui("y");function vi(){return Cn(this)}function bi(e){return e=q(e),this.isValid()?this[e+"s"]():NaN}function wi(e){return function(){return this.isValid()?this._data[e]:NaN}}var xi=wi("milliseconds"),ki=wi("seconds"),Ti=wi("minutes"),Si=wi("hours"),Ei=wi("days"),Ci=wi("months"),Oi=wi("years");function Ai(){return S(this.days()/7)}var Di=Math.round,Ni={ss:44,s:45,m:45,h:22,d:26,M:11};function Ri(e,t,r,n,a){return a.relativeTime(t||1,!!r,e,n)}function Ii(e,t,r){var n=Cn(e).abs(),a=Di(n.as("s")),i=Di(n.as("m")),s=Di(n.as("h")),o=Di(n.as("d")),l=Di(n.as("M")),u=Di(n.as("y")),c=a<=Ni.ss&&["s",a]||a0,c[4]=r,Ri.apply(null,c)}function Mi(e){return void 0===e?Di:"function"===typeof e&&(Di=e,!0)}function Pi(e,t){return void 0!==Ni[e]&&(void 0===t?Ni[e]:(Ni[e]=t,"s"===e&&(Ni.ss=t-1),!0))}function Fi(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=Ii(this,!e,t);return e&&(r=t.pastFuture(+this,r)),t.postformat(r)}var Li=Math.abs;function Bi(e){return(e>0)-(e<0)||+e}function Ui(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n=Li(this._milliseconds)/1e3,a=Li(this._days),i=Li(this._months);e=S(n/60),t=S(e/60),n%=60,e%=60,r=S(i/12),i%=12;var s=r,o=i,l=a,u=t,c=e,h=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Bi(this._months)!==Bi(d)?"-":"",m=Bi(this._days)!==Bi(d)?"-":"",g=Bi(this._milliseconds)!==Bi(d)?"-":"";return f+"P"+(s?p+s+"Y":"")+(o?p+o+"M":"")+(l?m+l+"D":"")+(u||c||h?"T":"")+(u?g+u+"H":"")+(c?g+c+"M":"")+(h?g+h+"S":"")}var ji=sn.prototype;return ji.isValid=nn,ji.abs=Qa,ji.add=ti,ji.subtract=ri,ji.as=oi,ji.asMilliseconds=ci,ji.asSeconds=hi,ji.asMinutes=di,ji.asHours=fi,ji.asDays=pi,ji.asWeeks=mi,ji.asMonths=gi,ji.asQuarters=_i,ji.asYears=yi,ji.valueOf=li,ji._bubble=ai,ji.clone=vi,ji.get=bi,ji.milliseconds=xi,ji.seconds=ki,ji.minutes=Ti,ji.hours=Si,ji.days=Ei,ji.weeks=Ai,ji.months=Ci,ji.years=Oi,ji.humanize=Fi,ji.toISOString=Ui,ji.toString=Ui,ji.toJSON=Ui,ji.locale=ea,ji.localeData=ra,ji.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ui),ji.lang=ta,oe("X",0,0,"unix"),oe("x",0,0,"valueOf"),De("x",Te),De("X",Ce),Pe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))})),Pe("x",(function(e,t,r){r._d=new Date(E(e))})),a.version="2.24.0",i(Xr),a.fn=Ua,a.min=Kr,a.max=Qr,a.now=en,a.utc=m,a.unix=ja,a.months=Za,a.isDate=h,a.locale=pr,a.invalid=v,a.duration=Cn,a.isMoment=T,a.weekdays=$a,a.parseZone=za,a.localeData=_r,a.isDuration=on,a.monthsShort=Xa,a.weekdaysMin=qa,a.defineLocale=mr,a.updateLocale=gr,a.locales=yr,a.weekdaysShort=Ja,a.normalizeUnits=q,a.relativeTimeRounding=Mi,a.relativeTimeThreshold=Pi,a.calendarFormat=Pn,a.prototype=Ua,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}))},{}],179:[function(t,r,n){(function(){"use strict";function a(e,t,r){var n=t.deepEqual,a=t.isString,i=t.isHash,s=r.difference,o=Object.prototype.hasOwnProperty,l=t.isFunction;function u(e,t){var r,n;for(r in t)o.call(t,r)&&(n=t[r],r in e&&e[r]===n||(e[r]=n));return e}function c(e,t){var r,a,s;for(r in t)o.call(t,r)&&(a=t[r],s=e[r],n(s,a)||(i(s)&&i(a)?e[r]=c(s,a):i(a)?e[r]=c({},a):e[r]=a));return e}function h(e){e||(e={});for(var t=1,r=arguments.length;t0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"===typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=n.deflateSetDictionary(this.strm,u),r!==h)throw new Error(s[r]);this._dict_set=!0}}function y(e,t){var r=new _(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}function v(e,t){return t=t||{},t.raw=!0,y(e,t)}function b(e,t){return t=t||{},t.gzip=!0,y(e,t)}_.prototype.push=function(e,t){var r,s,o=this.strm,p=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?c:u,"string"===typeof e?o.input=i.string2buf(e):"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new a.Buf8(p),o.next_out=0,o.avail_out=p),r=n.deflate(o,s),r!==d&&r!==h)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||s!==c&&s!==f)||("string"===this.options.to?this.onData(i.buf2binstring(a.shrinkBuf(o.output,o.next_out))):this.onData(a.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&r!==d);return s===c?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h):s!==f||(this.onEnd(h),o.avail_out=0,!0)},_.prototype.onData=function(e){this.chunks.push(e)},_.prototype.onEnd=function(e){e===h&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=_,r.deflate=y,r.deflateRaw=v,r.gzip=b},{"./utils/common":184,"./utils/strings":185,"./zlib/deflate":189,"./zlib/messages":194,"./zlib/zstream":196}],183:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),a=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(o[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==s.Z_OK)))throw new Error(o[r])}function d(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}function f(e,t){return t=t||{},t.raw=!0,d(e,t)}h.prototype.push=function(e,t){var r,o,l,u,h,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"===typeof e?d.input=i.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new a.Buf8(f),d.next_out=0,d.avail_out=f),r=n.inflate(d,s.Z_NO_FLUSH),r===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==s.Z_STREAM_END&&(0!==d.avail_in||o!==s.Z_FINISH&&o!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(d.output,d.next_out),u=d.next_out-l,h=i.buf2string(d.output,l),d.next_out=u,d.avail_out=f-u,u&&a.arraySet(d.output,d.output,l,u,0),this.onData(h)):this.onData(a.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(o=s.Z_FINISH),o===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):o!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=h,r.inflate=d,r.inflateRaw=f,r.ungzip=d},{"./utils/common":184,"./utils/strings":185,"./zlib/constants":187,"./zlib/gzheader":190,"./zlib/inflate":192,"./zlib/messages":194,"./zlib/zstream":196}],184:[function(e,t,r){"use strict";var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.assign=function(e){var t=Array.prototype.slice.call(arguments,1);while(t.length){var r=t.shift();if(r){if("object"!==typeof r)throw new TypeError(r+"must be non-object");for(var n in r)a(r,n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),a);else for(var i=0;i=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&a))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,a=t.length;r4)u[n++]=65533,r+=i-1;else{a&=2===i?31:3===i?15:7;while(i>1&&r1?u[n++]=65533:a<65536?u[n++]=a:(a-=65536,u[n++]=55296|a>>10&1023,u[n++]=56320|1023&a)}return l(u,n)},r.utf8border=function(e,t){var r;t=t||e.length,t>e.length&&(t=e.length),r=t-1;while(r>=0&&128===(192&e[r]))r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":184}],186:[function(e,t,r){"use strict";function n(e,t,r,n){var a=65535&e|0,i=e>>>16&65535|0,s=0;while(0!==r){s=r>2e3?2e3:r,r-=s;do{a=a+t[n++]|0,i=i+a|0}while(--s);a%=65521,i%=65521}return a|i<<16|0}t.exports=n},{}],187:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],188:[function(e,t,r){"use strict";function n(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}var a=n();function i(e,t,r,n){var i=a,s=n+r;e^=-1;for(var o=n;o>>8^i[255&(e^t[o])];return-1^e}t.exports=i},{}],189:[function(e,t,r){"use strict";var n,a=e("../utils/common"),i=e("./trees"),s=e("./adler32"),o=e("./crc32"),l=e("./messages"),u=0,c=1,h=3,d=4,f=5,p=0,m=1,g=-2,_=-3,y=-5,v=-1,b=1,w=2,x=3,k=4,T=0,S=2,E=8,C=9,O=15,A=8,D=29,N=256,R=N+1+D,I=30,M=19,P=2*R+1,F=15,L=3,B=258,U=B+L+1,j=32,z=42,H=69,W=73,V=91,Y=103,G=113,Z=666,X=1,$=2,J=3,q=4,K=3;function Q(e,t){return e.msg=l[t],t}function ee(e){return(e<<1)-(e>4?9:0)}function te(e){var t=e.length;while(--t>=0)e[t]=0}function re(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(a.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function ne(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,re(e.strm)}function ae(e,t){e.pending_buf[e.pending++]=t}function ie(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function se(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,a.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=s(e.adler,t,i,r):2===e.state.wrap&&(e.adler=o(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function oe(e,t){var r,n,a=e.max_chain_length,i=e.strstart,s=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-U?e.strstart-(e.w_size-U):0,u=e.window,c=e.w_mask,h=e.prev,d=e.strstart+B,f=u[i+s-1],p=u[i+s];e.prev_length>=e.good_match&&(a>>=2),o>e.lookahead&&(o=e.lookahead);do{if(r=t,u[r+s]===p&&u[r+s-1]===f&&u[r]===u[i]&&u[++r]===u[i+1]){i+=2,r++;do{}while(u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&is){if(e.match_start=t,s=n,n>=o)break;f=u[i+s-1],p=u[i+s]}}}while((t=h[t&c])>l&&0!==--a);return s<=e.lookahead?s:e.lookahead}function le(e){var t,r,n,i,s,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-U)){a.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,r=e.hash_size,t=r;do{n=e.head[--t],e.head[t]=n>=o?n-o:0}while(--r);r=o,t=r;do{n=e.prev[--t],e.prev[t]=n>=o?n-o:0}while(--r);i+=o}if(0===e.strm.avail_in)break;if(r=se(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=L){s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(le(e),0===e.lookahead&&t===u)return X;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,ne(e,!1),0===e.strm.avail_out))return X;if(e.strstart-e.block_start>=e.w_size-U&&(ne(e,!1),0===e.strm.avail_out))return X}return e.insert=0,t===d?(ne(e,!0),0===e.strm.avail_out?J:q):(e.strstart>e.block_start&&(ne(e,!1),e.strm.avail_out),X)}function ce(e,t){for(var r,n;;){if(e.lookahead=L&&(e.ins_h=(e.ins_h<=L)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-L),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=L){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=L-1)),e.prev_length>=L&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-L,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-L),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<=L&&e.strstart>0&&(a=e.strstart-1,n=o[a],n===o[++a]&&n===o[++a]&&n===o[++a])){s=e.strstart+B;do{}while(n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&n===o[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=L?(r=i._tr_tally(e,1,e.match_length-L),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ne(e,!1),0===e.strm.avail_out))return X}return e.insert=0,t===d?(ne(e,!0),0===e.strm.avail_out?J:q):e.last_lit&&(ne(e,!1),0===e.strm.avail_out)?X:$}function fe(e,t){for(var r;;){if(0===e.lookahead&&(le(e),0===e.lookahead)){if(t===u)return X;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ne(e,!1),0===e.strm.avail_out))return X}return e.insert=0,t===d?(ne(e,!0),0===e.strm.avail_out?J:q):e.last_lit&&(ne(e,!1),0===e.strm.avail_out)?X:$}function pe(e,t,r,n,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=a}function me(e){e.window_size=2*e.w_size,te(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=L-1,e.match_available=0,e.ins_h=0}function ge(){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=E,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 a.Buf16(2*P),this.dyn_dtree=new a.Buf16(2*(2*I+1)),this.bl_tree=new a.Buf16(2*(2*M+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(F+1),this.heap=new a.Buf16(2*R+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*R+1),te(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 _e(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=S,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?z:G,e.adler=2===t.wrap?0:1,t.last_flush=u,i._tr_init(t),p):Q(e,g)}function ye(e){var t=_e(e);return t===p&&me(e.state),t}function ve(e,t){return e&&e.state?2!==e.state.wrap?g:(e.state.gzhead=t,p):g}function be(e,t,r,n,i,s){if(!e)return g;var o=1;if(t===v&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>C||r!==E||n<8||n>15||t<0||t>9||s<0||s>k)return Q(e,g);8===n&&(n=9);var l=new ge;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<f||t<0)return e?Q(e,g):g;if(a=e.state,!e.output||!e.input&&0!==e.avail_in||a.status===Z&&t!==d)return Q(e,0===e.avail_out?y:g);if(a.strm=e,r=a.last_flush,a.last_flush=t,a.status===z)if(2===a.wrap)e.adler=0,ae(a,31),ae(a,139),ae(a,8),a.gzhead?(ae(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),ae(a,255&a.gzhead.time),ae(a,a.gzhead.time>>8&255),ae(a,a.gzhead.time>>16&255),ae(a,a.gzhead.time>>24&255),ae(a,9===a.level?2:a.strategy>=w||a.level<2?4:0),ae(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(ae(a,255&a.gzhead.extra.length),ae(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=o(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=H):(ae(a,0),ae(a,0),ae(a,0),ae(a,0),ae(a,0),ae(a,9===a.level?2:a.strategy>=w||a.level<2?4:0),ae(a,K),a.status=G);else{var _=E+(a.w_bits-8<<4)<<8,v=-1;v=a.strategy>=w||a.level<2?0:a.level<6?1:6===a.level?2:3,_|=v<<6,0!==a.strstart&&(_|=j),_+=31-_%31,a.status=G,ie(a,_),0!==a.strstart&&(ie(a,e.adler>>>16),ie(a,65535&e.adler)),e.adler=1}if(a.status===H)if(a.gzhead.extra){s=a.pending;while(a.gzindex<(65535&a.gzhead.extra.length)){if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),re(e),s=a.pending,a.pending===a.pending_buf_size))break;ae(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++}a.gzhead.hcrc&&a.pending>s&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=W)}else a.status=W;if(a.status===W)if(a.gzhead.name){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),re(e),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.gzindex=0,a.status=V)}else a.status=V;if(a.status===V)if(a.gzhead.comment){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),re(e),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(e.adler=o(e.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.status=Y)}else a.status=Y;if(a.status===Y&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&re(e),a.pending+2<=a.pending_buf_size&&(ae(a,255&e.adler),ae(a,e.adler>>8&255),e.adler=0,a.status=G)):a.status=G),0!==a.pending){if(re(e),0===e.avail_out)return a.last_flush=-1,p}else if(0===e.avail_in&&ee(t)<=ee(r)&&t!==d)return Q(e,y);if(a.status===Z&&0!==e.avail_in)return Q(e,y);if(0!==e.avail_in||0!==a.lookahead||t!==u&&a.status!==Z){var b=a.strategy===w?fe(a,t):a.strategy===x?de(a,t):n[a.level].func(a,t);if(b!==J&&b!==q||(a.status=Z),b===X||b===J)return 0===e.avail_out&&(a.last_flush=-1),p;if(b===$&&(t===c?i._tr_align(a):t!==f&&(i._tr_stored_block(a,0,0,!1),t===h&&(te(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),re(e),0===e.avail_out))return a.last_flush=-1,p}return t!==d?p:a.wrap<=0?m:(2===a.wrap?(ae(a,255&e.adler),ae(a,e.adler>>8&255),ae(a,e.adler>>16&255),ae(a,e.adler>>24&255),ae(a,255&e.total_in),ae(a,e.total_in>>8&255),ae(a,e.total_in>>16&255),ae(a,e.total_in>>24&255)):(ie(a,e.adler>>>16),ie(a,65535&e.adler)),re(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?p:m)}function ke(e){var t;return e&&e.state?(t=e.state.status,t!==z&&t!==H&&t!==W&&t!==V&&t!==Y&&t!==G&&t!==Z?Q(e,g):(e.state=null,t===G?Q(e,_):p)):g}function Te(e,t){var r,n,i,o,l,u,c,h,d=t.length;if(!e||!e.state)return g;if(r=e.state,o=r.wrap,2===o||1===o&&r.status!==z||r.lookahead)return g;1===o&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(te(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new a.Buf8(r.w_size),a.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,le(r);while(r.lookahead>=L){n=r.strstart,i=r.lookahead-(L-1);do{r.ins_h=(r.ins_h<>>24,m>>>=x,g-=x,x=w>>>16&255,0===x)O[o++]=65535&w;else{if(!(16&x)){if(0===(64&x)){w=_[(65535&w)+(m&(1<>>=x,g-=x),g<15&&(m+=C[i++]<>>24,m>>>=x,g-=x,x=w>>>16&255,!(16&x)){if(0===(64&x)){w=y[(65535&w)+(m&(1<c){e.msg="invalid distance too far back",r.mode=n;break e}if(m>>>=x,g-=x,x=o-l,T>x){if(x=T-x,x>d&&r.sane){e.msg="invalid distance too far back",r.mode=n;break e}if(S=0,E=p,0===f){if(S+=h-x,x2)O[o++]=E[S++],O[o++]=E[S++],O[o++]=E[S++],k-=3;k&&(O[o++]=E[S++],k>1&&(O[o++]=E[S++]))}else{S=o-T;do{O[o++]=O[S++],O[o++]=O[S++],O[o++]=O[S++],k-=3}while(k>2);k&&(O[o++]=O[S++],k>1&&(O[o++]=O[S++]))}break}}break}}while(i>3,i-=k,g-=k<<3,m&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function se(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=x,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,p):_}function oe(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,se(e)):_}function le(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?_:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,oe(e))):_}function ue(e,t){var r,n;return e?(n=new ie,e.state=n,n.window=null,r=le(e,t),r!==p&&(e.state=null),r):_}function ce(e){return ue(e,ne)}var he,de,fe=!0;function pe(e){if(fe){var t;he=new n.Buf32(512),de=new n.Buf32(32),t=0;while(t<144)e.lens[t++]=8;while(t<256)e.lens[t++]=9;while(t<280)e.lens[t++]=7;while(t<288)e.lens[t++]=8;o(u,e.lens,0,288,he,0,e.work,{bits:9}),t=0;while(t<32)e.lens[t++]=5;o(c,e.lens,0,32,de,0,e.work,{bits:5}),fe=!1}e.lencode=he,e.lenbits=9,e.distcode=de,e.distbits=5}function me(e,t,r,a){var i,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>a&&(i=a),n.arraySet(s.window,t,r-a,i,s.wnext),a-=i,a?(n.arraySet(s.window,t,r-a,a,0),s.wnext=a,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=i(r.check,Ce,2,0),oe=0,le=0,r.mode=k;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&oe)<<8)+(oe>>8))%31){e.msg="incorrect header check",r.mode=q;break}if((15&oe)!==w){e.msg="unknown compression method",r.mode=q;break}if(oe>>>=4,le-=4,xe=8+(15&oe),0===r.wbits)r.wbits=xe;else if(xe>r.wbits){e.msg="invalid window size",r.mode=q;break}r.dmax=1<>8&1),512&r.flags&&(Ce[0]=255&oe,Ce[1]=oe>>>8&255,r.check=i(r.check,Ce,2,0)),oe=0,le=0,r.mode=T;case T:while(le<32){if(0===ie)break e;ie--,oe+=ee[re++]<>>8&255,Ce[2]=oe>>>16&255,Ce[3]=oe>>>24&255,r.check=i(r.check,Ce,4,0)),oe=0,le=0,r.mode=S;case S:while(le<16){if(0===ie)break e;ie--,oe+=ee[re++]<>8),512&r.flags&&(Ce[0]=255&oe,Ce[1]=oe>>>8&255,r.check=i(r.check,Ce,2,0)),oe=0,le=0,r.mode=E;case E:if(1024&r.flags){while(le<16){if(0===ie)break e;ie--,oe+=ee[re++]<>>8&255,r.check=i(r.check,Ce,2,0)),oe=0,le=0}else r.head&&(r.head.extra=null);r.mode=C;case C:if(1024&r.flags&&(he=r.length,he>ie&&(he=ie),he&&(r.head&&(xe=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,ee,re,he,xe)),512&r.flags&&(r.check=i(r.check,ee,he,re)),ie-=he,re+=he,r.length-=he),r.length))break e;r.length=0,r.mode=O;case O:if(2048&r.flags){if(0===ie)break e;he=0;do{xe=ee[re+he++],r.head&&xe&&r.length<65536&&(r.head.name+=String.fromCharCode(xe))}while(xe&&he>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=I;break;case N:while(le<32){if(0===ie)break e;ie--,oe+=ee[re++]<>>=7&le,le-=7&le,r.mode=X;break}while(le<3){if(0===ie)break e;ie--,oe+=ee[re++]<>>=1,le-=1,3&oe){case 0:r.mode=P;break;case 1:if(pe(r),r.mode=z,t===f){oe>>>=2,le-=2;break e}break;case 2:r.mode=B;break;case 3:e.msg="invalid block type",r.mode=q}oe>>>=2,le-=2;break;case P:oe>>>=7&le,le-=7≤while(le<32){if(0===ie)break e;ie--,oe+=ee[re++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=q;break}if(r.length=65535&oe,oe=0,le=0,r.mode=F,t===f)break e;case F:r.mode=L;case L:if(he=r.length,he){if(he>ie&&(he=ie),he>se&&(he=se),0===he)break e;n.arraySet(te,ee,re,he,ne),ie-=he,re+=he,se-=he,ne+=he,r.length-=he;break}r.mode=I;break;case B:while(le<14){if(0===ie)break e;ie--,oe+=ee[re++]<>>=5,le-=5,r.ndist=1+(31&oe),oe>>>=5,le-=5,r.ncode=4+(15&oe),oe>>>=4,le-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=q;break}r.have=0,r.mode=U;case U:while(r.have>>=3,le-=3}while(r.have<19)r.lens[Oe[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Te={bits:r.lenbits},ke=o(l,r.lens,0,19,r.lencode,0,r.work,Te),r.lenbits=Te.bits,ke){e.msg="invalid code lengths set",r.mode=q;break}r.have=0,r.mode=j;case j:while(r.have>>24,_e=Ee>>>16&255,ye=65535&Ee,ge<=le)break;if(0===ie)break e;ie--,oe+=ee[re++]<>>=ge,le-=ge,r.lens[r.have++]=ye;else{if(16===ye){Se=ge+2;while(le>>=ge,le-=ge,0===r.have){e.msg="invalid bit length repeat",r.mode=q;break}xe=r.lens[r.have-1],he=3+(3&oe),oe>>>=2,le-=2}else if(17===ye){Se=ge+3;while(le>>=ge,le-=ge,xe=0,he=3+(7&oe),oe>>>=3,le-=3}else{Se=ge+7;while(le>>=ge,le-=ge,xe=0,he=11+(127&oe),oe>>>=7,le-=7}if(r.have+he>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=q;break}while(he--)r.lens[r.have++]=xe}}if(r.mode===q)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=q;break}if(r.lenbits=9,Te={bits:r.lenbits},ke=o(u,r.lens,0,r.nlen,r.lencode,0,r.work,Te),r.lenbits=Te.bits,ke){e.msg="invalid literal/lengths set",r.mode=q;break}if(r.distbits=6,r.distcode=r.distdyn,Te={bits:r.distbits},ke=o(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Te),r.distbits=Te.bits,ke){e.msg="invalid distances set",r.mode=q;break}if(r.mode=z,t===f)break e;case z:r.mode=H;case H:if(ie>=6&&se>=258){e.next_out=ne,e.avail_out=se,e.next_in=re,e.avail_in=ie,r.hold=oe,r.bits=le,s(e,ce),ne=e.next_out,te=e.output,se=e.avail_out,re=e.next_in,ee=e.input,ie=e.avail_in,oe=r.hold,le=r.bits,r.mode===I&&(r.back=-1);break}for(r.back=0;;){if(Ee=r.lencode[oe&(1<>>24,_e=Ee>>>16&255,ye=65535&Ee,ge<=le)break;if(0===ie)break e;ie--,oe+=ee[re++]<>ve)],ge=Ee>>>24,_e=Ee>>>16&255,ye=65535&Ee,ve+ge<=le)break;if(0===ie)break e;ie--,oe+=ee[re++]<>>=ve,le-=ve,r.back+=ve}if(oe>>>=ge,le-=ge,r.back+=ge,r.length=ye,0===_e){r.mode=Z;break}if(32&_e){r.back=-1,r.mode=I;break}if(64&_e){e.msg="invalid literal/length code",r.mode=q;break}r.extra=15&_e,r.mode=W;case W:if(r.extra){Se=r.extra;while(le>>=r.extra,le-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=V;case V:for(;;){if(Ee=r.distcode[oe&(1<>>24,_e=Ee>>>16&255,ye=65535&Ee,ge<=le)break;if(0===ie)break e;ie--,oe+=ee[re++]<>ve)],ge=Ee>>>24,_e=Ee>>>16&255,ye=65535&Ee,ve+ge<=le)break;if(0===ie)break e;ie--,oe+=ee[re++]<>>=ve,le-=ve,r.back+=ve}if(oe>>>=ge,le-=ge,r.back+=ge,64&_e){e.msg="invalid distance code",r.mode=q;break}r.offset=ye,r.extra=15&_e,r.mode=Y;case Y:if(r.extra){Se=r.extra;while(le>>=r.extra,le-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=q;break}r.mode=G;case G:if(0===se)break e;if(he=ce-se,r.offset>he){if(he=r.offset-he,he>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=q;break}he>r.wnext?(he-=r.wnext,de=r.wsize-he):de=r.wnext-he,he>r.length&&(he=r.length),fe=r.window}else fe=te,de=ne-r.offset,he=r.length;he>se&&(he=se),se-=he,r.length-=he;do{te[ne++]=fe[de++]}while(--he);0===r.length&&(r.mode=H);break;case Z:if(0===se)break e;te[ne++]=r.length,se--,r.mode=H;break;case X:if(r.wrap){while(le<32){if(0===ie)break e;ie--,oe|=ee[re++]<=1;R--)if(0!==z[R])break;if(I>R&&(I=R),0===R)return m[g++]=20971520,m[g++]=20971520,y.bits=1,0;for(N=1;N0&&(e===o||1!==R))return-1;for(H[1]=0,A=1;Ai||e===u&&L>s)return 1;for(;;){S=A-P,_[D]T?(E=W[V+_[D]],C=U[j+_[D]]):(E=96,C=0),v=1<>P)+b]=S<<24|E<<16|C|0}while(0!==b);v=1<>=1;if(0!==v?(B&=v-1,B+=v):B=0,D++,0===--z[A]){if(A===R)break;A=t[r+_[D]]}if(A>I&&(B&x)!==w){0===P&&(P=I),k+=N,M=A-P,F=1<i||e===u&&L>s)return 1;w=B&x,m[w]=I<<24|M<<16|k-g|0}}return 0!==B&&(m[k+B]=A-P<<24|64<<16|0),y.bits=I,0}},{"../utils/common":184}],194:[function(e,t,r){"use strict";t.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"}},{}],195:[function(e,t,r){"use strict";var n=e("../utils/common"),a=4,i=0,s=1,o=2;function l(e){var t=e.length;while(--t>=0)e[t]=0}var u=0,c=1,h=2,d=3,f=258,p=29,m=256,g=m+1+p,_=30,y=19,v=2*g+1,b=15,w=16,x=7,k=256,T=16,S=17,E=18,C=[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],O=[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],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=512,R=new Array(2*(g+2));l(R);var I=new Array(2*_);l(I);var M=new Array(N);l(M);var P=new Array(f-d+1);l(P);var F=new Array(p);l(F);var L,B,U,j=new Array(_);function z(e,t,r,n,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=a,this.has_stree=e&&e.length}function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function W(e){return e<256?M[e]:M[256+(e>>>7)]}function V(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Y(e,t,r){e.bi_valid>w-r?(e.bi_buf|=t<>w-e.bi_valid,e.bi_valid+=r-w):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function X(e){16===e.bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function $(e,t){var r,n,a,i,s,o,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(i=0;i<=b;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(i=p,m++),l[2*n+1]=i,n>u||(e.bl_count[i]++,s=0,n>=f&&(s=d[n-f]),o=l[2*n],e.opt_len+=o*(i+s),h&&(e.static_len+=o*(c[2*n+1]+s)));if(0!==m){do{i=p-1;while(0===e.bl_count[i])i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(i=p;0!==i;i--){n=e.bl_count[i];while(0!==n)a=e.heap[--r],a>u||(l[2*a+1]!==i&&(e.opt_len+=(i-l[2*a+1])*l[2*a],l[2*a+1]=i),n--)}}}function J(e,t,r){var n,a,i=new Array(b+1),s=0;for(n=1;n<=b;n++)i[n]=s=s+r[n-1]<<1;for(a=0;a<=t;a++){var o=e[2*a+1];0!==o&&(e[2*a]=Z(i[o]++,o))}}function q(){var e,t,r,n,a,i=new Array(b+1);for(r=0,n=0;n>=7;n<_;n++)for(j[n]=a<<7,e=0;e<1<8?V(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ee(e,t,r,a){Q(e),a&&(V(e,r),V(e,~r)),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function te(e,t,r,n){var a=2*t,i=2*r;return e[a]>1;r>=1;r--)re(e,i,r);a=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],re(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*a]=i[2*r]+i[2*n],e.depth[a]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=a,e.heap[1]=a++,re(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],$(e,t),J(i,u,e.bl_count)}function ie(e,t,r){var n,a,i=-1,s=t[1],o=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)a=s,s=t[2*(n+1)+1],++o=3;t--)if(0!==e.bl_tree[2*D[t]+1])break;return e.opt_len+=3*(t+1)+5+5+4,t}function le(e,t,r,n){var a;for(Y(e,t-257,5),Y(e,r-1,5),Y(e,n-4,4),a=0;a>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t0?(e.strm.data_type===o&&(e.strm.data_type=ue(e)),ae(e,e.l_desc),ae(e,e.d_desc),l=oe(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?de(e,t,r,n):e.strategy===a||s===i?(Y(e,(c<<1)+(n?1:0),3),ne(e,R,I)):(Y(e,(h<<1)+(n?1:0),3),le(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),ne(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&Q(e)}function me(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(P[r]+m+1)]++,e.dyn_dtree[2*W(t)]++),e.last_lit===e.lit_bufsize-1}r._tr_init=he,r._tr_stored_block=de,r._tr_flush_block=pe,r._tr_tally=me,r._tr_align=fe},{"../utils/common":184}],196:[function(e,t,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],197:[function(e,t,r){(function(e){"use strict";function r(t,r,n,a){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,a)}));default:i=new Array(o-1),s=0;while(s1)for(var r=1;r1))return r.resolve(e[0]);a=r.resolve(e[i++])}while(i=t&&r(a)})).catch((function(r){i.push(r),i.length>e.length-t&&n(i)}))}))}))}},{key:"any",value:function(e){return r.some(e,1).then((function(e){return e[0]}))}},{key:"defer",value:function(){var e={};return e.promise=new r((function(t,r){e.resolve=t,e.reject=r})),e}},{key:"spread",value:function(e,t){return t.apply(void 0,e)}}]),r}(e);return r}t.exports=o},{}],200:[function(e,t,r){"use strict";var n=e("es6-promise").Promise,a=e("./promish-class");t.exports=a(n)},{"./promish-class":199,"es6-promise":122}],201:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":202}],202:[function(e,t,r){"use strict";var n=e("process-nextick-args"),a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=h;var i=e("core-util-is");i.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");i.inherits(h,s);for(var l=a(o.prototype),u=0;u0?("string"===typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=h(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):T(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):I(e,s)):T(e,s,t,!1))):n||(s.reading=!1));return E(s)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&N(e)),I(e,t)}function S(e,t){var r;return d(t)||"string"===typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function E(e){return!e.ended&&(e.needReadable||e.length=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=O(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function D(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,N(e)}}function N(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?a.nextTick(R,e):R(e))}function R(e){m("emit readable"),e.emit("readable"),U(e)}function I(e,t){t.readingMore||(t.readingMore=!0,a.nextTick(M,e,t))}function M(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=z(e,t.buffer,t.decoder),r);var r}function z(e,t,r){var n;return ei.length?i.length:e;if(s===i.length?a+=i:a+=i.slice(0,e),e-=s,0===e){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,a}function W(e,t){var r=u.allocUnsafe(e),n=t.head,a=1;n.data.copy(r),e-=n.data.length;while(n=n.next){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),e-=s,0===e){s===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++a}return t.length-=a,r}function V(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,a.nextTick(Y,t,e))}function Y(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function G(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return m("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):N(this),null;if(e=A(e,t),0===e&&t.ended)return 0===t.length&&V(this),null;var n,a=t.needReadable;return m("need readable",a),(0===t.length||t.length-e0?j(e,t):null,null===n?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&V(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,r){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,m("pipe count=%d opts=%j",i.pipesCount,r);var s=(!r||!1!==r.end)&&e!==t.stdout&&e!==t.stderr,l=s?c:w;function u(e,t){m("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function c(){m("onend"),e.end()}i.endEmitted?a.nextTick(l):n.once("end",l),e.on("unpipe",u);var h=P(n);e.on("drain",h);var d=!1;function f(){m("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",_),e.removeListener("unpipe",u),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",g),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h()}var p=!1;function g(t){m("ondata"),p=!1;var r=e.write(t);!1!==r||p||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==G(i.pipes,e))&&!d&&(m("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function _(t){m("onerror",t),w(),e.removeListener("error",_),0===o(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),w()}function v(){m("onfinish"),e.removeListener("close",y),w()}function w(){m("unpipe"),n.unpipe(e)}return n.on("data",g),b(e,"error",_),e.once("close",y),e.once("finish",v),e.emit("pipe",n),i.flowing||(m("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?a:i.nextTick;b.WritableState=v;var u=e("core-util-is");u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,f=n.Uint8Array||function(){};function p(e){return d.from(e)}function m(e){return d.isBuffer(e)||e instanceof f}var g,_=e("./internal/streams/destroy");function y(){}function v(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var a=t.highWaterMark,i=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:n&&(i||0===i)?i:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===t.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){O(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(o=o||e("./_stream_duplex"),!g.call(b,this)&&!(this instanceof o))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),h.call(this)}function w(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}function x(e,t,r,n){var a=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(n,s),a=!1),a}function k(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=d.from(t,r)),t}function T(e,t,r,n,a,i){if(!r){var s=k(t,n,a);n!==s&&(r=!0,a="buffer",n=s)}var o=t.objectMode?1:n.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||F(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=_.destroy,b.prototype._undestroy=_.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":202,"./internal/streams/destroy":208,"./internal/streams/stream":209,_process:198,"core-util-is":118,inherits:138,"process-nextick-args":197,"safe-buffer":214,timers:219,"util-deprecate":220}],207:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=e("safe-buffer").Buffer,i=e("util");function s(e,t,r){e.copy(t,r)}t.exports=function(){function e(){n(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";var t=this.head,r=""+t.data;while(t=t.next)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;var t=a.allocUnsafe(e>>>0),r=this.head,n=0;while(r)s(r.data,t,n),n+=r.data.length,r=r.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":214,util:94}],208:[function(e,t,r){"use strict";var n=e("process-nextick-args");function a(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return a||i?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(e,t){e.emit("error",t)}t.exports={destroy:a,undestroy:i}},{"process-nextick-args":197}],209:[function(e,t,r){t.exports=e("events").EventEmitter},{events:123}],210:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":211}],211:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":202,"./lib/_stream_passthrough.js":203,"./lib/_stream_readable.js":204,"./lib/_stream_transform.js":205,"./lib/_stream_writable.js":206}],212:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":211}],213:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":206}],214:[function(e,t,r){var n=e("buffer"),a=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=s),i(a,s),s.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return a(e,t,r)},s.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=a(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:96}],215:[function(e,t,r){(function(t){(function(r){r.parser=function(e,t){return new i(e,t)},r.SAXParser=i,r.SAXStream=h,r.createStream=c,r.MAX_BUFFER_LENGTH=65536;var n,a=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,t){if(!(this instanceof i))return new i(e,t);var n=this;o(n),n.q=n.c="",n.bufferCheckPosition=r.MAX_BUFFER_LENGTH,n.opt=t||{},n.opt.lowercase=n.opt.lowercase||n.opt.lowercasetags,n.looseCase=n.opt.lowercase?"toLowerCase":"toUpperCase",n.tags=[],n.closed=n.closedRoot=n.sawRoot=!1,n.tag=n.error=null,n.strict=!!e,n.noscript=!(!e&&!n.opt.noscript),n.state=E.BEGIN,n.strictEntities=n.opt.strictEntities,n.ENTITIES=n.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),n.attribList=[],n.opt.xmlns&&(n.ns=Object.create(g)),n.trackPosition=!1!==n.opt.position,n.trackPosition&&(n.position=n.line=n.column=0),O(n,"onready")}function s(e){for(var t=Math.max(r.MAX_BUFFER_LENGTH,10),n=0,i=0,s=a.length;it)switch(a[i]){case"textNode":D(e);break;case"cdata":A(e,"oncdata",e.cdata),e.cdata="";break;case"script":A(e,"onscript",e.script),e.script="";break;default:R(e,"Max buffer length exceeded: "+a[i])}n=Math.max(n,o)}var l=r.MAX_BUFFER_LENGTH-n;e.bufferCheckPosition=l+e.position}function o(e){for(var t=0,r=a.length;t"===e||w(e)}function T(e,t){return e.test(t)}function S(e,t){return!T(e,t)}var E=0;for(var C in r.STATE={BEGIN:E++,BEGIN_WHITESPACE:E++,TEXT:E++,TEXT_ENTITY:E++,OPEN_WAKA:E++,SGML_DECL:E++,SGML_DECL_QUOTED:E++,DOCTYPE:E++,DOCTYPE_QUOTED:E++,DOCTYPE_DTD:E++,DOCTYPE_DTD_QUOTED:E++,COMMENT_STARTING:E++,COMMENT:E++,COMMENT_ENDING:E++,COMMENT_ENDED:E++,CDATA:E++,CDATA_ENDING:E++,CDATA_ENDING_2:E++,PROC_INST:E++,PROC_INST_BODY:E++,PROC_INST_ENDING:E++,OPEN_TAG:E++,OPEN_TAG_SLASH:E++,ATTRIB:E++,ATTRIB_NAME:E++,ATTRIB_NAME_SAW_WHITE:E++,ATTRIB_VALUE:E++,ATTRIB_VALUE_QUOTED:E++,ATTRIB_VALUE_CLOSED:E++,ATTRIB_VALUE_UNQUOTED:E++,ATTRIB_VALUE_ENTITY_Q:E++,ATTRIB_VALUE_ENTITY_U:E++,CLOSE_TAG:E++,CLOSE_TAG_SAW_WHITE:E++,SCRIPT:E++,SCRIPT_ENDING:E++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach((function(e){var t=r.ENTITIES[e],n="number"===typeof t?String.fromCharCode(t):t;r.ENTITIES[e]=n})),r.STATE)r.STATE[r.STATE[C]]=C;function O(e,t,r){e[t]&&e[t](r)}function A(e,t,r){e.textNode&&D(e),O(e,t,r)}function D(e){e.textNode=N(e.opt,e.textNode),e.textNode&&O(e,"ontext",e.textNode),e.textNode=""}function N(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return D(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,O(e,"onerror",t),e}function I(e){return e.sawRoot&&!e.closedRoot&&M(e,"Unclosed root tag"),e.state!==E.BEGIN&&e.state!==E.BEGIN_WHITESPACE&&e.state!==E.TEXT&&R(e,"Unexpected end"),D(e),e.c="",e.closed=!0,O(e,"onend"),i.call(e,e.strict,e.opt),e}function M(e,t){if("object"!==typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function P(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,A(e,"onopentagstart",r)}function F(e,t){var r=e.indexOf(":"),n=r<0?["",e]:e.split(":"),a=n[0],i=n[1];return t&&"xmlns"===e&&(a="xmlns",i=""),{prefix:a,local:i}}function L(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=F(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==p)M(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==m)M(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var a=e.tag,i=e.tags[e.tags.length-1]||e;a.ns===i.ns&&(a.ns=Object.create(i.ns)),a.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,A(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function B(e,t){if(e.opt.xmlns){var r=e.tag,n=F(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(M(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var a=e.tags[e.tags.length-1]||e;r.ns&&a.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){A(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var i=0,s=e.attribList.length;i",e.tagName="",void(e.state=E.SCRIPT);A(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());var n=r;while(t--){var a=e.tags[t];if(a.name===n)break;M(e,"Unexpected close tag")}if(t<0)return M(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=E.TEXT);e.tagName=r;var i=e.tags.length;while(i-- >t){var s=e.tag=e.tags.pop();e.tagName=e.tag.name,A(e,"onclosetag",e.tagName);var o={};for(var l in s.ns)o[l]=s.ns[l];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&s.ns!==u.ns&&Object.keys(s.ns).forEach((function(t){var r=s.ns[t];A(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=E.TEXT}function j(e){var t,r=e.entity,n=r.toLowerCase(),a="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:(r=n,"#"===r.charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),t=parseInt(r,16),a=t.toString(16)):(r=r.slice(1),t=parseInt(r,10),a=t.toString(10))),r=r.replace(/^0+/,""),isNaN(t)||a.toLowerCase()!==r?(M(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function z(e,t){"<"===t?(e.state=E.OPEN_WAKA,e.startTagPosition=e.position):w(t)||(M(e,"Non-whitespace before first tag."),e.textNode=t,e.state=E.TEXT)}function H(e,t){var r="";return t"===n?(A(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=E.TEXT):x(n)?(t.state=E.SGML_DECL_QUOTED,t.sgmlDecl+=n):t.sgmlDecl+=n;continue;case E.SGML_DECL_QUOTED:n===t.q&&(t.state=E.SGML_DECL,t.q=""),t.sgmlDecl+=n;continue;case E.DOCTYPE:">"===n?(t.state=E.TEXT,A(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=n,"["===n?t.state=E.DOCTYPE_DTD:x(n)&&(t.state=E.DOCTYPE_QUOTED,t.q=n));continue;case E.DOCTYPE_QUOTED:t.doctype+=n,n===t.q&&(t.q="",t.state=E.DOCTYPE);continue;case E.DOCTYPE_DTD:t.doctype+=n,"]"===n?t.state=E.DOCTYPE:x(n)&&(t.state=E.DOCTYPE_DTD_QUOTED,t.q=n);continue;case E.DOCTYPE_DTD_QUOTED:t.doctype+=n,n===t.q&&(t.state=E.DOCTYPE_DTD,t.q="");continue;case E.COMMENT:"-"===n?t.state=E.COMMENT_ENDING:t.comment+=n;continue;case E.COMMENT_ENDING:"-"===n?(t.state=E.COMMENT_ENDED,t.comment=N(t.opt,t.comment),t.comment&&A(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+n,t.state=E.COMMENT);continue;case E.COMMENT_ENDED:">"!==n?(M(t,"Malformed comment"),t.comment+="--"+n,t.state=E.COMMENT):t.state=E.TEXT;continue;case E.CDATA:"]"===n?t.state=E.CDATA_ENDING:t.cdata+=n;continue;case E.CDATA_ENDING:"]"===n?t.state=E.CDATA_ENDING_2:(t.cdata+="]"+n,t.state=E.CDATA);continue;case E.CDATA_ENDING_2:">"===n?(t.cdata&&A(t,"oncdata",t.cdata),A(t,"onclosecdata"),t.cdata="",t.state=E.TEXT):"]"===n?t.cdata+="]":(t.cdata+="]]"+n,t.state=E.CDATA);continue;case E.PROC_INST:"?"===n?t.state=E.PROC_INST_ENDING:w(n)?t.state=E.PROC_INST_BODY:t.procInstName+=n;continue;case E.PROC_INST_BODY:if(!t.procInstBody&&w(n))continue;"?"===n?t.state=E.PROC_INST_ENDING:t.procInstBody+=n;continue;case E.PROC_INST_ENDING:">"===n?(A(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=E.TEXT):(t.procInstBody+="?"+n,t.state=E.PROC_INST_BODY);continue;case E.OPEN_TAG:T(y,n)?t.tagName+=n:(P(t),">"===n?B(t):"/"===n?t.state=E.OPEN_TAG_SLASH:(w(n)||M(t,"Invalid character in tag name"),t.state=E.ATTRIB));continue;case E.OPEN_TAG_SLASH:">"===n?(B(t,!0),U(t)):(M(t,"Forward-slash in opening tag not followed by >"),t.state=E.ATTRIB);continue;case E.ATTRIB:if(w(n))continue;">"===n?B(t):"/"===n?t.state=E.OPEN_TAG_SLASH:T(_,n)?(t.attribName=n,t.attribValue="",t.state=E.ATTRIB_NAME):M(t,"Invalid attribute name");continue;case E.ATTRIB_NAME:"="===n?t.state=E.ATTRIB_VALUE:">"===n?(M(t,"Attribute without value"),t.attribValue=t.attribName,L(t),B(t)):w(n)?t.state=E.ATTRIB_NAME_SAW_WHITE:T(y,n)?t.attribName+=n:M(t,"Invalid attribute name");continue;case E.ATTRIB_NAME_SAW_WHITE:if("="===n)t.state=E.ATTRIB_VALUE;else{if(w(n))continue;M(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",A(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===n?B(t):T(_,n)?(t.attribName=n,t.state=E.ATTRIB_NAME):(M(t,"Invalid attribute name"),t.state=E.ATTRIB)}continue;case E.ATTRIB_VALUE:if(w(n))continue;x(n)?(t.q=n,t.state=E.ATTRIB_VALUE_QUOTED):(M(t,"Unquoted attribute value"),t.state=E.ATTRIB_VALUE_UNQUOTED,t.attribValue=n);continue;case E.ATTRIB_VALUE_QUOTED:if(n!==t.q){"&"===n?t.state=E.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=n;continue}L(t),t.q="",t.state=E.ATTRIB_VALUE_CLOSED;continue;case E.ATTRIB_VALUE_CLOSED:w(n)?t.state=E.ATTRIB:">"===n?B(t):"/"===n?t.state=E.OPEN_TAG_SLASH:T(_,n)?(M(t,"No whitespace between attributes"),t.attribName=n,t.attribValue="",t.state=E.ATTRIB_NAME):M(t,"Invalid attribute name");continue;case E.ATTRIB_VALUE_UNQUOTED:if(!k(n)){"&"===n?t.state=E.ATTRIB_VALUE_ENTITY_U:t.attribValue+=n;continue}L(t),">"===n?B(t):t.state=E.ATTRIB;continue;case E.CLOSE_TAG:if(t.tagName)">"===n?U(t):T(y,n)?t.tagName+=n:t.script?(t.script+=""===n?U(t):M(t,"Invalid characters in closing tag");continue;case E.TEXT_ENTITY:case E.ATTRIB_VALUE_ENTITY_Q:case E.ATTRIB_VALUE_ENTITY_U:var o,l;switch(t.state){case E.TEXT_ENTITY:o=E.TEXT,l="textNode";break;case E.ATTRIB_VALUE_ENTITY_Q:o=E.ATTRIB_VALUE_QUOTED,l="attribValue";break;case E.ATTRIB_VALUE_ENTITY_U:o=E.ATTRIB_VALUE_UNQUOTED,l="attribValue";break}";"===n?(t[l]+=j(t),t.entity="",t.state=o):T(t.entity.length?b:v,n)?t.entity+=n:(M(t,"Invalid character in entity name"),t[l]+="&"+t.entity+n,t.entity="",t.state=o);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&s(t),t}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */E=r.STATE,String.fromCodePoint||function(){var e=String.fromCharCode,t=Math.floor,r=function(){var r,n,a=16384,i=[],s=-1,o=arguments.length;if(!o)return"";var l="";while(++s1114111||t(u)!==u)throw RangeError("Invalid code point: "+u);u<=65535?i.push(u):(u-=65536,r=55296+(u>>10),n=u%1024+56320,i.push(r,n)),(s+1===o||i.length>a)&&(l+=e.apply(null,i),i.length=0)}return l};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:r,configurable:!0,writable:!0}):String.fromCodePoint=r}()})("undefined"===typeof r?this.sax={}:r)}).call(this,e("buffer").Buffer)},{buffer:96,stream:216,string_decoder:218}],216:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter,a=e("inherits");function i(){n.call(this)}a(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function a(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",a),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",o),r.on("close",l));var s=!1;function o(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"===typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",a),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},{events:123,inherits:138,"readable-stream/duplex.js":201,"readable-stream/passthrough.js":210,"readable-stream/readable.js":211,"readable-stream/transform.js":212,"readable-stream/writable.js":213}],217:[function(t,r,n){(function(){"use strict";function a(e,t,r,n){var a;"undefined"===typeof JSON?function(){function e(e){return e<10?"0"+e:e}var r=t.tester().isString().isNumber().isBoolean().tester();function n(n){return t.isDate(n)?isFinite(n.valueOf())?n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"Z":null:r(n)?n.valueOf():n}var i,s,o,l=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function c(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,(function(e){var t=u[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function h(e,t){var r,a,l,u,d,f=i,p=t[e];switch(p&&(p=n(p)),"function"===typeof o&&(p=o.call(t,e,p)),typeof p){case"string":return c(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=s,d=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,r=0;r0?"+":"")+n),l&&(l=parseInt(l,10),n=n.lengthr)if(n){var i=e.length;a=e.substring(i-r,i)}else a=e.substring(0,r)}else a=_(""+a,r);return a}function y(e,n){if(n instanceof Array){var u=0,c=n.length;return e.replace(o,(function(e,t,i){var s,o;if(!(u0?r=e.replace(/\s+/g,"").split(t):r.push(e)),r}function b(e,t){var r=[];if(t)for(var n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function u(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0))}function c(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�"}}function h(e){var t=this.lastTotal-this.lastNeed,r=c(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function _(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"===typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,a((function(){o[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"===typeof n?n:function(e){delete o[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":198,timers:219}],220:[function(e,r,n){(function(e){function t(e,t){if(n("noDeprecation"))return e;var r=!1;function a(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return a}function n(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}r.exports=t}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],221:[function(e,t,r){t.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},{}],222:[function(e,r,n){(function(t,r){var a=/%[sdj%]/g;n.format=function(e){if(!x(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}})),l=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(t)?r.showHidden=t:t&&n._extend(r,t),T(r.showHidden)&&(r.showHidden=!1),T(r.depth)&&(r.depth=2),T(r.colors)&&(r.colors=!1),T(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),h(r,e,r.depth)}function l(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function u(e,t){return e}function c(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}function h(e,t,r){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var a=t.inspect(r,e);return x(a)||(a=h(e,a,r)),a}var i=d(e,t);if(i)return i;var s=Object.keys(t),o=c(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),O(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(t);if(0===s.length){if(A(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(O(t))return f(t)}var u,y="",v=!1,b=["{","}"];if(_(t)&&(v=!0,b=["[","]"]),A(t)){var w=t.name?": "+t.name:"";y=" [Function"+w+"]"}return S(t)&&(y=" "+RegExp.prototype.toString.call(t)),C(t)&&(y=" "+Date.prototype.toUTCString.call(t)),O(t)&&(y=" "+f(t)),0!==s.length||v&&0!=t.length?r<0?S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=v?p(e,t,r,o,s):s.map((function(n){return m(e,t,r,o,n,v)})),e.seen.pop(),g(u,y,b)):b[0]+y+b[1]}function d(e,t){if(T(t))return e.stylize("undefined","undefined");if(x(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return w(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,a){for(var i=[],s=0,o=t.length;s-1&&(o=i?o.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+o.split("\n").map((function(e){return" "+e})).join("\n"))):o=e.stylize("[Circular]","special")),T(s)){if(i&&a.match(/^\d+$/))return o;s=JSON.stringify(""+a),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function g(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function _(e){return Array.isArray(e)}function y(e){return"boolean"===typeof e}function v(e){return null===e}function b(e){return null==e}function w(e){return"number"===typeof e}function x(e){return"string"===typeof e}function k(e){return"symbol"===typeof e}function T(e){return void 0===e}function S(e){return E(e)&&"[object RegExp]"===N(e)}function E(e){return"object"===typeof e&&null!==e}function C(e){return E(e)&&"[object Date]"===N(e)}function O(e){return E(e)&&("[object Error]"===N(e)||e instanceof Error)}function A(e){return"function"===typeof e}function D(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function N(e){return Object.prototype.toString.call(e)}function R(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(T(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=t.pid;s[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else s[e]=function(){};return s[e]},n.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=_,n.isBoolean=y,n.isNull=v,n.isNullOrUndefined=b,n.isNumber=w,n.isString=x,n.isSymbol=k,n.isUndefined=T,n.isRegExp=S,n.isObject=E,n.isDate=C,n.isError=O,n.isFunction=A,n.isPrimitive=D,n.isBuffer=e("./support/isBuffer");var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(){var e=new Date,t=[R(e.getHours()),R(e.getMinutes()),R(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",M(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!E(t))return e;var r=Object.keys(t),n=r.length;while(n--)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./support/isBuffer":221,_process:198,inherits:138}]},{},[13])(13)}))}).call(this,r("c8ba"))},"294b":function(e,t,r){(function(t){r("ac1f"),r("5319");var n="object"===typeof window&&window.window===window?window:"object"===typeof self&&self.self===self?self:"object"===typeof t&&t.global===t?t:this;function a(e,t){return"undefined"===typeof t?t={autoBom:!1}:"object"!==typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}function i(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function s(e){var t=new XMLHttpRequest;return t.open("HEAD",e,!1),t.send(),t.status>=200&&t.status<=299}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var l=n.saveAs||("object"!==typeof window||window!==n?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,r){var a=n.URL||n.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"===typeof e?(l.href=e,l.origin!==location.origin?s(l.href)?i(e,t,r):o(l,l.target="_blank"):o(l)):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"===typeof e)if(s(e))i(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout((function(){o(n)}))}else navigator.msSaveOrOpenBlob(a(e,r),t)}:function(e,t,r,a){if(a=a||open("","_blank"),a&&(a.document.title=a.document.body.innerText="downloading..."),"string"===typeof e)return i(e,t,r);var s="application/octet-stream"===e.type,o=/constructor/i.test(n.HTMLElement)||n.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&o)&&"object"===typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var c=n.URL||n.webkitURL,h=c.createObjectURL(e);a?a.location=h:location.href=h,a=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});n.saveAs=l.saveAs=l,e.exports=l}).call(this,r("c8ba"))},"56d7":function(e,t,r){"use strict";r.r(t);var n=r("2b0e"),a=r("a7fe"),i=r.n(a),s=r("bc3a"),o=r.n(s);switch("production"){case"development":o.a.defaults.baseURL="http://192.168.76.112//_api_server_vue/index.php";break;case"production":o.a.defaults.baseURL="http://192.168.76.100:81//_api_server_vue/index.php";break}o.a.defaults.method="POST",o.a.defaults.headers.common["Authorization"]="*",n["a"].use(i.a,o.a);var l=r("7496"),u=r("f6c4"),c=function(){var e=this,t=e._self._c;return t(l["a"],[t(u["a"],[t("router-view")],1)],1)},h=[],d={name:"App",data:()=>({}),mounted(){}},f=d,p=(r("e686"),r("2877")),m=Object(p["a"])(f,c,h,!1,null,null,null),g=m.exports,_=r("2f62"),y=(r("4d63"),r("ac1f"),r("5319"),r("f2ef"));function v(e,t){let r=[];return"expand"===t&&r.push({text:"",value:"data-table-expand",divider:!0}),y["a"].each(y["a"].keys(y["a"].first(e)),(function(e){r.push({text:e,value:e})})),r}function b(e,t){const r=7.5;var n=document.createElement("canvas"),a=n.getContext("2d");if(a){var i=[];e.eachRow((function(e,r){re.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.stat=t},set_data_info(e,t){e.data.statInfo=t,e.data.headers=v(e.data.statInfo)},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(w)))}},actions:{addData(e,t){return o()({data:{params:{flag:"statAdd",data:t}}}).then(()=>{}).catch(e=>{console.log(e)}).finally(()=>{})},getData(e){return e.commit("set_loading",!0),o()({data:{params:{flag:"statGet"}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})},getDataInfo(e,t){return e.commit("set_loading",!0),o()({data:{params:{flag:"statGetInfo",data:t}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data_info",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const T={services:{all:[],filter:[],count:[],current:[],default:[],id:1},departments:{all:[],current:[],default:[],count:[],show_all:!1},crews:{all:[],current:[],default:[],count:[],show_all:!1},persons:{all:[],current:[],count:[],show_all:!1},defaultFilters:{service:1,department:1,crew:1},filters:[],loading:!1},S=JSON.parse(JSON.stringify(T));var E={namespaced:!0,state:S,getters:{services:e=>(y["a"].each(e.services.all,(function(t,r){e.services.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.services.count,t.SERVICE))[0])?y["a"].extend(e.services.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.services.all[r],{COUNT:y["a"].values(y["a"].pick(e.services.count,t.SERVICE))[0]})})),e.services),departments:e=>e.departments,crews:e=>e.crews,persons:e=>e.persons,loading:e=>e.loading},mutations:{set_services(e,t){e.services.id=e.filters.service,e.services.all=t,e.services.default=y["a"].indexOf(y["a"].pluck(e.services.all,"ID_SERVICE"),e.services.id)},set_departments(e,t){e.departments.default=e.filters.department,e.departments.show_all=e.filters.all_departments,e.departments.all=t,e.departments.current=y["a"].where(e.departments.all,{ID_SERVICE:e.services.id})},set_crews(e,t){e.crews.default=e.filters.crew,e.crews.show_all=e.filters.all_crews,e.crews.all=t,e.crews.current=y["a"].where(e.crews.all,{ID_DEPARTMENT:e.departments.default})},set_persons(e,t){const r=y["a"].countBy(t,(function(e){return y["a"].isNull(e.DATE_IN)?"out":"in"}));e.persons.count=r,e.persons.all=t,e.services.count=y["a"].countBy(e.persons.all,"SERVICE"),e.persons.show_all=e.filters.all_persons,e.persons.show_all?(e.departments.show_all=!0,e.crews.show_all=!0,this.commit("prohodnaya/get_persons","persons")):e.departments.show_all&!e.crews.show_all?(e.crews.count=y["a"].countBy(y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),"CREW"),y["a"].each(e.crews.all,(function(t,r){e.crews.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0])?y["a"].extend(e.crews.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.crews.all[r],{COUNT:y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0]})})),this.commit("prohodnaya/get_persons","service_crew")):!e.departments.show_all&e.crews.show_all?(this.commit("prohodnaya/get_all_counts"),this.commit("prohodnaya/get_persons","service_department")):e.departments.show_all&e.crews.show_all?this.commit("prohodnaya/get_persons","service"):(this.commit("prohodnaya/get_all_counts"),e.crews.default=y["a"].first(y["a"].where(e.crews.current,{disabled:!1})).CREW,this.commit("prohodnaya/get_persons"))},set_loading(e,t){e.loading=t},change_service(e,t){e.services.id=t,this.commit("prohodnaya/get_departments"),this.commit("prohodnaya/get_crews"),e.crews.show_all&&!e.departments.show_all?this.commit("prohodnaya/all_departments"):!e.crews.show_all&&e.departments.show_all?this.commit("prohodnaya/all_crews"):e.departments.show_all&&e.crews.show_all?this.commit("prohodnaya/get_persons","service"):e.departments.show_all||e.crews.show_all||(this.commit("prohodnaya/get_departments"),this.commit("prohodnaya/get_crews"),this.commit("prohodnaya/get_persons")),this.commit("prohodnaya/save_filters")},change_department(e,t){e.departments.default=t,e.crews.show_all?this.commit("prohodnaya/all_departments"):(this.commit("prohodnaya/get_crews"),this.commit("prohodnaya/get_persons"),this.commit("prohodnaya/save_filters"))},change_crew(e,t){e.crews.default=t,e.departments.show_all?this.commit("prohodnaya/all_crews"):(this.commit("prohodnaya/get_persons"),this.commit("prohodnaya/save_filters"))},all_departments(e,t){e.departments.show_all=t,e.persons.show_all=!1,this.commit("prohodnaya/save_filters"),e.crews.current=y["a"].where(e.crews.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),e.departments.current=y["a"].where(e.departments.all,{ID_SERVICE:e.services.id}),e.departments.show_all&!e.crews.show_all?(e.crews.count=y["a"].countBy(y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),"CREW"),y["a"].each(e.crews.all,(function(t,r){e.crews.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0])?y["a"].extend(e.crews.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.crews.all[r],{COUNT:y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0]})})),e.crews.default=y["a"].first(y["a"].where(e.crews.current,{disabled:!1})).CREW,this.commit("prohodnaya/get_persons","service_crew")):!e.departments.show_all&e.crews.show_all?(this.commit("prohodnaya/get_all_counts"),this.commit("prohodnaya/get_persons","service_department")):e.departments.show_all&e.crews.show_all?this.commit("prohodnaya/get_persons","service"):(this.commit("prohodnaya/get_all_counts"),e.crews.default=y["a"].first(y["a"].where(e.crews.current,{disabled:!1})).CREW,this.commit("prohodnaya/get_persons"))},all_crews(e,t){e.crews.show_all=t,e.persons.show_all=!1,this.commit("prohodnaya/save_filters"),e.crews.current=y["a"].where(e.crews.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),e.departments.show_all&!e.crews.show_all?(e.crews.count=y["a"].countBy(y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),"CREW"),y["a"].each(e.crews.all,(function(t,r){e.crews.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0])?y["a"].extend(e.crews.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.crews.all[r],{COUNT:y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0]})})),this.commit("prohodnaya/get_persons","service_crew")):!e.departments.show_all&e.crews.show_all?this.commit("prohodnaya/get_persons","service_department"):e.departments.show_all&e.crews.show_all?(console.log("all_crew_3"),this.commit("prohodnaya/get_persons","service")):(this.commit("prohodnaya/get_all_counts"),e.crews.default=y["a"].first(y["a"].where(e.crews.current,{disabled:!1})).CREW,this.commit("prohodnaya/get_persons"))},all_persons(e,t){e.persons.show_all=t,e.services.default=y["a"].indexOf(y["a"].pluck(e.services.all,"ID_SERVICE"),e.services.id),e.persons.show_all?(e.departments.show_all=!0,e.crews.show_all=!0,this.commit("prohodnaya/get_persons","persons")):(e.departments.show_all=!1,e.crews.show_all=!1,this.commit("prohodnaya/all_departments")),this.commit("prohodnaya/save_filters")},get_departments(e){this.commit("prohodnaya/get_all_counts"),e.departments.current=y["a"].where(e.departments.all,{ID_SERVICE:e.services.id}),e.departments.default=y["a"].first(y["a"].where(e.departments.current,{disabled:!1})).ID_DEPARTMENT},get_crews(e){this.commit("prohodnaya/get_all_counts"),e.crews.current=y["a"].where(e.crews.all,{ID_DEPARTMENT:e.departments.default}),e.crews.default=y["a"].first(y["a"].where(e.crews.current,{disabled:!1})).CREW},get_all_counts(e){e.departments.count=y["a"].countBy(y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE}),"DEPARTMENT"),y["a"].each(e.departments.all,(function(t,r){e.departments.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.departments.count,t.DEPARTMENT))[0])?y["a"].extend(e.departments.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.departments.all[r],{COUNT:y["a"].values(y["a"].pick(e.departments.count,t.DEPARTMENT))[0]})})),e.crews.count=y["a"].countBy(y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE,DEPARTMENT:y["a"].where(e.departments.all,{ID_DEPARTMENT:e.departments.default})[0].DEPARTMENT}),"CREW"),y["a"].each(e.crews.all,(function(t,r){e.crews.all[r].disabled=!1,y["a"].isUndefined(y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0])?y["a"].extend(e.crews.all[r],{disabled:!0,COUNT:"0"}):y["a"].extend(e.crews.all[r],{COUNT:y["a"].values(y["a"].pick(e.crews.count,t.CREW_DESC))[0]})}))},get_persons(e,t){switch(t){case"service_crew":e.persons.current=y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE,ID_CREW:e.crews.default});break;case"service_department":e.persons.current=y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE,DEPARTMENT:y["a"].where(e.departments.all,{ID_DEPARTMENT:e.departments.default})[0].DEPARTMENT});break;case"service":e.persons.current=y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE});break;case"persons":e.persons.current=e.persons.all;break;default:e.persons.current=y["a"].where(e.persons.all,{SERVICE:y["a"].where(e.services.all,{ID_SERVICE:e.services.id})[0].SERVICE,DEPARTMENT:y["a"].where(e.departments.all,{ID_DEPARTMENT:e.departments.default})[0].DEPARTMENT,ID_CREW:e.crews.default});break}},save_filters(e){const t={service:parseInt(e.services.id),department:parseInt(e.departments.default),crew:parseInt(e.crews.default),all_departments:e.departments.show_all,all_crews:e.crews.show_all,all_persons:e.persons.show_all};localStorage.setItem("prohodnaya",JSON.stringify(t))},load_filters(e){localStorage.getItem("prohodnaya")?e.filters=JSON.parse(localStorage.getItem("prohodnaya")):e.filters=e.defaultFilters},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(T)))}},actions:{get_allData(e,t){e.commit("set_loading",!0);const r=o()({data:{params:{flag:"get_services"}}}),n=o()({data:{params:{flag:"get_departments"}}}),a=o()({data:{params:{flag:"get_crews"}}}),i=o()({data:{params:{flag:"get_persons",date:t}}});o.a.all([r,n,a,i]).then(o.a.spread((...t)=>{const r=t[0].data,n=t[1].data,a=t[2].data,i=t[3].data;e.commit("load_filters"),0!==i.length?(e.commit("set_services",r),e.commit("set_departments",n),e.commit("set_crews",a),e.commit("set_persons",i)):e.commit("resetState")})).catch(t=>{e.commit("set_loading",!1),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})},get_persons(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"get_persons",date:t}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_persons",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const C={data:{temperature:[]},loading:!1},O=JSON.parse(JSON.stringify(C));var A={namespaced:!0,state:O,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.temperature=t},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(C)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData",dateStart:t[0],dateEnd:t[1]}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const D={data:{tundishHeats:{headers:[],items:[]},tundishValues:{headers:[],items:[]}},loading:!1},N=JSON.parse(JSON.stringify(D));var R={namespaced:!0,state:N,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.tundishHeats.items=t.tundishHeats,e.data.tundishHeats.headers=v(e.data.tundishHeats.items,"expand"),e.data.tundishValues.items=t.tundishValues,e.data.tundishValues.headers=v(e.data.tundishValues.items),e.data.tundishHeats.headers.forEach(e=>{"HEAT_NAME"===e.text&&(e.text="№ Плавки"),"OPEN_TIME"===e.text&&(e.text="Время открытия"),"CLOSE_TIME"===e.text&&(e.text="Время закрытия")})},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(D)))}},actions:{getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getDataHeats",dateStart:t[0],dateEnd:t[1]}}}),n=o()({data:{params:{flag:"getDataValues",dateStart:t[0],dateEnd:t[1]}}});o.a.all([r,n]).then(o.a.spread((...t)=>{const r=t[0].data,n=t[1].data;0!==r.length?e("set_data",{tundishHeats:r,tundishValues:n}):e("resetState")})).catch(()=>{e("set_loading",!1)}).finally(()=>{e("set_loading",!1)})}}},I=r("2176"),M=r.n(I),P=r("294b"),F=r.n(P);const L={data:{headers:[],items:[]},loading:!1},B=JSON.parse(JSON.stringify(L));var U={namespaced:!0,state:B,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.items=Object.assign(t[0],t[1]),e.data.items.forEach(e=>{e.cycle=e.cycle.date.substr(10,9)}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"date":e.text="Дата";break;case"heat_number":e.text="Номер плавки";break;case"MARKA":e.text="Марка стали";break;case"cycle":e.text="Цикл плавки";break;case"SCRAP_Weight":e.text="Лом, тн.";break;case"BOF_HM_Weight":e.text="Чугун, тн.";break;case"HEAT_Weight":e.text="Налив, тн.";break;case"hmCoefficient":e.text="Коэф. по чугуну";break;case"hmP":e.text="P";break;case"hmSBeforeDS":e.text="S до дес.";break;case"hmS":e.text="S";break;case"hmSi":e.text="Si";break;case"BOF_HM_Temp":e.text="T";break;case"CaOPolysiusHeat":e.text="CaO";break;case"CaODolomitedHeat":e.text="CaO дол.";break;case"CaCO3Heat":e.text="CaCO3";break;case"CaCO3Dolomited":e.text="CaCO3 дол.";break;case"okatishiHeat":e.text="Окатыши";break;case"ACHeat":e.text="Уголь";break;case"MgBrickHeat":e.text="Mg брик.";break;case"Bricks":e.text="Бой кирпича";break;case"HEAT_Temp":e.text="T";break;case"c_pov":e.text="C";break;case"mn_pov":e.text="Mn";break;case"s_pov":e.text="S";break;case"p_pov":e.text="P";break;case"CaOShlag":e.text="CaO";break;case"MgOShlag":e.text="MgO";break;case"FeOShlag":e.text="FeO";break;case"Bass":e.text="Основность";break;case"reblow_reason":e.text="Причина";break;case"reblow_O2":e.text="O2";break;case"reblow_N2":e.text="N2";break;case"N2":e.text="Ошлаковки (расход азота)";break;case"N2_reason":e.text="Примечание";break}})},set_loading(e,t){e.loading=t},getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].pluck(e.data.headers,"text");i=y["a"].rest(i),i=y["a"].rest(i),y["a"].each(y["a"].keys(y["a"].first(e.data.items)),(function(e){r.push(y["a"].object(["key"],[e]))})),r=y["a"].rest(r),r=y["a"].rest(r),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Показатели по работе КО (поплавочно) за период с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"left",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(L)))}},actions:{getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getData_BOFReportSample_A1",dateStart:t[0],dateEnd:t[1],aggID:t[2]}}});return o.a.all([r]).then(o.a.spread((...t)=>{const r=t[0].data;r.length?e("set_data",[r]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const j={data:{headers:[],items:[]},loading:!1},z=JSON.parse(JSON.stringify(j));var H={namespaced:!0,state:z,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.items=t,e.data.items.forEach(e=>{e.cycle=e.cycle.date.substr(10,9)}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"day":e.text="День";break;case"heatCount":e.text="Кол-во";break;case"date":e.text="Дата";break;case"heat_number":e.text="Номер плавки";break;case"MARKA":e.text="Марка стали";break;case"cycle":e.text="Цикл плавки";break;case"Scrap":e.text="Лом, тн.";break;case"hm":e.text="Чугун, тн.";break;case"heatWeight":e.text="Налив, тн.";break;case"hmCoefficient":e.text="Коэф. по чугуну";break;case"hmP":e.text="P";break;case"hmSBeforeDS":e.text="S до дес.";break;case"hmS":e.text="S";break;case"hmSi":e.text="Si";break;case"hmT":e.text="T";break;case"CaOPolysiusHeat":e.text="CaO";break;case"CaODolomitedHeat":e.text="CaO дол.";break;case"CaCO3Heat":e.text="CaCO3";break;case"CaCO3Dolomited":e.text="CaCO3 дол.";break;case"okatishiHeat":e.text="Окатыши";break;case"ACHeat":e.text="Уголь";break;case"MgBrickHeat":e.text="Mg брик.";break;case"Bricks":e.text="Бой кирпича";break;case"heatT":e.text="T";break;case"c_pov":e.text="C";break;case"mn_pov":e.text="Mn";break;case"s_pov":e.text="S";break;case"p_pov":e.text="P";break;case"CaOShlag":e.text="CaO";break;case"MgOShlag":e.text="MgO";break;case"FeOShlag":e.text="FeO";break;case"Bass":e.text="Основность";break;case"reblowCount":e.text="Кол-во";break;case"reblowO2Count":e.text="O2";break;case"reblowN2Count":e.text="N2";break;case"N2":e.text="Ошлаковки (расход азота)";break;case"N2_reason":e.text="Примечание";break;case"NadopalCaO":e.text="Недопал CaO, %";break;case"Otcev":e.text="Отсев, тн.";break;case"N2Count":e.text="Кол-во ошлаковок";break}})},set_loading(e,t){e.loading=t},getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].pluck(e.data.headers,"text");i=y["a"].rest(i),i=y["a"].rest(i),y["a"].each(y["a"].keys(y["a"].first(e.data.items)),(function(e){r.push(y["a"].object(["key"],[e]))})),r=y["a"].rest(r),r=y["a"].rest(r),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Показатели по работе КО (посуточно) за период с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"left",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(j)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData_BOFReportSample_A2",dateStart:t[0],dateEnd:t[1],aggID:t[2]}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),console.log(t),e.commit("resetState")}).finally(()=>{e.commit("set_loading",!1)})}}};const W={data:{headers:[],items:[]},loading:!1},V=JSON.parse(JSON.stringify(W));var Y={namespaced:!0,state:V,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.items=t,e.data.headers=v(e.data.items);for(let r=0;r2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(W)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData_BOFReportSample_B1",dateStart:t[0],dateEnd:t[1]}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const G={data:{headers:[],items:[]},loading:!1},Z=JSON.parse(JSON.stringify(G));var X={namespaced:!0,state:Z,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.items=t,e.data.items.forEach(e=>{try{null!=e.cycle&&(e.cycle=e.cycle.date.substr(10,9)),null!=e.Charge&&(e.Charge=e.Charge.date.substr(10,9)),null!=e.HMCharge&&(e.HMCharge=e.HMCharge.date.substr(10,9)),null!=e.Blow&&(e.Blow=e.Blow.date.substr(10,9)),null!=e.Tap&&(e.Tap=e.Tap.date.substr(10,9)),null!=e.Slspl&&(e.Slspl=e.Slspl.date.substr(10,9)),null!=e.Sltap&&(e.Sltap=e.Sltap.date.substr(10,9)),null!=e.upk_HEATSTARTDATE&&(e.upk_HEATSTARTDATE=e.upk_HEATSTARTDATE.date.substr(0,19)),null!=e.upk_HEATENDDATE&&(e.upk_HEATENDDATE=e.upk_HEATENDDATE.date.substr(0,19)),null!=e.upk_cycle&&(e.upk_cycle=e.upk_cycle.date.substr(10,9)),null!=e.vd_HEATSTARTDATE&&(e.vd_HEATSTARTDATE=e.vd_HEATSTARTDATE.date.substr(0,19)),null!=e.vd_HEATENDDATE&&(e.vd_HEATENDDATE=e.vd_HEATENDDATE.date.substr(0,19)),null!=e.vd_cycleHEat&&(e.vd_cycleHEat=e.vd_cycleHEat.date.substr(10,9)),null!=e.vd_cycleVacuum&&(e.vd_cycleVacuum=e.vd_cycleVacuum.date.substr(10,9)),null!=e.vd_cycleHardVacuum&&(e.vd_cycleHardVacuum=e.vd_cycleHardVacuum.date.substr(10,9)),null!=e.BLOW_ARGON_TIME&&(e.BLOW_ARGON_TIME=e.BLOW_ARGON_TIME.date.substr(10,9)),null!=e.CASTHEAT_START&&(e.CASTHEAT_START=e.CASTHEAT_START.date.substr(0,19)),null!=e.CASTHEAT_END&&(e.CASTHEAT_END=e.CASTHEAT_END.date.substr(0,19)),null!=e.RAILWAYCOMP_SET&&(e.RAILWAYCOMP_SET=e.RAILWAYCOMP_SET.date.substr(0,19)),null!=e.RAILWAYCOMP_REM&&(e.RAILWAYCOMP_REM=e.RAILWAYCOMP_REM.date.substr(0,19)),null!=e.Reblow&&(e.Reblow=e.Reblow.date.substr(10,9)),null!=e.Reblow2&&(e.Reblow2=e.Reblow2.date.substr(10,9)),null!=e.Reblow3&&(e.Reblow3=e.Reblow3.date.substr(10,9)),null!=e.COMP_MOULDSTREP_DUR&&(e.COMP_MOULDSTREP_DUR=e.COMP_MOULDSTREP_DUR.date.substr(10,9)),null!=e.COMP_MOULDSTREP_START&&(e.COMP_MOULDSTREP_START=e.COMP_MOULDSTREP_START.date.substr(0,19)),null!=e.COMP_MOULDSTREP_END&&(e.COMP_MOULDSTREP_END=e.COMP_MOULDSTREP_END.date.substr(0,19))}catch(error){console.log(error)}}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"data":e.text="Дата";break;case"heatNumber":e.text="Номер плавки";break;case"grade_name":e.text="Марка стали";break;case"br_number":e.text="№ бригады";break;case"master":e.text="Мастер";break;case"distributor":e.text="Машинист дистрибутор";break;case"cycle":e.text="Цикл плавки";break;case"heat_delay":e.text="Длительность стали в ковше";break;case"Scrap":e.text="Лом, тн.";break;case"mold_scrap":e.text="Бой изложниц";break;case"OLP":e.text="ОЛП";break;case"Scrap_CPSH":e.text="Скрап ЦПШ";break;case"Scrap_light":e.text="Легковесный лом";break;case"blum":e.text="Блюминг";break;case"cold_iron":e.text="Холодный чугун";break;case"ST600":e.text="СТ600";break;case"crop_st3000":e.text="Обрезь ст. 3000";break;case"scale":e.text="Окалина";break;case"rollers":e.text="Валки";break;case"ovveral_crop":e.text="Габаритная обрезь";break;case"amort_scrap":e.text="Амортизационный лом";break;case"iron_scrap2":e.text="Лом чугуна";break;case"heavy_scrap":e.text="Тяжелый лом";break;case"mos5":e.text="МОС5";break;case"mos3":e.text="МОС3";break;case"mos":e.text="МОС";break;case"crop_overall":e.text="Рядовая габаритная обрезь";break;case"crop1":e.text="Обрезь";break;case"scrap1":e.text="Скрап";break;case"scrapBof":e.text="Скрап ККЦ";break;case"scrapIron":e.text="Скрап чугунный";break;case"boring":e.text="Стружка";break;case"metall_scrap":e.text="Металлический лом";break;case"steel_scrap":e.text="Скрап стальной";break;case"packet":e.text="Пакеты";break;case"underfilling":e.text="Недоливки";break;case"HM_WEIGHT":e.text="Чугун, тн.";break;case"weight_heat":e.text="Налив, тн.";break;case"coefHM":e.text="Коэф. по чугуну";break;case"hm_p":e.text="P";break;case"hm_s_before_ds":e.text="S до";break;case"hm_s":e.text="S";break;case"hm_si":e.text="Si";break;case"hm_mn":e.text="Mn";break;case"hm_t":e.text="T";break;case"Des_CaO":e.text="CaO";break;case"Des_Mn":e.text="Mn";break;case"Charge":e.text="Завалка";break;case"HMCharge":e.text="Заливка";break;case"Blow":e.text="Продувка";break;case"Reblow":e.text="1 Додувка";break;case"Reblow2":e.text="2 Додувка";break;case"Reblow3":e.text="3 Додувка";break;case"Tap":e.text="Слив м.";break;case"Slspl":e.text="Азотирование";break;case"Sltap":e.text="Слив ш.";break;case"CaOPolysiusHeat":e.text="CaO";break;case"CaODolomitedHeat":e.text="CaO дол.";break;case"CaCO3Heat":e.text="CaCO3";break;case"CaCO3Dol":e.text="CaCO3 дол.";break;case"okatishi":e.text="Окатыши";break;case"CHeat":e.text="Уголь";break;case"MgBrick":e.text="Mg";break;case"heat_temp":e.text="T";break;case"c_pov":e.text="C";break;case"mn_pov":e.text="Mn";break;case"s_pov":e.text="S";break;case"p_pov":e.text="P";break;case"CaOShlag":e.text="CaO";break;case"SiO2Shlag":e.text="SiO2";break;case"MgOShlag":e.text="MgO";break;case"FeOShlag":e.text="Fe";break;case"Bass":e.text="Основность";break;case"reblow_reason":e.text="Причина";break;case"reblowO2":e.text="O2";break;case"reblowN2":e.text="N2";break;case"N2oshlack":e.text="Ошлаковки (расход азота)";break;case"UVOS_T":e.text="T";break;case"UVOS_C":e.text="C";break;case"UVOS_Si":e.text="Si";break;case"UVOS_Mn":e.text="Mn";break;case"UVOS_S":e.text="S";break;case"UVOS_P":e.text="P";break;case"OXYGEN_TOT":e.text="O2";break;case"NITROGEN_TOT":e.text="N2";break;case"ARGON_TUY_TOT":e.text="Ar";break;case"upk_LADLENO":e.text="№ ковша";break;case"upk_MRESISTANCELADLE":e.text="Стойкоcть ковша";break;case"upk_MEMPTYLADLEWEIGHT":e.text="Вес ковша";break;case"upk_STEELWEIGHTIN":e.text="Вес стали";break;case"upk_HEATSTARTDATE":e.text="Начало обработки";break;case"upk_HEATENDDATE":e.text="Конец обработки";break;case"upk_cycle":e.text="Длительность обработки";break;case"upk_FIRSTMEASTEMP":e.text="Начальная температура";break;case"upk_LASTMEASTEMP":e.text="Конечная температура";break;case"upk_LFFirstSteelC":e.text="C";break;case"upk_LFFirstSteelMn":e.text="Mn";break;case"upk_LFFirstSteelSi":e.text="Si";break;case"upk_LFFirstSteelS":e.text="S";break;case"upk_LFFirstSteelP":e.text="P";break;case"upk_LFFirstSteelAl":e.text="Al";break;case"upk_LFFirstSteelCa":e.text="Ca";break;case"upk_LFFirstSteelTi":e.text="Ti";break;case"upk_LFFirstSteelV":e.text="V";break;case"upk_LFFirstSteelNb":e.text="Nb";break;case"upk_LFLastSteelC":e.text="C";break;case"upk_LFLastSteelMn":e.text="Mn";break;case"upk_LFLastSteelSi":e.text="Si";break;case"upk_LFLastSteelS":e.text="S";break;case"upk_LFLastSteelP":e.text="P";break;case"upk_LFLastSteelAl":e.text="Al";break;case"upk_LFLastSteelCa":e.text="Ca";break;case"upk_LFLastSteelTi":e.text="Ti";break;case"upk_LFLastSteelV":e.text="V";break;case"upk_LFLastSteelNb":e.text="Nb";break;case"upk_CaO":e.text="CaO";break;case"upk_SiO2":e.text="SiO2";break;case"upk_MgO":e.text="MgO";break;case"upk_FeO":e.text="FeO";break;case"upk_Al2O3":e.text="Al2O3";break;case"upk_MnO":e.text="MnO";break;case"upk_P2O5":e.text="P2O5";break;case"upk_S":e.text="S";break;case"vd_HEATSTARTDATE":e.text="Начало вакуумирования";break;case"vd_HEATENDDATE":e.text="Конец вакуумирования";break;case"vd_cycleHEat":e.text="Длительность вакуумирования";break;case"vd_cycleVacuum":e.text="Длительность вакуумирования";break;case"vd_cycleHardVacuum":e.text="Длительность глубокого вакуумирования";break;case"vd_FIRSTMEASTEMP":e.text="Начальная температура";break;case"vd_LASTMEASTEMP":e.text="Конечная температура";break;case"vd_First_H2":e.text="В начале H2";break;case"vd_Last_H2":e.text="В концее H2";break;case"vd_VD_F_C":e.text="C";break;case"vd_VD_F_Mn":e.text="Mn";break;case"vd_VD_F_Si":e.text="Si";break;case"vd_VD_F_S":e.text="S";break;case"vd_VD_F_P":e.text="P";break;case"vd_VD_L_C":e.text="C";break;case"vd_VD_LMn":e.text="Mn";break;case"vd_VD_LSi":e.text="Si";break;case"vd_VD_LS":e.text="S";break;case"vd_VD_LP":e.text="P";break;case"orss_C":e.text="C";break;case"orss_Mn":e.text="Mn";break;case"orss_Si":e.text="Si";break;case"orss_S":e.text="S";break;case"orss_P":e.text="P";break;case"LADLE_ARRIVMEAS_TEMP":e.text="Замер температуры, С";break;case"MEAS_TEMP":e.text="Доводка по температуре, С";break;case"BLOW_ARGON_TIME":e.text="Продувка аргоном, мин";break;case"CASTHEAT_START":e.text="Начало разливки";break;case"CASTHEAT_END":e.text="Конец разливки";break;case"RAILWAYCOMP_SET":e.text="Подача состава";break;case"RAILWAYCOMP_REM":e.text="Снятие состава";break;case"COMP_MOULDSTREP_START":e.text="Начало";break;case"COMP_MOULDSTREP_END":e.text="Конец";break;case"COMP_MOULDSTREP_DUR":e.text="Продолж.";break;case"LOSSES_GROUP":e.text="Группа потерь";break;case"LOSSES_KIND":e.text="Причина";break;case"WEIGHT_LOSSES":e.text="Вес, т";break;case"SPARKLING_TIME":e.text="Искрение, c";break;case"MENISCUS":e.text="Мениск";break;case"SPARKLING_INPUT_AL":e.text="Ввод Al, гр./слиток";break;case"FISTULAS_COUNT":e.text="Свищи, шт";break;case"MOULD_COUNT":e.text="Шт.";break;case"INGOTS_WEIGHT":e.text="Вес, т.";break;case"VIOLATION_NAME":e.text="Нарушение технологии разливки";break}})},set_loading(e,t){e.loading=t},getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].pluck(e.data.headers,"text");i=y["a"].rest(i),y["a"].each(y["a"].keys(y["a"].first(e.data.items)),(function(e){r.push(y["a"].object(["key"],[e]))})),r=y["a"].rest(r),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Показатели по работе конвертеров за период с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"left",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(G)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData_BOFReportSample_C1",dateStart:t[0],dateEnd:t[1]}}}).then(t=>{const r=t.data;0!==r.length&&2!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const $={data:{headers:[],items:[],countHeats:[],sampleCounts:[],master:[],operator:[],shift:[],avgData:[]},loading:!1},J=JSON.parse(JSON.stringify($));var q={namespaced:!0,state:J,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_data(e,t){e.data.items=t[0],e.data.items.forEach(e=>{try{null!=e.cycle&&(e.cycle=e.cycle.date.substr(10,9))}catch(error){console.log(error)}}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"Date":e.text="Дата";break;case"heat_number":e.text="№ плавки";break;case"grade_name":e.text="Марка стали";break;case"cycle":e.text="Цикл плавки";break;case"c_pov":e.text="C% на пов.";break;case"C_result":e.text="C гот., %";break;case"FerroCount":e.text="Кол-во ферроспл., т";break;case"t_pov":e.text="T повалки";break;case"FeOShlag":e.text="FeO %";break;case"CaOPolysiusHeat":e.text="CaO тн.";break;case"CaODolomitedHeat":e.text="CaO дол. тн.";break;case"CaCO3Common":e.text="CaCO3 д/з тн.";break;case"Coal":e.text="Уголь, тн";break;case"Scrap":e.text="Лом, тн";break;case"HM_WEIGHT":e.text="Чугун, тн";break;case"hm_t":e.text="T чугуна";break;case"hm_si":e.text="% Si чуг.";break;case"bofmaster":e.text="Мастер";break;case"bofoperator":e.text="Дистрибутор";break;case"CHARGE_SHIFTTEAM_NO":e.text="№ бригады";break}}),e.data.countHeats=y["a"].first(t[1]),e.data.sampleCounts=y["a"].first(t[2]),e.data.master=t[3],e.data.operator=t[4],e.data.shift=t[5],e.data.avgData=t[6],e.data.avgData.forEach(e=>{try{null!=e.avg_cycle&&(e.avg_cycle=e.avg_cycle.date.substr(10,9))}catch(error){console.log(error)}}),e.data.avgData=y["a"].first(e.data.avgData)},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify($)))}},actions:{getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getData_BOFReportSample_D1",dateStart:t[0],dateEnd:t[1]}}}),n=o()({data:{params:{flag:"getData_BOFReportSample_D1_countHets",dateStart:t[0],dateEnd:t[1]}}}),a=o()({data:{params:{flag:"getData_BOFReportSample_D1_sampleCounts",dateStart:t[0],dateEnd:t[1]}}}),i=o()({data:{params:{flag:"getData_BOFReportSample_D1_master",dateStart:t[0],dateEnd:t[1]}}}),s=o()({data:{params:{flag:"getData_BOFReportSample_D1_operator",dateStart:t[0],dateEnd:t[1]}}}),l=o()({data:{params:{flag:"getData_BOFReportSample_D1_shift",dateStart:t[0],dateEnd:t[1]}}}),u=o()({data:{params:{flag:"getData_BOFReportSample_D1_avgData",dateStart:t[0],dateEnd:t[1]}}});return o.a.all([r,n,a,i,s,l,u]).then(o.a.spread((...t)=>{const r=t[0].data,n=t[1].data,a=t[2].data,i=t[3].data,s=t[4].data,o=t[5].data,l=t[6].data;0!==r.length?e("set_data",[r,n,a,i,s,o,l]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const K={data:{headers:[],items:[]},loading:!1},Q=JSON.parse(JSON.stringify(K));var ee={namespaced:!0,state:Q,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].keys(y["a"].first(e.data.items));y["a"].each(i,(function(e){r.push(y["a"].object(["key"],[e]))})),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Ежесуточный отчет по основным эксплуатационным характеристикам конверторов АМК с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"left",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},set_data(e,t){e.data.items=t,e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"CAPTION":e.text="Дата";break}})},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(K)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData_BOFMainUseConfig",dateStart:t[0],dateEnd:t[1],aggID:t[2]}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const te={data:{headers:[],headersSetpoints:[],itemsSetpoints:[],items:[],avgData:[],sumData:[],sumDataBrigada1:[],sumDataBrigada2:[],sumDataBrigada3:[],sumDataBrigada4:[],avgDataBrigada1:[],avgDataBrigada2:[],avgDataBrigada3:[],avgDataBrigada4:[],items_readOnly:[],crewList:[],label:"",chart:{chartDataset:{setpoints:[]},chartLabel:[],setpoints:[],currentPoints:[]},allChart:{chartDataset:{setpoints:[]},chartLabel:[],setpoints:[],currentPoints:[]}},loading:!1},re=JSON.parse(JSON.stringify(te));var ne={namespaced:!0,state:re,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{refreshChart(e,t){var r=t;switch(t.replaceAll("\r\n","")){case"Химия, чугуна Si, %":r="Si";break;case"Химия, чугуна P, %":r="P";break;case"Температура, чугуна":r="T";break;case"Добавочные CaO, кг/т":r="CaO, кг/т";break;case"Добавочные CaOд, кг/т":r="CaO дол., кг/т";break;case"Добавочные СaCO3, кг/т":r="CaCO3, кг/т";break;case"Темпер. Пов.°С":r="T ";break;case"Хим. ан.стали С, %":r="C ";break;case"Хим. ан.стали P, %":r="P ";break;case"Хим.ан.шлака СаО,%":r="CaO ";break;case"Хим.ан.шлака МgO,%":r="MgO ";break;case"Хим.ан.шлака FeO,%":r="FeO ";break;case"Додувки, штук O2/N2, C":r="C, шт";break;case"Додувки, штук O2/N2, P":r="P, шт";break;case"Додувки, штук O2/N2, Cr":r="Cr, шт";break;case"Выход годного, тн":r="Налив, тн";break;case"Ошлаковка, м3":r="Ошлаковка";break}e.data.chart.dataset=[],e.data.chart.label=[],e.data.chart.setpoints=[],e.data.chart.currentPoints=[],y["a"].isEmpty(e.data.avgDataBrigada1)||e.data.chart.label.push("Бригада: 1"),y["a"].isEmpty(e.data.avgDataBrigada2)||e.data.chart.label.push("Бригада: 2"),y["a"].isEmpty(e.data.avgDataBrigada3)||e.data.chart.label.push("Бригада: 3"),y["a"].isEmpty(e.data.avgDataBrigada4)||e.data.chart.label.push("Бригада: 4");try{e.data.chart.currentPoints=y["a"].where(e.data.itemsSetpoints,{desc:t})[0].value}catch(error){console.log(error)}"C, шт"===r||"P, шт"===r||"Cr, шт"===r?e.data.chart.dataset.push({label:t,backgroundColor:"#848484",data:[y["a"].values(y["a"].pick(e.data.sumDataBrigada1,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.sumDataBrigada2,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.sumDataBrigada3,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.sumDataBrigada4,r.replaceAll("\r\n","")))]}):e.data.chart.dataset.push({label:t,backgroundColor:"#848484",data:[y["a"].values(y["a"].pick(e.data.avgDataBrigada1,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.avgDataBrigada2,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.avgDataBrigada3,r.replaceAll("\r\n",""))),y["a"].values(y["a"].pick(e.data.avgDataBrigada4,r.replaceAll("\r\n","")))]}),e.data.chart.dataset[0].setpoints=y["a"].where(e.data.itemsSetpoints,{desc:t}),e.data.chart.dataset[0].data=y["a"].flatten(e.data.chart.dataset[0].data)},buildAllChart(e,t){t.forEach(t=>{this.commit("BOFReportAvgData_Marka/refreshChart",t.desc),e.data.allChart.dataset.push(e.data.chart.dataset)})},getExcel(e,t){var r=[];let n=[],a=[];var i=new M.a.Workbook,s=i.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}});s.mergeCells("A2","BD16"),s.mergeCells("A17","BD32");let o=0,l=5,u=0,c=5,h=5;t[3]=y["a"].flatten(t[3]),t[3].forEach((e,t)=>{if(h=0===t||10===t?0:5,t<10){o+=h,l+=h;let t=i.addImage({base64:e,extension:"png"});s.addImage(t,{tl:{col:o,row:1},br:{col:l,row:16}})}else{u+=h,c+=h;let t=i.addImage({base64:e,extension:"png"});s.addImage(t,{tl:{col:u,row:16},br:{col:c,row:32}})}});var d=y["a"].keys(y["a"].omit(y["a"].first(e.data.items),"Бригада"));y["a"].each(d,(function(e){r.push(y["a"].object(["key"],[e]))})),e.data.avgDataBrigada1=y["a"].mapObject(e.data.avgDataBrigada1,(function(t,r){switch(r){case"Кол. плавок, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada1],"Кол. плавок, шт"));case"C, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada1],"C, шт"));case"P, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada1],"P, шт"));case"Cr, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada1],"Cr, шт"));default:return t}})),e.data.avgDataBrigada2=y["a"].mapObject(e.data.avgDataBrigada2,(function(t,r){switch(r){case"Кол. плавок, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada2],"Кол. плавок, шт"));case"C, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada2],"C, шт"));case"P, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada2],"P, шт"));case"Cr, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada2],"Cr, шт"));default:return t}})),e.data.avgDataBrigada3=y["a"].mapObject(e.data.avgDataBrigada3,(function(t,r){switch(r){case"Кол. плавок, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada3],"Кол. плавок, шт"));case"C, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada3],"C, шт"));case"P, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada3],"P, шт"));case"Cr, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada3],"Cr, шт"));default:return t}})),e.data.avgDataBrigada4=y["a"].mapObject(e.data.avgDataBrigada4,(function(t,r){switch(r){case"Кол. плавок, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"Кол. плавок, шт"));case"C, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"C, шт"));case"P, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"P, шт"));case"Cr, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"Cr, шт"));default:return t}})),e.data.avgDataBrigada4=y["a"].mapObject(e.data.avgDataBrigada4,(function(t,r){switch(r){case"Кол. плавок, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"Кол. плавок, шт"));case"C, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"C, шт"));case"P, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"P, шт"));case"Cr, шт":return y["a"].first(y["a"].pluck([e.data.sumDataBrigada4],"Cr, шт"));default:return t}}));let f=y["a"].flatten(y["a"].union([e.data.avgDataBrigada1],[y["a"].where(e.data.items,{"Бригада":1})],[e.data.avgDataBrigada2],[y["a"].where(e.data.items,{"Бригада":2})],[e.data.avgDataBrigada3],[y["a"].where(e.data.items,{"Бригада":3})],[e.data.avgDataBrigada4],[y["a"].where(e.data.items,{"Бригада":4})]));f=y["a"].map(f,(function(e){return y["a"].omit(e,"Бригада")})),s.mergeCells("A1","BD"),s.getCell("C1").value=""+("Показатели по работе КО (побригадно) с "+t[0]+" по "+t[1]+"\r\n"),s.getCell("C1").font={bold:!0,family:2,size:12},s.getCell("C1").alignment={vertical:"center",horizontal:"center",wrapText:!0},s.getCell("C2").font={bold:!0,family:2,size:12},s.getCell("C2").alignment={vertical:"center",horizontal:"center",wrapText:!0},s.mergeCells("A35","H35"),s.mergeCells("I35","M35"),s.getCell("I35").value="Чугун",s.getCell("I35").font={bold:!0,family:2,size:12},s.mergeCells("N35","U35"),s.getCell("N35").value="Материалы",s.getCell("N35").font={bold:!0,family:2,size:12},s.mergeCells("V35","AA35"),s.getCell("V35").value="Повалка",s.getCell("V35").font={bold:!0,family:2,size:12},s.mergeCells("AB35","AD35"),s.getCell("AB35").value="Шлак",s.getCell("AB35").font={bold:!0,family:2,size:12},s.mergeCells("AE35","AG35"),s.getCell("AE35").value="Додувки",s.getCell("AE35").font={bold:!0,family:2,size:12},s.getCell("AH35").font={bold:!0,family:2,size:12},s.mergeCells("AI35","BD35"),s.getCell("AI35").value="РСС",s.getCell("AI35").font={bold:!0,family:2,size:12},s.getRow(36).values=d,s.columns=r,s.addRows(f),s.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){35===t||36===t?(s.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},s.getCell(e._address).font={bold:!0},s.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},s.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(s.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}}),"Дата"===e._column.key&&null===e._value.value&&(n.push(t),a.push(e._address)),y["a"].each(n,(function(r){t===r&&(s.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}})}))}))}));try{let t=y["a"].uniq(y["a"].pluck(e.data.items,"Бригада"));y["a"].each(a,(function(e,r){s.mergeCells(e,"B"+e.substr(1,5)),s.getCell(e).value="Бригада: "+t[r],s.getCell(e).font={bold:!0,family:2,size:12}}))}catch(error){console.log(error)}i.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},dataFilter(e,t){e.data.items=e.data.items_readOnly;var r=[];t.forEach(t=>{r.push(y["a"].filter(e.data.items,(function(e){return e["Бригада"]==t})))}),e.data.items=y["a"].flatten(r),this.commit("BOFReportAvgData_Marka/set_sumData",e.data.items),this.commit("BOFReportAvgData_Marka/set_avgData",e.data.items)},set_sumData(e,t){t=y["a"].map(t,(function(e){return y["a"].omit(e,"Марка","Дата")})),e.data.sumData=y["a"].reduce(t,(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{}),e.data.sumDataBrigada1=y["a"].reduce(y["a"].where(t,{"Бригада":1}),(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{}),e.data.sumDataBrigada2=y["a"].reduce(y["a"].where(t,{"Бригада":2}),(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{}),e.data.sumDataBrigada3=y["a"].reduce(y["a"].where(t,{"Бригада":3}),(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{}),e.data.sumDataBrigada4=y["a"].reduce(y["a"].where(t,{"Бригада":4}),(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{}),e.data.sumDataBrigada1=y["a"].pick(e.data.sumDataBrigada1,y["a"].identity),e.data.sumDataBrigada2=y["a"].pick(e.data.sumDataBrigada2,y["a"].identity),e.data.sumDataBrigada3=y["a"].pick(e.data.sumDataBrigada3,y["a"].identity),e.data.sumDataBrigada4=y["a"].pick(e.data.sumDataBrigada4,y["a"].identity)},set_avgData(e,t){e.data.avgData=y["a"].reduce(t,(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/t.length,3);return e}),{}),t=y["a"].map(t,(function(e){return y["a"].omit(e,"Марка","Дата")})),e.data.avgDataBrigada1=y["a"].reduce(y["a"].where(t,{"Бригада":1}),(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/y["a"].where(t,{"Бригада":1}).length,3);return e}),{}),e.data.avgDataBrigada2=y["a"].reduce(y["a"].where(t,{"Бригада":2}),(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/y["a"].where(t,{"Бригада":2}).length,3);return e}),{}),e.data.avgDataBrigada3=y["a"].reduce(y["a"].where(t,{"Бригада":3}),(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/y["a"].where(t,{"Бригада":3}).length,3);return e}),{}),e.data.avgDataBrigada4=y["a"].reduce(y["a"].where(t,{"Бригада":4}),(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/y["a"].where(t,{"Бригада":4}).length,3);return e}),{}),e.data.avgDataBrigada1=y["a"].pick(e.data.avgDataBrigada1,y["a"].identity),e.data.avgDataBrigada2=y["a"].pick(e.data.avgDataBrigada2,y["a"].identity),e.data.avgDataBrigada3=y["a"].pick(e.data.avgDataBrigada3,y["a"].identity),e.data.avgDataBrigada4=y["a"].pick(e.data.avgDataBrigada4,y["a"].identity)},set_data(e,t){e.data.items=t[0],e.data.allChart.dataset=[];for(let r=0;r{const r=t[0].data,n=t[1].data;r.length?e("set_data",[r,n]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const ae={data:{headers:[],items:[]},loading:!1},ie=JSON.parse(JSON.stringify(ae));var se={namespaced:!0,state:ie,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}});let i=y["a"].map(e.data.items,(function(e){return y["a"].omit(e,"BOFHR_ID","HEATNO","Heat","ID","NEWNUMBER1")}));var s=y["a"].keys(y["a"].first(i));y["a"].each(s,(function(e){r.push(y["a"].object(["key"],[e]))})),a.mergeCells("A1","DB"),a.getCell("C1").value=""+("Отчет КРО с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"center",wrapText:!0};var o=a.getRow(1);o.height=20,a.getRow(2).values=s,a.columns=r,a.addRows(i),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,3),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},set_data(e,t){e.data.items=t,e.data.headers=v(e.data.items);for(let r=0;r{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const oe={data:{headers:[],items:[]},loading:!1},le=JSON.parse(JSON.stringify(oe));var ue={namespaced:!0,state:le,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].keys(y["a"].first(e.data.items));y["a"].each(i,(function(e){r.push(y["a"].object(["key"],[e]))})),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Эксплуатации стальковшей с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"center",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},set_data(e,t){e.data.items=t,e.data.headers=v(e.data.items);for(let r=0;r{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};r("13d5");const ce={data:{headers:[],items:[],items_readOnly:[],items__:[],avgData:[],sumData:[],listHeatNumber:[]},loading:!1},he=JSON.parse(JSON.stringify(ce));var de=Math.round;Math.round=function(e,t){if(1==arguments.length)return de(e);var r=Math.pow(10,t);return de(e*r)/r};var fe={namespaced:!0,state:he,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}});let i=y["a"].map(e.data.items,(function(e){return y["a"].omit(e,"HEAT_START")}));var s=y["a"].keys(y["a"].first(i));y["a"].each(s,(function(e){r.push(y["a"].object(["key"],[e]))})),i.push(e.data.sumData),i.push(e.data.avgData),a.mergeCells("A1","M"),a.getCell("C1").value=""+("Баланс чугуна с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"center",wrapText:!0};var o=a.getRow(1);o.height=20,a.mergeCells("A2","D2"),a.getCell("C2").font={bold:!0,family:2,size:12},a.getCell("C2").alignment={vertical:"center",horizontal:"center",wrapText:!0},a.mergeCells("E2","I2"),a.getCell("E2").value="Вес чугуна на чугуновозе",a.getCell("E2").font={bold:!0,family:2,size:12},a.getCell("E2").alignment={vertical:"center",horizontal:"center",wrapText:!0},a.mergeCells("J2","M2"),a.getCell("J2").value="Вес чугуна на кране",a.getCell("J2").font={bold:!0,family:2,size:12},a.getCell("J2").alignment={vertical:"center",horizontal:"center",wrapText:!0},a.getRow(3).values=s,a.columns=r,a.addRows(i);let l=0,u=0;a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){3===t||2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}}),t!==i.length+2&&t!==i.length+3||(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},l=t-1,u=l+1)}))})),a.mergeCells("A"+l,"D"+l),a.getCell("D"+l).value="Сумма:",a.getCell("D"+l).font={bold:!0,family:2,size:12},a.mergeCells("A"+u,"D"+u),a.getCell("D"+u).value="Среднее:",a.getCell("D"+u).font={bold:!0,family:2,size:12},b(a,3),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},dataFilter(e,t){e.data.items=e.data.items_readOnly;var r=[];t.forEach(t=>{r.push(y["a"].first(y["a"].filter(e.data.items,(function(e){return e["Номер плавки ККЦ"]==t.substr(0,8)}))))}),e.data.items=r,this.commit("HMCarReport/set_sumData",e.data.items),this.commit("HMCarReport/set_avgData",e.data.items)},set_sumData(e,t){e.data.sumData=y["a"].reduce(t,(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{})},set_avgData(e,t){e.data.avgData=y["a"].reduce(t,(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/t.length,2);return e}),{})},set_data(e,t){e.data.items=t[0],e.data.items.forEach(e=>{e.HEAT_START=e.HEAT_START.date.substr(0,19)}),e.data.items_readOnly=t[0],e.data.listHeatNumber=y["a"].map(e.data.items,(function(e){return y["a"].values(y["a"].pick(e,"Номер плавки ККЦ"))+" - ("+y["a"].values(y["a"].pick(e,"HEAT_START"))+")"}));let r=y["a"].map(e.data.items,(function(e){return y["a"].omit(e,"КЧ","МП350 №","Номер выпуска ДЦ","Номер плавки ККЦ","Снятие, %")}));this.commit("HMCarReport/set_sumData",r),this.commit("HMCarReport/set_avgData",r),e.data.headers=v(e.data.items)},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(ce)))}},actions:{getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getData_HMCarReport",dateStart:t[0],dateEnd:t[1]}}});return o.a.all([r]).then(o.a.spread((...t)=>{const r=t[0].data;0!==r.length?e("set_data",[r]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const pe={data:{headers:[],items:[],avgData:[],sumData:[]},loading:!1},me=JSON.parse(JSON.stringify(pe));var ge=Math.round;Math.round=function(e,t){if(1==arguments.length)return ge(e);var r=Math.pow(10,t);return ge(e*r)/r};var _e={namespaced:!0,state:me,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{set_sumData(e,t){e.data.sumData=y["a"].reduce(t,(function(e,t){for(var r in t)e[r]=Math.round((r in e?e[r]:0)+t[r],2);return e}),{})},set_avgData(e,t){e.data.avgData=y["a"].reduce(t,(function(e,r){for(var n in r)e[n]=Math.round((n in e?e[n]:0)+r[n]/t.length,2);return e}),{})},set_data(e,t){e.data.items=t[0],e.data.items.forEach(e=>{const t=new Date(e.Date.date);e.Date=`${t.getDate(e.Date)}.${t.getMonth(e.Date)+1}.${t.getFullYear(e.Date)}`}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"Date":e.text="Дата";break}}),this.commit("HM_DC/set_sumData",e.data.items),this.commit("HM_DC/set_avgData",e.data.items)},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(pe)))}},actions:{getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getData",dateStart:t[0],dateEnd:t[1]}}});return o.a.all([r]).then(o.a.spread((...t)=>{const r=t[0].data;0!==r.length?e("set_data",[r]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const ye={data:{headers:[],items:[]},loading:!1},ve=JSON.parse(JSON.stringify(ye));var be={namespaced:!0,state:ve,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=[],n=new M.a.Workbook,a=n.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}}),i=y["a"].keys(y["a"].first(e.data.items));y["a"].each(i,(function(e){r.push(y["a"].object(["key"],[e]))})),a.mergeCells("A1","AA"),a.getCell("C1").value=""+("Эксплуатации стальковшей с "+t[0]+" по "+t[1]+"\r\n"),a.getCell("C1").font={bold:!0,family:2,size:12},a.getCell("C1").alignment={vertical:"center",horizontal:"center",wrapText:!0};var s=a.getRow(1);s.height=20,a.getRow(2).values=i,a.columns=r,a.addRows(e.data.items),a.eachRow({includeEmpty:!0},(function(e,t){e.eachCell({includeEmpty:!0},(function(e){2===t?(a.getCell(e._address).fill={type:"pattern",pattern:"solid",fgColor:{argb:"e0e0e0"}},a.getCell(e._address).font={bold:!0},a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},a.getCell(e._address).alignment={vertical:"center",horizontal:"center"}):t>2&&(a.getCell(e._address).border={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}})}))})),b(a,2),n.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},set_data(e,t){e.data.items=t,e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"crew":e.text="Бригада";break;case"bof1_plan":e.text="План, т";break;case"bof2_plan":e.text="План, т";break;case"bof1_fact":e.text="Факт, т";break;case"bof2_fact":e.text="Факт, т";break;case"ccm1_plan":e.text="План, т";break;case"ccm2_plan":e.text="План, т";break;case"ccm1_fact":e.text="Факт, т";break;case"ccm2_fact":e.text="Факт, т";break;case"lf_plan":e.text="План, т";break;case"lf_fact":e.text="Факт, т";break}})},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(ye)))}},actions:{getData(e,t){e.commit("set_loading",!0),o()({data:{params:{flag:"getData_crewAggregateWeight",dateStart:t[0],dateEnd:t[1]}}}).then(t=>{const r=t.data;0!==r.length?e.commit("set_data",r):e.commit("resetState")}).catch(t=>{e.commit("set_loading",!1),e.commit("resetState"),console.log(t)}).finally(()=>{e.commit("set_loading",!1)})}}};const we={data:{headers:[],table:[],prostoiSelected:[],items:[],chart:{},label:[],originalDataset:[],originalDataItems:[],originalDataTable:[],minDate:[],maxDate:[]},loading:!1},xe=JSON.parse(JSON.stringify(we));var ke={namespaced:!0,state:xe,getters:{data:e=>e.data,loading:e=>e.loading},mutations:{getExcel(e,t){var r=new M.a.Workbook,n=r.addWorksheet("Документ создан\r\n"+new Date(Date.now()).print("%d.%m.%Y"),{properties:{showGridLines:!1}});n.mergeCells("A1","AA"),n.getCell("C1").value=""+("Эксплуатации стальковшей с "+t[0]+" по "+t[1]+"\r\n");var a=r.addImage({base64:t[2],extension:"png"});n.addImage(a,{br:{col:5,row:60},ext:{width:150,height:100},editAs:"oneCell"}),r.xlsx.writeBuffer().then(e=>F.a.saveAs(new Blob([e]),new Date(Date.now()).print("%d.%m.%Y")+".xlsx")).catch(e=>console.log("Error writing excel export",e)).finally(()=>{})},changeAggregate(e,t){this.commit("BOFHeatPhase/buildChartDataset",t)},refreshChart(e,t){let r=t[0];e.data.chart.dataset=e.data.originalDataset;let n=[];y["a"].pluck(r,"id").forEach(t=>{n.push(y["a"].where(e.data.table,{id:t}))}),e.data.prostoiSelected=y["a"].compact(y["a"].uniq(y["a"].flatten(n))).map(t=>({...t,heat_number:y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{id:t.id}),"HEAT_NUMBER")),phase_duration:y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{id:t.id}),"PROSTOI_DURATION")),prostoi_descr:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{id:t.id}),{PROSTOI_DESC:"Простой"}),"PP_Descr"))}));var a=[];r.forEach(t=>{a.push(y["a"].first(y["a"].filter(e.data.chart.dataset,(function(e){return e.id==t.id}))))}),e.data.chart.dataset=y["a"].reject(e.data.chart.dataset,{aggregate:"prostoy"}),y["a"].compact(y["a"].uniq(a)).forEach(t=>{e.data.chart.dataset.push(t)})},buildChartDataset(e,t){switch(e.data.items=e.data.originalDataItems,e.data.table=e.data.originalDataTable,t){case"K1":e.data.items=y["a"].where(e.data.items,{AGGREGATE_ID:1}),e.data.table=y["a"].where(e.data.table,{Agregat:"К1"});break;case"K2":e.data.items=y["a"].where(e.data.items,{AGGREGATE_ID:2}),e.data.table=y["a"].where(e.data.table,{Agregat:"К2"});break}let r=y["a"].reject(y["a"].where(e.data.table,{Descr:"Простой"}),{DescrPrichin:"Прочие"});e.data.prostoiSelected=y["a"].reject(r,{DescrPrichin:null}),e.data.prostoiSelected=e.data.prostoiSelected.map(t=>({...t,heat_number:y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{id:t.id}),"HEAT_NUMBER")),phase_duration:y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{id:t.id}),"PROSTOI_DURATION")),prostoi_descr:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{id:t.id}),{PROSTOI_DESC:"Простой"}),"PP_Descr"))})),e.data.chart.label=[],e.data.chart.dataset=[];let n=y["a"].uniq(y["a"].pluck(y["a"].where(e.data.items,{AGGREGATE_ID:1}),"HEAT_NUMBER")),a=y["a"].uniq(y["a"].pluck(y["a"].where(e.data.items,{AGGREGATE_ID:2}),"HEAT_NUMBER"));0!=y["a"].size(n)&&(e.data.chart.label.push("K1"),e.data.chart.label.push(n)),0!=y["a"].size(a)&&(e.data.chart.label.push("K2"),e.data.chart.label.push(a)),e.data.chart.label=y["a"].flatten(e.data.chart.label);let i=function(e,t){let r=new Date(e),n=new Date(t),a=n-r;return Math.round(a/1e3/60)};e.data.chart.label.forEach(t=>{let r=new Date(y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Завалка"}),"DATE_START"))),n=null===y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив шлака"}),"DATE_END"))?new Date(y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив металла"}),"DATE_END"))):new Date(y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив шлака"}),"DATE_END")));e.data.chart.dataset.push({aggregate:"bof",backgroundColor:"#51C27F",date_start:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Завалка"}),"DATE_START")),date_end:null===y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив шлака"}),"DATE_END"))?y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив металла"}),"DATE_END")):y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PHASE_NAME:"Слив шлака"}),"DATE_END")),data:[{x:[r,n],y:t,PHASE_DURATION:n.getTime()>=new Date(e.data.date_start_hidden).getTime()&&n.getTime()<=new Date(e.data.date_end_hidden).getTime()?i(r,n):""}]})}),e.data.chart.label.forEach(t=>{let r=y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PROSTOI_DESC:"Простой"}),"P_START")),n=y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PROSTOI_DESC:"Простой"}),"P_END"));e.data.chart.dataset.push({aggregate:"prostoy",id:y["a"].first(y["a"].uniq(y["a"].compact(y["a"].pluck(y["a"].where(e.data.items,{HEAT_NUMBER:t}),"id")))),backgroundColor:"#C2CBD1",p_start:r,p_end:n,data:[{x:[r,n],y:t,PHASE_DURATION:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PROSTOI_DESC:"Простой"}),"PROSTOI_DURATION")),prostoi_name:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{PROSTOI_DESC:"Простой"}),"PP_Descr"))}]})}),e.data.chart.label.forEach(t=>{let r=y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{HEAT_NUMBER:t}),"LF_START")),n=y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{HEAT_NUMBER:t}),"LF_END"));e.data.chart.dataset.push({aggregate:"lf",backgroundColor:"#FF6F4D",lf_start:r,lf_end:n,data:[{x:[r,y["a"].isNull(n)?r:n],y:t,PHASE_DURATION:new Date(n).getTime()>=new Date(e.data.date_start_hidden).getTime()&&new Date(n).getTime()<=new Date(e.data.date_end_hidden).getTime()?y["a"].first(y["a"].pluck(y["a"].where(e.data.items,{HEAT_NUMBER:t}),"LF_DURATION")):""}]})}),e.data.chart.label.forEach(t=>{let r=new Date(y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:1}),"CCM_STATUS_TIME"))),n=new Date(y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:2}),"CCM_STATUS_TIME")));"Invalid Date"!=n&&e.data.chart.dataset.push({aggregate:"ccm_status2",backgroundColor:"#00eeff",ccm_status2_start:y["a"].first(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:1}),"CCM_STATUS_TIME")),ccm_status2_end:y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:2}),"CCM_STATUS_TIME")),data:[{x:[r,n],y:t,PHASE_DURATION:n.getTime()>=new Date(e.data.date_start_hidden).getTime()&&n.getTime()<=new Date(e.data.date_end_hidden).getTime()?i(r,n):""}]})}),e.data.chart.label.forEach(t=>{let r=new Date(y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:2}),"CCM_STATUS_TIME"))),n=new Date(y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:3}),"CCM_STATUS_TIME")));"Invalid Date"!=n&&e.data.chart.dataset.push({aggregate:"ccm_status3",backgroundColor:"#01d5e4",ccm_status3_start:y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:2}),"CCM_STATUS_TIME")),ccm_status3_end:y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:3}),"CCM_STATUS_TIME")),data:[{x:[r,n],y:t,PHASE_DURATION:n.getTime()>=new Date(e.data.date_start_hidden).getTime()&&n.getTime()<=new Date(e.data.date_end_hidden).getTime()?i(r,n):""}]})}),e.data.chart.label.forEach(t=>{let r=new Date(y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:3}),"CCM_STATUS_TIME"))),n=new Date(y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:7}),"CCM_STATUS_TIME")));"Invalid Date"!=n&&e.data.chart.dataset.push({aggregate:"ccm_status4",backgroundColor:"#03a2ad",ccm_status4_start:y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:3}),"CCM_STATUS_TIME")),ccm_status4_end:y["a"].last(y["a"].pluck(y["a"].where(y["a"].where(e.data.items,{HEAT_NUMBER:t}),{CCM_STATUS:7}),"CCM_STATUS_TIME")),data:[{x:[r,n],y:t,PHASE_DURATION:n.getTime()>=new Date(e.data.date_start_hidden).getTime()&&n.getTime()<=new Date(e.data.date_end_hidden).getTime()?i(r,n):""}]})}),e.data.originalDataset=e.data.chart.dataset},set_data(e,t){e.data.items=t[0],e.data.originalDataItems=e.data.items,e.data.table=t[1],e.data.originalDataTable=e.data.table,e.data.headers=v(e.data.table);let r=t[2][2];e.data.date_start_hidden=new Date(new Date(r).getFullYear(),new Date(r).getMonth(),new Date(r).getDate()).toISOString().substr(0,10)+" 23:30:00",e.data.date_end_hidden=new Date(new Date(r).getFullYear(),new Date(r).getMonth(),new Date(r).getDate()+1).toISOString().substr(0,10)+" 23:00:00",e.data.headers.forEach(e=>{switch(e.text){case"Agregat":e.text="Агрегат";break;case"Descr":e.text="Этапы";break;case"Br":e.text="Бригада";break;case"DtB":e.text="Начало";break;case"DtE":e.text="Конец";break;case"Cikl":e.text="Длительность";break;case"RashDtB":e.text="Начало";break;case"RashDtE":e.text="Конец";break;case"Cikl2":e.text="Длительность";break;case"DescrGroup":e.text="Группа";break;case"DescrPrichin":e.text="Причина";break;case"Prim":e.text="Примечание";break}}),this.commit("BOFHeatPhase/buildChartDataset")},set_loading(e,t){e.loading=t},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(we)))}},actions:{changeAggregate({commit:e},t){e("changeAggregate",t)},refreshChart({commit:e},t){e("refreshChart",t)},getData({commit:e},t){e("set_loading",!0);const r=o()({data:{params:{flag:"getData_BOFHeatPhase",dateStart:t[0],dateEnd:t[1]}}}),n=o()({data:{params:{flag:"getData_BOFHeatPhaseProstoi",dateStart:t[0],dateEnd:t[1]}}});return o.a.all([r,n]).then(o.a.spread((...r)=>{const n=r[0].data,a=r[1].data;n.length?e("set_data",[n,a,t]):e("resetState")})).catch(t=>{e("set_loading",!1),e("resetState"),console.log(t)}).finally(()=>{e("set_loading",!1)})}}};const Te={data:{headers:[],items:[]},history:{headers:[],items:[]},loading:!1,loading_file:!1,loading_history:!1,isLogging:!1,uploadText:"",uploadStatus:""},Se=JSON.parse(JSON.stringify(Te));var Ee={namespaced:!0,state:Se,getters:{data:e=>e.data,history:e=>e.history,loading:e=>e.loading,loading_file:e=>e.loading_file,loading_history:e=>e.loading_history,isLogging:e=>e.isLogging,uploadText:e=>e.uploadText,uploadStatus:e=>e.uploadStatus},mutations:{set_data(e,t){e.isLogging?e.data.items=t:e.data.items=y["a"].where(t,{isCompleted:1}),e.data.headers=v(e.data.items),e.data.headers.forEach(e=>{switch(e.text){case"id":e.text="История";break;case"isCompleted":e.text="Выверен";break;case"file_name":e.text="Имя файла";break}})},set_history(e,t){e.history.items=t,e.history.headers=v(e.history.items),e.history.headers.forEach(e=>{switch(e.text){case"IP_Author":e.text="IP Автора";break;case"IP_Client":e.text="IP Клиента";break;case"download_date":e.text="Дата загрузки";break}})},setCompleted(e,t){y["a"].findWhere(e.data.items,{id:t.id}).isCompleted=t.value},set_loading(e,t){e.loading=t},set_loading_file(e,t){e.loading_file=t},set_loading_history(e,t){e.loading_history=t},set_logging(e,t){e.isLogging=t},set_uploadText(e,t){e.uploadText=t},set_uploadStatus(e,t){e.uploadStatus=t},setStorage(e,t){"prbamk"===t&&localStorage.setItem("PRBpass",t)},resetState(e){Object.assign(e,JSON.parse(JSON.stringify(Te)))}},actions:{logout({commit:e}){delete localStorage.PRBpass,e("set_logging",!1)},logging({commit:e},t){"prbamk"===t&&e("set_logging",!0)},getStorage({commit:e}){let t=localStorage.getItem("PRBpass");"prbamk"===t&&e("set_logging",!0)},File_Upload(e,t){return console.log(t),e.commit("set_loading_file",!0),o.a.post("http://192.168.76.100:81//_api_server_vue//modules/PRB_FileControl/File_Upload.php",t.file,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>o()({data:{params:{flag:"insertFileInfo",data:{item:r.data.item,date:t.date}}}}).then(()=>{e.commit("set_uploadText",r.data.item.success),e.commit("set_uploadStatus",!0),e.commit("set_loading_file",!1)}).catch(()=>{e.commit("set_loading_file",!1)}).finally(()=>{e.commit("set_loading_file",!1)})).catch(()=>{e.commit("set_loading",!1),e.commit("set_loading_file",!1),e.commit("set_uploadText","Не удалось загрузить файл."),e.commit("set_uploadStatus",!1)}).finally(()=>{})},getData({commit:e},t){return e("set_loading",!0),o()({data:{params:{flag:"getFiles",data:t}}}).then(t=>{const r=t.data;e("set_data",r),e("set_loading",!1)}).catch(()=>{e("set_loading",!1)}).finally(()=>{e("set_loading",!1)})},getHistory({commit:e},t){return e("set_loading_history",!0),o()({data:{params:{flag:"getHistory",data:t}}}).then(t=>{const r=t.data;e("set_history",r),e("set_loading_history",!1)}).catch(()=>{e("set_loading_history",!1)}).finally(()=>{e("set_loading_history",!1)})},setCompleted({commit:e},t){return e("set_loading",!0),o()({data:{params:{flag:"setCompleted",data:t}}}).then(()=>{e("setCompleted",t),e("set_loading",!1)}).catch(()=>{e("set_loading",!1)}).finally(()=>{e("set_loading",!1)})},setHistory({commit:e},t){return e("set_loading",!0),o()({data:{params:{flag:"setHistory",id:t}}}).then(()=>{e("set_loading",!1)}).catch(()=>{e("set_loading",!1)}).finally(()=>{e("set_loading",!1)})},deleteData({commit:e},t){return e("set_loading",!0),o()({data:{params:{flag:"deleteData",data:t}}}).then(()=>{e("set_loading",!1)}).catch(()=>{e("set_loading",!1)}).finally(()=>{e("set_loading",!1)})}}};n["a"].use(_["a"]);const Ce=new _["a"].Store({modules:{stat:k,prohodnaya:E,weatherAvg:A,tundishSample:R,BOFReportSample_A1:U,BOFReportSample_A2:H,BOFReportSample_B1:Y,BOFReportSample_C1:X,BOFReportSample_D1:q,BOFMainUseConfig:ee,BOFReportAvgData_Marka:ne,Pasport_KRO:se,LadleUse:ue,HMCarReport:fe,HM_DC:_e,crewAggregateWeight:be,BOFHeatPhase:ke,PRB_FileControl:Ee},strict:!1});var Oe=Ce,Ae=r("8c4f");n["a"].use(Ae["a"]);const De=[{path:"/",name:"index",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("index")]).then(r.bind(null,"6e78"))},{path:"/prohodnaya",name:"prohodnaya",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-187a5f3f")]).then(r.bind(null,"ae80"))},{path:"/weatherAvg",name:"weatherAvg",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-28dc4aef")]).then(r.bind(null,"6045"))},{path:"/tundishSample",name:"tundishSample",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-1b4ec2a7")]).then(r.bind(null,"3e69"))},{path:"/BOFReport/BOFReportSample_A1",name:"BOFReportSample_A1",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-2ae756f5")]).then(r.bind(null,"6593")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFReportSample_A2",name:"BOFReportSample_A2",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-75bd6bd9")]).then(r.bind(null,"5631")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFReportSample_B1",name:"BOFReportSample_B1",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-4348ccc7")]).then(r.bind(null,"1324")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFReportSample_C1",name:"BOFReportSample_C1",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-39ed1a08")]).then(r.bind(null,"e1f6")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFReportSample_D1",name:"BOFReportSample_D1",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-33abae75")]).then(r.bind(null,"76ed")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFMainUseConfig",name:"BOFMainUseConfig",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-2f415156")]).then(r.bind(null,"2703")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/BOFReport/BOFReportAvgData_Marka",name:"BOFReportAvgData_Marka",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-5cee169e"),r.e("chunk-56216674")]).then(r.bind(null,"a2a2")),beforeEnter(e,t,r){o.a.defaults.headers.post["project"]="BOFReport",r()}},{path:"/Pasport_KRO",name:"Pasport_KRO",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-461f6ae6")]).then(r.bind(null,"b2d1"))},{path:"/LadleUse",name:"LadleUse",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-5e54c849")]).then(r.bind(null,"7b3c"))},{path:"/HMCarReport",name:"HMCarReport",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-36308615")]).then(r.bind(null,"66e9"))},{path:"/HM_DC",name:"HM_DC",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-099daac5")]).then(r.bind(null,"01a6"))},{path:"/crewAggregateWeight",name:"crewAggregateWeight",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-366d1341")]).then(r.bind(null,"1247"))},{path:"/BOFHeatPhase",name:"BOFHeatPhase",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-5cee169e"),r.e("chunk-e2532de8")]).then(r.bind(null,"4848"))},{path:"/PRB_FileControl",name:"PRB_FileControl",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-fecca1e4"),r.e("chunk-734bbfda")]).then(r.bind(null,"b688"))},{path:"/stat",name:"Stat",component:()=>Promise.all([r.e("chunk-3ac51e83"),r.e("chunk-dfddc2f4"),r.e("chunk-732e6f1b")]).then(r.bind(null,"7e0a"))}],Ne=new Ae["a"]({routes:De,mode:"hash"});Ne.beforeEach((e,t,r)=>{"index"===e.name?o.a.defaults.headers.post["project"]="stat":(o.a.defaults.headers.post["project"]="stat",Oe.dispatch("stat/addData",e.name),o.a.defaults.headers.post["project"]=e.name),r()});var Re=Ne,Ie=(r("5363"),r("d1e78"),r("f309")),Me=r("2992"),Pe=r.n(Me);n["a"].use(Ie["a"]);var Fe=new Ie["a"]({icons:{iconfont:"mdi"},lang:{locales:{ru:Pe.a},current:"ru"}});n["a"].config.productionTip=!1,n["a"].use(y["b"]),new n["a"]({store:Oe,router:Re,vuetify:Fe,render:e=>e(g)}).$mount("#app")},"70ad":function(e,t,r){},e686:function(e,t,r){"use strict";r("70ad")}});