var Pn=Object.defineProperty,In=Object.defineProperties;var An=Object.getOwnPropertyDescriptors;var Lr=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable;var Fr=(oe,Se,ke)=>Se in oe?Pn(oe,Se,{enumerable:!0,configurable:!0,writable:!0,value:ke}):oe[Se]=ke,Dt=(oe,Se)=>{for(var ke in Se||(Se={}))Nn.call(Se,ke)&&Fr(oe,ke,Se[ke]);if(Lr)for(var ke of Lr(Se))Dn.call(Se,ke)&&Fr(oe,ke,Se[ke]);return oe},pr=(oe,Se)=>In(oe,An(Se));var mr=(oe,Se,ke)=>new Promise((vr,tr)=>{var gr=Ne=>{try{Fe(ke.next(Ne))}catch(Re){tr(Re)}},pe=Ne=>{try{Fe(ke.throw(Ne))}catch(Re){tr(Re)}},Fe=Ne=>Ne.done?vr(Ne.value):Promise.resolve(Ne.value).then(gr,pe);Fe((ke=ke.apply(oe,Se)).next())});import{A as Bn,e as Ln,T as Fn,__tla as zn}from"./componentMap-44c327dc.js";import{c as Un,__tla as Hn}from"./index-7a87ec93.js";import{__tla as Vn}from"./helper-01a18f25.js";import{aq as qn,ar as Wn,as as Zt,at as $n,X as Xn,B as Gn,l as Kn,au as yr,av as Yn,aw as zr,w as Zn,b as Jn,__tla as Qn}from"./index-f0df2f76.js";import{__tla as to}from"./BasicForm.vue_vue_type_style_index_0_lang-58da98b0.js";import{F as eo,V as Ur,aq as ro,ar as no,a6 as oo,ai as io,as as ao,af as so,ad as uo,aj as co,au as fo,av as Qe,aw as lo,az as ho,C as ne,E as po}from"./antd-057b41b1.js";import{__tla as mo}from"./index-206406c4.js";import{__tla as yo}from"./RadioButtonGroup-3086b2b2.js";import{__tla as bo}from"./TableImg.vue_vue_type_style_index_0_lang-0681b671.js";import{P as vo,__tla as go}from"./index-e26b3a3c.js";import{vxeTableColumns as wo,vxeTableFormSchema as _o,__tla as xo}from"./tableData-2d24c1bc.js";import{d as Hr,k as Vr,e as kr,f as br,ac as qr,i as ko,n as de,a7 as We,r as So,_ as Oo,a8 as jo,a9 as Wr,u as Sr}from"./vue-1631514e.js";import{d as $r,__tla as Ro}from"./table-68e57af6.js";import"./useFormItem-d5f46e05.js";import{__tla as Eo}from"./download-dc45853f.js";import"./base64Conver-39fc0d26.js";import{__tla as To}from"./index-6f5324ed.js";import{__tla as Co}from"./IconPicker.vue_vue_type_style_index_0_lang-ab92f5b0.js";import{__tla as Mo}from"./useCopyToClipboard-9d1e4453.js";import{__tla as Po}from"./index-79e4735b.js";import{__tla as Io}from"./index-a2613349.js";import{__tla as Ao}from"./useWindowSizeFn-53b82e7c.js";import"./sortable.esm-f208c0d8.js";import{__tla as No}from"./useContentViewHeight-c315421e.js";import"./onMountedOrActivated-5690e97c.js";import{__tla as Do}from"./select-8115d24d.js";let Xr,Bo=Promise.all([(()=>{try{return zn}catch(oe){}})(),(()=>{try{return Hn}catch(oe){}})(),(()=>{try{return Vn}catch(oe){}})(),(()=>{try{return Qn}catch(oe){}})(),(()=>{try{return to}catch(oe){}})(),(()=>{try{return mo}catch(oe){}})(),(()=>{try{return yo}catch(oe){}})(),(()=>{try{return bo}catch(oe){}})(),(()=>{try{return go}catch(oe){}})(),(()=>{try{return xo}catch(oe){}})(),(()=>{try{return Ro}catch(oe){}})(),(()=>{try{return Eo}catch(oe){}})(),(()=>{try{return To}catch(oe){}})(),(()=>{try{return Co}catch(oe){}})(),(()=>{try{return Mo}catch(oe){}})(),(()=>{try{return Po}catch(oe){}})(),(()=>{try{return Io}catch(oe){}})(),(()=>{try{return Ao}catch(oe){}})(),(()=>{try{return No}catch(oe){}})(),(()=>{try{return Do}catch(oe){}})()]).then(()=>mr(void 0,null,function*(){const oe=pr(Dt({},qn),{columns:Array,pagerConfig:{type:Object,default:()=>({})},proxyConfig:{type:Object,default:()=>({})},toolbarConfig:{type:Object,default:()=>({})},formConfig:{type:Object,default:()=>({})},zoomConfig:{type:Object,default:()=>({})},printConfig:{type:Object,default:()=>({})},exportConfig:{type:Object,default:()=>({})},importConfig:{type:Object,default:()=>({})},size:String,tableClass:{type:String,default:""},tableStyle:{type:Object,default:()=>({})}}),Se=["tableClass","tableStyle"],ke=[...Wn,"page-change","form-submit","form-submit-invalid","form-reset","form-collapse","form-toggle-collapse","toolbar-button-click","toolbar-tool-click","zoom"],vr=["dispatchEvent","commitProxy","getFormItems","getPendingRecords","zoom","isMaximized","maximize","revert","getProxyInfo","clearAll","syncData","updateData","loadData","reloadData","reloadRow","loadColumn","reloadColumn","getRowNode","getColumnNode","getRowIndex","getVTRowIndex","getVMRowIndex","getColumnIndex","getVTColumnIndex","getVMColumnIndex","createData","createRow","revertData","clearData","isInsertByRow","isUpdateByRow","getColumns","getColumnById","getColumnByField","getTableColumn","getData","getCheckboxRecords","getParentRow","getRowSeq","getRowById","getRowid","getTableData","hideColumn","showColumn","resetColumn","refreshColumn","refreshScroll","recalculate","closeTooltip","isAllCheckboxChecked","isAllCheckboxIndeterminate","getCheckboxIndeterminateRecords","setCheckboxRow","isCheckedByCheckboxRow","isIndeterminateByCheckboxRow","toggleCheckboxRow","setAllCheckboxRow","getRadioReserveRecord","clearRadioReserve","getCheckboxReserveRecords","clearCheckboxReserve","toggleAllCheckboxRow","clearCheckboxRow","setCurrentRow","isCheckedByRadioRow","setRadioRow","clearCurrentRow","clearRadioRow","getCurrentRecord","getRadioRecord","getCurrentColumn","setCurrentColumn","clearCurrentColumn","sort","clearSort","isSort","getSortColumns","closeFilter","isFilter","isRowExpandLoaded","clearRowExpandLoaded","reloadRowExpand","reloadRowExpand","toggleRowExpand","setAllRowExpand","setRowExpand","isExpandByRow","clearRowExpand","clearRowExpandReserve","getRowExpandRecords","getTreeExpandRecords","isTreeExpandLoaded","clearTreeExpandLoaded","reloadTreeExpand","reloadTreeChilds","toggleTreeExpand","setAllTreeExpand","setTreeExpand","isTreeExpandByRow","clearTreeExpand","clearTreeExpandReserve","getScroll","scrollTo","scrollToRow","scrollToColumn","clearScroll","updateFooter","updateStatus","setMergeCells","removeInsertRow","removeMergeCells","getMergeCells","clearMergeCells","setMergeFooterItems","removeMergeFooterItems","getMergeFooterItems","clearMergeFooterItems","openTooltip","focus","blur","connect","insert","insertAt","remove","removeCheckboxRow","removeRadioRow","removeCurrentRow","getRecordset","getInsertRecords","getRemoveRecords","getUpdateRecords","getEditRecord","getSelectedCell","clearSelected","isEditByRow","setEditRow","setEditCell","setSelectCell","clearValidate","fullValidate","validate"];function tr(dt){return typeof dt=="function"||Object.prototype.toString.call(dt)==="[object Object]"&&!ko(dt)}const gr=Hr({name:"VxeBasicTable",props:oe,emits:ke,setup(dt,{emit:mt,attrs:h}){const A=Vr(),E={},y=(c=>{const f={};return c.forEach(s=>{f[s]=(...n)=>{const t=A.value;if(t&&t[s])return t[s](...n)}}),f})(vr);ke.forEach(c=>{const f=Zt.camelCase(`on-${c}`);E[f]=(...s)=>mt(c,...s)});const p=kr(()=>Dt(Dt({},h),dt)),v=kr(()=>Dt(Dt({},eo(p.value,Se)),m)),d=kr(()=>[h.class]),m=Dt({},E);return Dt({getWrapperClass:d,getBindGridValues:v,tableElRef:A},y)},render(){let dt;const{tableClass:mt,tableStyle:h}=this.$props;return br("div",{class:`h-full flex flex-col bg-white ${this.getWrapperClass}`},[br($n,qr({ref:"tableElRef",class:`vxe-grid_scrollbar px-6 py-4 ${mt}`,style:h},this.getBindGridValues),tr(dt=Xn(this.$slots))?dt:{default:()=>[dt]})])}}),pe=new Map;pe.set("AButton",Gn),pe.set("AInput",Ur),pe.set("AInputSearch",Ur.Search),pe.set("AInputNumber",ro),pe.set("AAutoComplete",no),pe.set("ASelect",oo),pe.set("ATreeSelect",io),pe.set("ASwitch",ao),pe.set("ARadioGroup",so.Group),pe.set("ACheckboxGroup",uo.Group),pe.set("ACascader",co),pe.set("ARate",fo),pe.set("ADatePicker",Qe),pe.set("AMonthPicker",Qe.MonthPicker),pe.set("ARangePicker",Qe.RangePicker),pe.set("AWeekPicker",Qe.WeekPicker),pe.set("AYearPicker",Qe.YearPicker),pe.set("ATimePicker",lo),pe.set("AApiSelect",Bn),pe.set("AApiTreeSelect",Ln),pe.set("AEmpty",ho);const{t:Fe}=Kn();function Ne(dt){if(dt)return dt.includes("RangePicker")?[Fe("common.chooseText"),Fe("common.chooseText")]:dt.includes("Input")||dt.includes("Complete")||dt.includes("Rate")?Fe("common.inputText"):Fe("common.chooseText")}function Re(dt){const mt=pe.get(dt);if(!mt)throw`\u60A8\u8FD8\u6CA1\u6CE8\u518C\u6B64\u7EC4\u4EF6 ${dt}`;return mt}function er(dt){return dt==null||dt===""}function wr(dt){return""+(er(dt)?"":dt)}function rr(dt){return[wr(dt)]}function nr(dt){return"on"+dt.substring(0,1).toLocaleUpperCase()+dt.substring(1)}function Gr(dt){let mt="value";switch(dt.name){case"ASwitch":mt="checked";break}return mt}function Kr(dt){let mt="update:value";switch(dt.name){case"ASwitch":mt="update:checked";break}return mt}function Yr(){return"change"}function Zr(){return"click"}function Te(dt,mt,h,A,E){const{events:y}=dt,p=Kr(dt),v=Yr(),d=Zr(),m=v===p,c={};return Zt.objectEach(y,(f,s)=>{c[nr(s)]=function(...n){f(mt,...n)}}),h&&(c[nr(p)]=function(f){h(f),y&&y[p]&&y[p](mt,f),m&&A&&A(f)}),!m&&A&&(c[nr(v)]=function(...f){A(...f),y&&y[v]&&y[v](mt,...f)}),E&&(c[nr(d)]=function(...f){E(...f),y&&y[d]&&y[d](mt,...f)}),c}function Ce(dt,mt,h){const A=dt.name;return Zt.assign({placeholder:Ne(A),allowClear:!0},h,dt.props,{[Gr(dt)]:mt})}function ze(dt,mt){return function(h,A){var s;const{row:E,column:y,$table:p}=A,{name:v,attrs:d}=h,m=Zt.get(E,y.field),c=(s=mt&&mt(h,A))!=null?s:{},f=Re(v);return[de(f,Dt(Dt(Dt(Dt({},d),Ce(h,m,dt)),c),Te(h,A,n=>Zt.set(E,y.field,n),()=>p.updateStatus(A))))]}}function Oe(dt,mt){return function(h,A){var s;const{row:E,column:y,$table:p}=A,{name:v,attrs:d}=h,m=Zt.get(E,y.field),c=(s=mt&&mt(h,A))!=null?s:{},f=Re(v);return[de(f,Dt(Dt(Dt(Dt({},d),Ce(h,m,dt)),c),Te(h,A,n=>Zt.set(E,y.field,n),()=>p.updateStatus(A))))]}}function Ze(dt,mt){return function(h,A){var m;const{column:E}=A,{name:y,attrs:p}=h,v=(m=mt&&mt(h,A))!=null?m:{},d=Re(y);return[de("div",{class:"vxe-table--filter-antd-wrapper"},E.filters.map((c,f)=>{const s=c.data,n=!!c.data;return de(d,Dt(Dt(Dt(Dt({key:f},p),Ce(h,s,dt)),v),Te(h,A,t=>{c.data=t},()=>{const{$panel:t}=A;t.changeOption(null,n,c)})))}))]}}function $e(){return function(dt){const{option:mt,row:h,column:A}=dt,{data:E}=mt;return Zt.get(h,A.field)===E}}function we(dt,mt){return function(h,A){var s;const E=(s=mt&&mt(h,A))!=null?s:{},{data:y,property:p,$form:v}=A,{name:d}=h,{attrs:m}=h,c=Zt.get(y,p),f=Re(d);return[de(f,Dt(Dt(Dt(Dt({},m),Ce(h,c,dt)),E),Te(h,A,n=>{Zt.set(y,p,n)},()=>{v.updateStatus(pr(Dt({},A),{field:p}))})))]}}function De(dt,mt){return function(h,A){var v;const E=(v=mt&&mt(h,A))!=null?v:[],y=dt&&dt(h,A,...E),{placeholder:p}=h;return[de("span",{class:"vxe-cell--label"},p&&er(y)?[de("span",{class:"vxe-cell--placeholder"},wr(p))]:wr(y))]}}function Be(dt,mt){return function(h){var v;const{row:A,column:E,options:y}=h,p=(v=mt&&mt(h))!=null?v:[];return y&&y.original?Zt.get(A,E.field):dt(E.editRender||E.cellRender,h,...p)}}function Jr(dt,mt){return function(h,A){var d;const{name:E,attrs:y}=h,p=(d=mt&&mt(h,A))!=null?d:{},v=Re(E);return[de(v,Dt(Dt(Dt(Dt({},y),Ce(h,null,dt)),p),Te(h,A)))]}}const Qr={autofocus:"input.ant-input",renderDefault:ze(),renderEdit:Oe(),renderFilter:Ze(),defaultFilterMethod:$e(),renderItemContent:we()},tn={autofocus:"input.ant-input",renderDefault:ze(),renderEdit:Oe(),renderFilter:Ze(),defaultFilterMethod:$e(),renderItemContent:we()},en={autofocus:"input.ant-input-number-input",renderDefault:ze(),renderEdit:Oe(),renderFilter:Ze(),defaultFilterMethod:$e(),renderItemContent:we()};function or(dt,mt){const h=mt.label||"label",A=mt.value||"value";return Zt.map(dt,(E,y)=>de(We("a-select-option"),{key:y,value:E[A],disabled:E.disabled},{default:()=>rr(E[h])}))}function rn(){return function(dt,mt){const{options:h=[],optionGroups:A,optionProps:E={},optionGroupProps:y={}}=dt,{row:p,column:v,$table:d}=mt,{attrs:m}=dt,c=Zt.get(p,v.field),f=Ce(dt,c),s=Te(dt,mt,n=>{Zt.set(p,v.field,n)},()=>{d.updateStatus(mt)});if(A){const n=y.options||"options",t=y.label||"label";return[de(We("a-select"),Dt(Dt(Dt({},m),f),s),{default:()=>Zt.map(A,(e,r)=>de(We("a-select-opt-group"),{key:r},{label:()=>de("span",{},e[t]),default:()=>or(e[n],E)}))})]}return[de(We("a-select"),Dt(Dt(Dt({},f),m),s),{default:()=>or(h,E)})]}}function Or(dt,mt){const{options:h=[],optionGroups:A,props:E={},optionProps:y={},optionGroupProps:p={}}=dt,{row:v,column:d}=mt,m=y.label||"label",c=y.value||"value",f=p.options||"options",s=Zt.get(v,d.field);return er(s)?"":Zt.map(E.mode==="multiple"?s:[s],A?n=>{let t;for(let e=0;er[c]===n),!t);e++);return t?t[m]:n}:n=>{const t=Zt.find(h,e=>e[c]===n);return t?t[m]:n}).join(", ")}function nn(){return function(dt,mt){const{options:h=[],optionGroups:A,optionProps:E={},optionGroupProps:y={}}=dt,p=y.options||"options",v=y.label||"label",{column:d}=mt,{attrs:m}=dt;return[de("div",{class:"vxe-table--filter-antd-wrapper"},A?d.filters.map((c,f)=>{const s=c.data,n=Ce(dt,s);return de(We("a-select"),Dt(Dt(Dt({key:f},m),n),Te(dt,mt,t=>{c.data=t},()=>{const{$panel:t}=mt;t.changeOption(null,n.mode==="multiple"?c.data&&c.data.length>0:!Zt.eqNull(c.data),c)})),{default:()=>Zt.map(A,(t,e)=>de(We("a-select-opt-group"),{key:e},{label:()=>de("span",{},t[v]),default:()=>or(t[p],E)}))})}):d.filters.map((c,f)=>{const s=c.data,n=Ce(dt,s);return de(We("a-select"),Dt(Dt(Dt({key:f},m),n),Te(dt,mt,t=>{c.data=t},()=>{const{$panel:t}=mt;t.changeOption(null,n.mode==="multiple"?c.data&&c.data.length>0:!Zt.eqNull(c.data),c)})),{default:()=>or(h,E)})}))]}}const on={renderEdit:rn(),renderCell:De(Or),renderFilter:nn(),defaultFilterMethod(dt){const{option:mt,row:h,column:A}=dt,{data:E}=mt,{field:y,filterRender:p}=A,{props:v={}}=p,d=Zt.get(h,y);return v.mode==="multiple"?Zt.isArray(d)?Zt.includeArrays(d,E):E.indexOf(d)>-1:d==E},renderItemContent:we(),exportMethod:Be(Or)};function jr(dt,mt,h,A){const E=h[dt];mt&&h.length>dt&&Zt.each(mt,y=>{y.value===E&&(A.push(y.label),jr(++dt,y.children,h,A))})}function Rr(dt,mt){const{props:h={}}=dt,{row:A,column:E}=mt,y=Zt.get(A,E.field)||[],p=[];return jr(0,h.options,y,p),(h.showAllLevels===!1?p.slice(p.length-1,p.length):p).join(` ${h.separator||"/"} `)}const an={renderEdit:Oe(),renderCell:De(Rr),renderItemContent:we(),exportMethod:Be(Rr)};function Ie(dt,mt,h){const{props:A={}}=dt,{row:E,column:y}=mt;let p=Zt.get(E,y.field);return p&&(p=p.format(A.format||h)),p}const sn={renderEdit:Oe(),renderCell:De(Ie,()=>["YYYY-MM-DD"]),renderItemContent:we(),exportMethod:Be(Ie,()=>["YYYY-MM-DD"])},un={renderEdit:Oe(),renderCell:De(Ie,()=>["YYYY-MM"]),renderItemContent:we(),exportMethod:Be(Ie,()=>["YYYY-MM"])};function Er(dt,mt){const{props:h={}}=dt,{row:A,column:E}=mt;let y=Zt.get(A,E.field);return y&&(y=Zt.map(y,p=>p.format(h.format||"YYYY-MM-DD")).join(" ~ ")),y}const cn={renderEdit:Oe(),renderCell:De(Er),renderItemContent:we(),exportMethod:Be(Er)},fn={renderEdit:Oe(),renderCell:De(Ie,()=>["YYYY-WW\u5468"]),renderItemContent:we(),exportMethod:Be(Ie,()=>["YYYY-WW\u5468"])};function Tr(dt,mt){const{props:h={}}=dt,{treeData:A,treeCheckable:E}=h,{row:y,column:p}=mt,v=Zt.get(y,p.field);return er(v)?v:Zt.map(E?v:[v],d=>{const m=Zt.findTree(A,c=>c.value===d,{children:"children"});return m?m.item.title:d}).join(", ")}const ln={renderEdit:Oe(),renderCell:De(Tr),renderItemContent:we(),exportMethod:Be(Tr)},hn={renderEdit:Oe(),renderCell:De(Ie,()=>["HH:mm:ss"]),renderItemContent:we(),exportMethod:Be(Ie,()=>["HH:mm:ss"])},dn={renderDefault:ze(),renderEdit:Oe(),renderFilter:Ze(),defaultFilterMethod:$e(),renderItemContent:we()},pn={renderDefault:ze(),renderEdit:Oe(),renderFilter(dt,mt){const{column:h}=mt,{name:A,attrs:E}=dt,y=Re(A);return[de("div",{class:"vxe-table--filter-antd-wrapper"},h.filters.map((p,v)=>{const d=p.data;return de(y,Dt(Dt(Dt({key:v},E),Ce(dt,d)),Te(dt,mt,m=>{p.data=m},()=>{const{$panel:m}=mt;m.changeOption(null,Zt.isBoolean(p.data),p)})))}))]},defaultFilterMethod:$e(),renderItemContent:we()},mn={renderItemContent:we()},yn={renderItemContent:we()},ir="AButton";function Cr(){return function(dt,mt){const{attrs:h}=dt,A=Re(ir);return[de(A,Dt(Dt(Dt({},h),Ce(dt,null)),Te(dt,mt)))]}}function Mr(){return function(dt,mt){const{attrs:h}=dt,A=Re(ir);return[de(A,Dt(Dt(Dt({},h),Ce(dt,null)),Te(dt,mt)),rr(dt.content))]}}function Pr(){return function(dt,mt){const{attrs:h,content:A}=dt,{property:E,$form:y,data:p}=mt,v=Ce(dt,null),d=Re(ir);return[de(d,Dt(Dt(Dt({},h),v),Te(dt,mt,m=>{Zt.set(p,E,m)},()=>{y.updateStatus(pr(Dt({},mt),{field:E}))})),{default:()=>rr(A||v.content)})]}}function bn(){return function(dt,mt){const{attrs:h}=dt,{button:A}=mt,E=Ce(dt,null),y=Re(ir);return[de(y,Dt(Dt(Dt({},h),E),Te(dt,mt)),{default:()=>rr((A==null?void 0:A.content)||E.content)})]}}const vn={renderEdit:Cr(),renderDefault:Mr(),renderItemContent:Pr(),renderToolbarButton:bn()};function gn(){return function(dt,mt){const h=Cr(),{children:A}=dt;return A?A.map(E=>h(E,mt)[0]):[]}}function wn(){return function(dt,mt){const h=Mr(),{children:A}=dt;return A?A.map(E=>h(E,mt)[0]):[]}}function _n(){return function(dt,mt){const h=Pr(),{children:A}=dt;return A?A.map(E=>h(E,mt)[0]):[]}}const xn={renderEdit:gn(),renderDefault:wn(),renderItemContent:_n()},kn={renderDefault:ze({},(dt,mt)=>({params:Zt.get(mt,"row")})),renderEdit:Oe({},(dt,mt)=>({params:Zt.get(mt,"row")})),renderItemContent:we({},(dt,mt)=>({params:Zt.get(mt,"row")}))},Sn={renderDefault:ze({},(dt,mt)=>({params:Zt.get(mt,"row")})),renderEdit:Oe({},(dt,mt)=>({params:Zt.get(mt,"row")})),renderItemContent:we({},(dt,mt)=>({params:Zt.get(mt,"row")}))};function On(){return function(dt){const{name:mt,attrs:h,props:A}=dt,E=Re(mt);return[de("div",{class:"flex items-center justify-center"},de(E,Dt(Dt({},h),A)))]}}const jn={renderEmpty:On()},Rn={renderDefault:ze(),renderEdit:Oe(),renderFilter:Ze(),defaultFilterMethod:$e(),renderItemContent:we(),renderToolbarTool:Jr()},En={renderEdit:Oe(),renderCell:De(Ie,()=>["YYYY"]),renderItemContent:we(),exportMethod:Be(Ie,()=>["YYYY"])};function ar(dt,mt,h){let A,E=dt.target;for(;E&&E.nodeType&&E!==document;){if(h&&E.className&&E.className.split&&E.className.split(" ").indexOf(h)>-1)A=E;else if(E===mt)return{flag:h?!!A:!0,container:mt,targetElem:A};E=E.parentNode}return{flag:!1}}function _r(dt){const{$event:mt}=dt,h=document.body;if(ar(mt,h,"ant-select-dropdown").flag||ar(mt,h,"ant-cascader-menus").flag||ar(mt,h,"ant-calendar-picker-container").flag||ar(mt,h,"ant-time-picker-panel").flag)return!1}const Ir={install(dt){const{interceptor:mt,renderer:h}=dt;h.mixin({AAutoComplete:Qr,AInput:tn,AInputNumber:en,ASelect:on,ACascader:an,ADatePicker:sn,AMonthPicker:un,ARangePicker:cn,AWeekPicker:fn,ATimePicker:hn,ATreeSelect:ln,ARate:dn,ASwitch:pn,ARadioGroup:mn,ACheckboxGroup:yn,AButton:vn,AButtonGroup:xn,AApiSelect:kn,AApiTreeSelect:Sn,AEmpty:jn,AInputSearch:Rn,AYearPicker:En}),mt.add("event.clearFilter",_r),mt.add("event.clearActived",_r),mt.add("event.clearAreas",_r)}};typeof window<"u"&&window.VXETable&&window.VXETable.use&&window.VXETable.use(Ir);var Ar={},Nr={exports:{}};(function(dt,mt){(function(h){dt.exports=h()})(function(){return function h(A,E,y){function p(m,c){if(!E[m]){if(!A[m]){var f=typeof yr=="function"&&yr;if(!c&&f)return f(m,!0);if(v)return v(m,!0);var s=new Error("Cannot find module '"+m+"'");throw s.code="MODULE_NOT_FOUND",s}var n=E[m]={exports:{}};A[m][0].call(n.exports,function(t){return p(A[m][1][t]||t)},n,n.exports,h,A,E,y)}return E[m].exports}for(var v=typeof yr=="function"&&yr,d=0;d2&&arguments[2]!==void 0?arguments[2]:0;if(y(this,m),t)if(typeof t=="string"){var r=v.decodeAddress(t);this.nativeCol=r.col+e,this.nativeColOff=0,this.nativeRow=r.row+e,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+e,this.row=t.row+e):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=n}var c,f,s;return c=m,s=[{key:"asInstance",value:function(n){return n instanceof m||n==null?n:new m(n)}}],(f=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(n){this.nativeCol=Math.floor(n),this.nativeColOff=Math.floor((n-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(n){this.nativeRow=Math.floor(n),this.nativeRowOff=Math.floor((n-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){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}},{key:"rowHeight",get:function(){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}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(n){this.nativeCol=n.nativeCol,this.nativeColOff=n.nativeColOff,this.nativeRow=n.nativeRow,this.nativeRowOff=n.nativeRowOff}}])&&p(c.prototype,f),s&&p(c,s),m}();A.exports=d},{"../utils/col-cache":19}],3:[function(h,A,E){function y(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}function p(O,C){for(var _=0;_0||this.type===O.Types.Merge}},{key:"master",get:function(){return this.type===O.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===O.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(C){this.type!==O.Types.Merge?(this._value.release(),this._value=P.create(P.getType(C),this,C)):this._value.master.value=C}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(C){this._comment=new s(C)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return m.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(C){this.names=[C]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(C){var _=this,S=this.workbook.definedNames;S.removeAllNames(this.fullAddress),C.forEach(function(g){S.addEx(_.fullAddress,g)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(C){this._dataValidations.add(this.address,C)}},{key:"model",get:function(){var C=this._value.model;return C.style=this.style,this._comment&&(C.comment=this._comment.model),C},set:function(C){if(this._value.release(),this._value=P.create(C.type,this),this._value.model=C,C.comment)switch(C.comment.type){case"note":this._comment=s.fromModel(C.comment)}C.style?this.style=C.style:this.style={}}}]),O}();n.Types=c.ValueType;var t=function(){function O(C){y(this,O),this.model={address:C.address,type:n.Types.Null}}return v(O,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(C){}},{key:"type",get:function(){return n.Types.Null}},{key:"effectiveType",get:function(){return n.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),e=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Number,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.Number}},{key:"effectiveType",get:function(){return n.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),r=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.String,value:_}}return v(O,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.String}},{key:"effectiveType",get:function(){return n.Types.String}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),i=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.String,value:_}}return v(O,[{key:"toString",value:function(){return this.model.value.richText.map(function(C){return C.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.RichText}},{key:"effectiveType",get:function(){return n.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),o=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Date,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.Date}},{key:"effectiveType",get:function(){return n.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),a=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Hyperlink,text:_?_.text:void 0,hyperlink:_?_.hyperlink:void 0},_&&_.tooltip&&(this.model.tooltip=_.tooltip)}return v(O,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var C={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(C.tooltip=this.model.tooltip),C},set:function(C){this.model={text:C.text,hyperlink:C.hyperlink},C.tooltip&&(this.model.tooltip=C.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(C){this.model.text=C}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(C){this.model.hyperlink=C}},{key:"type",get:function(){return n.Types.Hyperlink}},{key:"effectiveType",get:function(){return n.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),u=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Merge,master:_?_.address:void 0},this._master=_,_&&_.addMergeRef()}return v(O,[{key:"isMergedTo",value:function(C){return C===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(C){C instanceof n?(this._master&&this._master.releaseMergeRef(),C.addMergeRef(),this._master=C):this._master.value=C}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return n.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),l=function(){function O(C,_){y(this,O),this.cell=C,this.model={address:C.address,type:n.Types.Formula,shareType:_?_.shareType:void 0,ref:_?_.ref:void 0,formula:_?_.formula:void 0,sharedFormula:_?_.sharedFormula:void 0,result:_?_.result:void 0}}return v(O,[{key:"_copyModel",value:function(C){var _={},S=function(g){var R=C[g];R&&(_[g]=R)};return S("formula"),S("result"),S("ref"),S("shareType"),S("sharedFormula"),_}},{key:"validate",value:function(C){switch(P.getType(C)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var C=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=C&&f(C.formula,C.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(C){this.model=this._copyModel(C)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells: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)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(C){this.model.formula=C}},{key:"formulaType",get:function(){return this.model.formula?c.FormulaType.Master:this.model.sharedFormula?c.FormulaType.Shared:c.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(C){this.model.result=C}},{key:"type",get:function(){return n.Types.Formula}},{key:"effectiveType",get:function(){var C=this.model.result;return C==null?c.ValueType.Null:C instanceof String||typeof C=="string"?c.ValueType.String:typeof C=="number"?c.ValueType.Number:C instanceof Date?c.ValueType.Date:C.text&&C.hyperlink?c.ValueType.Hyperlink:C.formula?c.ValueType.Formula:c.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),b=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.SharedString,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.SharedString}},{key:"effectiveType",get:function(){return n.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),w=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Boolean,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.Boolean}},{key:"effectiveType",get:function(){return n.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),T=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.Error,value:_}}return v(O,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(C){this.model.value=C}},{key:"type",get:function(){return n.Types.Error}},{key:"effectiveType",get:function(){return n.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),j=function(){function O(C,_){y(this,O),this.model={address:C.address,type:n.Types.String,value:JSON.stringify(_),rawValue:_}}return v(O,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(C){this.model.rawValue=C,this.model.value=JSON.stringify(C)}},{key:"type",get:function(){return n.Types.String}},{key:"effectiveType",get:function(){return n.Types.String}},{key:"address",get:function(){return this.model.address},set:function(C){this.model.address=C}}]),O}(),P={getType:function(O){return O==null?n.Types.Null:O instanceof String||typeof O=="string"?n.Types.String:typeof O=="number"?n.Types.Number:typeof O=="boolean"?n.Types.Boolean:O instanceof Date?n.Types.Date:O.text&&O.hyperlink?n.Types.Hyperlink:O.formula||O.sharedFormula?n.Types.Formula:O.richText?n.Types.RichText:O.sharedString?n.Types.SharedString:O.error?n.Types.Error:n.Types.JSON},types:[{t:n.Types.Null,f:t},{t:n.Types.Number,f:e},{t:n.Types.String,f:r},{t:n.Types.Date,f:o},{t:n.Types.Hyperlink,f:a},{t:n.Types.Formula,f:l},{t:n.Types.Merge,f:u},{t:n.Types.JSON,f:j},{t:n.Types.SharedString,f:b},{t:n.Types.RichText,f:i},{t:n.Types.Boolean,f:w},{t:n.Types.Error,f:T}].reduce(function(O,C){return O[C.t]=C.f,O},[]),create:function(O,C,_){var S=this.types[O];if(!S)throw new Error("Could not create Value of type ".concat(O));return new S(C,_)}};A.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(h,A,E){function y(c,f){for(var s=0;s=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var t=this.style;return!t||!(t.font||t.numFmt||t.alignment||t.border||t.fill||t.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var t=[];return this.eachCell(function(e,r){e&&e.type!==v.ValueType.Null&&(t[r]=e.value)}),t},set:function(t){var e=this;if(t){var r=this.number,i=0;t.hasOwnProperty("0")&&(i=1),t.forEach(function(o,a){e._worksheet.getCell(a+i,r).value=o})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(t){this._applyStyle("numFmt",t)}},{key:"font",get:function(){return this.style.font},set:function(t){this._applyStyle("font",t)}},{key:"alignment",get:function(){return this.style.alignment},set:function(t){this._applyStyle("alignment",t)}},{key:"protection",get:function(){return this.style.protection},set:function(t){this._applyStyle("protection",t)}},{key:"border",get:function(){return this.style.border},set:function(t){this._applyStyle("border",t)}},{key:"fill",get:function(){return this.style.fill},set:function(t){this._applyStyle("fill",t)}}])&&y(f.prototype,s),n&&y(f,n),c}();A.exports=m},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(h,A,E){function y(v,d){for(var m=0;mthis.bottom)&&(this.bottom=t),(!this.model.right||e>this.right)&&(this.right=e)}},{key:"expandRow",value:function(s){if(s){var n=s.dimensions,t=s.number;n&&this.expand(t,n.min,t,n.max)}}},{key:"expandToAddress",value:function(s){var n=v.decodeEx(s);this.expand(n.row,n.col,n.row,n.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(s){return!(s.sheetName&&this.sheetName&&s.sheetName!==this.sheetName||s.bottomthis.bottom||s.rightthis.right)}},{key:"contains",value:function(s){var n=v.decodeEx(s);return this.containsEx(n)}},{key:"containsEx",value:function(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}},{key:"forEachAddress",value:function(s){for(var n=this.left;n<=this.right;n++)for(var t=this.top;t<=this.bottom;t++)s(v.encodeAddress(t,n),t,n)}},{key:"top",get:function(){return this.model.top||1},set:function(s){this.model.top=s}},{key:"left",get:function(){return this.model.left||1},set:function(s){this.model.left=s}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(s){this.model.bottom=s}},{key:"right",get:function(){return this.model.right||1},set:function(s){this.model.right=s}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(s){this.model.sheetName=s}},{key:"_serialisedSheetName",get:function(){var s=this.model.sheetName;return s?/^[a-zA-Z0-9]*$/.test(s)?"".concat(s,"!"):"'".concat(s,"'!"):""}},{key:"tl",get:function(){return v.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(v.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return v.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(v.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&p(c.prototype,f),m}();A.exports=d},{"../utils/col-cache":19}],11:[function(h,A,E){function y(f,s){for(var n=0;n2?i-2:0),a=2;a0)for(u=T;u>=r;u--)(l=this._cells[u-1])?((b=this.getCell(u+w)).value=l.value,b.style=l.style,b._comment=l._comment):this._cells[u+w-1]=void 0;for(u=0;ur.col)&&(t=r.col),e0?{min:t,max:e}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(t){this._applyStyle("numFmt",t)}},{key:"font",get:function(){return this.style.font},set:function(t){this._applyStyle("font",t)}},{key:"alignment",get:function(){return this.style.alignment},set:function(t){this._applyStyle("alignment",t)}},{key:"protection",get:function(){return this.style.protection},set:function(t){this._applyStyle("protection",t)}},{key:"border",get:function(){return this.style.border},set:function(t){this._applyStyle("border",t)}},{key:"fill",get:function(){return this.style.fill},set:function(t){this._applyStyle("fill",t)}},{key:"hidden",get:function(){return!!this._hidden},set:function(t){this._hidden=t}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(t){this._outlineLevel=t}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var t=[],e=0,r=0;return this._cells.forEach(function(i){if(i){var o=i.model;o&&((!e||e>i.col)&&(e=i.col),r0,"Table must be on valid row"),e(o>0,"Table must be on valid col");var a=this.width,u=this.filterHeight,l=this.tableHeight;n.autoFilterRef=d.encode(i,o,i+u-1,o+a-1),n.tableRef=d.encode(i,o,i+l-1,o+a-1),n.columns.forEach(function(b,w){e(b.name,"Column ".concat(w," must have a name")),w===0?t(b,"totalsRowLabel","Total"):(t(b,"totalsRowFunction","none"),b.totalsRowFormula=s.getFormula(b))})}},{key:"store",value:function(){var s=this,n=function(b,w){w&&Object.keys(w).forEach(function(T){b[T]=w[T]})},t=this.worksheet,e=this.table,r=e.tl,i=r.row,o=r.col,a=0;if(e.headerRow){var u=t.getRow(i+a++);e.columns.forEach(function(b,w){var T=b.style,j=b.name,P=u.getCell(o+w);P.value=j,n(P,T)})}if(e.rows.forEach(function(b){var w=t.getRow(i+a++);b.forEach(function(T,j){var P=w.getCell(o+j);P.value=T,n(P,e.columns[j].style)})}),e.totalsRow){var l=t.getRow(i+a++);e.columns.forEach(function(b,w){var T=l.getCell(o+w);if(w===0)T.value=b.totalsRowLabel;else{var j=s.getFormula(b);T.value=j?{formula:b.totalsRowFormula,result:b.totalsRowResult}:null}n(T,b.style)})}}},{key:"load",value:function(s){var n=this,t=this.table,e=t.tl,r=e.row,i=e.col,o=0;if(t.headerRow){var a=s.getRow(r+o++);t.columns.forEach(function(l,b){a.getCell(i+b).value=l.name})}if(t.rows.forEach(function(l){var b=s.getRow(r+o++);l.forEach(function(w,T){b.getCell(i+T).value=w})}),t.totalsRow){var u=s.getRow(r+o++);t.columns.forEach(function(l,b){var w=u.getCell(i+b);b===0?w.value=l.totalsRowLabel:n.getFormula(l)&&(w.value={formula:l.totalsRowFormula,result:l.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var s=d.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,n)}},{key:"getColumn",value:function(s){var n=this.table.columns[s];return new m(this,n,s)}},{key:"addColumn",value:function(s,n,t){this.cacheState(),t===void 0?(this.table.columns.push(s),this.table.rows.forEach(function(e,r){e.push(n[r])})):(this.table.columns.splice(t,0,s),this.table.rows.forEach(function(e,r){e.splice(t,0,n[r])}))}},{key:"removeColumns",value:function(s){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,n),this.table.rows.forEach(function(t){t.splice(s,n)})}},{key:"_assign",value:function(s,n,t){this.cacheState(),s[n]=t}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(s){this.table=s}},{key:"ref",get:function(){return this.table.ref},set:function(s){this._assign(this.table,"ref",s)}},{key:"name",get:function(){return this.table.name},set:function(s){this.table.name=s}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(s){this.table.displayName=s}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(s){this._assign(this.table,"headerRow",s)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(s){this._assign(this.table,"totalsRow",s)}},{key:"theme",get:function(){return this.table.style.name},set:function(s){this.table.style.name=s}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(s){this.table.style.showFirstColumn=s}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(s){this.table.style.showLastColumn=s}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(s){this.table.style.showRowStripes=s}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(s){this.table.style.showColumnStripes=s}}]),f}();A.exports=c},{"../utils/col-cache":19}],13:[function(h,A,E){function y(f,s){for(var n=0;n31,/[*?:/\\[\]]/.test(t))throw new Error("Worksheet name ".concat(t," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(t))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(t));if(t=(t||"sheet".concat(r)).substring(0,31),this._worksheets.find(function(u){return u&&u.name.toLowerCase()===t.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(t));e&&(typeof e=="string"?e={properties:{tabColor:{argb:e}}}:(e.argb||e.theme||e.indexed)&&(e={properties:{tabColor:e}}));var i=this._worksheets.reduce(function(u,l){return(l&&l.orderNo)>u?l.orderNo:u},0),o=Object.assign({},e,{id:r,name:t,orderNo:i+1,workbook:this}),a=new p(o);return this._worksheets[r]=a,a}},{key:"removeWorksheetEx",value:function(t){delete this._worksheets[t.id]}},{key:"removeWorksheet",value:function(t){var e=this.getWorksheet(t);e&&e.destroy()}},{key:"getWorksheet",value:function(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(function(e){return e&&e.name===t}):void 0}},{key:"eachSheet",value:function(t){this.worksheets.forEach(function(e){t(e,e.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(t){var e=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),e}},{key:"getImage",value:function(t){return this.media[t]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new d(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new m(this)),this._csv}},{key:"nextId",get:function(){for(var t=1;tb.length)&&(w=b.length);for(var T=0,j=new Array(w);Tthis._columns.length)for(var O=this._columns.length+1;O<=j;)this._columns.push(new e(this,O++));return this._columns[j-1]}},{key:"spliceColumns",value:function(j,P){for(var O=this,C=this._rows,_=C.length,S=arguments.length,g=new Array(S>2?S-2:0),R=2;R0)for(var x=function(V){var q=[j,P];g.forEach(function(F){q.push(F[V]||null)});var $=O.getRow(V+1);$.splice.apply($,q)},k=0;k<_;k++)x(k);else this._rows.forEach(function(V){V&&V.splice(j,P)});var M=g.length-P,D=j+P,L=this._columns.length;if(M<0)for(var B=j+g.length;B<=L;B++)this.getColumn(B).defn=this.getColumn(B-M).defn;else if(M>0)for(var U=L;U>=D;U--)this.getColumn(U+M).defn=this.getColumn(U).defn;for(var H=j;H1&&arguments[1]!==void 0?arguments[1]:"n",O=this._nextRow,C=this.getRow(O);return C.values=j,this._setStyleOption(O,P[0]==="i"?P:"n"),C}},{key:"addRows",value:function(j){var P=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",C=[];return j.forEach(function(_){C.push(P.addRow(_,O))}),C}},{key:"insertRow",value:function(j,P){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(j,0,P),this._setStyleOption(j,O),this.getRow(j)}},{key:"insertRows",value:function(j,P){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[j,0].concat(d(P))),O!=="n")for(var C=0;C1&&arguments[1]!==void 0?arguments[1]:"n";P[0]==="o"&&this.findRow(j+1)!==void 0?this._copyStyle(j+1,j,P[1]==="+"):P[0]==="i"&&this.findRow(j-1)!==void 0&&this._copyStyle(j-1,j,P[1]==="+")}},{key:"_copyStyle",value:function(j,P){var O=arguments.length>2&&arguments[2]!==void 0&&arguments[2],C=this.getRow(j),_=this.getRow(P);_.style=Object.freeze(p({},C.style)),C.eachCell({includeEmpty:O},function(S,g){_.getCell(g).style=Object.freeze(p({},S.style))}),_.height=C.height}},{key:"duplicateRow",value:function(j,P){var O=this,C=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=this._rows[j-1],S=new Array(P).fill(_.values);this.spliceRows.apply(this,[j+1,C?0:P].concat(d(S)));for(var g=function(x){var k=O._rows[j+x];k.style=_.style,k.height=_.height,_.eachCell({includeEmpty:!0},function(M,D){k.getCell(D).style=M.style})},R=0;R2?_-2:0),g=2;g<_;g++)S[g-2]=arguments[g];var R,x,k=S.length,M=k-P,D=this._rows.length;if(M<0)for(R=C;R<=D;R++)(x=this._rows[R-1])?function(){var B=O.getRow(R+M);B.values=x.values,B.style=x.style,B.height=x.height,x.eachCell({includeEmpty:!0},function(U,H){B.getCell(H).style=U.style}),O._rows[R-1]=void 0}():this._rows[R+M-1]=void 0;else if(M>0)for(R=D;R>=C;R--)(x=this._rows[R-1])?function(){var B=O.getRow(R+M);B.values=x.values,B.style=x.style,B.height=x.height,x.eachCell({includeEmpty:!0},function(U,H){if(B.getCell(H).style=U.style,U._value.constructor.name==="MergeValue"){var V=O.getRow(U._row._number+k).getCell(H),q=U._value._master,$=O.getRow(q._row._number+k).getCell(q._column._number);V.merge($)}})}():this._rows[R+M-1]=void 0;for(R=0;Rj.top||_>j.left)&&this.getCell(C,_).merge(O,P);this._merges[O.address]=j}},{key:"_unMergeMaster",value:function(j){var P=this._merges[j.address];if(P){for(var O=P.top;O<=P.bottom;O++)for(var C=P.left;C<=P.right;C++)this.getCell(O,C).unmerge();delete this._merges[j.address]}}},{key:"unMergeCells",value:function(){for(var j=arguments.length,P=new Array(j),O=0;O3&&arguments[3]!==void 0?arguments[3]:"shared",S=s.decode(j),g=S.top,R=S.left,x=S.bottom,k=S.right,M=k-R+1,D=s.encodeAddress(g,R),L=_==="shared";C=typeof O=="function"?O:Array.isArray(O)?Array.isArray(O[0])?function(V,q){return O[V-g][q-R]}:function(V,q){return O[(V-g)*M+(q-R)]}:function(){};for(var B=!0,U=g;U<=x;U++)for(var H=R;H<=k;H++)B?(this.getCell(U,H).value={shareType:_,formula:P,ref:j,result:C(U,H)},B=!1):this.getCell(U,H).value=L?{sharedFormula:D,result:C(U,H)}:C(U,H)}},{key:"addImage",value:function(j,P){var O={type:"image",imageId:j,range:P};this._media.push(new i(this,O))}},{key:"getImages",value:function(){return this._media.filter(function(j){return j.type==="image"})}},{key:"addBackgroundImage",value:function(j){var P={type:"background",imageId:j};this._media.push(new i(this,P))}},{key:"getBackgroundImageId",value:function(){var j=this._media.find(function(P){return P.type==="background"});return j&&j.imageId}},{key:"protect",value:function(j,P){var O=this;return new Promise(function(C){O.sheetProtection={sheet:!0},P&&"spinCount"in P&&(P.spinCount=Number.isFinite(P.spinCount)?Math.round(Math.max(0,P.spinCount)):1e5),j&&(O.sheetProtection.algorithmName="SHA-512",O.sheetProtection.saltValue=u.randomBytes(16).toString("base64"),O.sheetProtection.spinCount=P&&"spinCount"in P?P.spinCount:1e5,O.sheetProtection.hashValue=u.convertPasswordToHash(j,"SHA512",O.sheetProtection.saltValue,O.sheetProtection.spinCount)),P&&(O.sheetProtection=Object.assign(O.sheetProtection,P),!j&&"spinCount"in P&&delete O.sheetProtection.spinCount),C()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(j){var P=new o(this,j);return this.tables[j.name]=P,P}},{key:"getTable",value:function(j){return this.tables[j]}},{key:"removeTable",value:function(j){delete this.tables[j]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(j){this.conditionalFormattings.push(j)}},{key:"removeConditionalFormatting",value:function(j){typeof j=="number"?this.conditionalFormattings.splice(j,1):this.conditionalFormattings=j instanceof Function?this.conditionalFormattings.filter(j):[]}},{key:"_parseRows",value:function(j){var P=this;this._rows=[],j.rows.forEach(function(O){var C=new t(P,O.number);P._rows[C.number-1]=C,C.model=O})}},{key:"_parseMergeCells",value:function(j){var P=this;f.each(j.mergeCells,function(O){P.mergeCellsWithoutStyle(O)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var j=new n;return this._rows.forEach(function(P){if(P){var O=P.dimensions;O&&j.expand(P.number,O.min,P.number,O.max)}}),j}},{key:"columns",get:function(){return this._columns},set:function(j){var P=this;this._headerRowCount=j.reduce(function(_,S){var g=(S.header?1:S.headers&&S.headers.length)||0;return Math.max(_,g)},0);var O=1,C=this._columns=[];j.forEach(function(_){var S=new e(P,O++,!1);C.push(S),S.defn=_})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var j=0;return this.eachRow(function(P){j=Math.max(j,P.cellCount)}),j}},{key:"actualColumnCount",get:function(){var j=[],P=0;return this.eachRow(function(O){O.eachCell(function(C){var _=C.col;j[_]||(j[_]=!0,P++)})}),P}},{key:"_lastRowNumber",get:function(){for(var j=this._rows,P=j.length;P>0&&j[P-1]===void 0;)P--;return P}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var j=0;return this.eachRow(function(){j++}),j}},{key:"hasMerges",get:function(){return f.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return this.properties.tabColor},set:function(j){this.properties.tabColor=j}},{key:"model",get:function(){var j={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(C){return C.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(C){return C.model}),conditionalFormattings:this.conditionalFormattings};j.cols=e.toModel(this.columns);var P=j.rows=[],O=j.dimensions=new n;return this._rows.forEach(function(C){var _=C&&C.model;_&&(O.expand(_.number,_.min,_.number,_.max),P.push(_))}),j.merges=[],f.each(this._merges,function(C){j.merges.push(C.range)}),j},set:function(j){var P=this;this.name=j.name,this._columns=e.fromModel(this,j.cols),this._parseRows(j),this._parseMergeCells(j),this.dataValidations=new a(j.dataValidations),this.properties=j.properties,this.pageSetup=j.pageSetup,this.headerFooter=j.headerFooter,this.views=j.views,this.autoFilter=j.autoFilter,this._media=j.media.map(function(O){return new i(P,O)}),this.sheetProtection=j.sheetProtection,this.tables=j.tables.reduce(function(O,C){var _=new o;return _.model=C,O[C.name]=_,O},{}),this.conditionalFormattings=j.conditionalFormattings}}])&&c(w.prototype,T),b}();A.exports=l},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(h,A,E){h("core-js/modules/es.promise"),h("core-js/modules/es.object.assign"),h("core-js/modules/es.object.keys"),h("core-js/modules/es.object.values"),h("core-js/modules/es.symbol"),h("core-js/modules/es.symbol.async-iterator"),h("core-js/modules/es.array.iterator"),h("core-js/modules/es.array.includes"),h("core-js/modules/es.array.find-index"),h("core-js/modules/es.array.find"),h("core-js/modules/es.string.from-code-point"),h("core-js/modules/es.string.includes"),h("core-js/modules/es.number.is-nan"),h("regenerator-runtime/runtime");var y={Workbook:h("./doc/workbook")},p=h("./doc/enums");Object.keys(p).forEach(function(v){y[v]=p[v]}),A.exports=y},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(h,A,E){var y=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");E.bufferToString=function(p){return typeof p=="string"?p:y?y.decode(p):p.toString()}},{}],17:[function(h,A,E){var y=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),p=h("buffer").Buffer;E.stringToBuffer=function(v){return typeof v!="string"?v:y?p.from(y.encode(v).buffer):p.from(v)}},{buffer:216}],18:[function(h,A,E){function y(m,c){for(var f=0;f"u"||!(Symbol.iterator in Object(n)))){var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!t||e.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||u.return==null||u.return()}finally{if(i)throw o}}return e}}(f,s)||function(n,t){if(n){if(typeof n=="string")return p(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return p(n,t)}}(f,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(f,s){(s==null||s>f.length)&&(s=f.length);for(var n=0,t=new Array(s);n=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&f>=1){for(;i<=26;)s=this._dictionary[i-1],this._n2l[i]=s,this._l2n[s]=i,i++;this._l2nFill=1}if(this._l2nFill<2&&f>=2){for(i=27;i<=702;)t=(n=i-27)%26,e=Math.floor(n/26),s=this._dictionary[e]+this._dictionary[t],this._n2l[i]=s,this._l2n[s]=i,i++;this._l2nFill=2}if(this._l2nFill<3&&f>=3){for(i=703;i<=16384;)t=(n=i-703)%26,e=Math.floor(n/26)%26,r=Math.floor(n/676),s=this._dictionary[r]+this._dictionary[e]+this._dictionary[t],this._n2l[i]=s,this._l2n[s]=i,i++;this._l2nFill=3}},l2n:function(f){if(this._l2n[f]||this._fill(f.length),!this._l2n[f])throw new Error("Out of bounds. Invalid column letter: ".concat(f));return this._l2n[f]},n2l:function(f){if(f<1||f>16384)throw new Error("".concat(f," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[f]||this._fill(this._level(f)),this._n2l[f]},_hash:{},validateAddress:function(f){if(!m.test(f))throw new Error("Invalid Address: ".concat(f));return!0},decodeAddress:function(f){var s=f.length<5&&this._hash[f];if(s)return s;for(var n,t=!1,e="",r=0,i=!1,o="",a=0,u=0;u=65&&n<=90)t=!0,e+=f[u],r=26*r+n-64;else if(n>=48&&n<=57)i=!0,o+=f[u],a=10*a+n-48;else if(i&&t&&n!==36)break;if(t){if(r>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(e))}else r=void 0;i||(a=void 0);var l={address:f=e+o,col:r,row:a,$col$row:"$".concat(e,"$").concat(o)};return r<=100&&a<=100&&(this._hash[f]=l,this._hash[l.$col$row]=l),l},getAddress:function(f,s){if(s){var n=this.n2l(s)+f;return this.decodeAddress(n)}return this.decodeAddress(f)},decode:function(f){var s=f.split(":");if(s.length===2){var n=this.decodeAddress(s[0]),t=this.decodeAddress(s[1]),e={top:Math.min(n.row,t.row),left:Math.min(n.col,t.col),bottom:Math.max(n.row,t.row),right:Math.max(n.col,t.col)};return e.tl=this.n2l(e.left)+e.top,e.br=this.n2l(e.right)+e.bottom,e.dimensions="".concat(e.tl,":").concat(e.br),e}return this.decodeAddress(f)},decodeEx:function(f){var s=f.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),n=s[1]||s[2],t=s[3],e=t.split(":");if(e.length>1){var r=this.decodeAddress(e[0]),i=this.decodeAddress(e[1]),o=Math.min(r.row,i.row),a=Math.min(r.col,i.col),u=Math.max(r.row,i.row),l=Math.max(r.col,i.col);return r=this.n2l(a)+o,i=this.n2l(l)+u,{top:o,left:a,bottom:u,right:l,sheetName:n,tl:{address:r,col:a,row:o,$col$row:"$".concat(this.n2l(a),"$").concat(o),sheetName:n},br:{address:i,col:l,row:u,$col$row:"$".concat(this.n2l(l),"$").concat(u),sheetName:n},dimensions:"".concat(r,":").concat(i)}}if(t.startsWith("#"))return n?{sheetName:n,error:t}:{error:t};var b=this.decodeAddress(t);return n?function(w){for(var T=1;T=t&&a<=r&&u>=e&&u<=i}};A.exports=c},{}],20:[function(h,A,E){(function(y){var p=h("crypto"),v={hash:function(d){for(var m=p.createHash(d),c=arguments.length,f=new Array(c>1?c-1:0),s=1;s3||u.length===3&&u>"XFD")return n;var w=y.l2n(u),T=parseInt(b,10);return a||(w+=s.col-f.col),l||(T+=s.row-f.row),(t||"")+(a||"")+y.n2l(w)+(l||"")+T}return n})}}},{"./col-cache":19}],23:[function(h,A,E){(function(y,p){function v(u,l,b,w,T,j,P){try{var O=u[j](P),C=O.value}catch(_){return void b(_)}O.done?l(C):Promise.resolve(C).then(w,T)}function d(u){return function(){var l=this,b=arguments;return new Promise(function(w,T){var j=u.apply(l,b);function P(C){v(j,w,T,P,O,"next",C)}function O(C){v(j,w,T,P,O,"throw",C)}P(void 0)})}}function m(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function c(u,l){for(var b=0;b=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=p.alloc(l),this.buffer.copy(b,0,this.iRead,l),this.iRead+=l,b)}},{key:"write",value:function(l,b,w){var T=Math.min(w,this.size-this.iWrite);return l.copy(this.buffer,this.iWrite,b,b+T),this.iWrite+=T,T}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),u}(),a=function(u){u=u||{},this.bufSize=u.bufSize||1048576,this.buffers=[],this.batch=u.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};n.inherits(a,s.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return p.concat(this.buffers.map(function(u){return u.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var u=this.buffers[this.buffers.length-1];if(!u.full)return u}var l=new o(this.bufSize);return this.buffers.push(l),l},_pipe:function(u){var l=this;return d(regeneratorRuntime.mark(function b(){var w;return regeneratorRuntime.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return w=function(j){return new Promise(function(P){j.write(u.toBuffer(),function(){P()})})},T.next=3,Promise.all(l.pipes.map(w));case 3:case"end":return T.stop()}},b)}))()},_writeToBuffers:function(u){for(var l=0,b=u.length;l1;)w._pipe(w.buffers.shift());P.next=29;break;case 21:if(w.corked){P.next=27;break}return P.next=24,w._pipe(j);case 24:b(),P.next=29;break;case 27:w._writeToBuffers(j),y.nextTick(b);case 29:P.next=34;break;case 31:w.paused||w.emit("data",j.toBuffer()),w._writeToBuffers(j),w.emit("readable");case 34:return P.abrupt("return",!0);case 35:case"end":return P.stop()}},T)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(u,l,b){var w=this,T=function(j){j?b(j):(w._flush(),w.pipes.forEach(function(P){P.end()}),w.emit("finish"))};u?this.write(u,l,T):T()},read:function(u){var l;if(u){for(l=[];u&&this.buffers.length&&!this.buffers[0].eod;){var b=this.buffers[0],w=b.read(u);u-=w.length,l.push(w),b.eod&&b.full&&this.buffers.shift()}return p.concat(l)}return l=this.buffers.map(function(T){return T.toBuffer()}).filter(Boolean),this.buffers=[],p.concat(l)},setEncoding:function(u){this.encoding=u},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(u){this.pipes.push(u),!this.paused&&this.buffers.length&&this.end()},unpipe:function(u){this.pipes=this.pipes.filter(function(l){return l!==u})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),A.exports=a}).call(this,h("_process"),h("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(h,A,E){(function(y){function p(d,m){for(var c=0;c=this._buf.length-4;)this._grow(this._inPos+f.length),s=this._inPos+this._buf.write(f,this._inPos,this._encoding);this._inPos=s}},{key:"addStringBuf",value:function(f){f.length&&(this._buffer=void 0,this.length+f.length>this.capacity&&this._grow(this.length+f.length),f._buf.copy(this._buf,this._inPos,0,f.length),this._inPos+=f.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&p(m.prototype,c),d}();A.exports=v}).call(this,h("buffer").Buffer)},{buffer:216}],25:[function(h,A,E){function y(m){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(m)}var p=Object.prototype.toString,v=/["&<>]/,d={each:function(m,c){m&&(Array.isArray(m)?m.forEach(c):Object.keys(m).forEach(function(f){c(m[f],f)}))},some:function(m,c){return!!m&&(Array.isArray(m)?m.some(c):Object.keys(m).some(function(f){return c(m[f],f)}))},every:function(m,c){return!m||(Array.isArray(m)?m.every(c):Object.keys(m).every(function(f){return c(m[f],f)}))},map:function(m,c){return m?Array.isArray(m)?m.map(c):Object.keys(m).map(function(f){return c(m[f],f)}):[]},keyBy:function(m,c){return m.reduce(function(f,s){return f[s[c]]=s,f},{})},isEqual:function(m,c){var f=y(m),s=y(c),n=Array.isArray(m),t=Array.isArray(c);if(f!==s)return!1;switch(y(m)){case"object":return n||t?!(!n||!t)&&m.length===c.length&&m.every(function(e,r){var i=c[r];return d.isEqual(e,i)}):d.every(m,function(e,r){var i=c[r];return d.isEqual(e,i)});default:return m===c}},escapeHtml:function(m){var c=v.exec(m);if(!c)return m;for(var f="",s="",n=0,t=c.index;t":s=">";break;default:continue}n!==t&&(f+=m.substring(n,t)),n=t+1,f+=s}return n!==t?f+m.substring(n,t):f},strcmp:function(m,c){return mc?1:0},isUndefined:function(m){return p.call(m)==="[object Undefined]"},isObject:function(m){return p.call(m)==="[object Object]"},deepMerge:function(){var m,c,f,s=arguments[0]||{},n=arguments.length;function t(r,i){m=s[i],f=Array.isArray(r),d.isObject(r)||f?(f?(f=!1,c=m&&Array.isArray(m)?m:[]):c=m&&d.isObject(m)?m:{},s[i]=d.deepMerge(c,r)):d.isUndefined(r)||(s[i]=r)}for(var e=0;e&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,m={nop:function(){},promiseImmediate:function(c){return new Promise(function(f){y.setImmediate?p(function(){f(c)}):setTimeout(function(){f(c)},1)})},inherits:function(c,f,s,n){c.super_=f,n||(n=s,s=null),s&&Object.keys(s).forEach(function(e){Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(s,e))});var t={constructor:{value:c,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach(function(e){t[e]=Object.getOwnPropertyDescriptor(n,e)}),c.prototype=Object.create(f.prototype,t)},dateToExcel:function(c,f){return 25569+c.getTime()/864e5-(f?1462:0)},excelToDate:function(c,f){var s=Math.round(24*(c-25569+(f?1462:0))*3600*1e3);return new Date(s)},parsePath:function(c){var f=c.lastIndexOf("/");return{path:c.substring(0,f),name:c.substring(f+1)}},getRelsPath:function(c){var f=m.parsePath(c);return"".concat(f.path,"/_rels/").concat(f.name,".rels")},xmlEncode:function(c){var f=d.exec(c);if(!f)return c;for(var s="",n="",t=0,e=f.index;e=11&&r!==13)){n="";break}continue}t!==e&&(s+=c.substring(t,e)),t=e+1,n&&(s+=n)}return t!==e?s+c.substring(t,e):s},xmlDecode:function(c){return c.replace(/&([a-z]*);/g,function(f){switch(f){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return f}})},validInt:function(c){var f=parseInt(c,10);return Number.isNaN(f)?0:f},isDateFmt:function(c){return!!c&&(c=(c=c.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(c){return new Promise(function(f){v.access(c,v.constants.F_OK,function(s){f(!s)})})}},toIsoDateString:function(c){return c.toIsoString().subsstr(0,10)}};A.exports=m}).call(this,typeof ne<"u"?ne:typeof self<"u"?self:typeof window<"u"?window:{},h("timers").setImmediate)},{fs:215,timers:521}],27:[function(h,A,E){function y(f,s){for(var n=0;n `)}},{key:"openNode",value:function(t,e){var r=this.tos,i=this._xml;r&&this.open&&i.push(">"),this._stack.push(t),i.push("<"),i.push(t),m(i,e),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(t,e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");e!==void 0&&d(this._xml,t,e)}},{key:"addAttributes",value:function(t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");m(this._xml,t)}},{key:"writeText",value:function(t){var e=this._xml;this.open&&(e.push(">"),this.open=!1),this.leaf=!1,e.push(v.xmlEncode(t.toString()))}},{key:"writeXml",value:function(t){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(t)}},{key:"closeNode",value:function(){var t=this._stack.pop(),e=this._xml;this.leaf?e.push("/>"):(e.push("")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(t,e,r){this.openNode(t,e),r!==void 0&&this.writeText(r),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var t=this._rollbacks.pop();this._xml.length>t.xml&&this._xml.splice(t.xml,this._xml.length-t.xml),this._stack.length>t.stack&&this._stack.splice(t.stack,this._stack.length-t.stack),this.leaf=t.leaf,this.open=t.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&y(s.prototype,n),f}();c.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},A.exports=c},{"./under-dash":25,"./utils":26}],28:[function(h,A,E){(function(y){function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function v(o,a,u,l,b,w,T){try{var j=o[w](T),P=j.value}catch(O){return void u(O)}j.done?a(P):Promise.resolve(P).then(l,b)}function d(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=s(o);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return f(this,u)}}function f(o,a){return!a||p(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function s(o){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var n=h("events"),t=h("jszip"),e=h("./stream-buf"),r=h("./browser-buffer-encode").stringToBuffer,i=function(o){(function(j,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");j.prototype=Object.create(P&&P.prototype,{constructor:{value:j,writable:!0,configurable:!0}}),P&&m(j,P)})(T,o);var a,u,l,b,w=c(T);function T(j){var P;return function(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}(this,T),(P=w.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},j),P.zip=new t,P.stream=new e,P}return a=T,(u=[{key:"append",value:function(j,P){P.hasOwnProperty("base64")&&P.base64?this.zip.file(P.name,j,{base64:!0}):(y.browser&&typeof j=="string"&&(j=r(j)),this.zip.file(P.name,j))}},{key:"finalize",value:(l=regeneratorRuntime.mark(function j(){var P;return regeneratorRuntime.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,this.zip.generateAsync(this.options);case 2:P=O.sent,this.stream.end(P),this.emit("finish");case 5:case"end":return O.stop()}},j,this)}),b=function(){var j=this,P=arguments;return new Promise(function(O,C){var _=l.apply(j,P);function S(R){v(_,O,C,S,g,"next",R)}function g(R){v(_,O,C,S,g,"throw",R)}S(void 0)})},function(){return b.apply(this,arguments)})},{key:"read",value:function(j){return this.stream.read(j)}},{key:"setEncoding",value:function(j){return this.stream.setEncoding(j)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(j,P){return this.stream.pipe(j,P)}},{key:"unpipe",value:function(j){return this.stream.unpipe(j)}},{key:"unshift",value:function(j){return this.stream.unshift(j)}},{key:"wrap",value:function(j){return this.stream.wrap(j)}}])&&d(a.prototype,u),T}(n.EventEmitter);A.exports={ZipWriter:i}}).call(this,h("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(h,A,E){A.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"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"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"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},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"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"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"}}},{}],30:[function(h,A,E){A.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",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(h,A,E){function y(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=function(b,w){if(b){if(typeof b=="string")return p(b,w);var T=Object.prototype.toString.call(b).slice(8,-1);if(T==="Object"&&b.constructor&&(T=b.constructor.name),T==="Map"||T==="Set")return Array.from(b);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return p(b,w)}}(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(b){throw b},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,u=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var b=r.next();return u=b.done,b},e:function(b){l=!0,a=b},f:function(){try{u||r.return==null||r.return()}finally{if(l)throw a}}}}function p(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(b)return l}else if(b||u!==l)return u.toString()}},{key:"toStringAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return t.toAttribute(u,l,b)}},{key:"toStringValue",value:function(u,l){return u===void 0?l:u}},{key:"toBoolAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(b)return l}else if(b||u!==l)return u?"1":"0"}},{key:"toBoolValue",value:function(u,l){return u===void 0?l:u==="1"}},{key:"toIntAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return t.toAttribute(u,l,b)}},{key:"toIntValue",value:function(u,l){return u===void 0?l:parseInt(u,10)}},{key:"toFloatAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return t.toAttribute(u,l,b)}},{key:"toFloatValue",value:function(u,l){return u===void 0?l:parseFloat(u)}}],r&&m(e.prototype,r),i&&m(e,i),t}();A.exports=n},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function v(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=f(i);if(o){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return c(this,a)}}function c(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function f(i){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var s=h("../base-xform"),n=h("../../../utils/col-cache"),t=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&d(b,w)})(l,i);var o,a,u=m(l);function l(){return p(this,l),u.apply(this,arguments)}return o=l,(a=[{key:"render",value:function(b,w){b.openNode("definedName",{name:w.name,localSheetId:w.localSheetId}),b.writeText(w.ranges.join(",")),b.closeNode()}},{key:"parseOpen",value:function(b){switch(b.name){case"definedName":return this._parsedName=b.attributes.name,this._parsedLocalSheetId=b.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}},{key:"parseText",value:function(b){this._parsedText.push(b)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}])&&v(o.prototype,a),l}(s);function e(i){try{return n.decodeEx(i),!0}catch(o){return!1}}function r(i){var o=[],a=!1,u="";return i.split(",").forEach(function(l){if(l){var b=(l.match(/'/g)||[]).length;if(b){var w=b%2==0;!a&&w&&e(l)?o.push(l):a&&!w?(a=!1,e(u+l)&&o.push(u+l),u=""):(a=!0,u+="".concat(l,","))}else a?u+="".concat(l,","):e(l)&&o.push(l)}}),o}A.exports=t},{"../../../utils/col-cache":19,"../base-xform":31}],33:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../../utils/utils"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){a.leafNode("sheet",{sheetId:u.id,name:u.name,state:u.state,"r:id":u.rId})}},{key:"parseOpen",value:function(a){return a.name==="sheet"&&(this.model={name:s.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,r),o}(h("../base-xform"));A.exports=n},{"../../../utils/utils":26,"../base-xform":31}],34:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(o){return o.name==="calcPr"&&(this.model={},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],35:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],36:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){var u={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(u.visibility=a.visibility),o.leafNode("workbookView",u)}},{key:"parseOpen",value:function(o){if(o.name==="workbookView"){var a=this.model={},u=function(j,P,O){var C=P!==void 0?a[j]=parseInt(P,10):O;C!==void 0&&(a[j]=C)};return u("x",o.attributes.xWindow,0),u("y",o.attributes.yWindow,0),u("width",o.attributes.windowWidth,25e3),u("height",o.attributes.windowHeight,1e4),l="visibility",b=o.attributes.visibility,w="visible",(T=b!==void 0?a[l]=b:w)!==void 0&&(a[l]=T),u("activeTab",o.attributes.activeTab,void 0),u("firstSheet",o.attributes.firstSheet,void 0),!0}var l,b,w,T;return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],37:[function(h,A,E){function y(w){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(w)}function p(w,T){for(var j=0;j"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(j){return!1}}();return function(){var j,P=c(w);if(T){var O=c(this).constructor;j=Reflect.construct(P,arguments,O)}else j=P.apply(this,arguments);return m(this,j)}}function m(w,T){return!T||y(T)!=="object"&&typeof T!="function"?function(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}(w):T}function c(w){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(w)}var f=h("../../../utils/under-dash"),s=h("../../../utils/col-cache"),n=h("../../../utils/xml-stream"),t=h("../base-xform"),e=h("../static-xform"),r=h("../list-xform"),i=h("./defined-name-xform"),o=h("./sheet-xform"),a=h("./workbook-view-xform"),u=h("./workbook-properties-xform"),l=h("./workbook-calc-properties-xform"),b=function(w){(function(C,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(_&&_.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),_&&v(C,_)})(O,w);var T,j,P=d(O);function O(){var C;return function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}(this,O),(C=P.call(this)).map={fileVersion:O.STATIC_XFORMS.fileVersion,workbookPr:new u,bookViews:new r({tag:"bookViews",count:!1,childXform:new a}),sheets:new r({tag:"sheets",count:!1,childXform:new o}),definedNames:new r({tag:"definedNames",count:!1,childXform:new i}),calcPr:new l},C}return T=O,(j=[{key:"prepare",value:function(C){C.sheets=C.worksheets;var _=[],S=0;C.sheets.forEach(function(g){if(g.pageSetup&&g.pageSetup.printArea&&g.pageSetup.printArea.split("&&").forEach(function(D){var L=D.split(":"),B={name:"_xlnm.Print_Area",ranges:["'".concat(g.name,"'!$").concat(L[0],":$").concat(L[1])],localSheetId:S};_.push(B)}),g.pageSetup&&(g.pageSetup.printTitlesRow||g.pageSetup.printTitlesColumn)){var R=[];if(g.pageSetup.printTitlesColumn){var x=g.pageSetup.printTitlesColumn.split(":");R.push("'".concat(g.name,"'!$").concat(x[0],":$").concat(x[1]))}if(g.pageSetup.printTitlesRow){var k=g.pageSetup.printTitlesRow.split(":");R.push("'".concat(g.name,"'!$").concat(k[0],":$").concat(k[1]))}var M={name:"_xlnm.Print_Titles",ranges:R,localSheetId:S};_.push(M)}S++}),_.length&&(C.definedNames=C.definedNames.concat(_)),(C.media||[]).forEach(function(g,R){g.name=g.type+(R+1)})}},{key:"render",value:function(C,_){C.openXml(n.StdDocAttributes),C.openNode("workbook",O.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(C),this.map.workbookPr.render(C,_.properties),this.map.bookViews.render(C,_.views),this.map.sheets.render(C,_.sheets),this.map.definedNames.render(C,_.definedNames),this.map.calcPr.render(C,_.calcProperties),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"workbook":return!0;default:return this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C),!0}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}},{key:"reconcile",value:function(C){var _,S=(C.workbookRels||[]).reduce(function(k,M){return k[M.Id]=M,k},{}),g=[],R=0;(C.sheets||[]).forEach(function(k){var M=S[k.rId];M&&(_=C.worksheetHash["xl/".concat(M.Target.replace(/^(\s|\/xl\/)+/,""))])&&(_.name=k.name,_.id=k.id,_.state=k.state,g[R++]=_)});var x=[];f.each(C.definedNames,function(k){if(k.name==="_xlnm.Print_Area"){if(_=g[k.localSheetId]){_.pageSetup||(_.pageSetup={});var M=s.decodeEx(k.ranges[0]);_.pageSetup.printArea=_.pageSetup.printArea?"".concat(_.pageSetup.printArea,"&&").concat(M.dimensions):M.dimensions}}else if(k.name==="_xlnm.Print_Titles"){if(_=g[k.localSheetId]){_.pageSetup||(_.pageSetup={});var D=k.ranges.join(","),L=/\$/g,B=D.match(/\$\d+:\$\d+/);if(B&&B.length){var U=B[0];_.pageSetup.printTitlesRow=U.replace(L,"")}var H=D.match(/\$[A-Z]+:\$[A-Z]+/);if(H&&H.length){var V=H[0];_.pageSetup.printTitlesColumn=V.replace(L,"")}}}else x.push(k)}),C.definedNames=x,C.media.forEach(function(k,M){k.index=M})}}])&&p(T.prototype,j),O}(t);b.WORKBOOK_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":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},b.STATIC_XFORMS={fileVersion:new e({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},A.exports=b},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./defined-name-xform":32,"./sheet-xform":33,"./workbook-calc-properties-xform":34,"./workbook-properties-xform":35,"./workbook-view-xform":36}],38:[function(h,A,E){function y(f,s){var n=Object.keys(f);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(f);s&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(f,e).enumerable})),n.push.apply(n,t)}return n}function p(f,s,n){return s in f?Object.defineProperty(f,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):f[s]=n,f}var v=h("../strings/rich-text-xform"),d=h("../../../utils/utils"),m=h("../base-xform"),c=A.exports=function(f){this.model=f};d.inherits(c,m,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new v),this._richTextXform},render:function(f,s){var n=this;s=s||this.model,f.openNode("comment",{ref:s.ref,authorId:0}),f.openNode("text"),s&&s.note&&s.note.texts&&s.note.texts.forEach(function(t){n.richTextXform.render(f,t)}),f.closeNode(),f.closeNode()},parseOpen:function(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"comment":return this.model=function(s){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this))._model=i,o}return n=r,(t=[{key:"render",value:function(i,o,a){(o===a[2]||this.tag==="x:SizeWithCells"&&o===a[1])&&i.leafNode(this.tag)}},{key:"parseOpen",value:function(i){switch(i.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&p(n.prototype,t),r}(h("../../base-xform"));A.exports=f},{"../../base-xform":31}],41:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this))._model=i,o}return n=r,(t=[{key:"render",value:function(i,o){i.leafNode(this.tag,null,o)}},{key:"parseOpen",value:function(i){switch(i.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(i){this.text=i}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&p(n.prototype,t),r}(h("../../base-xform"));A.exports=f},{"../../base-xform":31}],42:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"getAnchorRect",value:function(o){var a=Math.floor(o.left),u=Math.floor(68*(o.left-a)),l=Math.floor(o.top),b=Math.floor(18*(o.top-l)),w=Math.floor(o.right),T=Math.floor(68*(o.right-w)),j=Math.floor(o.bottom);return[a,u,l,b,w,T,j,Math.floor(18*(o.bottom-j))]}},{key:"getDefaultRect",value:function(o){var a=o.col,u=Math.max(o.row-2,0);return[a,6,u,14,a+2,2,u+4,16]}},{key:"render",value:function(o,a){var u=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);o.leafNode("x:Anchor",null,u.join(", "))}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(o){this.text=o}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"x:Anchor"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],43:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../base-xform"),s=h("./vml-anchor-xform"),n=h("./style/vml-protection-xform"),t=h("./style/vml-position-xform"),e=["twoCells","oneCells","absolute"],r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"x:Anchor":new s,"x:Locked":new n({tag:"x:Locked"}),"x:LockText":new n({tag:"x:LockText"}),"x:SizeWithCells":new t({tag:"x:SizeWithCells"}),"x:MoveWithCells":new t({tag:"x:MoveWithCells"})},b}return o=l,(a=[{key:"render",value:function(b,w){var T=w.note,j=T.protection,P=T.editAs;b.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(b,P,e),this.map["x:SizeWithCells"].render(b,P,e),this.map["x:Anchor"].render(b,w),this.map["x:Locked"].render(b,j.locked),b.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(b,j.lockText),b.leafNode("x:Row",null,w.refAddress.row-1),b.leafNode("x:Column",null,w.refAddress.col-1),b.closeNode()}},{key:"parseOpen",value:function(b){switch(b.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case this.tag:return this.normalizeModel(),!1;default:return!0}}},{key:"normalizeModel",value:function(){var b=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),w=Object.keys(b).length;this.model.editAs=e[w],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}},{key:"tag",get:function(){return"x:ClientData"}}])&&p(o.prototype,a),l}(f);A.exports=r},{"../base-xform":31,"./style/vml-position-xform":40,"./style/vml-protection-xform":41,"./vml-anchor-xform":42}],44:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../../utils/xml-stream"),s=h("../base-xform"),n=h("./vml-shape-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"v:shape":new n},u}return r=a,(i=[{key:"render",value:function(u,l){var b=this;u.openXml(f.StdDocAttributes),u.openNode(this.tag,a.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),l.comments.forEach(function(w,T){b.map["v:shape"].render(u,w,T)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(u,l){var b=this;u.anchors.forEach(function(w){w.br?b.map["xdr:twoCellAnchor"].reconcile(w,l):b.map["xdr:oneCellAnchor"].reconcile(w,l)})}},{key:"tag",get:function(){return"xml"}}])&&p(r.prototype,i),a}(s);t.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},A.exports=t},{"../../../utils/xml-stream":27,"../base-xform":31,"./vml-shape-xform":45}],45:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../base-xform"),s=h("./vml-textbox-xform"),n=h("./vml-client-data-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"v:textbox":new s,"x:ClientData":new n},u}return r=a,(i=[{key:"render",value:function(u,l,b){u.openNode("v:shape",a.V_SHAPE_ATTRIBUTES(l,b)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,l),this.map["x:ClientData"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}},{key:"tag",get:function(){return"v:shape"}}])&&p(r.prototype,i),a}(f);t.V_SHAPE_ATTRIBUTES=function(e,r){return{id:"_x0000_s".concat(1025+r),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":e.note.margins&&e.note.margins.insetmode}},A.exports=t},{"../base-xform":31,"./vml-client-data-xform":43,"./vml-textbox-xform":46}],46:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"conversionUnit",value:function(o,a,u){return"".concat(parseFloat(o)*a.toFixed(2)).concat(u)}},{key:"reverseConversionUnit",value:function(o){var a=this;return(o||"").split(",").map(function(u){return Number(parseFloat(a.conversionUnit(parseFloat(u),.1,"")).toFixed(2))})}},{key:"render",value:function(o,a){var u=this,l={style:"mso-direction-alt:auto"};if(a&&a.note){var b=(a.note&&a.note.margins).inset;Array.isArray(b)&&(b=b.map(function(w){return u.conversionUnit(w,10,"mm")}).join(",")),b&&(l.inset=b)}o.openNode("v:textbox",l),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={inset:this.reverseConversionUnit(o.attributes.inset)},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){switch(o){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"v:textbox"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],47:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"createNewModel",value:function(o){return{}}},{key:"parseOpen",value:function(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"onParserClose",value:function(o,a){this.model[o]=a.model}},{key:"parseClose",value:function(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}])&&v(t.prototype,e),i}(h("./base-xform"));A.exports=s},{"./base-xform":31}],48:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,a.length),o.closeNode(),o.closeNode(),o.closeNode()}},{key:"parseOpen",value:function(o){return o.name==="HeadingPairs"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){return o!=="HeadingPairs"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],49:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(function(u){o.leafNode("vt:lpstr",void 0,u.name)}),o.closeNode(),o.closeNode()}},{key:"parseOpen",value:function(o){return o.name==="TitlesOfParts"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){return o!=="TitlesOfParts"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],50:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../../../utils/xml-stream"),s=h("../base-xform"),n=h("../simple/string-xform"),t=h("./app-heading-pairs-xform"),e=h("./app-titles-of-parts-xform"),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={Company:new n({tag:"Company"}),Manager:new n({tag:"Manager"}),HeadingPairs:new t,TitleOfParts:new e},b}return o=l,(a=[{key:"render",value:function(b,w){b.openXml(f.StdDocAttributes),b.openNode("Properties",l.PROPERTY_ATTRIBUTES),b.leafNode("Application",void 0,"Microsoft Excel"),b.leafNode("DocSecurity",void 0,"0"),b.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(b,w.worksheets),this.map.TitleOfParts.render(b,w.worksheets),this.map.Company.render(b,w.company||""),this.map.Manager.render(b,w.manager),b.leafNode("LinksUpToDate",void 0,"false"),b.leafNode("SharedDoc",void 0,"false"),b.leafNode("HyperlinksChanged",void 0,"false"),b.leafNode("AppVersion",void 0,"16.0300"),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"Properties":return!0;default:return this.parser=this.map[b.name],!!this.parser&&(this.parser.parseOpen(b),!0)}}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}])&&p(o.prototype,a),l}(s);r.DateFormat=function(i){return i.toISOString().replace(/[.]\d{3,6}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},A.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/string-xform":118,"./app-heading-pairs-xform":48,"./app-titles-of-parts-xform":49}],51:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../../utils/xml-stream"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){a.openXml(s.StdDocAttributes),a.openNode("Types",o.PROPERTY_ATTRIBUTES);var l={};(u.media||[]).forEach(function(b){if(b.type==="image"){var w=b.extension;l[w]||(l[w]=!0,a.leafNode("Default",{Extension:w,ContentType:"image/".concat(w)}))}}),a.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),a.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),a.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(function(b){var w="/xl/worksheets/sheet".concat(b.id,".xml");a.leafNode("Override",{PartName:w,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),a.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),a.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&a.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(function(b){a.leafNode("Override",{PartName:"/xl/tables/".concat(b.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(function(b){a.leafNode("Override",{PartName:"/xl/drawings/".concat(b.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(a.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(function(b){var w=b.commentName;a.leafNode("Override",{PartName:"/xl/".concat(w,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),a.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),a.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),a.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,r),o}(h("../base-xform"));n.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},A.exports=n},{"../../../utils/xml-stream":27,"../base-xform":31}],52:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../../../utils/xml-stream"),s=h("../base-xform"),n=h("../simple/date-xform"),t=h("../simple/string-xform"),e=h("../simple/integer-xform"),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"dc:creator":new t({tag:"dc:creator"}),"dc:title":new t({tag:"dc:title"}),"dc:subject":new t({tag:"dc:subject"}),"dc:description":new t({tag:"dc:description"}),"dc:identifier":new t({tag:"dc:identifier"}),"dc:language":new t({tag:"dc:language"}),"cp:keywords":new t({tag:"cp:keywords"}),"cp:category":new t({tag:"cp:category"}),"cp:lastModifiedBy":new t({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new n({tag:"cp:lastPrinted",format:l.DateFormat}),"cp:revision":new e({tag:"cp:revision"}),"cp:version":new t({tag:"cp:version"}),"cp:contentStatus":new t({tag:"cp:contentStatus"}),"cp:contentType":new t({tag:"cp:contentType"}),"dcterms:created":new n({tag:"dcterms:created",attrs:l.DateAttrs,format:l.DateFormat}),"dcterms:modified":new n({tag:"dcterms:modified",attrs:l.DateAttrs,format:l.DateFormat})},b}return o=l,(a=[{key:"render",value:function(b,w){b.openXml(f.StdDocAttributes),b.openNode("cp:coreProperties",l.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(b,w.creator),this.map["dc:title"].render(b,w.title),this.map["dc:subject"].render(b,w.subject),this.map["dc:description"].render(b,w.description),this.map["dc:identifier"].render(b,w.identifier),this.map["dc:language"].render(b,w.language),this.map["cp:keywords"].render(b,w.keywords),this.map["cp:category"].render(b,w.category),this.map["cp:lastModifiedBy"].render(b,w.lastModifiedBy),this.map["cp:lastPrinted"].render(b,w.lastPrinted),this.map["cp:revision"].render(b,w.revision),this.map["cp:version"].render(b,w.version),this.map["cp:contentStatus"].render(b,w.contentStatus),this.map["cp:contentType"].render(b,w.contentType),this.map["dcterms:created"].render(b,w.created),this.map["dcterms:modified"].render(b,w.modified),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[b.name],this.parser)return this.parser.parseOpen(b),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(b)))}}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(b))}}}])&&p(o.prototype,a),l}(s);r.DateFormat=function(i){return i.toISOString().replace(/[.]\d{3}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},A.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/date-xform":116,"../simple/integer-xform":117,"../simple/string-xform":118}],53:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("Relationship",a)}},{key:"parseOpen",value:function(o){switch(o.name){case"Relationship":return this.model=o.attributes,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],54:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../../utils/xml-stream"),s=h("../base-xform"),n=h("./relationship-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={Relationship:new n},u}return r=a,(i=[{key:"render",value:function(u,l){var b=this;l=l||this._values,u.openXml(f.StdDocAttributes),u.openNode("Relationships",a.RELATIONSHIPS_ATTRIBUTES),l.forEach(function(w){b.map.Relationship.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}}])&&p(r.prototype,i),a}(s);t.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},A.exports=t},{"../../../utils/xml-stream":27,"../base-xform":31,"./relationship-xform":53}],55:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"reconcilePicture",value:function(o,a){if(o&&o.rId){var u=a.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(u){var l=u[1],b=a.mediaIndex[l];return a.media[b]}}}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],56:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../base-xform"),s=h("./blip-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).map={"a:blip":new s},a}return e=o,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["a:blip"].render(a,u),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:blipFill"}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../base-xform":31,"./blip-xform":57}],57:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:embed"]},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){switch(o){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:blip"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],58:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){switch(o){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPicPr"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],59:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../base-xform"),s=h("./hlink-click-xform"),n=h("./ext-lst-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"a:hlinkClick":new s,"a:extLst":new n},u}return r=a,(i=[{key:"render",value:function(u,l){u.openNode(this.tag,{id:l.index,name:"Picture ".concat(l.index)}),this.map["a:hlinkClick"].render(u,l),this.map["a:extLst"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPr"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../base-xform":31,"./ext-lst-xform":62,"./hlink-click-xform":64}],60:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../base-xform"),s=h("../simple/integer-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).tag=a.tag,u.map={"xdr:col":new s({tag:"xdr:col",zero:!0}),"xdr:colOff":new s({tag:"xdr:colOff",zero:!0}),"xdr:row":new s({tag:"xdr:row",zero:!0}),"xdr:rowOff":new s({tag:"xdr:rowOff",zero:!0})},u}return e=o,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["xdr:col"].render(a,u.nativeCol),this.map["xdr:colOff"].render(a,u.nativeColOff),this.map["xdr:row"].render(a,u.nativeRow),this.map["xdr:rowOff"].render(a,u.nativeRowOff),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../base-xform":31,"../simple/integer-xform":117}],61:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../../../utils/col-cache"),s=h("../../../utils/xml-stream"),n=h("../base-xform"),t=h("./two-cell-anchor-xform"),e=h("./one-cell-anchor-xform"),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:twoCellAnchor":new t,"xdr:oneCellAnchor":new e},b}return o=l,(a=[{key:"prepare",value:function(b){var w=this;b.anchors.forEach(function(T,j){T.anchorType=function(P){return(typeof P.range=="string"?f.decode(P.range):P.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(T),w.map[T.anchorType].prepare(T,{index:j})})}},{key:"render",value:function(b,w){var T=this;b.openXml(s.StdDocAttributes),b.openNode(this.tag,l.DRAWING_ATTRIBUTES),w.anchors.forEach(function(j){T.map[j.anchorType].render(b,j)}),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(b){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(b,w){var T=this;b.anchors.forEach(function(j){j.br?T.map["xdr:twoCellAnchor"].reconcile(j,w):T.map["xdr:oneCellAnchor"].reconcile(j,w)})}},{key:"tag",get:function(){return"xdr:wsDr"}}])&&p(o.prototype,a),l}(n);r.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},A.exports=r},{"../../../utils/col-cache":19,"../../../utils/xml-stream":27,"../base-xform":31,"./one-cell-anchor-xform":66,"./two-cell-anchor-xform":69}],62:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(o){switch(o){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:extLst"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],63:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=c(n);if(t){var i=c(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return m(this,e)}}function m(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var f=h("../base-xform"),s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&v(o,a)})(i,n);var t,e,r=d(i);function i(o){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,i),(a=r.call(this)).tag=o.tag,a.map={},a}return t=i,(e=[{key:"render",value:function(o,a){o.openNode(this.tag);var u=Math.floor(9525*a.width),l=Math.floor(9525*a.height);o.addAttribute("cx",u),o.addAttribute("cy",l),o.closeNode()}},{key:"parseOpen",value:function(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&p(t.prototype,e),i}(f);A.exports=s},{"../base-xform":31}],64:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){a.hyperlinks&&a.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"a:hlinkClick"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],65:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../base-xform"),s=h("./c-nv-pr-xform"),n=h("./c-nv-pic-pr-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new n},u}return r=a,(i=[{key:"render",value:function(u,l){u.openNode(this.tag),this.map["xdr:cNvPr"].render(u,l),this.map["xdr:cNvPicPr"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:nvPicPr"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../base-xform":31,"./c-nv-pic-pr-xform":58,"./c-nv-pr-xform":59}],66:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("./base-cell-anchor-xform"),s=h("../static-xform"),n=h("./cell-position-xform"),t=h("./ext-xform"),e=h("./pic-xform"),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:from":new n({tag:"xdr:from"}),"xdr:ext":new t({tag:"xdr:ext"}),"xdr:pic":new e,"xdr:clientData":new s({tag:"xdr:clientData"})},b}return o=l,(a=[{key:"prepare",value:function(b,w){this.map["xdr:pic"].prepare(b.picture,w)}},{key:"render",value:function(b,w){b.openNode(this.tag,{editAs:w.range.editAs||"oneCell"}),this.map["xdr:from"].render(b,w.range.tl),this.map["xdr:ext"].render(b,w.range.ext),this.map["xdr:pic"].render(b,w.picture),this.map["xdr:clientData"].render(b,{}),b.closeNode()}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(b,w){b.medium=this.reconcilePicture(b.picture,w)}},{key:"tag",get:function(){return"xdr:oneCellAnchor"}}])&&p(o.prototype,a),l}(f);A.exports=r},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./ext-xform":63,"./pic-xform":67}],67:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../base-xform"),s=h("../static-xform"),n=h("./blip-fill-xform"),t=h("./nv-pic-pr-xform"),e=h("./sp-pr"),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(){var b;return function(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:nvPicPr":new t,"xdr:blipFill":new n,"xdr:spPr":new s(e)},b}return o=l,(a=[{key:"prepare",value:function(b,w){b.index=w.index+1}},{key:"render",value:function(b,w){b.openNode(this.tag),this.map["xdr:nvPicPr"].render(b,w),this.map["xdr:blipFill"].render(b,w),this.map["xdr:spPr"].render(b,w),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case this.tag:this.reset();break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(b){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:pic"}}])&&p(o.prototype,a),l}(f);A.exports=r},{"../base-xform":31,"../static-xform":119,"./blip-fill-xform":56,"./nv-pic-pr-xform":65,"./sp-pr":68}],68:[function(h,A,E){A.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],69:[function(h,A,E){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function p(r,i){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}();return function(){var o,a=c(r);if(i){var u=c(this).constructor;o=Reflect.construct(a,arguments,u)}else o=a.apply(this,arguments);return m(this,o)}}function m(r,i){return!i||y(i)!=="object"&&typeof i!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):i}function c(r){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(r)}var f=h("./base-cell-anchor-xform"),s=h("../static-xform"),n=h("./cell-position-xform"),t=h("./pic-xform"),e=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&v(l,b)})(u,r);var i,o,a=d(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).map={"xdr:from":new n({tag:"xdr:from"}),"xdr:to":new n({tag:"xdr:to"}),"xdr:pic":new t,"xdr:clientData":new s({tag:"xdr:clientData"})},l}return i=u,(o=[{key:"prepare",value:function(l,b){this.map["xdr:pic"].prepare(l.picture,b)}},{key:"render",value:function(l,b){l.openNode(this.tag,{editAs:b.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,b.range.tl),this.map["xdr:to"].render(l,b.range.br),this.map["xdr:pic"].render(l,b.picture),this.map["xdr:clientData"].render(l,{}),l.closeNode()}},{key:"parseClose",value:function(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(l,b){l.medium=this.reconcilePicture(l.picture,b)}},{key:"tag",get:function(){return"xdr:twoCellAnchor"}}])&&p(i.prototype,o),u}(f);A.exports=e},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./pic-xform":67}],70:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).tag=i.tag,o.always=!!i.always,o.count=i.count,o.empty=i.empty,o.$count=i.$count||"count",o.$=i.$,o.childXform=i.childXform,o.maxItems=i.maxItems,o}return n=r,(t=[{key:"prepare",value:function(i,o){var a=this.childXform;i&&i.forEach(function(u,l){o.index=l,a.prepare(u,o)})}},{key:"render",value:function(i,o){if(this.always||o&&o.length){i.openNode(this.tag,this.$),this.count&&i.addAttribute(this.$count,o&&o.length||0);var a=this.childXform;(o||[]).forEach(function(u,l){a.render(i,u,l)}),i.closeNode()}else this.empty&&i.leafNode(this.tag)}},{key:"parseOpen",value:function(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(i)&&(this.parser=this.childXform,!0)}}},{key:"parseText",value:function(i){this.parser&&this.parser.parseText(i)}},{key:"parseClose",value:function(i){if(this.parser){if(!this.parser.parseClose(i)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(i,o){if(i){var a=this.childXform;i.forEach(function(u){a.reconcile(u,o)})}}}])&&p(n.prototype,t),r}(h("./base-xform"));A.exports=f},{"./base-xform":31}],71:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../../utils/col-cache"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){if(u)if(typeof u=="string")a.leafNode("autoFilter",{ref:u});else{var l=function(T){return typeof T=="string"?T:s.getAddress(T.row,T.column).address},b=l(u.from),w=l(u.to);b&&w&&a.leafNode("autoFilter",{ref:"".concat(b,":").concat(w)})}}},{key:"parseOpen",value:function(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}},{key:"tag",get:function(){return"autoFilter"}}])&&v(e.prototype,r),o}(h("../base-xform"));A.exports=n},{"../../../utils/col-cache":19,"../base-xform":31}],72:[function(h,A,E){function y(l){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(l)}function p(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(l);b&&(T=T.filter(function(j){return Object.getOwnPropertyDescriptor(l,j).enumerable})),w.push.apply(w,T)}return w}function v(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}();return function(){var w,T=n(l);if(b){var j=n(this).constructor;w=Reflect.construct(T,arguments,j)}else w=T.apply(this,arguments);return s(this,w)}}function s(l,b){return!b||y(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function n(l){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var t=h("../../../utils/utils"),e=h("../base-xform"),r=h("../../../doc/range"),i=h("../../../doc/enums"),o=h("../strings/rich-text-xform");function a(l){if(l==null)return i.ValueType.Null;if(l instanceof String||typeof l=="string")return i.ValueType.String;if(typeof l=="number")return i.ValueType.Number;if(typeof l=="boolean")return i.ValueType.Boolean;if(l instanceof Date)return i.ValueType.Date;if(l.text&&l.hyperlink)return i.ValueType.Hyperlink;if(l.formula)return i.ValueType.Formula;if(l.error)return i.ValueType.Error;throw new Error("I could not understand type of value")}var u=function(l){(function(P,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(O&&O.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),O&&c(P,O)})(j,l);var b,w,T=f(j);function j(){var P;return function(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}(this,j),(P=T.call(this)).richTextXForm=new o,P}return b=j,(w=[{key:"prepare",value:function(P,O){var C=O.styles.addStyleModel(P.style||{},function(S){switch(S.type){case i.ValueType.Formula:return a(S.result);default:return S.type}}(P));switch(C&&(P.styleId=C),P.comment&&O.comments.push(v(v({},P.comment),{},{ref:P.address})),P.type){case i.ValueType.String:case i.ValueType.RichText:O.sharedStrings&&(P.ssId=O.sharedStrings.add(P.value));break;case i.ValueType.Date:O.date1904&&(P.date1904=!0);break;case i.ValueType.Hyperlink:O.sharedStrings&&P.text!==void 0&&P.text!==null&&(P.ssId=O.sharedStrings.add(P.text)),O.hyperlinks.push({address:P.address,target:P.hyperlink,tooltip:P.tooltip});break;case i.ValueType.Merge:O.merges.add(P);break;case i.ValueType.Formula:if(O.date1904&&(P.date1904=!0),P.shareType==="shared"&&(P.si=O.siFormulae++),P.formula)O.formulae[P.address]=P;else if(P.sharedFormula){var _=O.formulae[P.sharedFormula];if(!_)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(P.address));_.si===void 0?(_.shareType="shared",_.si=O.siFormulae++,_.range=new r(_.address,P.address)):_.range&&_.range.expandToAddress(P.address),P.si=_.si}}}},{key:"renderFormula",value:function(P,O){var C=null;switch(O.shareType){case"shared":C={t:"shared",ref:O.ref||O.range.range,si:O.si};break;case"array":C={t:"array",ref:O.ref};break;default:O.si!==void 0&&(C={t:"shared",si:O.si})}switch(a(O.result)){case i.ValueType.Null:P.leafNode("f",C,O.formula);break;case i.ValueType.String:P.addAttribute("t","str"),P.leafNode("f",C,O.formula),P.leafNode("v",null,O.result);break;case i.ValueType.Number:P.leafNode("f",C,O.formula),P.leafNode("v",null,O.result);break;case i.ValueType.Boolean:P.addAttribute("t","b"),P.leafNode("f",C,O.formula),P.leafNode("v",null,O.result?1:0);break;case i.ValueType.Error:P.addAttribute("t","e"),P.leafNode("f",C,O.formula),P.leafNode("v",null,O.result.error);break;case i.ValueType.Date:P.leafNode("f",C,O.formula),P.leafNode("v",null,t.dateToExcel(O.result,O.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(P,O){var C=this;if(O.type!==i.ValueType.Null||O.styleId){switch(P.openNode("c"),P.addAttribute("r",O.address),O.styleId&&P.addAttribute("s",O.styleId),O.type){case i.ValueType.Null:break;case i.ValueType.Number:P.leafNode("v",null,O.value);break;case i.ValueType.Boolean:P.addAttribute("t","b"),P.leafNode("v",null,O.value?"1":"0");break;case i.ValueType.Error:P.addAttribute("t","e"),P.leafNode("v",null,O.value.error);break;case i.ValueType.String:case i.ValueType.RichText:O.ssId!==void 0?(P.addAttribute("t","s"),P.leafNode("v",null,O.ssId)):O.value&&O.value.richText?(P.addAttribute("t","inlineStr"),P.openNode("is"),O.value.richText.forEach(function(_){C.richTextXForm.render(P,_)}),P.closeNode("is")):(P.addAttribute("t","str"),P.leafNode("v",null,O.value));break;case i.ValueType.Date:P.leafNode("v",null,t.dateToExcel(O.value,O.date1904));break;case i.ValueType.Hyperlink:O.ssId!==void 0?(P.addAttribute("t","s"),P.leafNode("v",null,O.ssId)):(P.addAttribute("t","str"),P.leafNode("v",null,O.text));break;case i.ValueType.Formula:this.renderFormula(P,O);break;case i.ValueType.Merge:}P.closeNode()}}},{key:"parseOpen",value:function(P){if(this.parser)return this.parser.parseOpen(P),!0;switch(P.name){case"c":return this.model={address:P.attributes.r},this.t=P.attributes.t,P.attributes.s&&(this.model.styleId=parseInt(P.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=P.attributes.si,this.model.shareType=P.attributes.t,this.model.ref=P.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(P),!0;default:return!1}}},{key:"parseText",value:function(P){if(this.parser)this.parser.parseText(P);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+P:P;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+P:P:this.model.value=this.model.value?this.model.value+P:P}}},{key:"parseClose",value:function(P){switch(P){case"c":var O=this.model;if(O.formula||O.shareType)O.type=i.ValueType.Formula,O.value&&(this.t==="str"?O.result=t.xmlDecode(O.value):this.t==="b"?O.result=parseInt(O.value,10)!==0:this.t==="e"?O.result={error:O.value}:O.result=parseFloat(O.value),O.value=void 0);else if(O.value!==void 0)switch(this.t){case"s":O.type=i.ValueType.String,O.value=parseInt(O.value,10);break;case"str":O.type=i.ValueType.String,O.value=t.xmlDecode(O.value);break;case"inlineStr":O.type=i.ValueType.String;break;case"b":O.type=i.ValueType.Boolean,O.value=parseInt(O.value,10)!==0;break;case"e":O.type=i.ValueType.Error,O.value={error:O.value};break;default:O.type=i.ValueType.Number,O.value=parseFloat(O.value)}else O.styleId?O.type=i.ValueType.Null:O.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(P),!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(P),!0)}}},{key:"reconcile",value:function(P,O){var C=P.styleId&&O.styles&&O.styles.getStyleModel(P.styleId);switch(C&&(P.style=C),P.styleId!==void 0&&(P.styleId=void 0),P.type){case i.ValueType.String:typeof P.value=="number"&&O.sharedStrings&&(P.value=O.sharedStrings.getString(P.value)),P.value.richText&&(P.type=i.ValueType.RichText);break;case i.ValueType.Number:C&&t.isDateFmt(C.numFmt)&&(P.type=i.ValueType.Date,P.value=t.excelToDate(P.value,O.date1904));break;case i.ValueType.Formula:P.result!==void 0&&C&&t.isDateFmt(C.numFmt)&&(P.result=t.excelToDate(P.result,O.date1904)),P.shareType==="shared"&&(P.ref?O.formulae[P.si]=P.address:(P.sharedFormula=O.formulae[P.si],delete P.shareType),delete P.si)}var _=O.hyperlinkMap[P.address];_&&(P.type===i.ValueType.Formula?(P.text=P.result,P.result=void 0):(P.text=P.value,P.value=void 0),P.type=i.ValueType.Hyperlink,P.hyperlink=_);var S=O.commentsMap&&O.commentsMap[P.address];S&&(P.comment=S)}},{key:"tag",get:function(){return"c"}}])&&m(b.prototype,w),j}(e);A.exports=u},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],73:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../base-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{iconSet:u.iconSet,iconId:u.iconId})}},{key:"parseOpen",value:function(a){var u=a.attributes;this.model={iconSet:u.iconSet,iconId:s.toIntValue(u.iconId)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"x14:cfIcon"}}])&&v(e.prototype,r),o}(s);A.exports=n},{"../../base-xform":31}],74:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=c(o);if(a){var b=c(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return m(this,u)}}function m(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var f=h("uuid").v4,s=h("../../base-xform"),n=h("../../composite-xform"),t=h("./databar-ext-xform"),e=h("./icon-set-ext-xform"),r={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},i=function(o){(function(T,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(j&&j.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),j&&v(T,j)})(w,o);var a,u,l,b=d(w);function w(){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,w),(T=b.call(this)).map={"x14:dataBar":T.databarXform=new t,"x14:iconSet":T.iconSetXform=new e},T}return a=w,l=[{key:"isExt",value:function(T){return T.type==="dataBar"?t.isExt(T):!(T.type!=="iconSet"||!T.custom&&!r[T.iconSet])}}],(u=[{key:"prepare",value:function(T){w.isExt(T)&&(T.x14Id="{".concat(f(),"}").toUpperCase())}},{key:"render",value:function(T,j){if(w.isExt(j))switch(j.type){case"dataBar":this.renderDataBar(T,j);break;case"iconSet":this.renderIconSet(T,j)}}},{key:"renderDataBar",value:function(T,j){T.openNode(this.tag,{type:"dataBar",id:j.x14Id}),this.databarXform.render(T,j),T.closeNode()}},{key:"renderIconSet",value:function(T,j){T.openNode(this.tag,{type:"iconSet",priority:j.priority,id:j.x14Id||"{".concat(f(),"}")}),this.iconSetXform.render(T,j),T.closeNode()}},{key:"createNewModel",value:function(T){var j=T.attributes;return{type:j.type,x14Id:j.id,priority:s.toIntValue(j.priority)}}},{key:"onParserClose",value:function(T,j){Object.assign(this.model,j.model)}},{key:"tag",get:function(){return"x14:cfRule"}}])&&p(a.prototype,u),l&&p(a,l),w}(n);A.exports=i},{"../../base-xform":31,"../../composite-xform":47,"./databar-ext-xform":78,"./icon-set-ext-xform":80,uuid:526}],75:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../../composite-xform"),s=h("./f-ext-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).map={"xm:f":a.fExtXform=new s},a}return e=o,(r=[{key:"render",value:function(a,u){a.openNode(this.tag,{type:u.type}),u.value!==void 0&&this.fExtXform.render(a,u.value),a.closeNode()}},{key:"createNewModel",value:function(a){return{type:a.attributes.type}}},{key:"onParserClose",value:function(a,u){switch(a){case"xm:f":this.model.value=u.model?parseFloat(u.model):0}}},{key:"tag",get:function(){return"x14:cfvo"}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../../composite-xform":47,"./f-ext-xform":79}],76:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../composite-xform"),s=h("./sqref-ext-xform"),n=h("./cf-rule-ext-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"xm:sqref":u.sqRef=new s,"x14:cfRule":u.cfRule=new n},u}return r=a,(i=[{key:"prepare",value:function(u,l){var b=this;u.rules.forEach(function(w){b.cfRule.prepare(w,l)})}},{key:"render",value:function(u,l){var b=this;l.rules.some(n.isExt)&&(u.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),l.rules.filter(n.isExt).forEach(function(w){return b.cfRule.render(u,w)}),this.sqRef.render(u,l.ref),u.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(u,l){switch(u){case"xm:sqref":this.model.ref=l.model;break;case"x14:cfRule":this.model.rules.push(l.model)}}},{key:"tag",get:function(){return"x14:conditionalFormatting"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./sqref-ext-xform":81}],77:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../composite-xform"),s=h("./cf-rule-ext-xform"),n=h("./conditional-formatting-ext-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={"x14:conditionalFormatting":u.cfXform=new n},u}return r=a,(i=[{key:"hasContent",value:function(u){return u.hasExtContent===void 0&&(u.hasExtContent=u.some(function(l){return l.rules.some(s.isExt)})),u.hasExtContent}},{key:"prepare",value:function(u,l){var b=this;u.forEach(function(w){b.cfXform.prepare(w,l)})}},{key:"render",value:function(u,l){var b=this;this.hasContent(l)&&(u.openNode(this.tag),l.forEach(function(w){return b.cfXform.render(u,w)}),u.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(u,l){this.model.push(l.model)}},{key:"tag",get:function(){return"x14:conditionalFormattings"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./conditional-formatting-ext-xform":76}],78:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){return function(u){if(Array.isArray(u))return u}(o)||function(u,l){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var b=[],w=!0,T=!1,j=void 0;try{for(var P,O=u[Symbol.iterator]();!(w=(P=O.next()).done)&&(b.push(P.value),!l||b.length!==l);w=!0);}catch(C){T=!0,j=C}finally{try{w||O.return==null||O.return()}finally{if(T)throw j}}return b}}(o,a)||function(u,l){if(u){if(typeof u=="string")return v(u,l);var b=Object.prototype.toString.call(u).slice(8,-1);if(b==="Object"&&u.constructor&&(b=u.constructor.name),b==="Map"||b==="Set")return Array.from(u);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return v(u,l)}}(o,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(o,a){(a==null||a>o.length)&&(a=o.length);for(var u=0,l=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=s(o);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return f(this,u)}}function f(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function s(o){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var n=h("../../base-xform"),t=h("../../composite-xform"),e=h("../../style/color-xform"),r=h("./cfvo-ext-xform"),i=function(o){(function(T,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(j&&j.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),j&&m(T,j)})(w,o);var a,u,l,b=c(w);function w(){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,w),(T=b.call(this)).map={"x14:cfvo":T.cfvoXform=new r,"x14:borderColor":T.borderColorXform=new e("x14:borderColor"),"x14:negativeBorderColor":T.negativeBorderColorXform=new e("x14:negativeBorderColor"),"x14:negativeFillColor":T.negativeFillColorXform=new e("x14:negativeFillColor"),"x14:axisColor":T.axisColorXform=new e("x14:axisColor")},T}return a=w,l=[{key:"isExt",value:function(T){return!T.gradient}}],(u=[{key:"render",value:function(T,j){var P=this;T.openNode(this.tag,{minLength:n.toIntAttribute(j.minLength,0,!0),maxLength:n.toIntAttribute(j.maxLength,100,!0),border:n.toBoolAttribute(j.border,!1),gradient:n.toBoolAttribute(j.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(j.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(j.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(j.axisPosition,"auto"),direction:n.toAttribute(j.direction,"leftToRight")}),j.cfvo.forEach(function(O){P.cfvoXform.render(T,O)}),this.borderColorXform.render(T,j.borderColor),this.negativeBorderColorXform.render(T,j.negativeBorderColor),this.negativeFillColorXform.render(T,j.negativeFillColor),this.axisColorXform.render(T,j.axisColor),T.closeNode()}},{key:"createNewModel",value:function(T){var j=T.attributes;return{cfvo:[],minLength:n.toIntValue(j.minLength,0),maxLength:n.toIntValue(j.maxLength,100),border:n.toBoolValue(j.border,!1),gradient:n.toBoolValue(j.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(j.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(j.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(j.axisPosition,"auto"),direction:n.toStringValue(j.direction,"leftToRight")}}},{key:"onParserClose",value:function(T,j){var P=p(T.split(":"),2)[1];switch(P){case"cfvo":this.model.cfvo.push(j.model);break;default:this.model[P]=j.model}}},{key:"tag",get:function(){return"x14:dataBar"}}])&&d(a.prototype,u),l&&d(a,l),w}(t);A.exports=i},{"../../base-xform":31,"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-ext-xform":75}],79:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(o){this.model+=o}},{key:"parseClose",value:function(o){return o!==this.tag}},{key:"tag",get:function(){return"xm:f"}}])&&v(t.prototype,e),i}(h("../../base-xform"));A.exports=s},{"../../base-xform":31}],80:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){return function(u){if(Array.isArray(u))return u}(o)||function(u,l){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var b=[],w=!0,T=!1,j=void 0;try{for(var P,O=u[Symbol.iterator]();!(w=(P=O.next()).done)&&(b.push(P.value),!l||b.length!==l);w=!0);}catch(C){T=!0,j=C}finally{try{w||O.return==null||O.return()}finally{if(T)throw j}}return b}}(o,a)||function(u,l){if(u){if(typeof u=="string")return v(u,l);var b=Object.prototype.toString.call(u).slice(8,-1);if(b==="Object"&&u.constructor&&(b=u.constructor.name),b==="Map"||b==="Set")return Array.from(u);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return v(u,l)}}(o,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(o,a){(a==null||a>o.length)&&(a=o.length);for(var u=0,l=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=s(o);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return f(this,u)}}function f(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function s(o){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var n=h("../../base-xform"),t=h("../../composite-xform"),e=h("./cfvo-ext-xform"),r=h("./cf-icon-ext-xform"),i=function(o){(function(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),T&&m(w,T)})(b,o);var a,u,l=c(b);function b(){var w;return function(T,j){if(!(T instanceof j))throw new TypeError("Cannot call a class as a function")}(this,b),(w=l.call(this)).map={"x14:cfvo":w.cfvoXform=new e,"x14:cfIcon":w.cfIconXform=new r},w}return a=b,(u=[{key:"render",value:function(w,T){var j=this;w.openNode(this.tag,{iconSet:n.toStringAttribute(T.iconSet),reverse:n.toBoolAttribute(T.reverse,!1),showValue:n.toBoolAttribute(T.showValue,!0),custom:n.toBoolAttribute(T.icons,!1)}),T.cfvo.forEach(function(P){j.cfvoXform.render(w,P)}),T.icons&&T.icons.forEach(function(P,O){P.iconId=O,j.cfIconXform.render(w,P)}),w.closeNode()}},{key:"createNewModel",value:function(w){var T=w.attributes;return{cfvo:[],iconSet:n.toStringValue(T.iconSet,"3TrafficLights"),reverse:n.toBoolValue(T.reverse,!1),showValue:n.toBoolValue(T.showValue,!0)}}},{key:"onParserClose",value:function(w,T){var j=p(w.split(":"),2)[1];switch(j){case"cfvo":this.model.cfvo.push(T.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(T.model);break;default:this.model[j]=T.model}}},{key:"tag",get:function(){return"x14:iconSet"}}])&&d(a.prototype,u),b}(t);A.exports=i},{"../../base-xform":31,"../../composite-xform":47,"./cf-icon-ext-xform":73,"./cfvo-ext-xform":75}],81:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(o){this.model+=o}},{key:"parseClose",value:function(o){return o!==this.tag}},{key:"tag",get:function(){return"xm:sqref"}}])&&v(t.prototype,e),i}(h("../../base-xform"));A.exports=s},{"../../base-xform":31}],82:[function(h,A,E){function y(T){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(T)}function p(T,j){var P=Object.keys(T);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(T);j&&(O=O.filter(function(C){return Object.getOwnPropertyDescriptor(T,C).enumerable})),P.push.apply(P,O)}return P}function v(T){for(var j=1;j"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(P){return!1}}();return function(){var P,O=n(T);if(j){var C=n(this).constructor;P=Reflect.construct(O,arguments,C)}else P=O.apply(this,arguments);return s(this,P)}}function s(T,j){return!j||y(j)!=="object"&&typeof j!="function"?function(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}(T):j}function n(T){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(j){return j.__proto__||Object.getPrototypeOf(j)})(T)}var t=h("../../base-xform"),e=h("../../composite-xform"),r=h("../../../../doc/range"),i=h("./databar-xform"),o=h("./ext-lst-ref-xform"),a=h("./formula-xform"),u=h("./color-scale-xform"),l=h("./icon-set-xform"),b={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},w=function(T){(function(S,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),g&&c(S,g)})(_,T);var j,P,O,C=f(_);function _(){var S;return function(g,R){if(!(g instanceof R))throw new TypeError("Cannot call a class as a function")}(this,_),(S=C.call(this)).map={dataBar:S.databarXform=new i,extLst:S.extLstRefXform=new o,formula:S.formulaXform=new a,colorScale:S.colorScaleXform=new u,iconSet:S.iconSetXform=new l},S}return j=_,O=[{key:"isPrimitive",value:function(S){return S.type!=="iconSet"||!S.custom&&!b[S.iconSet]}}],(P=[{key:"render",value:function(S,g){switch(g.type){case"expression":this.renderExpression(S,g);break;case"cellIs":this.renderCellIs(S,g);break;case"top10":this.renderTop10(S,g);break;case"aboveAverage":this.renderAboveAverage(S,g);break;case"dataBar":this.renderDataBar(S,g);break;case"colorScale":this.renderColorScale(S,g);break;case"iconSet":this.renderIconSet(S,g);break;case"containsText":this.renderText(S,g);break;case"timePeriod":this.renderTimePeriod(S,g)}}},{key:"renderExpression",value:function(S,g){S.openNode(this.tag,{type:"expression",dxfId:g.dxfId,priority:g.priority}),this.formulaXform.render(S,g.formulae[0]),S.closeNode()}},{key:"renderCellIs",value:function(S,g){var R=this;S.openNode(this.tag,{type:"cellIs",dxfId:g.dxfId,priority:g.priority,operator:g.operator}),g.formulae.forEach(function(x){R.formulaXform.render(S,x)}),S.closeNode()}},{key:"renderTop10",value:function(S,g){S.leafNode(this.tag,{type:"top10",dxfId:g.dxfId,priority:g.priority,percent:t.toBoolAttribute(g.percent,!1),bottom:t.toBoolAttribute(g.bottom,!1),rank:t.toIntValue(g.rank,10,!0)})}},{key:"renderAboveAverage",value:function(S,g){S.leafNode(this.tag,{type:"aboveAverage",dxfId:g.dxfId,priority:g.priority,aboveAverage:t.toBoolAttribute(g.aboveAverage,!0)})}},{key:"renderDataBar",value:function(S,g){S.openNode(this.tag,{type:"dataBar",priority:g.priority}),this.databarXform.render(S,g),this.extLstRefXform.render(S,g),S.closeNode()}},{key:"renderColorScale",value:function(S,g){S.openNode(this.tag,{type:"colorScale",priority:g.priority}),this.colorScaleXform.render(S,g),S.closeNode()}},{key:"renderIconSet",value:function(S,g){_.isPrimitive(g)&&(S.openNode(this.tag,{type:"iconSet",priority:g.priority}),this.iconSetXform.render(S,g),S.closeNode())}},{key:"renderText",value:function(S,g){S.openNode(this.tag,{type:g.operator,dxfId:g.dxfId,priority:g.priority,operator:t.toStringAttribute(g.operator,"containsText")});var R=function(x){if(x.formulae&&x.formulae[0])return x.formulae[0];var k=new r(x.ref).tl;switch(x.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(x.text,'",').concat(k,")))");case"containsBlanks":return"LEN(TRIM(".concat(k,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(k,"))>0");case"containsErrors":return"ISERROR(".concat(k,")");case"notContainsErrors":return"NOT(ISERROR(".concat(k,"))");default:return}}(g);R&&this.formulaXform.render(S,R),S.closeNode()}},{key:"renderTimePeriod",value:function(S,g){S.openNode(this.tag,{type:"timePeriod",dxfId:g.dxfId,priority:g.priority,timePeriod:g.timePeriod});var R=function(x){if(x.formulae&&x.formulae[0])return x.formulae[0];var k=new r(x.ref).tl;switch(x.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(k,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(k,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(k,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(k,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(k,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(k,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(k,",1)=TODAY()-1");case"today":return"FLOOR(".concat(k,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(k,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(k,",1)<=6,FLOOR(").concat(k,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(k,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(k,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(k,")=MONTH(TODAY()),YEAR(").concat(k,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(k,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(k,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(g);R&&this.formulaXform.render(S,R),S.closeNode()}},{key:"createNewModel",value:function(S){var g=S.attributes;return v(v({},function(R){var x=R.type,k=R.operator;switch(x){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:x};default:return{type:x,operator:k}}}(g)),{},{dxfId:t.toIntValue(g.dxfId),priority:t.toIntValue(g.priority),timePeriod:g.timePeriod,percent:t.toBoolValue(g.percent),bottom:t.toBoolValue(g.bottom),rank:t.toIntValue(g.rank),aboveAverage:t.toBoolValue(g.aboveAverage)})}},{key:"onParserClose",value:function(S,g){switch(S){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,g.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(g.model)}}},{key:"tag",get:function(){return"cfRule"}}])&&m(j.prototype,P),O&&m(j,O),_}(e);A.exports=w},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../base-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{type:u.type,val:u.value})}},{key:"parseOpen",value:function(a){this.model={type:a.attributes.type,value:s.toFloatValue(a.attributes.val)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"cfvo"}}])&&v(e.prototype,r),o}(s);A.exports=n},{"../../base-xform":31}],84:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../composite-xform"),s=h("../../style/color-xform"),n=h("./cfvo-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={cfvo:u.cfvoXform=new n,color:u.colorXform=new s},u}return r=a,(i=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),l.color.forEach(function(w){b.colorXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(u,l){this.model[u].push(l.model)}},{key:"tag",get:function(){return"colorScale"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],85:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../../composite-xform"),s=h("./cf-rule-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).map={cfRule:new s},a}return e=o,(r=[{key:"render",value:function(a,u){var l=this;u.rules.some(s.isPrimitive)&&(a.openNode(this.tag,{sqref:u.ref}),u.rules.forEach(function(b){s.isPrimitive(b)&&(b.ref=u.ref,l.map.cfRule.render(a,b))}),a.closeNode())}},{key:"createNewModel",value:function(a){return{ref:a.attributes.sqref,rules:[]}}},{key:"onParserClose",value:function(a,u){this.model.rules.push(u.model)}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../../composite-xform":47,"./cf-rule-xform":82}],86:[function(h,A,E){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function p(r){return function(i){if(Array.isArray(i))return v(i)}(r)||function(i){if(typeof Symbol<"u"&&Symbol.iterator in Object(i))return Array.from(i)}(r)||function(i,o){if(i){if(typeof i=="string")return v(i,o);var a=Object.prototype.toString.call(i).slice(8,-1);if(a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set")return Array.from(i);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return v(i,o)}}(r)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(r,i){(i==null||i>r.length)&&(i=r.length);for(var o=0,a=new Array(i);o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}();return function(){var o,a=s(r);if(i){var u=s(this).constructor;o=Reflect.construct(a,arguments,u)}else o=a.apply(this,arguments);return f(this,o)}}function f(r,i){return!i||y(i)!=="object"&&typeof i!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):i}function s(r){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(r)}var n=h("../../base-xform"),t=h("./conditional-formatting-xform"),e=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&m(l,b)})(u,r);var i,o,a=c(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).cfXform=new t,l}return i=u,(o=[{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(l,b){var w=l.reduce(function(T,j){return Math.max.apply(Math,[T].concat(p(j.rules.map(function(P){return P.priority||0}))))},1);l.forEach(function(T){T.rules.forEach(function(j){j.priority||(j.priority=w++),j.style&&(j.dxfId=b.styles.addDxfStyle(j.style))})})}},{key:"render",value:function(l,b){var w=this;b.forEach(function(T){w.cfXform.render(l,T)})}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(l),!0;default:return!1}}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){return!(!this.parser||!this.parser.parseClose(l)&&(this.model.push(this.parser.model),this.parser=void 0,1))}},{key:"reconcile",value:function(l,b){l.forEach(function(w){w.rules.forEach(function(T){T.dxfId!==void 0&&(T.style=b.styles.getDxfStyle(T.dxfId),delete T.dxfId)})})}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&d(i.prototype,o),u}(n);A.exports=e},{"../../base-xform":31,"./conditional-formatting-xform":85}],87:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../composite-xform"),s=h("../../style/color-xform"),n=h("./cfvo-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={cfvo:u.cfvoXform=new n,color:u.colorXform=new s},u}return r=a,(i=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),this.colorXform.render(u,l.color),u.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(u,l){switch(u){case"cfvo":this.model.cfvo.push(l.model);break;case"color":this.model.color=l.model}}},{key:"tag",get:function(){return"dataBar"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],88:[function(h,A,E){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}();return function(){var l,b=n(a);if(u){var w=n(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return s(this,l)}}function s(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function n(a){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var t=h("../../base-xform"),e=h("../../composite-xform"),r=function(a){m(l,a);var u=f(l);function l(){return p(this,l),u.apply(this,arguments)}return d(l,[{key:"render",value:function(b,w){b.leafNode(this.tag,null,w)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(b){this.model+=b}},{key:"parseClose",value:function(b){return b!==this.tag}},{key:"tag",get:function(){return"x14:id"}}]),l}(t),i=function(a){m(l,a);var u=f(l);function l(){var b;return p(this,l),(b=u.call(this)).map={"x14:id":b.idXform=new r},b}return d(l,[{key:"render",value:function(b,w){b.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(b,w.x14Id),b.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(b,w){this.model.x14Id=w.model}},{key:"tag",get:function(){return"ext"}}]),l}(e),o=function(a){m(l,a);var u=f(l);function l(){var b;return p(this,l),(b=u.call(this)).map={ext:new i},b}return d(l,[{key:"render",value:function(b,w){b.openNode(this.tag),this.map.ext.render(b,w),b.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(b,w){Object.assign(this.model,w.model)}},{key:"tag",get:function(){return"extLst"}}]),l}(e);A.exports=o},{"../../base-xform":31,"../../composite-xform":47}],89:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(o){this.model+=o}},{key:"parseClose",value:function(o){return o!==this.tag}},{key:"tag",get:function(){return"formula"}}])&&v(t.prototype,e),i}(h("../../base-xform"));A.exports=s},{"../../base-xform":31}],90:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../base-xform"),s=h("../../composite-xform"),n=h("./cfvo-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=o.call(this)).map={cfvo:u.cfvoXform=new n},u}return r=a,(i=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag,{iconSet:f.toStringAttribute(l.iconSet,"3TrafficLights"),reverse:f.toBoolAttribute(l.reverse,!1),showValue:f.toBoolAttribute(l.showValue,!0)}),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){var l=u.attributes;return{iconSet:f.toStringValue(l.iconSet,"3TrafficLights"),reverse:f.toBoolValue(l.reverse),showValue:f.toBoolValue(l.showValue),cfvo:[]}}},{key:"onParserClose",value:function(u,l){this.model[u].push(l.model)}},{key:"tag",get:function(){return"iconSet"}}])&&p(r.prototype,i),a}(s);A.exports=t},{"../../base-xform":31,"../../composite-xform":47,"./cfvo-xform":83}],91:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"prepare",value:function(o,a){var u=a.styles.addStyleModel(o.style||{});u&&(o.styleId=u)}},{key:"render",value:function(o,a){o.openNode("col"),o.addAttribute("min",a.min),o.addAttribute("max",a.max),a.width&&o.addAttribute("width",a.width),a.styleId&&o.addAttribute("style",a.styleId),a.hidden&&o.addAttribute("hidden","1"),a.bestFit&&o.addAttribute("bestFit","1"),a.outlineLevel&&o.addAttribute("outlineLevel",a.outlineLevel),a.collapsed&&o.addAttribute("collapsed","1"),o.addAttribute("customWidth","1"),o.closeNode()}},{key:"parseOpen",value:function(o){if(o.name==="col"){var a=this.model={min:parseInt(o.attributes.min||"0",10),max:parseInt(o.attributes.max||"0",10),width:o.attributes.width===void 0?void 0:parseFloat(o.attributes.width||"0")};return o.attributes.style&&(a.styleId=parseInt(o.attributes.style,10)),o.attributes.hidden!==!0&&o.attributes.hidden!=="true"&&o.attributes.hidden!==1&&o.attributes.hidden!=="1"||(a.hidden=!0),o.attributes.bestFit&&(a.bestFit=!0),o.attributes.outlineLevel&&(a.outlineLevel=parseInt(o.attributes.outlineLevel,10)),o.attributes.collapsed&&(a.collapsed=!0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(o,a){o.styleId&&(o.style=a.styles.getStyleModel(o.styleId))}},{key:"tag",get:function(){return"col"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],92:[function(h,A,E){function y(w){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(w)}function p(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function v(w,T){for(var j=0;j"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(j){return!1}}();return function(){var j,P=f(w);if(T){var O=f(this).constructor;j=Reflect.construct(P,arguments,O)}else j=P.apply(this,arguments);return c(this,j)}}function c(w,T){return!T||y(T)!=="object"&&typeof T!="function"?function(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}(w):T}function f(w){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(w)}function s(w,T){var j=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);T&&(P=P.filter(function(O){return Object.getOwnPropertyDescriptor(w,O).enumerable})),j.push.apply(j,P)}return j}function n(w){for(var T=1;T1||U>1){var q=D.row+(L-1),$=D.col+(U-1);return n(n({},M.dataValidation),{},{sqref:"".concat(M.address,":").concat(i.encodeAddress(q,$))})}return n(n({},M.dataValidation),{},{sqref:M.address})}return null}).filter(Boolean)}(_);S.length&&(C.openNode("dataValidations",{count:S.length}),S.forEach(function(g){C.openNode("dataValidation"),g.type!=="any"&&(C.addAttribute("type",g.type),g.operator&&g.type!=="list"&&g.operator!=="between"&&C.addAttribute("operator",g.operator),g.allowBlank&&C.addAttribute("allowBlank","1")),g.showInputMessage&&C.addAttribute("showInputMessage","1"),g.promptTitle&&C.addAttribute("promptTitle",g.promptTitle),g.prompt&&C.addAttribute("prompt",g.prompt),g.showErrorMessage&&C.addAttribute("showErrorMessage","1"),g.errorStyle&&C.addAttribute("errorStyle",g.errorStyle),g.errorTitle&&C.addAttribute("errorTitle",g.errorTitle),g.error&&C.addAttribute("error",g.error),C.addAttribute("sqref",g.sqref),(g.formulae||[]).forEach(function(R,x){C.openNode("formula".concat(x+1)),g.type==="date"?C.writeText(r.dateToExcel(new Date(R))):C.writeText(R),C.closeNode()}),C.closeNode()}),C.closeNode())}},{key:"parseOpen",value:function(C){switch(C.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=C.attributes.sqref;var _={type:C.attributes.type||"any",formulae:[]};switch(C.attributes.type&&l(_,C.attributes,"allowBlank"),l(_,C.attributes,"showInputMessage"),l(_,C.attributes,"showErrorMessage"),_.type){case"any":case"list":case"custom":break;default:u(_,C.attributes,"operator","between")}return u(_,C.attributes,"promptTitle"),u(_,C.attributes,"prompt"),u(_,C.attributes,"errorStyle"),u(_,C.attributes,"errorTitle"),u(_,C.attributes,"error"),this._dataValidation=_,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(C){this._formula&&this._formula.push(C)}},{key:"parseClose",value:function(C){var _=this;switch(C){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(function(g){g.includes(":")?new a(g).forEachAddress(function(R){_.model[R]=_._dataValidation}):_.model[g]=_._dataValidation}),!0;case"formula1":case"formula2":var S=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":S=parseInt(S,10);break;case"decimal":S=parseFloat(S);break;case"date":S=r.excelToDate(parseFloat(S))}return this._dataValidation.formulae.push(S),this._formula=void 0,!0;default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}])&&v(T.prototype,j),O}(o);A.exports=b},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){a&&o.leafNode("dimension",{ref:a})}},{key:"parseOpen",value:function(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"dimension"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],94:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"drawing"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],95:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function v(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=n(o);if(a){var b=n(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return s(this,u)}}function s(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function n(o){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var t=h("../composite-xform"),e=h("./cf-ext/conditional-formattings-ext-xform"),r=function(o){m(u,o);var a=f(u);function u(){var l;return p(this,u),(l=a.call(this)).map={"x14:conditionalFormattings":l.conditionalFormattings=new e},l}return d(u,[{key:"hasContent",value:function(l){return this.conditionalFormattings.hasContent(l.conditionalFormattings)}},{key:"prepare",value:function(l,b){this.conditionalFormattings.prepare(l.conditionalFormattings,b)}},{key:"render",value:function(l,b){l.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(l,b.conditionalFormattings),l.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,b){this.model[l]=b.model}},{key:"tag",get:function(){return"ext"}}]),u}(t),i=function(o){m(u,o);var a=f(u);function u(){var l;return p(this,u),(l=a.call(this)).map={ext:l.ext=new r},l}return d(u,[{key:"prepare",value:function(l,b){this.ext.prepare(l,b)}},{key:"hasContent",value:function(l){return this.ext.hasContent(l)}},{key:"render",value:function(l,b){this.hasContent(b)&&(l.openNode("extLst"),this.ext.render(l,b),l.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,b){Object.assign(this.model,b.model)}},{key:"tag",get:function(){return"extLst"}}]),u}(t);A.exports=i},{"../composite-xform":47,"./cf-ext/conditional-formattings-ext-xform":77}],96:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){if(a){o.addRollback();var u=!1;o.openNode("headerFooter"),a.differentFirst&&(o.addAttribute("differentFirst","1"),u=!0),a.differentOddEven&&(o.addAttribute("differentOddEven","1"),u=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(o.leafNode("oddHeader",null,a.oddHeader),u=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(o.leafNode("oddFooter",null,a.oddFooter),u=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(o.leafNode("evenHeader",null,a.evenHeader),u=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(o.leafNode("evenFooter",null,a.evenFooter),u=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(o.leafNode("firstHeader",null,a.firstHeader),u=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(o.leafNode("firstFooter",null,a.firstFooter),u=!0),u?(o.closeNode(),o.commit()):o.rollback()}}},{key:"parseOpen",value:function(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}},{key:"tag",get:function(){return"headerFooter"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],97:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}},{key:"parseOpen",value:function(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"hyperlink"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],98:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("mergeCell",{ref:a})}},{key:"parseOpen",value:function(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"mergeCell"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],99:[function(h,A,E){function y(f,s){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=f(e);if(r){var a=f(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return c(this,i)}}function c(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var s=h("../base-xform"),n=function(e){return e!==void 0},t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,e);var r,i,o=m(a);function a(){return p(this,a),o.apply(this,arguments)}return r=a,(i=[{key:"render",value:function(u,l){return!(!l||!n(l.summaryBelow)&&!n(l.summaryRight)||(u.leafNode(this.tag,{summaryBelow:n(l.summaryBelow)?Number(l.summaryBelow):void 0,summaryRight:n(l.summaryRight)?Number(l.summaryRight):void 0}),0))}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={summaryBelow:n(u.attributes.summaryBelow)?!!Number(u.attributes.summaryBelow):void 0,summaryRight:n(u.attributes.summaryRight)?!!Number(u.attributes.summaryRight):void 0},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"outlinePr"}}])&&v(r.prototype,i),a}(s);A.exports=t},{"../base-xform":31}],101:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.leafNode("brk",a)}},{key:"parseOpen",value:function(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"brk"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],102:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../../utils/under-dash"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){if(u){var l={left:u.left,right:u.right,top:u.top,bottom:u.bottom,header:u.header,footer:u.footer};s.some(l,function(b){return b!==void 0})&&a.leafNode(this.tag,l)}}},{key:"parseOpen",value:function(a){switch(a.name){case this.tag:return this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageMargins"}}])&&v(e.prototype,r),o}(h("../base-xform"));A.exports=n},{"../../../utils/under-dash":25,"../base-xform":31}],103:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){return!(!a||!a.fitToPage||(o.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),0))}},{key:"parseOpen",value:function(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetUpPr"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],104:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function v(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=f(o);if(a){var b=f(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return c(this,u)}}function c(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var s=h("../../../utils/under-dash");function n(o){return o?"1":void 0}function t(o){switch(o){case"overThenDown":return o;default:return}}function e(o){switch(o){case"atEnd":case"asDisplyed":return o;default:return}}function r(o){switch(o){case"dash":case"blank":case"NA":return o;default:return}}var i=function(o){(function(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),T&&d(w,T)})(b,o);var a,u,l=m(b);function b(){return p(this,b),l.apply(this,arguments)}return a=b,(u=[{key:"render",value:function(w,T){if(T){var j={paperSize:T.paperSize,orientation:T.orientation,horizontalDpi:T.horizontalDpi,verticalDpi:T.verticalDpi,pageOrder:t(T.pageOrder),blackAndWhite:n(T.blackAndWhite),draft:n(T.draft),cellComments:e(T.cellComments),errors:r(T.errors),scale:T.scale,fitToWidth:T.fitToWidth,fitToHeight:T.fitToHeight,firstPageNumber:T.firstPageNumber,useFirstPageNumber:n(T.firstPageNumber),usePrinterDefaults:n(T.usePrinterDefaults),copies:T.copies};s.some(j,function(P){return P!==void 0})&&w.leafNode(this.tag,j)}}},{key:"parseOpen",value:function(w){switch(w.name){case this.tag:return this.model={paperSize:(T=w.attributes.paperSize,T!==void 0?parseInt(T,10):void 0),orientation:w.attributes.orientation||"portrait",horizontalDpi:parseInt(w.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(w.attributes.verticalDpi||"4294967295",10),pageOrder:w.attributes.pageOrder||"downThenOver",blackAndWhite:w.attributes.blackAndWhite==="1",draft:w.attributes.draft==="1",cellComments:w.attributes.cellComments||"None",errors:w.attributes.errors||"displayed",scale:parseInt(w.attributes.scale||"100",10),fitToWidth:parseInt(w.attributes.fitToWidth||"1",10),fitToHeight:parseInt(w.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(w.attributes.firstPageNumber||"1",10),useFirstPageNumber:w.attributes.useFirstPageNumber==="1",usePrinterDefaults:w.attributes.usePrinterDefaults==="1",copies:parseInt(w.attributes.copies||"1",10)},!0;default:return!1}var T}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetup"}}])&&v(a.prototype,u),b}(h("../base-xform"));A.exports=i},{"../../../utils/under-dash":25,"../base-xform":31}],105:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"picture"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],106:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function v(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=f(e);if(r){var a=f(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return c(this,i)}}function c(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var s=h("../../../utils/under-dash");function n(e){return e?"1":void 0}var t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,e);var r,i,o=m(a);function a(){return p(this,a),o.apply(this,arguments)}return r=a,(i=[{key:"render",value:function(u,l){if(l){var b={headings:n(l.showRowColHeaders),gridLines:n(l.showGridLines),horizontalCentered:n(l.horizontalCentered),verticalCentered:n(l.verticalCentered)};s.some(b,function(w){return w!==void 0})&&u.leafNode(this.tag,b)}}},{key:"parseOpen",value:function(u){switch(u.name){case this.tag:return this.model={showRowColHeaders:u.attributes.headings==="1",showGridLines:u.attributes.gridLines==="1",horizontalCentered:u.attributes.horizontalCentered==="1",verticalCentered:u.attributes.verticalCentered==="1"},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"printOptions"}}])&&v(r.prototype,i),a}(h("../base-xform"));A.exports=t},{"../../../utils/under-dash":25,"../base-xform":31}],107:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=c(n);if(t){var i=c(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return m(this,e)}}function m(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var f=h("./page-breaks-xform"),s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&v(o,a)})(i,n);var t,e,r=d(i);function i(){(function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")})(this,i);var o={tag:"rowBreaks",count:!0,childXform:new f};return r.call(this,o)}return t=i,(e=[{key:"render",value:function(o,a){if(a&&a.length){o.openNode(this.tag,this.$),this.count&&(o.addAttribute(this.$count,a.length),o.addAttribute("manualBreakCount",a.length));var u=this.childXform;a.forEach(function(l){u.render(o,l)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}}])&&p(t.prototype,e),i}(h("../list-xform"));A.exports=s},{"../list-xform":70,"./page-breaks-xform":101}],108:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../base-xform"),s=h("./cell-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).maxItems=a&&a.maxItems,u.map={c:new s},u}return e=o,(r=[{key:"prepare",value:function(a,u){var l=u.styles.addStyleModel(a.style);l&&(a.styleId=l);var b=this.map.c;a.cells.forEach(function(w){b.prepare(w,u)})}},{key:"render",value:function(a,u,l){a.openNode("row"),a.addAttribute("r",u.number),u.height&&(a.addAttribute("ht",u.height),a.addAttribute("customHeight","1")),u.hidden&&a.addAttribute("hidden","1"),u.min>0&&u.max>0&&u.min<=u.max&&a.addAttribute("spans","".concat(u.min,":").concat(u.max)),u.styleId&&(a.addAttribute("s",u.styleId),a.addAttribute("customFormat","1")),a.addAttribute("x14ac:dyDescent","0.25"),u.outlineLevel&&a.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&a.addAttribute("collapsed","1");var b=this.map.c;u.cells.forEach(function(w){b.render(a,w,l)}),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;if(a.name==="row"){this.numRowsSeen+=1;var u=a.attributes.spans?a.attributes.spans.split(":").map(function(b){return parseInt(b,10)}):[void 0,void 0],l=this.model={number:parseInt(a.attributes.r,10),min:u[0],max:u[1],cells:[]};return a.attributes.s&&(l.styleId=parseInt(a.attributes.s,10)),a.attributes.hidden!==!0&&a.attributes.hidden!=="true"&&a.attributes.hidden!==1&&a.attributes.hidden!=="1"||(l.hidden=!0),a.attributes.bestFit&&(l.bestFit=!0),a.attributes.ht&&(l.height=parseFloat(a.attributes.ht)),a.attributes.outlineLevel&&(l.outlineLevel=parseInt(a.attributes.outlineLevel,10)),a.attributes.collapsed&&(l.collapsed=!0),!0}return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(a,u){a.style=a.styleId?u.styles.getStyleModel(a.styleId):{},a.styleId!==void 0&&(a.styleId=void 0);var l=this.map.c;a.cells.forEach(function(b){l.reconcile(b,u)})}},{key:"tag",get:function(){return"row"}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../base-xform":31,"./cell-xform":72}],109:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return c(this,r)}}function c(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var s=h("../../../utils/under-dash"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(o,t);var e,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(r=[{key:"render",value:function(a,u){if(u){var l={defaultRowHeight:u.defaultRowHeight,outlineLevelRow:u.outlineLevelRow,outlineLevelCol:u.outlineLevelCol,"x14ac:dyDescent":u.dyDescent};u.defaultColWidth&&(l.defaultColWidth=u.defaultColWidth),u.defaultRowHeight&&u.defaultRowHeight===15||(l.customHeight="1"),s.some(l,function(b){return b!==void 0})&&a.leafNode("sheetFormatPr",l)}}},{key:"parseOpen",value:function(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetFormatPr"}}])&&v(e.prototype,r),o}(h("../base-xform"));A.exports=n},{"../../../utils/under-dash":25,"../base-xform":31}],110:[function(h,A,E){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function p(r,i){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}();return function(){var o,a=c(r);if(i){var u=c(this).constructor;o=Reflect.construct(a,arguments,u)}else o=a.apply(this,arguments);return m(this,o)}}function m(r,i){return!i||y(i)!=="object"&&typeof i!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):i}function c(r){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(r)}var f=h("../base-xform"),s=h("../style/color-xform"),n=h("./page-setup-properties-xform"),t=h("./outline-properties-xform"),e=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&v(l,b)})(u,r);var i,o,a=d(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).map={tabColor:new s("tabColor"),pageSetUpPr:new n,outlinePr:new t},l}return i=u,(o=[{key:"render",value:function(l,b){if(b){l.addRollback(),l.openNode("sheetPr");var w=!1;w=this.map.tabColor.render(l,b.tabColor)||w,w=this.map.pageSetUpPr.render(l,b.pageSetup)||w,(w=this.map.outlinePr.render(l,b.outlineProperties)||w)?(l.closeNode(),l.commit()):l.rollback()}}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):l.name===this.tag?(this.reset(),!0):!!this.map[l.name]&&(this.parser=this.map[l.name],this.parser.parseOpen(l),!0)}},{key:"parseText",value:function(l){return!!this.parser&&(this.parser.parseText(l),!0)}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(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)}},{key:"tag",get:function(){return"sheetPr"}}])&&p(i.prototype,o),u}(f);A.exports=e},{"../base-xform":31,"../style/color-xform":127,"./outline-properties-xform":100,"./page-setup-properties-xform":103}],111:[function(h,A,E){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function p(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function v(r,i){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}();return function(){var o,a=f(r);if(i){var u=f(this).constructor;o=Reflect.construct(a,arguments,u)}else o=a.apply(this,arguments);return c(this,o)}}function c(r,i){return!i||y(i)!=="object"&&typeof i!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):i}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(r)}var s=h("../../../utils/under-dash");function n(r,i){return r?i:void 0}function t(r,i){return r===i||void 0}var e=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&d(l,b)})(u,r);var i,o,a=m(u);function u(){return p(this,u),a.apply(this,arguments)}return i=u,(o=[{key:"render",value:function(l,b){if(b){var w={sheet:n(b.sheet,"1"),selectLockedCells:b.selectLockedCells===!1?"1":void 0,selectUnlockedCells:b.selectUnlockedCells===!1?"1":void 0,formatCells:n(b.formatCells,"0"),formatColumns:n(b.formatColumns,"0"),formatRows:n(b.formatRows,"0"),insertColumns:n(b.insertColumns,"0"),insertRows:n(b.insertRows,"0"),insertHyperlinks:n(b.insertHyperlinks,"0"),deleteColumns:n(b.deleteColumns,"0"),deleteRows:n(b.deleteRows,"0"),sort:n(b.sort,"0"),autoFilter:n(b.autoFilter,"0"),pivotTables:n(b.pivotTables,"0")};b.sheet&&(w.algorithmName=b.algorithmName,w.hashValue=b.hashValue,w.saltValue=b.saltValue,w.spinCount=b.spinCount,w.objects=n(b.objects===!1,"1"),w.scenarios=n(b.scenarios===!1,"1")),s.some(w,function(T){return T!==void 0})&&l.leafNode(this.tag,w)}}},{key:"parseOpen",value:function(l){switch(l.name){case this.tag:return this.model={sheet:t(l.attributes.sheet,"1"),objects:l.attributes.objects!=="1"&&void 0,scenarios:l.attributes.scenarios!=="1"&&void 0,selectLockedCells:l.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:l.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:t(l.attributes.formatCells,"0"),formatColumns:t(l.attributes.formatColumns,"0"),formatRows:t(l.attributes.formatRows,"0"),insertColumns:t(l.attributes.insertColumns,"0"),insertRows:t(l.attributes.insertRows,"0"),insertHyperlinks:t(l.attributes.insertHyperlinks,"0"),deleteColumns:t(l.attributes.deleteColumns,"0"),deleteRows:t(l.attributes.deleteRows,"0"),sort:t(l.attributes.sort,"0"),autoFilter:t(l.attributes.autoFilter,"0"),pivotTables:t(l.attributes.pivotTables,"0")},l.attributes.algorithmName&&(this.model.algorithmName=l.attributes.algorithmName,this.model.hashValue=l.attributes.hashValue,this.model.saltValue=l.attributes.saltValue,this.model.spinCount=parseInt(l.attributes.spinCount,10)),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetProtection"}}])&&v(i.prototype,o),u}(h("../base-xform"));A.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],112:[function(h,A,E){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function p(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function v(r,i){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(o){return!1}}();return function(){var o,a=f(r);if(i){var u=f(this).constructor;o=Reflect.construct(a,arguments,u)}else o=a.apply(this,arguments);return c(this,o)}}function c(r,i){return!i||y(i)!=="object"&&typeof i!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):i}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(r)}var s=h("../../../utils/col-cache"),n=h("../base-xform"),t={frozen:"frozen",frozenSplit:"frozen",split:"split"},e=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&d(l,b)})(u,r);var i,o,a=m(u);function u(){return p(this,u),a.apply(this,arguments)}return i=u,(o=[{key:"prepare",value:function(l){switch(l.state){case"frozen":case"split":break;default:l.state="normal"}}},{key:"render",value:function(l,b){l.openNode("sheetView",{workbookViewId:b.workbookViewId||0});var w,T,j,P,O=function(C,_,S){S&&l.addAttribute(C,_)};switch(O("rightToLeft","1",b.rightToLeft===!0),O("tabSelected","1",b.tabSelected),O("showRuler","0",b.showRuler===!1),O("showRowColHeaders","0",b.showRowColHeaders===!1),O("showGridLines","0",b.showGridLines===!1),O("zoomScale",b.zoomScale,b.zoomScale),O("zoomScaleNormal",b.zoomScaleNormal,b.zoomScaleNormal),O("view",b.style,b.style),b.state){case"frozen":T=b.xSplit||0,j=b.ySplit||0,w=b.topLeftCell||s.getAddress(j+1,T+1).address,P=(b.xSplit&&b.ySplit?"bottomRight":b.xSplit&&"topRight")||"bottomLeft",l.leafNode("pane",{xSplit:b.xSplit||void 0,ySplit:b.ySplit||void 0,topLeftCell:w,activePane:P,state:"frozen"}),l.leafNode("selection",{pane:P,activeCell:b.activeCell,sqref:b.activeCell});break;case"split":b.activePane==="topLeft"&&(b.activePane=void 0),l.leafNode("pane",{xSplit:b.xSplit||void 0,ySplit:b.ySplit||void 0,topLeftCell:b.topLeftCell,activePane:b.activePane}),l.leafNode("selection",{pane:b.activePane,activeCell:b.activeCell,sqref:b.activeCell});break;case"normal":b.activeCell&&l.leafNode("selection",{activeCell:b.activeCell,sqref:b.activeCell})}l.closeNode()}},{key:"parseOpen",value:function(l){switch(l.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(l.attributes.workbookViewId,10),rightToLeft:l.attributes.rightToLeft==="1",tabSelected:l.attributes.tabSelected==="1",showRuler:l.attributes.showRuler!=="0",showRowColHeaders:l.attributes.showRowColHeaders!=="0",showGridLines:l.attributes.showGridLines!=="0",zoomScale:parseInt(l.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(l.attributes.zoomScaleNormal||"100",10),style:l.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(l.attributes.xSplit||"0",10),ySplit:parseInt(l.attributes.ySplit||"0",10),topLeftCell:l.attributes.topLeftCell,activePane:l.attributes.activePane||"topLeft",state:l.attributes.state},!0;case"selection":var b=l.attributes.pane||"topLeft";return this.selections[b]={pane:b,activeCell:l.attributes.activeCell},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){var b,w;switch(l){case"sheetView":return this.sheetView&&this.pane?(b=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:t[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},this.model.state==="split"&&(b.activePane=this.pane.activePane),(w=this.selections[this.pane.activePane])&&w.activeCell&&(b.activeCell=w.activeCell),this.sheetView.style&&(b.style=this.sheetView.style)):(b=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},(w=this.selections.topLeft)&&w.activeCell&&(b.activeCell=w.activeCell),this.sheetView.style&&(b.style=this.sheetView.style)),!1;default:return!0}}},{key:"reconcile",value:function(){}},{key:"tag",get:function(){return"sheetView"}}])&&v(i.prototype,o),u}(n);A.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],113:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tablePart"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],114:[function(h,A,E){function y(V){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(V)}function p(V,q){for(var $=0;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch($){return!1}}();return function(){var $,F=c(V);if(q){var I=c(this).constructor;$=Reflect.construct(F,arguments,I)}else $=F.apply(this,arguments);return m(this,$)}}function m(V,q){return!q||y(q)!=="object"&&typeof q!="function"?function($){if($===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $}(V):q}function c(V){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)})(V)}var f=h("../../../utils/under-dash"),s=h("../../../utils/col-cache"),n=h("../../../utils/xml-stream"),t=h("../../rel-type"),e=h("./merges"),r=h("../base-xform"),i=h("../list-xform"),o=h("./row-xform"),a=h("./col-xform"),u=h("./dimension-xform"),l=h("./hyperlink-xform"),b=h("./merge-cell-xform"),w=h("./data-validations-xform"),T=h("./sheet-properties-xform"),j=h("./sheet-format-properties-xform"),P=h("./sheet-view-xform"),O=h("./sheet-protection-xform"),C=h("./page-margins-xform"),_=h("./page-setup-xform"),S=h("./print-options-xform"),g=h("./auto-filter-xform"),R=h("./picture-xform"),x=h("./drawing-xform"),k=h("./table-part-xform"),M=h("./row-breaks-xform"),D=h("./header-footer-xform"),L=h("./cf/conditional-formattings-xform"),B=h("./ext-lst-xform"),U=function(V,q){if(!q||!q.length)return V;if(!V||!V.length)return q;var $={},F={};return V.forEach(function(I){$[I.ref]=I,I.rules.forEach(function(N){var z=N.x14Id;z&&(F[z]=N)})}),q.forEach(function(I){I.rules.forEach(function(N){var z=F[N.x14Id];z?function(W,X){Object.keys(X).forEach(function(G){var at=W[G],rt=X[G];at===void 0&&rt!==void 0&&(W[G]=rt)})}(z,N):$[I.ref]?$[I.ref].rules.push(N):V.push({ref:I.ref,rules:[N]})})}),V},H=function(V){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&v(N,z)})(I,V);var q,$,F=d(I);function I(N){var z;(function(at,rt){if(!(at instanceof rt))throw new TypeError("Cannot call a class as a function")})(this,I),z=F.call(this);var W=N||{},X=W.maxRows,G=W.maxCols;return z.map={sheetPr:new T,dimension:new u,sheetViews:new i({tag:"sheetViews",count:!1,childXform:new P}),sheetFormatPr:new j,cols:new i({tag:"cols",count:!1,childXform:new a}),sheetData:new i({tag:"sheetData",count:!1,empty:!0,childXform:new o({maxItems:G}),maxItems:X}),autoFilter:new g,mergeCells:new i({tag:"mergeCells",count:!0,childXform:new b}),rowBreaks:new M,hyperlinks:new i({tag:"hyperlinks",count:!1,childXform:new l}),pageMargins:new C,dataValidations:new w,pageSetup:new _,headerFooter:new D,printOptions:new S,picture:new R,drawing:new x,sheetProtection:new O,tableParts:new i({tag:"tableParts",count:!0,childXform:new k}),conditionalFormatting:new L,extLst:new B},z}return q=I,($=[{key:"prepare",value:function(N,z){var W=this;z.merges=new e,N.hyperlinks=z.hyperlinks=[],N.comments=z.comments=[],z.formulae={},z.siFormulae=0,this.map.cols.prepare(N.cols,z),this.map.sheetData.prepare(N.rows,z),this.map.conditionalFormatting.prepare(N.conditionalFormattings,z),N.mergeCells=z.merges.mergeCells;var X=N.rels=[];function G(ct){return"rId".concat(ct.length+1)}if(N.hyperlinks.forEach(function(ct){var Ot=G(X);ct.rId=Ot,X.push({Id:Ot,Type:t.Hyperlink,Target:ct.target,TargetMode:"External"})}),N.comments.length>0){var at={Id:G(X),Type:t.Comments,Target:"../comments".concat(N.id,".xml")};X.push(at);var rt={Id:G(X),Type:t.VmlDrawing,Target:"../drawings/vmlDrawing".concat(N.id,".vml")};X.push(rt),N.comments.forEach(function(ct){ct.refAddress=s.decodeAddress(ct.ref)}),z.commentRefs.push({commentName:"comments".concat(N.id),vmlDrawing:"vmlDrawing".concat(N.id)})}var ut,pt=[];N.media.forEach(function(ct){if(ct.type==="background"){var Ot=G(X);ut=z.media[ct.imageId],X.push({Id:Ot,Type:t.Image,Target:"../media/".concat(ut.name,".").concat(ut.extension)}),N.background={rId:Ot},N.image=z.media[ct.imageId]}else if(ct.type==="image"){var kt=N.drawing;ut=z.media[ct.imageId],kt||(kt=N.drawing={rId:G(X),name:"drawing".concat(++z.drawingsCount),anchors:[],rels:[]},z.drawings.push(kt),X.push({Id:kt.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(kt.name,".xml")}));var gt=W.preImageId===ct.imageId?pt[ct.imageId]:pt[kt.rels.length];gt||(gt=G(kt.rels),pt[kt.rels.length]=gt,kt.rels.push({Id:gt,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(ut.name,".").concat(ut.extension)}));var St={picture:{rId:gt},range:ct.range};if(ct.hyperlinks&&ct.hyperlinks.hyperlink){var Ct=G(kt.rels);pt[kt.rels.length]=Ct,St.picture.hyperlinks={tooltip:ct.hyperlinks.tooltip,rId:Ct},kt.rels.push({Id:Ct,Type:t.Hyperlink,Target:ct.hyperlinks.hyperlink,TargetMode:"External"})}W.preImageId=ct.imageId,kt.anchors.push(St)}}),N.tables.forEach(function(ct){var Ot=G(X);ct.rId=Ot,X.push({Id:Ot,Type:t.Table,Target:"../tables/".concat(ct.target)}),ct.columns.forEach(function(kt){var gt=kt.style;gt&&(kt.dxfId=z.styles.addDxfStyle(gt))})}),this.map.extLst.prepare(N,z)}},{key:"render",value:function(N,z){N.openXml(n.StdDocAttributes),N.openNode("worksheet",I.WORKSHEET_ATTRIBUTES);var W=z.properties?{defaultRowHeight:z.properties.defaultRowHeight,dyDescent:z.properties.dyDescent,outlineLevelCol:z.properties.outlineLevelCol,outlineLevelRow:z.properties.outlineLevelRow}:void 0;z.properties&&z.properties.defaultColWidth&&(W.defaultColWidth=z.properties.defaultColWidth);var X={outlineProperties:z.properties&&z.properties.outlineProperties,tabColor:z.properties&&z.properties.tabColor,pageSetup:z.pageSetup&&z.pageSetup.fitToPage?{fitToPage:z.pageSetup.fitToPage}:void 0},G=z.pageSetup&&z.pageSetup.margins,at={showRowColHeaders:z.pageSetup&&z.pageSetup.showRowColHeaders,showGridLines:z.pageSetup&&z.pageSetup.showGridLines,horizontalCentered:z.pageSetup&&z.pageSetup.horizontalCentered,verticalCentered:z.pageSetup&&z.pageSetup.verticalCentered},rt=z.sheetProtection;this.map.sheetPr.render(N,X),this.map.dimension.render(N,z.dimensions),this.map.sheetViews.render(N,z.views),this.map.sheetFormatPr.render(N,W),this.map.cols.render(N,z.cols),this.map.sheetData.render(N,z.rows),this.map.sheetProtection.render(N,rt),this.map.autoFilter.render(N,z.autoFilter),this.map.mergeCells.render(N,z.mergeCells),this.map.conditionalFormatting.render(N,z.conditionalFormattings),this.map.dataValidations.render(N,z.dataValidations),this.map.hyperlinks.render(N,z.hyperlinks),this.map.printOptions.render(N,at),this.map.pageMargins.render(N,G),this.map.pageSetup.render(N,z.pageSetup),this.map.headerFooter.render(N,z.headerFooter),this.map.rowBreaks.render(N,z.rowBreaks),this.map.drawing.render(N,z.drawing),this.map.picture.render(N,z.background),this.map.tableParts.render(N,z.tables),this.map.extLst.render(N,z),z.rels&&z.rels.forEach(function(ut){ut.Type===t.VmlDrawing&&N.leafNode("legacyDrawing",{"r:id":ut.Id})}),N.closeNode()}},{key:"parseOpen",value:function(N){return this.parser?(this.parser.parseOpen(N),!0):N.name==="worksheet"?(f.each(this.map,function(z){z.reset()}),!0):(this.parser=this.map[N.name],this.parser&&this.parser.parseOpen(N),!0)}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){if(this.parser)return this.parser.parseClose(N)||(this.parser=void 0),!0;switch(N){case"worksheet":var z=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(z.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(z.outlineProperties=this.map.sheetPr.model.outlineProperties);var W={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},X=Object.assign(W,this.map.pageSetup.model,this.map.printOptions.model),G=U(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);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:z,views:this.map.sheetViews.model,pageSetup:X,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:G},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1;default:return!0}}},{key:"reconcile",value:function(N,z){var W=(N.relationships||[]).reduce(function(pt,ct){if(pt[ct.Id]=ct,ct.Type===t.Comments&&(N.comments=z.comments[ct.Target].comments),ct.Type===t.VmlDrawing&&N.comments&&N.comments.length){var Ot=z.vmlDrawings[ct.Target].comments;N.comments.forEach(function(kt,gt){kt.note=Object.assign({},kt.note,Ot[gt])})}return pt},{});if(z.commentsMap=(N.comments||[]).reduce(function(pt,ct){return ct.ref&&(pt[ct.ref]=ct),pt},{}),z.hyperlinkMap=(N.hyperlinks||[]).reduce(function(pt,ct){return ct.rId&&(pt[ct.address]=W[ct.rId].Target),pt},{}),z.formulae={},N.rows=N.rows&&N.rows.filter(Boolean)||[],N.rows.forEach(function(pt){pt.cells=pt.cells&&pt.cells.filter(Boolean)||[]}),this.map.cols.reconcile(N.cols,z),this.map.sheetData.reconcile(N.rows,z),this.map.conditionalFormatting.reconcile(N.conditionalFormattings,z),N.media=[],N.drawing){var X=W[N.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(X){var G=X[1];z.drawings[G].anchors.forEach(function(pt){if(pt.medium){var ct={type:"image",imageId:pt.medium.index,range:pt.range,hyperlinks:pt.picture.hyperlinks};N.media.push(ct)}})}}var at=N.background&&W[N.background.rId];if(at){var rt=at.Target.split("/media/")[1],ut=z.mediaIndex&&z.mediaIndex[rt];ut!==void 0&&N.media.push({type:"background",imageId:ut})}N.tables=(N.tables||[]).map(function(pt){var ct=W[pt.rId];return z.tables[ct.Target]}),delete N.relationships,delete N.hyperlinks,delete N.comments}}])&&p(q.prototype,$),I}(r);H.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"},A.exports=H},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).tag=i.tag,o.attr=i.attr,o}return n=r,(t=[{key:"render",value:function(i,o){o&&(i.openNode(this.tag),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&p(n.prototype,t),r}(h("../base-xform"));A.exports=f},{"../base-xform":31}],116:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).tag=i.tag,o.attr=i.attr,o.attrs=i.attrs,o._format=i.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch(u){return""}},o._parse=i.parse||function(a){return new Date(a)},o}return n=r,(t=[{key:"render",value:function(i,o){o&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,this._format(o)):i.writeText(this._format(o)),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.attr?this.model=this._parse(i.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}])&&p(n.prototype,t),r}(h("../base-xform"));A.exports=f},{"../base-xform":31}],117:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).tag=i.tag,o.attr=i.attr,o.attrs=i.attrs,o.zero=i.zero,o}return n=r,(t=[{key:"render",value:function(i,o){(o||this.zero)&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,o):i.writeText(o),i.closeNode())}},{key:"parseOpen",value:function(i){return i.name===this.tag&&(this.attr?this.model=parseInt(i.attributes[this.attr],10):this.text=[],!0)}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}])&&p(n.prototype,t),r}(h("../base-xform"));A.exports=f},{"../base-xform":31}],118:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).tag=i.tag,o.attr=i.attr,o.attrs=i.attrs,o}return n=r,(t=[{key:"render",value:function(i,o){o!==void 0&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,o):i.writeText(o),i.closeNode())}},{key:"parseOpen",value:function(i){i.name===this.tag&&(this.attr?this.model=i.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(i){this.attr||this.text.push(i)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}])&&p(n.prototype,t),r}(h("../base-xform"));A.exports=f},{"../base-xform":31}],119:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("./base-xform"),s=h("../../utils/xml-stream"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this))._model=a,u}return e=o,(r=[{key:"render",value:function(a){if(!this._xml){var u=new s;(function l(b,w){b.openNode(w.tag,w.$),w.c&&w.c.forEach(function(T){l(b,T)}),w.t&&b.writeText(w.t),b.closeNode()})(u,this._model),this._xml=u.xml}a.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){switch(a){case this._model.tag:return!1;default:return!0}}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../../utils/xml-stream":27,"./base-xform":31}],120:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("./text-xform"),s=h("./rich-text-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).map={r:new s,t:new f},a}return e=o,(r=[{key:"render",value:function(a,u){if(a.openNode(this.tag,{sb:u.sb||0,eb:u.eb||0}),u&&u.hasOwnProperty("richText")&&u.richText){var l=this.map.r;u.richText.forEach(function(b){l.render(a,b)})}else u&&this.map.t.render(a,u.text);a.closeNode()}},{key:"parseOpen",value:function(a){var u=a.name;return this.parser?(this.parser.parseOpen(a),!0):u===this.tag?(this.model={sb:parseInt(a.attributes.sb,10),eb:parseInt(a.attributes.eb,10)},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(a),!0))}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){switch(a){case"r":var u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break;case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(a){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"rPh"}}])&&p(e.prototype,r),o}(h("../base-xform"));A.exports=n},{"../base-xform":31,"./rich-text-xform":121,"./text-xform":124}],121:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("./text-xform"),s=h("../style/font-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).model=a,u}return e=o,(r=[{key:"render",value:function(a,u){u=u||this.model,a.openNode("r"),u.font&&this.fontXform.render(a,u.font),this.textXform.render(a,u.text),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(a),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(a),!0;default:return!1}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){switch(a){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(a),!0}}},{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new f)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new s(o.FONT_OPTIONS))}}])&&p(e.prototype,r),o}(h("../base-xform"));n.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},A.exports=n},{"../base-xform":31,"../style/font-xform":130,"./text-xform":124}],122:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("./text-xform"),s=h("./rich-text-xform"),n=h("./phonetic-text-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=o.call(this)).model=u,l.map={r:new s,t:new f,rPh:new n},l}return r=a,(i=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l&&l.hasOwnProperty("richText")&&l.richText?l.richText.length?l.richText.forEach(function(w){b.map.r.render(u,w)}):this.map.t.render(u,""):l!=null&&this.map.t.render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){var l=u.name;return this.parser?(this.parser.parseOpen(u),!0):l===this.tag?(this.model={},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(u),!0))}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":var l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break;case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"si"}}])&&p(r.prototype,i),a}(h("../base-xform"));A.exports=t},{"../base-xform":31,"./phonetic-text-xform":120,"./rich-text-xform":121,"./text-xform":124}],123:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../../../utils/xml-stream"),s=h("../base-xform"),n=h("./shared-string-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=o.call(this)).model=u||{values:[],count:0},l.hash=Object.create(null),l.rich=Object.create(null),l}return r=a,(i=[{key:"getString",value:function(u){return this.model.values[u]}},{key:"add",value:function(u){return u.richText?this.addRichText(u):this.addText(u)}},{key:"addText",value:function(u){var l=this.hash[u];return l===void 0&&(l=this.hash[u]=this.model.values.length,this.model.values.push(u)),this.model.count++,l}},{key:"addRichText",value:function(u){var l=this.sharedStringXform.toXml(u),b=this.rich[l];return b===void 0&&(b=this.rich[l]=this.model.values.length,this.model.values.push(u)),this.model.count++,b}},{key:"render",value:function(u,l){l=l||this._values,u.openXml(f.StdDocAttributes),u.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:l.count,uniqueCount:l.values.length});var b=this.sharedStringXform;l.values.forEach(function(w){b.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(u),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(u){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}},{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new n)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}}])&&p(r.prototype,i),a}(s);A.exports=t},{"../../../utils/xml-stream":27,"../base-xform":31,"./shared-string-xform":122}],124:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){o.openNode("t"),/^\s|\n|\s$/.test(a)&&o.addAttribute("xml:space","preserve"),o.writeText(a),o.closeNode()}},{key:"parseOpen",value:function(o){switch(o.name){case"t":return this._text=[],!0;default:return!1}}},{key:"parseText",value:function(o){this._text.push(o)}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"t"}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,function(o,a){return String.fromCharCode(parseInt(a,16))})}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],125:[function(h,A,E){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}();return function(){var l,b=f(a);if(u){var w=f(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return c(this,l)}}function c(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function f(a){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var s=h("../../../doc/enums"),n=h("../../../utils/utils"),t=h("../base-xform"),e={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),horizontal:function(a){return this.horizontalValues[a]?a:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),vertical:function(a){return a==="middle"?"center":this.verticalValues[a]?a:void 0},wrapText:function(a){return!!a||void 0},shrinkToFit:function(a){return!!a||void 0},textRotation:function(a){switch(a){case"vertical":return a;default:return(a=n.validInt(a))>=-90&&a<=90?a:void 0}},indent:function(a){return a=n.validInt(a),Math.max(0,a)},readingOrder:function(a){switch(a){case"ltr":return s.ReadingOrder.LeftToRight;case"rtl":return s.ReadingOrder.RightToLeft;default:return}}},r=function(a){if(a=e.textRotation(a)){if(a==="vertical")return 255;var u=Math.round(a);if(u>=0&&u<=90)return u;if(u<0&&u>=-90)return 90-u}},i=function(a){var u=n.validInt(a);if(u!==void 0){if(u===255)return"vertical";if(u>=0&&u<=90)return u;if(u>90&&u<=180)return 90-u}},o=function(a){(function(T,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(j&&j.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),j&&d(T,j)})(w,a);var u,l,b=m(w);function w(){return p(this,w),b.apply(this,arguments)}return u=w,(l=[{key:"render",value:function(T,j){T.addRollback(),T.openNode("alignment");var P=!1;function O(C,_){_&&(T.addAttribute(C,_),P=!0)}O("horizontal",e.horizontal(j.horizontal)),O("vertical",e.vertical(j.vertical)),O("wrapText",!!e.wrapText(j.wrapText)&&"1"),O("shrinkToFit",!!e.shrinkToFit(j.shrinkToFit)&&"1"),O("indent",e.indent(j.indent)),O("textRotation",r(j.textRotation)),O("readingOrder",e.readingOrder(j.readingOrder)),T.closeNode(),P?T.commit():T.rollback()}},{key:"parseOpen",value:function(T){var j={},P=!1;function O(C,_,S){C&&(j[_]=S,P=!0)}O(T.attributes.horizontal,"horizontal",T.attributes.horizontal),O(T.attributes.vertical,"vertical",T.attributes.vertical==="center"?"middle":T.attributes.vertical),O(T.attributes.wrapText,"wrapText",!!T.attributes.wrapText),O(T.attributes.shrinkToFit,"shrinkToFit",!!T.attributes.shrinkToFit),O(T.attributes.indent,"indent",parseInt(T.attributes.indent,10)),O(T.attributes.textRotation,"textRotation",i(T.attributes.textRotation)),O(T.attributes.readingOrder,"readingOrder",T.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=P?j:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}])&&v(u.prototype,l),w}(t);A.exports=o},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(h,A,E){function y(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(l);b&&(T=T.filter(function(j){return Object.getOwnPropertyDescriptor(l,j).enumerable})),w.push.apply(w,T)}return w}function p(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}();return function(){var w,T=r(l);if(b){var j=r(this).constructor;w=Reflect.construct(T,arguments,j)}else w=T.apply(this,arguments);return e(this,w)}}function e(l,b){return!b||d(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function r(l){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var i=h("../base-xform"),o=h("./color-xform"),a=function(l){s(w,l);var b=t(w);function w(T){var j;return m(this,w),(j=b.call(this)).name=T,j.map={color:new o},j}return f(w,[{key:"render",value:function(T,j,P){var O=j&&j.color||P||this.defaultColor;T.openNode(this.name),j&&j.style&&(T.addAttribute("style",j.style),O&&this.map.color.render(T,O)),T.closeNode()}},{key:"parseOpen",value:function(T){if(this.parser)return this.parser.parseOpen(T),!0;switch(T.name){case this.name:var j=T.attributes.style;return this.model=j?{style:j}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(T),!0;default:return!1}}},{key:"parseText",value:function(T){this.parser&&this.parser.parseText(T)}},{key:"parseClose",value:function(T){return this.parser?(this.parser.parseClose(T)||(this.parser=void 0),!0):(T===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(T){return w.validStyleValues[T]}},{key:"tag",get:function(){return this.name}}]),w}(i);a.validStyleValues=["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce(function(l,b){return l[b]=!0,l},{});var u=function(l){s(w,l);var b=t(w);function w(){var T;return m(this,w),(T=b.call(this)).map={top:new a("top"),left:new a("left"),bottom:new a("bottom"),right:new a("right"),diagonal:new a("diagonal")},T}return f(w,[{key:"render",value:function(T,j){var P=j.color;function O(C,_){C&&!C.color&&j.color&&(C=p(p({},C),{},{color:j.color})),_.render(T,C,P)}T.openNode("border"),j.diagonal&&j.diagonal.style&&(j.diagonal.up&&T.addAttribute("diagonalUp","1"),j.diagonal.down&&T.addAttribute("diagonalDown","1")),O(j.left,this.map.left),O(j.right,this.map.right),O(j.top,this.map.top),O(j.bottom,this.map.bottom),O(j.diagonal,this.map.diagonal),T.closeNode()}},{key:"parseOpen",value:function(T){if(this.parser)return this.parser.parseOpen(T),!0;switch(T.name){case"border":return this.reset(),this.diagonalUp=!!T.attributes.diagonalUp,this.diagonalDown=!!T.attributes.diagonalDown,!0;default:return this.parser=this.map[T.name],!!this.parser&&(this.parser.parseOpen(T),!0)}}},{key:"parseText",value:function(T){this.parser&&this.parser.parseText(T)}},{key:"parseClose",value:function(T){if(this.parser)return this.parser.parseClose(T)||(this.parser=void 0),!0;if(T==="border"){var j=this.model={},P=function(O,C,_){C&&(_&&Object.assign(C,_),j[O]=C)};P("left",this.map.left.model),P("right",this.map.right.model),P("top",this.map.top.model),P("bottom",this.map.bottom.model),P("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}]),w}(i);A.exports=u},{"../base-xform":31,"./color-xform":127}],127:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).name=i||"color",o}return n=r,(t=[{key:"render",value:function(i,o){return!!o&&(i.openNode(this.name),o.argb?i.addAttribute("rgb",o.argb):o.theme!==void 0?(i.addAttribute("theme",o.theme),o.tint!==void 0&&i.addAttribute("tint",o.tint)):o.indexed!==void 0?i.addAttribute("indexed",o.indexed):i.addAttribute("auto","1"),i.closeNode(),!0)}},{key:"parseOpen",value:function(i){return i.name===this.name&&(i.attributes.rgb?this.model={argb:i.attributes.rgb}:i.attributes.theme?(this.model={theme:parseInt(i.attributes.theme,10)},i.attributes.tint&&(this.model.tint=parseFloat(i.attributes.tint))):i.attributes.indexed?this.model={indexed:parseInt(i.attributes.indexed,10)}:this.model=void 0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this.name}}])&&p(n.prototype,t),r}(h("../base-xform"));A.exports=f},{"../base-xform":31}],128:[function(h,A,E){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}();return function(){var l,b=c(a);if(u){var w=c(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return m(this,l)}}function m(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function c(a){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var f=h("../base-xform"),s=h("./alignment-xform"),n=h("./border-xform"),t=h("./fill-xform"),e=h("./font-xform"),r=h("./numfmt-xform"),i=h("./protection-xform"),o=function(a){(function(T,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(j&&j.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),j&&v(T,j)})(w,a);var u,l,b=d(w);function w(){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,w),(T=b.call(this)).map={alignment:new s,border:new n,fill:new t,font:new e,numFmt:new r,protection:new i},T}return u=w,(l=[{key:"render",value:function(T,j){T.openNode(this.tag),j.font&&this.map.font.render(T,j.font),j.numFmt&&this.map.numFmt.render(T,j.numFmt),j.fill&&this.map.fill.render(T,j.fill),j.alignment&&this.map.alignment.render(T,j.alignment),j.border&&this.map.border.render(T,j.border),j.protection&&this.map.protection.render(T,j.protection),T.closeNode()}},{key:"parseOpen",value:function(T){if(this.parser)return this.parser.parseOpen(T),!0;switch(T.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[T.name],this.parser&&this.parser.parseOpen(T),!0}}},{key:"parseText",value:function(T){this.parser&&this.parser.parseText(T)}},{key:"parseClose",value:function(T){return this.parser?(this.parser.parseClose(T)||(this.parser=void 0),!0):T!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}},{key:"tag",get:function(){return"dxf"}}])&&p(u.prototype,l),w}(f);A.exports=o},{"../base-xform":31,"./alignment-xform":125,"./border-xform":126,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./protection-xform":132}],129:[function(h,A,E){function y(u){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(u)}function p(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function v(u,l){for(var b=0;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(b){return!1}}();return function(){var b,w=n(u);if(l){var T=n(this).constructor;b=Reflect.construct(w,arguments,T)}else b=w.apply(this,arguments);return s(this,b)}}function s(u,l){return!l||y(l)!=="object"&&typeof l!="function"?function(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}(u):l}function n(u){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(u)}var t=h("../base-xform"),e=h("./color-xform"),r=function(u){m(b,u);var l=f(b);function b(){var w;return p(this,b),(w=l.call(this)).map={color:new e},w}return d(b,[{key:"render",value:function(w,T){w.openNode("stop"),w.addAttribute("position",T.position),this.map.color.render(w,T.color),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"stop":return this.model={position:parseFloat(w.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.color=this.parser.model,this.parser=void 0),!0)}},{key:"tag",get:function(){return"stop"}}]),b}(t),i=function(u){m(b,u);var l=f(b);function b(){var w;return p(this,b),(w=l.call(this)).map={fgColor:new e("fgColor"),bgColor:new e("bgColor")},w}return d(b,[{key:"render",value:function(w,T){w.openNode("patternFill"),w.addAttribute("patternType",T.pattern),T.fgColor&&this.map.fgColor.render(w,T.fgColor),T.bgColor&&this.map.bgColor.render(w,T.bgColor),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"patternFill":return this.model={type:"pattern",pattern:w.attributes.patternType},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.parser.model&&(this.model[w]=this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}}]),b}(t),o=function(u){m(b,u);var l=f(b);function b(){var w;return p(this,b),(w=l.call(this)).map={stop:new r},w}return d(b,[{key:"render",value:function(w,T){switch(w.openNode("gradientFill"),T.gradient){case"angle":w.addAttribute("degree",T.degree);break;case"path":w.addAttribute("type","path"),T.center.left&&(w.addAttribute("left",T.center.left),T.center.right===void 0&&w.addAttribute("right",T.center.left)),T.center.right&&w.addAttribute("right",T.center.right),T.center.top&&(w.addAttribute("top",T.center.top),T.center.bottom===void 0&&w.addAttribute("bottom",T.center.top)),T.center.bottom&&w.addAttribute("bottom",T.center.bottom)}var j=this.map.stop;T.stops.forEach(function(P){j.render(w,P)}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"gradientFill":var T=this.model={stops:[]};return w.attributes.degree?(T.gradient="angle",T.degree=parseInt(w.attributes.degree,10)):w.attributes.type==="path"&&(T.gradient="path",T.center={left:w.attributes.left?parseFloat(w.attributes.left):0,top:w.attributes.top?parseFloat(w.attributes.top):0},w.attributes.right!==w.attributes.left&&(T.center.right=w.attributes.right?parseFloat(w.attributes.right):0),w.attributes.bottom!==w.attributes.top&&(T.center.bottom=w.attributes.bottom?parseFloat(w.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}}]),b}(t),a=function(u){m(b,u);var l=f(b);function b(){var w;return p(this,b),(w=l.call(this)).map={patternFill:new i,gradientFill:new o},w}return d(b,[{key:"render",value:function(w,T){switch(w.addRollback(),w.openNode("fill"),T.type){case"pattern":this.map.patternFill.render(w,T);break;case"gradient":this.map.gradientFill.render(w,T);break;default:return void w.rollback()}w.closeNode(),w.commit()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"fill":return this.model={},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}},{key:"validStyle",value:function(w){return b.validPatternValues[w]}},{key:"tag",get:function(){return"fill"}}]),b}(t);a.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce(function(u,l){return u[l]=!0,u},{}),a.StopXform=r,a.PatternFillXform=i,a.GradientFillXform=o,A.exports=a},{"../base-xform":31,"./color-xform":127}],130:[function(h,A,E){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function p(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=c(o);if(a){var b=c(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return m(this,u)}}function m(o,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function c(o){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}var f=h("./color-xform"),s=h("../simple/boolean-xform"),n=h("../simple/integer-xform"),t=h("../simple/string-xform"),e=h("./underline-xform"),r=h("../../../utils/under-dash"),i=function(o){(function(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),T&&v(w,T)})(b,o);var a,u,l=d(b);function b(w){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,b),(T=l.call(this)).options=w||b.OPTIONS,T.map={b:{prop:"bold",xform:new s({tag:"b",attr:"val"})},i:{prop:"italic",xform:new s({tag:"i",attr:"val"})},u:{prop:"underline",xform:new e},charset:{prop:"charset",xform:new n({tag:"charset",attr:"val"})},color:{prop:"color",xform:new f},condense:{prop:"condense",xform:new s({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new s({tag:"extend",attr:"val"})},family:{prop:"family",xform:new n({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new t({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new t({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new s({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new s({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new n({tag:"sz",attr:"val"})}},T.map[T.options.fontNameTag]={prop:"name",xform:new t({tag:T.options.fontNameTag,attr:"val"})},T}return a=b,(u=[{key:"render",value:function(w,T){var j=this.map;w.openNode(this.options.tagName),r.each(this.map,function(P,O){j[O].xform.render(w,T[P.prop])}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;if(this.map[w.name])return this.parser=this.map[w.name].xform,this.parser.parseOpen(w);switch(w.name){case this.options.tagName:return this.model={},!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){if(this.parser&&!this.parser.parseClose(w)){var T=this.map[w];return this.parser.model&&(this.model[T.prop]=this.parser.model),this.parser=void 0,!0}switch(w){case this.options.tagName:return!1;default:return!0}}},{key:"tag",get:function(){return this.options.tagName}}])&&p(a.prototype,u),b}(h("../base-xform"));i.OPTIONS={tagName:"font",fontNameTag:"name"},A.exports=i},{"../../../utils/under-dash":25,"../base-xform":31,"../simple/boolean-xform":115,"../simple/integer-xform":117,"../simple/string-xform":118,"./color-xform":127,"./underline-xform":135}],131:[function(h,A,E){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(i)}function p(i,o){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}();return function(){var a,u=c(i);if(o){var l=c(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(i,o){return!o||y(o)!=="object"&&typeof o!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(i):o}function c(i){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(i)}var f=h("../../../utils/under-dash"),s=h("../../defaultnumformats"),n=h("../base-xform"),t,e=(t={},f.each(s,function(i,o){i.f&&(t[i.f]=parseInt(o,10))}),t),r=function(i){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,i);var o,a,u=d(l);function l(b,w){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,l),(T=u.call(this)).id=b,T.formatCode=w,T}return o=l,(a=[{key:"render",value:function(b,w){b.leafNode("numFmt",{numFmtId:w.id,formatCode:w.formatCode})}},{key:"parseOpen",value:function(b){switch(b.name){case"numFmt":return this.model={id:parseInt(b.attributes.numFmtId,10),formatCode:b.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"numFmt"}}])&&p(o.prototype,a),l}(n);r.getDefaultFmtId=function(i){return e[i]},r.getDefaultFmtCode=function(i){return s[i]&&s[i].f},A.exports=r},{"../../../utils/under-dash":25,"../../defaultnumformats":29,"../base-xform":31}],132:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function v(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=f(e);if(r){var a=f(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return c(this,i)}}function c(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var s=h("../base-xform"),n=function(e,r){return e===void 0?r:e},t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,e);var r,i,o=m(a);function a(){return p(this,a),o.apply(this,arguments)}return r=a,(i=[{key:"render",value:function(u,l){u.addRollback(),u.openNode("protection");var b=!1;function w(T,j){j!==void 0&&(u.addAttribute(T,j),b=!0)}w("locked",n(l.locked,!0)?void 0:"0"),w("hidden",n(l.hidden,!1)?"1":void 0),u.closeNode(),b?u.commit():u.rollback()}},{key:"parseOpen",value:function(u){var l={locked:u.attributes.locked!=="0",hidden:u.attributes.hidden==="1"},b=!l.locked||l.hidden;this.model=b?l:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"protection"}}])&&v(r.prototype,i),a}(s);A.exports=t},{"../base-xform":31}],133:[function(h,A,E){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function p(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=c(e);if(r){var a=c(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return m(this,i)}}function m(e,r){return!r||y(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}var f=h("../base-xform"),s=h("./alignment-xform"),n=h("./protection-xform"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,e);var r,i,o=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=o.call(this)).xfId=!(!u||!u.xfId),l.map={alignment:new s,protection:new n},l}return r=a,(i=[{key:"render",value:function(u,l){u.openNode("xf",{numFmtId:l.numFmtId||0,fontId:l.fontId||0,fillId:l.fillId||0,borderId:l.borderId||0}),this.xfId&&u.addAttribute("xfId",l.xfId||0),l.numFmtId&&u.addAttribute("applyNumberFormat","1"),l.fontId&&u.addAttribute("applyFont","1"),l.fillId&&u.addAttribute("applyFill","1"),l.borderId&&u.addAttribute("applyBorder","1"),l.alignment&&u.addAttribute("applyAlignment","1"),l.protection&&u.addAttribute("applyProtection","1"),l.alignment&&this.map.alignment.render(u,l.alignment),l.protection&&this.map.protection.render(u,l.protection),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"xf":return this.model={numFmtId:parseInt(u.attributes.numFmtId,10),fontId:parseInt(u.attributes.fontId,10),fillId:parseInt(u.attributes.fillId,10),borderId:parseInt(u.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(u.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(u),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(u),!0;default:return!1}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){return this.parser?(this.parser.parseClose(u)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):u!=="xf"}},{key:"tag",get:function(){return"xf"}}])&&p(r.prototype,i),a}(f);A.exports=t},{"../base-xform":31,"./alignment-xform":125,"./protection-xform":132}],134:[function(h,A,E){function y(O){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(O)}function p(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}function v(O,C){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(_){return!1}}();return function(){var _,S=n(O);if(C){var g=n(this).constructor;_=Reflect.construct(S,arguments,g)}else _=S.apply(this,arguments);return s(this,_)}}function s(O,C){return!C||y(C)!=="object"&&typeof C!="function"?function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(O):C}function n(O){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)})(O)}var t=h("../../../doc/enums"),e=h("../../../utils/xml-stream"),r=h("../base-xform"),i=h("../static-xform"),o=h("../list-xform"),a=h("./font-xform"),u=h("./fill-xform"),l=h("./border-xform"),b=h("./numfmt-xform"),w=h("./style-xform"),T=h("./dxf-xform"),j=function(O){m(_,O);var C=f(_);function _(S){var g;return p(this,_),(g=C.call(this)).map={numFmts:new o({tag:"numFmts",count:!0,childXform:new b}),fonts:new o({tag:"fonts",count:!0,childXform:new a,$:{"x14ac:knownFonts":1}}),fills:new o({tag:"fills",count:!0,childXform:new u}),borders:new o({tag:"borders",count:!0,childXform:new l}),cellStyleXfs:new o({tag:"cellStyleXfs",count:!0,childXform:new w}),cellXfs:new o({tag:"cellXfs",count:!0,childXform:new w({xfId:!0})}),dxfs:new o({tag:"dxfs",always:!0,count:!0,childXform:new T}),numFmt:new b,font:new a,fill:new u,border:new l,style:new w({xfId:!0}),cellStyles:_.STATIC_XFORMS.cellStyles,tableStyles:_.STATIC_XFORMS.tableStyles,extLst:_.STATIC_XFORMS.extLst},S&&g.init(),g}return d(_,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),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"}),this.weakMap=new WeakMap}},{key:"render",value:function(S,g){g=g||this.model,S.openXml(e.StdDocAttributes),S.openNode("styleSheet",_.STYLESHEET_ATTRIBUTES),this.index?(g.numFmts&&g.numFmts.length&&(S.openNode("numFmts",{count:g.numFmts.length}),g.numFmts.forEach(function(R){S.writeXml(R)}),S.closeNode()),g.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),S.openNode("fonts",{count:g.fonts.length,"x14ac:knownFonts":1}),g.fonts.forEach(function(R){S.writeXml(R)}),S.closeNode(),S.openNode("fills",{count:g.fills.length}),g.fills.forEach(function(R){S.writeXml(R)}),S.closeNode(),S.openNode("borders",{count:g.borders.length}),g.borders.forEach(function(R){S.writeXml(R)}),S.closeNode(),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),S.openNode("cellXfs",{count:g.styles.length}),g.styles.forEach(function(R){S.writeXml(R)}),S.closeNode()):(this.map.numFmts.render(S,g.numFmts),this.map.fonts.render(S,g.fonts),this.map.fills.render(S,g.fills),this.map.borders.render(S,g.borders),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(S,g.styles)),_.STATIC_XFORMS.cellStyles.render(S),this.map.dxfs.render(S,g.dxfs),_.STATIC_XFORMS.tableStyles.render(S),_.STATIC_XFORMS.extLst.render(S),S.closeNode()}},{key:"parseOpen",value:function(S){if(this.parser)return this.parser.parseOpen(S),!0;switch(S.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[S.name],this.parser&&this.parser.parseOpen(S),!0}}},{key:"parseText",value:function(S){this.parser&&this.parser.parseText(S)}},{key:"parseClose",value:function(S){var g=this;if(this.parser)return this.parser.parseClose(S)||(this.parser=void 0),!0;switch(S){case"styleSheet":this.model={};var R=function(k,M){M.model&&M.model.length&&(g.model[k]=M.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),R("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){var x=this.index.numFmt;this.model.numFmts.forEach(function(k){x[k.id]=k.formatCode})}return!1;default:return!0}}},{key:"addStyleModel",value:function(S,g){if(!S)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(S))return this.weakMap.get(S);var R={};if(g=g||t.ValueType.Number,S.numFmt)R.numFmtId=this._addNumFmtStr(S.numFmt);else switch(g){case t.ValueType.Number:R.numFmtId=this._addNumFmtStr("General");break;case t.ValueType.Date:R.numFmtId=this._addNumFmtStr("mm-dd-yy")}S.font&&(R.fontId=this._addFont(S.font)),S.border&&(R.borderId=this._addBorder(S.border)),S.fill&&(R.fillId=this._addFill(S.fill)),S.alignment&&(R.alignment=S.alignment),S.protection&&(R.protection=S.protection);var x=this._addStyle(R);return this.weakMap&&this.weakMap.set(S,x),x}},{key:"getStyleModel",value:function(S){var g=this.model.styles[S];if(!g)return null;var R=this.index.model[S];if(R)return R;if(R=this.index.model[S]={},g.numFmtId){var x=this.index.numFmt[g.numFmtId]||b.getDefaultFmtCode(g.numFmtId);x&&(R.numFmt=x)}function k(M,D,L){if(L||L===0){var B=D[L];B&&(R[M]=B)}}return k("font",this.model.fonts,g.fontId),k("border",this.model.borders,g.borderId),k("fill",this.model.fills,g.fillId),g.alignment&&(R.alignment=g.alignment),g.protection&&(R.protection=g.protection),R}},{key:"addDxfStyle",value:function(S){return this.model.dxfs.push(S),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(S){return this.model.dxfs[S]}},{key:"_addStyle",value:function(S){var g=this.map.style.toXml(S),R=this.index.style[g];return R===void 0&&(R=this.index.style[g]=this.model.styles.length,this.model.styles.push(g)),R}},{key:"_addNumFmtStr",value:function(S){var g=b.getDefaultFmtId(S);if(g!==void 0||(g=this.index.numFmt[S])!==void 0)return g;g=this.index.numFmt[S]=164+this.model.numFmts.length;var R=this.map.numFmt.toXml({id:g,formatCode:S});return this.model.numFmts.push(R),g}},{key:"_addFont",value:function(S){var g=this.map.font.toXml(S),R=this.index.font[g];return R===void 0&&(R=this.index.font[g]=this.model.fonts.length,this.model.fonts.push(g)),R}},{key:"_addBorder",value:function(S){var g=this.map.border.toXml(S),R=this.index.border[g];return R===void 0&&(R=this.index.border[g]=this.model.borders.length,this.model.borders.push(g)),R}},{key:"_addFill",value:function(S){var g=this.map.fill.toXml(S),R=this.index.fill[g];return R===void 0&&(R=this.index.fill[g]=this.model.fills.length,this.model.fills.push(g)),R}}]),_}(r);j.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"},j.STATIC_XFORMS={cellStyles:new i({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new i({tag:"dxfs",$:{count:0}}),tableStyles:new i({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new i({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"}}]}]})};var P=function(O){m(_,O);var C=f(_);function _(){var S;return p(this,_),(S=C.call(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"}]},S}return d(_,[{key:"parseStream",value:function(S){return S.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(S,g){switch(g){case t.ValueType.Date:return this.dateStyleId;default:return 0}}},{key:"getStyleModel",value:function(){return{}}},{key:"dateStyleId",get:function(){if(!this._dateStyleId){var S={numFmtId:b.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(S)}return this._dateStyleId}}]),_}(j);j.Mock=P,A.exports=j},{"../../../doc/enums":7,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./border-xform":126,"./dxf-xform":128,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./style-xform":133}],135:[function(h,A,E){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(s)}function p(s,n){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(s);if(n){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)}}function m(s,n){return!n||y(n)!=="object"&&typeof n!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(s):n}function c(s){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(s)}var f=function(s){(function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&v(i,o)})(r,s);var n,t,e=d(r);function r(i){var o;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(o=e.call(this)).model=i,o}return n=r,(t=[{key:"render",value:function(i,o){if((o=o||this.model)===!0)i.leafNode("u");else{var a=r.Attributes[o];a&&i.leafNode("u",a)}}},{key:"parseOpen",value:function(i){i.name==="u"&&(this.model=i.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"u"}}])&&p(n.prototype,t),r}(h("../base-xform"));f.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},A.exports=f},{"../base-xform":31}],136:[function(h,A,E){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function p(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(r){return!1}}();return function(){var r,i=c(t);if(e){var o=c(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return m(this,r)}}function m(t,e){return!e||y(e)!=="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var f=h("../base-xform"),s=h("./filter-column-xform"),n=function(t){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(o,t);var e,r,i=d(o);function o(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).map={filterColumn:new s},a}return e=o,(r=[{key:"prepare",value:function(a){var u=this;a.columns.forEach(function(l,b){u.map.filterColumn.prepare(l,{index:b})})}},{key:"render",value:function(a,u){var l=this;return a.openNode(this.tag,{ref:u.autoFilterRef}),u.columns.forEach(function(b){l.map.filterColumn.render(a,b)}),a.closeNode(),!0}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(a)))}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(a))}}},{key:"tag",get:function(){return"autoFilter"}}])&&p(e.prototype,r),o}(f);A.exports=n},{"../base-xform":31,"./filter-column-xform":137}],137:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"prepare",value:function(o,a){o.colId=a.index.toString()}},{key:"render",value:function(o,a){return o.leafNode(this.tag,{colId:a.colId,hiddenButton:a.filterButton?"0":"1"}),!0}},{key:"parseOpen",value:function(o){if(o.name===this.tag){var a=o.attributes;return this.model={filterButton:a.hiddenButton==="0"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"filterColumn"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],138:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"prepare",value:function(o,a){o.id=a.index+1}},{key:"render",value:function(o,a){return o.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}},{key:"parseOpen",value:function(o){if(o.name===this.tag){var a=o.attributes;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableColumn"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],139:[function(h,A,E){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var e,r=f(n);if(t){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function c(n,t){return!t||y(t)!=="object"&&typeof t!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):t}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}var s=function(n){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&d(o,a)})(i,n);var t,e,r=m(i);function i(){return p(this,i),r.apply(this,arguments)}return t=i,(e=[{key:"render",value:function(o,a){return o.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(o){if(o.name===this.tag){var a=o.attributes;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableStyleInfo"}}])&&v(t.prototype,e),i}(h("../base-xform"));A.exports=s},{"../base-xform":31}],140:[function(h,A,E){function y(l){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(l)}function p(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(l);b&&(T=T.filter(function(j){return Object.getOwnPropertyDescriptor(l,j).enumerable})),w.push.apply(w,T)}return w}function v(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}();return function(){var w,T=n(l);if(b){var j=n(this).constructor;w=Reflect.construct(T,arguments,j)}else w=T.apply(this,arguments);return s(this,w)}}function s(l,b){return!b||y(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function n(l){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var t=h("../../../utils/xml-stream"),e=h("../base-xform"),r=h("../list-xform"),i=h("./auto-filter-xform"),o=h("./table-column-xform"),a=h("./table-style-info-xform"),u=function(l){(function(P,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(O&&O.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),O&&c(P,O)})(j,l);var b,w,T=f(j);function j(){var P;return function(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}(this,j),(P=T.call(this)).map={autoFilter:new i,tableColumns:new r({tag:"tableColumns",count:!0,empty:!0,childXform:new o}),tableStyleInfo:new a},P}return b=j,(w=[{key:"prepare",value:function(P,O){this.map.autoFilter.prepare(P),this.map.tableColumns.prepare(P.columns,O)}},{key:"render",value:function(P,O){P.openXml(t.StdDocAttributes),P.openNode(this.tag,v(v({},j.TABLE_ATTRIBUTES),{},{id:O.id,name:O.name,displayName:O.displayName||O.name,ref:O.tableRef,totalsRowCount:O.totalsRow?"1":void 0,totalsRowShown:O.totalsRow?void 0:"1",headerRowCount:O.headerRow?"1":"0"})),this.map.autoFilter.render(P,O),this.map.tableColumns.render(P,O.columns),this.map.tableStyleInfo.render(P,O.style),P.closeNode()}},{key:"parseOpen",value:function(P){if(this.parser)return this.parser.parseOpen(P),!0;var O=P.name,C=P.attributes;switch(O){case this.tag:this.reset(),this.model={name:C.name,displayName:C.displayName||C.name,tableRef:C.ref,totalsRow:C.totalsRowCount==="1",headerRow:C.headerRowCount==="1"};break;default:this.parser=this.map[P.name],this.parser&&this.parser.parseOpen(P)}return!0}},{key:"parseText",value:function(P){this.parser&&this.parser.parseText(P)}},{key:"parseClose",value:function(P){var O=this;if(this.parser)return this.parser.parseClose(P)||(this.parser=void 0),!0;switch(P){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach(function(C,_){O.model.columns[_].filterButton=C.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}},{key:"reconcile",value:function(P,O){P.columns.forEach(function(C){C.dxfId!==void 0&&(C.style=O.styles.getDxfStyle(C.dxfId))})}},{key:"tag",get:function(){return"table"}}])&&m(b.prototype,w),j}(e);u.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},A.exports=u},{"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":136,"./table-column-xform":138,"./table-style-info-xform":139}],141:[function(h,A,E){(function(y,p){function v(k,M,D,L,B,U,H){try{var V=k[U](H),q=V.value}catch($){return void D($)}V.done?M(q):Promise.resolve(q).then(L,B)}function d(k){return function(){var M=this,D=arguments;return new Promise(function(L,B){var U=k.apply(M,D);function H(q){v(U,L,B,H,V,"next",q)}function V(q){v(U,L,B,H,V,"throw",q)}H(void 0)})}}function m(k,M){for(var D=0;D=1)){ft.next=6;break}return et=nt.substr(J+1),tt=nt.substr(0,J),ft.next=6,new Promise(function(lt,yt){var Rt=new e;Rt.on("finish",function(){Z.mediaIndex[nt]=Z.media.length,Z.mediaIndex[tt]=Z.media.length;var _t={type:"image",name:tt,extension:et,buffer:Rt.toBuffer()};Z.media.push(_t),lt()}),ot.on("error",function(_t){yt(_t)}),ot.pipe(Rt)});case 6:case"end":return ft.stop()}},K)})),function(K,ot,Z){return Ot.apply(this,arguments)})},{key:"_processDrawingEntry",value:(ct=d(regeneratorRuntime.mark(function K(ot,Z,nt){var J,et;return regeneratorRuntime.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return J=new O,tt.next=3,J.parseStream(ot);case 3:et=tt.sent,Z.drawings[nt]=et;case 5:case"end":return tt.stop()}},K)})),function(K,ot,Z){return ct.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(pt=d(regeneratorRuntime.mark(function K(ot,Z,nt){var J,et;return regeneratorRuntime.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return J=new b,tt.next=3,J.parseStream(ot);case 3:et=tt.sent,Z.drawingRels[nt]=et;case 5:case"end":return tt.stop()}},K)})),function(K,ot,Z){return pt.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:(ut=d(regeneratorRuntime.mark(function K(ot,Z,nt){var J,et;return regeneratorRuntime.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return J=new S,tt.next=3,J.parseStream(ot);case 3:et=tt.sent,Z.vmlDrawings["../drawings/".concat(nt,".vml")]=et;case 5:case"end":return tt.stop()}},K)})),function(K,ot,Z){return ut.apply(this,arguments)})},{key:"_processThemeEntry",value:(rt=d(regeneratorRuntime.mark(function K(ot,Z,nt){return regeneratorRuntime.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,new Promise(function(et,tt){var ft=new e;ot.on("error",tt),ft.on("error",tt),ft.on("finish",function(){Z.themes[nt]=ft.read().toString(),et()}),ot.pipe(ft)});case 2:case"end":return J.stop()}},K)})),function(K,ot,Z){return rt.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(at=d(regeneratorRuntime.mark(function K(ot,Z){var nt,J,et,tt,ft,lt,yt,Rt;return regeneratorRuntime.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:!ot[Symbol.asyncIterator]&&ot.pipe&&(ot=ot.pipe(new n)),nt=[],J=!0,et=!1,_t.prev=4,ft=c(ot);case 6:return _t.next=8,ft.next();case 8:return lt=_t.sent,J=lt.done,_t.next=12,lt.value;case 12:if(yt=_t.sent,J){_t.next=19;break}Rt=yt,nt.push(Rt);case 16:J=!0,_t.next=6;break;case 19:_t.next=25;break;case 21:_t.prev=21,_t.t0=_t.catch(4),et=!0,tt=_t.t0;case 25:if(_t.prev=25,_t.prev=26,J||ft.return==null){_t.next=30;break}return _t.next=30,ft.return();case 30:if(_t.prev=30,!et){_t.next=33;break}throw tt;case 33:return _t.finish(30);case 34:return _t.finish(25);case 35:return _t.abrupt("return",this.load(p.concat(nt),Z));case 36:case"end":return _t.stop()}},K,this,[[4,21,25,35],[26,,30,34]])})),function(K,ot){return at.apply(this,arguments)})},{key:"load",value:(G=d(regeneratorRuntime.mark(function K(ot,Z){var nt,J,et,tt,ft,lt,yt,Rt,_t,Ft,Nt,zt,Qt,se,Bt,Vt;return regeneratorRuntime.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return nt=Z&&Z.base64?p.from(ot.toString(),"base64"):ot,J={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},bt.next=4,s.loadAsync(nt);case 4:et=bt.sent,tt=0,ft=Object.values(et.files);case 6:if(!(tt0&&(yt=new i,et.render(yt,lt),ot.append(yt.xml,{name:"xl/comments".concat(lt.id,".xml")}),yt=new i,tt.render(yt,lt),ot.append(yt.xml,{name:"xl/drawings/vmlDrawing".concat(lt.id,".vml")}))});case 5:case"end":return ft.stop()}},K)})),function(K,ot){return U.apply(this,arguments)})},{key:"_finalize",value:function(K){var ot=this;return new Promise(function(Z,nt){K.on("finish",function(){Z(ot)}),K.on("error",nt),K.finalize()})}},{key:"prepareModel",value:function(K,ot){K.creator=K.creator||"ExcelJS",K.lastModifiedBy=K.lastModifiedBy||"ExcelJS",K.created=K.created||new Date,K.modified=K.modified||new Date,K.useSharedStrings=ot.useSharedStrings===void 0||ot.useSharedStrings,K.useStyles=ot.useStyles===void 0||ot.useStyles,K.sharedStrings=new l,K.styles=K.useStyles?new a(!0):new a.Mock;var Z=new j,nt=new P;Z.prepare(K);var J={sharedStrings:K.sharedStrings,styles:K.styles,date1904:K.properties.date1904,drawingsCount:0,media:K.media};J.drawings=K.drawings=[],J.commentRefs=K.commentRefs=[];var et=0;K.tables=[],K.worksheets.forEach(function(tt){tt.tables.forEach(function(ft){et++,ft.target="table".concat(et,".xml"),ft.id=et,K.tables.push(ft)}),nt.prepare(tt,J)})}},{key:"write",value:(B=d(regeneratorRuntime.mark(function K(ot,Z){var nt,J;return regeneratorRuntime.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return Z=Z||{},nt=this.workbook.model,(J=new t.ZipWriter(Z.zip)).pipe(ot),this.prepareModel(nt,Z),et.next=7,this.addContentTypes(J,nt);case 7:return et.next=9,this.addOfficeRels(J,nt);case 9:return et.next=11,this.addWorkbookRels(J,nt);case 11:return et.next=13,this.addWorksheets(J,nt);case 13:return et.next=15,this.addSharedStrings(J,nt);case 15:return et.next=17,this.addDrawings(J,nt);case 17:return et.next=19,this.addTables(J,nt);case 19:return et.next=21,Promise.all([this.addThemes(J,nt),this.addStyles(J,nt)]);case 21:return et.next=23,this.addMedia(J,nt);case 23:return et.next=25,Promise.all([this.addApp(J,nt),this.addCore(J,nt)]);case 25:return et.next=27,this.addWorkbook(J,nt);case 27:return et.abrupt("return",this._finalize(J));case 28:case"end":return et.stop()}},K,this)})),function(K,ot){return B.apply(this,arguments)})},{key:"writeFile",value:function(K,ot){var Z=this,nt=f.createWriteStream(K);return new Promise(function(J,et){nt.on("finish",function(){J()}),nt.on("error",function(tt){et(tt)}),Z.write(nt,ot).then(function(){nt.end()})})}},{key:"writeBuffer",value:(L=d(regeneratorRuntime.mark(function K(ot){var Z;return regeneratorRuntime.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return Z=new e,nt.next=3,this.write(Z,ot);case 3:return nt.abrupt("return",Z.read());case 4:case"end":return nt.stop()}},K,this)})),function(K){return L.apply(this,arguments)})}])&&m(M.prototype,D),k}();x.RelType=h("./rel-type"),A.exports=x}).call(this,h("_process"),h("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:467,buffer:216,fs:215,jszip:399,"readable-stream":491}],142:[function(h,A,E){A.exports=` `},{}],143:[function(h,A,E){(function(y){function p(e){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(e)}function v(e,r){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(i){return!1}}();return function(){var i,o=f(e);if(r){var a=f(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return c(this,i)}}function c(e,r){return!r||p(r)!=="object"&&typeof r!="function"?function(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(e):r}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}Object.defineProperty(E,"__esModule",{value:!0}),E.CsvFormatterStream=void 0;var s=h("stream"),n=h("./formatter"),t=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,e);var r,i,o=m(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=o.call(this,{writableObjectMode:u.objectMode})).hasWrittenBOM=!1,l.formatterOptions=u,l.rowFormatter=new n.RowFormatter(u),l.hasWrittenBOM=!u.writeBOM,l}return r=a,(i=[{key:"transform",value:function(u){return this.rowFormatter.rowTransform=u,this}},{key:"_transform",value:function(u,l,b){var w=this,T=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,function(j,P){return j?(T=!0,b(j)):(P&&P.forEach(function(O){w.push(y.from(O,"utf8"))}),T=!0,b())})}catch(j){if(T)throw j;b(j)}}},{key:"_flush",value:function(u){var l=this;this.rowFormatter.finish(function(b,w){return b?u(b):(w&&w.forEach(function(T){l.push(y.from(T,"utf8"))}),u())})}}])&&v(r.prototype,i),a}(s.Transform);E.CsvFormatterStream=t}).call(this,h("buffer").Buffer)},{"./formatter":147,buffer:216,stream:506}],144:[function(h,A,E){function y(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(E,"__esModule",{value:!0}),E.FormatterOptions=void 0,E.FormatterOptions=function p(){var v,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y(this,p),this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,d||{}),(d==null?void 0:d.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(d==null?void 0:d.quote)===!0?this.quote='"':(d==null?void 0:d.quote)===!1&&(this.quote=""),typeof(d==null?void 0:d.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((v=d.writeHeaders)===null||v===void 0||v),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(h,A,E){function y(f,s){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},a=[],u=new f.Writable({write:function(l,b,w){a.push(l),w()}});return new Promise(function(l,b){u.on("error",b).on("finish",function(){return l(y.concat(a))}),E.write(i,o).pipe(u)})},E.writeToString=function(i,o){return E.writeToBuffer(i,o).then(function(a){return a.toString()})},E.writeToPath=function(i,o,a){var u=s.createWriteStream(i,{encoding:"utf8"});return E.write(o,a).pipe(u)}}).call(this,h("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(h,A,E){Object.defineProperty(E,"__esModule",{value:!0}),E.isSyncTransform=void 0,E.isSyncTransform=function(y){return y.length===1}},{}],150:[function(h,A,E){(function(y){function p(o){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(o)}function v(o,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}();return function(){var u,l=s(o);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return f(this,u)}}function f(o,a){return!a||p(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(o):a}function s(o){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(o)}Object.defineProperty(E,"__esModule",{value:!0}),E.CsvParserStream=void 0;var n=h("string_decoder"),t=h("stream"),e=h("./transforms"),r=h("./parser"),i=function(o){(function(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),T&&m(w,T)})(b,o);var a,u,l=c(b);function b(w){var T;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,b),(T=l.call(this,{objectMode:w.objectMode})).lines="",T.rowCount=0,T.parsedRowCount=0,T.parsedLineCount=0,T.endEmitted=!1,T.headersEmitted=!1,T.parserOptions=w,T.parser=new r.Parser(w),T.headerTransformer=new e.HeaderTransformer(w),T.decoder=new n.StringDecoder(w.encoding),T.rowTransformerValidator=new e.RowTransformerValidator,T}return a=b,(u=[{key:"transform",value:function(w){return this.rowTransformerValidator.rowTransform=w,this}},{key:"validate",value:function(w){return this.rowTransformerValidator.rowValidator=w,this}},{key:"emit",value:function(w){var T;if(w==="end")return this.endEmitted||(this.endEmitted=!0,d(s(b.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var j=arguments.length,P=new Array(j>1?j-1:0),O=1;O=P||j.hasHitRowLimit)return T();if(j.parsedLineCount+=1,j.shouldSkipLine)return _();var S=w[C];j.rowCount+=1,j.parsedRowCount+=1;var g=j.rowCount;return j.transformRow(S,function(R,x){if(R)return j.rowCount-=1,_(R);if(!x)return _(new Error("expected transform result"));if(x.isValid){if(x.row)return j.pushRow(x.row,_)}else j.emit("data-invalid",x.row,g,x.reason);return _()})})(0)}},{key:"transformRow",value:function(w,T){var j=this;try{this.headerTransformer.transform(w,function(P,O){return P?T(P):O?O.isValid?O.row?j.shouldEmitRows?j.rowTransformerValidator.transformAndValidate(O.row,T):j.skipRow(T):(j.rowCount-=1,j.parsedRowCount-=1,T(null,{row:null,isValid:!0})):j.shouldEmitRows?T(null,{isValid:!1,row:w}):j.skipRow(T):T(new Error("Expected result from header transform"))})}catch(P){T(P)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(w){return this.rowCount-=1,w(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(w,T){try{this.parserOptions.objectMode?this.push(w):this.push(JSON.stringify(w)),T()}catch(j){T(j)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}])&&v(a.prototype,u),b}(t.Transform);E.CsvParserStream=i}).call(this,h("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(h,A,E){var y=function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(E,"__esModule",{value:!0}),E.ParserOptions=void 0;var p=y(h("lodash.escaperegexp")),v=y(h("lodash.isnil"));E.ParserOptions=function d(m){var c;if(function(f,s){if(!(f instanceof s))throw new TypeError("Cannot call a class as a function")}(this,d),this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,m||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=p.default(this.delimiter),this.escapeChar=(c=this.escape)!==null&&c!==void 0?c:this.quote,this.supportsComments=!v.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)}},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(h,A,E){var y=Object.create?function(e,r,i,o){o===void 0&&(o=i),Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[i]}})}:function(e,r,i,o){o===void 0&&(o=i),e[o]=r[i]},p=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},v=function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!=="default"&&Object.hasOwnProperty.call(e,i)&&y(r,e,i);return p(r,e),r},d=function(e,r){for(var i in e)i==="default"||r.hasOwnProperty(i)||y(r,e,i)};Object.defineProperty(E,"__esModule",{value:!0}),E.parseString=E.parseFile=E.parseStream=E.parse=void 0;var m=v(h("fs")),c=h("stream"),f=h("./ParserOptions"),s=h("./CsvParserStream");d(h("./types"),E);var n=h("./CsvParserStream");Object.defineProperty(E,"CsvParserStream",{enumerable:!0,get:function(){return n.CsvParserStream}});var t=h("./ParserOptions");Object.defineProperty(E,"ParserOptions",{enumerable:!0,get:function(){return t.ParserOptions}}),E.parse=function(e){return new s.CsvParserStream(new f.ParserOptions(e))},E.parseStream=function(e,r){return e.pipe(new s.CsvParserStream(new f.ParserOptions(r)))},E.parseFile=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.createReadStream(e).pipe(new s.CsvParserStream(new f.ParserOptions(r)))},E.parseString=function(e,r){var i=new c.Readable;return i.push(e),i.push(null),i.pipe(new s.CsvParserStream(new f.ParserOptions(r)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(h,A,E){function y(f,s){for(var n=0;nthis.cursor}},{key:"nextNonSpaceToken",get:function(){var s=this.lineFromCursor,n=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(n)===-1)return null;var t=n.exec(s);if(t==null)return null;var e=t[1],r=this.cursor+(t.index||0);return new p.Token({token:e,startCursor:r,endCursor:r+e.length-1})}},{key:"nextCharacterToken",get:function(){var s=this.cursor;return this.lineLength<=s?null:new p.Token({token:this.line[s],startCursor:s,endCursor:s})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}])&&y(c.prototype,f),m}();E.Scanner=d},{"./Token":156}],156:[function(h,A,E){function y(v,d){for(var m=0;mthis.headersLength){if(!r.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(e.length));return{row:e,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(e.length)}}return r.strictColumnHandling&&e.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(a)))}this.headers=e,this.receivedHeaders=!0,this.headersLength=((r=this.headers)===null||r===void 0?void 0:r.length)||0}}])&&y(n.prototype,t),s}();E.HeaderTransformer=f},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(h,A,E){function y(c,f){for(var s=0;s>6],o=(32&r)==0;if((31&r)==31){var a=r;for(r=0;(128&a)==128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:i,primitive:o,tag:r,tagStr:m.tag[r]}}function n(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if(!(128&i))return i;var o=127&i;if(o>4)return t.error("length octect is too long");i=0;for(var a=0;a=31?P.error("Multi-octet tag encoding unsupported"):(T||(O|=32),O|=d.tagClassByName[j||"universal"]<<6)}(s,n,t,this.reporter);if(e.length<128){var i=p.alloc(2);return i[0]=r,i[1]=e.length,this._createEncoderBuffer([i,e])}for(var o=1,a=e.length;a>=256;a>>=8)o++;var u=p.alloc(2+o);u[0]=r,u[1]=128|o;for(var l=1+o,b=e.length;b>0;l--,b>>=8)u[l]=255&b;return this._createEncoderBuffer([u,e])},c.prototype._encodeStr=function(s,n){if(n==="bitstr")return this._createEncoderBuffer([0|s.unused,s.data]);if(n==="bmpstr"){for(var t=p.alloc(2*s.length),e=0;e=40)return this.reporter.error("Second objid identifier OOB");s.splice(0,2,40*s[0]+s[1])}for(var i=0,o=0;o=128;a>>=7)i++}for(var u=p.alloc(i),l=u.length-1,b=s.length-1;b>=0;b--){var w=s[b];for(u[l--]=127&w;(w>>=7)>0;)u[l--]=128|127&w}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(s,n){var t,e=new Date(s);return n==="gentime"?t=[f(e.getUTCFullYear()),f(e.getUTCMonth()+1),f(e.getUTCDate()),f(e.getUTCHours()),f(e.getUTCMinutes()),f(e.getUTCSeconds()),"Z"].join(""):n==="utctime"?t=[f(e.getUTCFullYear()%100),f(e.getUTCMonth()+1),f(e.getUTCDate()),f(e.getUTCHours()),f(e.getUTCMinutes()),f(e.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(t,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(s,n){if(typeof s=="string"){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(s))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(s));s=n[s]}if(typeof s!="number"&&!p.isBuffer(s)){var t=s.toArray();!s.sign&&128&t[0]&&t.unshift(0),s=p.from(t)}if(p.isBuffer(s)){var e=s.length;s.length===0&&e++;var r=p.alloc(e);return s.copy(r),s.length===0&&(r[0]=0),this._createEncoderBuffer(r)}if(s<128)return this._createEncoderBuffer(s);if(s<256)return this._createEncoderBuffer([0,s]);for(var i=1,o=s;o>=256;o>>=8)i++;for(var a=new Array(i),u=a.length-1;u>=0;u--)a[u]=255&s,s>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(p.from(a))},c.prototype._encodeBool=function(s){return this._createEncoderBuffer(s?255:0)},c.prototype._use=function(s,n){return typeof s=="function"&&(s=s(n)),s._getEncoder("der").tree},c.prototype._skipDefault=function(s,n,t){var e,r=this._baseState;if(r.default===null)return!1;var i=s.join();if(r.defaultBuffer===void 0&&(r.defaultBuffer=this._encodeValue(r.default,n,t).join()),i.length!==r.defaultBuffer.length)return!1;for(e=0;e=49&&M<=54?M-49+10:M>=17&&M<=22?M-17+10:15&M}return R}function n(_,S,g,R){for(var x=0,k=Math.min(_.length,g),M=S;M=49?D-49+10:D>=17?D-17+10:D}return x}c.isBN=function(_){return _ instanceof c||_!==null&&y(_)==="object"&&_.constructor.wordSize===c.wordSize&&Array.isArray(_.words)},c.max=function(_,S){return _.cmp(S)>0?_:S},c.min=function(_,S){return _.cmp(S)<0?_:S},c.prototype._init=function(_,S,g){if(typeof _=="number")return this._initNumber(_,S,g);if(y(_)==="object")return this._initArray(_,S,g);S==="hex"&&(S=16),d(S===(0|S)&&S>=2&&S<=36);var R=0;(_=_.toString().replace(/\s+/g,""))[0]==="-"&&R++,S===16?this._parseHex(_,R):this._parseBase(_,S,R),_[0]==="-"&&(this.negative=1),this.strip(),g==="le"&&this._initArray(this.toArray(),S,g)},c.prototype._initNumber=function(_,S,g){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[67108863&_],this.length=1):_<4503599627370496?(this.words=[67108863&_,_/67108864&67108863],this.length=2):(d(_<9007199254740992),this.words=[67108863&_,_/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),S,g)},c.prototype._initArray=function(_,S,g){if(d(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var R=0;R=0;R-=3)k=_[R]|_[R-1]<<8|_[R-2]<<16,this.words[x]|=k<>>26-M&67108863,(M+=24)>=26&&(M-=26,x++);else if(g==="le")for(R=0,x=0;R<_.length;R+=3)k=_[R]|_[R+1]<<8|_[R+2]<<16,this.words[x]|=k<>>26-M&67108863,(M+=24)>=26&&(M-=26,x++);return this.strip()},c.prototype._parseHex=function(_,S){this.length=Math.ceil((_.length-S)/6),this.words=new Array(this.length);for(var g=0;g=S;g-=6)x=s(_,g,g+6),this.words[R]|=x<>>26-k&4194303,(k+=24)>=26&&(k-=26,R++);g+6!==S&&(x=s(_,S,g+6),this.words[R]|=x<>>26-k&4194303),this.strip()},c.prototype._parseBase=function(_,S,g){this.words=[0],this.length=1;for(var R=0,x=1;x<=67108863;x*=S)R++;R--,x=x/S|0;for(var k=_.length-g,M=k%R,D=Math.min(k,k-M)+g,L=0,B=g;B1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var t=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],e=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],r=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function i(_,S,g){g.negative=S.negative^_.negative;var R=_.length+S.length|0;g.length=R,R=R-1|0;var x=0|_.words[0],k=0|S.words[0],M=x*k,D=67108863&M,L=M/67108864|0;g.words[0]=D;for(var B=1;B>>26,H=67108863&L,V=Math.min(B,S.length-1),q=Math.max(0,B-_.length+1);q<=V;q++){var $=B-q|0;U+=(M=(x=0|_.words[$])*(k=0|S.words[q])+H)/67108864|0,H=67108863&M}g.words[B]=0|H,L=0|U}return L!==0?g.words[B]=0|L:g.length--,g.strip()}c.prototype.toString=function(_,S){var g;if(S=0|S||1,(_=_||10)===16||_==="hex"){g="";for(var R=0,x=0,k=0;k>>24-R&16777215)!==0||k!==this.length-1?t[6-D.length]+D+g:D+g,(R+=2)>=26&&(R-=26,k--)}for(x!==0&&(g=x.toString(16)+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(_===(0|_)&&_>=2&&_<=36){var L=e[_],B=r[_];g="";var U=this.clone();for(U.negative=0;!U.isZero();){var H=U.modn(B).toString(_);g=(U=U.idivn(B)).isZero()?H+g:t[L-H.length]+H+g}for(this.isZero()&&(g="0"+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}d(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=67108864*this.words[1]:this.length===3&&this.words[2]===1?_+=4503599627370496+67108864*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(_,S){return d(f!==void 0),this.toArrayLike(f,_,S)},c.prototype.toArray=function(_,S){return this.toArrayLike(Array,_,S)},c.prototype.toArrayLike=function(_,S,g){var R=this.byteLength(),x=g||Math.max(1,R);d(R<=x,"byte array longer than desired length"),d(x>0,"Requested array length <= 0"),this.strip();var k,M,D=S==="le",L=new _(x),B=this.clone();if(D){for(M=0;!B.isZero();M++)k=B.andln(255),B.iushrn(8),L[M]=k;for(;M=4096&&(g+=13,S>>>=13),S>=64&&(g+=7,S>>>=7),S>=8&&(g+=4,S>>>=4),S>=2&&(g+=2,S>>>=2),g+S},c.prototype._zeroBits=function(_){if(_===0)return 26;var S=_,g=0;return!(8191&S)&&(g+=13,S>>>=13),!(127&S)&&(g+=7,S>>>=7),!(15&S)&&(g+=4,S>>>=4),!(3&S)&&(g+=2,S>>>=2),!(1&S)&&g++,g},c.prototype.bitLength=function(){var _=this.words[this.length-1],S=this._countBits(_);return 26*(this.length-1)+S},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,S=0;S_.length?this.clone().ior(_):_.clone().ior(this)},c.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},c.prototype.iuand=function(_){var S;S=this.length>_.length?_:this;for(var g=0;g_.length?this.clone().iand(_):_.clone().iand(this)},c.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},c.prototype.iuxor=function(_){var S,g;this.length>_.length?(S=this,g=_):(S=_,g=this);for(var R=0;R_.length?this.clone().ixor(_):_.clone().ixor(this)},c.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},c.prototype.inotn=function(_){d(typeof _=="number"&&_>=0);var S=0|Math.ceil(_/26),g=_%26;this._expand(S),g>0&&S--;for(var R=0;R0&&(this.words[R]=~this.words[R]&67108863>>26-g),this.strip()},c.prototype.notn=function(_){return this.clone().inotn(_)},c.prototype.setn=function(_,S){d(typeof _=="number"&&_>=0);var g=_/26|0,R=_%26;return this._expand(g+1),this.words[g]=S?this.words[g]|1<_.length?(g=this,R=_):(g=_,R=this);for(var x=0,k=0;k>>26;for(;x!==0&&k>>26;if(this.length=g.length,x!==0)this.words[this.length]=x,this.length++;else if(g!==this)for(;k_.length?this.clone().iadd(_):_.clone().iadd(this)},c.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var S=this.iadd(_);return _.negative=1,S._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var g,R,x=this.cmp(_);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;x>0?(g=this,R=_):(g=_,R=this);for(var k=0,M=0;M>26,this.words[M]=67108863&S;for(;k!==0&&M>26,this.words[M]=67108863&S;if(k===0&&M>>13,q=0|M[1],$=8191&q,F=q>>>13,I=0|M[2],N=8191&I,z=I>>>13,W=0|M[3],X=8191&W,G=W>>>13,at=0|M[4],rt=8191&at,ut=at>>>13,pt=0|M[5],ct=8191&pt,Ot=pt>>>13,kt=0|M[6],gt=8191&kt,St=kt>>>13,Ct=0|M[7],ht=8191&Ct,K=Ct>>>13,ot=0|M[8],Z=8191&ot,nt=ot>>>13,J=0|M[9],et=8191&J,tt=J>>>13,ft=0|D[0],lt=8191&ft,yt=ft>>>13,Rt=0|D[1],_t=8191&Rt,Ft=Rt>>>13,Nt=0|D[2],zt=8191&Nt,Qt=Nt>>>13,se=0|D[3],Bt=8191&se,Vt=se>>>13,bt=0|D[4],Ut=8191&bt,ee=bt>>>13,te=0|D[5],Wt=8191&te,ae=te>>>13,ie=0|D[6],$t=8191&ie,fe=ie>>>13,Q=0|D[7],it=8191&Q,wt=Q>>>13,Tt=0|D[8],Mt=8191&Tt,It=Tt>>>13,Ht=0|D[9],Pt=8191&Ht,Jt=Ht>>>13;g.negative=_.negative^S.negative,g.length=19;var Xt=(B+(R=Math.imul(H,lt))|0)+((8191&(x=(x=Math.imul(H,yt))+Math.imul(V,lt)|0))<<13)|0;B=((k=Math.imul(V,yt))+(x>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,R=Math.imul($,lt),x=(x=Math.imul($,yt))+Math.imul(F,lt)|0,k=Math.imul(F,yt);var qt=(B+(R=R+Math.imul(H,_t)|0)|0)+((8191&(x=(x=x+Math.imul(H,Ft)|0)+Math.imul(V,_t)|0))<<13)|0;B=((k=k+Math.imul(V,Ft)|0)+(x>>>13)|0)+(qt>>>26)|0,qt&=67108863,R=Math.imul(N,lt),x=(x=Math.imul(N,yt))+Math.imul(z,lt)|0,k=Math.imul(z,yt),R=R+Math.imul($,_t)|0,x=(x=x+Math.imul($,Ft)|0)+Math.imul(F,_t)|0,k=k+Math.imul(F,Ft)|0;var be=(B+(R=R+Math.imul(H,zt)|0)|0)+((8191&(x=(x=x+Math.imul(H,Qt)|0)+Math.imul(V,zt)|0))<<13)|0;B=((k=k+Math.imul(V,Qt)|0)+(x>>>13)|0)+(be>>>26)|0,be&=67108863,R=Math.imul(X,lt),x=(x=Math.imul(X,yt))+Math.imul(G,lt)|0,k=Math.imul(G,yt),R=R+Math.imul(N,_t)|0,x=(x=x+Math.imul(N,Ft)|0)+Math.imul(z,_t)|0,k=k+Math.imul(z,Ft)|0,R=R+Math.imul($,zt)|0,x=(x=x+Math.imul($,Qt)|0)+Math.imul(F,zt)|0,k=k+Math.imul(F,Qt)|0;var ve=(B+(R=R+Math.imul(H,Bt)|0)|0)+((8191&(x=(x=x+Math.imul(H,Vt)|0)+Math.imul(V,Bt)|0))<<13)|0;B=((k=k+Math.imul(V,Vt)|0)+(x>>>13)|0)+(ve>>>26)|0,ve&=67108863,R=Math.imul(rt,lt),x=(x=Math.imul(rt,yt))+Math.imul(ut,lt)|0,k=Math.imul(ut,yt),R=R+Math.imul(X,_t)|0,x=(x=x+Math.imul(X,Ft)|0)+Math.imul(G,_t)|0,k=k+Math.imul(G,Ft)|0,R=R+Math.imul(N,zt)|0,x=(x=x+Math.imul(N,Qt)|0)+Math.imul(z,zt)|0,k=k+Math.imul(z,Qt)|0,R=R+Math.imul($,Bt)|0,x=(x=x+Math.imul($,Vt)|0)+Math.imul(F,Bt)|0,k=k+Math.imul(F,Vt)|0;var le=(B+(R=R+Math.imul(H,Ut)|0)|0)+((8191&(x=(x=x+Math.imul(H,ee)|0)+Math.imul(V,Ut)|0))<<13)|0;B=((k=k+Math.imul(V,ee)|0)+(x>>>13)|0)+(le>>>26)|0,le&=67108863,R=Math.imul(ct,lt),x=(x=Math.imul(ct,yt))+Math.imul(Ot,lt)|0,k=Math.imul(Ot,yt),R=R+Math.imul(rt,_t)|0,x=(x=x+Math.imul(rt,Ft)|0)+Math.imul(ut,_t)|0,k=k+Math.imul(ut,Ft)|0,R=R+Math.imul(X,zt)|0,x=(x=x+Math.imul(X,Qt)|0)+Math.imul(G,zt)|0,k=k+Math.imul(G,Qt)|0,R=R+Math.imul(N,Bt)|0,x=(x=x+Math.imul(N,Vt)|0)+Math.imul(z,Bt)|0,k=k+Math.imul(z,Vt)|0,R=R+Math.imul($,Ut)|0,x=(x=x+Math.imul($,ee)|0)+Math.imul(F,Ut)|0,k=k+Math.imul(F,ee)|0;var _e=(B+(R=R+Math.imul(H,Wt)|0)|0)+((8191&(x=(x=x+Math.imul(H,ae)|0)+Math.imul(V,Wt)|0))<<13)|0;B=((k=k+Math.imul(V,ae)|0)+(x>>>13)|0)+(_e>>>26)|0,_e&=67108863,R=Math.imul(gt,lt),x=(x=Math.imul(gt,yt))+Math.imul(St,lt)|0,k=Math.imul(St,yt),R=R+Math.imul(ct,_t)|0,x=(x=x+Math.imul(ct,Ft)|0)+Math.imul(Ot,_t)|0,k=k+Math.imul(Ot,Ft)|0,R=R+Math.imul(rt,zt)|0,x=(x=x+Math.imul(rt,Qt)|0)+Math.imul(ut,zt)|0,k=k+Math.imul(ut,Qt)|0,R=R+Math.imul(X,Bt)|0,x=(x=x+Math.imul(X,Vt)|0)+Math.imul(G,Bt)|0,k=k+Math.imul(G,Vt)|0,R=R+Math.imul(N,Ut)|0,x=(x=x+Math.imul(N,ee)|0)+Math.imul(z,Ut)|0,k=k+Math.imul(z,ee)|0,R=R+Math.imul($,Wt)|0,x=(x=x+Math.imul($,ae)|0)+Math.imul(F,Wt)|0,k=k+Math.imul(F,ae)|0;var xe=(B+(R=R+Math.imul(H,$t)|0)|0)+((8191&(x=(x=x+Math.imul(H,fe)|0)+Math.imul(V,$t)|0))<<13)|0;B=((k=k+Math.imul(V,fe)|0)+(x>>>13)|0)+(xe>>>26)|0,xe&=67108863,R=Math.imul(ht,lt),x=(x=Math.imul(ht,yt))+Math.imul(K,lt)|0,k=Math.imul(K,yt),R=R+Math.imul(gt,_t)|0,x=(x=x+Math.imul(gt,Ft)|0)+Math.imul(St,_t)|0,k=k+Math.imul(St,Ft)|0,R=R+Math.imul(ct,zt)|0,x=(x=x+Math.imul(ct,Qt)|0)+Math.imul(Ot,zt)|0,k=k+Math.imul(Ot,Qt)|0,R=R+Math.imul(rt,Bt)|0,x=(x=x+Math.imul(rt,Vt)|0)+Math.imul(ut,Bt)|0,k=k+Math.imul(ut,Vt)|0,R=R+Math.imul(X,Ut)|0,x=(x=x+Math.imul(X,ee)|0)+Math.imul(G,Ut)|0,k=k+Math.imul(G,ee)|0,R=R+Math.imul(N,Wt)|0,x=(x=x+Math.imul(N,ae)|0)+Math.imul(z,Wt)|0,k=k+Math.imul(z,ae)|0,R=R+Math.imul($,$t)|0,x=(x=x+Math.imul($,fe)|0)+Math.imul(F,$t)|0,k=k+Math.imul(F,fe)|0;var Ee=(B+(R=R+Math.imul(H,it)|0)|0)+((8191&(x=(x=x+Math.imul(H,wt)|0)+Math.imul(V,it)|0))<<13)|0;B=((k=k+Math.imul(V,wt)|0)+(x>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,R=Math.imul(Z,lt),x=(x=Math.imul(Z,yt))+Math.imul(nt,lt)|0,k=Math.imul(nt,yt),R=R+Math.imul(ht,_t)|0,x=(x=x+Math.imul(ht,Ft)|0)+Math.imul(K,_t)|0,k=k+Math.imul(K,Ft)|0,R=R+Math.imul(gt,zt)|0,x=(x=x+Math.imul(gt,Qt)|0)+Math.imul(St,zt)|0,k=k+Math.imul(St,Qt)|0,R=R+Math.imul(ct,Bt)|0,x=(x=x+Math.imul(ct,Vt)|0)+Math.imul(Ot,Bt)|0,k=k+Math.imul(Ot,Vt)|0,R=R+Math.imul(rt,Ut)|0,x=(x=x+Math.imul(rt,ee)|0)+Math.imul(ut,Ut)|0,k=k+Math.imul(ut,ee)|0,R=R+Math.imul(X,Wt)|0,x=(x=x+Math.imul(X,ae)|0)+Math.imul(G,Wt)|0,k=k+Math.imul(G,ae)|0,R=R+Math.imul(N,$t)|0,x=(x=x+Math.imul(N,fe)|0)+Math.imul(z,$t)|0,k=k+Math.imul(z,fe)|0,R=R+Math.imul($,it)|0,x=(x=x+Math.imul($,wt)|0)+Math.imul(F,it)|0,k=k+Math.imul(F,wt)|0;var Y=(B+(R=R+Math.imul(H,Mt)|0)|0)+((8191&(x=(x=x+Math.imul(H,It)|0)+Math.imul(V,Mt)|0))<<13)|0;B=((k=k+Math.imul(V,It)|0)+(x>>>13)|0)+(Y>>>26)|0,Y&=67108863,R=Math.imul(et,lt),x=(x=Math.imul(et,yt))+Math.imul(tt,lt)|0,k=Math.imul(tt,yt),R=R+Math.imul(Z,_t)|0,x=(x=x+Math.imul(Z,Ft)|0)+Math.imul(nt,_t)|0,k=k+Math.imul(nt,Ft)|0,R=R+Math.imul(ht,zt)|0,x=(x=x+Math.imul(ht,Qt)|0)+Math.imul(K,zt)|0,k=k+Math.imul(K,Qt)|0,R=R+Math.imul(gt,Bt)|0,x=(x=x+Math.imul(gt,Vt)|0)+Math.imul(St,Bt)|0,k=k+Math.imul(St,Vt)|0,R=R+Math.imul(ct,Ut)|0,x=(x=x+Math.imul(ct,ee)|0)+Math.imul(Ot,Ut)|0,k=k+Math.imul(Ot,ee)|0,R=R+Math.imul(rt,Wt)|0,x=(x=x+Math.imul(rt,ae)|0)+Math.imul(ut,Wt)|0,k=k+Math.imul(ut,ae)|0,R=R+Math.imul(X,$t)|0,x=(x=x+Math.imul(X,fe)|0)+Math.imul(G,$t)|0,k=k+Math.imul(G,fe)|0,R=R+Math.imul(N,it)|0,x=(x=x+Math.imul(N,wt)|0)+Math.imul(z,it)|0,k=k+Math.imul(z,wt)|0,R=R+Math.imul($,Mt)|0,x=(x=x+Math.imul($,It)|0)+Math.imul(F,Mt)|0,k=k+Math.imul(F,It)|0;var st=(B+(R=R+Math.imul(H,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(H,Jt)|0)+Math.imul(V,Pt)|0))<<13)|0;B=((k=k+Math.imul(V,Jt)|0)+(x>>>13)|0)+(st>>>26)|0,st&=67108863,R=Math.imul(et,_t),x=(x=Math.imul(et,Ft))+Math.imul(tt,_t)|0,k=Math.imul(tt,Ft),R=R+Math.imul(Z,zt)|0,x=(x=x+Math.imul(Z,Qt)|0)+Math.imul(nt,zt)|0,k=k+Math.imul(nt,Qt)|0,R=R+Math.imul(ht,Bt)|0,x=(x=x+Math.imul(ht,Vt)|0)+Math.imul(K,Bt)|0,k=k+Math.imul(K,Vt)|0,R=R+Math.imul(gt,Ut)|0,x=(x=x+Math.imul(gt,ee)|0)+Math.imul(St,Ut)|0,k=k+Math.imul(St,ee)|0,R=R+Math.imul(ct,Wt)|0,x=(x=x+Math.imul(ct,ae)|0)+Math.imul(Ot,Wt)|0,k=k+Math.imul(Ot,ae)|0,R=R+Math.imul(rt,$t)|0,x=(x=x+Math.imul(rt,fe)|0)+Math.imul(ut,$t)|0,k=k+Math.imul(ut,fe)|0,R=R+Math.imul(X,it)|0,x=(x=x+Math.imul(X,wt)|0)+Math.imul(G,it)|0,k=k+Math.imul(G,wt)|0,R=R+Math.imul(N,Mt)|0,x=(x=x+Math.imul(N,It)|0)+Math.imul(z,Mt)|0,k=k+Math.imul(z,It)|0;var vt=(B+(R=R+Math.imul($,Pt)|0)|0)+((8191&(x=(x=x+Math.imul($,Jt)|0)+Math.imul(F,Pt)|0))<<13)|0;B=((k=k+Math.imul(F,Jt)|0)+(x>>>13)|0)+(vt>>>26)|0,vt&=67108863,R=Math.imul(et,zt),x=(x=Math.imul(et,Qt))+Math.imul(tt,zt)|0,k=Math.imul(tt,Qt),R=R+Math.imul(Z,Bt)|0,x=(x=x+Math.imul(Z,Vt)|0)+Math.imul(nt,Bt)|0,k=k+Math.imul(nt,Vt)|0,R=R+Math.imul(ht,Ut)|0,x=(x=x+Math.imul(ht,ee)|0)+Math.imul(K,Ut)|0,k=k+Math.imul(K,ee)|0,R=R+Math.imul(gt,Wt)|0,x=(x=x+Math.imul(gt,ae)|0)+Math.imul(St,Wt)|0,k=k+Math.imul(St,ae)|0,R=R+Math.imul(ct,$t)|0,x=(x=x+Math.imul(ct,fe)|0)+Math.imul(Ot,$t)|0,k=k+Math.imul(Ot,fe)|0,R=R+Math.imul(rt,it)|0,x=(x=x+Math.imul(rt,wt)|0)+Math.imul(ut,it)|0,k=k+Math.imul(ut,wt)|0,R=R+Math.imul(X,Mt)|0,x=(x=x+Math.imul(X,It)|0)+Math.imul(G,Mt)|0,k=k+Math.imul(G,It)|0;var xt=(B+(R=R+Math.imul(N,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(N,Jt)|0)+Math.imul(z,Pt)|0))<<13)|0;B=((k=k+Math.imul(z,Jt)|0)+(x>>>13)|0)+(xt>>>26)|0,xt&=67108863,R=Math.imul(et,Bt),x=(x=Math.imul(et,Vt))+Math.imul(tt,Bt)|0,k=Math.imul(tt,Vt),R=R+Math.imul(Z,Ut)|0,x=(x=x+Math.imul(Z,ee)|0)+Math.imul(nt,Ut)|0,k=k+Math.imul(nt,ee)|0,R=R+Math.imul(ht,Wt)|0,x=(x=x+Math.imul(ht,ae)|0)+Math.imul(K,Wt)|0,k=k+Math.imul(K,ae)|0,R=R+Math.imul(gt,$t)|0,x=(x=x+Math.imul(gt,fe)|0)+Math.imul(St,$t)|0,k=k+Math.imul(St,fe)|0,R=R+Math.imul(ct,it)|0,x=(x=x+Math.imul(ct,wt)|0)+Math.imul(Ot,it)|0,k=k+Math.imul(Ot,wt)|0,R=R+Math.imul(rt,Mt)|0,x=(x=x+Math.imul(rt,It)|0)+Math.imul(ut,Mt)|0,k=k+Math.imul(ut,It)|0;var At=(B+(R=R+Math.imul(X,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(X,Jt)|0)+Math.imul(G,Pt)|0))<<13)|0;B=((k=k+Math.imul(G,Jt)|0)+(x>>>13)|0)+(At>>>26)|0,At&=67108863,R=Math.imul(et,Ut),x=(x=Math.imul(et,ee))+Math.imul(tt,Ut)|0,k=Math.imul(tt,ee),R=R+Math.imul(Z,Wt)|0,x=(x=x+Math.imul(Z,ae)|0)+Math.imul(nt,Wt)|0,k=k+Math.imul(nt,ae)|0,R=R+Math.imul(ht,$t)|0,x=(x=x+Math.imul(ht,fe)|0)+Math.imul(K,$t)|0,k=k+Math.imul(K,fe)|0,R=R+Math.imul(gt,it)|0,x=(x=x+Math.imul(gt,wt)|0)+Math.imul(St,it)|0,k=k+Math.imul(St,wt)|0,R=R+Math.imul(ct,Mt)|0,x=(x=x+Math.imul(ct,It)|0)+Math.imul(Ot,Mt)|0,k=k+Math.imul(Ot,It)|0;var jt=(B+(R=R+Math.imul(rt,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(rt,Jt)|0)+Math.imul(ut,Pt)|0))<<13)|0;B=((k=k+Math.imul(ut,Jt)|0)+(x>>>13)|0)+(jt>>>26)|0,jt&=67108863,R=Math.imul(et,Wt),x=(x=Math.imul(et,ae))+Math.imul(tt,Wt)|0,k=Math.imul(tt,ae),R=R+Math.imul(Z,$t)|0,x=(x=x+Math.imul(Z,fe)|0)+Math.imul(nt,$t)|0,k=k+Math.imul(nt,fe)|0,R=R+Math.imul(ht,it)|0,x=(x=x+Math.imul(ht,wt)|0)+Math.imul(K,it)|0,k=k+Math.imul(K,wt)|0,R=R+Math.imul(gt,Mt)|0,x=(x=x+Math.imul(gt,It)|0)+Math.imul(St,Mt)|0,k=k+Math.imul(St,It)|0;var Et=(B+(R=R+Math.imul(ct,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(ct,Jt)|0)+Math.imul(Ot,Pt)|0))<<13)|0;B=((k=k+Math.imul(Ot,Jt)|0)+(x>>>13)|0)+(Et>>>26)|0,Et&=67108863,R=Math.imul(et,$t),x=(x=Math.imul(et,fe))+Math.imul(tt,$t)|0,k=Math.imul(tt,fe),R=R+Math.imul(Z,it)|0,x=(x=x+Math.imul(Z,wt)|0)+Math.imul(nt,it)|0,k=k+Math.imul(nt,wt)|0,R=R+Math.imul(ht,Mt)|0,x=(x=x+Math.imul(ht,It)|0)+Math.imul(K,Mt)|0,k=k+Math.imul(K,It)|0;var Yt=(B+(R=R+Math.imul(gt,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(gt,Jt)|0)+Math.imul(St,Pt)|0))<<13)|0;B=((k=k+Math.imul(St,Jt)|0)+(x>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,R=Math.imul(et,it),x=(x=Math.imul(et,wt))+Math.imul(tt,it)|0,k=Math.imul(tt,wt),R=R+Math.imul(Z,Mt)|0,x=(x=x+Math.imul(Z,It)|0)+Math.imul(nt,Mt)|0,k=k+Math.imul(nt,It)|0;var Kt=(B+(R=R+Math.imul(ht,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(ht,Jt)|0)+Math.imul(K,Pt)|0))<<13)|0;B=((k=k+Math.imul(K,Jt)|0)+(x>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,R=Math.imul(et,Mt),x=(x=Math.imul(et,It))+Math.imul(tt,Mt)|0,k=Math.imul(tt,It);var Gt=(B+(R=R+Math.imul(Z,Pt)|0)|0)+((8191&(x=(x=x+Math.imul(Z,Jt)|0)+Math.imul(nt,Pt)|0))<<13)|0;B=((k=k+Math.imul(nt,Jt)|0)+(x>>>13)|0)+(Gt>>>26)|0,Gt&=67108863;var Lt=(B+(R=Math.imul(et,Pt))|0)+((8191&(x=(x=Math.imul(et,Jt))+Math.imul(tt,Pt)|0))<<13)|0;return B=((k=Math.imul(tt,Jt))+(x>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,L[0]=Xt,L[1]=qt,L[2]=be,L[3]=ve,L[4]=le,L[5]=_e,L[6]=xe,L[7]=Ee,L[8]=Y,L[9]=st,L[10]=vt,L[11]=xt,L[12]=At,L[13]=jt,L[14]=Et,L[15]=Yt,L[16]=Kt,L[17]=Gt,L[18]=Lt,B!==0&&(L[19]=B,g.length++),g};function a(_,S,g){return new u().mulp(_,S,g)}function u(_,S){this.x=_,this.y=S}Math.imul||(o=i),c.prototype.mulTo=function(_,S){var g=this.length+_.length;return this.length===10&&_.length===10?o(this,_,S):g<63?i(this,_,S):g<1024?function(R,x,k){k.negative=x.negative^R.negative,k.length=R.length+x.length;for(var M=0,D=0,L=0;L>>26)|0)>>>26,B&=67108863}k.words[L]=U,M=B,B=D}return M!==0?k.words[L]=M:k.length--,k.strip()}(this,_,S):a(this,_,S)},u.prototype.makeRBT=function(_){for(var S=new Array(_),g=c.prototype._countBits(_)-1,R=0;R<_;R++)S[R]=this.revBin(R,g,_);return S},u.prototype.revBin=function(_,S,g){if(_===0||_===g-1)return _;for(var R=0,x=0;x>=1;return R},u.prototype.permute=function(_,S,g,R,x,k){for(var M=0;M>>=1)x++;return 1<>>=13,g[2*k+1]=8191&x,x>>>=13;for(k=2*S;k>=26,S+=R/67108864|0,S+=x>>>26,this.words[g]=67108863&x}return S!==0&&(this.words[g]=S,this.length++),this},c.prototype.muln=function(_){return this.clone().imuln(_)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(_){var S=function(k){for(var M=new Array(k.bitLength()),D=0;D>>B}return M}(_);if(S.length===0)return new c(1);for(var g=this,R=0;R=0);var S,g=_%26,R=(_-g)/26,x=67108863>>>26-g<<26-g;if(g!==0){var k=0;for(S=0;S>>26-g}k&&(this.words[S]=k,this.length++)}if(R!==0){for(S=this.length-1;S>=0;S--)this.words[S+R]=this.words[S];for(S=0;S=0),R=S?(S-S%26)/26:0;var x=_%26,k=Math.min((_-x)/26,this.length),M=67108863^67108863>>>x<k)for(this.length-=k,L=0;L=0&&(B!==0||L>=R);L--){var U=0|this.words[L];this.words[L]=B<<26-x|U>>>x,B=U&M}return D&&B!==0&&(D.words[D.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(_,S,g){return d(this.negative===0),this.iushrn(_,S,g)},c.prototype.shln=function(_){return this.clone().ishln(_)},c.prototype.ushln=function(_){return this.clone().iushln(_)},c.prototype.shrn=function(_){return this.clone().ishrn(_)},c.prototype.ushrn=function(_){return this.clone().iushrn(_)},c.prototype.testn=function(_){d(typeof _=="number"&&_>=0);var S=_%26,g=(_-S)/26,R=1<=0);var S=_%26,g=(_-S)/26;if(d(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(S!==0&&g++,this.length=Math.min(g,this.length),S!==0){var R=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},c.prototype.isubn=function(_){if(d(typeof _=="number"),d(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[R+g]=67108863&x}for(;R>26,this.words[R+g]=67108863&x;if(M===0)return this.strip();for(d(M===-1),M=0,R=0;R>26,this.words[R]=67108863&x;return this.negative=1,this.strip()},c.prototype._wordDiv=function(_,S){var g=(this.length,_.length),R=this.clone(),x=_,k=0|x.words[x.length-1];(g=26-this._countBits(k))!==0&&(x=x.ushln(g),R.iushln(g),k=0|x.words[x.length-1]);var M,D=R.length-x.length;if(S!=="mod"){(M=new c(null)).length=D+1,M.words=new Array(M.length);for(var L=0;L=0;U--){var H=67108864*(0|R.words[x.length+U])+(0|R.words[x.length+U-1]);for(H=Math.min(H/k|0,67108863),R._ishlnsubmul(x,H,U);R.negative!==0;)H--,R.negative=0,R._ishlnsubmul(x,1,U),R.isZero()||(R.negative^=1);M&&(M.words[U]=H)}return M&&M.strip(),R.strip(),S!=="div"&&g!==0&&R.iushrn(g),{div:M||null,mod:R}},c.prototype.divmod=function(_,S,g){return d(!_.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:this.negative!==0&&_.negative===0?(k=this.neg().divmod(_,S),S!=="mod"&&(R=k.div.neg()),S!=="div"&&(x=k.mod.neg(),g&&x.negative!==0&&x.iadd(_)),{div:R,mod:x}):this.negative===0&&_.negative!==0?(k=this.divmod(_.neg(),S),S!=="mod"&&(R=k.div.neg()),{div:R,mod:k.mod}):this.negative&_.negative?(k=this.neg().divmod(_.neg(),S),S!=="div"&&(x=k.mod.neg(),g&&x.negative!==0&&x.isub(_)),{div:k.div,mod:x}):_.length>this.length||this.cmp(_)<0?{div:new c(0),mod:this}:_.length===1?S==="div"?{div:this.divn(_.words[0]),mod:null}:S==="mod"?{div:null,mod:new c(this.modn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new c(this.modn(_.words[0]))}:this._wordDiv(_,S);var R,x,k},c.prototype.div=function(_){return this.divmod(_,"div",!1).div},c.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},c.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},c.prototype.divRound=function(_){var S=this.divmod(_);if(S.mod.isZero())return S.div;var g=S.div.negative!==0?S.mod.isub(_):S.mod,R=_.ushrn(1),x=_.andln(1),k=g.cmp(R);return k<0||x===1&&k===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},c.prototype.modn=function(_){d(_<=67108863);for(var S=(1<<26)%_,g=0,R=this.length-1;R>=0;R--)g=(S*g+(0|this.words[R]))%_;return g},c.prototype.idivn=function(_){d(_<=67108863);for(var S=0,g=this.length-1;g>=0;g--){var R=(0|this.words[g])+67108864*S;this.words[g]=R/_|0,S=R%_}return this.strip()},c.prototype.divn=function(_){return this.clone().idivn(_)},c.prototype.egcd=function(_){d(_.negative===0),d(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var R=new c(1),x=new c(0),k=new c(0),M=new c(1),D=0;S.isEven()&&g.isEven();)S.iushrn(1),g.iushrn(1),++D;for(var L=g.clone(),B=S.clone();!S.isZero();){for(var U=0,H=1;!(S.words[0]&H)&&U<26;++U,H<<=1);if(U>0)for(S.iushrn(U);U-- >0;)(R.isOdd()||x.isOdd())&&(R.iadd(L),x.isub(B)),R.iushrn(1),x.iushrn(1);for(var V=0,q=1;!(g.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(g.iushrn(V);V-- >0;)(k.isOdd()||M.isOdd())&&(k.iadd(L),M.isub(B)),k.iushrn(1),M.iushrn(1);S.cmp(g)>=0?(S.isub(g),R.isub(k),x.isub(M)):(g.isub(S),k.isub(R),M.isub(x))}return{a:k,b:M,gcd:g.iushln(D)}},c.prototype._invmp=function(_){d(_.negative===0),d(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var R,x=new c(1),k=new c(0),M=g.clone();S.cmpn(1)>0&&g.cmpn(1)>0;){for(var D=0,L=1;!(S.words[0]&L)&&D<26;++D,L<<=1);if(D>0)for(S.iushrn(D);D-- >0;)x.isOdd()&&x.iadd(M),x.iushrn(1);for(var B=0,U=1;!(g.words[0]&U)&&B<26;++B,U<<=1);if(B>0)for(g.iushrn(B);B-- >0;)k.isOdd()&&k.iadd(M),k.iushrn(1);S.cmp(g)>=0?(S.isub(g),x.isub(k)):(g.isub(S),k.isub(x))}return(R=S.cmpn(1)===0?x:k).cmpn(0)<0&&R.iadd(_),R},c.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var S=this.clone(),g=_.clone();S.negative=0,g.negative=0;for(var R=0;S.isEven()&&g.isEven();R++)S.iushrn(1),g.iushrn(1);for(;;){for(;S.isEven();)S.iushrn(1);for(;g.isEven();)g.iushrn(1);var x=S.cmp(g);if(x<0){var k=S;S=g,g=k}else if(x===0||g.cmpn(1)===0)break;S.isub(g)}return g.iushln(R)},c.prototype.invm=function(_){return this.egcd(_).a.umod(_)},c.prototype.isEven=function(){return(1&this.words[0])==0},c.prototype.isOdd=function(){return(1&this.words[0])==1},c.prototype.andln=function(_){return this.words[0]&_},c.prototype.bincn=function(_){d(typeof _=="number");var S=_%26,g=(_-S)/26,R=1<>>26,M&=67108863,this.words[k]=M}return x!==0&&(this.words[k]=x,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(_){var S,g=_<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;if(this.strip(),this.length>1)S=1;else{g&&(_=-_),d(_<=67108863,"Number is too big");var R=0|this.words[0];S=R===_?0:R<_?-1:1}return this.negative!==0?0|-S:S},c.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var S=this.ucmp(_);return this.negative!==0?0|-S:S},c.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var S=0,g=this.length-1;g>=0;g--){var R=0|this.words[g],x=0|_.words[g];if(R!==x){Rx&&(S=1);break}}return S},c.prototype.gtn=function(_){return this.cmpn(_)===1},c.prototype.gt=function(_){return this.cmp(_)===1},c.prototype.gten=function(_){return this.cmpn(_)>=0},c.prototype.gte=function(_){return this.cmp(_)>=0},c.prototype.ltn=function(_){return this.cmpn(_)===-1},c.prototype.lt=function(_){return this.cmp(_)===-1},c.prototype.lten=function(_){return this.cmpn(_)<=0},c.prototype.lte=function(_){return this.cmp(_)<=0},c.prototype.eqn=function(_){return this.cmpn(_)===0},c.prototype.eq=function(_){return this.cmp(_)===0},c.red=function(_){return new O(_)},c.prototype.toRed=function(_){return d(!this.red,"Already a number in reduction context"),d(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},c.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(_){return this.red=_,this},c.prototype.forceRed=function(_){return d(!this.red,"Already a number in reduction context"),this._forceRed(_)},c.prototype.redAdd=function(_){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},c.prototype.redIAdd=function(_){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},c.prototype.redSub=function(_){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},c.prototype.redISub=function(_){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},c.prototype.redShl=function(_){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},c.prototype.redMul=function(_){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},c.prototype.redIMul=function(_){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},c.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(_){return d(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var l={k256:null,p224:null,p192:null,p25519:null};function b(_,S){this.name=_,this.p=new c(S,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function j(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(_){if(typeof _=="string"){var S=c._prime(_);this.m=S.p,this.prime=S}else d(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}function C(_){O.call(this,_),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var _=new c(null);return _.words=new Array(Math.ceil(this.n/13)),_},b.prototype.ireduce=function(_){var S,g=_;do this.split(g,this.tmp),S=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength();while(S>this.n);var R=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},b.prototype.split=function(_,S){_.iushrn(this.n,0,S)},b.prototype.imulK=function(_){return _.imul(this.k)},m(w,b),w.prototype.split=function(_,S){for(var g=Math.min(_.length,9),R=0;R>>22,x=k}x>>>=22,_.words[R-10]=x,x===0&&_.length>10?_.length-=10:_.length-=9},w.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var S=0,g=0;g<_.length;g++){var R=0|_.words[g];S+=977*R,_.words[g]=67108863&S,S=64*R+(S/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_},m(T,b),m(j,b),m(P,b),P.prototype.imulK=function(_){for(var S=0,g=0;g<_.length;g++){var R=19*(0|_.words[g])+S,x=67108863&R;R>>>=26,_.words[g]=x,S=R}return S!==0&&(_.words[_.length++]=S),_},c._prime=function(_){if(l[_])return l[_];var S;if(_==="k256")S=new w;else if(_==="p224")S=new T;else if(_==="p192")S=new j;else{if(_!=="p25519")throw new Error("Unknown prime "+_);S=new P}return l[_]=S,S},O.prototype._verify1=function(_){d(_.negative===0,"red works only with positives"),d(_.red,"red works only with red numbers")},O.prototype._verify2=function(_,S){d((_.negative|S.negative)==0,"red works only with positives"),d(_.red&&_.red===S.red,"red works only with red numbers")},O.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):_.umod(this.m)._forceRed(this)},O.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},O.prototype.add=function(_,S){this._verify2(_,S);var g=_.add(S);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},O.prototype.iadd=function(_,S){this._verify2(_,S);var g=_.iadd(S);return g.cmp(this.m)>=0&&g.isub(this.m),g},O.prototype.sub=function(_,S){this._verify2(_,S);var g=_.sub(S);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},O.prototype.isub=function(_,S){this._verify2(_,S);var g=_.isub(S);return g.cmpn(0)<0&&g.iadd(this.m),g},O.prototype.shl=function(_,S){return this._verify1(_),this.imod(_.ushln(S))},O.prototype.imul=function(_,S){return this._verify2(_,S),this.imod(_.imul(S))},O.prototype.mul=function(_,S){return this._verify2(_,S),this.imod(_.mul(S))},O.prototype.isqr=function(_){return this.imul(_,_.clone())},O.prototype.sqr=function(_){return this.mul(_,_)},O.prototype.sqrt=function(_){if(_.isZero())return _.clone();var S=this.m.andln(3);if(d(S%2==1),S===3){var g=this.m.add(new c(1)).iushrn(2);return this.pow(_,g)}for(var R=this.m.subn(1),x=0;!R.isZero()&&R.andln(1)===0;)x++,R.iushrn(1);d(!R.isZero());var k=new c(1).toRed(this),M=k.redNeg(),D=this.m.subn(1).iushrn(1),L=this.m.bitLength();for(L=new c(2*L*L).toRed(this);this.pow(L,D).cmp(M)!==0;)L.redIAdd(M);for(var B=this.pow(L,R),U=this.pow(_,R.addn(1).iushrn(1)),H=this.pow(_,R),V=x;H.cmp(k)!==0;){for(var q=H,$=0;q.cmp(k)!==0;$++)q=q.redSqr();d($=0;R--){for(var L=S.words[R],B=D-1;B>=0;B--){var U=L>>B&1;x!==g[0]&&(x=this.sqr(x)),U!==0||k!==0?(k<<=1,k|=U,(++M===4||R===0&&B===0)&&(x=this.mul(x,g[k]),M=0,k=0)):M=0}D=26}return x},O.prototype.convertTo=function(_){var S=_.umod(this.m);return S===_?S.clone():S},O.prototype.convertFrom=function(_){var S=_.clone();return S.red=null,S},c.mont=function(_){return new C(_)},m(C,O),C.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},C.prototype.convertFrom=function(_){var S=this.imod(_.mul(this.rinv));return S.red=null,S},C.prototype.imul=function(_,S){if(_.isZero()||S.isZero())return _.words[0]=0,_.length=1,_;var g=_.imul(S),R=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=g.isub(R).iushrn(this.shift),k=x;return x.cmp(this.m)>=0?k=x.isub(this.m):x.cmpn(0)<0&&(k=x.iadd(this.m)),k._forceRed(this)},C.prototype.mul=function(_,S){if(_.isZero()||S.isZero())return new c(0)._forceRed(this);var g=_.mul(S),R=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=g.isub(R).iushrn(this.shift),k=x;return x.cmp(this.m)>=0?k=x.isub(this.m):x.cmpn(0)<0&&(k=x.iadd(this.m)),k._forceRed(this)},C.prototype.invm=function(_){return this.imod(_._invmp(this.m).mul(this.r2))._forceRed(this)}})(A===void 0||A)},{buffer:185}],182:[function(h,A,E){E.byteLength=function(n){var t=f(n),e=t[0],r=t[1];return 3*(e+r)/4-r},E.toByteArray=function(n){var t,e,r=f(n),i=r[0],o=r[1],a=new v(function(b,w,T){return 3*(w+T)/4-T}(0,i,o)),u=0,l=o>0?i-4:i;for(e=0;e>16&255,a[u++]=t>>8&255,a[u++]=255&t;return o===2&&(t=p[n.charCodeAt(e)]<<2|p[n.charCodeAt(e+1)]>>4,a[u++]=255&t),o===1&&(t=p[n.charCodeAt(e)]<<10|p[n.charCodeAt(e+1)]<<4|p[n.charCodeAt(e+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t),a},E.fromByteArray=function(n){for(var t,e=n.length,r=e%3,i=[],o=0,a=e-r;oa?a:o+16383));return r===1?(t=n[e-1],i.push(y[t>>2]+y[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(y[t>>10]+y[t>>4&63]+y[t<<2&63]+"=")),i.join("")};for(var y=[],p=[],v=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,c=d.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");return e===-1&&(e=t),[e,e===t?0:4-e%4]}function s(n,t,e){for(var r,i,o=[],a=t;a>18&63]+y[i>>12&63]+y[i>>6&63]+y[63&i]);return o.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},{}],183:[function(h,A,E){function y(p){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(p)}(function(p,v){function d(g,R){if(!g)throw new Error(R||"Assertion failed")}function m(g,R){g.super_=R;var x=function(){};x.prototype=R.prototype,g.prototype=new x,g.prototype.constructor=g}function c(g,R,x){if(c.isBN(g))return g;this.negative=0,this.words=null,this.length=0,this.red=null,g!==null&&(R!=="le"&&R!=="be"||(x=R,R=10),this._init(g||0,R||10,x||"be"))}var f;y(p)==="object"?p.exports=c:(void 0).BN=c,c.BN=c,c.wordSize=26;try{f=h("buffer").Buffer}catch(g){}function s(g,R,x){for(var k=0,M=Math.min(g.length,x),D=0,L=R;L=49&&U<=54?U-49+10:U>=17&&U<=22?U-17+10:U,D|=B}return d(!(240&D),"Invalid character in "+g),k}function n(g,R,x,k){for(var M=0,D=0,L=Math.min(g.length,x),B=R;B=49?U-49+10:U>=17?U-17+10:U,d(U>=0&&D0?g:R},c.min=function(g,R){return g.cmp(R)<0?g:R},c.prototype._init=function(g,R,x){if(typeof g=="number")return this._initNumber(g,R,x);if(y(g)==="object")return this._initArray(g,R,x);R==="hex"&&(R=16),d(R===(0|R)&&R>=2&&R<=36);var k=0;(g=g.toString().replace(/\s+/g,""))[0]==="-"&&k++,R===16?this._parseHex(g,k):this._parseBase(g,R,k),g[0]==="-"&&(this.negative=1),this._strip(),x==="le"&&this._initArray(this.toArray(),R,x)},c.prototype._initNumber=function(g,R,x){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[67108863&g],this.length=1):g<4503599627370496?(this.words=[67108863&g,g/67108864&67108863],this.length=2):(d(g<9007199254740992),this.words=[67108863&g,g/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),R,x)},c.prototype._initArray=function(g,R,x){if(d(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var k=0;k=0;k-=3)D=g[k]|g[k-1]<<8|g[k-2]<<16,this.words[M]|=D<>>26-L&67108863,(L+=24)>=26&&(L-=26,M++);else if(x==="le")for(k=0,M=0;k>>26-L&67108863,(L+=24)>=26&&(L-=26,M++);return this._strip()},c.prototype._parseHex=function(g,R){this.length=Math.ceil((g.length-R)/6),this.words=new Array(this.length);for(var x=0;x=R;x-=6)M=s(g,x,x+6),this.words[k]|=M<>>26-D&4194303,(D+=24)>=26&&(D-=26,k++);x+6!==R&&(M=s(g,R,x+6),this.words[k]|=M<>>26-D&4194303),this._strip()},c.prototype._parseBase=function(g,R,x){this.words=[0],this.length=1;for(var k=0,M=1;M<=67108863;M*=R)k++;k--,M=M/R|0;for(var D=g.length-x,L=D%k,B=Math.min(D,D-L)+x,U=0,H=x;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=e}catch(g){c.prototype.inspect=e}else c.prototype.inspect=e;function e(){return(this.red?""}var r=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],i=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],o=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(g,R){var x;if(R=0|R||1,(g=g||10)===16||g==="hex"){x="";for(var k=0,M=0,D=0;D>>24-k&16777215)!==0||D!==this.length-1?r[6-B.length]+B+x:B+x,(k+=2)>=26&&(k-=26,D--)}for(M!==0&&(x=M.toString(16)+x);x.length%R!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(g===(0|g)&&g>=2&&g<=36){var U=i[g],H=o[g];x="";var V=this.clone();for(V.negative=0;!V.isZero();){var q=V.modrn(H).toString(g);x=(V=V.idivn(H)).isZero()?q+x:r[U-q.length]+q+x}for(this.isZero()&&(x="0"+x);x.length%R!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}d(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=67108864*this.words[1]:this.length===3&&this.words[2]===1?g+=4503599627370496+67108864*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},c.prototype.toJSON=function(){return this.toString(16,2)},f&&(c.prototype.toBuffer=function(g,R){return this.toArrayLike(f,g,R)}),c.prototype.toArray=function(g,R){return this.toArrayLike(Array,g,R)};function a(g,R,x){x.negative=R.negative^g.negative;var k=g.length+R.length|0;x.length=k,k=k-1|0;var M=0|g.words[0],D=0|R.words[0],L=M*D,B=67108863&L,U=L/67108864|0;x.words[0]=B;for(var H=1;H>>26,q=67108863&U,$=Math.min(H,R.length-1),F=Math.max(0,H-g.length+1);F<=$;F++){var I=H-F|0;V+=(L=(M=0|g.words[I])*(D=0|R.words[F])+q)/67108864|0,q=67108863&L}x.words[H]=0|q,U=0|V}return U!==0?x.words[H]=0|U:x.length--,x._strip()}c.prototype.toArrayLike=function(g,R,x){this._strip();var k=this.byteLength(),M=x||Math.max(1,k);d(k<=M,"byte array longer than desired length"),d(M>0,"Requested array length <= 0");var D=function(L,B){return L.allocUnsafe?L.allocUnsafe(B):new L(B)}(g,M);return this["_toArrayLike"+(R==="le"?"LE":"BE")](D,k),D},c.prototype._toArrayLikeLE=function(g,R){for(var x=0,k=0,M=0,D=0;M>8&255),x>16&255),D===6?(x>24&255),k=0,D=0):(k=L>>>24,D+=2)}if(x=0&&(g[x--]=L>>8&255),x>=0&&(g[x--]=L>>16&255),D===6?(x>=0&&(g[x--]=L>>24&255),k=0,D=0):(k=L>>>24,D+=2)}if(x>=0)for(g[x--]=k;x>=0;)g[x--]=0},Math.clz32?c.prototype._countBits=function(g){return 32-Math.clz32(g)}:c.prototype._countBits=function(g){var R=g,x=0;return R>=4096&&(x+=13,R>>>=13),R>=64&&(x+=7,R>>>=7),R>=8&&(x+=4,R>>>=4),R>=2&&(x+=2,R>>>=2),x+R},c.prototype._zeroBits=function(g){if(g===0)return 26;var R=g,x=0;return!(8191&R)&&(x+=13,R>>>=13),!(127&R)&&(x+=7,R>>>=7),!(15&R)&&(x+=4,R>>>=4),!(3&R)&&(x+=2,R>>>=2),!(1&R)&&x++,x},c.prototype.bitLength=function(){var g=this.words[this.length-1],R=this._countBits(g);return 26*(this.length-1)+R},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,R=0;Rg.length?this.clone().ior(g):g.clone().ior(this)},c.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},c.prototype.iuand=function(g){var R;R=this.length>g.length?g:this;for(var x=0;xg.length?this.clone().iand(g):g.clone().iand(this)},c.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},c.prototype.iuxor=function(g){var R,x;this.length>g.length?(R=this,x=g):(R=g,x=this);for(var k=0;kg.length?this.clone().ixor(g):g.clone().ixor(this)},c.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},c.prototype.inotn=function(g){d(typeof g=="number"&&g>=0);var R=0|Math.ceil(g/26),x=g%26;this._expand(R),x>0&&R--;for(var k=0;k0&&(this.words[k]=~this.words[k]&67108863>>26-x),this._strip()},c.prototype.notn=function(g){return this.clone().inotn(g)},c.prototype.setn=function(g,R){d(typeof g=="number"&&g>=0);var x=g/26|0,k=g%26;return this._expand(x+1),this.words[x]=R?this.words[x]|1<g.length?(x=this,k=g):(x=g,k=this);for(var M=0,D=0;D>>26;for(;M!==0&&D>>26;if(this.length=x.length,M!==0)this.words[this.length]=M,this.length++;else if(x!==this)for(;Dg.length?this.clone().iadd(g):g.clone().iadd(this)},c.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var R=this.iadd(g);return g.negative=1,R._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var x,k,M=this.cmp(g);if(M===0)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(x=this,k=g):(x=g,k=this);for(var D=0,L=0;L>26,this.words[L]=67108863&R;for(;D!==0&&L>26,this.words[L]=67108863&R;if(D===0&&L>>13,F=0|L[1],I=8191&F,N=F>>>13,z=0|L[2],W=8191&z,X=z>>>13,G=0|L[3],at=8191&G,rt=G>>>13,ut=0|L[4],pt=8191&ut,ct=ut>>>13,Ot=0|L[5],kt=8191&Ot,gt=Ot>>>13,St=0|L[6],Ct=8191&St,ht=St>>>13,K=0|L[7],ot=8191&K,Z=K>>>13,nt=0|L[8],J=8191&nt,et=nt>>>13,tt=0|L[9],ft=8191&tt,lt=tt>>>13,yt=0|B[0],Rt=8191&yt,_t=yt>>>13,Ft=0|B[1],Nt=8191&Ft,zt=Ft>>>13,Qt=0|B[2],se=8191&Qt,Bt=Qt>>>13,Vt=0|B[3],bt=8191&Vt,Ut=Vt>>>13,ee=0|B[4],te=8191&ee,Wt=ee>>>13,ae=0|B[5],ie=8191&ae,$t=ae>>>13,fe=0|B[6],Q=8191&fe,it=fe>>>13,wt=0|B[7],Tt=8191&wt,Mt=wt>>>13,It=0|B[8],Ht=8191&It,Pt=It>>>13,Jt=0|B[9],Xt=8191&Jt,qt=Jt>>>13;x.negative=g.negative^R.negative,x.length=19;var be=(H+(k=Math.imul(q,Rt))|0)+((8191&(M=(M=Math.imul(q,_t))+Math.imul($,Rt)|0))<<13)|0;H=((D=Math.imul($,_t))+(M>>>13)|0)+(be>>>26)|0,be&=67108863,k=Math.imul(I,Rt),M=(M=Math.imul(I,_t))+Math.imul(N,Rt)|0,D=Math.imul(N,_t);var ve=(H+(k=k+Math.imul(q,Nt)|0)|0)+((8191&(M=(M=M+Math.imul(q,zt)|0)+Math.imul($,Nt)|0))<<13)|0;H=((D=D+Math.imul($,zt)|0)+(M>>>13)|0)+(ve>>>26)|0,ve&=67108863,k=Math.imul(W,Rt),M=(M=Math.imul(W,_t))+Math.imul(X,Rt)|0,D=Math.imul(X,_t),k=k+Math.imul(I,Nt)|0,M=(M=M+Math.imul(I,zt)|0)+Math.imul(N,Nt)|0,D=D+Math.imul(N,zt)|0;var le=(H+(k=k+Math.imul(q,se)|0)|0)+((8191&(M=(M=M+Math.imul(q,Bt)|0)+Math.imul($,se)|0))<<13)|0;H=((D=D+Math.imul($,Bt)|0)+(M>>>13)|0)+(le>>>26)|0,le&=67108863,k=Math.imul(at,Rt),M=(M=Math.imul(at,_t))+Math.imul(rt,Rt)|0,D=Math.imul(rt,_t),k=k+Math.imul(W,Nt)|0,M=(M=M+Math.imul(W,zt)|0)+Math.imul(X,Nt)|0,D=D+Math.imul(X,zt)|0,k=k+Math.imul(I,se)|0,M=(M=M+Math.imul(I,Bt)|0)+Math.imul(N,se)|0,D=D+Math.imul(N,Bt)|0;var _e=(H+(k=k+Math.imul(q,bt)|0)|0)+((8191&(M=(M=M+Math.imul(q,Ut)|0)+Math.imul($,bt)|0))<<13)|0;H=((D=D+Math.imul($,Ut)|0)+(M>>>13)|0)+(_e>>>26)|0,_e&=67108863,k=Math.imul(pt,Rt),M=(M=Math.imul(pt,_t))+Math.imul(ct,Rt)|0,D=Math.imul(ct,_t),k=k+Math.imul(at,Nt)|0,M=(M=M+Math.imul(at,zt)|0)+Math.imul(rt,Nt)|0,D=D+Math.imul(rt,zt)|0,k=k+Math.imul(W,se)|0,M=(M=M+Math.imul(W,Bt)|0)+Math.imul(X,se)|0,D=D+Math.imul(X,Bt)|0,k=k+Math.imul(I,bt)|0,M=(M=M+Math.imul(I,Ut)|0)+Math.imul(N,bt)|0,D=D+Math.imul(N,Ut)|0;var xe=(H+(k=k+Math.imul(q,te)|0)|0)+((8191&(M=(M=M+Math.imul(q,Wt)|0)+Math.imul($,te)|0))<<13)|0;H=((D=D+Math.imul($,Wt)|0)+(M>>>13)|0)+(xe>>>26)|0,xe&=67108863,k=Math.imul(kt,Rt),M=(M=Math.imul(kt,_t))+Math.imul(gt,Rt)|0,D=Math.imul(gt,_t),k=k+Math.imul(pt,Nt)|0,M=(M=M+Math.imul(pt,zt)|0)+Math.imul(ct,Nt)|0,D=D+Math.imul(ct,zt)|0,k=k+Math.imul(at,se)|0,M=(M=M+Math.imul(at,Bt)|0)+Math.imul(rt,se)|0,D=D+Math.imul(rt,Bt)|0,k=k+Math.imul(W,bt)|0,M=(M=M+Math.imul(W,Ut)|0)+Math.imul(X,bt)|0,D=D+Math.imul(X,Ut)|0,k=k+Math.imul(I,te)|0,M=(M=M+Math.imul(I,Wt)|0)+Math.imul(N,te)|0,D=D+Math.imul(N,Wt)|0;var Ee=(H+(k=k+Math.imul(q,ie)|0)|0)+((8191&(M=(M=M+Math.imul(q,$t)|0)+Math.imul($,ie)|0))<<13)|0;H=((D=D+Math.imul($,$t)|0)+(M>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,k=Math.imul(Ct,Rt),M=(M=Math.imul(Ct,_t))+Math.imul(ht,Rt)|0,D=Math.imul(ht,_t),k=k+Math.imul(kt,Nt)|0,M=(M=M+Math.imul(kt,zt)|0)+Math.imul(gt,Nt)|0,D=D+Math.imul(gt,zt)|0,k=k+Math.imul(pt,se)|0,M=(M=M+Math.imul(pt,Bt)|0)+Math.imul(ct,se)|0,D=D+Math.imul(ct,Bt)|0,k=k+Math.imul(at,bt)|0,M=(M=M+Math.imul(at,Ut)|0)+Math.imul(rt,bt)|0,D=D+Math.imul(rt,Ut)|0,k=k+Math.imul(W,te)|0,M=(M=M+Math.imul(W,Wt)|0)+Math.imul(X,te)|0,D=D+Math.imul(X,Wt)|0,k=k+Math.imul(I,ie)|0,M=(M=M+Math.imul(I,$t)|0)+Math.imul(N,ie)|0,D=D+Math.imul(N,$t)|0;var Y=(H+(k=k+Math.imul(q,Q)|0)|0)+((8191&(M=(M=M+Math.imul(q,it)|0)+Math.imul($,Q)|0))<<13)|0;H=((D=D+Math.imul($,it)|0)+(M>>>13)|0)+(Y>>>26)|0,Y&=67108863,k=Math.imul(ot,Rt),M=(M=Math.imul(ot,_t))+Math.imul(Z,Rt)|0,D=Math.imul(Z,_t),k=k+Math.imul(Ct,Nt)|0,M=(M=M+Math.imul(Ct,zt)|0)+Math.imul(ht,Nt)|0,D=D+Math.imul(ht,zt)|0,k=k+Math.imul(kt,se)|0,M=(M=M+Math.imul(kt,Bt)|0)+Math.imul(gt,se)|0,D=D+Math.imul(gt,Bt)|0,k=k+Math.imul(pt,bt)|0,M=(M=M+Math.imul(pt,Ut)|0)+Math.imul(ct,bt)|0,D=D+Math.imul(ct,Ut)|0,k=k+Math.imul(at,te)|0,M=(M=M+Math.imul(at,Wt)|0)+Math.imul(rt,te)|0,D=D+Math.imul(rt,Wt)|0,k=k+Math.imul(W,ie)|0,M=(M=M+Math.imul(W,$t)|0)+Math.imul(X,ie)|0,D=D+Math.imul(X,$t)|0,k=k+Math.imul(I,Q)|0,M=(M=M+Math.imul(I,it)|0)+Math.imul(N,Q)|0,D=D+Math.imul(N,it)|0;var st=(H+(k=k+Math.imul(q,Tt)|0)|0)+((8191&(M=(M=M+Math.imul(q,Mt)|0)+Math.imul($,Tt)|0))<<13)|0;H=((D=D+Math.imul($,Mt)|0)+(M>>>13)|0)+(st>>>26)|0,st&=67108863,k=Math.imul(J,Rt),M=(M=Math.imul(J,_t))+Math.imul(et,Rt)|0,D=Math.imul(et,_t),k=k+Math.imul(ot,Nt)|0,M=(M=M+Math.imul(ot,zt)|0)+Math.imul(Z,Nt)|0,D=D+Math.imul(Z,zt)|0,k=k+Math.imul(Ct,se)|0,M=(M=M+Math.imul(Ct,Bt)|0)+Math.imul(ht,se)|0,D=D+Math.imul(ht,Bt)|0,k=k+Math.imul(kt,bt)|0,M=(M=M+Math.imul(kt,Ut)|0)+Math.imul(gt,bt)|0,D=D+Math.imul(gt,Ut)|0,k=k+Math.imul(pt,te)|0,M=(M=M+Math.imul(pt,Wt)|0)+Math.imul(ct,te)|0,D=D+Math.imul(ct,Wt)|0,k=k+Math.imul(at,ie)|0,M=(M=M+Math.imul(at,$t)|0)+Math.imul(rt,ie)|0,D=D+Math.imul(rt,$t)|0,k=k+Math.imul(W,Q)|0,M=(M=M+Math.imul(W,it)|0)+Math.imul(X,Q)|0,D=D+Math.imul(X,it)|0,k=k+Math.imul(I,Tt)|0,M=(M=M+Math.imul(I,Mt)|0)+Math.imul(N,Tt)|0,D=D+Math.imul(N,Mt)|0;var vt=(H+(k=k+Math.imul(q,Ht)|0)|0)+((8191&(M=(M=M+Math.imul(q,Pt)|0)+Math.imul($,Ht)|0))<<13)|0;H=((D=D+Math.imul($,Pt)|0)+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,k=Math.imul(ft,Rt),M=(M=Math.imul(ft,_t))+Math.imul(lt,Rt)|0,D=Math.imul(lt,_t),k=k+Math.imul(J,Nt)|0,M=(M=M+Math.imul(J,zt)|0)+Math.imul(et,Nt)|0,D=D+Math.imul(et,zt)|0,k=k+Math.imul(ot,se)|0,M=(M=M+Math.imul(ot,Bt)|0)+Math.imul(Z,se)|0,D=D+Math.imul(Z,Bt)|0,k=k+Math.imul(Ct,bt)|0,M=(M=M+Math.imul(Ct,Ut)|0)+Math.imul(ht,bt)|0,D=D+Math.imul(ht,Ut)|0,k=k+Math.imul(kt,te)|0,M=(M=M+Math.imul(kt,Wt)|0)+Math.imul(gt,te)|0,D=D+Math.imul(gt,Wt)|0,k=k+Math.imul(pt,ie)|0,M=(M=M+Math.imul(pt,$t)|0)+Math.imul(ct,ie)|0,D=D+Math.imul(ct,$t)|0,k=k+Math.imul(at,Q)|0,M=(M=M+Math.imul(at,it)|0)+Math.imul(rt,Q)|0,D=D+Math.imul(rt,it)|0,k=k+Math.imul(W,Tt)|0,M=(M=M+Math.imul(W,Mt)|0)+Math.imul(X,Tt)|0,D=D+Math.imul(X,Mt)|0,k=k+Math.imul(I,Ht)|0,M=(M=M+Math.imul(I,Pt)|0)+Math.imul(N,Ht)|0,D=D+Math.imul(N,Pt)|0;var xt=(H+(k=k+Math.imul(q,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(q,qt)|0)+Math.imul($,Xt)|0))<<13)|0;H=((D=D+Math.imul($,qt)|0)+(M>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ft,Nt),M=(M=Math.imul(ft,zt))+Math.imul(lt,Nt)|0,D=Math.imul(lt,zt),k=k+Math.imul(J,se)|0,M=(M=M+Math.imul(J,Bt)|0)+Math.imul(et,se)|0,D=D+Math.imul(et,Bt)|0,k=k+Math.imul(ot,bt)|0,M=(M=M+Math.imul(ot,Ut)|0)+Math.imul(Z,bt)|0,D=D+Math.imul(Z,Ut)|0,k=k+Math.imul(Ct,te)|0,M=(M=M+Math.imul(Ct,Wt)|0)+Math.imul(ht,te)|0,D=D+Math.imul(ht,Wt)|0,k=k+Math.imul(kt,ie)|0,M=(M=M+Math.imul(kt,$t)|0)+Math.imul(gt,ie)|0,D=D+Math.imul(gt,$t)|0,k=k+Math.imul(pt,Q)|0,M=(M=M+Math.imul(pt,it)|0)+Math.imul(ct,Q)|0,D=D+Math.imul(ct,it)|0,k=k+Math.imul(at,Tt)|0,M=(M=M+Math.imul(at,Mt)|0)+Math.imul(rt,Tt)|0,D=D+Math.imul(rt,Mt)|0,k=k+Math.imul(W,Ht)|0,M=(M=M+Math.imul(W,Pt)|0)+Math.imul(X,Ht)|0,D=D+Math.imul(X,Pt)|0;var At=(H+(k=k+Math.imul(I,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(I,qt)|0)+Math.imul(N,Xt)|0))<<13)|0;H=((D=D+Math.imul(N,qt)|0)+(M>>>13)|0)+(At>>>26)|0,At&=67108863,k=Math.imul(ft,se),M=(M=Math.imul(ft,Bt))+Math.imul(lt,se)|0,D=Math.imul(lt,Bt),k=k+Math.imul(J,bt)|0,M=(M=M+Math.imul(J,Ut)|0)+Math.imul(et,bt)|0,D=D+Math.imul(et,Ut)|0,k=k+Math.imul(ot,te)|0,M=(M=M+Math.imul(ot,Wt)|0)+Math.imul(Z,te)|0,D=D+Math.imul(Z,Wt)|0,k=k+Math.imul(Ct,ie)|0,M=(M=M+Math.imul(Ct,$t)|0)+Math.imul(ht,ie)|0,D=D+Math.imul(ht,$t)|0,k=k+Math.imul(kt,Q)|0,M=(M=M+Math.imul(kt,it)|0)+Math.imul(gt,Q)|0,D=D+Math.imul(gt,it)|0,k=k+Math.imul(pt,Tt)|0,M=(M=M+Math.imul(pt,Mt)|0)+Math.imul(ct,Tt)|0,D=D+Math.imul(ct,Mt)|0,k=k+Math.imul(at,Ht)|0,M=(M=M+Math.imul(at,Pt)|0)+Math.imul(rt,Ht)|0,D=D+Math.imul(rt,Pt)|0;var jt=(H+(k=k+Math.imul(W,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(W,qt)|0)+Math.imul(X,Xt)|0))<<13)|0;H=((D=D+Math.imul(X,qt)|0)+(M>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(ft,bt),M=(M=Math.imul(ft,Ut))+Math.imul(lt,bt)|0,D=Math.imul(lt,Ut),k=k+Math.imul(J,te)|0,M=(M=M+Math.imul(J,Wt)|0)+Math.imul(et,te)|0,D=D+Math.imul(et,Wt)|0,k=k+Math.imul(ot,ie)|0,M=(M=M+Math.imul(ot,$t)|0)+Math.imul(Z,ie)|0,D=D+Math.imul(Z,$t)|0,k=k+Math.imul(Ct,Q)|0,M=(M=M+Math.imul(Ct,it)|0)+Math.imul(ht,Q)|0,D=D+Math.imul(ht,it)|0,k=k+Math.imul(kt,Tt)|0,M=(M=M+Math.imul(kt,Mt)|0)+Math.imul(gt,Tt)|0,D=D+Math.imul(gt,Mt)|0,k=k+Math.imul(pt,Ht)|0,M=(M=M+Math.imul(pt,Pt)|0)+Math.imul(ct,Ht)|0,D=D+Math.imul(ct,Pt)|0;var Et=(H+(k=k+Math.imul(at,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(at,qt)|0)+Math.imul(rt,Xt)|0))<<13)|0;H=((D=D+Math.imul(rt,qt)|0)+(M>>>13)|0)+(Et>>>26)|0,Et&=67108863,k=Math.imul(ft,te),M=(M=Math.imul(ft,Wt))+Math.imul(lt,te)|0,D=Math.imul(lt,Wt),k=k+Math.imul(J,ie)|0,M=(M=M+Math.imul(J,$t)|0)+Math.imul(et,ie)|0,D=D+Math.imul(et,$t)|0,k=k+Math.imul(ot,Q)|0,M=(M=M+Math.imul(ot,it)|0)+Math.imul(Z,Q)|0,D=D+Math.imul(Z,it)|0,k=k+Math.imul(Ct,Tt)|0,M=(M=M+Math.imul(Ct,Mt)|0)+Math.imul(ht,Tt)|0,D=D+Math.imul(ht,Mt)|0,k=k+Math.imul(kt,Ht)|0,M=(M=M+Math.imul(kt,Pt)|0)+Math.imul(gt,Ht)|0,D=D+Math.imul(gt,Pt)|0;var Yt=(H+(k=k+Math.imul(pt,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(pt,qt)|0)+Math.imul(ct,Xt)|0))<<13)|0;H=((D=D+Math.imul(ct,qt)|0)+(M>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(ft,ie),M=(M=Math.imul(ft,$t))+Math.imul(lt,ie)|0,D=Math.imul(lt,$t),k=k+Math.imul(J,Q)|0,M=(M=M+Math.imul(J,it)|0)+Math.imul(et,Q)|0,D=D+Math.imul(et,it)|0,k=k+Math.imul(ot,Tt)|0,M=(M=M+Math.imul(ot,Mt)|0)+Math.imul(Z,Tt)|0,D=D+Math.imul(Z,Mt)|0,k=k+Math.imul(Ct,Ht)|0,M=(M=M+Math.imul(Ct,Pt)|0)+Math.imul(ht,Ht)|0,D=D+Math.imul(ht,Pt)|0;var Kt=(H+(k=k+Math.imul(kt,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(kt,qt)|0)+Math.imul(gt,Xt)|0))<<13)|0;H=((D=D+Math.imul(gt,qt)|0)+(M>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(ft,Q),M=(M=Math.imul(ft,it))+Math.imul(lt,Q)|0,D=Math.imul(lt,it),k=k+Math.imul(J,Tt)|0,M=(M=M+Math.imul(J,Mt)|0)+Math.imul(et,Tt)|0,D=D+Math.imul(et,Mt)|0,k=k+Math.imul(ot,Ht)|0,M=(M=M+Math.imul(ot,Pt)|0)+Math.imul(Z,Ht)|0,D=D+Math.imul(Z,Pt)|0;var Gt=(H+(k=k+Math.imul(Ct,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(Ct,qt)|0)+Math.imul(ht,Xt)|0))<<13)|0;H=((D=D+Math.imul(ht,qt)|0)+(M>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(ft,Tt),M=(M=Math.imul(ft,Mt))+Math.imul(lt,Tt)|0,D=Math.imul(lt,Mt),k=k+Math.imul(J,Ht)|0,M=(M=M+Math.imul(J,Pt)|0)+Math.imul(et,Ht)|0,D=D+Math.imul(et,Pt)|0;var Lt=(H+(k=k+Math.imul(ot,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(ot,qt)|0)+Math.imul(Z,Xt)|0))<<13)|0;H=((D=D+Math.imul(Z,qt)|0)+(M>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,k=Math.imul(ft,Ht),M=(M=Math.imul(ft,Pt))+Math.imul(lt,Ht)|0,D=Math.imul(lt,Pt);var he=(H+(k=k+Math.imul(J,Xt)|0)|0)+((8191&(M=(M=M+Math.imul(J,qt)|0)+Math.imul(et,Xt)|0))<<13)|0;H=((D=D+Math.imul(et,qt)|0)+(M>>>13)|0)+(he>>>26)|0,he&=67108863;var me=(H+(k=Math.imul(ft,Xt))|0)+((8191&(M=(M=Math.imul(ft,qt))+Math.imul(lt,Xt)|0))<<13)|0;return H=((D=Math.imul(lt,qt))+(M>>>13)|0)+(me>>>26)|0,me&=67108863,U[0]=be,U[1]=ve,U[2]=le,U[3]=_e,U[4]=xe,U[5]=Ee,U[6]=Y,U[7]=st,U[8]=vt,U[9]=xt,U[10]=At,U[11]=jt,U[12]=Et,U[13]=Yt,U[14]=Kt,U[15]=Gt,U[16]=Lt,U[17]=he,U[18]=me,H!==0&&(U[19]=H,x.length++),x};function l(g,R,x){x.negative=R.negative^g.negative,x.length=g.length+R.length;for(var k=0,M=0,D=0;D>>26)|0)>>>26,L&=67108863}x.words[D]=B,k=L,L=M}return k!==0?x.words[D]=k:x.length--,x._strip()}function b(g,R,x){return l(g,R,x)}Math.imul||(u=a),c.prototype.mulTo=function(g,R){var x=this.length+g.length;return this.length===10&&g.length===10?u(this,g,R):x<63?a(this,g,R):x<1024?l(this,g,R):b(this,g,R)},c.prototype.mul=function(g){var R=new c(null);return R.words=new Array(this.length+g.length),this.mulTo(g,R)},c.prototype.mulf=function(g){var R=new c(null);return R.words=new Array(this.length+g.length),b(this,g,R)},c.prototype.imul=function(g){return this.clone().mulTo(g,this)},c.prototype.imuln=function(g){var R=g<0;R&&(g=-g),d(typeof g=="number"),d(g<67108864);for(var x=0,k=0;k>=26,x+=M/67108864|0,x+=D>>>26,this.words[k]=67108863&D}return x!==0&&(this.words[k]=x,this.length++),R?this.ineg():this},c.prototype.muln=function(g){return this.clone().imuln(g)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(g){var R=function(D){for(var L=new Array(D.bitLength()),B=0;B>>H&1}return L}(g);if(R.length===0)return new c(1);for(var x=this,k=0;k=0);var R,x=g%26,k=(g-x)/26,M=67108863>>>26-x<<26-x;if(x!==0){var D=0;for(R=0;R>>26-x}D&&(this.words[R]=D,this.length++)}if(k!==0){for(R=this.length-1;R>=0;R--)this.words[R+k]=this.words[R];for(R=0;R=0),k=R?(R-R%26)/26:0;var M=g%26,D=Math.min((g-M)/26,this.length),L=67108863^67108863>>>M<D)for(this.length-=D,U=0;U=0&&(H!==0||U>=k);U--){var V=0|this.words[U];this.words[U]=H<<26-M|V>>>M,H=V&L}return B&&H!==0&&(B.words[B.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(g,R,x){return d(this.negative===0),this.iushrn(g,R,x)},c.prototype.shln=function(g){return this.clone().ishln(g)},c.prototype.ushln=function(g){return this.clone().iushln(g)},c.prototype.shrn=function(g){return this.clone().ishrn(g)},c.prototype.ushrn=function(g){return this.clone().iushrn(g)},c.prototype.testn=function(g){d(typeof g=="number"&&g>=0);var R=g%26,x=(g-R)/26,k=1<=0);var R=g%26,x=(g-R)/26;if(d(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(R!==0&&x++,this.length=Math.min(x,this.length),R!==0){var k=67108863^67108863>>>R<=67108864;R++)this.words[R]-=67108864,R===this.length-1?this.words[R+1]=1:this.words[R+1]++;return this.length=Math.max(this.length,R+1),this},c.prototype.isubn=function(g){if(d(typeof g=="number"),d(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var R=0;R>26)-(B/67108864|0),this.words[k+x]=67108863&M}for(;k>26,this.words[k+x]=67108863&M;if(L===0)return this._strip();for(d(L===-1),L=0,k=0;k>26,this.words[k]=67108863&M;return this.negative=1,this._strip()},c.prototype._wordDiv=function(g,R){var x=(this.length,g.length),k=this.clone(),M=g,D=0|M.words[M.length-1];(x=26-this._countBits(D))!==0&&(M=M.ushln(x),k.iushln(x),D=0|M.words[M.length-1]);var L,B=k.length-M.length;if(R!=="mod"){(L=new c(null)).length=B+1,L.words=new Array(L.length);for(var U=0;U=0;V--){var q=67108864*(0|k.words[M.length+V])+(0|k.words[M.length+V-1]);for(q=Math.min(q/D|0,67108863),k._ishlnsubmul(M,q,V);k.negative!==0;)q--,k.negative=0,k._ishlnsubmul(M,1,V),k.isZero()||(k.negative^=1);L&&(L.words[V]=q)}return L&&L._strip(),k._strip(),R!=="div"&&x!==0&&k.iushrn(x),{div:L||null,mod:k}},c.prototype.divmod=function(g,R,x){return d(!g.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:this.negative!==0&&g.negative===0?(D=this.neg().divmod(g,R),R!=="mod"&&(k=D.div.neg()),R!=="div"&&(M=D.mod.neg(),x&&M.negative!==0&&M.iadd(g)),{div:k,mod:M}):this.negative===0&&g.negative!==0?(D=this.divmod(g.neg(),R),R!=="mod"&&(k=D.div.neg()),{div:k,mod:D.mod}):this.negative&g.negative?(D=this.neg().divmod(g.neg(),R),R!=="div"&&(M=D.mod.neg(),x&&M.negative!==0&&M.isub(g)),{div:D.div,mod:M}):g.length>this.length||this.cmp(g)<0?{div:new c(0),mod:this}:g.length===1?R==="div"?{div:this.divn(g.words[0]),mod:null}:R==="mod"?{div:null,mod:new c(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new c(this.modrn(g.words[0]))}:this._wordDiv(g,R);var k,M,D},c.prototype.div=function(g){return this.divmod(g,"div",!1).div},c.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},c.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},c.prototype.divRound=function(g){var R=this.divmod(g);if(R.mod.isZero())return R.div;var x=R.div.negative!==0?R.mod.isub(g):R.mod,k=g.ushrn(1),M=g.andln(1),D=x.cmp(k);return D<0||M===1&&D===0?R.div:R.div.negative!==0?R.div.isubn(1):R.div.iaddn(1)},c.prototype.modrn=function(g){var R=g<0;R&&(g=-g),d(g<=67108863);for(var x=(1<<26)%g,k=0,M=this.length-1;M>=0;M--)k=(x*k+(0|this.words[M]))%g;return R?-k:k},c.prototype.modn=function(g){return this.modrn(g)},c.prototype.idivn=function(g){var R=g<0;R&&(g=-g),d(g<=67108863);for(var x=0,k=this.length-1;k>=0;k--){var M=(0|this.words[k])+67108864*x;this.words[k]=M/g|0,x=M%g}return this._strip(),R?this.ineg():this},c.prototype.divn=function(g){return this.clone().idivn(g)},c.prototype.egcd=function(g){d(g.negative===0),d(!g.isZero());var R=this,x=g.clone();R=R.negative!==0?R.umod(g):R.clone();for(var k=new c(1),M=new c(0),D=new c(0),L=new c(1),B=0;R.isEven()&&x.isEven();)R.iushrn(1),x.iushrn(1),++B;for(var U=x.clone(),H=R.clone();!R.isZero();){for(var V=0,q=1;!(R.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(R.iushrn(V);V-- >0;)(k.isOdd()||M.isOdd())&&(k.iadd(U),M.isub(H)),k.iushrn(1),M.iushrn(1);for(var $=0,F=1;!(x.words[0]&F)&&$<26;++$,F<<=1);if($>0)for(x.iushrn($);$-- >0;)(D.isOdd()||L.isOdd())&&(D.iadd(U),L.isub(H)),D.iushrn(1),L.iushrn(1);R.cmp(x)>=0?(R.isub(x),k.isub(D),M.isub(L)):(x.isub(R),D.isub(k),L.isub(M))}return{a:D,b:L,gcd:x.iushln(B)}},c.prototype._invmp=function(g){d(g.negative===0),d(!g.isZero());var R=this,x=g.clone();R=R.negative!==0?R.umod(g):R.clone();for(var k,M=new c(1),D=new c(0),L=x.clone();R.cmpn(1)>0&&x.cmpn(1)>0;){for(var B=0,U=1;!(R.words[0]&U)&&B<26;++B,U<<=1);if(B>0)for(R.iushrn(B);B-- >0;)M.isOdd()&&M.iadd(L),M.iushrn(1);for(var H=0,V=1;!(x.words[0]&V)&&H<26;++H,V<<=1);if(H>0)for(x.iushrn(H);H-- >0;)D.isOdd()&&D.iadd(L),D.iushrn(1);R.cmp(x)>=0?(R.isub(x),M.isub(D)):(x.isub(R),D.isub(M))}return(k=R.cmpn(1)===0?M:D).cmpn(0)<0&&k.iadd(g),k},c.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var R=this.clone(),x=g.clone();R.negative=0,x.negative=0;for(var k=0;R.isEven()&&x.isEven();k++)R.iushrn(1),x.iushrn(1);for(;;){for(;R.isEven();)R.iushrn(1);for(;x.isEven();)x.iushrn(1);var M=R.cmp(x);if(M<0){var D=R;R=x,x=D}else if(M===0||x.cmpn(1)===0)break;R.isub(x)}return x.iushln(k)},c.prototype.invm=function(g){return this.egcd(g).a.umod(g)},c.prototype.isEven=function(){return(1&this.words[0])==0},c.prototype.isOdd=function(){return(1&this.words[0])==1},c.prototype.andln=function(g){return this.words[0]&g},c.prototype.bincn=function(g){d(typeof g=="number");var R=g%26,x=(g-R)/26,k=1<>>26,L&=67108863,this.words[D]=L}return M!==0&&(this.words[D]=M,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(g){var R,x=g<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;if(this._strip(),this.length>1)R=1;else{x&&(g=-g),d(g<=67108863,"Number is too big");var k=0|this.words[0];R=k===g?0:kg.length)return 1;if(this.length=0;x--){var k=0|this.words[x],M=0|g.words[x];if(k!==M){kM&&(R=1);break}}return R},c.prototype.gtn=function(g){return this.cmpn(g)===1},c.prototype.gt=function(g){return this.cmp(g)===1},c.prototype.gten=function(g){return this.cmpn(g)>=0},c.prototype.gte=function(g){return this.cmp(g)>=0},c.prototype.ltn=function(g){return this.cmpn(g)===-1},c.prototype.lt=function(g){return this.cmp(g)===-1},c.prototype.lten=function(g){return this.cmpn(g)<=0},c.prototype.lte=function(g){return this.cmp(g)<=0},c.prototype.eqn=function(g){return this.cmpn(g)===0},c.prototype.eq=function(g){return this.cmp(g)===0},c.red=function(g){return new _(g)},c.prototype.toRed=function(g){return d(!this.red,"Already a number in reduction context"),d(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},c.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(g){return this.red=g,this},c.prototype.forceRed=function(g){return d(!this.red,"Already a number in reduction context"),this._forceRed(g)},c.prototype.redAdd=function(g){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},c.prototype.redIAdd=function(g){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},c.prototype.redSub=function(g){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},c.prototype.redISub=function(g){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},c.prototype.redShl=function(g){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},c.prototype.redMul=function(g){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},c.prototype.redIMul=function(g){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},c.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(g){return d(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var w={k256:null,p224:null,p192:null,p25519:null};function T(g,R){this.name=g,this.p=new c(R,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function j(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(g){if(typeof g=="string"){var R=c._prime(g);this.m=R.p,this.prime=R}else d(g.gtn(1),"modulus must be greater than 1"),this.m=g,this.prime=null}function S(g){_.call(this,g),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}T.prototype._tmp=function(){var g=new c(null);return g.words=new Array(Math.ceil(this.n/13)),g},T.prototype.ireduce=function(g){var R,x=g;do this.split(x,this.tmp),R=(x=(x=this.imulK(x)).iadd(this.tmp)).bitLength();while(R>this.n);var k=R0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},T.prototype.split=function(g,R){g.iushrn(this.n,0,R)},T.prototype.imulK=function(g){return g.imul(this.k)},m(j,T),j.prototype.split=function(g,R){for(var x=Math.min(g.length,9),k=0;k>>22,M=D}M>>>=22,g.words[k-10]=M,M===0&&g.length>10?g.length-=10:g.length-=9},j.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var R=0,x=0;x>>=26,g.words[x]=M,R=k}return R!==0&&(g.words[g.length++]=R),g},c._prime=function(g){if(w[g])return w[g];var R;if(g==="k256")R=new j;else if(g==="p224")R=new P;else if(g==="p192")R=new O;else{if(g!=="p25519")throw new Error("Unknown prime "+g);R=new C}return w[g]=R,R},_.prototype._verify1=function(g){d(g.negative===0,"red works only with positives"),d(g.red,"red works only with red numbers")},_.prototype._verify2=function(g,R){d((g.negative|R.negative)==0,"red works only with positives"),d(g.red&&g.red===R.red,"red works only with red numbers")},_.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(t(g,g.umod(this.m)._forceRed(this)),g)},_.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},_.prototype.add=function(g,R){this._verify2(g,R);var x=g.add(R);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},_.prototype.iadd=function(g,R){this._verify2(g,R);var x=g.iadd(R);return x.cmp(this.m)>=0&&x.isub(this.m),x},_.prototype.sub=function(g,R){this._verify2(g,R);var x=g.sub(R);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},_.prototype.isub=function(g,R){this._verify2(g,R);var x=g.isub(R);return x.cmpn(0)<0&&x.iadd(this.m),x},_.prototype.shl=function(g,R){return this._verify1(g),this.imod(g.ushln(R))},_.prototype.imul=function(g,R){return this._verify2(g,R),this.imod(g.imul(R))},_.prototype.mul=function(g,R){return this._verify2(g,R),this.imod(g.mul(R))},_.prototype.isqr=function(g){return this.imul(g,g.clone())},_.prototype.sqr=function(g){return this.mul(g,g)},_.prototype.sqrt=function(g){if(g.isZero())return g.clone();var R=this.m.andln(3);if(d(R%2==1),R===3){var x=this.m.add(new c(1)).iushrn(2);return this.pow(g,x)}for(var k=this.m.subn(1),M=0;!k.isZero()&&k.andln(1)===0;)M++,k.iushrn(1);d(!k.isZero());var D=new c(1).toRed(this),L=D.redNeg(),B=this.m.subn(1).iushrn(1),U=this.m.bitLength();for(U=new c(2*U*U).toRed(this);this.pow(U,B).cmp(L)!==0;)U.redIAdd(L);for(var H=this.pow(U,k),V=this.pow(g,k.addn(1).iushrn(1)),q=this.pow(g,k),$=M;q.cmp(D)!==0;){for(var F=q,I=0;F.cmp(D)!==0;I++)F=F.redSqr();d(I<$);var N=this.pow(H,new c(1).iushln($-I-1));V=V.redMul(N),H=N.redSqr(),q=q.redMul(H),$=I}return V},_.prototype.invm=function(g){var R=g._invmp(this.m);return R.negative!==0?(R.negative=0,this.imod(R).redNeg()):this.imod(R)},_.prototype.pow=function(g,R){if(R.isZero())return new c(1).toRed(this);if(R.cmpn(1)===0)return g.clone();var x=new Array(16);x[0]=new c(1).toRed(this),x[1]=g;for(var k=2;k=0;k--){for(var U=R.words[k],H=B-1;H>=0;H--){var V=U>>H&1;M!==x[0]&&(M=this.sqr(M)),V!==0||D!==0?(D<<=1,D|=V,(++L===4||k===0&&H===0)&&(M=this.mul(M,x[D]),L=0,D=0)):L=0}B=26}return M},_.prototype.convertTo=function(g){var R=g.umod(this.m);return R===g?R.clone():R},_.prototype.convertFrom=function(g){var R=g.clone();return R.red=null,R},c.mont=function(g){return new S(g)},m(S,_),S.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},S.prototype.convertFrom=function(g){var R=this.imod(g.mul(this.rinv));return R.red=null,R},S.prototype.imul=function(g,R){if(g.isZero()||R.isZero())return g.words[0]=0,g.length=1,g;var x=g.imul(R),k=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=x.isub(k).iushrn(this.shift),D=M;return M.cmp(this.m)>=0?D=M.isub(this.m):M.cmpn(0)<0&&(D=M.iadd(this.m)),D._forceRed(this)},S.prototype.mul=function(g,R){if(g.isZero()||R.isZero())return new c(0)._forceRed(this);var x=g.mul(R),k=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=x.isub(k).iushrn(this.shift),D=M;return M.cmp(this.m)>=0?D=M.isub(this.m):M.cmpn(0)<0&&(D=M.iadd(this.m)),D._forceRed(this)},S.prototype.invm=function(g){return this.imod(g._invmp(this.m).mul(this.r2))._forceRed(this)}})(A===void 0||A)},{buffer:185}],184:[function(h,A,E){function y(m){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(m)}var p;function v(m){this.rand=m}if(A.exports=function(m){return p||(p=new v(null)),p.generate(m)},A.exports.Rand=v,v.prototype.generate=function(m){return this._rand(m)},v.prototype._rand=function(m){if(this.rand.getBytes)return this.rand.getBytes(m);for(var c=new Uint8Array(m),f=0;f"u"?"undefined":y(self))==="object")self.crypto&&self.crypto.getRandomValues?v.prototype._rand=function(m){var c=new Uint8Array(m);return self.crypto.getRandomValues(c),c}:self.msCrypto&&self.msCrypto.getRandomValues?v.prototype._rand=function(m){var c=new Uint8Array(m);return self.msCrypto.getRandomValues(c),c}:(typeof window>"u"?"undefined":y(window))==="object"&&(v.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var d=h("crypto");if(typeof d.randomBytes!="function")throw new Error("Not supported");v.prototype._rand=function(m){return d.randomBytes(m)}}catch(m){}},{crypto:185}],185:[function(h,A,E){},{}],186:[function(h,A,E){var y=h("safe-buffer").Buffer;function p(s){y.isBuffer(s)||(s=y.from(s));for(var n=s.length/4|0,t=new Array(n),e=0;e>>24]^b[P>>>16&255]^w[O>>>8&255]^T[255&C]^n[_++],o=l[P>>>24]^b[O>>>16&255]^w[C>>>8&255]^T[255&j]^n[_++],a=l[O>>>24]^b[C>>>16&255]^w[j>>>8&255]^T[255&P]^n[_++],u=l[C>>>24]^b[j>>>16&255]^w[P>>>8&255]^T[255&O]^n[_++],j=i,P=o,O=a,C=u;return i=(e[j>>>24]<<24|e[P>>>16&255]<<16|e[O>>>8&255]<<8|e[255&C])^n[_++],o=(e[P>>>24]<<24|e[O>>>16&255]<<16|e[C>>>8&255]<<8|e[255&j])^n[_++],a=(e[O>>>24]<<24|e[C>>>16&255]<<16|e[j>>>8&255]<<8|e[255&P])^n[_++],u=(e[C>>>24]<<24|e[j>>>16&255]<<16|e[P>>>8&255]<<8|e[255&O])^n[_++],[i>>>=0,o>>>=0,a>>>=0,u>>>=0]}var m=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var s=new Array(256),n=0;n<256;n++)s[n]=n<128?n<<1:n<<1^283;for(var t=[],e=[],r=[[],[],[],[]],i=[[],[],[],[]],o=0,a=0,u=0;u<256;++u){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,t[o]=l,e[l]=o;var b=s[o],w=s[b],T=s[w],j=257*s[l]^16843008*l;r[0][o]=j<<24|j>>>8,r[1][o]=j<<16|j>>>16,r[2][o]=j<<8|j>>>24,r[3][o]=j,j=16843009*T^65537*w^257*b^16843008*o,i[0][l]=j<<24|j>>>8,i[1][l]=j<<16|j>>>16,i[2][l]=j<<8|j>>>24,i[3][l]=j,o===0?o=a=1:(o=b^s[s[s[T^b]]],a^=s[s[a]])}return{SBOX:t,INV_SBOX:e,SUB_MIX:r,INV_SUB_MIX:i}}();function f(s){this._key=p(s),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var s=this._key,n=s.length,t=n+6,e=4*(t+1),r=[],i=0;i>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=m[i/n|0]<<24):n>6&&i%n==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),r[i]=r[i-n]^o}for(var a=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[b>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[b>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&b]]}this._nRounds=t,this._keySchedule=r,this._invKeySchedule=a},f.prototype.encryptBlockRaw=function(s){return d(s=p(s),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},f.prototype.encryptBlock=function(s){var n=this.encryptBlockRaw(s),t=y.allocUnsafe(16);return t.writeUInt32BE(n[0],0),t.writeUInt32BE(n[1],4),t.writeUInt32BE(n[2],8),t.writeUInt32BE(n[3],12),t},f.prototype.decryptBlock=function(s){var n=(s=p(s))[1];s[1]=s[3],s[3]=n;var t=d(s,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),e=y.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[3],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[1],12),e},f.prototype.scrub=function(){v(this._keySchedule),v(this._invKeySchedule),v(this._key)},A.exports.AES=f},{"safe-buffer":494}],187:[function(h,A,E){var y=h("./aes"),p=h("safe-buffer").Buffer,v=h("cipher-base"),d=h("inherits"),m=h("./ghash"),c=h("buffer-xor"),f=h("./incr32");function s(n,t,e,r){v.call(this);var i=p.alloc(4,0);this._cipher=new y.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new m(o),e=function(a,u,l){if(u.length===12)return a._finID=p.concat([u,p.from([0,0,0,1])]),p.concat([u,p.from([0,0,0,2])]);var b=new m(l),w=u.length,T=w%16;b.update(u),T&&(T=16-T,b.update(p.alloc(T,0))),b.update(p.alloc(8,0));var j=8*w,P=p.alloc(8);P.writeUIntBE(j,0,8),b.update(P),a._finID=b.state;var O=p.from(a._finID);return f(O),O}(this,e,o),this._prev=p.from(e),this._cache=p.allocUnsafe(0),this._secCache=p.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=n,this._authTag=null,this._called=!1}d(s,v),s.prototype._update=function(n){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=p.alloc(t,0),this._ghash.update(t))}this._called=!0;var e=this._mode.encrypt(this,n);return this._decrypt?this._ghash.update(n):this._ghash.update(e),this._len+=n.length,e},s.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var n=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),o=0;o16)throw new Error("unable to decrypt data");for(var o=-1;++o16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r}else if(this.cache.length>=16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache},E.createDecipher=function(e,r){var i=v[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var o=f(r,!1,i.key,i.iv);return t(e,o.key,o.iv)},E.createDecipheriv=t},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],190:[function(h,A,E){var y=h("./modes"),p=h("./authCipher"),v=h("safe-buffer").Buffer,d=h("./streamCipher"),m=h("cipher-base"),c=h("./aes"),f=h("evp_bytestokey");function s(r,i,o){m.call(this),this._cache=new t,this._cipher=new c.AES(i),this._prev=v.from(o),this._mode=r,this._autopadding=!0}h("inherits")(s,m),s.prototype._update=function(r){var i,o;this._cache.add(r);for(var a=[];i=this._cache.get();)o=this._mode.encrypt(this,i),a.push(o);return v.concat(a)};var n=v.alloc(16,16);function t(){this.cache=v.allocUnsafe(0)}function e(r,i,o){var a=y[r.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if(typeof i=="string"&&(i=v.from(i)),i.length!==a.key/8)throw new TypeError("invalid key length "+i.length);if(typeof o=="string"&&(o=v.from(o)),a.mode!=="GCM"&&o.length!==a.iv)throw new TypeError("invalid iv length "+o.length);return a.type==="stream"?new d(a.module,i,o):a.type==="auth"?new p(a.module,i,o):new s(a.module,i,o)}s.prototype._final=function(){var r=this._cache.flush();if(this._autopadding)return r=this._mode.encrypt(this,r),this._cipher.scrub(),r;if(!r.equals(n))throw this._cipher.scrub(),new Error("data not multiple of block length")},s.prototype.setAutoPadding=function(r){return this._autopadding=!!r,this},t.prototype.add=function(r){this.cache=v.concat([this.cache,r])},t.prototype.get=function(){if(this.cache.length>15){var r=this.cache.slice(0,16);return this.cache=this.cache.slice(16),r}return null},t.prototype.flush=function(){for(var r=16-this.cache.length,i=v.allocUnsafe(r),o=-1;++o>>0,0),c.writeUInt32BE(m[1]>>>0,4),c.writeUInt32BE(m[2]>>>0,8),c.writeUInt32BE(m[3]>>>0,12),c}function d(m){this.h=m,this.state=y.alloc(16,0),this.cache=y.allocUnsafe(0)}d.prototype.ghash=function(m){for(var c=-1;++c0;c--)s[c]=s[c]>>>1|(1&s[c-1])<<31;s[0]=s[0]>>>1,f&&(s[0]=s[0]^225<<24)}this.state=v(n)},d.prototype.update=function(m){var c;for(this.cache=y.concat([this.cache,m]);this.cache.length>=16;)c=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(c)},d.prototype.final=function(m,c){return this.cache.length&&this.ghash(y.concat([this.cache,p],16)),this.ghash(v([0,m,0,c])),this.state},A.exports=d},{"safe-buffer":494}],192:[function(h,A,E){A.exports=function(y){for(var p,v=y.length;v--;){if((p=y.readUInt8(v))!==255){p++,y.writeUInt8(p,v);break}y.writeUInt8(0,v)}}},{}],193:[function(h,A,E){var y=h("buffer-xor");E.encrypt=function(p,v){var d=y(v,p._prev);return p._prev=p._cipher.encryptBlock(d),p._prev},E.decrypt=function(p,v){var d=p._prev;p._prev=v;var m=p._cipher.decryptBlock(v);return y(m,d)}},{"buffer-xor":217}],194:[function(h,A,E){var y=h("safe-buffer").Buffer,p=h("buffer-xor");function v(d,m,c){var f=m.length,s=p(m,d._cache);return d._cache=d._cache.slice(f),d._prev=y.concat([d._prev,c?m:s]),s}E.encrypt=function(d,m,c){for(var f,s=y.allocUnsafe(0);m.length;){if(d._cache.length===0&&(d._cache=d._cipher.encryptBlock(d._prev),d._prev=y.allocUnsafe(0)),!(d._cache.length<=m.length)){s=y.concat([s,v(d,m,c)]);break}f=d._cache.length,s=y.concat([s,v(d,m.slice(0,f),c)]),m=m.slice(f)}return s}},{"buffer-xor":217,"safe-buffer":494}],195:[function(h,A,E){var y=h("safe-buffer").Buffer;function p(d,m,c){for(var f,s,n=-1,t=0;++n<8;)f=m&1<<7-n?128:0,t+=(128&(s=d._cipher.encryptBlock(d._prev)[0]^f))>>n%8,d._prev=v(d._prev,c?f:s);return t}function v(d,m){var c=d.length,f=-1,s=y.allocUnsafe(d.length);for(d=y.concat([d,y.from([m])]);++f>7;return s}E.encrypt=function(d,m,c){for(var f=m.length,s=y.allocUnsafe(f),n=-1;++n=0||!s.umod(c.prime1)||!s.umod(c.prime2);)s=new p(v(f));return s}A.exports=d,d.getr=m}).call(this,h("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(h,A,E){arguments[4][181][0].apply(E,arguments)},{buffer:185,dup:181}],208:[function(h,A,E){A.exports=h("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(h,A,E){A.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(h,A,E){A.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(h,A,E){var y=h("safe-buffer").Buffer,p=h("create-hash"),v=h("readable-stream"),d=h("inherits"),m=h("./sign"),c=h("./verify"),f=h("./algorithms.json");function s(r){v.Writable.call(this);var i=f[r];if(!i)throw new Error("Unknown message digest");this._hashType=i.hash,this._hash=p(i.hash),this._tag=i.id,this._signType=i.sign}function n(r){v.Writable.call(this);var i=f[r];if(!i)throw new Error("Unknown message digest");this._hash=p(i.hash),this._tag=i.id,this._signType=i.sign}function t(r){return new s(r)}function e(r){return new n(r)}Object.keys(f).forEach(function(r){f[r].id=y.from(f[r].id,"hex"),f[r.toLowerCase()]=f[r]}),d(s,v.Writable),s.prototype._write=function(r,i,o){this._hash.update(r),o()},s.prototype.update=function(r,i){return typeof r=="string"&&(r=y.from(r,i)),this._hash.update(r),this},s.prototype.sign=function(r,i){this.end();var o=this._hash.digest(),a=m(o,r,this._hashType,this._signType,this._tag);return i?a.toString(i):a},d(n,v.Writable),n.prototype._write=function(r,i,o){this._hash.update(r),o()},n.prototype.update=function(r,i){return typeof r=="string"&&(r=y.from(r,i)),this._hash.update(r),this},n.prototype.verify=function(r,i,o){typeof i=="string"&&(i=y.from(i,o)),this.end();var a=this._hash.digest();return c(i,a,r,this._signType,this._tag)},A.exports={Sign:t,Verify:e,createSign:t,createVerify:e}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(h,A,E){var y=h("safe-buffer").Buffer,p=h("create-hmac"),v=h("browserify-rsa"),d=h("elliptic").ec,m=h("bn.js"),c=h("parse-asn1"),f=h("./curves.json");function s(r,i,o,a){if((r=y.from(r.toArray())).length0&&o.ishrn(a),o}function t(r,i,o){var a,u;do{for(a=y.alloc(0);8*a.length=s)throw new Error("invalid sig")}A.exports=function(f,s,n,t,e){var r=d(n);if(r.type==="ec"){if(t!=="ecdsa"&&t!=="ecdsa/rsa")throw new Error("wrong public key type");return function(w,T,j){var P=m[j.data.algorithm.curve.join(".")];if(!P)throw new Error("unknown curve "+j.data.algorithm.curve.join("."));var O=new v(P),C=j.data.subjectPrivateKey.data;return O.verify(T,w,C)}(f,s,r)}if(r.type==="dsa"){if(t!=="dsa")throw new Error("wrong public key type");return function(w,T,j){var P=j.data.p,O=j.data.q,C=j.data.g,_=j.data.pub_key,S=d.signature.decode(w,"der"),g=S.s,R=S.r;c(g,O),c(R,O);var x=p.mont(P),k=g.invm(O);return C.toRed(x).redPow(new p(T).mul(k).mod(O)).fromRed().mul(_.toRed(x).redPow(R.mul(k).mod(O)).fromRed()).mod(P).mod(O).cmp(R)===0}(f,s,r)}if(t!=="rsa"&&t!=="ecdsa/rsa")throw new Error("wrong public key type");s=y.concat([e,s]);for(var i=r.modulus.byteLength(),o=[1],a=0;s.length+o.length+22147483647)throw new RangeError('The value "'+I+'" is invalid for option "size"');var N=new Uint8Array(I);return N.__proto__=c.prototype,N}function c(I,N,z){if(typeof I=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(I)}return f(I,N,z)}function f(I,N,z){if(typeof I=="string")return function(G,at){if(typeof at=="string"&&at!==""||(at="utf8"),!c.isEncoding(at))throw new TypeError("Unknown encoding: "+at);var rt=0|r(G,at),ut=m(rt),pt=ut.write(G,at);return pt!==rt&&(ut=ut.slice(0,pt)),ut}(I,N);if(ArrayBuffer.isView(I))return t(I);if(I==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(I));if($(I,ArrayBuffer)||I&&$(I.buffer,ArrayBuffer))return function(G,at,rt){if(at<0||G.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|I}function r(I,N){if(c.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||$(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+p(I));var z=I.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&z===0)return 0;for(var X=!1;;)switch(N){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return H(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return V(I).length;default:if(X)return W?-1:H(I).length;N=(""+N).toLowerCase(),X=!0}}function i(I,N,z){var W=!1;if((N===void 0||N<0)&&(N=0),N>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(N>>>=0))return"";for(I||(I="utf8");;)switch(I){case"hex":return g(this,N,z);case"utf8":case"utf-8":return C(this,N,z);case"ascii":return _(this,N,z);case"latin1":case"binary":return S(this,N,z);case"base64":return O(this,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,N,z);default:if(W)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),W=!0}}function o(I,N,z){var W=I[N];I[N]=I[z],I[z]=W}function a(I,N,z,W,X){if(I.length===0)return-1;if(typeof z=="string"?(W=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),F(z=+z)&&(z=X?0:I.length-1),z<0&&(z=I.length+z),z>=I.length){if(X)return-1;z=I.length-1}else if(z<0){if(!X)return-1;z=0}if(typeof N=="string"&&(N=c.from(N,W)),c.isBuffer(N))return N.length===0?-1:u(I,N,z,W,X);if(typeof N=="number")return N&=255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(I,N,z):Uint8Array.prototype.lastIndexOf.call(I,N,z):u(I,[N],z,W,X);throw new TypeError("val must be string, number or Buffer")}function u(I,N,z,W,X){var G,at=1,rt=I.length,ut=N.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(I.length<2||N.length<2)return-1;at=2,rt/=2,ut/=2,z/=2}function pt(gt,St){return at===1?gt[St]:gt.readUInt16BE(St*at)}if(X){var ct=-1;for(G=z;Grt&&(z=rt-ut),G=z;G>=0;G--){for(var Ot=!0,kt=0;ktX&&(W=X):W=X;var G=N.length;W>G/2&&(W=G/2);for(var at=0;at>8,ut=at%256,pt.push(ut),pt.push(rt);return pt}(N,I.length-z),I,z,W)}function O(I,N,z){return N===0&&z===I.length?v.fromByteArray(I):v.fromByteArray(I.slice(N,z))}function C(I,N,z){z=Math.min(I.length,z);for(var W=[],X=N;X239?4:pt>223?3:pt>191?2:1;if(X+Ot<=z)switch(Ot){case 1:pt<128&&(ct=pt);break;case 2:(192&(G=I[X+1]))==128&&(ut=(31&pt)<<6|63&G)>127&&(ct=ut);break;case 3:G=I[X+1],at=I[X+2],(192&G)==128&&(192&at)==128&&(ut=(15&pt)<<12|(63&G)<<6|63&at)>2047&&(ut<55296||ut>57343)&&(ct=ut);break;case 4:G=I[X+1],at=I[X+2],rt=I[X+3],(192&G)==128&&(192&at)==128&&(192&rt)==128&&(ut=(15&pt)<<18|(63&G)<<12|(63&at)<<6|63&rt)>65535&&ut<1114112&&(ct=ut)}ct===null?(ct=65533,Ot=1):ct>65535&&(ct-=65536,W.push(ct>>>10&1023|55296),ct=56320|1023&ct),W.push(ct),X+=Ot}return function(kt){var gt=kt.length;if(gt<=4096)return String.fromCharCode.apply(String,kt);for(var St="",Ct=0;Ct"u",Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(I,N,z){return f(I,N,z)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(I,N,z){return function(W,X,G){return s(W),W<=0?m(W):X!==void 0?typeof G=="string"?m(W).fill(X,G):m(W).fill(X):m(W)}(I,N,z)},c.allocUnsafe=function(I){return n(I)},c.allocUnsafeSlow=function(I){return n(I)},c.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==c.prototype},c.compare=function(I,N){if($(I,Uint8Array)&&(I=c.from(I,I.offset,I.byteLength)),$(N,Uint8Array)&&(N=c.from(N,N.offset,N.byteLength)),!c.isBuffer(I)||!c.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===N)return 0;for(var z=I.length,W=N.length,X=0,G=Math.min(z,W);XN&&(I+=" ... "),""},c.prototype.compare=function(I,N,z,W,X){if($(I,Uint8Array)&&(I=c.from(I,I.offset,I.byteLength)),!c.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+p(I));if(N===void 0&&(N=0),z===void 0&&(z=I?I.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),N<0||z>I.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&N>=z)return 0;if(W>=X)return-1;if(N>=z)return 1;if(this===I)return 0;for(var G=(X>>>=0)-(W>>>=0),at=(z>>>=0)-(N>>>=0),rt=Math.min(G,at),ut=this.slice(W,X),pt=I.slice(N,z),ct=0;ct>>=0,isFinite(z)?(z>>>=0,W===void 0&&(W="utf8")):(W=z,z=void 0)}var X=this.length-N;if((z===void 0||z>X)&&(z=X),I.length>0&&(z<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var G=!1;;)switch(W){case"hex":return l(this,I,N,z);case"utf8":case"utf-8":return b(this,I,N,z);case"ascii":return w(this,I,N,z);case"latin1":case"binary":return T(this,I,N,z);case"base64":return j(this,I,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,I,N,z);default:if(G)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),G=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(I,N,z){var W="";z=Math.min(I.length,z);for(var X=N;XW)&&(z=W);for(var X="",G=N;Gz)throw new RangeError("Trying to access beyond buffer length")}function k(I,N,z,W,X,G){if(!c.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>X||NI.length)throw new RangeError("Index out of range")}function M(I,N,z,W,X,G){if(z+W>I.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function D(I,N,z,W,X){return N=+N,z>>>=0,X||M(I,0,z,4),d.write(I,N,z,W,23,4),z+4}function L(I,N,z,W,X){return N=+N,z>>>=0,X||M(I,0,z,8),d.write(I,N,z,W,52,8),z+8}c.prototype.slice=function(I,N){var z=this.length;(I=~~I)<0?(I+=z)<0&&(I=0):I>z&&(I=z),(N=N===void 0?z:~~N)<0?(N+=z)<0&&(N=0):N>z&&(N=z),N>>=0,N>>>=0,z||x(I,N,this.length);for(var W=this[I],X=1,G=0;++G>>=0,N>>>=0,z||x(I,N,this.length);for(var W=this[I+--N],X=1;N>0&&(X*=256);)W+=this[I+--N]*X;return W},c.prototype.readUInt8=function(I,N){return I>>>=0,N||x(I,1,this.length),this[I]},c.prototype.readUInt16LE=function(I,N){return I>>>=0,N||x(I,2,this.length),this[I]|this[I+1]<<8},c.prototype.readUInt16BE=function(I,N){return I>>>=0,N||x(I,2,this.length),this[I]<<8|this[I+1]},c.prototype.readUInt32LE=function(I,N){return I>>>=0,N||x(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+16777216*this[I+3]},c.prototype.readUInt32BE=function(I,N){return I>>>=0,N||x(I,4,this.length),16777216*this[I]+(this[I+1]<<16|this[I+2]<<8|this[I+3])},c.prototype.readIntLE=function(I,N,z){I>>>=0,N>>>=0,z||x(I,N,this.length);for(var W=this[I],X=1,G=0;++G=(X*=128)&&(W-=Math.pow(2,8*N)),W},c.prototype.readIntBE=function(I,N,z){I>>>=0,N>>>=0,z||x(I,N,this.length);for(var W=N,X=1,G=this[I+--W];W>0&&(X*=256);)G+=this[I+--W]*X;return G>=(X*=128)&&(G-=Math.pow(2,8*N)),G},c.prototype.readInt8=function(I,N){return I>>>=0,N||x(I,1,this.length),128&this[I]?-1*(255-this[I]+1):this[I]},c.prototype.readInt16LE=function(I,N){I>>>=0,N||x(I,2,this.length);var z=this[I]|this[I+1]<<8;return 32768&z?4294901760|z:z},c.prototype.readInt16BE=function(I,N){I>>>=0,N||x(I,2,this.length);var z=this[I+1]|this[I]<<8;return 32768&z?4294901760|z:z},c.prototype.readInt32LE=function(I,N){return I>>>=0,N||x(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},c.prototype.readInt32BE=function(I,N){return I>>>=0,N||x(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},c.prototype.readFloatLE=function(I,N){return I>>>=0,N||x(I,4,this.length),d.read(this,I,!0,23,4)},c.prototype.readFloatBE=function(I,N){return I>>>=0,N||x(I,4,this.length),d.read(this,I,!1,23,4)},c.prototype.readDoubleLE=function(I,N){return I>>>=0,N||x(I,8,this.length),d.read(this,I,!0,52,8)},c.prototype.readDoubleBE=function(I,N){return I>>>=0,N||x(I,8,this.length),d.read(this,I,!1,52,8)},c.prototype.writeUIntLE=function(I,N,z,W){I=+I,N>>>=0,z>>>=0,W||k(this,I,N,z,Math.pow(2,8*z)-1,0);var X=1,G=0;for(this[N]=255&I;++G>>=0,z>>>=0,W||k(this,I,N,z,Math.pow(2,8*z)-1,0);var X=z-1,G=1;for(this[N+X]=255&I;--X>=0&&(G*=256);)this[N+X]=I/G&255;return N+z},c.prototype.writeUInt8=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,1,255,0),this[N]=255&I,N+1},c.prototype.writeUInt16LE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,2,65535,0),this[N]=255&I,this[N+1]=I>>>8,N+2},c.prototype.writeUInt16BE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,2,65535,0),this[N]=I>>>8,this[N+1]=255&I,N+2},c.prototype.writeUInt32LE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,4,4294967295,0),this[N+3]=I>>>24,this[N+2]=I>>>16,this[N+1]=I>>>8,this[N]=255&I,N+4},c.prototype.writeUInt32BE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,4,4294967295,0),this[N]=I>>>24,this[N+1]=I>>>16,this[N+2]=I>>>8,this[N+3]=255&I,N+4},c.prototype.writeIntLE=function(I,N,z,W){if(I=+I,N>>>=0,!W){var X=Math.pow(2,8*z-1);k(this,I,N,z,X-1,-X)}var G=0,at=1,rt=0;for(this[N]=255&I;++G>0)-rt&255;return N+z},c.prototype.writeIntBE=function(I,N,z,W){if(I=+I,N>>>=0,!W){var X=Math.pow(2,8*z-1);k(this,I,N,z,X-1,-X)}var G=z-1,at=1,rt=0;for(this[N+G]=255&I;--G>=0&&(at*=256);)I<0&&rt===0&&this[N+G+1]!==0&&(rt=1),this[N+G]=(I/at>>0)-rt&255;return N+z},c.prototype.writeInt8=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,1,127,-128),I<0&&(I=255+I+1),this[N]=255&I,N+1},c.prototype.writeInt16LE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,2,32767,-32768),this[N]=255&I,this[N+1]=I>>>8,N+2},c.prototype.writeInt16BE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,2,32767,-32768),this[N]=I>>>8,this[N+1]=255&I,N+2},c.prototype.writeInt32LE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,4,2147483647,-2147483648),this[N]=255&I,this[N+1]=I>>>8,this[N+2]=I>>>16,this[N+3]=I>>>24,N+4},c.prototype.writeInt32BE=function(I,N,z){return I=+I,N>>>=0,z||k(this,I,N,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[N]=I>>>24,this[N+1]=I>>>16,this[N+2]=I>>>8,this[N+3]=255&I,N+4},c.prototype.writeFloatLE=function(I,N,z){return D(this,I,N,!0,z)},c.prototype.writeFloatBE=function(I,N,z){return D(this,I,N,!1,z)},c.prototype.writeDoubleLE=function(I,N,z){return L(this,I,N,!0,z)},c.prototype.writeDoubleBE=function(I,N,z){return L(this,I,N,!1,z)},c.prototype.copy=function(I,N,z,W){if(!c.isBuffer(I))throw new TypeError("argument should be a Buffer");if(z||(z=0),W||W===0||(W=this.length),N>=I.length&&(N=I.length),N||(N=0),W>0&&W=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),I.length-N=0;--G)I[G+N]=this[G+z];else Uint8Array.prototype.set.call(I,this.subarray(z,W),N);return X},c.prototype.fill=function(I,N,z,W){if(typeof I=="string"){if(typeof N=="string"?(W=N,N=0,z=this.length):typeof z=="string"&&(W=z,z=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!c.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(I.length===1){var X=I.charCodeAt(0);(W==="utf8"&&X<128||W==="latin1")&&(I=X)}}else typeof I=="number"&&(I&=255);if(N<0||this.length>>=0,z=z===void 0?this.length:z>>>0,I||(I=0),typeof I=="number")for(G=N;G55295&&z<57344){if(!X){if(z>56319){(N-=3)>-1&&G.push(239,191,189);continue}if(at+1===W){(N-=3)>-1&&G.push(239,191,189);continue}X=z;continue}if(z<56320){(N-=3)>-1&&G.push(239,191,189),X=z;continue}z=65536+(X-55296<<10|z-56320)}else X&&(N-=3)>-1&&G.push(239,191,189);if(X=null,z<128){if((N-=1)<0)break;G.push(z)}else if(z<2048){if((N-=2)<0)break;G.push(z>>6|192,63&z|128)}else if(z<65536){if((N-=3)<0)break;G.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;G.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return G}function V(I){return v.toByteArray(function(N){if((N=(N=N.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;N.length%4!=0;)N+="=";return N}(I))}function q(I,N,z,W){for(var X=0;X=N.length||X>=I.length);++X)N[X+z]=I[X];return X}function $(I,N){return I instanceof N||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===N.name}function F(I){return I!=I}}).call(this,h("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(h,A,E){(function(y){A.exports=function(p,v){for(var d=Math.min(p.length,v.length),m=new y(d),c=0;cr;)if((n=t[r++])!=n)return!0}else for(;e>r;r++)if((m||r in t)&&t[r]===f)return m||r||0;return!m&&-1}};A.exports={includes:d(!0),indexOf:d(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(h,A,E){var y=h("../internals/function-bind-context"),p=h("../internals/indexed-object"),v=h("../internals/to-object"),d=h("../internals/to-length"),m=h("../internals/array-species-create"),c=[].push,f=function(s){var n=s==1,t=s==2,e=s==3,r=s==4,i=s==6,o=s==5||i;return function(a,u,l,b){for(var w,T,j=v(a),P=p(j),O=y(u,l,3),C=d(P.length),_=0,S=b||m,g=n?S(a,C):t?S(a,0):void 0;C>_;_++)if((o||_ in P)&&(T=O(w=P[_],_,j),s)){if(n)g[_]=T;else if(T)switch(s){case 3:return!0;case 5:return w;case 6:return _;case 2:c.call(g,w)}else if(r)return!1}return i?-1:e||r?r:g}};A.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6)}},{"../internals/array-species-create":227,"../internals/function-bind-context":248,"../internals/indexed-object":257,"../internals/to-length":307,"../internals/to-object":308}],226:[function(h,A,E){var y=h("../internals/descriptors"),p=h("../internals/fails"),v=h("../internals/has"),d=Object.defineProperty,m={},c=function(f){throw f};A.exports=function(f,s){if(v(m,f))return m[f];s||(s={});var n=[][f],t=!!v(s,"ACCESSORS")&&s.ACCESSORS,e=v(s,0)?s[0]:c,r=v(s,1)?s[1]:void 0;return m[f]=!!n&&!p(function(){if(t&&!y)return!0;var i={length:-1};t?d(i,1,{enumerable:!0,get:c}):i[1]=1,n.call(i,e,r)})}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(h,A,E){var y=h("../internals/is-object"),p=h("../internals/is-array"),v=h("../internals/well-known-symbol")("species");A.exports=function(d,m){var c;return p(d)&&(typeof(c=d.constructor)!="function"||c!==Array&&!p(c.prototype)?y(c)&&(c=c[v])===null&&(c=void 0):c=void 0),new(c===void 0?Array:c)(m===0?0:m)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(h,A,E){var y=h("../internals/an-object");A.exports=function(p,v,d,m){try{return m?v(y(d)[0],d[1]):v(d)}catch(f){var c=p.return;throw c!==void 0&&y(c.call(p)),f}}},{"../internals/an-object":223}],229:[function(h,A,E){var y=h("../internals/well-known-symbol")("iterator"),p=!1;try{var v=0,d={next:function(){return{done:!!v++}},return:function(){p=!0}};d[y]=function(){return this},Array.from(d,function(){throw 2})}catch(m){}A.exports=function(m,c){if(!c&&!p)return!1;var f=!1;try{var s={};s[y]=function(){return{next:function(){return{done:f=!0}}}},m(s)}catch(n){}return f}},{"../internals/well-known-symbol":314}],230:[function(h,A,E){var y={}.toString;A.exports=function(p){return y.call(p).slice(8,-1)}},{}],231:[function(h,A,E){var y=h("../internals/to-string-tag-support"),p=h("../internals/classof-raw"),v=h("../internals/well-known-symbol")("toStringTag"),d=p(function(){return arguments}())=="Arguments";A.exports=y?p:function(m){var c,f,s;return m===void 0?"Undefined":m===null?"Null":typeof(f=function(n,t){try{return n[t]}catch(e){}}(c=Object(m),v))=="string"?f:d?p(c):(s=p(c))=="Object"&&typeof c.callee=="function"?"Arguments":s}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(h,A,E){var y=h("../internals/has"),p=h("../internals/own-keys"),v=h("../internals/object-get-own-property-descriptor"),d=h("../internals/object-define-property");A.exports=function(m,c){for(var f=p(c),s=d.f,n=v.f,t=0;t=74)&&(y=d.match(/Chrome\/(\d+)/))&&(p=y[1]),A.exports=p&&+p},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(h,A,E){A.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(h,A,E){var y=h("../internals/global"),p=h("../internals/object-get-own-property-descriptor").f,v=h("../internals/create-non-enumerable-property"),d=h("../internals/redefine"),m=h("../internals/set-global"),c=h("../internals/copy-constructor-properties"),f=h("../internals/is-forced");A.exports=function(s,n){var t,e,r,i,o,a=s.target,u=s.global,l=s.stat;if(t=u?y:l?y[a]||m(a,{}):(y[a]||{}).prototype)for(e in n){if(i=n[e],r=s.noTargetGet?(o=p(t,e))&&o.value:t[e],!f(u?e:a+(l?".":"#")+e,s.forced)&&r!==void 0){if(typeof i==typeof r)continue;c(i,r)}(s.sham||r&&r.sham)&&v(i,"sham",!0),d(t,e,i,s)}}},{"../internals/copy-constructor-properties":232,"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/is-forced":262,"../internals/object-get-own-property-descriptor":279,"../internals/redefine":294,"../internals/set-global":296}],247:[function(h,A,E){A.exports=function(y){try{return!!y()}catch(p){return!0}}},{}],248:[function(h,A,E){var y=h("../internals/a-function");A.exports=function(p,v,d){if(y(p),v===void 0)return p;switch(d){case 0:return function(){return p.call(v)};case 1:return function(m){return p.call(v,m)};case 2:return function(m,c){return p.call(v,m,c)};case 3:return function(m,c,f){return p.call(v,m,c,f)}}return function(){return p.apply(v,arguments)}}},{"../internals/a-function":219}],249:[function(h,A,E){var y=h("../internals/path"),p=h("../internals/global"),v=function(d){return typeof d=="function"?d:void 0};A.exports=function(d,m){return arguments.length<2?v(y[d])||v(p[d]):y[d]&&y[d][m]||p[d]&&p[d][m]}},{"../internals/global":251,"../internals/path":290}],250:[function(h,A,E){var y=h("../internals/classof"),p=h("../internals/iterators"),v=h("../internals/well-known-symbol")("iterator");A.exports=function(d){if(d!=null)return d[v]||d["@@iterator"]||p[y(d)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(h,A,E){(function(y){var p=function(v){return v&&v.Math==Math&&v};A.exports=p(typeof globalThis=="object"&&globalThis)||p(typeof window=="object"&&window)||p(typeof self=="object"&&self)||p(typeof y=="object"&&y)||Function("return this")()}).call(this,typeof ne<"u"?ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],252:[function(h,A,E){var y={}.hasOwnProperty;A.exports=function(p,v){return y.call(p,v)}},{}],253:[function(h,A,E){A.exports={}},{}],254:[function(h,A,E){var y=h("../internals/global");A.exports=function(p,v){var d=y.console;d&&d.error&&(arguments.length===1?d.error(p):d.error(p,v))}},{"../internals/global":251}],255:[function(h,A,E){var y=h("../internals/get-built-in");A.exports=y("document","documentElement")},{"../internals/get-built-in":249}],256:[function(h,A,E){var y=h("../internals/descriptors"),p=h("../internals/fails"),v=h("../internals/document-create-element");A.exports=!y&&!p(function(){return Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(h,A,E){var y=h("../internals/fails"),p=h("../internals/classof-raw"),v="".split;A.exports=y(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return p(d)=="String"?v.call(d,""):Object(d)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(h,A,E){var y=h("../internals/shared-store"),p=Function.toString;typeof y.inspectSource!="function"&&(y.inspectSource=function(v){return p.call(v)}),A.exports=y.inspectSource},{"../internals/shared-store":300}],259:[function(h,A,E){var y,p,v,d=h("../internals/native-weak-map"),m=h("../internals/global"),c=h("../internals/is-object"),f=h("../internals/create-non-enumerable-property"),s=h("../internals/has"),n=h("../internals/shared-key"),t=h("../internals/hidden-keys"),e=m.WeakMap;if(d){var r=new e,i=r.get,o=r.has,a=r.set;y=function(l,b){return a.call(r,l,b),b},p=function(l){return i.call(r,l)||{}},v=function(l){return o.call(r,l)}}else{var u=n("state");t[u]=!0,y=function(l,b){return f(l,u,b),b},p=function(l){return s(l,u)?l[u]:{}},v=function(l){return s(l,u)}}A.exports={set:y,get:p,has:v,enforce:function(l){return v(l)?p(l):y(l,{})},getterFor:function(l){return function(b){var w;if(!c(b)||(w=p(b)).type!==l)throw TypeError("Incompatible receiver, "+l+" required");return w}}}},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/is-object":263,"../internals/native-weak-map":272,"../internals/shared-key":299}],260:[function(h,A,E){var y=h("../internals/well-known-symbol"),p=h("../internals/iterators"),v=y("iterator"),d=Array.prototype;A.exports=function(m){return m!==void 0&&(p.Array===m||d[v]===m)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(h,A,E){var y=h("../internals/classof-raw");A.exports=Array.isArray||function(p){return y(p)=="Array"}},{"../internals/classof-raw":230}],262:[function(h,A,E){var y=h("../internals/fails"),p=/#|\.prototype\./,v=function(s,n){var t=m[d(s)];return t==f||t!=c&&(typeof n=="function"?y(n):!!n)},d=v.normalize=function(s){return String(s).replace(p,".").toLowerCase()},m=v.data={},c=v.NATIVE="N",f=v.POLYFILL="P";A.exports=v},{"../internals/fails":247}],263:[function(h,A,E){A.exports=function(y){return typeof y=="object"?y!==null:typeof y=="function"}},{}],264:[function(h,A,E){A.exports=!1},{}],265:[function(h,A,E){var y=h("../internals/is-object"),p=h("../internals/classof-raw"),v=h("../internals/well-known-symbol")("match");A.exports=function(d){var m;return y(d)&&((m=d[v])!==void 0?!!m:p(d)=="RegExp")}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(h,A,E){var y=h("../internals/an-object"),p=h("../internals/is-array-iterator-method"),v=h("../internals/to-length"),d=h("../internals/function-bind-context"),m=h("../internals/get-iterator-method"),c=h("../internals/call-with-safe-iteration-closing"),f=function(s,n){this.stopped=s,this.result=n};(A.exports=function(s,n,t,e,r){var i,o,a,u,l,b,w,T=d(n,t,e?2:1);if(r)i=s;else{if(typeof(o=m(s))!="function")throw TypeError("Target is not iterable");if(p(o)){for(a=0,u=v(s.length);u>a;a++)if((l=e?T(y(w=s[a])[0],w[1]):T(s[a]))&&l instanceof f)return l;return new f(!1)}i=o.call(s)}for(b=i.next;!(w=b.call(i)).done;)if(typeof(l=c(i,T,w.value,e))=="object"&&l&&l instanceof f)return l;return new f(!1)}).stop=function(s){return new f(!0,s)}},{"../internals/an-object":223,"../internals/call-with-safe-iteration-closing":228,"../internals/function-bind-context":248,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":260,"../internals/to-length":307}],267:[function(h,A,E){var y,p,v,d=h("../internals/object-get-prototype-of"),m=h("../internals/create-non-enumerable-property"),c=h("../internals/has"),f=h("../internals/well-known-symbol"),s=h("../internals/is-pure"),n=f("iterator"),t=!1;[].keys&&("next"in(v=[].keys())?(p=d(d(v)))!==Object.prototype&&(y=p):t=!0),y==null&&(y={}),s||c(y,n)||m(y,n,function(){return this}),A.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:t}},{"../internals/create-non-enumerable-property":236,"../internals/has":252,"../internals/is-pure":264,"../internals/object-get-prototype-of":283,"../internals/well-known-symbol":314}],268:[function(h,A,E){arguments[4][253][0].apply(E,arguments)},{dup:253}],269:[function(h,A,E){var y,p,v,d,m,c,f,s,n=h("../internals/global"),t=h("../internals/object-get-own-property-descriptor").f,e=h("../internals/classof-raw"),r=h("../internals/task").set,i=h("../internals/engine-is-ios"),o=n.MutationObserver||n.WebKitMutationObserver,a=n.process,u=n.Promise,l=e(a)=="process",b=t(n,"queueMicrotask"),w=b&&b.value;w||(y=function(){var T,j;for(l&&(T=a.domain)&&T.exit();p;){j=p.fn,p=p.next;try{j()}catch(P){throw p?d():v=void 0,P}}v=void 0,T&&T.enter()},l?d=function(){a.nextTick(y)}:o&&!i?(m=!0,c=document.createTextNode(""),new o(y).observe(c,{characterData:!0}),d=function(){c.data=m=!m}):u&&u.resolve?(f=u.resolve(void 0),s=f.then,d=function(){s.call(f,y)}):d=function(){r.call(n,y)}),A.exports=w||function(T){var j={fn:T,next:void 0};v&&(v.next=j),p||(p=j,d()),v=j}},{"../internals/classof-raw":230,"../internals/engine-is-ios":242,"../internals/global":251,"../internals/object-get-own-property-descriptor":279,"../internals/task":303}],270:[function(h,A,E){var y=h("../internals/global");A.exports=y.Promise},{"../internals/global":251}],271:[function(h,A,E){var y=h("../internals/fails");A.exports=!!Object.getOwnPropertySymbols&&!y(function(){return!String(Symbol())})},{"../internals/fails":247}],272:[function(h,A,E){var y=h("../internals/global"),p=h("../internals/inspect-source"),v=y.WeakMap;A.exports=typeof v=="function"&&/native code/.test(p(v))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(h,A,E){var y=h("../internals/a-function"),p=function(v){var d,m;this.promise=new v(function(c,f){if(d!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");d=c,m=f}),this.resolve=y(d),this.reject=y(m)};A.exports.f=function(v){return new p(v)}},{"../internals/a-function":219}],274:[function(h,A,E){var y=h("../internals/is-regexp");A.exports=function(p){if(y(p))throw TypeError("The method doesn't accept regular expressions");return p}},{"../internals/is-regexp":265}],275:[function(h,A,E){var y=h("../internals/descriptors"),p=h("../internals/fails"),v=h("../internals/object-keys"),d=h("../internals/object-get-own-property-symbols"),m=h("../internals/object-property-is-enumerable"),c=h("../internals/to-object"),f=h("../internals/indexed-object"),s=Object.assign,n=Object.defineProperty;A.exports=!s||p(function(){if(y&&s({b:1},s(n({},"a",{enumerable:!0,get:function(){n(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(i){e[i]=i}),s({},t)[r]!=7||v(s({},e)).join("")!="abcdefghijklmnopqrst"})?function(t,e){for(var r=c(t),i=arguments.length,o=1,a=d.f,u=m.f;i>o;)for(var l,b=f(arguments[o++]),w=a?v(b).concat(a(b)):v(b),T=w.length,j=0;T>j;)l=w[j++],y&&!u.call(b,l)||(r[l]=b[l]);return r}:s},{"../internals/descriptors":240,"../internals/fails":247,"../internals/indexed-object":257,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-object":308}],276:[function(h,A,E){var y,p=h("../internals/an-object"),v=h("../internals/object-define-properties"),d=h("../internals/enum-bug-keys"),m=h("../internals/hidden-keys"),c=h("../internals/html"),f=h("../internals/document-create-element"),s=h("../internals/shared-key"),n=s("IE_PROTO"),t=function(){},e=function(i){return"