25 lines
80 KiB
JavaScript
25 lines
80 KiB
JavaScript
/**
|
|
* @preserve tableExport.jquery.plugin
|
|
*
|
|
* Version 1.21
|
|
*
|
|
* Copyright (c) 2015-2021 hhurz,
|
|
* https://github.com/hhurz/tableExport.jquery.plugin
|
|
*
|
|
* Based on https://github.com/kayalshri/tableExport.jquery.plugin
|
|
*
|
|
* Licensed under the MIT License
|
|
**/
|
|
/*
|
|
tableExport.jquery.plugin
|
|
|
|
Version 1.21
|
|
|
|
Copyright (c) 2015-2021 hhurz,
|
|
https://github.com/hhurz/tableExport.jquery.plugin
|
|
|
|
Based on https://github.com/kayalshri/tableExport.jquery.plugin
|
|
|
|
Licensed under the MIT License
|
|
*/
|
|
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(d,T,Ia){if(Ia.get||Ia.set)throw new TypeError("ES3 does not support getters and setters.");d!=Array.prototype&&d!=Object.prototype&&(d[T]=Ia.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global?global:d};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(d){return $jscomp.SYMBOL_PREFIX+(d||"")+$jscomp.symbolCounter_++};$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var d=$jscomp.global.Symbol.iterator;d||(d=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[d]&&$jscomp.defineProperty(Array.prototype,d,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(d){var T=0;return $jscomp.iteratorPrototype(function(){return T<d.length?{done:!1,value:d[T++]}:{done:!0}})};$jscomp.iteratorPrototype=function(d){$jscomp.initSymbolIterator();d={next:d};d[$jscomp.global.Symbol.iterator]=function(){return this};return d};(function(d){function T(){return{theme:"striped",styles:{},headerStyles:{},bodyStyles:{},alternateRowStyles:{},columnStyles:{},startY:!1,margin:40,pageBreak:"auto",tableWidth:"auto",createdHeaderCell:function(d,J){},createdCell:function(d,J){},drawHeaderRow:function(d,J){},drawRow:function(d,J){},drawHeaderCell:function(d,J){},drawCell:function(d,J){},beforePageContent:function(d){},afterPageContent:function(d){}}}d.fn.tableExport=function(bb){function J(a){var c=[];K(a,"thead").each(function(){c.push.apply(c,K(d(this),b.theadSelector).toArray())});return c}function qa(a){var c=[];K(a,"tbody").each(function(){c.push.apply(c,K(d(this),b.tbodySelector).toArray())});b.tfootSelector.length&&K(a,"tfoot").each(function(){c.push.apply(c,K(d(this),b.tfootSelector).toArray())});return c}function K(a,c){var b=a[0].tagName,g=a.parents(b).length;return a.find(c).filter(function(){return g===d(this).closest(b).parents(b).length})}function Sa(a){var c=[],b=0,g=0,f=0;d(a).find("thead").first().find("th").each(function(a,e){var h=void 0!==d(e).attr("data-field");"undefined"!==typeof e.parentNode.rowIndex&&g!==e.parentNode.rowIndex&&(g=e.parentNode.rowIndex,b=f=0);var l=P(e);for(b+=l?l:1;f<b;)c[f]=h?d(e).attr("data-field"):f.toString(),f++});return c}function U(a){var c="undefined"!==typeof a[0].rowIndex,b=!1===c&&"undefined"!==typeof a[0].cellIndex,g=b||c?Ib(a):a.is(":visible"),f=a.attr("data-tableexport-display");b&&"none"!==f&&"always"!==f&&(a=d(a[0].parentNode),c="undefined"!==typeof a[0].rowIndex,f=a.attr("data-tableexport-display"));c&&"none"!==f&&"always"!==f&&(f=a.closest("table").attr("data-tableexport-display"));return"none"!==f&&(!0===g||"always"===f)}function Ib(a){var c=[];Ca&&(c=L.filter(function(){var c=!1;this.nodeType===a[0].nodeType&&("undefined"!==typeof this.rowIndex&&this.rowIndex===a[0].rowIndex?c=!0:"undefined"!==typeof this.cellIndex&&this.cellIndex===a[0].cellIndex&&"undefined"!==typeof this.parentNode.rowIndex&&"undefined"!==typeof a[0].parentNode.rowIndex&&this.parentNode.rowIndex===a[0].parentNode.rowIndex&&(c=!0));return c}));return!1===Ca||0===c.length}function cb(a,c,e){var g=!1;U(a)?0<b.ignoreColumn.length&&(-1!==d.inArray(e,b.ignoreColumn)||-1!==d.inArray(e-c,b.ignoreColumn)||xa.length>e&&"undefined"!==typeof xa[e]&&-1!==d.inArray(xa[e],b.ignoreColumn))&&(g=!0):g=!0;return g}function n(a,c,e,g,f){if("function"===typeof f){var y=!1;"function"===typeof b.onIgnoreRow&&(y=b.onIgnoreRow(d(a),e));if(!1===y&&(0===b.ignoreRow.length||-1===d.inArray(e,b.ignoreRow)&&-1===d.inArray(e-g,b.ignoreRow))&&U(d(a))){a=K(d(a),c);var l=a.length,h=0,q=0;a.each(function(){var a=d(this),c=P(this),b=ra(this),g;d.each(M,function(){if(e>this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(g=0;g<=this.e.c-this.s.c;++g)l++,q++,f(null,e,h++)});if(b||c)c=c||1,M.push({s:{r:e,c:h},e:{r:e+(b||1)-1,c:h+c-1}});!1===cb(a,l,q++)&&f(this,e,h++);if(1<c)for(g=0;g<c-1;++g)q++,f(null,e,h++)});d.each(M,function(){if(e>=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f(null,e,h++)})}}}function eb(a,c,b,g){if("undefined"!==typeof g.images&&(b=g.images[b],"undefined"!==typeof b)){c=c.getBoundingClientRect();var e=a.width/a.height,d=c.width/c.height,l=a.width,h=a.height,q=19.049976/25.4,db=0;d<=e?(h=Math.min(a.height,c.height),l=c.width*h/c.height):d>e&&(l=Math.min(a.width,c.width),h=c.height*l/c.width);l*=q;h*=q;h<a.height&&(db=(a.height-h)/2);try{g.doc.addImage(b.src,a.textPos.x,a.y+db,l,h)}catch(C){}a.textPos.x+=l}}function Ja(a,c){if("string"===b.outputMode)return a.output();if("base64"===b.outputMode)return fa(a.output());if("window"===b.outputMode)window.URL=window.URL||window.webkitURL,window.open(window.URL.createObjectURL(a.output("blob")));else try{var e=a.output("blob");saveAs(e,b.fileName+".pdf")}catch(g){ga(b.fileName+".pdf","data:application/pdf"+(c?"":";base64")+",",c?a.output("blob"):a.output())}}function u(a,c,b){var e=0;"undefined"!==typeof b&&(e=b.colspan);if(0<=e){for(var f=a.width,d=a.textPos.x,l=c.table.columns.indexOf(c.column),h=1;h<e;h++)f+=c.table.columns[l+h].width;1<e&&("right"===a.styles.halign?d=a.textPos.x+f-a.width:"center"===a.styles.halign&&(d=a.textPos.x+(f-a.width)/2));a.width=f;a.textPos.x=d;"undefined"!==typeof b&&1<b.rowspan&&(a.height*=b.rowspan);if("middle"===a.styles.valign||"bottom"===a.styles.valign)b=("string"===typeof a.text?a.text.split(/\r\n|\r|\n/g):a.text).length||1,2<b&&(a.textPos.y-=(2-1.15)/2*c.row.styles.fontSize*(b-2)/3);return!0}return!1}function G(a,c,b){"undefined"!==typeof a&&null!==a&&(a.hasAttribute("data-tableexport-canvas")?(c=(new Date).getTime(),d(a).attr("data-tableexport-canvas",c),b.images[c]={url:'[data-tableexport-canvas\x3d"'+c+'"]',src:null}):"undefined"!==c&&null!=c&&c.each(function(){if(d(this).is("img")){var c=sa(this.src);b.images[c]={url:this.src,src:this.src}}G(a,d(this).children(),b)}))}function ya(a,c){function b(a){if(a.url)if(a.src){var b=new Image;g=++f;b.crossOrigin="Anonymous";b.onerror=b.onload=function(){if(b.complete&&(0===b.src.indexOf("data:image/")&&(b.width=a.width||b.width||0,b.height=a.height||b.height||0),b.width+b.height)){var e=document.createElement("canvas"),h=e.getContext("2d");e.width=b.width;e.height=b.height;h.drawImage(b,0,0);a.src=e.toDataURL("image/png")}--f||c(g)};b.src=a.url}else{var e=d(a.url);e.length&&(g=++f,html2canvas(e[0]).then(function(b){a.src=b.toDataURL("image/png");--f||c(g)}))}}var g=0,f=0;if("undefined"!==typeof a.images)for(var y in a.images)a.images.hasOwnProperty(y)&&b(a.images[y]);(y=f)||(c(g),y=void 0);return y}function fb(a,c,e){c.each(function(){if(d(this).is("div")){var c=Ta(da(this,"background-color"),[255,255,255]),f=Ta(da(this,"border-top-color"),[0,0,0]),y=gb(this,"border-top-width",b.jspdf.unit),l=this.getBoundingClientRect(),h=this.offsetLeft*e.wScaleFactor,q=this.offsetTop*e.hScaleFactor,k=l.width*e.wScaleFactor,l=l.height*e.hScaleFactor;e.doc.setDrawColor.apply(void 0,f);e.doc.setFillColor.apply(void 0,c);e.doc.setLineWidth(y);e.doc.rect(a.x+h,a.y+q,k,l,y?"FD":"F")}else d(this).is("img")&&(c=sa(this.src),eb(a,this,c,e));fb(a,d(this).children(),e)})}function hb(a,c,e){if("function"===typeof e.onAutotableText)e.onAutotableText(e.doc,a,c);else{var g=a.textPos.x,f=a.textPos.y,y={halign:a.styles.halign,valign:a.styles.valign};if(c.length){for(c=c[0];c.previousSibling;)c=c.previousSibling;for(var l=!1,h=!1;c;){var q=c.innerText||c.textContent||"",k=q.length&&" "===q[0]?" ":"",C=1<q.length&&" "===q[q.length-1]?" ":"";!0!==b.preserve.leadingWS&&(q=k+Ka(q));!0!==b.preserve.trailingWS&&(q=ib(q)+C);d(c).is("br")&&(g=a.textPos.x,f+=e.doc.internal.getFontSize());d(c).is("b")?l=!0:d(c).is("i")&&(h=!0);(l||h)&&e.doc.setFont("undefined ",l&&h?"bolditalic":l?"bold":"italic");if(k=e.doc.getStringUnitWidth(q)*e.doc.internal.getFontSize()){"linebreak"===a.styles.overflow&&g>a.textPos.x&&g+k>a.textPos.x+a.width&&(0<=".,!%*;:\x3d-".indexOf(q.charAt(0))&&(C=q.charAt(0),k=e.doc.getStringUnitWidth(C)*e.doc.internal.getFontSize(),g+k<=a.textPos.x+a.width&&(La(C,g,f,y),q=q.substring(1,q.length)),k=e.doc.getStringUnitWidth(q)*e.doc.internal.getFontSize()),g=a.textPos.x,f+=e.doc.internal.getFontSize());if("visible"!==a.styles.overflow)for(;q.length&&g+k>a.textPos.x+a.width;)q=q.substring(0,q.length-1),k=e.doc.getStringUnitWidth(q)*e.doc.internal.getFontSize();La(q,g,f,y);g+=k}if(l||h)d(c).is("b")?l=!1:d(c).is("i")&&(h=!1),e.doc.setFont("undefined ",l||h?l?"bold":"italic":"normal");c=c.nextSibling}a.textPos.x=g;a.textPos.y=f}else La(a.text,a.textPos.x,a.textPos.y,y)}}function za(a,c,b){return null==a?"":a.toString().replace(new RegExp(null==c?"":c.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),b)}function Ka(a){return null==a?"":a.toString().replace(/^\s+/,"")}function ib(a){return null==a?"":a.toString().replace(/\s+$/,"")}function Ma(a){if(0===b.date.html.length)return!1;b.date.pattern.lastIndex=0;var c=b.date.pattern.exec(a);if(null==c)return!1;a=+c[b.date.match_y];if(0>a||8099<a)return!1;var e=1*c[b.date.match_m],c=1*c[b.date.match_d];if(!isFinite(c))return!1;var g=new Date(a,e-1,c,0,0,0);return g.getFullYear()===a&&g.getMonth()===e-1&&g.getDate()===c?new Date(Date.UTC(a,e-1,c,0,0,0)):!1}function jb(a){a=a||"0";""!==b.numbers.html.thousandsSeparator&&(a=za(a,b.numbers.html.thousandsSeparator,""));"."!==b.numbers.html.decimalMark&&(a=za(a,b.numbers.html.decimalMark,"."));return"number"===typeof a||!1!==jQuery.isNumeric(a)?a:!1}function ta(a){-1<a.indexOf("%")?(a=jb(a.replace(/%/g,"")),!1!==a&&(a/=100)):a=!1;return a}function E(a,c,e,g){var f="",y="text";if(null!==a){var l=d(a),h;l.removeData("teUserDefText");if(l[0].hasAttribute("data-tableexport-canvas"))h="";else if(l[0].hasAttribute("data-tableexport-value"))h=(h=l.attr("data-tableexport-value"))?h+"":"",l.data("teUserDefText",1);else if(h=l.html(),"function"===typeof b.onCellHtmlData)h=b.onCellHtmlData(l,c,e,h),l.data("teUserDefText",1);else if(""!==h){a=d.parseHTML(h);var q=0,k=0;h="";d.each(a,function(){if(d(this).is("input"))h+=l.find("input").eq(q++).val();else if(d(this).is("select"))h+=l.find("select option:selected").eq(k++).text();else if(d(this).is("br"))h+="\x3cbr\x3e";else{if("undefined"===typeof d(this).html())h+=d(this).text();else if(void 0===jQuery().bootstrapTable||!1===d(this).hasClass("fht-cell")&&!1===d(this).hasClass("filterControl")&&0===l.parents(".detail-view").length)h+=d(this).html();if(d(this).is("a")){var a=l.find("a").attr("href")||"";f="function"===typeof b.onCellHtmlHyperlink?f+b.onCellHtmlHyperlink(l,c,e,a,h):"href"===b.htmlHyperlink?f+a:f+h;h=""}}})}if(h&&""!==h&&!0===b.htmlContent)f=d.trim(h);else if(h&&""!==h)if(""!==l.attr("data-tableexport-cellformat")){var C=h.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi,"\u2060"),V=d("\x3cdiv/\x3e").html(C).contents();a=!1;C="";d.each(V.text().split("\u2028"),function(a,c){0<a&&(C+=" ");!0!==b.preserve.leadingWS&&(c=Ka(c));C+=!0!==b.preserve.trailingWS?ib(c):c});d.each(C.split("\u2060"),function(a,c){0<a&&(f+="\n");!0!==b.preserve.leadingWS&&(c=Ka(c));!0!==b.preserve.trailingWS&&(c=ib(c));f+=c.replace(/\u00AD/g,"")});f=f.replace(/\u00A0/g," ");if("json"===b.type||"excel"===b.type&&"xmlss"===b.mso.fileFormat||!1===b.numbers.output)a=jb(f),!1!==a&&(y="number",f=Number(a));else if(b.numbers.html.decimalMark!==b.numbers.output.decimalMark||b.numbers.html.thousandsSeparator!==b.numbers.output.thousandsSeparator)if(a=jb(f),!1!==a){V=(""+a.substr(0>a?1:0)).split(".");1===V.length&&(V[1]="");var m=3<V[0].length?V[0].length%3:0,y="number",f=(0>a?"-":"")+(b.numbers.output.thousandsSeparator?(m?V[0].substr(0,m)+b.numbers.output.thousandsSeparator:"")+V[0].substr(m).replace(/(\d{3})(?=\d)/g,"$1"+b.numbers.output.thousandsSeparator):V[0])+(V[1].length?b.numbers.output.decimalMark+V[1]:"")}}else f=h;!0===b.escape&&(f=escape(f));"function"===typeof b.onCellData&&(f=b.onCellData(l,c,e,f,y),l.data("teUserDefText",1))}void 0!==g&&(g.type=y);return f}function Q(a){return 0<a.length&&!0===b.preventInjection&&0<="\x3d+-@".indexOf(a.charAt(0))?"'"+a:a}function kb(a,c,b){return c+"-"+b.toLowerCase()}function Ta(a,c){var b=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(a),g=c;b&&(g=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]);return g}function W(a){var c=da(a,"text-align"),b=da(a,"font-weight"),g=da(a,"font-style"),f="";"start"===c&&(c="rtl"===da(a,"direction")?"right":"left");700<=b&&(f="bold");"italic"===g&&(f+=g);""===f&&(f="normal");c={style:{align:c,bcolor:Ta(da(a,"background-color"),[255,255,255]),color:Ta(da(a,"color"),[0,0,0]),fstyle:f},colspan:P(a),rowspan:ra(a)};null!==a&&(a=a.getBoundingClientRect(),c.rect={width:a.width,height:a.height});return c}function P(a){var c=d(a).attr("data-tableexport-colspan");"undefined"===typeof c&&d(a).is("[colspan]")&&(c=d(a).attr("colspan"));return parseInt(c)||0}function ra(a){var c=d(a).attr("data-tableexport-rowspan");"undefined"===typeof c&&d(a).is("[rowspan]")&&(c=d(a).attr("rowspan"));return parseInt(c)||0}function da(a,c){try{return window.getComputedStyle?(c=c.replace(/([a-z])([A-Z])/,kb),window.getComputedStyle(a,null).getPropertyValue(c)):a.currentStyle?a.currentStyle[c]:a.style[c]}catch(e){}return""}function gb(a,c,b){c=da(a,c).match(/\d+/);if(null!==c){c=c[0];a=a.parentElement;var e=document.createElement("div");e.style.overflow="hidden";e.style.visibility="hidden";a.appendChild(e);e.style.width=100+b;b=100/e.offsetWidth;a.removeChild(e);return c*b}return 0}function yb(a){for(var c=new ArrayBuffer(a.length),b=new Uint8Array(c),d=0;d!==a.length;++d)b[d]=a.charCodeAt(d)&255;return c}function R(a){var c=a.c,b="";for(++c;c;c=Math.floor((c-1)/26))b=String.fromCharCode((c-1)%26+65)+b;return b+(""+(a.r+1))}function Ua(a,c){if("undefined"===typeof c||"number"===typeof c)return Ua(a.s,a.e);"string"!==typeof a&&(a=R(a));"string"!==typeof c&&(c=R(c));return a===c?a:a+":"+c}function Da(a,c){var b=Number(a);if(isFinite(b))return b;var d=1,f=a;""!==c.thousandsSeparator&&(f=f.replace(new RegExp("([\\d])"+c.thousandsSeparator+"([\\d])","g"),"$1$2"));"."!==c.decimalMark&&(f=f.replace(new RegExp("([\\d])"+c.decimalMark+"([\\d])","g"),"$1.$2"));f=f.replace(/[$]/g,"").replace(/[%]/g,function(){d*=100;return""});if(isFinite(b=Number(f)))return b/d;f=f.replace(/[(](.*)[)]/,function(a,c){d=-d;return c});return isFinite(b=Number(f))?b/d:b}function sa(a){var c=0,b,d,f;if(0===a.length)return c;b=0;for(f=a.length;b<f;b++)d=a.charCodeAt(b),c=(c<<5)-c+d,c|=0;return c}function X(a,c,e,d,f,y){var g=!0;"function"===typeof b.onBeforeSaveToFile&&(g=b.onBeforeSaveToFile(a,c,e,d,f),"boolean"!==typeof g&&(g=!0));if(g)try{if(zb=new Blob([a],{type:e+";charset\x3d"+d}),saveAs(zb,c,!1===y),"function"===typeof b.onAfterSaveToFile)b.onAfterSaveToFile(a,c)}catch(h){ga(c,"data:"+e+(d.length?";charset\x3d"+d:"")+(f.length?";"+f:"")+",",y?"\ufeff"+a:a)}}function ga(a,c,e){var d=window.navigator.userAgent;if(!1!==a&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([e]),a);else if(!1!==a&&(0<d.indexOf("MSIE ")||d.match(/Trident.*rv\:11\./))){if(c=document.createElement("iframe")){document.body.appendChild(c);c.setAttribute("style","display:none");c.contentDocument.open("txt/plain","replace");c.contentDocument.write(e);c.contentDocument.close();c.contentWindow.focus();switch(a.substr(a.lastIndexOf(".")+1)){case "doc":case "json":case "png":case "pdf":case "xls":case "xlsx":a+=".txt"}c.contentDocument.execCommand("SaveAs",!0,a);document.body.removeChild(c)}}else{var f=document.createElement("a");if(f){var y=null;f.style.display="none";!1!==a?f.download=a:f.target="_blank";"object"===typeof e?(window.URL=window.URL||window.webkitURL,d=[],d.push(e),y=window.URL.createObjectURL(new Blob(d,{type:c})),f.href=y):0<=c.toLowerCase().indexOf("base64,")?f.href=c+fa(e):f.href=c+encodeURIComponent(e);document.body.appendChild(f);if(document.createEvent)null===Va&&(Va=document.createEvent("MouseEvents")),Va.initEvent("click",!0,!1),f.dispatchEvent(Va);else if(document.createEventObject)f.fireEvent("onclick");else if("function"===typeof f.onclick)f.onclick();setTimeout(function(){y&&window.URL.revokeObjectURL(y);document.body.removeChild(f);if("function"===typeof b.onAfterSaveToFile)b.onAfterSaveToFile(e,a)},100)}}}function fa(a){var c,b,d,f,y,l,h="",q=0;if("string"===typeof a){a=a.replace(/\x0d\x0a/g,"\n");b="";for(d=0;d<a.length;d++)f=a.charCodeAt(d),128>f?b+=String.fromCharCode(f):(127<f&&2048>f?b+=String.fromCharCode(f>>6|192):(b+=String.fromCharCode(f>>12|224),b+=String.fromCharCode(f>>6&63|128)),b+=String.fromCharCode(f&63|128));a=b}for(;q<a.length;)c=a.charCodeAt(q++),b=a.charCodeAt(q++),d=a.charCodeAt(q++),f=c>>2,c=(c&3)<<4|b>>4,y=(b&15)<<2|d>>6,l=d&63,isNaN(b)?y=l=64:isNaN(d)&&(l=64),h=h+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(y)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(l);return h}function Ab(a,b,e,d){b&&"object"===typeof b||console.error("The headers should be an object or array, is: "+typeof b);e&&"object"===typeof e||console.error("The data should be an object or array, is: "+typeof e);d&&"object"!==typeof d&&console.error("The data should be an object or array, is: "+typeof e);Array.prototype.forEach||console.error("The current browser does not support Array.prototype.forEach which is required for jsPDF-AutoTable");w=a;m=Jb(d||{});lb=1;I={y:!1===m.startY?m.margin.top:m.startY};a={textColor:30,fontSize:w.internal.getFontSize(),fontStyle:w.internal.getFont().fontStyle};Bb(b,e);Kb();b=m.startY+m.margin.bottom+r.headerRow.height+(r.rows[0]&&"auto"===m.pageBreak?r.rows[0].height:0);"avoid"===m.pageBreak&&(b+=r.height);if("always"===m.pageBreak&&!1!==m.startY||!1!==m.startY&&b>w.internal.pageSize.height)w.addPage(),I.y=m.margin.top;Aa(a);m.beforePageContent(Y());!1!==m.drawHeaderRow(r.headerRow,Y({row:r.headerRow}))&&Wa(r.headerRow,m.drawHeaderCell);Aa(a);Cb();m.afterPageContent(Y());Aa(a);return w}function La(a,b,d,g){"number"===typeof b&&"number"===typeof d||console.error("The x and y parameters are required. Missing for the text: ",a);var c=w.internal.getFontSize()/w.internal.scaleFactor,e=/\r\n|\r|\n/g,l=null,h=1;if("middle"===g.valign||"bottom"===g.valign||"center"===g.halign||"right"===g.halign)l="string"===typeof a?a.split(e):a,h=l.length||1;d+=c*(2-1.15);"middle"===g.valign?d-=h/2*c:"bottom"===g.valign&&(d-=h*c);if("center"===g.halign||"right"===g.halign){e=c;"center"===g.halign&&(e*=.5);if(l&&1<=h){for(a=0;a<l.length;a++)w.text(l[a],b-w.getStringUnitWidth(l[a])*e,d),d+=c;return w}b-=w.getStringUnitWidth(a)*e}w.text(a,b,d);return w}function Jb(a){var b=Z(T(),a);"undefined"!==typeof b.extendWidth&&(b.tableWidth=b.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead."));"undefined"!==typeof b.margins&&("undefined"===typeof b.margin&&(b.margin=b.margins),console.error("Use of deprecated option: margins, use margin instead."));[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(a){var c="string"===typeof a?a:a[0];a="string"===typeof a?a:a[1];"undefined"!==typeof b[c]&&("undefined"===typeof b.styles[a]&&(b.styles[a]=b[c]),console.error("Use of deprecated option: "+c+", use the style "+a+" instead."))});var d=b.margin;b.margin={};"number"===typeof d.horizontal&&(d.right=d.horizontal,d.left=d.horizontal);"number"===typeof d.vertical&&(d.top=d.vertical,d.bottom=d.vertical);["top","right","bottom","left"].forEach(function(a,c){if("number"===typeof d)b.margin[a]=d;else{var e=Array.isArray(d)?c:a;b.margin[a]="number"===typeof d[e]?d[e]:40}});return b}function Bb(a,b){r=new Ia;r.x=m.margin.left;var c=/\r\n|\r|\n/g,g=new mb(a);g.index=-1;var f=Z(nb,Na[m.theme].table,Na[m.theme].header);g.styles=Z(f,m.styles,m.headerStyles);a.forEach(function(a,b){"object"===typeof a&&(b="undefined"!==typeof a.dataKey?a.dataKey:a.key);"undefined"!==typeof a.width&&console.error("Use of deprecated option: column.width, use column.styles.columnWidth instead.");var h=new ha(b);h.styles=m.columnStyles[h.dataKey]||{};r.columns.push(h);var e=new Db;e.raw="object"===typeof a?a.title:a;e.styles=d.extend({},g.styles);e.text=""+e.raw;e.contentWidth=2*e.styles.cellPadding+Ea(e.text,e.styles);e.text=e.text.split(c);g.cells[b]=e;m.createdHeaderCell(e,{column:h,row:g,settings:m})});r.headerRow=g;b.forEach(function(a,b){var d=new mb(a),e=0===b%2,f=Z(nb,Na[m.theme].table,e?Na[m.theme].alternateRow:{}),e=Z(m.styles,m.bodyStyles,e?m.alternateRowStyles:{});d.styles=Z(f,e);d.index=b;r.columns.forEach(function(b){var e=new Db;e.raw=a[b.dataKey];e.styles=Z(d.styles,b.styles);e.text="undefined"!==typeof e.raw?""+e.raw:"";d.cells[b.dataKey]=e;m.createdCell(e,Y({column:b,row:d}));e.contentWidth=2*e.styles.cellPadding+Ea(e.text,e.styles);e.text=e.text.split(c)});r.rows.push(d)})}function Kb(){var a=0;r.columns.forEach(function(b){b.contentWidth=r.headerRow.cells[b.dataKey].contentWidth;r.rows.forEach(function(a){a=a.cells[b.dataKey].contentWidth;a>b.contentWidth&&(b.contentWidth=a)});b.width=b.contentWidth;a+=b.contentWidth});r.contentWidth=a;var b=w.internal.pageSize.width-m.margin.left-m.margin.right,d=b;"number"===typeof m.tableWidth?d=m.tableWidth:"wrap"===m.tableWidth&&(d=r.contentWidth);r.width=d<b?d:b;var g=[],f=0,k=r.width/r.columns.length,l=0;r.columns.forEach(function(a){var b=Z(nb,Na[m.theme].table,m.styles,a.styles);"wrap"===b.columnWidth?a.width=a.contentWidth:"number"===typeof b.columnWidth?a.width=b.columnWidth:a.contentWidth<=k&&r.contentWidth>r.width?a.width=a.contentWidth:(g.push(a),f+=a.contentWidth,a.width=0);l+=a.width});Eb(g,l,f,k);r.height=0;r.rows.concat(r.headerRow).forEach(function(a,b){var c=0,d=r.x;r.columns.forEach(function(b){var e=a.cells[b.dataKey];b.x=d;Aa(e.styles);var f=b.width-2*e.styles.cellPadding;"linebreak"===e.styles.overflow?e.text=w.splitTextToSize(e.text,f+1,{fontSize:e.styles.fontSize}):"ellipsize"===e.styles.overflow?e.text=ob(e.text,f,e.styles):"visible"!==e.styles.overflow&&("hidden"===e.styles.overflow?e.text=ob(e.text,f,e.styles,""):"function"===typeof e.styles.overflow?e.text=e.styles.overflow(e.text,f):console.error("Unrecognized overflow type: "+e.styles.overflow));e=Array.isArray(e.text)?e.text.length-1:0;e>c&&(c=e);d+=b.width});a.heightStyle=a.styles.rowHeight;a.height=a.heightStyle+c*a.styles.fontSize*1.15+(2-1.15)/2*a.styles.fontSize;r.height+=a.height})}function Eb(a,b,d,g){for(var c=r.width-b-d,e=0;e<a.length;e++){var l=a[e],h=l.contentWidth/d,q=l.contentWidth+c*h<g;if(0>c&&q){a.splice(e,1);d-=l.contentWidth;l.width=g;b+=l.width;Eb(a,b,d,g);break}else l.width=l.contentWidth+c*h}}function Cb(){r.rows.forEach(function(a,b){I.y+a.height+m.margin.bottom>=w.internal.pageSize.height&&(m.afterPageContent(Y()),w.addPage(),lb++,I={x:m.margin.left,y:m.margin.top},m.beforePageContent(Y()),!1!==m.drawHeaderRow(r.headerRow,Y({row:r.headerRow}))&&Wa(r.headerRow,m.drawHeaderCell));a.y=I.y;!1!==m.drawRow(a,Y({row:a}))&&Wa(a,m.drawCell)})}function Wa(a,b){for(var c=0;c<r.columns.length;c++){var d=r.columns[c],f=a.cells[d.dataKey];f&&(Aa(f.styles),f.x=d.x,f.y=I.y,f.height=a.height,f.width=d.width,f.textPos.y="top"===f.styles.valign?I.y+f.styles.cellPadding:"bottom"===f.styles.valign?I.y+a.height-f.styles.cellPadding:I.y+a.height/2,f.textPos.x="right"===f.styles.halign?f.x+f.width-f.styles.cellPadding:"center"===f.styles.halign?f.x+f.width/2:f.x+f.styles.cellPadding,d=Y({column:d,row:a}),!1!==b(f,d)&&(w.rect(f.x,f.y,f.width,f.height,f.styles.fillStyle),La(f.text,f.textPos.x,f.textPos.y,{halign:f.styles.halign,valign:f.styles.valign})))}I.y+=a.height}function Aa(a){[{func:w.setFillColor,value:a.fillColor},{func:w.setTextColor,value:a.textColor},{func:w.setFont,value:a.font,style:a.fontStyle},{func:w.setDrawColor,value:a.lineColor},{func:w.setLineWidth,value:a.lineWidth},{func:w.setFont,value:a.font},{func:w.setFontSize,value:a.fontSize}].forEach(function(a){"undefined"!==typeof a.value&&(a.value.constructor===Array?a.func.apply(w,a.value):"undefined"!==typeof a.style?a.func(a.value,a.style):a.func(a.value))})}function Y(a){a=a||{};var b={pageCount:lb,settings:m,table:r,cursor:I},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);return b}function ob(a,b,d,g){g="undefined"!==typeof g?g:"...";if(Array.isArray(a))return a.forEach(function(c,e){a[e]=ob(c,b,d,g)}),a;if(b>=Ea(a,d))return a;for(;b<Ea(a+g,d)&&!(2>a.length);)a=a.substring(0,a.length-1);return a.trim()+g}function Ea(a,b){Aa(b);return w.getStringUnitWidth(a)*b.fontSize}function Z(a){var b={},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);for(var g=1;g<arguments.length;g++){var f=arguments[g];for(d in f)f.hasOwnProperty(d)&&(b[d]=f[d])}return b}var N,b={csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,date:{html:"dd/mm/yyyy"},displayTableName:!1,escape:!1,exportHiddenCells:!1,fileName:table_name,htmlContent:!1,htmlHyperlink:"content",ignoreColumn:[0,table_ignoreColumn],ignoreRow:[d("#mytable \x3e tbody \x3e tr").length+1],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},mso:{fileFormat:"xlshtml",onMsoNumberFormat:function(a,b,d){return"\\@"},pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:"",xlsx:{formatId:{date:14,numbers:2},onHyperlink:null}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onAfterSaveToFile:null,onBeforeSaveToFile:null,onCellData:null,onCellHtmlData:null,onCellHtmlHyperlink:null,onIgnoreRow:null,onTableExportBegin:null,onTableExportEnd:null,outputMode:"file",pdfmake:{enabled:!0,docDefinition:{pageSize:"A4",pageOrientation:"landscape",styles:{header:{background:"#34495E",color:"#FFFFFF",bold:!0,alignment:"center",fillColor:"#34495E"},alternateRow:{fillColor:"#f5f5f5"}},defaultStyle:{color:"#000000",fontSize:8,font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},ia={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]},Na={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal",fillStyle:"F"},header:{textColor:255,fillColor:[41,128,185],rowHeight:23,fontStyle:"bold"},body:{},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1,fillStyle:"DF"},header:{textColor:255,fillColor:[26,188,156],rowHeight:23,fillStyle:"F",fontStyle:"bold"},body:{},alternateRow:{}},plain:{header:{fontStyle:"bold"}}},nb={cellPadding:5,fontSize:10,font:"helvetica",lineColor:200,lineWidth:.1,fontStyle:"normal",overflow:"ellipsize",fillColor:255,textColor:20,halign:"left",valign:"top",fillStyle:"F",rowHeight:20,columnWidth:"auto"},B=this,Va=null,z=[],x=[],t=0,v="",xa=[],M=[],zb,L=[],Ca=!1;d.extend(!0,b,bb);"xlsx"===b.type&&(b.mso.fileFormat=b.type,b.type="excel");"undefined"!==typeof b.excelFileFormat&&"undefined"===typeof b.mso.fileFormat&&(b.mso.fileFormat=b.excelFileFormat);"undefined"!==typeof b.excelPageFormat&&"undefined"===typeof b.mso.pageFormat&&(b.mso.pageFormat=b.excelPageFormat);"undefined"!==typeof b.excelPageOrientation&&"undefined"===typeof b.mso.pageOrientation&&(b.mso.pageOrientation=b.excelPageOrientation);"undefined"!==typeof b.excelRTL&&"undefined"===typeof b.mso.rtl&&(b.mso.rtl=b.excelRTL);"undefined"!==typeof b.excelstyles&&"undefined"===typeof b.mso.styles&&(b.mso.styles=b.excelstyles);"undefined"!==typeof b.onMsoNumberFormat&&"undefined"===typeof b.mso.onMsoNumberFormat&&(b.mso.onMsoNumberFormat=b.onMsoNumberFormat);"undefined"!==typeof b.worksheetName&&"undefined"===typeof b.mso.worksheetName&&(b.mso.worksheetName=b.worksheetName);"undefined"!==typeof b.mso.xslx&&"undefined"===typeof b.mso.xlsx&&(b.mso.xlsx=b.mso.xslx);b.mso.pageOrientation="l"===b.mso.pageOrientation.substr(0,1)?"landscape":"portrait";b.date.html=b.date.html||"";if(b.date.html.length){var Ba=[];Ba.dd="(3[01]|[12][0-9]|0?[1-9])";Ba.mm="(1[012]|0?[1-9])";Ba.yyyy="((?:1[6-9]|2[0-2])\\d{2})";Ba.yy="(\\d{2})";var pb=b.date.html.match(/[^a-zA-Z0-9]/)[0],ja=b.date.html.toLowerCase().split(pb);b.date.regex="^\\s*";b.date.regex+=Ba[ja[0]];b.date.regex+="(.)";b.date.regex+=Ba[ja[1]];b.date.regex+="\\2";b.date.regex+=Ba[ja[2]];b.date.regex+="\\s*$";b.date.pattern=new RegExp(b.date.regex,"g");var ua=ja.indexOf("dd")+1;b.date.match_d=ua+(1<ua?1:0);ua=ja.indexOf("mm")+1;b.date.match_m=ua+(1<ua?1:0);ua=(0<=ja.indexOf("yyyy")?ja.indexOf("yyyy"):ja.indexOf("yy"))+1;b.date.match_y=ua+(1<ua?1:0)}xa=Sa(B);if("function"===typeof b.onTableExportBegin)b.onTableExportBegin();if("csv"===b.type||"tsv"===b.type||"txt"===b.type){var ka="",la=0,M=[],t=0,qb=function(a,c,e){a.each(function(){v="";n(this,c,t,e+a.length,function(a,c,d){var e=v,f="";if(null!==a)if(a=E(a,c,d),c=null===a||""===a?"":a.toString(),"tsv"===b.type)a instanceof Date&&a.toLocaleString(),f=za(c,"\t"," ");else if(a instanceof Date)f=b.csvEnclosure+a.toLocaleString()+b.csvEnclosure;else if(f=Q(c),f=za(f,b.csvEnclosure,b.csvEnclosure+b.csvEnclosure),0<=f.indexOf(b.csvSeparator)||/[\r\n ]/g.test(f))f=b.csvEnclosure+f+b.csvEnclosure;v=e+(f+("tsv"===b.type?"\t":b.csvSeparator))});v=d.trim(v).substring(0,v.length-1);0<v.length&&(0<ka.length&&(ka+="\n"),ka+=v);t++});return a.length},la=la+qb(d(B).find("thead").first().find(b.theadSelector),"th,td",la);K(d(B),"tbody").each(function(){la+=qb(K(d(this),b.tbodySelector),"td,th",la)});b.tfootSelector.length&&qb(d(B).find("tfoot").first().find(b.tfootSelector),"td,th",la);ka+="\n";if("string"===b.outputMode)return ka;if("base64"===b.outputMode)return fa(ka);if("window"===b.outputMode){ga(!1,"data:text/"+("csv"===b.type?"csv":"plain")+";charset\x3dutf-8,",ka);return}X(ka,b.fileName+"."+b.type,"text/"+("csv"===b.type?"csv":"plain"),"utf-8","","csv"===b.type&&b.csvUseBOM)}else if("sql"===b.type){var t=0,M=[],H="INSERT INTO "+b.sql.tableEnclosure+b.tableName+b.sql.tableEnclosure+" (",z=J(d(B));d(z).each(function(){n(this,"th,td",t,z.length,function(a,c,d){a=E(a,c,d)||"";-1<a.indexOf(b.sql.columnEnclosure)&&(a=za(a.toString(),b.sql.columnEnclosure,b.sql.columnEnclosure+b.sql.columnEnclosure));H+=b.sql.columnEnclosure+a+b.sql.columnEnclosure+","});t++;H=d.trim(H).substring(0,H.length-1)});H+=") VALUES ";x=qa(d(B));d(x).each(function(){v="";n(this,"td,th",t,z.length+x.length,function(a,b,d){a=E(a,b,d)||"";-1<a.indexOf("'")&&(a=za(a.toString(),"'","''"));v+="'"+a+"',"});3<v.length&&(H+="("+v,H=d.trim(H).substring(0,H.length-1),H+="),");t++});H=d.trim(H).substring(0,H.length-1);H+=";";if("string"===b.outputMode)return H;if("base64"===b.outputMode)return fa(H);X(H,b.fileName+".sql","application/sql","utf-8","",!1)}else if("json"===b.type){var ma=[],M=[],z=J(d(B));d(z).each(function(){var a=[];n(this,"th,td",t,z.length,function(b,d,g){a.push(E(b,d,g))});ma.push(a)});var rb=[],x=qa(d(B));d(x).each(function(){var a={},b=0;n(this,"td,th",t,z.length+x.length,function(c,d,f){ma.length?a[ma[ma.length-1][b]]=E(c,d,f):a[b]=E(c,d,f);b++});!1===d.isEmptyObject(a)&&rb.push(a);t++});var Xa;Xa="head"===b.jsonScope?JSON.stringify(ma):"data"===b.jsonScope?JSON.stringify(rb):JSON.stringify({header:ma,data:rb});if("string"===b.outputMode)return Xa;if("base64"===b.outputMode)return fa(Xa);X(Xa,b.fileName+".json","application/json","utf-8","base64",!1)}else if("xml"===b.type){var t=0,M=[],O='\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e',O=O+"\x3ctabledata\x3e\x3cfields\x3e",z=J(d(B));d(z).each(function(){n(this,"th,td",t,z.length,function(a,b,d){O+="\x3cfield\x3e"+E(a,b,d)+"\x3c/field\x3e"});t++});var O=O+"\x3c/fields\x3e\x3cdata\x3e",Fb=1,x=qa(d(B));d(x).each(function(){var a=1;v="";n(this,"td,th",t,z.length+x.length,function(b,d,g){v+="\x3ccolumn-"+a+"\x3e"+E(b,d,g)+"\x3c/column-"+a+"\x3e";a++});0<v.length&&"\x3ccolumn-1\x3e\x3c/column-1\x3e"!==v&&(O+='\x3crow id\x3d"'+Fb+'"\x3e'+v+"\x3c/row\x3e",Fb++);t++});O+="\x3c/data\x3e\x3c/tabledata\x3e";if("string"===b.outputMode)return O;if("base64"===b.outputMode)return fa(O);X(O,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===b.type&&"xmlss"===b.mso.fileFormat){var sb=[],S=[];d(B).filter(function(){return U(d(this))}).each(function(){function a(a,b,c){var e=[];d(a).each(function(){var b=0,f=0;v="";n(this,"td,th",t,c+a.length,function(a,c,h){if(null!==a){var l="";c=E(a,c,h);h="String";if(!1!==jQuery.isNumeric(c))h="Number";else{var g=ta(c);!1!==g&&(c=g,h="Number",l+=' ss:StyleID\x3d"pct1"')}"Number"!==h&&(c=c.replace(/\n/g,"\x3cbr\x3e"));g=P(a);a=ra(a);d.each(e,function(){if(t>=this.s.r&&t<=this.e.r&&f>=this.s.c&&f<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f++,b++});if(a||g)a=a||1,g=g||1,e.push({s:{r:t,c:f},e:{r:t+a-1,c:f+g-1}});1<g&&(l+=' ss:MergeAcross\x3d"'+(g-1)+'"',f+=g-1);1<a&&(l+=' ss:MergeDown\x3d"'+(a-1)+'" ss:StyleID\x3d"rsp1"');0<b&&(l+=' ss:Index\x3d"'+(f+1)+'"',b=0);v+="\x3cCell"+l+'\x3e\x3cData ss:Type\x3d"'+h+'"\x3e'+d("\x3cdiv /\x3e").text(c).html()+"\x3c/Data\x3e\x3c/Cell\x3e\r";f++}});0<v.length&&(N+='\x3cRow ss:AutoFitHeight\x3d"0"\x3e\r'+v+"\x3c/Row\x3e\r");t++});return a.length}var c=d(this),e="";"string"===typeof b.mso.worksheetName&&b.mso.worksheetName.length?e=b.mso.worksheetName+" "+(S.length+1):"undefined"!==typeof b.mso.worksheetName[S.length]&&(e=b.mso.worksheetName[S.length]);e.length||(e=c.find("caption").text()||"");e.length||(e="Table "+(S.length+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));S.push(d("\x3cdiv /\x3e").text(e).html());!1===b.exportHiddenCells&&(L=c.find("tr, th, td").filter(":hidden"),Ca=0<L.length);t=0;xa=Sa(this);N="\x3cTable\x3e\r";e=a(J(c),"th,td",0);a(qa(c),"td,th",e);N+="\x3c/Table\x3e\r";sb.push(N)});for(var Ya={},na={},oa,Oa,ea=0,Lb=S.length;ea<Lb;ea++)oa=S[ea],Oa=Ya[oa],Oa=Ya[oa]=null==Oa?1:Oa+1,2===Oa&&(S[na[oa]]=S[na[oa]].substring(0,29)+"-1"),1<Ya[oa]?S[ea]=S[ea].substring(0,29)+"-"+Ya[oa]:na[oa]=ea;for(var aa='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\x3c?mso-application progid\x3d"Excel.Sheet"?\x3e\r\x3cWorkbook xmlns\x3d"urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\r xmlns:x\x3d"urn:schemas-microsoft-com:office:excel"\r xmlns:ss\x3d"urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:html\x3d"http://www.w3.org/TR/REC-html40"\x3e\r\x3cDocumentProperties xmlns\x3d"urn:schemas-microsoft-com:office:office"\x3e\r \x3cCreated\x3e'+(new Date).toISOString()+'\x3c/Created\x3e\r\x3c/DocumentProperties\x3e\r\x3cOfficeDocumentSettings xmlns\x3d"urn:schemas-microsoft-com:office:office"\x3e\r \x3cAllowPNG/\x3e\r\x3c/OfficeDocumentSettings\x3e\r\x3cExcelWorkbook xmlns\x3d"urn:schemas-microsoft-com:office:excel"\x3e\r \x3cWindowHeight\x3e9000\x3c/WindowHeight\x3e\r \x3cWindowWidth\x3e13860\x3c/WindowWidth\x3e\r \x3cWindowTopX\x3e0\x3c/WindowTopX\x3e\r \x3cWindowTopY\x3e0\x3c/WindowTopY\x3e\r \x3cProtectStructure\x3eFalse\x3c/ProtectStructure\x3e\r \x3cProtectWindows\x3eFalse\x3c/ProtectWindows\x3e\r\x3c/ExcelWorkbook\x3e\r\x3cStyles\x3e\r \x3cStyle ss:ID\x3d"Default" ss:Name\x3d"Normal"\x3e\r \x3cAlignment ss:Vertical\x3d"Bottom"/\x3e\r \x3cBorders/\x3e\r \x3cFont/\x3e\r \x3cInterior/\x3e\r \x3cNumberFormat/\x3e\r \x3cProtection/\x3e\r \x3c/Style\x3e\r \x3cStyle ss:ID\x3d"rsp1"\x3e\r \x3cAlignment ss:Vertical\x3d"Center"/\x3e\r \x3c/Style\x3e\r \x3cStyle ss:ID\x3d"pct1"\x3e\r \x3cNumberFormat ss:Format\x3d"Percent"/\x3e\r \x3c/Style\x3e\r\x3c/Styles\x3e\r',Pa=0;Pa<sb.length;Pa++)aa+='\x3cWorksheet ss:Name\x3d"'+S[Pa]+'" ss:RightToLeft\x3d"'+(b.mso.rtl?"1":"0")+'"\x3e\r'+sb[Pa],aa=b.mso.rtl?aa+'\x3cWorksheetOptions xmlns\x3d"urn:schemas-microsoft-com:office:excel"\x3e\r\x3cDisplayRightToLeft/\x3e\r\x3c/WorksheetOptions\x3e\r':aa+'\x3cWorksheetOptions xmlns\x3d"urn:schemas-microsoft-com:office:excel"/\x3e\r',aa+="\x3c/Worksheet\x3e\r";aa+="\x3c/Workbook\x3e\r";if("string"===b.outputMode)return aa;if("base64"===b.outputMode)return fa(aa);X(aa,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===b.type&&"xlsx"===b.mso.fileFormat){var Fa=[],tb=XLSX.utils.book_new();d(B).filter(function(){return U(d(this))}).each(function(){for(var a=d(this),c,e={},g=this.getElementsByTagName("tr"),f=Math.min(1E7,g.length),k={s:{r:0,c:0},e:{r:0,c:0}},l=[],h,q=0,m=0,C,p,t,r,n,v=XLSX.SSF.get_table();q<g.length&&m<f;++q)if(C=g[q],p=!1,"function"===typeof b.onIgnoreRow&&(p=b.onIgnoreRow(d(C),q)),!0!==p&&(0===b.ignoreRow.length||-1===d.inArray(q,b.ignoreRow)&&-1===d.inArray(q-g.length,b.ignoreRow))&&!1!==U(d(C))){var w=C.children,z=0;for(C=0;C<w.length;++C)n=w[C],r=+P(n)||1,z+=r;var B=0;for(C=p=0;C<w.length;++C)if(n=w[C],r=+P(n)||1,h=C+B,!cb(d(n),z,h+(h<p?p-h:0))){B+=r-1;for(h=0;h<l.length;++h){var A=l[h];A.s.c==p&&A.s.r<=m&&m<=A.e.r&&(p=A.e.c+1,h=-1)}(0<(t=+ra(n))||1<r)&&l.push({s:{r:m,c:p},e:{r:m+(t||1)-1,c:p+r-1}});var x={type:""},A=E(n,q,C+B,x);h={t:"s",v:A};var u="";if(""!==(d(n).attr("data-tableexport-cellformat")||""))if(c=parseInt(d(n).attr("data-tableexport-xlsxformatid")||0),0===c&&"function"===typeof b.mso.xslx.formatId.numbers&&(c=b.mso.xslx.formatId.numbers(d(n),q,C+B)),0===c&&"function"===typeof b.mso.xslx.formatId.date&&(c=b.mso.xslx.formatId.date(d(n),q,C+B)),49===c||"@"===c)u="s";else if("number"===x.type||0<c&&14>c||36<c&&41>c||48===c)u="n";else{if("date"===x.type||13<c&&37>c||44<c&&48>c||56===c)u="d"}else u="s";if(null!=A){if(0===A.length)h.t="z";else if(0!==A.trim().length&&"s"!==u)if("function"===x.type)h={f:A};else if("TRUE"===A)h={t:"b",v:!0};else if("FALSE"===A)h={t:"b",v:!1};else if("n"===u||isFinite(Da(A,b.numbers.output))){if(u=Da(A,b.numbers.output),0===c&&"function"!==typeof b.mso.xslx.formatId.numbers&&(c=b.mso.xslx.formatId.numbers),isFinite(u)||isFinite(A))h={t:"n",v:isFinite(u)?u:A,z:"string"===typeof c?c:c in v?v[c]:"0.00"}}else if(!1!==(x=Ma(A))||"d"===u)0===c&&"function"!==typeof b.mso.xslx.formatId.date&&(c=b.mso.xslx.formatId.date),h={t:"d",v:!1!==x?x:A,z:"string"===typeof c?c:c in v?v[c]:"m/d/yy"};(u=d(n).find("a"))&&u.length&&(u=u[0].hasAttribute("href")?u.attr("href"):"",A="href"!==b.htmlHyperlink||""===u?A:"",x=""!==u?'\x3dHYPERLINK("'+u+(A.length?'","'+A:"")+'")':"",""!==x&&("function"===typeof b.mso.xlsx.onHyperlink?(A=b.mso.xlsx.onHyperlink(d(n),q,C,u,A,x),h=0!==A.indexOf("\x3dHYPERLINK")?{t:"s",v:A}:{f:A}):h={f:x}))}e[R({c:p,r:m})]=h;k.e.c<p&&(k.e.c=p);p+=r}++m}l.length&&(e["!merges"]=(e["!merges"]||[]).concat(l));k.e.r=Math.max(k.e.r,m-1);e["!ref"]=Ua(k);m>=f&&(e["!fullref"]=Ua((k.e.r=g.length-q+m-1,k)));c="";"string"===typeof b.mso.worksheetName&&b.mso.worksheetName.length?c=b.mso.worksheetName+" "+(Fa.length+1):"undefined"!==typeof b.mso.worksheetName[Fa.length]&&(c=b.mso.worksheetName[Fa.length]);c.length||(c=a.find("caption").text()||"");c.length||(c="Table "+(Fa.length+1));c=d.trim(c.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));Fa.push(c);XLSX.utils.book_append_sheet(tb,e,c)});var va=XLSX.write(tb,{type:"binary",bookType:b.mso.fileFormat,bookSST:!1});X(yb(va),b.fileName+"."+b.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",!1)}else if("excel"===b.type||"xls"===b.type||"word"===b.type||"doc"===b.type){var wa="excel"===b.type||"xls"===b.type?"excel":"word",Qa="excel"===wa?"xls":"doc",ub='xmlns:x\x3d"urn:schemas-microsoft-com:office:'+wa+'"',Ra=N="";d(B).filter(function(){return U(d(this))}).each(function(){var a=d(this);""===Ra&&(Ra=b.mso.worksheetName||a.find("caption").text()||"Table",Ra=d.trim(Ra.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===b.exportHiddenCells&&(L=a.find("tr, th, td").filter(":hidden"),Ca=0<L.length);t=0;M=[];xa=Sa(this);N+="\x3ctable\x3e\x3cthead\x3e";z=J(a);d(z).each(function(){var a=d(this);v="";n(this,"th,td",t,z.length,function(c,d,f){if(null!==c){var e="";v+="\x3cth";if(b.mso.styles.length){var l=document.defaultView.getComputedStyle(c,null),h=document.defaultView.getComputedStyle(a[0],null),g;for(g in b.mso.styles){var k=l[b.mso.styles[g]];""===k&&(k=h[b.mso.styles[g]]);""!==k&&"0px none rgb(0, 0, 0)"!==k&&"rgba(0, 0, 0, 0)"!==k&&(e+=""===e?'style\x3d"':";",e+=b.mso.styles[g]+":"+k)}}""!==e&&(v+=" "+e+'"');e=P(c);0<e&&(v+=' colspan\x3d"'+e+'"');e=ra(c);0<e&&(v+=' rowspan\x3d"'+e+'"');v+="\x3e"+E(c,d,f)+"\x3c/th\x3e"}});0<v.length&&(N+="\x3ctr\x3e"+v+"\x3c/tr\x3e");t++});N+="\x3c/thead\x3e\x3ctbody\x3e";x=qa(a);d(x).each(function(){var a=d(this);v="";n(this,"td,th",t,z.length+x.length,function(c,g,f){if(null!==c){var e=E(c,g,f),l="",h=d(c).attr("data-tableexport-msonumberformat");"undefined"===typeof h&&"function"===typeof b.mso.onMsoNumberFormat&&(h=b.mso.onMsoNumberFormat(c,g,f));"undefined"!==typeof h&&""!==h&&(l="style\x3d\"mso-number-format:'"+h+"'");if(b.mso.styles.length){g=document.defaultView.getComputedStyle(c,null);f=document.defaultView.getComputedStyle(a[0],null);for(var k in b.mso.styles)h=g[b.mso.styles[k]],""===h&&(h=f[b.mso.styles[k]]),""!==h&&"0px none rgb(0, 0, 0)"!==h&&"rgba(0, 0, 0, 0)"!==h&&(l+=""===l?'style\x3d"':";",l+=b.mso.styles[k]+":"+h)}v+="\x3ctd";""!==l&&(v+=" "+l+'"');l=P(c);0<l&&(v+=' colspan\x3d"'+l+'"');c=ra(c);0<c&&(v+=' rowspan\x3d"'+c+'"');"string"===typeof e&&""!==e&&(e=Q(e),e=e.replace(/\n/g,"\x3cbr\x3e"));v+="\x3e"+e+"\x3c/td\x3e"}});0<v.length&&(N+="\x3ctr\x3e"+v+"\x3c/tr\x3e");t++});b.displayTableName&&(N+="\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e"+E(d("\x3cp\x3e"+b.tableName+"\x3c/p\x3e"))+"\x3c/td\x3e\x3c/tr\x3e");N+="\x3c/tbody\x3e\x3c/table\x3e"});var p='\x3chtml xmlns:o\x3d"urn:schemas-microsoft-com:office:office" '+ub+' xmlns\x3d"http://www.w3.org/TR/REC-html40"\x3e',p=p+('\x3cmeta http-equiv\x3d"content-type" content\x3d"application/vnd.ms-'+wa+'; charset\x3dUTF-8"\x3e'),p=p+"\x3chead\x3e";"excel"===wa&&(p+="\x3c!--[if gte mso 9]\x3e",p+="\x3cxml\x3e",p+="\x3cx:ExcelWorkbook\x3e",p+="\x3cx:ExcelWorksheets\x3e",p+="\x3cx:ExcelWorksheet\x3e",p+="\x3cx:Name\x3e",p+=Ra,p+="\x3c/x:Name\x3e",p+="\x3cx:WorksheetOptions\x3e",p+="\x3cx:DisplayGridlines/\x3e",b.mso.rtl&&(p+="\x3cx:DisplayRightToLeft/\x3e"),p+="\x3c/x:WorksheetOptions\x3e",p+="\x3c/x:ExcelWorksheet\x3e",p+="\x3c/x:ExcelWorksheets\x3e",p+="\x3c/x:ExcelWorkbook\x3e",p+="\x3c/xml\x3e",p+="\x3c![endif]--\x3e");p+="\x3cstyle\x3e";p+="@page { size:"+b.mso.pageOrientation+"; mso-page-orientation:"+b.mso.pageOrientation+"; }";p+="@page Section1 {size:"+ia[b.mso.pageFormat][0]+"pt "+ia[b.mso.pageFormat][1]+"pt";p+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";p+="div.Section1 {page:Section1;}";p+="@page Section2 {size:"+ia[b.mso.pageFormat][1]+"pt "+ia[b.mso.pageFormat][0]+"pt";p+=";mso-page-orientation:"+b.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";p+="div.Section2 {page:Section2;}";p+="br {mso-data-placement:same-cell;}";p+="\x3c/style\x3e";p+="\x3c/head\x3e";p+="\x3cbody\x3e";p+='\x3cdiv class\x3d"Section'+("landscape"===b.mso.pageOrientation?"2":"1")+'"\x3e';p+=N;p+="\x3c/div\x3e";p+="\x3c/body\x3e";p+="\x3c/html\x3e";if("string"===b.outputMode)return p;if("base64"===b.outputMode)return fa(p);X(p,b.fileName+"."+Qa,"application/vnd.ms-"+wa,"","base64",!1)}else if("png"===b.type)html2canvas(d(B)[0]).then(function(a){a=a.toDataURL();for(var c=atob(a.substring(22)),d=new ArrayBuffer(c.length),g=new Uint8Array(d),f=0;f<c.length;f++)g[f]=c.charCodeAt(f);if("string"===b.outputMode)return c;if("base64"===b.outputMode)return fa(a);"window"===b.outputMode?window.open(a):X(d,b.fileName+".png","image/png","","",!1)});else if("pdf"===b.type)if(!0===b.pdfmake.enabled){var ba={content:[]};d.extend(!0,ba,b.pdfmake.docDefinition);M=[];d(B).filter(function(){return U(d(this))}).each(function(){var a=d(this),c=[],e=[];t=0;var g=function(a,b,c){var f=0;d(a).each(function(){var a=[];n(this,b,t,c,function(c,d,e){if("undefined"!==typeof c&&null!==c){var f=P(c),h=ra(c);c={text:E(c,d,e)||" "};if(1<f||1<h)c.colSpan=f||1,c.rowSpan=h||1}else c={text:" "};0<=b.indexOf("th")&&(c.style="header");a.push(c)});a.length&&e.push(a);f<a.length&&(f=a.length);t++});return f};z=J(a);for(var f=g(z,"th,td",z.length),k=c.length;k<f;k++)c.push("*");x=qa(a);f=g(x,"td",z.length+x.length);for(a=c.length;a<f;a++)c.push("*");ba.content.push({table:{headerRows:z.length?z.length:null,widths:c,body:e},layout:{layout:"noBorders",hLineStyle:function(a,b){return 0},vLineWidth:function(a,b){return 0},hLineColor:function(a,c){return a<c.table.headerRows?b.pdfmake.docDefinition.styles.header.background:b.pdfmake.docDefinition.styles.alternateRow.fillColor},vLineColor:function(a,c){return a<c.table.headerRows?b.pdfmake.docDefinition.styles.header.background:b.pdfmake.docDefinition.styles.alternateRow.fillColor},fillColor:function(a,c,d){return 0===a%2?b.pdfmake.docDefinition.styles.alternateRow.fillColor:null}},pageBreak:ba.content.length?"before":void 0})});"undefined"!==typeof pdfMake&&"undefined"!==typeof pdfMake.createPdf&&(pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}},pdfMake.vfs.hasOwnProperty("Mirza-Regular.ttf")?(ba.defaultStyle.font="Mirza",d.extend(!0,pdfMake.fonts,{Mirza:{normal:"Mirza-Regular.ttf",bold:"Mirza-Bold.ttf",italics:"Mirza-Medium.ttf",bolditalics:"Mirza-SemiBold.ttf"}})):pdfMake.vfs.hasOwnProperty("gbsn00lp.ttf")?(ba.defaultStyle.font="gbsn00lp",d.extend(!0,pdfMake.fonts,{gbsn00lp:{normal:"gbsn00lp.ttf",bold:"gbsn00lp.ttf",italics:"gbsn00lp.ttf",bolditalics:"gbsn00lp.ttf"}})):pdfMake.vfs.hasOwnProperty("ZCOOLXiaoWei-Regular.ttf")&&(ba.defaultStyle.font="ZCOOLXiaoWei",d.extend(!0,pdfMake.fonts,{ZCOOLXiaoWei:{normal:"ZCOOLXiaoWei-Regular.ttf",bold:"ZCOOLXiaoWei-Regular.ttf",italics:"ZCOOLXiaoWei-Regular.ttf",bolditalics:"ZCOOLXiaoWei-Regular.ttf"}})),d.extend(!0,pdfMake.fonts,b.pdfmake.fonts),pdfMake.createPdf(ba).getBuffer(function(a){X(a,b.fileName+".pdf","application/pdf","","",!1)}))}else if(!1===b.jspdf.autotable){var vb=new jspdf.jsPDF({orientation:b.jspdf.orientation,unit:b.jspdf.unit,format:b.jspdf.format});vb.html(B[0],{callback:function(){Ja(vb,!1)},html2canvas:{scale:(vb.internal.pageSize.width-2*b.jspdf.margins.left)/B[0].scrollWidth},x:b.jspdf.margins.left,y:b.jspdf.margins.top})}else{var k=b.jspdf.autotable.tableExport;if("string"===typeof b.jspdf.format&&"bestfit"===b.jspdf.format.toLowerCase()){var Za="",Ga="",wb=0;d(B).each(function(){if(U(d(this))){var a=gb(d(this).get(0),"width","pt");if(a>wb){a>ia.a0[0]&&(Za="a0",Ga="l");for(var b in ia)ia.hasOwnProperty(b)&&ia[b][1]>a&&(Za=b,Ga="l",ia[b][0]>a&&(Ga="p"));wb=a}}});b.jspdf.format=""===Za?"a4":Za;b.jspdf.orientation=""===Ga?"w":Ga}if(null==k.doc&&(k.doc=new jspdf.jsPDF(b.jspdf.orientation,b.jspdf.unit,b.jspdf.format),k.wScaleFactor=1,k.hScaleFactor=1,"function"===typeof b.jspdf.onDocCreated))b.jspdf.onDocCreated(k.doc);!0===k.outputImages&&(k.images={});"undefined"!==typeof k.images&&(d(B).filter(function(){return U(d(this))}).each(function(){var a=0;M=[];!1===b.exportHiddenCells&&(L=d(this).find("tr, th, td").filter(":hidden"),Ca=0<L.length);z=J(d(this));x=qa(d(this));d(x).each(function(){n(this,"td,th",z.length+a,z.length+x.length,function(a){G(a,d(a).children(),k)});a++})}),z=[],x=[]);ya(k,function(){d(B).filter(function(){return U(d(this))}).each(function(){var a;t=0;M=[];!1===b.exportHiddenCells&&(L=d(this).find("tr, th, td").filter(":hidden"),Ca=0<L.length);xa=Sa(this);k.columns=[];k.rows=[];k.teCells={};if("function"===typeof k.onTable&&!1===k.onTable(d(this),b))return!0;b.jspdf.autotable.tableExport=null;var c=d.extend(!0,{},b.jspdf.autotable);b.jspdf.autotable.tableExport=k;c.margin={};d.extend(!0,c.margin,b.jspdf.margins);c.tableExport=k;"function"!==typeof c.createdHeaderCell&&(c.createdHeaderCell=function(a,b){if("undefined"!==typeof k.columns[b.column.dataKey]){var d=k.columns[b.column.dataKey];if("undefined"!==typeof d.rect){var e;a.contentWidth=d.rect.width;if("undefined"===typeof k.heightRatio||0===k.heightRatio)e=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:b.row.raw[b.column.dataKey].rect.height,k.heightRatio=a.styles.rowHeight/e;e=b.row.raw[b.column.dataKey].rect.height*k.heightRatio;e>a.styles.rowHeight&&(a.styles.rowHeight=e)}a.styles.halign="inherit"===c.headerStyles.halign?"center":c.headerStyles.halign;a.styles.valign=c.headerStyles.valign;"undefined"!==typeof d.style&&!0!==d.style.hidden&&("inherit"===c.headerStyles.halign&&(a.styles.halign=d.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=d.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=d.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=d.style.fstyle))}});"function"!==typeof c.createdCell&&(c.createdCell=function(a,b){var d=k.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===c.styles.halign?"center":c.styles.halign;a.styles.valign=c.styles.valign;"undefined"!==typeof d&&"undefined"!==typeof d.style&&!0!==d.style.hidden&&("inherit"===c.styles.halign&&(a.styles.halign=d.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=d.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=d.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=d.style.fstyle))});"function"!==typeof c.drawHeaderCell&&(c.drawHeaderCell=function(a,b){var c=k.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?u(a,b,c):!1});"function"!==typeof c.drawCell&&(c.drawCell=function(a,b){var c=k.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof c&&c.isCanvas)){if(u(a,b,c))if(k.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"===typeof c||"undefined"!==typeof c.hasUserDefText&&!0===c.hasUserDefText||"undefined"===typeof c.elements||!c.elements.length)hb(a,{},k);else{var e=a.height/c.rect.height;e>k.hScaleFactor&&(k.hScaleFactor=e);k.wScaleFactor=a.width/c.rect.width;e=a.textPos.y;fb(a,c.elements,k);a.textPos.y=e;hb(a,c.elements,k)}}else{var c=c.elements[0],e=d(c).attr("data-tableexport-canvas"),f=c.getBoundingClientRect();a.width=f.width*k.wScaleFactor;a.height=f.height*k.hScaleFactor;b.row.height=a.height;eb(a,c,e,k)}return!1});k.headerrows=[];z=J(d(this));d(z).each(function(){a=0;k.headerrows[t]=[];n(this,"th,td",t,z.length,function(b,c,d){var e=W(b);e.title=E(b,c,d);e.key=a++;e.rowIndex=t;k.headerrows[t].push(e)});t++});if(0<t)for(var e=t-1;0<=e;)d.each(k.headerrows[e],function(){var a=this;0<e&&null===this.rect&&(a=k.headerrows[e-1][this.key]);null!==a&&0<=a.rowIndex&&(!0!==a.style.hasOwnProperty("hidden")||!0!==a.style.hidden)&&k.columns.push(a)}),e=0<k.columns.length?-1:e-1;var g=0;x=[];x=qa(d(this));d(x).each(function(){var b=[];a=0;n(this,"td,th",t,z.length+x.length,function(c,e,f){var h;"undefined"===typeof k.columns[a]&&(h={title:"",key:a,style:{hidden:!0}},k.columns.push(h));b.push(E(c,e,f));"undefined"!==typeof c&&null!==c?(h=W(c),h.isCanvas=c.hasAttribute("data-tableexport-canvas"),h.elements=h.isCanvas?d(c):d(c).children(),"undefined"!==typeof d(c).data("teUserDefText")&&(h.hasUserDefText=!0)):(h=d.extend(!0,{},k.teCells[g+":"+(a-1)]),h.colspan=-1);k.teCells[g+":"+a++]=h});b.length&&(k.rows.push(b),g++);t++});if("function"===typeof k.onBeforeAutotable)k.onBeforeAutotable(d(this),k.columns,k.rows,c);Ab(k.doc,k.columns,k.rows,c);if("function"===typeof k.onAfterAutotable)k.onAfterAutotable(d(this),c);var f=b.jspdf.autotable,m;m="undefined"===typeof I||"undefined"===typeof I.y?0:I.y;f.startY=m+c.margin.top});Ja(k.doc,"undefined"!==typeof k.images&&!1===jQuery.isEmptyObject(k.images));"undefined"!==typeof k.headerrows&&(k.headerrows.length=0);"undefined"!==typeof k.columns&&(k.columns.length=0);"undefined"!==typeof k.rows&&(k.rows.length=0);delete k.doc;k.doc=null})}var w,I,m,lb,r;if("function"===typeof b.onTableExportEnd)b.onTableExportEnd();return this};var Ia=function(){return function(){this.contentWidth=this.y=this.x=this.width=this.height=0;this.rows=[];this.columns=[];this.headerRow=null;this.settings={}}}(),mb=function(){return function(d){this.raw=d||{};this.index=0;this.styles={};this.cells={};this.y=this.height=0}}(),Db=function(){return function(d){this.raw=d;this.styles={};this.text="";this.contentWidth=0;this.textPos={};this.y=this.x=this.width=this.height=0}}(),ha=function(){return function(d){this.dataKey=d;this.options={};this.styles={};this.x=this.width=this.contentWidth=0}}()})(jQuery);(function(d,T){"object"===typeof exports&&"undefined"!==typeof module?T(require("jquery")):"function"===typeof define&&define.amd?define(["jquery"],T):(d="undefined"!==typeof globalThis?globalThis:d||self,T(d.jQuery))})(this,function(d){function T(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}function Ia(a,b,c){b&&T(a.prototype,b);c&&T(a,c);return a}function mb(a,b,c){b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c;return a}function Db(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});b&&bb(a,b)}function ha(a){ha=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return ha(a)}function bb(a,b){bb=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return bb(a,b)}function J(){if("undefined"===typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(D){return!1}}function qa(a){var b=J();return function(){var c=ha(a);if(b)var d=ha(this).constructor,c=Reflect.construct(c,arguments,d);else c=c.apply(this,arguments);if(!c||"object"!==typeof c&&"function"!==typeof c){if(void 0===this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");c=this}return c}}function K(a,b,c){K="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(a,b,c){for(;!Object.prototype.hasOwnProperty.call(a,b)&&(a=ha(a),null!==a););if(a)return b=Object.getOwnPropertyDescriptor(a,b),b.get?b.get.call(c):b.value};return K(a,b,c||a)}function Sa(a,b){if(a){if("string"===typeof a)return U(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);"Object"===c&&a.constructor&&(c=a.constructor.name);if("Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return U(a,b)}}function U(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function Ib(a,b){var c;$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();if("undefined"===typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(c=Sa(a))||b&&a&&"number"===typeof a.length){c&&(a=c);var d=0,D=function(){};return{s:D,n:function(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function(a){throw a;},f:D}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var e=!0,f=!1,pa;return{s:function(){$jscomp.initSymbol();$jscomp.initSymbolIterator();c=a[Symbol.iterator]()},n:function(){var a=c.next();e=a.done;return a},e:function(a){f=!0;pa=a},f:function(){try{e||null==c["return"]||c["return"]()}finally{if(f)throw pa;}}}}function cb(a,b){return b={exports:{}},a(b,b.exports),b.exports}var n=d&&"object"===typeof d&&"default"in d?d:{"default":d},eb="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},Ja=function(a){return a&&a.Math==Math&&a},u=Ja("object"==typeof globalThis&&globalThis)||Ja("object"==typeof window&&window)||Ja("object"==typeof self&&self)||Ja("object"==typeof eb&&eb)||function(){return this}()||Function("return this")(),G=function(a){try{return!!a()}catch(pa){return!0}},ya=!G(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fb={}.propertyIsEnumerable,hb=Object.getOwnPropertyDescriptor,za=hb&&!fb.call({1:2},1)?function(a){a=hb(this,a);return!!a&&a.enumerable}:fb,Ka=function(a,b){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:b}},ib={}.toString,Ma=function(a){return ib.call(a).slice(8,-1)},jb="".split,ta=G(function(){return!Object("z").propertyIsEnumerable(0)})?function(a){return"String"==Ma(a)?jb.call(a,""):Object(a)}:Object,E=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a},Q=function(a){return"object"===typeof a?null!==a:"function"===typeof a},kb=function(a,b){if(!Q(a))return a;var c,d;if(b&&"function"==typeof(c=a.toString)&&!Q(d=c.call(a))||"function"==typeof(c=a.valueOf)&&!Q(d=c.call(a))||!b&&"function"==typeof(c=a.toString)&&!Q(d=c.call(a)))return d;throw TypeError("Can't convert object to primitive value");},Ta={}.hasOwnProperty,W=function(a,b){return Ta.call(a,b)},P=u.document,ra=Q(P)&&Q(P.createElement),da=!ya&&!G(function(){return 7!=Object.defineProperty(ra?P.createElement("div"):{},"a",{get:function(){return 7}}).a}),gb=Object.getOwnPropertyDescriptor,yb=ya?gb:function(a,b){a=ta(E(a));b=kb(b,!0);if(da)try{return gb(a,b)}catch(lc){}if(W(a,b))return Ka(!za.call(a,b),a[b])},R=function(a){if(!Q(a))throw TypeError(String(a)+" is not an object");return a},Ua=Object.defineProperty,Da={f:ya?Ua:function(a,b,c){R(a);b=kb(b,!0);R(c);if(da)try{return Ua(a,b,c)}catch(Ha){}if("get"in c||"set"in c)throw TypeError("Accessors not supported");"value"in c&&(a[b]=c.value);return a}},sa=ya?function(a,b,c){return Da.f(a,b,Ka(1,c))}:function(a,b,c){a[b]=c;return a},X=function(a,b){try{sa(u,a,b)}catch(lc){u[a]=b}return b},ga=u["__core-js_shared__"]||X("__core-js_shared__",{}),fa=Function.toString;"function"!=typeof ga.inspectSource&&(ga.inspectSource=function(a){return fa.call(a)});var Ab=ga.inspectSource,La=u.WeakMap,Jb="function"===typeof La&&/native code/.test(Ab(La)),Bb=cb(function(a){(a.exports=function(a,b){return ga[a]||(ga[a]=void 0!==b?b:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"\u00a9 2021 Denis Pushkarev (zloirock.ru)"})}),Kb=0,Eb=Math.random(),Cb=function(a){return"Symbol("+String(void 0===a?"":a)+")_"+(++Kb+Eb).toString(36)},Wa=Bb("keys"),Aa=function(a){return Wa[a]||(Wa[a]=Cb(a))},Y={},ob=u.WeakMap,Ea,Z,N;if(Jb){var b=ga.state||(ga.state=new ob),ia=b.get,Na=b.has,nb=b.set;Ea=function(a,c){c.facade=a;nb.call(b,a,c);return c};Z=function(a){return ia.call(b,a)||{}};N=function(a){return Na.call(b,a)}}else{var B=Aa("state");Y[B]=!0;Ea=function(a,b){b.facade=a;sa(a,B,b);return b};Z=function(a){return W(a,B)?a[B]:{}};N=function(a){return W(a,B)}}var Va=Z,z=cb(function(a){var b=String(String).split("String");(a.exports=function(a,c,d,e){var f=e?!!e.unsafe:!1,D=e?!!e.enumerable:!1;e=e?!!e.noTargetGet:!1;var h;"function"==typeof d&&("string"!=typeof c||W(d,"name")||sa(d,"name",c),h=N(d)?Z(d):Ea(d,{}),h.source||(h.source=b.join("string"==typeof c?c:"")));a===u?D?a[c]=d:X(c,d):(f?!e&&a[c]&&(D=!0):delete a[c],D?a[c]=d:sa(a,c,d))})(Function.prototype,"toString",function(){return"function"==typeof this&&Va(this).source||Ab(this)})}),x=function(a){return"function"==typeof a?a:void 0},t=function(a,b){return 2>arguments.length?x(u[a])||x(u[a]):u[a]&&u[a][b]||u[a]&&u[a][b]},v=Math.ceil,xa=Math.floor,M=function(a){return isNaN(a=+a)?0:(0<a?xa:v)(a)},zb=Math.min,L=function(a){return 0<a?zb(M(a),9007199254740991):0},Ca=Math.max,Ba=Math.min,pb=function(a,b){var c=M(a);return 0>c?Ca(c+b,0):Ba(c,b)},ja=function(a){return function(b,c,d){b=ta(E(b));var e=L(b.length);d=pb(d,e);if(a&&c!=c)for(;e>d;){if(c=b[d++],c!=c)return!0}else for(;e>d;d++)if((a||d in b)&&b[d]===c)return a||d||0;return!a&&-1}},ua={includes:ja(!0),indexOf:ja(!1)}.indexOf,ka=function(a,b){var c=ta(E(a)),d=0,e=[],f;for(f in c)!W(Y,f)&&W(c,f)&&e.push(f);for(;b.length>d;)W(c,f=b[d++])&&(~ua(e,f)||e.push(f));return e},la="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),qb=la.concat("length","prototype"),H={f:Object.getOwnPropertyNames||function(a){return ka(a,qb)}},ma=Object.getOwnPropertySymbols,rb=t("Reflect","ownKeys")||function(a){var b=H.f(R(a));return ma?b.concat(ma(a)):b},Xa=/#|\.prototype\./,O=function(a,b){var c=sb[Fb(a)];return c==Ya?!0:c==S?!1:"function"==typeof b?G(b):!!b},Fb=O.normalize=function(a){return String(a).replace(Xa,".").toLowerCase()},sb=O.data={},S=O.NATIVE="N",Ya=O.POLYFILL="P",na=function(a,b){var c=a.target,d=a.global,e=a.stat,f,D,h,g,k;if(D=d?u:e?u[c]||X(c,{}):(u[c]||{}).prototype)for(h in b){k=b[h];g=a.noTargetGet?(g=yb(D,h))&&g.value:D[h];f=O(d?h:c+(e?".":"#")+h,a.forced);if(!f&&void 0!==g){if(typeof k===typeof g)continue;f=k;for(var l=g,pa=rb(l),m=Da.f,p=yb,n=0;n<pa.length;n++){var q=pa[n];W(f,q)||m(f,q,p(l,q))}}(a.sham||g&&g.sham)&&sa(k,"sham",!0);z(D,h,k,a)}},oa=function(a){if("function"!=typeof a)throw TypeError(String(a)+" is not a function");return a},Oa=function(a,b,c){oa(a);if(void 0===b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},ea=Array.isArray||function(a){return"Array"==Ma(a)},Lb="process"==Ma(u.process),aa=t("navigator","userAgent")||"",Pa=u.process,Fa=Pa&&Pa.versions,tb=Fa&&Fa.v8,va,wa;tb?(va=tb.split("."),wa=va[0]+va[1]):aa&&(va=aa.match(/Edge\/(\d+)/),(!va||74<=va[1])&&(va=aa.match(/Chrome\/(\d+)/))&&(wa=va[1]));var Qa=wa&&+wa,ub=!!Object.getOwnPropertySymbols&&!G(function(){$jscomp.initSymbol();return!Symbol.sham&&(Lb?38===Qa:37<Qa&&41>Qa)});$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();var Ra=ub&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,p=Bb("wks"),ba=u.Symbol,vb=Ra?ba:ba&&ba.withoutSetter||Cb,k=function(a){if(!W(p,a)||!ub&&"string"!=typeof p[a])ub&&W(ba,a)?p[a]=ba[a]:p[a]=vb("Symbol."+a);return p[a]},Za=k("species"),Ga=function(a,b){var c;ea(a)&&((c=a.constructor,"function"!=typeof c||c!==Array&&!ea(c.prototype))?Q(c)&&(c=c[Za],null===c&&(c=void 0)):c=void 0);return new (void 0===c?Array:c)(0===b?0:b)},wb=[].push,w=function(a){var b=1==a,c=2==a,d=3==a,e=4==a,f=6==a,h=7==a,g=5==a||f;return function(D,k,F,ca){var l=Object(E(D)),pa=ta(l);k=Oa(k,F,3);F=L(pa.length);var Ha=0;ca=ca||Ga;D=b?ca(D,F):c||h?ca(D,0):void 0;for(var Ob;F>Ha;Ha++)if(g||Ha in pa)if(ca=pa[Ha],Ob=k(ca,Ha,l),a)if(b)D[Ha]=Ob;else if(Ob)switch(a){case 3:return!0;case 5:return ca;case 6:return Ha;case 2:wb.call(D,ca)}else switch(a){case 4:return!1;case 7:wb.call(D,ca)}return f?-1:d||e?e:D}},I=w(0),m=w(1);w(2);w(3);w(4);var lb=w(5);w(6);w(7);var r=Object.keys||function(a){return ka(a,la)},a=ya?Object.defineProperties:function(a,b){R(a);for(var c=r(b),d=c.length,e=0,f;d>e;)Da.f(a,f=c[e++],b[f]);return a},c=t("document","documentElement"),e=Aa("IE_PROTO"),g=function(){},f,y=function(){try{f=document.domain&&new ActiveXObject("htmlfile")}catch(pa){}var a;f?(a=f,a.write("\x3cscript\x3e\x3c/script\x3e"),a.close(),a=a.parentWindow.Object):(a=ra?P.createElement("iframe"):{},a.style.display="none",c.appendChild(a),a.src="javascript:",a=a.contentWindow.document,a.open(),a.write("\x3cscript\x3edocument.F\x3dObject\x3c/script\x3e"),a.close(),a=a.F);y=a;for(a=la.length;a--;)delete y.prototype[la[a]];return y()};Y[e]=!0;var l=Object.create||function(b,c){var d;null!==b?(g.prototype=R(b),d=new g,g.prototype=null,d[e]=b):d=y();return void 0===c?d:a(d,c)},h=k("unscopables"),q=Array.prototype;void 0==q[h]&&Da.f(q,h,{configurable:!0,value:l(null)});var db=!0;"find"in[]&&Array(1).find(function(){db=!1});na({target:"Array",proto:!0,forced:db},{find:function(a){return lb(this,a,1<arguments.length?arguments[1]:void 0)}});q[h].find=!0;var C=function(){var a=R(this),b="";a.global&&(b+="g");a.ignoreCase&&(b+="i");a.multiline&&(b+="m");a.dotAll&&(b+="s");a.unicode&&(b+="u");a.sticky&&(b+="y");return b},V=G(function(){var a=RegExp("a","y");a.lastIndex=2;return null!=a.exec("abcd")}),hc=G(function(){var a=RegExp("^r","gy");a.lastIndex=2;return null!=a.exec("str")}),xb=RegExp.prototype.exec,ic=String.prototype.replace,Ub=xb,Mb=function(){var a=/a/,b=/b*/g;xb.call(a,"a");xb.call(b,"a");return 0!==a.lastIndex||0!==b.lastIndex}(),Vb=V||hc,Nb=void 0!==/()??/.exec("")[1];if(Mb||Nb||Vb)Ub=function(a){var b,c,d,e,f=Vb&&this.sticky,h=C.call(this),g=this.source,k=0,l=a;f&&(h=h.replace("y",""),-1===h.indexOf("g")&&(h+="g"),l=String(a).slice(this.lastIndex),0<this.lastIndex&&(!this.multiline||this.multiline&&"\n"!==a[this.lastIndex-1])&&(g="(?: "+g+")",l=" "+l,k++),c=new RegExp("^(?:"+g+")",h));Nb&&(c=new RegExp("^"+g+"$(?!\\s)",h));Mb&&(b=this.lastIndex);d=xb.call(f?c:this,l);f?d?(d.input=d.input.slice(k),d[0]=d[0].slice(k),d.index=this.lastIndex,this.lastIndex+=d[0].length):this.lastIndex=0:Mb&&d&&(this.lastIndex=this.global?d.index+d[0].length:b);Nb&&d&&1<d.length&&ic.call(d[0],c,function(){for(e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(d[e]=void 0)});return d};var A=Ub;na({target:"RegExp",proto:!0,forced:/./.exec!==A},{exec:A});var jc=k("species"),kc=!G(function(){var a=/./;a.exec=function(){var a=[];a.groups={a:"7"};return a};return"7"!=="".replace(a,"$\x3ca\x3e")}),Wb="$0"==="a".replace(/./,"$0"),Xb=k("replace"),Pb;Pb=/./[Xb]?""===/./[Xb]("a","$0"):!1;var nc=!G(function(){var a=/(?:)/,b=a.exec;a.exec=function(){return b.apply(this,arguments)};a="ab".split(a);return 2!==a.length||"a"!==a[0]||"b"!==a[1]}),Yb=function(a,b,c,d){var e=k(a),f=!G(function(){var b={};b[e]=function(){return 7};return 7!=""[a](b)}),h=f&&!G(function(){var b=!1,c=/a/;"split"===a&&(c={constructor:{}},c.constructor[jc]=function(){return c},c.flags="",c[e]=/./[e]);c.exec=function(){b=!0;return null};c[e]("");return!b});if(!f||!h||"replace"===a&&(!kc||!Wb||Pb)||"split"===a&&!nc){var g=/./[e];c=c(e,""[a],function(a,b,c,d,e){return b.exec===A?f&&!e?{done:!0,value:g.call(b,c,d)}:{done:!0,value:a.call(c,b,d)}:{done:!1}},{REPLACE_KEEPS_$0:Wb,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Pb});var l=c[1];z(String.prototype,a,c[0]);z(RegExp.prototype,e,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)})}d&&sa(RegExp.prototype[e],"sham",!0)},oc=k("match"),pc=k("species"),Zb=function(a){return function(b,c){var d=String(E(b)),e=M(c),f=d.length,h,g;if(0>e||e>=f)return a?"":void 0;h=d.charCodeAt(e);return 55296>h||56319<h||e+1===f||56320>(g=d.charCodeAt(e+1))||57343<g?a?d.charAt(e):h:a?d.slice(e,e+2):(h-55296<<10)+(g-56320)+65536}},$b={codeAt:Zb(!1),charAt:Zb(!0)}.charAt,Qb=function(a,b){var c=a.exec;if("function"===typeof c){c=c.call(a,b);if("object"!==typeof c)throw TypeError("RegExp exec method returned something other than an Object or null");return c}if("RegExp"!==Ma(a))throw TypeError("RegExp#exec called on incompatible receiver");return A.call(a,b)},qc=[].push,rc=Math.min,$a=!G(function(){return!RegExp(4294967295,"y")});Yb("split",2,function(a,b,c){var d;d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(a,c){var d=String(E(this)),e=void 0===c?4294967295:c>>>0;if(0===e)return[];if(void 0===a)return[d];var f;if(!Q(a)||(void 0!==(f=a[oc])?!f:"RegExp"!=Ma(a)))return b.call(d,a,e);f=[];for(var h=0,g=new RegExp(a.source,(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":"")+"g"),k,l,F;k=A.call(g,d);){l=g.lastIndex;if(l>h&&(f.push(d.slice(h,k.index)),1<k.length&&k.index<d.length&&qc.apply(f,k.slice(1)),F=k[0].length,h=l,f.length>=e))break;g.lastIndex===k.index&&g.lastIndex++}h===d.length?!F&&g.test("")||f.push(""):f.push(d.slice(h));return f.length>e?f.slice(0,e):f}:"0".split(void 0,0).length?function(a,c){return void 0===a&&0===c?[]:b.call(this,a,c)}:b;return[function(b,c){var e=E(this),f=void 0==b?void 0:b[a];return void 0!==f?f.call(b,e,c):d.call(String(e),b,c)},function(a,e){var f=c(d,a,this,e,d!==b);if(f.done)return f.value;var h=R(a),f=String(this),g;g=RegExp;var k=R(h).constructor,l;g=void 0===k||void 0==(l=R(k)[pc])?g:oa(l);l=h.unicode;h=new g($a?h:"^(?:"+h.source+")",(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+($a?"y":"g"));g=void 0===e?4294967295:e>>>0;if(0===g)return[];if(0===f.length)return null===Qb(h,f)?[f]:[];for(var F=0,m=0,k=[];m<f.length;){h.lastIndex=$a?m:0;var p=Qb(h,$a?f:f.slice(m)),D;if(null===p||(D=rc(L(h.lastIndex+($a?0:m)),f.length))===F)m+=l?$b(f,m).length:1;else{k.push(f.slice(F,m));if(k.length===g)return k;for(F=1;F<=p.length-1;F++)if(k.push(p[F]),k.length===g)return k;m=F=D}}k.push(f.slice(F));return k}]},!$a);var sc=Math.floor,tc="".replace,uc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,vc=/\$([$&'`]|\d{1,2})/g,wc=function(a,b,c,d,e,f){var h=c+a.length,g=d.length,k=vc;void 0!==e&&(e=Object(E(e)),k=uc);return tc.call(f,k,function(f,k){var l;switch(k.charAt(0)){case "$":return"$";case "\x26":return a;case "`":return b.slice(0,c);case "'":return b.slice(h);case "\x3c":l=e[k.slice(1,-1)];break;default:l=+k;if(0===l)return f;if(l>g)return l=sc(l/10),0===l?f:l<=g?void 0===d[l-1]?k.charAt(1):d[l-1]+k.charAt(1):f;l=d[l-1]}return void 0===l?"":l})},xc=Math.max,yc=Math.min,zc=function(a){return void 0===a?a:String(a)};Yb("replace",2,function(a,b,c,d){var e=d.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,f=d.REPLACE_KEEPS_$0,h=e?"$":"$0";return[function(c,d){var e=E(this),f=void 0==c?void 0:c[a];return void 0!==f?f.call(c,e,d):b.call(String(e),c,d)},function(a,d){if(!e&&f||"string"===typeof d&&-1===d.indexOf(h)){var g=c(b,a,this,d);if(g.done)return g.value}var k=R(a),g=String(this),l="function"===typeof d;l||(d=String(d));var F=k.global;if(F){var m=k.unicode;k.lastIndex=0}for(var p=[];;){var n=Qb(k,g);if(null===n)break;p.push(n);if(!F)break;""===String(n[0])&&(n=L(k.lastIndex),n+=m?$b(g,n).length:1,k.lastIndex=n)}m="";for(F=k=0;F<p.length;F++){for(var n=p[F],q=String(n[0]),D=xc(yc(M(n.index),g.length),0),r=[],ca=1;ca<n.length;ca++)r.push(zc(n[ca]));n=n.groups;l?(r=[q].concat(r,D,g),void 0!==n&&r.push(n),n=String(d.apply(void 0,r))):n=wc(q,g,D,r,n,d);D>=k&&(m+=g.slice(k,D)+n,k=D+q.length)}return m+g.slice(k)}]});var Rb=function(a,b,c){b=kb(b);b in a?Da.f(a,b,Ka(0,c)):a[b]=c},Ac=k("species"),Sb=function(a){return 51<=Qa||!G(function(){var b=[];(b.constructor={})[Ac]=function(){return{foo:1}};return 1!==b[a](Boolean).foo})},Bc=Sb("slice"),Cc=k("species"),Dc=[].slice,Ec=Math.max;na({target:"Array",proto:!0,forced:!Bc},{slice:function(a,b){var c=ta(E(this)),d=L(c.length),e=pb(a,d),d=pb(void 0===b?d:b,d),f,h;if(ea(c)&&(f=c.constructor,"function"!=typeof f||f!==Array&&!ea(f.prototype)?Q(f)&&(f=f[Cc],null===f&&(f=void 0)):f=void 0,f===Array||void 0===f))return Dc.call(c,e,d);f=new (void 0===f?Array:f)(Ec(d-e,0));for(h=0;e<d;e++,h++)e in c&&Rb(f,h,c[e]);f.length=h;return f}});var Fc=Sb("map");na({target:"Array",proto:!0,forced:!Fc},{map:function(a){return m(this,a,1<arguments.length?arguments[1]:void 0)}});var ab=Object.assign,ac=Object.defineProperty,bc=!ab||G(function(){if(ya&&1!==ab({b:1},ab(ac({},"a",{enumerable:!0,get:function(){ac(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var a={},b={};$jscomp.initSymbol();var c=Symbol();a[c]=7;"abcdefghijklmnopqrst".split("").forEach(function(a){b[a]=a});return 7!=ab({},a)[c]||"abcdefghijklmnopqrst"!=r(ab({},b)).join("")})?function(a,b){for(var c=Object(E(a)),d=arguments.length,e=1;d>e;)for(var f=ta(arguments[e++]),h=ma?r(f).concat(ma(f)):r(f),g=h.length,k=0,l;g>k;)if(l=h[k++],!ya||za.call(f,l))c[l]=f[l];return c}:ab;na({target:"Object",stat:!0,forced:Object.assign!==bc},{assign:bc});var cc=k("isConcatSpreadable"),Gc=51<=Qa||!G(function(){var a=[];a[cc]=!1;return a.concat()[0]!==a}),Hc=Sb("concat");na({target:"Array",proto:!0,forced:!Gc||!Hc},{concat:function(a){var b=Object(E(this)),c=Ga(b,0),d=0,e,f,h,g,k;e=-1;for(h=arguments.length;e<h;e++)if(k=-1===e?b:arguments[e],f=k,Q(f)?(g=f[cc],f=void 0!==g?!!g:ea(f)):f=!1,f){g=L(k.length);if(9007199254740991<d+g)throw TypeError("Maximum allowed index exceeded");for(f=0;f<g;f++,d++)f in k&&Rb(c,d,k[f])}else{if(9007199254740991<=d)throw TypeError("Maximum allowed index exceeded");Rb(c,d++,k)}c.length=d;return c}});var dc=function(a,b){var c=[][a];return!!c&&G(function(){c.call(null,b||function(){throw 1;},1)})},Ic=[].join,Jc=ta!=Object,Kc=dc("join",",");na({target:"Array",proto:!0,forced:Jc||!Kc},{join:function(a){return Ic.call(ta(E(this)),void 0===a?",":a)}});var Lc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tb=dc("forEach")?[].forEach:function(a){return I(this,a,1<arguments.length?arguments[1]:void 0)},ec;for(ec in Lc){var fc=u[ec],Gb=fc&&fc.prototype;if(Gb&&Gb.forEach!==Tb)try{sa(Gb,"forEach",Tb)}catch(D){Gb.forEach=Tb}}var Hb=n["default"].fn.bootstrapTable.utils,gc={json:"JSON",xml:"XML",png:"PNG",csv:"CSV",txt:"TXT",sql:"SQL",doc:"MS-Word",excel:"MS-Excel",xlsx:"MS-Excel (OpenXML)",powerpoint:"MS-Powerpoint",pdf:"PDF"};n["default"].extend(n["default"].fn.bootstrapTable.defaults,{showExport:!1,exportDataType:"basic",exportTypes:"json xml csv txt sql excel".split(" "),exportOptions:{onCellHtmlData:function(a,b,c,d){return a.is("th")?a.find(".th-inner").text():d}},exportFooter:!1});n["default"].extend(n["default"].fn.bootstrapTable.columnDefaults,{forceExport:!1,forceHide:!1});n["default"].extend(n["default"].fn.bootstrapTable.defaults.icons,{"export":{bootstrap3:"fa fa-download icon-share",materialize:"file_download","bootstrap-table":"icon-download"}[n["default"].fn.bootstrapTable.theme]||"fa-download"});n["default"].extend(n["default"].fn.bootstrapTable.locales,{formatExport:function(){return"Export data"}});n["default"].extend(n["default"].fn.bootstrapTable.defaults,n["default"].fn.bootstrapTable.locales);n["default"].fn.bootstrapTable.methods.push("exportTable");n["default"].extend(n["default"].fn.bootstrapTable.defaults,{onExportSaved:function(a){return!1}});n["default"].extend(n["default"].fn.bootstrapTable.Constructor.EVENTS,{"export-saved.bs.table":"onExportSaved"});n["default"].BootstrapTable=function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");return c.apply(this,arguments)}Db(b,a);var c=qa(b);Ia(b,[{key:"initToolbar",value:function(){var a,c=this,d=this.options,e=d.exportTypes;this.showToolbar=this.showToolbar||d.showExport;if(this.options.showExport){"string"===typeof e&&(e=e.slice(1,-1).replace(/ /g,"").split(",").map(function(a){return a.slice(1,-1)}));this.$export=this.$toolbar.find("\x3e.columns div.export");if(this.$export.length){this.updateExportButton();return}this.buttons=Object.assign(this.buttons,{"export":{html:1===e.length?'\n \x3cdiv class\x3d"export '.concat(this.constants.classes.buttonsDropdown,'"\n data-type\x3d"').concat(e[0],'"\x3e\n \x3cbutton class\x3d"').concat(this.constants.buttonsClass,'"\n aria-label\x3d"Export"\n type\x3d"button"\n title\x3d"').concat(d.formatExport(),'"\x3e\n ').concat(d.showButtonIcons?Hb.sprintf(this.constants.html.icon,d.iconsPrefix,d.icons["export"]):"","\n ").concat(d.showButtonText?d.formatExport():"","\n \x3c/button\x3e\n \x3c/div\x3e\n "):'\n \x3cdiv class\x3d"export '.concat(this.constants.classes.buttonsDropdown,'"\x3e\n \x3cbutton class\x3d"').concat(this.constants.buttonsClass,' dropdown-toggle"\n aria-label\x3d"Export"\n ').concat(this.constants.dataToggle,'\x3d"dropdown"\n type\x3d"button"\n title\x3d"').concat(d.formatExport(),'"\x3e\n ').concat(d.showButtonIcons?Hb.sprintf(this.constants.html.icon,d.iconsPrefix,d.icons["export"]):"","\n ").concat(d.showButtonText?d.formatExport():"","\n ").concat(this.constants.html.dropdownCaret,"\n \x3c/button\x3e\n \x3c/div\x3e\n ")}})}for(var d=arguments.length,f=Array(d),h=0;h<d;h++)f[h]=arguments[h];(a=K(ha(b.prototype),"initToolbar",this)).call.apply(a,[this].concat(f));this.$export=this.$toolbar.find("\x3e.columns div.export");if(this.options.showExport){a=n["default"](this.constants.html.toolbarDropdown.join(""));d=this.$export;if(1<e.length){this.$export.append(a);a.children().length&&(a=a.children().eq(0));var e=Ib(e),g;try{for(e.s();!(g=e.n()).done;){var k=g.value;if(gc.hasOwnProperty(k)){var l=n["default"](Hb.sprintf(this.constants.html.pageDropdownItem,"",gc[k]));l.attr("data-type",k);a.append(l)}}}catch(mc){e.e(mc)}finally{e.f()}d=a.children()}this.updateExportButton();d.click(function(a){a.preventDefault();a={type:n["default"](a.currentTarget).data("type"),escape:!1};c.exportTable(a)});this.handleToolbar()}}},{key:"handleToolbar",value:function(){this.$export&&K(ha(b.prototype),"handleToolbar",this)&&K(ha(b.prototype),"handleToolbar",this).call(this)}},{key:"exportTable",value:function(a){var b=this,c=this.options,d=this.header.stateField,e=c.cardView,f=function(f){d&&b.hideColumn(d);e&&b.toggleView();b.columns.forEach(function(a){a.forceHide&&b.hideColumn(a.field)});var h=b.getData();if(c.detailView&&c.detailViewIcon){var g="left"===c.detailViewAlign?0:b.getVisibleFields().length+Hb.getDetailViewIndexOffset(b.options);c.exportOptions.ignoreColumn=[g].concat(c.exportOptions.ignoreColumn||[])}if(c.exportFooter){var g=b.$tableFooter.find("tr").first(),k=[];n["default"].each(g.children(),function(a,b){var c=n["default"](b).children(".th-inner").first().html();k.push(c)});b.$body.append(b.$body.children().last()[0].outerHTML);g=b.$body.children().last();n["default"].each(g.children(),function(a,b){n["default"](b).html(k[a])})}var l=b.getHiddenColumns();l.forEach(function(a){a.forceExport&&b.showColumn(a.field)});"function"===typeof c.exportOptions.fileName&&(a.fileName=c.exportOptions.fileName());b.$el.tableExport(n["default"].extend({onAfterSaveToFile:function(){c.exportFooter&&b.load(h);d&&b.showColumn(d);e&&b.toggleView();l.forEach(function(a){a.forceExport&&b.hideColumn(a.field)});b.columns.forEach(function(a){a.forceHide&&b.showColumn(a.field)});f&&f()}},c.exportOptions,a))};if("all"===c.exportDataType&&c.pagination){var h=this.options.virtualScroll;this.$el.one("server"===c.sidePagination?"post-body.bs.table":"page-change.bs.table",function(){setTimeout(function(){f(function(){b.options.virtualScroll=h;b.togglePagination()})},0)});this.options.virtualScroll=!1;this.togglePagination();this.trigger("export-saved",this.getData())}else if("selected"===c.exportDataType){var g=this.getData(),k=this.getSelections(),l=c.pagination;k.length&&("server"===c.sidePagination&&(g=mb({total:c.totalRows},this.options.dataField,g),k=mb({total:k.length},this.options.dataField,k)),this.load(k),l&&this.togglePagination(),f(function(){l&&b.togglePagination();b.load(g)}),this.trigger("export-saved",k))}else f(),this.trigger("export-saved",this.getData(!0))}},{key:"updateSelected",value:function(){K(ha(b.prototype),"updateSelected",this).call(this);this.updateExportButton()}},{key:"updateExportButton",value:function(){"selected"===this.options.exportDataType&&this.$export.find("\x3e button").prop("disabled",!this.getSelections().length)}}]);return b}(n["default"].BootstrapTable)}); |