/* tableexport.jquery.plugin version 1.28.0 copyright (c) 2015-2023 hhurz, https://github.com/hhurz/tableexport.jquery.plugin based on https://github.com/kayalshri/tableexport.jquery.plugin licensed under the mit license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findinternal=function(d,i,w){d instanceof string&&(d=string(d));for(var j=d.length,k=0;ke&&"undefined"!==typeof fa[e]&&-1!==d.inarray(fa[e],b.ignorecolumn))&&(h=!0):h=!0;return h}function g(a,c,e,h,f){if("function"===typeof f){var x=!1;"function"===typeof b.onignorerow&&(x=b.onignorerow(d(a),e));if(!1===x&&(0===b.ignorerow.length||-1===d.inarray(e,b.ignorerow)&&-1===d.inarray(e-h,b.ignorerow))&&o(d(a))){a= p(d(a),c);var m=a.length,g=0,p=0;a.each(function(){var a=d(this),c=q(this),b=ha(this),h;d.each(n,function(){if(e>this.s.r&&e<=this.e.r&&g>=this.s.c&&g<=this.e.c)for(h=0;h<=this.e.c-this.s.c;++h)m++,p++,f(null,e,g++)});if(b||c)c=c||1,n.push({s:{r:e,c:g},e:{r:e+(b||1)-1,c:g+c-1}});!1===va(a,m,p++)&&f(this,e,g++);if(1=this.s.r&&e<=this.e.r&&g>=this.s.c&&g<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f(null,e,g++)})}}}function wa(a,c, b,h){if("undefined"!==typeof h.images&&(b=h.images[b],"undefined"!==typeof b)){c=c.getboundingclientrect();var e=a.width/a.height,d=c.width/c.height,m=a.width,g=a.height,p=19.049976/25.4,b=0;d<=e?(g=math.min(a.height,c.height),m=c.width*g/c.height):d>e&&(m=math.min(a.width,c.width),g=c.height*m/c.width);m*=p;g*=p;ga.textpos.x&&h+b>a.textpos.x+a.width&&(0<=".,!%*;:=-".indexof(p.charat(0))&&(z=p.charat(0),b=e.doc.getstringunitwidth(z)*e.doc.internal.getfontsize(),h+b<=a.textpos.x+a.width&&(za(z,h,f,x),p=p.substring(1,p.length)),b=e.doc.getstringunitwidth(p)*e.doc.internal.getfontsize()),h=a.textpos.x,f+=e.doc.internal.getfontsize()); if("visible"!==a.styles.overflow)for(;p.length&&h+b>a.textpos.x+a.width;)p=p.substring(0,p.length-1),b=e.doc.getstringunitwidth(p)*e.doc.internal.getfontsize();za(p,h,f,x);h+=b}if(m||g)d(c).is("b")?m=!1:d(c).is("i")&&(g=!1),e.doc.setfont("undefined ",m||g?m?"bold":"italic":"normal");c=c.nextsibling}a.textpos.x=h;a.textpos.y=f}else za(a.text,a.textpos.x,a.textpos.y,x)}}function la(a,c,b){return null==a?"":a.tostring().replace(new regexp(null==c?"":c.tostring().replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"),"g"),b)}function ha(a){return null==a?"":a.tostring().replace(/^\s+/,"")}function ia(a){return null==a?"":a.tostring().replace(/\s+$/,"")}function ob(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"+g+"",null,!1);var p=0,b=0;g="";d.each(a,function(){if(d(this).is("input"))g+=m.find("input").eq(p++).val();else if(d(this).is("select"))g+=m.find("select option:selected").eq(b++).text();else if(d(this).is("br"))g+="
";else{if("undefined"===typeof d(this).html())g+=d(this).text(); else if(void 0===jquery().bootstraptable||!1===d(this).hasclass("fht-cell")&&!1===d(this).hasclass("filtercontrol")&&0===m.parents(".detail-view").length)g+=d(this).html();if(d(this).is("a")){var a=m.find("a").attr("href")||"";f="function"===typeof b.oncellhtmlhyperlink?f+b.oncellhtmlhyperlink(m,c,e,a,g):"href"===b.htmlhyperlink?f+a:f+g;g=""}}})}if(g&&""!==g&&!0===b.htmlcontent)f=d.trim(g);else if(g&&""!==g)if(""!==m.attr("data-tableexport-cellformat")){var z=g.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi, "\u2060"),k=d("
").html(z).contents();a=!1;z="";d.each(k.text().split("\u2028"),function(a,c){0a?1:0)).split(".");1===k.length&&(k[1]="");var l=3a?"-":"")+(b.numbers.output.thousandsseparator?(l?k[0].substr(0,l)+b.numbers.output.thousandsseparator:"")+k[0].substr(l).replace(/(\d{3})(?=\d)/g,"$1"+b.numbers.output.thousandsseparator):k[0])+(k[1].length?b.numbers.output.decimalmark+ k[1]:"")}}else f=g;!0===b.escape&&(f=escape(f));"function"===typeof b.oncelldata&&(f=b.oncelldata(m,c,e,f,x),m.data("teuserdeftext",1))}void 0!==h&&(h.type=x);return f}function db(a){return 0x?f+=string.fromcharcode(x):(127x?f+=string.fromcharcode(x>>6|192):(f+=string.fromcharcode(x>>12|224),f+=string.fromcharcode(x>>6&63|128)),f+=string.fromcharcode(x&63|128))}a=f}for(;d>2;m=(m&3)<<4|f>>4;var g=(f&15)<<2|c>>6;var p=c&63;isnan(f)?g=p=64:isnan(c)&&(p=64);b=b+"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=".charat(x)+ "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=".charat(m)+"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=".charat(g)+"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=".charat(p)}return b}function sb(a,c,b,d){c&&"object"===typeof c||console.error("the headers should be an object or array, is: "+typeof c);b&&"object"===typeof b||console.error("the data should be an object or array, is: "+typeof b);d&&"object"!==typeof d&&console.error("the data should be an object or array, is: "+ typeof b);array.prototype.foreach||console.error("the current browser does not support array.prototype.foreach which is required for jspdf-autotable");y=a;l=tb(d||{});ma=1;f={y:!1===l.starty?l.margin.top:l.starty};a={textcolor:30,fontsize:y.internal.getfontsize(),fontstyle:y.internal.getfont().fontstyle,fontname:y.internal.getfont().fontname};ub(c,b);vb();c=l.starty+l.margin.bottom+q.headerrow.height+(q.rows[0]&&"auto"===l.pagebreak?q.rows[0].height:0);"avoid"===l.pagebreak&&(c+=q.height);if("always"=== l.pagebreak&&!1!==l.starty||!1!==l.starty&&c>y.internal.pagesize.height)y.addpage(),f.y=l.margin.top;ma(a);l.beforepagecontent(u());!1!==l.drawheaderrow(q.headerrow,u({row:q.headerrow}))&&na(q.headerrow,l.drawheadercell);ma(a);wb();l.afterpagecontent(u());ma(a);return y}function za(a,c,b,d){"number"===typeof c&&"number"===typeof b||console.error("the x and y parameters are required. missing for the text: ",a);var e=y.internal.getfontsize()/y.internal.scalefactor,h=/\r\n|\r|\n/g,m=null,g=1;if("middle"=== d.valign||"bottom"===d.valign||"center"===d.halign||"right"===d.halign)m="string"===typeof a?a.split(h):a,g=m.length||1;b+=e*(2-1.15);"middle"===d.valign?b-=g/2*e:"bottom"===d.valign&&(b-=g*e);if("center"===d.halign||"right"===d.halign){h=e;"center"===d.halign&&(h*=.5);if(m&&1<=g){for(a=0;ab.contentwidth&&(b.contentwidth=a)});b.width=b.contentwidth;a+=b.contentwidth});q.contentwidth=a;var b=y.internal.pagesize.width-l.margin.left-l.margin.right,d=b;"number"===typeof l.tablewidth?d=l.tablewidth:"wrap"===l.tablewidth&&(d=q.contentwidth);q.width=dq.width?a.width=a.contentwidth:(h.push(a),f+=a.contentwidth,a.width=0);m+=a.width});hb(h,m,f,k);q.height=0;q.rows.concat(q.headerrow).foreach(function(a,b){var c=0,d=q.x;q.columns.foreach(function(b){var e=a.cells[b.datakey];b.x=d;ma(e.styles);var g=b.width- 2*e.styles.cellpadding;"linebreak"===e.styles.overflow?e.text=y.splittexttosize(e.text,g+1,{fontsize:e.styles.fontsize}):"ellipsize"===e.styles.overflow?e.text=oa(e.text,g,e.styles):"visible"!==e.styles.overflow&&("hidden"===e.styles.overflow?e.text=oa(e.text,g,e.styles,""):"function"===typeof e.styles.overflow?e.text=e.styles.overflow(e.text,g):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;q.height+=a.height})}function hb(a,b,d,h){for(var c=q.width-b-d,e=0;ec&&p){a.splice(e,1);d-=m.contentwidth;m.width=h;b+=m.width;hb(a,b,d,h);break}else m.width=m.contentwidth+c*g}}function wb(){q.rows.foreach(function(a,b){f.y+a.height+l.margin.bottom>=y.internal.pagesize.height&&(l.afterpagecontent(u()),y.addpage(),ma++,f={x:l.margin.left,y:l.margin.top}, l.beforepagecontent(u()),!1!==l.drawheaderrow(q.headerrow,u({row:q.headerrow}))&&na(q.headerrow,l.drawheadercell));a.y=f.y;!1!==l.drawrow(a,u({row:a}))&&na(a,l.drawcell)})}function na(a,b){for(var c=0;c= ca(a,d))return a;for(;ba.length);)a=a.substring(0,a.length-1);return a.trim()+h}function ca(a,b){ma(b);return y.getstringunitwidth(a)*b.fontsize}function z(a){var b={},d;for(d in a)a.hasownproperty(d)&&(b[d]=a[d]);for(var h=1;h"+e(a,b,d)+""});r++});da+="";var ib=1;a=y(d(u));d(a).each(function(){var a=1;t="";g(this,"td,th",r,v.length+a.length,function(b,d,h){t+=""+e(b,d,h)+"";a++});0"!==t&&(da+=''+t+"",ib++);r++});da+="";if("string"=== b.outputmode)return da;if("base64"===b.outputmode)return s(da);t(da,b.filename+".xml","application/xml","utf-8","base64",!1)}else if("excel"===b.type&&"xmlss"===b.mso.fileformat){var sa=[],m=[];d(u).filter(function(){return o(d(this))}).each(function(){function a(a,b,c){var e=[];d(a).each(function(){var b=0,f=0;t="";g(this,"td,th",r,c+a.length,function(a,c,g){if(null!==a){var m="";c=e(a,c,g);g="string";if(!1!==jquery.isnumeric(c))g="number";else{var h=pb(c);!1!==h&&(c=h,g="number",m+=' ss:styleid="pct1"')}"number"!== g&&(c=c.replace(/\n/g,"
"));h=q(a);a=ha(a);d.each(e,function(){if(r>=this.s.r&&r<=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||h)a=a||1,h=h||1,e.push({s:{r:r,c:f},e:{r:r+a-1,c:f+h-1}});1'+d("
").text(c).html()+"\r";f++}});0\r'+ t+"\r");r++});return a.length}var c=d(this),e="";"string"===typeof b.mso.worksheetname&&b.mso.worksheetname.length?e=b.mso.worksheetname+" "+(m.length+1):"undefined"!==typeof b.mso.worksheetname[m.length]&&(e=b.mso.worksheetname[m.length]);e.length||(e=c.find("caption").text()||"");e.length||(e="table "+(m.length+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));m.push(d("
").text(e).html());!1===b.exporthiddencells&&(r=c.find("tr, th, td").filter(":hidden"),ka=0\r";e=a(x(c),"th,td",0);a(y(c),"td,th",e);l+="\r";sa.push(l)});for(var da={},ta={},ea,ra,oa=0,yb=m.length;oa\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r false\r false\r\r\r \r \r \r\r', ea=0;ea\r'+sa[ea],w=b.mso.rtl?w+'\r\r\r':w+'\r',w+="\r";w+="\r";if("string"===b.outputmode)return w;if("base64"===b.outputmode)return s(w);t(w,b.filename+".xml","application/xml","utf-8","base64",!1)}else if("excel"=== b.type&&"xlsx"===b.mso.fileformat){var sa=[],jb=xlsx.utils.book_new();d(u).filter(function(){return o(d(this))}).each(function(){for(var a=d(this),c,e={},h=this.getelementsbytagname("tr"),f=math.min(1e7,h.length),k={s:{r:0,c:0},e:{r:0,c:0}},m=[],g,p=0,b=0,z,l,r,q,n,t=xlsx.ssf.get_table();pc||36c||48===c)u="n";else{if("date"===w.type||13c||44c||56===c)u="d"}else u="s";if(null!=c){if(0===c.length)g.t="z";else if(0!==c.trim().length&&"s"!==u)if("function"===w.type)g={f:c};else if("true"===c)g={t:"b",v:!0};else if("false"===c)g={t:"b",v:!1};else if("n"===u||isfinite(fb(c,b.numbers.output))){if(u= fb(c,b.numbers.output),0===c&&"function"!==typeof b.mso.xlsx.formatid.numbers&&(c=b.mso.xlsx.formatid.numbers),isfinite(u)||isfinite(c))g={t:"n",v:isfinite(u)?u:c,z:"string"===typeof c?c:c in t?t[c]:c===b.mso.xlsx.formatid.currency?b.mso.xlsx.format.currency:"0.00"}}else if(!1!==(w=ob(c))||"d"===u)0===c&&"function"!==typeof b.mso.xlsx.formatid.date&&(c=b.mso.xlsx.formatid.date),g={t:"d",v:!1!==w?w:c,z:"string"===typeof c?c:c in t?t[c]:"m/d/yy"};(u=d(n).find("a"))&&u.length&&(u=u[0].hasattribute("href")? u.attr("href"):"",c="href"!==b.htmlhyperlink||""===u?c:"",w=""!==u?'=hyperlink("'+u+(c.length?'","'+c:"")+'")':"",""!==w&&("function"===typeof b.mso.xlsx.onhyperlink?(c=b.mso.xlsx.onhyperlink(d(n),p,z,u,c,w),g=0!==c.indexof("=hyperlink")?{t:"s",v:c}:{f:c}):g={f:w}))}e[ka({c:l,r:b})]=g;k.e.c=f&&(e["!fullref"]=la((k.e.r=h.length-p+b-1,k)));c="";"string"===typeof b.mso.worksheetname&& b.mso.worksheetname.length?c=b.mso.worksheetname+" "+(sa.length+1):"undefined"!==typeof b.mso.worksheetname[sa.length]&&(c=b.mso.worksheetname[sa.length]);c.length||(c=a.find("caption").text()||"");c.length||(c="table "+(sa.length+1));c=d.trim(c.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));sa.push(c);xlsx.utils.book_append_sheet(jb,e,c)});var zb=xlsx.write(jb,{type:"binary",booktype:b.mso.fileformat,booksst:!1});t(rb(zb),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 ta="excel"===b.type||"xls"===b.type?"excel":"word",ab="excel"===ta?"xls":"doc",bb='xmlns:x="urn:schemas-microsoft-com:office:'+ta+'"',ua=l="";d(u).filter(function(){return o(d(this))}).each(function(){var a=d(this);""===ua&&(ua=b.mso.worksheetname||a.find("caption").text()||"table",ua=d.trim(ua.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===b.exporthiddencells&&(r=a.find("tr, th, td").filter(":hidden"), ka=0";v=x(a);d(v).each(function(){var a=d(this),e=document.defaultview.getcomputedstyle(a[0],null);t="";g(this,"th,td",r,v.length,function(a,c,d){if(null!==a){var f="";t+=""}});0"+t+"");r++});l+="";a=y(a);d(a).each(function(){var a=d(this),e=null,h=null;t="";g(this,"td,th",r,v.length+a.length,function(c,k,m){if(null!==c){var g=e(c,k,m),f="",l=d(c).attr("data-tableexport-msonumberformat");"undefined"===typeof l&&"function"===typeof b.mso.onmsonumberformat&&(l=b.mso.onmsonumberformat(c,k,m));"undefined"!==typeof l&&""!==l&&(f="style=\"mso-number-format:'"+ l+"'");if(b.mso.styles.length){e=document.defaultview.getcomputedstyle(c,null);h=null;for(var n in b.mso.styles)k=b.mso.styles[n],l=h(e,k),""===l&&(null===h&&(h=document.defaultview.getcomputedstyle(a[0],null)),l=h(h,k)),""!==l&&"0px none rgb(0, 0, 0)"!==l&&"rgba(0, 0, 0, 0)"!==l&&(f+=""===f?'style="':";",f+=k+":"+l)}t+=""));t+=">"+g+""}}); 0"+t+"");r++});b.displaytablename&&(l+=""+e(d("

"+b.tablename+"

"))+"");l+=""});var n='';n+="";n+='';"excel"===ta&&(n+="\x3c!--[if gte mso 9]>",n+="",n+="",n+="",n+="", n+="",n+=ua,n+="",n+="",n+="",b.mso.rtl&&(n+=""),n+="",n+="",n+="",n+="",n+="",n+="";n+="@page { size:"+b.mso.pageorientation+"; mso-page-orientation:"+b.mso.pageorientation+"; }";n+="@page section1 {size:"+v[b.mso.pageformat][0]+"pt "+v[b.mso.pageformat][1]+"pt";n+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}"; n+="div.section1 {page:section1;}";n+="@page section2 {size:"+v[b.mso.pageformat][1]+"pt "+v[b.mso.pageformat][0]+"pt";n+=";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;}";n+="div.section2 {page:section2;}";n+="br {mso-data-placement:same-cell;}";n+="";n+="";n+="";n+='
';n+=l;n+="
";n+="";n+=""; if("string"===b.outputmode)return n;if("base64"===b.outputmode)return s(n);t(n,b.filename+"."+ab,"application/vnd.ms-"+ta,"","base64",!1)}else if("png"===b.type)html2canvas(d(u)[0]).then(function(a){a=a.todataurl();for(var c=atob(a.substring(22)),d=new arraybuffer(c.length),h=new uint8array(d),f=0;fkb){a>v.a0[0]&&(fa="a0",va="l");for(var b in v)v.hasownproperty(b)&&v[b][1]>a&&(fa=b,va="l",v[b][0]>a&&(va="p"));kb=a}}});b.jspdf.format=""===fa?"a4":fa;b.jspdf.orientation=""===va?"w":va}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);ba.fontname=k.doc.getfont().fontname;!0===k.outputimages&&(k.images={});"undefined"!==typeof k.images&&(d(u).filter(function(){return o(d(this))}).each(function(){var a=0;n=[];!1===b.exporthiddencells&&(r=d(this).find("tr, th, td").filter(":hidden"),ka=0a.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){b=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 b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===c.styles.halign&&(a.styles.halign=b.style.align),"inherit"===c.styles.fillcolor&&(a.styles.fillcolor=b.style.bcolor),"inherit"===c.styles.textcolor&& (a.styles.textcolor=b.style.color),"inherit"===c.styles.fontstyle&&(a.styles.fontstyle=b.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?ya(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))ya(a,b,c)&&(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?cb(a,{},k):(b=a.height/c.rect.height,b>k.hscalefactor&&(k.hscalefactor=b),k.wscalefactor=a.width/c.rect.width,b=a.textpos.y,ab(a,c.elements,k),a.textpos.y=b,cb(a,c.elements,k)));else{c=c.elements[0];var 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;wa(a,c,e,k)}return!1});k.headerrows=[];v=x(d(this));d(v).each(function(){a=0;k.headerrows[r]=[];g(this,"th,td",r,v.length,function(b,c,d){var e=eb(b);e.title=e(b,c,d);e.key=a++;e.rowindex=r;k.headerrows[r].push(e)});r++});if(0