import{b as q,a as tt,g as et}from"./index-Cnr5LCrh.js";import{j as nt}from"./jspdf.es.min-DCw0FjSx.js";function rt(Y,$){for(var N=0;N<$.length;N++){const L=$[N];if(typeof L!="string"&&!Array.isArray(L)){for(const E in L)if(E!=="default"&&!(E in Y)){const B=Object.getOwnPropertyDescriptor(L,E);B&&Object.defineProperty(Y,E,B.get?B:{enumerable:!0,get:()=>L[E]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}var K={exports:{}};const it=q(nt);/*! * * jsPDF AutoTable plugin v3.8.4 * * Copyright (c) 2024 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable * Licensed under the MIT License. * http://opensource.org/licenses/mit-license * */var Z=K.exports,X;function at(){return X||(X=1,function(Y,$){(function(L,E){Y.exports=E(function(){try{return it}catch{}}())})(typeof globalThis<"u"?globalThis:typeof Z<"u"?Z:typeof window<"u"?window:typeof self<"u"?self:tt,function(N){return function(){var L={172:function(z,m){var D=this&&this.__extends||function(){var c=function(P,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,y){w.__proto__=y}||function(w,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(w[h]=y[h])},c(P,a)};return function(P,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(P,a);function w(){this.constructor=P}P.prototype=a===null?Object.create(a):(w.prototype=a.prototype,new w)}}();Object.defineProperty(m,"__esModule",{value:!0}),m.CellHookData=m.HookData=void 0;var x=function(){function c(P,a,w){this.table=a,this.pageNumber=a.pageNumber,this.pageCount=this.pageNumber,this.settings=a.settings,this.cursor=w,this.doc=P.getDocument()}return c}();m.HookData=x;var b=function(c){D(P,c);function P(a,w,y,h,r,t){var e=c.call(this,a,w,t)||this;return e.cell=y,e.row=h,e.column=r,e.section=h.section,e}return P}(x);m.CellHookData=b},340:function(z,m,D){Object.defineProperty(m,"__esModule",{value:!0});var x=D(4),b=D(136),c=D(744),P=D(776),a=D(664),w=D(972);function y(h){h.API.autoTable=function(){for(var r=[],t=0;t"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var l=new c.DocHandler(this),f=(0,x.parseHtml)(l,r,window,t,!1),n=f.head,s=f.body,v=((e=n[0])===null||e===void 0?void 0:e.map(function(p){return p.content}))||[];return{columns:v,rows:s,data:s}},h.API.autoTableEndPosY=function(){console.error("Use of deprecated function: autoTableEndPosY. Use doc.lastAutoTable.finalY instead.");var r=this.lastAutoTable;return r&&r.finalY?r.finalY:0},h.API.autoTableAddPageContent=function(r){return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."),h.API.autoTable.globalDefaults||(h.API.autoTable.globalDefaults={}),h.API.autoTable.globalDefaults.addPageContent=r,this},h.API.autoTableAddPage=function(){return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"),this.addPage(),this}}m.default=y},136:function(z,m){Object.defineProperty(m,"__esModule",{value:!0});function D(x,b,c,P,a){P=P||{};var w=1.15,y=a.internal.scaleFactor,h=a.internal.getFontSize()/y,r=a.getLineHeightFactor?a.getLineHeightFactor():w,t=h*r,e=/\r\n|\r|\n/g,l="",f=1;if((P.valign==="middle"||P.valign==="bottom"||P.halign==="center"||P.halign==="right")&&(l=typeof x=="string"?x.split(e):x,f=l.length||1),c+=h*(2-w),P.valign==="middle"?c-=f/2*t:P.valign==="bottom"&&(c-=f*t),P.halign==="center"||P.halign==="right"){var n=h;if(P.halign==="center"&&(n*=.5),l&&f>=1){for(var s=0;s0,h=w||w===0;return y&&h?"DF":y?"S":h?"F":null}m.getFillStyle=b;function c(a,w){var y,h,r,t;if(a=a||w,Array.isArray(a)){if(a.length>=4)return{top:a[0],right:a[1],bottom:a[2],left:a[3]};if(a.length===3)return{top:a[0],right:a[1],bottom:a[2],left:a[1]};if(a.length===2)return{top:a[0],right:a[1],bottom:a[0],left:a[1]};a.length===1?a=a[0]:a=w}return typeof a=="object"?(typeof a.vertical=="number"&&(a.top=a.vertical,a.bottom=a.vertical),typeof a.horizontal=="number"&&(a.right=a.horizontal,a.left=a.horizontal),{left:(y=a.left)!==null&&y!==void 0?y:w,top:(h=a.top)!==null&&h!==void 0?h:w,right:(r=a.right)!==null&&r!==void 0?r:w,bottom:(t=a.bottom)!==null&&t!==void 0?t:w}):(typeof a!="number"&&(a=w),{top:a,right:a,bottom:a,left:a})}m.parseSpacing=c;function P(a,w){var y=c(w.settings.margin,0);return a.pageSize().width-(y.left+y.right)}m.getPageAvailableWidth=P},796:function(z,m){var D=this&&this.__extends||function(){var P=function(a,w){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,h){y.__proto__=h}||function(y,h){for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(y[r]=h[r])},P(a,w)};return function(a,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");P(a,w);function y(){this.constructor=a}a.prototype=w===null?Object.create(w):(y.prototype=w.prototype,new y)}}();Object.defineProperty(m,"__esModule",{value:!0}),m.getTheme=m.defaultStyles=m.HtmlRowInput=void 0;var x=function(P){D(a,P);function a(w){var y=P.call(this)||this;return y._element=w,y}return a}(Array);m.HtmlRowInput=x;function b(P){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/P,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}m.defaultStyles=b;function c(P){var a={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return a[P]}m.getTheme=c},903:function(z,m,D){Object.defineProperty(m,"__esModule",{value:!0}),m.parseCss=void 0;var x=D(420);function b(y,h,r,t,e){var l={},f=1.3333333333333333,n=P(h,function(d){return e.getComputedStyle(d).backgroundColor});n!=null&&(l.fillColor=n);var s=P(h,function(d){return e.getComputedStyle(d).color});s!=null&&(l.textColor=s);var v=w(t,r);v&&(l.cellPadding=v);var p="borderTopColor",g=f*r,o=t.borderTopWidth;if(t.borderBottomWidth===o&&t.borderRightWidth===o&&t.borderLeftWidth===o){var C=(parseFloat(o)||0)/g;C&&(l.lineWidth=C)}else l.lineWidth={top:(parseFloat(t.borderTopWidth)||0)/g,right:(parseFloat(t.borderRightWidth)||0)/g,bottom:(parseFloat(t.borderBottomWidth)||0)/g,left:(parseFloat(t.borderLeftWidth)||0)/g},l.lineWidth.top||(l.lineWidth.right?p="borderRightColor":l.lineWidth.bottom?p="borderBottomColor":l.lineWidth.left&&(p="borderLeftColor"));var _=P(h,function(d){return e.getComputedStyle(d)[p]});_!=null&&(l.lineColor=_);var j=["left","right","center","justify"];j.indexOf(t.textAlign)!==-1&&(l.halign=t.textAlign),j=["middle","bottom","top"],j.indexOf(t.verticalAlign)!==-1&&(l.valign=t.verticalAlign);var u=parseInt(t.fontSize||"");isNaN(u)||(l.fontSize=u/f);var i=c(t);i&&(l.fontStyle=i);var S=(t.fontFamily||"").toLowerCase();return y.indexOf(S)!==-1&&(l.font=S),l}m.parseCss=b;function c(y){var h="";return(y.fontWeight==="bold"||y.fontWeight==="bolder"||parseInt(y.fontWeight)>=700)&&(h="bold"),(y.fontStyle==="italic"||y.fontStyle==="oblique")&&(h+="italic"),h}function P(y,h){var r=a(y,h);if(!r)return null;var t=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!t||!Array.isArray(t))return null;var e=[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])],l=parseInt(t[4]);return l===0||isNaN(e[0])||isNaN(e[1])||isNaN(e[2])?null:e}function a(y,h){var r=h(y);return r==="rgba(0, 0, 0, 0)"||r==="transparent"||r==="initial"||r==="inherit"?y.parentElement==null?null:a(y.parentElement,h):r}function w(y,h){var r=[y.paddingTop,y.paddingRight,y.paddingBottom,y.paddingLeft],t=96/(72/h),e=(parseInt(y.lineHeight)-parseInt(y.fontSize))/h/2,l=r.map(function(n){return parseInt(n||"0")/t}),f=(0,x.parseSpacing)(l,0);return e>f.top&&(f.top=e),e>f.bottom&&(f.bottom=e),f}},744:function(z,m){Object.defineProperty(m,"__esModule",{value:!0}),m.DocHandler=void 0;var D={},x=function(){function b(c){this.jsPDFDocument=c,this.userStyles={textColor:c.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:c.internal.getFontSize(),fontStyle:c.internal.getFont().fontStyle,font:c.internal.getFont().fontName,lineWidth:c.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:c.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return b.setDefaults=function(c,P){P===void 0&&(P=null),P?P.__autoTableDocumentDefaults=c:D=c},b.unifyColor=function(c){return Array.isArray(c)?c:typeof c=="number"?[c,c,c]:typeof c=="string"?[c]:null},b.prototype.applyStyles=function(c,P){var a,w,y;P===void 0&&(P=!1),c.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(c.fontStyle);var h=this.jsPDFDocument.internal.getFont(),r=h.fontStyle,t=h.fontName;if(c.font&&(t=c.font),c.fontStyle){r=c.fontStyle;var e=this.getFontList()[t];e&&e.indexOf(r)===-1&&(this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(e[0]),r=e[0])}if(this.jsPDFDocument.setFont(t,r),c.fontSize&&this.jsPDFDocument.setFontSize(c.fontSize),!P){var l=b.unifyColor(c.fillColor);l&&(a=this.jsPDFDocument).setFillColor.apply(a,l),l=b.unifyColor(c.textColor),l&&(w=this.jsPDFDocument).setTextColor.apply(w,l),l=b.unifyColor(c.lineColor),l&&(y=this.jsPDFDocument).setDrawColor.apply(y,l),typeof c.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(c.lineWidth)}},b.prototype.splitTextToSize=function(c,P,a){return this.jsPDFDocument.splitTextToSize(c,P,a)},b.prototype.rect=function(c,P,a,w,y){return this.jsPDFDocument.rect(c,P,a,w,y)},b.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},b.prototype.getTextWidth=function(c){return this.jsPDFDocument.getTextWidth(c)},b.prototype.getDocument=function(){return this.jsPDFDocument},b.prototype.setPage=function(c){this.jsPDFDocument.setPage(c)},b.prototype.addPage=function(){return this.jsPDFDocument.addPage()},b.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},b.prototype.getGlobalOptions=function(){return D||{}},b.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},b.prototype.pageSize=function(){var c=this.jsPDFDocument.internal.pageSize;return c.width==null&&(c={width:c.getWidth(),height:c.getHeight()}),c},b.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},b.prototype.getLineHeightFactor=function(){var c=this.jsPDFDocument;return c.getLineHeightFactor?c.getLineHeightFactor():1.15},b.prototype.getLineHeight=function(c){return c/this.scaleFactor()*this.getLineHeightFactor()},b.prototype.pageNumber=function(){var c=this.jsPDFDocument.internal.getCurrentPageInfo();return c?c.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},b}();m.DocHandler=x},4:function(z,m,D){Object.defineProperty(m,"__esModule",{value:!0}),m.parseHtml=void 0;var x=D(903),b=D(796);function c(w,y,h,r,t){var e,l;r===void 0&&(r=!1),t===void 0&&(t=!1);var f;typeof y=="string"?f=h.document.querySelector(y):f=y;var n=Object.keys(w.getFontList()),s=w.scaleFactor(),v=[],p=[],g=[];if(!f)return console.error("Html table could not be found with input: ",y),{head:v,body:p,foot:g};for(var o=0;o0&&(t||p.display!=="none"))return l}function a(w){var y=w.cloneNode(!0);return y.innerHTML=y.innerHTML.replace(/\n/g,"").replace(/ +/g," "),y.innerHTML=y.innerHTML.split(//).map(function(h){return h.trim()}).join(` `),y.innerText||y.textContent||""}},776:function(z,m,D){Object.defineProperty(m,"__esModule",{value:!0}),m.parseInput=void 0;var x=D(4),b=D(356),c=D(420),P=D(744),a=D(792);function w(f,n){var s=new P.DocHandler(f),v=s.getDocumentOptions(),p=s.getGlobalOptions();(0,a.default)(s,p,v,n);var g=(0,b.assign)({},p,v,n),o;typeof window<"u"&&(o=window);var C=y(p,v,n),_=h(p,v,n),j=r(s,g),u=e(s,g,o);return{id:n.tableId,content:u,hooks:_,styles:C,settings:j}}m.parseInput=w;function y(f,n,s){for(var v={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},p=function(_){if(_==="columnStyles"){var j=f[_],u=n[_],i=s[_];v.columnStyles=(0,b.assign)({},j,u,i)}else{var S=[f,n,s],d=S.map(function(W){return W[_]||{}});v[_]=(0,b.assign)({},d[0],d[1],d[2])}},g=0,o=Object.keys(v);g0?"_".concat(_):"");var u={dataKey:j};p.push(u)}}),p}},792:function(z,m){Object.defineProperty(m,"__esModule",{value:!0});function D(b,c,P,a){for(var w=function(t){t&&typeof t!="object"&&console.error("The options parameter should be of type object, is: "+typeof t),typeof t.extendWidth<"u"&&(t.tableWidth=t.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),typeof t.margins<"u"&&(typeof t.margin>"u"&&(t.margin=t.margins),console.error("Use of deprecated option: margins, use margin instead.")),t.startY&&typeof t.startY!="number"&&(console.error("Invalid value for startY option",t.startY),delete t.startY),!t.didDrawPage&&(t.afterPageContent||t.beforePageContent||t.afterPageAdd)&&(console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"),t.didDrawPage=function(g){b.applyStyles(b.userStyles),t.beforePageContent&&t.beforePageContent(g),b.applyStyles(b.userStyles),t.afterPageContent&&t.afterPageContent(g),b.applyStyles(b.userStyles),t.afterPageAdd&&g.pageNumber>1&&g.afterPageAdd(g),b.applyStyles(b.userStyles)}),["createdHeaderCell","drawHeaderRow","drawRow","drawHeaderCell"].forEach(function(g){t[g]&&console.error('The "'.concat(g,'" hook has changed in version 3.0, check the changelog for how to migrate.'))}),[["showFoot","showFooter"],["showHead","showHeader"],["didDrawPage","addPageContent"],["didParseCell","createdCell"],["headStyles","headerStyles"]].forEach(function(g){var o=g[0],C=g[1];t[C]&&(console.error("Use of deprecated option ".concat(C,". Use ").concat(o," instead")),t[o]=t[C])}),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(g){var o=typeof g=="string"?g:g[0],C=typeof g=="string"?g:g[1];typeof t[o]<"u"&&(typeof t.styles[C]>"u"&&(t.styles[C]=t[o]),console.error("Use of deprecated option: "+o+", use the style "+C+" instead."))});for(var e=0,l=["styles","bodyStyles","headStyles","footStyles"];e1:!1}).length>0},h.prototype.canEntireRowFit=function(r,t){return this.getMaxCellHeight(t)<=r},h.prototype.getMinimumRowHeight=function(r,t){var e=this;return r.reduce(function(l,f){var n=e.cells[f.index];if(!n)return 0;var s=t.getLineHeight(n.styles.fontSize),v=n.padding("vertical"),p=v+s;return p>l?p:l},0)},h}();m.Row=a;var w=function(){function h(r,t,e){var l,f;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=t,this.section=e,this.raw=r;var n=r;r!=null&&typeof r=="object"&&!Array.isArray(r)?(this.rowSpan=r.rowSpan||1,this.colSpan=r.colSpan||1,n=(f=(l=r.content)!==null&&l!==void 0?l:r.title)!==null&&f!==void 0?f:r,r._element&&(this.raw=r._element)):(this.rowSpan=1,this.colSpan=1);var s=n!=null?""+n:"",v=/\r\n|\r|\n/g;this.text=s.split(v)}return h.prototype.getTextPos=function(){var r;if(this.styles.valign==="top")r=this.y+this.padding("top");else if(this.styles.valign==="bottom")r=this.y+this.height-this.padding("bottom");else{var t=this.height-this.padding("vertical");r=this.y+t/2+this.padding("top")}var e;if(this.styles.halign==="right")e=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var l=this.width-this.padding("horizontal");e=this.x+l/2+this.padding("left")}else e=this.x+this.padding("left");return{x:e,y:r}},h.prototype.getContentHeight=function(r,t){t===void 0&&(t=1.15);var e=Array.isArray(this.text)?this.text.length:1,l=this.styles.fontSize/r*t,f=e*l+this.padding("vertical");return Math.max(f,this.styles.minCellHeight)},h.prototype.padding=function(r){var t=(0,c.parseSpacing)(this.styles.cellPadding,0);return r==="vertical"?t.top+t.bottom:r==="horizontal"?t.left+t.right:t[r]},h}();m.Cell=w;var y=function(){function h(r,t,e){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=r,this.raw=t,this.index=e}return h.prototype.getMaxCustomCellWidth=function(r){for(var t=0,e=0,l=r.allRows();e0?s:null}function t(f,n){if(f==="head"){if(typeof n=="object")return n.header||n.title||null;if(typeof n=="string"||typeof n=="number")return n}else if(f==="foot"&&typeof n=="object")return n.footer;return null}function e(f){return f.map(function(n,s){var v,p,g;return typeof n=="object"?g=(p=(v=n.dataKey)!==null&&v!==void 0?v:n.key)!==null&&p!==void 0?p:s:g=s,new b.Column(g,n,s)})}function l(f,n,s,v,p,g,o){var C=(0,P.getTheme)(v),_;f==="head"?_=p.headStyles:f==="body"?_=p.bodyStyles:f==="foot"&&(_=p.footStyles);var j=(0,a.assign)({},C.table,C[f],p.styles,_),u=p.columnStyles[n.dataKey]||p.columnStyles[n.index]||{},i=f==="body"?u:{},S=f==="body"&&s%2===0?(0,a.assign)({},C.alternateRow,p.alternateRowStyles):{},d=(0,P.defaultStyles)(g),W=(0,a.assign)({},d,j,S,i);return(0,a.assign)(W,o)}},664:function(z,m,D){Object.defineProperty(m,"__esModule",{value:!0}),m.addPage=m.drawTable=void 0;var x=D(420),b=D(260),c=D(744),P=D(356),a=D(136),w=D(224);function y(u,i){var S=i.settings,d=S.startY,W=S.margin,H={x:W.left,y:d},T=i.getHeadHeight(i.columns)+i.getFootHeight(i.columns),k=d+W.bottom+T;if(S.pageBreak==="avoid"){var R=i.body,A=R.reduce(function(O,I){return O+I.height},0);k+=A}var F=new c.DocHandler(u);(S.pageBreak==="always"||S.startY!=null&&k>F.pageSize().height)&&(j(F),H.y=W.top),i.callWillDrawPageHooks(F,H);var M=(0,P.assign)({},H);i.startPageNumber=F.pageNumber(),S.horizontalPageBreak?h(F,i,M,H):(F.applyStyles(F.userStyles),(S.showHead==="firstPage"||S.showHead==="everyPage")&&i.head.forEach(function(O){return p(F,i,O,H,i.columns)}),F.applyStyles(F.userStyles),i.body.forEach(function(O,I){var U=I===i.body.length-1;v(F,i,O,U,M,H,i.columns)}),F.applyStyles(F.userStyles),(S.showFoot==="lastPage"||S.showFoot==="everyPage")&&i.foot.forEach(function(O){return p(F,i,O,H,i.columns)})),(0,x.addTableBorder)(F,i,M,H),i.callEndPageHooks(F,H),i.finalY=H.y,u.lastAutoTable=i,u.previousAutoTable=i,u.autoTable&&(u.autoTable.previous=i),F.applyStyles(F.userStyles)}m.drawTable=y;function h(u,i,S,d){var W=(0,w.calculateAllColumnsCanFitInPage)(u,i),H=i.settings;if(H.horizontalPageBreakBehaviour==="afterAllRows")W.forEach(function(A,F){u.applyStyles(u.userStyles),F>0?_(u,i,S,d,A.columns,!0):r(u,i,d,A.columns),t(u,i,S,d,A.columns),l(u,i,d,A.columns)});else for(var T=-1,k=W[0],R=function(){var A=T;if(k){u.applyStyles(u.userStyles);var F=k.columns;T>=0?_(u,i,S,d,F,!0):r(u,i,d,F),A=e(u,i,T+1,d,F),l(u,i,d,F)}var M=A-T;W.slice(1).forEach(function(O){u.applyStyles(u.userStyles),_(u,i,S,d,O.columns,!0),e(u,i,T+1,d,O.columns,M),l(u,i,d,O.columns)}),T=A};TM&&(F.text=A.text.splice(M,A.text.length));var O=d.scaleFactor(),I=d.getLineHeightFactor();A.contentHeight=A.getContentHeight(O,I),A.contentHeight>=i&&(A.contentHeight=i,F.styles.minCellHeight-=i),A.contentHeight>u.height&&(u.height=A.contentHeight),F.contentHeight=F.getContentHeight(O,I),F.contentHeight>H&&(H=F.contentHeight),W[R.index]=F}}var U=new b.Row(u.raw,-1,u.section,W,!0);U.height=H;for(var G=0,Q=S.columns;Gk)return console.error("Will not be able to print row ".concat(i.index," correctly since it's minimum height is larger than page height")),!0;if(!A)return!1;var F=i.hasRowSpan(d.columns),M=i.getMaxCellHeight(d.columns)>k;return M?(F&&console.error("The content of row ".concat(i.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(F||d.settings.rowPageBreak==="avoid")}function v(u,i,S,d,W,H,T){var k=C(u,i,d,H);if(S.canEntireRowFit(k,T))p(u,i,S,H,T);else if(s(u,S,k,i)){var R=n(S,k,i,u);p(u,i,S,H,T),_(u,i,W,H,T),v(u,i,R,d,W,H,T)}else _(u,i,W,H,T),v(u,i,S,d,W,H,T)}function p(u,i,S,d,W){d.x=i.settings.margin.left;for(var H=0,T=W;H=s)f=!1,t.push(n),e.push(a.columns[n]),h-=s;else break;n++}return{colIndexes:t,columns:e,lastIndex:n-1}}function c(P,a){for(var w=[],y=0;y.1/t.scaleFactor()&&(n=n<1?n:Math.round(n),console.warn("Of the table content, ".concat(n," units width could not fit page"))),w(e),y(e,t),a(e)}m.calculateWidths=b;function c(t,e){var l=t.scaleFactor(),f=e.settings.horizontalPageBreak,n=(0,x.getPageAvailableWidth)(t,e);e.allRows().forEach(function(s){for(var v=0,p=e.columns;vn?(o.minWidth=n,o.wrappedWidth=n):(o.minWidth=o.contentWidth,o.wrappedWidth=o.contentWidth);else{var u=10/l;o.minWidth=o.styles.minCellWidth||u,o.wrappedWidth=o.contentWidth,o.minWidth>o.wrappedWidth&&(o.wrappedWidth=o.minWidth)}}}}),e.allRows().forEach(function(s){for(var v=0,p=e.columns;v1&&!g.minWidth&&(g.minWidth=o.minWidth),o.colSpan>1&&!g.wrappedWidth&&(g.wrappedWidth=o.minWidth))}})}function P(t,e,l){for(var f=e,n=t.reduce(function(u,i){return u+i.wrappedWidth},0),s=0;sl(u):!0});j.length&&(e=P(j,e,l))}return e}m.resizeColumns=P;function a(t){for(var e={},l=1,f=t.allRows(),n=0;n1)l--,delete s.cells[g.index];else if(o)o.cell.height+=s.height,l=o.cell.colSpan,delete s.cells[g.index],o.left--,o.left<=1&&delete e[g.index];else{var C=s.cells[g.index];if(!C)continue;if(C.height=s.height,C.rowSpan>1){var _=f.length-n,j=C.rowSpan>_?_:C.rowSpan;e[g.index]={cell:C,left:j,row:s}}}}}function w(t){for(var e=t.allRows(),l=0;l1&&t.columns[p+1])s+=g.width,delete f.cells[g.index];else if(n){var o=n;delete f.cells[g.index],n=null,o.width=g.width+s}else{var o=f.cells[g.index];if(!o)continue;if(v=o.colSpan,s=0,o.colSpan>1){n=o,s+=g.width;continue}o.width=g.width+s}}}function y(t,e){for(var l={count:0,height:0},f=0,n=t.allRows();f1&&l.count*l.height0&&l.height>j&&(j=l.height),j>s.height&&(s.height=j)}}l.count--}}function h(t,e,l,f,n){return t.map(function(s){return r(s,e,l,f,n)})}m.ellipsize=h;function r(t,e,l,f,n){var s=1e4*f.scaleFactor();if(e=Math.ceil(e*s)/s,e>=(0,x.getStringWidth)(t,l,f))return t;for(;e<(0,x.getStringWidth)(t+n,l,f)&&!(t.length<=1);)t=t.substring(0,t.length-1);return t.trim()+n}},964:function(z){if(typeof N>"u"){var m=new Error("Cannot find module 'undefined'");throw m.code="MODULE_NOT_FOUND",m}z.exports=N}},E={};function B(z){var m=E[z];if(m!==void 0)return m.exports;var D=E[z]={exports:{}};return L[z].call(D.exports,D,D.exports,B),D.exports}var J={};return function(){var z=J;Object.defineProperty(z,"__esModule",{value:!0}),z.Cell=z.Column=z.Row=z.Table=z.CellHookData=z.__drawTable=z.__createTable=z.applyPlugin=void 0;var m=B(340),D=B(776),x=B(664),b=B(972),c=B(260);Object.defineProperty(z,"Table",{enumerable:!0,get:function(){return c.Table}});var P=B(172);Object.defineProperty(z,"CellHookData",{enumerable:!0,get:function(){return P.CellHookData}});var a=B(260);Object.defineProperty(z,"Cell",{enumerable:!0,get:function(){return a.Cell}}),Object.defineProperty(z,"Column",{enumerable:!0,get:function(){return a.Column}}),Object.defineProperty(z,"Row",{enumerable:!0,get:function(){return a.Row}});function w(e){(0,m.default)(e)}z.applyPlugin=w;function y(e,l){var f=(0,D.parseInput)(e,l),n=(0,b.createTable)(e,f);(0,x.drawTable)(e,n)}function h(e,l){var f=(0,D.parseInput)(e,l);return(0,b.createTable)(e,f)}z.__createTable=h;function r(e,l){(0,x.drawTable)(e,l)}z.__drawTable=r;try{var t=B(964);t.jsPDF&&(t=t.jsPDF),w(t)}catch{}z.default=y}(),J}()})}(K)),K.exports}var V=at();const ot=et(V),st=rt({__proto__:null,default:ot},[V]);export{st as j};