@alfadocs/ui-kit 0.18.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/_commonjsHelpers-DaMA6jEr.js +9 -0
- package/dist/_chunks/{ai-prompt-input-B-w5Rx3V.js → ai-prompt-input-B5MdixzR.js} +2 -2
- package/dist/_chunks/{leo-sidebar-DIsiTju3.js → alia-sidebar-Bof6TlFx.js} +211 -211
- package/dist/_chunks/{chat-message-g3lxpXM_.js → chat-message-ChOnwqf_.js} +5 -5
- package/dist/_chunks/editable-currency-cell-renderer-CqMs0Y8L.js +1590 -0
- package/dist/_chunks/email-input-DvJ_kPKL.js +396 -0
- package/dist/_chunks/exceljs.min-DUJ-5CGx.js +23045 -0
- package/dist/_chunks/file-spreadsheet-zUkY8rJ2.js +25 -0
- package/dist/_chunks/{file-upload-nMh-1jDD.js → file-upload-DxAQprcU.js} +103 -122
- package/dist/_chunks/html2canvas.esm-dgT_1dIT.js +4872 -0
- package/dist/_chunks/{index-CFoBa86t.js → index-BcMWc8W2.js} +2 -2
- package/dist/_chunks/index.es-B8zMZ1wV.js +6694 -0
- package/dist/_chunks/jspdf.es.min-DaapWjR1.js +10007 -0
- package/dist/_chunks/jspdf.plugin.autotable-CSiDNyPn.js +1088 -0
- package/dist/_chunks/{map-view-DVP-Kp9l.js → map-view-CcwycFQX.js} +2 -2
- package/dist/_chunks/{purify.es-DpIUMBYC.js → purify.es-Cm3utOpm.js} +2 -2
- package/dist/_chunks/{rich-text-editor-C7TCIlQO.js → rich-text-editor-J-wAz9eN.js} +22 -22
- package/dist/_chunks/{suggestion-chip-C4Jz0LrM.js → suggestion-chip-C4kxWUIs.js} +2 -2
- package/dist/_chunks/{use-password-requirements-BOgFsoIe.js → use-password-requirements-C9vKBSVn.js} +92 -81
- package/dist/agent-catalog.json +31 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/app-frame/app-frame.d.ts +1 -1
- package/dist/components/chat-container/chat-container.d.ts +1 -1
- package/dist/components/chat-message/chat-message.d.ts +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/data-table/cell-renderers/editable-currency-cell-renderer.d.ts +23 -0
- package/dist/components/data-table/cell-renderers/editable-text-cell-renderer.d.ts +11 -0
- package/dist/components/data-table/cell-renderers/image-cell-renderer.d.ts +19 -0
- package/dist/components/data-table/cell-renderers/toggle-cell-renderer.d.ts +15 -3
- package/dist/components/data-table/data-table.d.ts +30 -3
- package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
- package/dist/components/data-table/index.d.ts +9 -2
- package/dist/components/data-table/index.js +18 -13
- package/dist/components/data-table/toolbar.d.ts +80 -1
- package/dist/components/email-input/email-input.agent.d.ts +13 -0
- package/dist/components/email-input/email-input.d.ts +28 -0
- package/dist/components/email-input/index.d.ts +5 -0
- package/dist/components/email-input/index.js +6 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/password-input/use-password-requirements.d.ts +9 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/i18n/config.js +59 -9
- package/dist/i18n/resources.d.ts +59 -9
- package/dist/index.js +464 -456
- package/dist/locales/de.json +7 -3
- package/dist/locales/en.json +26 -3
- package/dist/locales/it.json +26 -3
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts +3 -0
- package/dist/patterns/alia-assistant/alia-embedded.d.ts +13 -0
- package/dist/patterns/{leo-assistant/leo-popout.d.ts → alia-assistant/alia-popout.d.ts} +4 -4
- package/dist/patterns/{leo-assistant/leo-sidebar.d.ts → alia-assistant/alia-sidebar.d.ts} +10 -10
- package/dist/patterns/{leo-assistant/leo-types.d.ts → alia-assistant/alia-types.d.ts} +23 -23
- package/dist/patterns/alia-assistant/index.d.ts +20 -0
- package/dist/patterns/alia-assistant/index.js +8 -0
- package/dist/patterns/patient-shell/patient-shell.d.ts +1 -1
- package/dist/safe-html/index.js +6 -6
- package/dist/tokens.css +1 -1
- package/package.json +14 -5
- package/dist/_chunks/_commonjsHelpers-C6fGbg64.js +0 -7
- package/dist/_chunks/balance-cell-renderer-DJB6WDPe.js +0 -1015
- package/dist/patterns/leo-assistant/index.d.ts +0 -20
- package/dist/patterns/leo-assistant/index.js +0 -8
- package/dist/patterns/leo-assistant/leo-chat-surface.d.ts +0 -3
- package/dist/patterns/leo-assistant/leo-embedded.d.ts +0 -13
|
@@ -0,0 +1,1088 @@
|
|
|
1
|
+
function q(e, t, i, r, n) {
|
|
2
|
+
r = r || {};
|
|
3
|
+
var a = 1.15, s = n.internal.scaleFactor, h = n.internal.getFontSize() / s, f = n.getLineHeightFactor ? n.getLineHeightFactor() : a, o = h * f, l = /\r\n|\r|\n/g, g = "", u = 1;
|
|
4
|
+
if ((r.valign === "middle" || r.valign === "bottom" || r.halign === "center" || r.halign === "right") && (g = typeof e == "string" ? e.split(l) : e, u = g.length || 1), i += h * (2 - a), r.valign === "middle" ? i -= u / 2 * o : r.valign === "bottom" && (i -= u * o), r.halign === "center" || r.halign === "right") {
|
|
5
|
+
var v = h;
|
|
6
|
+
if (r.halign === "center" && (v *= 0.5), g && u >= 1) {
|
|
7
|
+
for (var p = 0; p < g.length; p++)
|
|
8
|
+
n.text(g[p], t - n.getStringUnitWidth(g[p]) * v, i), i += o;
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
t -= n.getStringUnitWidth(e) * v;
|
|
12
|
+
}
|
|
13
|
+
return r.halign === "justify" ? n.text(e, t, i, { maxWidth: r.maxWidth || 100, align: "justify" }) : n.text(e, t, i), n;
|
|
14
|
+
}
|
|
15
|
+
var M = {}, P = (
|
|
16
|
+
/** @class */
|
|
17
|
+
(function() {
|
|
18
|
+
function e(t) {
|
|
19
|
+
this.jsPDFDocument = t, this.userStyles = {
|
|
20
|
+
// Black for versions of jspdf without getTextColor
|
|
21
|
+
textColor: t.getTextColor ? this.jsPDFDocument.getTextColor() : 0,
|
|
22
|
+
fontSize: t.internal.getFontSize(),
|
|
23
|
+
fontStyle: t.internal.getFont().fontStyle,
|
|
24
|
+
font: t.internal.getFont().fontName,
|
|
25
|
+
// 0 for versions of jspdf without getLineWidth
|
|
26
|
+
lineWidth: t.getLineWidth ? this.jsPDFDocument.getLineWidth() : 0,
|
|
27
|
+
// Black for versions of jspdf without getDrawColor
|
|
28
|
+
lineColor: t.getDrawColor ? this.jsPDFDocument.getDrawColor() : 0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return e.setDefaults = function(t, i) {
|
|
32
|
+
i === void 0 && (i = null), i ? i.__autoTableDocumentDefaults = t : M = t;
|
|
33
|
+
}, e.unifyColor = function(t) {
|
|
34
|
+
return Array.isArray(t) ? t : typeof t == "number" ? [t, t, t] : typeof t == "string" ? [t] : null;
|
|
35
|
+
}, e.prototype.applyStyles = function(t, i) {
|
|
36
|
+
var r, n, a;
|
|
37
|
+
i === void 0 && (i = !1), t.fontStyle && this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(t.fontStyle);
|
|
38
|
+
var s = this.jsPDFDocument.internal.getFont(), h = s.fontStyle, f = s.fontName;
|
|
39
|
+
if (t.font && (f = t.font), t.fontStyle) {
|
|
40
|
+
h = t.fontStyle;
|
|
41
|
+
var o = this.getFontList()[f];
|
|
42
|
+
o && o.indexOf(h) === -1 && this.jsPDFDocument.setFontStyle && (this.jsPDFDocument.setFontStyle(o[0]), h = o[0]);
|
|
43
|
+
}
|
|
44
|
+
if (this.jsPDFDocument.setFont(f, h), t.fontSize && this.jsPDFDocument.setFontSize(t.fontSize), !i) {
|
|
45
|
+
var l = e.unifyColor(t.fillColor);
|
|
46
|
+
l && (r = this.jsPDFDocument).setFillColor.apply(r, l), l = e.unifyColor(t.textColor), l && (n = this.jsPDFDocument).setTextColor.apply(n, l), l = e.unifyColor(t.lineColor), l && (a = this.jsPDFDocument).setDrawColor.apply(a, l), typeof t.lineWidth == "number" && this.jsPDFDocument.setLineWidth(t.lineWidth);
|
|
47
|
+
}
|
|
48
|
+
}, e.prototype.splitTextToSize = function(t, i, r) {
|
|
49
|
+
return this.jsPDFDocument.splitTextToSize(t, i, r);
|
|
50
|
+
}, e.prototype.rect = function(t, i, r, n, a) {
|
|
51
|
+
return this.jsPDFDocument.rect(t, i, r, n, a);
|
|
52
|
+
}, e.prototype.getLastAutoTable = function() {
|
|
53
|
+
return this.jsPDFDocument.lastAutoTable || null;
|
|
54
|
+
}, e.prototype.getTextWidth = function(t) {
|
|
55
|
+
return this.jsPDFDocument.getTextWidth(t);
|
|
56
|
+
}, e.prototype.getDocument = function() {
|
|
57
|
+
return this.jsPDFDocument;
|
|
58
|
+
}, e.prototype.setPage = function(t) {
|
|
59
|
+
this.jsPDFDocument.setPage(t);
|
|
60
|
+
}, e.prototype.addPage = function() {
|
|
61
|
+
return this.jsPDFDocument.addPage();
|
|
62
|
+
}, e.prototype.getFontList = function() {
|
|
63
|
+
return this.jsPDFDocument.getFontList();
|
|
64
|
+
}, e.prototype.getGlobalOptions = function() {
|
|
65
|
+
return M || {};
|
|
66
|
+
}, e.prototype.getDocumentOptions = function() {
|
|
67
|
+
return this.jsPDFDocument.__autoTableDocumentDefaults || {};
|
|
68
|
+
}, e.prototype.pageSize = function() {
|
|
69
|
+
var t = this.jsPDFDocument.internal.pageSize;
|
|
70
|
+
return t.width == null && (t = { width: t.getWidth(), height: t.getHeight() }), t;
|
|
71
|
+
}, e.prototype.scaleFactor = function() {
|
|
72
|
+
return this.jsPDFDocument.internal.scaleFactor;
|
|
73
|
+
}, e.prototype.getLineHeightFactor = function() {
|
|
74
|
+
var t = this.jsPDFDocument;
|
|
75
|
+
return t.getLineHeightFactor ? t.getLineHeightFactor() : 1.15;
|
|
76
|
+
}, e.prototype.getLineHeight = function(t) {
|
|
77
|
+
return t / this.scaleFactor() * this.getLineHeightFactor();
|
|
78
|
+
}, e.prototype.pageNumber = function() {
|
|
79
|
+
var t = this.jsPDFDocument.internal.getCurrentPageInfo();
|
|
80
|
+
return t ? t.pageNumber : this.jsPDFDocument.internal.getNumberOfPages();
|
|
81
|
+
}, e;
|
|
82
|
+
})()
|
|
83
|
+
), z = function(e, t) {
|
|
84
|
+
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
85
|
+
i.__proto__ = r;
|
|
86
|
+
} || function(i, r) {
|
|
87
|
+
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (i[n] = r[n]);
|
|
88
|
+
}, z(e, t);
|
|
89
|
+
};
|
|
90
|
+
function G(e, t) {
|
|
91
|
+
if (typeof t != "function" && t !== null)
|
|
92
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
93
|
+
z(e, t);
|
|
94
|
+
function i() {
|
|
95
|
+
this.constructor = e;
|
|
96
|
+
}
|
|
97
|
+
e.prototype = t === null ? Object.create(t) : (i.prototype = t.prototype, new i());
|
|
98
|
+
}
|
|
99
|
+
var J = (
|
|
100
|
+
/** @class */
|
|
101
|
+
(function(e) {
|
|
102
|
+
G(t, e);
|
|
103
|
+
function t(i) {
|
|
104
|
+
var r = e.call(this) || this;
|
|
105
|
+
return r._element = i, r;
|
|
106
|
+
}
|
|
107
|
+
return t;
|
|
108
|
+
})(Array)
|
|
109
|
+
);
|
|
110
|
+
function nt(e) {
|
|
111
|
+
return {
|
|
112
|
+
font: "helvetica",
|
|
113
|
+
// helvetica, times, courier
|
|
114
|
+
fontStyle: "normal",
|
|
115
|
+
// normal, bold, italic, bolditalic
|
|
116
|
+
overflow: "linebreak",
|
|
117
|
+
// linebreak, ellipsize, visible or hidden
|
|
118
|
+
fillColor: !1,
|
|
119
|
+
// Either false for transparent, rbg array e.g. [255, 255, 255] or gray level e.g 200
|
|
120
|
+
textColor: 20,
|
|
121
|
+
halign: "left",
|
|
122
|
+
// left, center, right, justify
|
|
123
|
+
valign: "top",
|
|
124
|
+
// top, middle, bottom
|
|
125
|
+
fontSize: 10,
|
|
126
|
+
cellPadding: 5 / e,
|
|
127
|
+
// number or {top,left,right,left,vertical,horizontal}
|
|
128
|
+
lineColor: 200,
|
|
129
|
+
lineWidth: 0,
|
|
130
|
+
cellWidth: "auto",
|
|
131
|
+
// 'auto'|'wrap'|number
|
|
132
|
+
minCellHeight: 0,
|
|
133
|
+
minCellWidth: 0
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function at(e) {
|
|
137
|
+
var t = {
|
|
138
|
+
striped: {
|
|
139
|
+
table: { fillColor: 255, textColor: 80, fontStyle: "normal" },
|
|
140
|
+
head: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
|
|
141
|
+
body: {},
|
|
142
|
+
foot: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
|
|
143
|
+
alternateRow: { fillColor: 245 }
|
|
144
|
+
},
|
|
145
|
+
grid: {
|
|
146
|
+
table: {
|
|
147
|
+
fillColor: 255,
|
|
148
|
+
textColor: 80,
|
|
149
|
+
fontStyle: "normal",
|
|
150
|
+
lineWidth: 0.1
|
|
151
|
+
},
|
|
152
|
+
head: {
|
|
153
|
+
textColor: 255,
|
|
154
|
+
fillColor: [26, 188, 156],
|
|
155
|
+
fontStyle: "bold",
|
|
156
|
+
lineWidth: 0
|
|
157
|
+
},
|
|
158
|
+
body: {},
|
|
159
|
+
foot: {
|
|
160
|
+
textColor: 255,
|
|
161
|
+
fillColor: [26, 188, 156],
|
|
162
|
+
fontStyle: "bold",
|
|
163
|
+
lineWidth: 0
|
|
164
|
+
},
|
|
165
|
+
alternateRow: {}
|
|
166
|
+
},
|
|
167
|
+
plain: { head: { fontStyle: "bold" }, foot: { fontStyle: "bold" } }
|
|
168
|
+
};
|
|
169
|
+
return t[e];
|
|
170
|
+
}
|
|
171
|
+
function D(e, t, i) {
|
|
172
|
+
i.applyStyles(t, !0);
|
|
173
|
+
var r = Array.isArray(e) ? e : [e], n = r.map(function(a) {
|
|
174
|
+
return i.getTextWidth(a);
|
|
175
|
+
}).reduce(function(a, s) {
|
|
176
|
+
return Math.max(a, s);
|
|
177
|
+
}, 0);
|
|
178
|
+
return n;
|
|
179
|
+
}
|
|
180
|
+
function U(e, t, i, r) {
|
|
181
|
+
var n = t.settings.tableLineWidth, a = t.settings.tableLineColor;
|
|
182
|
+
e.applyStyles({ lineWidth: n, lineColor: a });
|
|
183
|
+
var s = $(n, !1);
|
|
184
|
+
s && e.rect(i.x, i.y, t.getWidth(e.pageSize().width), r.y - i.y, s);
|
|
185
|
+
}
|
|
186
|
+
function $(e, t) {
|
|
187
|
+
var i = e > 0, r = t || t === 0;
|
|
188
|
+
return i && r ? "DF" : i ? "S" : r ? "F" : null;
|
|
189
|
+
}
|
|
190
|
+
function F(e, t) {
|
|
191
|
+
var i, r, n, a;
|
|
192
|
+
if (e = e || t, Array.isArray(e)) {
|
|
193
|
+
if (e.length >= 4)
|
|
194
|
+
return {
|
|
195
|
+
top: e[0],
|
|
196
|
+
right: e[1],
|
|
197
|
+
bottom: e[2],
|
|
198
|
+
left: e[3]
|
|
199
|
+
};
|
|
200
|
+
if (e.length === 3)
|
|
201
|
+
return {
|
|
202
|
+
top: e[0],
|
|
203
|
+
right: e[1],
|
|
204
|
+
bottom: e[2],
|
|
205
|
+
left: e[1]
|
|
206
|
+
};
|
|
207
|
+
if (e.length === 2)
|
|
208
|
+
return {
|
|
209
|
+
top: e[0],
|
|
210
|
+
right: e[1],
|
|
211
|
+
bottom: e[0],
|
|
212
|
+
left: e[1]
|
|
213
|
+
};
|
|
214
|
+
e.length === 1 ? e = e[0] : e = t;
|
|
215
|
+
}
|
|
216
|
+
return typeof e == "object" ? (typeof e.vertical == "number" && (e.top = e.vertical, e.bottom = e.vertical), typeof e.horizontal == "number" && (e.right = e.horizontal, e.left = e.horizontal), {
|
|
217
|
+
left: (i = e.left) !== null && i !== void 0 ? i : t,
|
|
218
|
+
top: (r = e.top) !== null && r !== void 0 ? r : t,
|
|
219
|
+
right: (n = e.right) !== null && n !== void 0 ? n : t,
|
|
220
|
+
bottom: (a = e.bottom) !== null && a !== void 0 ? a : t
|
|
221
|
+
}) : (typeof e != "number" && (e = t), { top: e, right: e, bottom: e, left: e });
|
|
222
|
+
}
|
|
223
|
+
function Q(e, t) {
|
|
224
|
+
var i = F(t.settings.margin, 0);
|
|
225
|
+
return e.pageSize().width - (i.left + i.right);
|
|
226
|
+
}
|
|
227
|
+
function ot(e, t, i, r, n) {
|
|
228
|
+
var a = {}, s = 1.3333333333333333, h = b(t, function(c) {
|
|
229
|
+
return n.getComputedStyle(c).backgroundColor;
|
|
230
|
+
});
|
|
231
|
+
h != null && (a.fillColor = h);
|
|
232
|
+
var f = b(t, function(c) {
|
|
233
|
+
return n.getComputedStyle(c).color;
|
|
234
|
+
});
|
|
235
|
+
f != null && (a.textColor = f);
|
|
236
|
+
var o = ht(r, i);
|
|
237
|
+
o && (a.cellPadding = o);
|
|
238
|
+
var l = "borderTopColor", g = s * i, u = r.borderTopWidth;
|
|
239
|
+
if (r.borderBottomWidth === u && r.borderRightWidth === u && r.borderLeftWidth === u) {
|
|
240
|
+
var v = (parseFloat(u) || 0) / g;
|
|
241
|
+
v && (a.lineWidth = v);
|
|
242
|
+
} else
|
|
243
|
+
a.lineWidth = {
|
|
244
|
+
top: (parseFloat(r.borderTopWidth) || 0) / g,
|
|
245
|
+
right: (parseFloat(r.borderRightWidth) || 0) / g,
|
|
246
|
+
bottom: (parseFloat(r.borderBottomWidth) || 0) / g,
|
|
247
|
+
left: (parseFloat(r.borderLeftWidth) || 0) / g
|
|
248
|
+
}, a.lineWidth.top || (a.lineWidth.right ? l = "borderRightColor" : a.lineWidth.bottom ? l = "borderBottomColor" : a.lineWidth.left && (l = "borderLeftColor"));
|
|
249
|
+
var p = b(t, function(c) {
|
|
250
|
+
return n.getComputedStyle(c)[l];
|
|
251
|
+
});
|
|
252
|
+
p != null && (a.lineColor = p);
|
|
253
|
+
var m = ["left", "right", "center", "justify"];
|
|
254
|
+
m.indexOf(r.textAlign) !== -1 && (a.halign = r.textAlign), m = ["middle", "bottom", "top"], m.indexOf(r.verticalAlign) !== -1 && (a.valign = r.verticalAlign);
|
|
255
|
+
var d = parseInt(r.fontSize || "");
|
|
256
|
+
isNaN(d) || (a.fontSize = d / s);
|
|
257
|
+
var y = st(r);
|
|
258
|
+
y && (a.fontStyle = y);
|
|
259
|
+
var C = (r.fontFamily || "").toLowerCase();
|
|
260
|
+
return e.indexOf(C) !== -1 && (a.font = C), a;
|
|
261
|
+
}
|
|
262
|
+
function st(e) {
|
|
263
|
+
var t = "";
|
|
264
|
+
return (e.fontWeight === "bold" || e.fontWeight === "bolder" || parseInt(e.fontWeight) >= 700) && (t = "bold"), (e.fontStyle === "italic" || e.fontStyle === "oblique") && (t += "italic"), t;
|
|
265
|
+
}
|
|
266
|
+
function b(e, t) {
|
|
267
|
+
var i = X(e, t);
|
|
268
|
+
if (!i)
|
|
269
|
+
return null;
|
|
270
|
+
var r = i.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);
|
|
271
|
+
if (!r || !Array.isArray(r))
|
|
272
|
+
return null;
|
|
273
|
+
var n = [
|
|
274
|
+
parseInt(r[1]),
|
|
275
|
+
parseInt(r[2]),
|
|
276
|
+
parseInt(r[3])
|
|
277
|
+
], a = parseInt(r[4]);
|
|
278
|
+
return a === 0 || isNaN(n[0]) || isNaN(n[1]) || isNaN(n[2]) ? null : n;
|
|
279
|
+
}
|
|
280
|
+
function X(e, t) {
|
|
281
|
+
var i = t(e);
|
|
282
|
+
return i === "rgba(0, 0, 0, 0)" || i === "transparent" || i === "initial" || i === "inherit" ? e.parentElement == null ? null : X(e.parentElement, t) : i;
|
|
283
|
+
}
|
|
284
|
+
function ht(e, t) {
|
|
285
|
+
var i = [
|
|
286
|
+
e.paddingTop,
|
|
287
|
+
e.paddingRight,
|
|
288
|
+
e.paddingBottom,
|
|
289
|
+
e.paddingLeft
|
|
290
|
+
], r = 96 / (72 / t), n = (parseInt(e.lineHeight) - parseInt(e.fontSize)) / t / 2, a = i.map(function(h) {
|
|
291
|
+
return parseInt(h || "0") / r;
|
|
292
|
+
}), s = F(a, 0);
|
|
293
|
+
return n > s.top && (s.top = n), n > s.bottom && (s.bottom = n), s;
|
|
294
|
+
}
|
|
295
|
+
function Z(e, t, i, r, n) {
|
|
296
|
+
var a, s;
|
|
297
|
+
r === void 0 && (r = !1), n === void 0 && (n = !1);
|
|
298
|
+
var h;
|
|
299
|
+
typeof t == "string" ? h = i.document.querySelector(t) : h = t;
|
|
300
|
+
var f = Object.keys(e.getFontList()), o = e.scaleFactor(), l = [], g = [], u = [];
|
|
301
|
+
if (!h)
|
|
302
|
+
return console.error("Html table could not be found with input: ", t), { head: l, body: g, foot: u };
|
|
303
|
+
for (var v = 0; v < h.rows.length; v++) {
|
|
304
|
+
var p = h.rows[v], m = (s = (a = p == null ? void 0 : p.parentElement) === null || a === void 0 ? void 0 : a.tagName) === null || s === void 0 ? void 0 : s.toLowerCase(), d = ft(f, o, i, p, r, n);
|
|
305
|
+
d && (m === "thead" ? l.push(d) : m === "tfoot" ? u.push(d) : g.push(d));
|
|
306
|
+
}
|
|
307
|
+
return { head: l, body: g, foot: u };
|
|
308
|
+
}
|
|
309
|
+
function ft(e, t, i, r, n, a) {
|
|
310
|
+
for (var s = new J(r), h = 0; h < r.cells.length; h++) {
|
|
311
|
+
var f = r.cells[h], o = i.getComputedStyle(f);
|
|
312
|
+
if (n || o.display !== "none") {
|
|
313
|
+
var l = void 0;
|
|
314
|
+
a && (l = ot(e, f, t, o, i)), s.push({
|
|
315
|
+
rowSpan: f.rowSpan,
|
|
316
|
+
colSpan: f.colSpan,
|
|
317
|
+
styles: l,
|
|
318
|
+
_element: f,
|
|
319
|
+
content: lt(f)
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
var g = i.getComputedStyle(r);
|
|
324
|
+
if (s.length > 0 && (n || g.display !== "none"))
|
|
325
|
+
return s;
|
|
326
|
+
}
|
|
327
|
+
function lt(e) {
|
|
328
|
+
var t = e.cloneNode(!0);
|
|
329
|
+
return t.innerHTML = t.innerHTML.replace(/\n/g, "").replace(/ +/g, " "), t.innerHTML = t.innerHTML.split(/<br.*?>/).map(function(i) {
|
|
330
|
+
return i.trim();
|
|
331
|
+
}).join(`
|
|
332
|
+
`), t.innerText || t.textContent || "";
|
|
333
|
+
}
|
|
334
|
+
function gt(e, t, i) {
|
|
335
|
+
for (var r = 0, n = [e, t, i]; r < n.length; r++) {
|
|
336
|
+
var a = n[r];
|
|
337
|
+
a && typeof a != "object" && console.error("The options parameter should be of type object, is: " + typeof a), a.startY && typeof a.startY != "number" && (console.error("Invalid value for startY option", a.startY), delete a.startY);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function w(e, t, i, r, n) {
|
|
341
|
+
if (e == null)
|
|
342
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
343
|
+
for (var a = Object(e), s = 1; s < arguments.length; s++) {
|
|
344
|
+
var h = arguments[s];
|
|
345
|
+
if (h != null)
|
|
346
|
+
for (var f in h)
|
|
347
|
+
Object.prototype.hasOwnProperty.call(h, f) && (a[f] = h[f]);
|
|
348
|
+
}
|
|
349
|
+
return a;
|
|
350
|
+
}
|
|
351
|
+
function B(e, t) {
|
|
352
|
+
var i = new P(e), r = i.getDocumentOptions(), n = i.getGlobalOptions();
|
|
353
|
+
gt(n, r, t);
|
|
354
|
+
var a = w({}, n, r, t), s;
|
|
355
|
+
typeof window < "u" && (s = window);
|
|
356
|
+
var h = ut(n, r, t), f = vt(n, r, t), o = pt(i, a), l = yt(i, a, s);
|
|
357
|
+
return { id: t.tableId, content: l, hooks: f, styles: h, settings: o };
|
|
358
|
+
}
|
|
359
|
+
function ut(e, t, i) {
|
|
360
|
+
for (var r = {
|
|
361
|
+
styles: {},
|
|
362
|
+
headStyles: {},
|
|
363
|
+
bodyStyles: {},
|
|
364
|
+
footStyles: {},
|
|
365
|
+
alternateRowStyles: {},
|
|
366
|
+
columnStyles: {}
|
|
367
|
+
}, n = function(f) {
|
|
368
|
+
if (f === "columnStyles") {
|
|
369
|
+
var o = e[f], l = t[f], g = i[f];
|
|
370
|
+
r.columnStyles = w({}, o, l, g);
|
|
371
|
+
} else {
|
|
372
|
+
var u = [e, t, i], v = u.map(function(p) {
|
|
373
|
+
return p[f] || {};
|
|
374
|
+
});
|
|
375
|
+
r[f] = w({}, v[0], v[1], v[2]);
|
|
376
|
+
}
|
|
377
|
+
}, a = 0, s = Object.keys(r); a < s.length; a++) {
|
|
378
|
+
var h = s[a];
|
|
379
|
+
n(h);
|
|
380
|
+
}
|
|
381
|
+
return r;
|
|
382
|
+
}
|
|
383
|
+
function vt(e, t, i) {
|
|
384
|
+
for (var r = [e, t, i], n = {
|
|
385
|
+
didParseCell: [],
|
|
386
|
+
willDrawCell: [],
|
|
387
|
+
didDrawCell: [],
|
|
388
|
+
willDrawPage: [],
|
|
389
|
+
didDrawPage: []
|
|
390
|
+
}, a = 0, s = r; a < s.length; a++) {
|
|
391
|
+
var h = s[a];
|
|
392
|
+
h.didParseCell && n.didParseCell.push(h.didParseCell), h.willDrawCell && n.willDrawCell.push(h.willDrawCell), h.didDrawCell && n.didDrawCell.push(h.didDrawCell), h.willDrawPage && n.willDrawPage.push(h.willDrawPage), h.didDrawPage && n.didDrawPage.push(h.didDrawPage);
|
|
393
|
+
}
|
|
394
|
+
return n;
|
|
395
|
+
}
|
|
396
|
+
function pt(e, t) {
|
|
397
|
+
var i, r, n, a, s, h, f, o, l, g, u, v, p = F(t.margin, 40 / e.scaleFactor()), m = (i = dt(e, t.startY)) !== null && i !== void 0 ? i : p.top, d;
|
|
398
|
+
t.showFoot === !0 ? d = "everyPage" : t.showFoot === !1 ? d = "never" : d = (r = t.showFoot) !== null && r !== void 0 ? r : "everyPage";
|
|
399
|
+
var y;
|
|
400
|
+
t.showHead === !0 ? y = "everyPage" : t.showHead === !1 ? y = "never" : y = (n = t.showHead) !== null && n !== void 0 ? n : "everyPage";
|
|
401
|
+
var C = (a = t.useCss) !== null && a !== void 0 ? a : !1, c = t.theme || (C ? "plain" : "striped"), x = !!t.horizontalPageBreak, it = (s = t.horizontalPageBreakRepeat) !== null && s !== void 0 ? s : null;
|
|
402
|
+
return {
|
|
403
|
+
includeHiddenHtml: (h = t.includeHiddenHtml) !== null && h !== void 0 ? h : !1,
|
|
404
|
+
useCss: C,
|
|
405
|
+
theme: c,
|
|
406
|
+
startY: m,
|
|
407
|
+
margin: p,
|
|
408
|
+
pageBreak: (f = t.pageBreak) !== null && f !== void 0 ? f : "auto",
|
|
409
|
+
rowPageBreak: (o = t.rowPageBreak) !== null && o !== void 0 ? o : "auto",
|
|
410
|
+
tableWidth: (l = t.tableWidth) !== null && l !== void 0 ? l : "auto",
|
|
411
|
+
showHead: y,
|
|
412
|
+
showFoot: d,
|
|
413
|
+
tableLineWidth: (g = t.tableLineWidth) !== null && g !== void 0 ? g : 0,
|
|
414
|
+
tableLineColor: (u = t.tableLineColor) !== null && u !== void 0 ? u : 200,
|
|
415
|
+
horizontalPageBreak: x,
|
|
416
|
+
horizontalPageBreakRepeat: it,
|
|
417
|
+
horizontalPageBreakBehaviour: (v = t.horizontalPageBreakBehaviour) !== null && v !== void 0 ? v : "afterAllRows"
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function dt(e, t) {
|
|
421
|
+
var i = e.getLastAutoTable(), r = e.scaleFactor(), n = e.pageNumber(), a = !1;
|
|
422
|
+
if (i && i.startPageNumber) {
|
|
423
|
+
var s = i.startPageNumber + i.pageNumber - 1;
|
|
424
|
+
a = s === n;
|
|
425
|
+
}
|
|
426
|
+
return typeof t == "number" ? t : (t == null || t === !1) && a && (i == null ? void 0 : i.finalY) != null ? i.finalY + 20 / r : null;
|
|
427
|
+
}
|
|
428
|
+
function yt(e, t, i) {
|
|
429
|
+
var r = t.head || [], n = t.body || [], a = t.foot || [];
|
|
430
|
+
if (t.html) {
|
|
431
|
+
var s = t.includeHiddenHtml;
|
|
432
|
+
if (i) {
|
|
433
|
+
var h = Z(e, t.html, i, s, t.useCss) || {};
|
|
434
|
+
r = h.head || r, n = h.body || r, a = h.foot || r;
|
|
435
|
+
} else
|
|
436
|
+
console.error("Cannot parse html in non browser environment");
|
|
437
|
+
}
|
|
438
|
+
var f = t.columns || mt(r, n, a);
|
|
439
|
+
return { columns: f, head: r, body: n, foot: a };
|
|
440
|
+
}
|
|
441
|
+
function mt(e, t, i) {
|
|
442
|
+
var r = e[0] || t[0] || i[0] || [], n = [];
|
|
443
|
+
return Object.keys(r).filter(function(a) {
|
|
444
|
+
return a !== "_element";
|
|
445
|
+
}).forEach(function(a) {
|
|
446
|
+
var s = 1, h;
|
|
447
|
+
Array.isArray(r) ? h = r[parseInt(a)] : h = r[a], typeof h == "object" && !Array.isArray(h) && (s = (h == null ? void 0 : h.colSpan) || 1);
|
|
448
|
+
for (var f = 0; f < s; f++) {
|
|
449
|
+
var o = void 0;
|
|
450
|
+
Array.isArray(r) ? o = n.length : o = a + (f > 0 ? "_".concat(f) : "");
|
|
451
|
+
var l = { dataKey: o };
|
|
452
|
+
n.push(l);
|
|
453
|
+
}
|
|
454
|
+
}), n;
|
|
455
|
+
}
|
|
456
|
+
var A = (
|
|
457
|
+
/** @class */
|
|
458
|
+
/* @__PURE__ */ (function() {
|
|
459
|
+
function e(t, i, r) {
|
|
460
|
+
this.table = i, this.pageNumber = i.pageNumber, this.settings = i.settings, this.cursor = r, this.doc = t.getDocument();
|
|
461
|
+
}
|
|
462
|
+
return e;
|
|
463
|
+
})()
|
|
464
|
+
), ct = (
|
|
465
|
+
/** @class */
|
|
466
|
+
(function(e) {
|
|
467
|
+
G(t, e);
|
|
468
|
+
function t(i, r, n, a, s, h) {
|
|
469
|
+
var f = e.call(this, i, r, h) || this;
|
|
470
|
+
return f.cell = n, f.row = a, f.column = s, f.section = a.section, f;
|
|
471
|
+
}
|
|
472
|
+
return t;
|
|
473
|
+
})(A)
|
|
474
|
+
), wt = (
|
|
475
|
+
/** @class */
|
|
476
|
+
(function() {
|
|
477
|
+
function e(t, i) {
|
|
478
|
+
this.pageNumber = 1, this.id = t.id, this.settings = t.settings, this.styles = t.styles, this.hooks = t.hooks, this.columns = i.columns, this.head = i.head, this.body = i.body, this.foot = i.foot;
|
|
479
|
+
}
|
|
480
|
+
return e.prototype.getHeadHeight = function(t) {
|
|
481
|
+
return this.head.reduce(function(i, r) {
|
|
482
|
+
return i + r.getMaxCellHeight(t);
|
|
483
|
+
}, 0);
|
|
484
|
+
}, e.prototype.getFootHeight = function(t) {
|
|
485
|
+
return this.foot.reduce(function(i, r) {
|
|
486
|
+
return i + r.getMaxCellHeight(t);
|
|
487
|
+
}, 0);
|
|
488
|
+
}, e.prototype.allRows = function() {
|
|
489
|
+
return this.head.concat(this.body).concat(this.foot);
|
|
490
|
+
}, e.prototype.callCellHooks = function(t, i, r, n, a, s) {
|
|
491
|
+
for (var h = 0, f = i; h < f.length; h++) {
|
|
492
|
+
var o = f[h], l = new ct(t, this, r, n, a, s), g = o(l) === !1;
|
|
493
|
+
if (r.text = Array.isArray(r.text) ? r.text : [r.text], g)
|
|
494
|
+
return !1;
|
|
495
|
+
}
|
|
496
|
+
return !0;
|
|
497
|
+
}, e.prototype.callEndPageHooks = function(t, i) {
|
|
498
|
+
t.applyStyles(t.userStyles);
|
|
499
|
+
for (var r = 0, n = this.hooks.didDrawPage; r < n.length; r++) {
|
|
500
|
+
var a = n[r];
|
|
501
|
+
a(new A(t, this, i));
|
|
502
|
+
}
|
|
503
|
+
}, e.prototype.callWillDrawPageHooks = function(t, i) {
|
|
504
|
+
for (var r = 0, n = this.hooks.willDrawPage; r < n.length; r++) {
|
|
505
|
+
var a = n[r];
|
|
506
|
+
a(new A(t, this, i));
|
|
507
|
+
}
|
|
508
|
+
}, e.prototype.getWidth = function(t) {
|
|
509
|
+
if (typeof this.settings.tableWidth == "number")
|
|
510
|
+
return this.settings.tableWidth;
|
|
511
|
+
if (this.settings.tableWidth === "wrap") {
|
|
512
|
+
var i = this.columns.reduce(function(n, a) {
|
|
513
|
+
return n + a.wrappedWidth;
|
|
514
|
+
}, 0);
|
|
515
|
+
return i;
|
|
516
|
+
} else {
|
|
517
|
+
var r = this.settings.margin;
|
|
518
|
+
return t - r.left - r.right;
|
|
519
|
+
}
|
|
520
|
+
}, e;
|
|
521
|
+
})()
|
|
522
|
+
), V = (
|
|
523
|
+
/** @class */
|
|
524
|
+
(function() {
|
|
525
|
+
function e(t, i, r, n, a) {
|
|
526
|
+
a === void 0 && (a = !1), this.height = 0, this.raw = t, t instanceof J && (this.raw = t._element, this.element = t._element), this.index = i, this.section = r, this.cells = n, this.spansMultiplePages = a;
|
|
527
|
+
}
|
|
528
|
+
return e.prototype.getMaxCellHeight = function(t) {
|
|
529
|
+
var i = this;
|
|
530
|
+
return t.reduce(function(r, n) {
|
|
531
|
+
var a;
|
|
532
|
+
return Math.max(r, ((a = i.cells[n.index]) === null || a === void 0 ? void 0 : a.height) || 0);
|
|
533
|
+
}, 0);
|
|
534
|
+
}, e.prototype.hasRowSpan = function(t) {
|
|
535
|
+
var i = this;
|
|
536
|
+
return t.filter(function(r) {
|
|
537
|
+
var n = i.cells[r.index];
|
|
538
|
+
return n ? n.rowSpan > 1 : !1;
|
|
539
|
+
}).length > 0;
|
|
540
|
+
}, e.prototype.canEntireRowFit = function(t, i) {
|
|
541
|
+
return this.getMaxCellHeight(i) <= t;
|
|
542
|
+
}, e.prototype.getMinimumRowHeight = function(t, i) {
|
|
543
|
+
var r = this;
|
|
544
|
+
return t.reduce(function(n, a) {
|
|
545
|
+
var s = r.cells[a.index];
|
|
546
|
+
if (!s)
|
|
547
|
+
return 0;
|
|
548
|
+
var h = i.getLineHeight(s.styles.fontSize), f = s.padding("vertical"), o = f + h;
|
|
549
|
+
return o > n ? o : n;
|
|
550
|
+
}, 0);
|
|
551
|
+
}, e;
|
|
552
|
+
})()
|
|
553
|
+
), tt = (
|
|
554
|
+
/** @class */
|
|
555
|
+
(function() {
|
|
556
|
+
function e(t, i, r) {
|
|
557
|
+
var n;
|
|
558
|
+
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 = i, this.section = r, this.raw = t;
|
|
559
|
+
var a = t;
|
|
560
|
+
t != null && typeof t == "object" && !Array.isArray(t) ? (this.rowSpan = t.rowSpan || 1, this.colSpan = t.colSpan || 1, a = (n = t.content) !== null && n !== void 0 ? n : t, t._element && (this.raw = t._element)) : (this.rowSpan = 1, this.colSpan = 1);
|
|
561
|
+
var s = a != null ? "" + a : "", h = /\r\n|\r|\n/g;
|
|
562
|
+
this.text = s.split(h);
|
|
563
|
+
}
|
|
564
|
+
return e.prototype.getTextPos = function() {
|
|
565
|
+
var t;
|
|
566
|
+
if (this.styles.valign === "top")
|
|
567
|
+
t = this.y + this.padding("top");
|
|
568
|
+
else if (this.styles.valign === "bottom")
|
|
569
|
+
t = this.y + this.height - this.padding("bottom");
|
|
570
|
+
else {
|
|
571
|
+
var i = this.height - this.padding("vertical");
|
|
572
|
+
t = this.y + i / 2 + this.padding("top");
|
|
573
|
+
}
|
|
574
|
+
var r;
|
|
575
|
+
if (this.styles.halign === "right")
|
|
576
|
+
r = this.x + this.width - this.padding("right");
|
|
577
|
+
else if (this.styles.halign === "center") {
|
|
578
|
+
var n = this.width - this.padding("horizontal");
|
|
579
|
+
r = this.x + n / 2 + this.padding("left");
|
|
580
|
+
} else
|
|
581
|
+
r = this.x + this.padding("left");
|
|
582
|
+
return { x: r, y: t };
|
|
583
|
+
}, e.prototype.getContentHeight = function(t, i) {
|
|
584
|
+
i === void 0 && (i = 1.15);
|
|
585
|
+
var r = Array.isArray(this.text) ? this.text.length : 1, n = this.styles.fontSize / t * i, a = r * n + this.padding("vertical");
|
|
586
|
+
return Math.max(a, this.styles.minCellHeight);
|
|
587
|
+
}, e.prototype.padding = function(t) {
|
|
588
|
+
var i = F(this.styles.cellPadding, 0);
|
|
589
|
+
return t === "vertical" ? i.top + i.bottom : t === "horizontal" ? i.left + i.right : i[t];
|
|
590
|
+
}, e;
|
|
591
|
+
})()
|
|
592
|
+
), St = (
|
|
593
|
+
/** @class */
|
|
594
|
+
(function() {
|
|
595
|
+
function e(t, i, r) {
|
|
596
|
+
this.wrappedWidth = 0, this.minReadableWidth = 0, this.minWidth = 0, this.width = 0, this.dataKey = t, this.raw = i, this.index = r;
|
|
597
|
+
}
|
|
598
|
+
return e.prototype.getMaxCustomCellWidth = function(t) {
|
|
599
|
+
for (var i = 0, r = 0, n = t.allRows(); r < n.length; r++) {
|
|
600
|
+
var a = n[r], s = a.cells[this.index];
|
|
601
|
+
s && typeof s.styles.cellWidth == "number" && (i = Math.max(i, s.styles.cellWidth));
|
|
602
|
+
}
|
|
603
|
+
return i;
|
|
604
|
+
}, e;
|
|
605
|
+
})()
|
|
606
|
+
);
|
|
607
|
+
function Ct(e, t) {
|
|
608
|
+
xt(e, t);
|
|
609
|
+
var i = [], r = 0;
|
|
610
|
+
t.columns.forEach(function(a) {
|
|
611
|
+
var s = a.getMaxCustomCellWidth(t);
|
|
612
|
+
s ? a.width = s : (a.width = a.wrappedWidth, i.push(a)), r += a.width;
|
|
613
|
+
});
|
|
614
|
+
var n = t.getWidth(e.pageSize().width) - r;
|
|
615
|
+
n && (n = j(i, n, function(a) {
|
|
616
|
+
return Math.max(a.minReadableWidth, a.minWidth);
|
|
617
|
+
})), n && (n = j(i, n, function(a) {
|
|
618
|
+
return a.minWidth;
|
|
619
|
+
})), n = Math.abs(n), !t.settings.horizontalPageBreak && n > 0.1 / e.scaleFactor() && (n = n < 1 ? n : Math.round(n), console.log("Of the table content, ".concat(n, " units width could not fit page"))), Ht(t), Dt(t, e), Pt(t);
|
|
620
|
+
}
|
|
621
|
+
function xt(e, t) {
|
|
622
|
+
var i = e.scaleFactor(), r = t.settings.horizontalPageBreak, n = Q(e, t);
|
|
623
|
+
t.allRows().forEach(function(a) {
|
|
624
|
+
for (var s = 0, h = t.columns; s < h.length; s++) {
|
|
625
|
+
var f = h[s], o = a.cells[f.index];
|
|
626
|
+
if (o) {
|
|
627
|
+
var l = t.hooks.didParseCell;
|
|
628
|
+
t.callCellHooks(e, l, o, a, f, null);
|
|
629
|
+
var g = o.padding("horizontal");
|
|
630
|
+
o.contentWidth = D(o.text, o.styles, e) + g;
|
|
631
|
+
var u = D(o.text.join(" ").split(/[^\S\u00A0]+/), o.styles, e);
|
|
632
|
+
if (o.minReadableWidth = u + o.padding("horizontal"), typeof o.styles.cellWidth == "number")
|
|
633
|
+
o.minWidth = o.styles.cellWidth, o.wrappedWidth = o.styles.cellWidth;
|
|
634
|
+
else if (o.styles.cellWidth === "wrap" || r === !0)
|
|
635
|
+
o.contentWidth > n ? (o.minWidth = n, o.wrappedWidth = n) : (o.minWidth = o.contentWidth, o.wrappedWidth = o.contentWidth);
|
|
636
|
+
else {
|
|
637
|
+
var v = 10 / i;
|
|
638
|
+
o.minWidth = o.styles.minCellWidth || v, o.wrappedWidth = o.contentWidth, o.minWidth > o.wrappedWidth && (o.wrappedWidth = o.minWidth);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}), t.allRows().forEach(function(a) {
|
|
643
|
+
for (var s = 0, h = t.columns; s < h.length; s++) {
|
|
644
|
+
var f = h[s], o = a.cells[f.index];
|
|
645
|
+
if (o && o.colSpan === 1)
|
|
646
|
+
f.wrappedWidth = Math.max(f.wrappedWidth, o.wrappedWidth), f.minWidth = Math.max(f.minWidth, o.minWidth), f.minReadableWidth = Math.max(f.minReadableWidth, o.minReadableWidth);
|
|
647
|
+
else {
|
|
648
|
+
var l = t.styles.columnStyles[f.dataKey] || t.styles.columnStyles[f.index] || {}, g = l.cellWidth || l.minCellWidth;
|
|
649
|
+
g && typeof g == "number" && (f.minWidth = g, f.wrappedWidth = g);
|
|
650
|
+
}
|
|
651
|
+
o && (o.colSpan > 1 && !f.minWidth && (f.minWidth = o.minWidth), o.colSpan > 1 && !f.wrappedWidth && (f.wrappedWidth = o.minWidth));
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
function j(e, t, i) {
|
|
656
|
+
for (var r = t, n = e.reduce(function(v, p) {
|
|
657
|
+
return v + p.wrappedWidth;
|
|
658
|
+
}, 0), a = 0; a < e.length; a++) {
|
|
659
|
+
var s = e[a], h = s.wrappedWidth / n, f = r * h, o = s.width + f, l = i(s), g = o < l ? l : o;
|
|
660
|
+
t -= g - s.width, s.width = g;
|
|
661
|
+
}
|
|
662
|
+
if (t = Math.round(t * 1e10) / 1e10, t) {
|
|
663
|
+
var u = e.filter(function(v) {
|
|
664
|
+
return t < 0 ? v.width > i(v) : !0;
|
|
665
|
+
});
|
|
666
|
+
u.length && (t = j(u, t, i));
|
|
667
|
+
}
|
|
668
|
+
return t;
|
|
669
|
+
}
|
|
670
|
+
function Pt(e) {
|
|
671
|
+
for (var t = {}, i = 1, r = e.allRows(), n = 0; n < r.length; n++)
|
|
672
|
+
for (var a = r[n], s = 0, h = e.columns; s < h.length; s++) {
|
|
673
|
+
var f = h[s], o = t[f.index];
|
|
674
|
+
if (i > 1)
|
|
675
|
+
i--, delete a.cells[f.index];
|
|
676
|
+
else if (o)
|
|
677
|
+
o.cell.height += a.height, i = o.cell.colSpan, delete a.cells[f.index], o.left--, o.left <= 1 && delete t[f.index];
|
|
678
|
+
else {
|
|
679
|
+
var l = a.cells[f.index];
|
|
680
|
+
if (!l)
|
|
681
|
+
continue;
|
|
682
|
+
if (l.height = a.height, l.rowSpan > 1) {
|
|
683
|
+
var g = r.length - n, u = l.rowSpan > g ? g : l.rowSpan;
|
|
684
|
+
t[f.index] = { cell: l, left: u, row: a };
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function Ht(e) {
|
|
690
|
+
for (var t = e.allRows(), i = 0; i < t.length; i++)
|
|
691
|
+
for (var r = t[i], n = null, a = 0, s = 0, h = 0; h < e.columns.length; h++) {
|
|
692
|
+
var f = e.columns[h];
|
|
693
|
+
if (s -= 1, s > 1 && e.columns[h + 1])
|
|
694
|
+
a += f.width, delete r.cells[f.index];
|
|
695
|
+
else if (n) {
|
|
696
|
+
var o = n;
|
|
697
|
+
delete r.cells[f.index], n = null, o.width = f.width + a;
|
|
698
|
+
} else {
|
|
699
|
+
var o = r.cells[f.index];
|
|
700
|
+
if (!o)
|
|
701
|
+
continue;
|
|
702
|
+
if (s = o.colSpan, a = 0, o.colSpan > 1) {
|
|
703
|
+
n = o, a += f.width;
|
|
704
|
+
continue;
|
|
705
|
+
}
|
|
706
|
+
o.width = f.width + a;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
function Dt(e, t) {
|
|
711
|
+
for (var i = { count: 0, height: 0 }, r = 0, n = e.allRows(); r < n.length; r++) {
|
|
712
|
+
for (var a = n[r], s = 0, h = e.columns; s < h.length; s++) {
|
|
713
|
+
var f = h[s], o = a.cells[f.index];
|
|
714
|
+
if (o) {
|
|
715
|
+
t.applyStyles(o.styles, !0);
|
|
716
|
+
var l = o.width - o.padding("horizontal");
|
|
717
|
+
if (o.styles.overflow === "linebreak")
|
|
718
|
+
o.text = t.splitTextToSize(o.text, l + 1 / t.scaleFactor(), { fontSize: o.styles.fontSize });
|
|
719
|
+
else if (o.styles.overflow === "ellipsize")
|
|
720
|
+
o.text = N(o.text, l, o.styles, t, "...");
|
|
721
|
+
else if (o.styles.overflow === "hidden")
|
|
722
|
+
o.text = N(o.text, l, o.styles, t, "");
|
|
723
|
+
else if (typeof o.styles.overflow == "function") {
|
|
724
|
+
var g = o.styles.overflow(o.text, l);
|
|
725
|
+
typeof g == "string" ? o.text = [g] : o.text = g;
|
|
726
|
+
}
|
|
727
|
+
o.contentHeight = o.getContentHeight(t.scaleFactor(), t.getLineHeightFactor());
|
|
728
|
+
var u = o.contentHeight / o.rowSpan;
|
|
729
|
+
o.rowSpan > 1 && i.count * i.height < u * o.rowSpan ? i = { height: u, count: o.rowSpan } : i && i.count > 0 && i.height > u && (u = i.height), u > a.height && (a.height = u);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
i.count--;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
function N(e, t, i, r, n) {
|
|
736
|
+
return e.map(function(a) {
|
|
737
|
+
return Wt(a, t, i, r, n);
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
function Wt(e, t, i, r, n) {
|
|
741
|
+
var a = 1e4 * r.scaleFactor();
|
|
742
|
+
if (t = Math.ceil(t * a) / a, t >= D(e, i, r))
|
|
743
|
+
return e;
|
|
744
|
+
for (; t < D(e + n, i, r) && !(e.length <= 1); )
|
|
745
|
+
e = e.substring(0, e.length - 1);
|
|
746
|
+
return e.trim() + n;
|
|
747
|
+
}
|
|
748
|
+
function L(e, t) {
|
|
749
|
+
var i = new P(e), r = Ft(t, i.scaleFactor()), n = new wt(t, r);
|
|
750
|
+
return Ct(i, n), i.applyStyles(i.userStyles), n;
|
|
751
|
+
}
|
|
752
|
+
function Ft(e, t) {
|
|
753
|
+
var i = e.content, r = kt(i.columns);
|
|
754
|
+
if (i.head.length === 0) {
|
|
755
|
+
var n = O(r, "head");
|
|
756
|
+
n && i.head.push(n);
|
|
757
|
+
}
|
|
758
|
+
if (i.foot.length === 0) {
|
|
759
|
+
var n = O(r, "foot");
|
|
760
|
+
n && i.foot.push(n);
|
|
761
|
+
}
|
|
762
|
+
var a = e.settings.theme, s = e.styles;
|
|
763
|
+
return {
|
|
764
|
+
columns: r,
|
|
765
|
+
head: k("head", i.head, r, s, a, t),
|
|
766
|
+
body: k("body", i.body, r, s, a, t),
|
|
767
|
+
foot: k("foot", i.foot, r, s, a, t)
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
function k(e, t, i, r, n, a) {
|
|
771
|
+
var s = {}, h = t.map(function(f, o) {
|
|
772
|
+
for (var l = 0, g = {}, u = 0, v = 0, p = 0, m = i; p < m.length; p++) {
|
|
773
|
+
var d = m[p];
|
|
774
|
+
if (s[d.index] == null || s[d.index].left === 0)
|
|
775
|
+
if (v === 0) {
|
|
776
|
+
var y = void 0;
|
|
777
|
+
Array.isArray(f) ? y = f[d.index - u - l] : y = f[d.dataKey];
|
|
778
|
+
var C = {};
|
|
779
|
+
typeof y == "object" && !Array.isArray(y) && (C = (y == null ? void 0 : y.styles) || {});
|
|
780
|
+
var c = Tt(e, d, o, n, r, a, C), x = new tt(y, c, e);
|
|
781
|
+
g[d.dataKey] = x, g[d.index] = x, v = x.colSpan - 1, s[d.index] = {
|
|
782
|
+
left: x.rowSpan - 1,
|
|
783
|
+
times: v
|
|
784
|
+
};
|
|
785
|
+
} else
|
|
786
|
+
v--, u++;
|
|
787
|
+
else
|
|
788
|
+
s[d.index].left--, v = s[d.index].times, l++;
|
|
789
|
+
}
|
|
790
|
+
return new V(f, o, e, g);
|
|
791
|
+
});
|
|
792
|
+
return h;
|
|
793
|
+
}
|
|
794
|
+
function O(e, t) {
|
|
795
|
+
var i = {};
|
|
796
|
+
return e.forEach(function(r) {
|
|
797
|
+
if (r.raw != null) {
|
|
798
|
+
var n = bt(t, r.raw);
|
|
799
|
+
n != null && (i[r.dataKey] = n);
|
|
800
|
+
}
|
|
801
|
+
}), Object.keys(i).length > 0 ? i : null;
|
|
802
|
+
}
|
|
803
|
+
function bt(e, t) {
|
|
804
|
+
if (e === "head") {
|
|
805
|
+
if (typeof t == "object")
|
|
806
|
+
return t.header || null;
|
|
807
|
+
if (typeof t == "string" || typeof t == "number")
|
|
808
|
+
return t;
|
|
809
|
+
} else if (e === "foot" && typeof t == "object")
|
|
810
|
+
return t.footer;
|
|
811
|
+
return null;
|
|
812
|
+
}
|
|
813
|
+
function kt(e) {
|
|
814
|
+
return e.map(function(t, i) {
|
|
815
|
+
var r, n;
|
|
816
|
+
return typeof t == "object" ? n = (r = t.dataKey) !== null && r !== void 0 ? r : i : n = i, new St(n, t, i);
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
function Tt(e, t, i, r, n, a, s) {
|
|
820
|
+
var h = at(r), f;
|
|
821
|
+
e === "head" ? f = n.headStyles : e === "body" ? f = n.bodyStyles : e === "foot" && (f = n.footStyles);
|
|
822
|
+
var o = w({}, h.table, h[e], n.styles, f), l = n.columnStyles[t.dataKey] || n.columnStyles[t.index] || {}, g = e === "body" ? l : {}, u = e === "body" && i % 2 === 0 ? w({}, h.alternateRow, n.alternateRowStyles) : {}, v = nt(a), p = w({}, v, o, u, g);
|
|
823
|
+
return w(p, s);
|
|
824
|
+
}
|
|
825
|
+
function Rt(e, t, i) {
|
|
826
|
+
var r;
|
|
827
|
+
i === void 0 && (i = {});
|
|
828
|
+
var n = Q(e, t), a = /* @__PURE__ */ new Map(), s = [], h = [], f = [];
|
|
829
|
+
Array.isArray(t.settings.horizontalPageBreakRepeat) ? f = t.settings.horizontalPageBreakRepeat : (typeof t.settings.horizontalPageBreakRepeat == "string" || typeof t.settings.horizontalPageBreakRepeat == "number") && (f = [t.settings.horizontalPageBreakRepeat]), f.forEach(function(u) {
|
|
830
|
+
var v = t.columns.find(function(p) {
|
|
831
|
+
return p.dataKey === u || p.index === u;
|
|
832
|
+
});
|
|
833
|
+
v && !a.has(v.index) && (a.set(v.index, !0), s.push(v.index), h.push(t.columns[v.index]), n -= v.wrappedWidth);
|
|
834
|
+
});
|
|
835
|
+
for (var o = !0, l = (r = i == null ? void 0 : i.start) !== null && r !== void 0 ? r : 0; l < t.columns.length; ) {
|
|
836
|
+
if (a.has(l)) {
|
|
837
|
+
l++;
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
var g = t.columns[l].wrappedWidth;
|
|
841
|
+
if (o || n >= g)
|
|
842
|
+
o = !1, s.push(l), h.push(t.columns[l]), n -= g;
|
|
843
|
+
else
|
|
844
|
+
break;
|
|
845
|
+
l++;
|
|
846
|
+
}
|
|
847
|
+
return { colIndexes: s, columns: h, lastIndex: l - 1 };
|
|
848
|
+
}
|
|
849
|
+
function zt(e, t) {
|
|
850
|
+
for (var i = [], r = 0; r < t.columns.length; r++) {
|
|
851
|
+
var n = Rt(e, t, { start: r });
|
|
852
|
+
n.columns.length && (i.push(n), r = n.lastIndex);
|
|
853
|
+
}
|
|
854
|
+
return i;
|
|
855
|
+
}
|
|
856
|
+
function E(e, t) {
|
|
857
|
+
var i = t.settings, r = i.startY, n = i.margin, a = { x: n.left, y: r }, s = t.getHeadHeight(t.columns) + t.getFootHeight(t.columns), h = r + n.bottom + s;
|
|
858
|
+
if (i.pageBreak === "avoid") {
|
|
859
|
+
var f = t.body, o = f.reduce(function(u, v) {
|
|
860
|
+
return u + v.height;
|
|
861
|
+
}, 0);
|
|
862
|
+
h += o;
|
|
863
|
+
}
|
|
864
|
+
var l = new P(e);
|
|
865
|
+
(i.pageBreak === "always" || i.startY != null && h > l.pageSize().height) && (rt(l), a.y = n.top), t.callWillDrawPageHooks(l, a);
|
|
866
|
+
var g = w({}, a);
|
|
867
|
+
t.startPageNumber = l.pageNumber(), i.horizontalPageBreak ? At(l, t, g, a) : (l.applyStyles(l.userStyles), (i.showHead === "firstPage" || i.showHead === "everyPage") && t.head.forEach(function(u) {
|
|
868
|
+
return S(l, t, u, a, t.columns);
|
|
869
|
+
}), l.applyStyles(l.userStyles), t.body.forEach(function(u, v) {
|
|
870
|
+
var p = v === t.body.length - 1;
|
|
871
|
+
W(l, t, u, p, g, a, t.columns);
|
|
872
|
+
}), l.applyStyles(l.userStyles), (i.showFoot === "lastPage" || i.showFoot === "everyPage") && t.foot.forEach(function(u) {
|
|
873
|
+
return S(l, t, u, a, t.columns);
|
|
874
|
+
})), U(l, t, g, a), t.callEndPageHooks(l, a), t.finalY = a.y, e.lastAutoTable = t, l.applyStyles(l.userStyles);
|
|
875
|
+
}
|
|
876
|
+
function At(e, t, i, r) {
|
|
877
|
+
var n = zt(e, t), a = t.settings;
|
|
878
|
+
if (a.horizontalPageBreakBehaviour === "afterAllRows")
|
|
879
|
+
n.forEach(function(o, l) {
|
|
880
|
+
e.applyStyles(e.userStyles), l > 0 ? H(e, t, i, r, o.columns, !0) : Y(e, t, r, o.columns), jt(e, t, i, r, o.columns), T(e, t, r, o.columns);
|
|
881
|
+
});
|
|
882
|
+
else
|
|
883
|
+
for (var s = -1, h = n[0], f = function() {
|
|
884
|
+
var o = s;
|
|
885
|
+
if (h) {
|
|
886
|
+
e.applyStyles(e.userStyles);
|
|
887
|
+
var l = h.columns;
|
|
888
|
+
s >= 0 ? H(e, t, i, r, l, !0) : Y(e, t, r, l), o = I(e, t, s + 1, r, l), T(e, t, r, l);
|
|
889
|
+
}
|
|
890
|
+
var g = o - s;
|
|
891
|
+
n.slice(1).forEach(function(u) {
|
|
892
|
+
e.applyStyles(e.userStyles), H(e, t, i, r, u.columns, !0), I(e, t, s + 1, r, u.columns, g), T(e, t, r, u.columns);
|
|
893
|
+
}), s = o;
|
|
894
|
+
}; s < t.body.length - 1; )
|
|
895
|
+
f();
|
|
896
|
+
}
|
|
897
|
+
function Y(e, t, i, r) {
|
|
898
|
+
var n = t.settings;
|
|
899
|
+
e.applyStyles(e.userStyles), (n.showHead === "firstPage" || n.showHead === "everyPage") && t.head.forEach(function(a) {
|
|
900
|
+
return S(e, t, a, i, r);
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
function jt(e, t, i, r, n) {
|
|
904
|
+
e.applyStyles(e.userStyles), t.body.forEach(function(a, s) {
|
|
905
|
+
var h = s === t.body.length - 1;
|
|
906
|
+
W(e, t, a, h, i, r, n);
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
function I(e, t, i, r, n, a) {
|
|
910
|
+
e.applyStyles(e.userStyles), a = a ?? t.body.length;
|
|
911
|
+
for (var s = Math.min(i + a, t.body.length), h = -1, f = t.body.slice(i, s), o = 0; o < f.length; o++) {
|
|
912
|
+
var l = f[o], g = i + o === t.body.length - 1, u = et(e, t, g, r);
|
|
913
|
+
if (l.canEntireRowFit(u, n))
|
|
914
|
+
S(e, t, l, r, n), h = i + o;
|
|
915
|
+
else
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
return h;
|
|
919
|
+
}
|
|
920
|
+
function T(e, t, i, r) {
|
|
921
|
+
var n = t.settings;
|
|
922
|
+
e.applyStyles(e.userStyles), (n.showFoot === "lastPage" || n.showFoot === "everyPage") && t.foot.forEach(function(a) {
|
|
923
|
+
return S(e, t, a, i, r);
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
function Bt(e, t, i) {
|
|
927
|
+
var r = i.getLineHeight(e.styles.fontSize), n = e.padding("vertical"), a = Math.floor((t - n) / r);
|
|
928
|
+
return Math.max(0, a);
|
|
929
|
+
}
|
|
930
|
+
function Lt(e, t, i, r) {
|
|
931
|
+
var n = {};
|
|
932
|
+
e.spansMultiplePages = !0, e.height = 0;
|
|
933
|
+
for (var a = 0, s = 0, h = i.columns; s < h.length; s++) {
|
|
934
|
+
var f = h[s], o = e.cells[f.index];
|
|
935
|
+
if (o) {
|
|
936
|
+
Array.isArray(o.text) || (o.text = [o.text]);
|
|
937
|
+
var l = new tt(o.raw, o.styles, o.section);
|
|
938
|
+
l = w(l, o), l.text = [];
|
|
939
|
+
var g = Bt(o, t, r);
|
|
940
|
+
o.text.length > g && (l.text = o.text.splice(g, o.text.length));
|
|
941
|
+
var u = r.scaleFactor(), v = r.getLineHeightFactor();
|
|
942
|
+
o.contentHeight = o.getContentHeight(u, v), o.contentHeight >= t && (o.contentHeight = t, l.styles.minCellHeight -= t), o.contentHeight > e.height && (e.height = o.contentHeight), l.contentHeight = l.getContentHeight(u, v), l.contentHeight > a && (a = l.contentHeight), n[f.index] = l;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
var p = new V(e.raw, -1, e.section, n, !0);
|
|
946
|
+
p.height = a;
|
|
947
|
+
for (var m = 0, d = i.columns; m < d.length; m++) {
|
|
948
|
+
var f = d[m], l = p.cells[f.index];
|
|
949
|
+
l && (l.height = p.height);
|
|
950
|
+
var o = e.cells[f.index];
|
|
951
|
+
o && (o.height = e.height);
|
|
952
|
+
}
|
|
953
|
+
return p;
|
|
954
|
+
}
|
|
955
|
+
function Et(e, t, i, r) {
|
|
956
|
+
var n = e.pageSize().height, a = r.settings.margin, s = a.top + a.bottom, h = n - s;
|
|
957
|
+
t.section === "body" && (h -= r.getHeadHeight(r.columns) + r.getFootHeight(r.columns));
|
|
958
|
+
var f = t.getMinimumRowHeight(r.columns, e), o = f < i;
|
|
959
|
+
if (f > h)
|
|
960
|
+
return console.log("Will not be able to print row ".concat(t.index, " correctly since it's minimum height is larger than page height")), !0;
|
|
961
|
+
if (!o)
|
|
962
|
+
return !1;
|
|
963
|
+
var l = t.hasRowSpan(r.columns), g = t.getMaxCellHeight(r.columns) > h;
|
|
964
|
+
return g ? (l && console.log("The content of row ".concat(t.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) : !(l || r.settings.rowPageBreak === "avoid");
|
|
965
|
+
}
|
|
966
|
+
function W(e, t, i, r, n, a, s) {
|
|
967
|
+
var h = et(e, t, r, a);
|
|
968
|
+
if (i.canEntireRowFit(h, s))
|
|
969
|
+
S(e, t, i, a, s);
|
|
970
|
+
else if (Et(e, i, h, t)) {
|
|
971
|
+
var f = Lt(i, h, t, e);
|
|
972
|
+
S(e, t, i, a, s), H(e, t, n, a, s), W(e, t, f, r, n, a, s);
|
|
973
|
+
} else
|
|
974
|
+
H(e, t, n, a, s), W(e, t, i, r, n, a, s);
|
|
975
|
+
}
|
|
976
|
+
function S(e, t, i, r, n) {
|
|
977
|
+
r.x = t.settings.margin.left;
|
|
978
|
+
for (var a = 0, s = n; a < s.length; a++) {
|
|
979
|
+
var h = s[a], f = i.cells[h.index];
|
|
980
|
+
if (!f) {
|
|
981
|
+
r.x += h.width;
|
|
982
|
+
continue;
|
|
983
|
+
}
|
|
984
|
+
e.applyStyles(f.styles), f.x = r.x, f.y = r.y;
|
|
985
|
+
var o = t.callCellHooks(e, t.hooks.willDrawCell, f, i, h, r);
|
|
986
|
+
if (o === !1) {
|
|
987
|
+
r.x += h.width;
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
Mt(e, f, r);
|
|
991
|
+
var l = f.getTextPos();
|
|
992
|
+
q(f.text, l.x, l.y, {
|
|
993
|
+
halign: f.styles.halign,
|
|
994
|
+
valign: f.styles.valign,
|
|
995
|
+
maxWidth: Math.ceil(f.width - f.padding("left") - f.padding("right"))
|
|
996
|
+
}, e.getDocument()), t.callCellHooks(e, t.hooks.didDrawCell, f, i, h, r), r.x += h.width;
|
|
997
|
+
}
|
|
998
|
+
r.y += i.height;
|
|
999
|
+
}
|
|
1000
|
+
function Mt(e, t, i) {
|
|
1001
|
+
var r = t.styles;
|
|
1002
|
+
if (e.getDocument().setFillColor(e.getDocument().getFillColor()), typeof r.lineWidth == "number") {
|
|
1003
|
+
var n = $(r.lineWidth, r.fillColor);
|
|
1004
|
+
n && e.rect(t.x, i.y, t.width, t.height, n);
|
|
1005
|
+
} else typeof r.lineWidth == "object" && (r.fillColor && e.rect(t.x, i.y, t.width, t.height, "F"), Nt(e, t, i, r.lineWidth));
|
|
1006
|
+
}
|
|
1007
|
+
function Nt(e, t, i, r) {
|
|
1008
|
+
var n, a, s, h;
|
|
1009
|
+
r.top && (n = i.x, a = i.y, s = i.x + t.width, h = i.y, r.right && (s += 0.5 * r.right), r.left && (n -= 0.5 * r.left), f(r.top, n, a, s, h)), r.bottom && (n = i.x, a = i.y + t.height, s = i.x + t.width, h = i.y + t.height, r.right && (s += 0.5 * r.right), r.left && (n -= 0.5 * r.left), f(r.bottom, n, a, s, h)), r.left && (n = i.x, a = i.y, s = i.x, h = i.y + t.height, r.top && (a -= 0.5 * r.top), r.bottom && (h += 0.5 * r.bottom), f(r.left, n, a, s, h)), r.right && (n = i.x + t.width, a = i.y, s = i.x + t.width, h = i.y + t.height, r.top && (a -= 0.5 * r.top), r.bottom && (h += 0.5 * r.bottom), f(r.right, n, a, s, h));
|
|
1010
|
+
function f(o, l, g, u, v) {
|
|
1011
|
+
e.getDocument().setLineWidth(o), e.getDocument().line(l, g, u, v, "S");
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
function et(e, t, i, r) {
|
|
1015
|
+
var n = t.settings.margin.bottom, a = t.settings.showFoot;
|
|
1016
|
+
return (a === "everyPage" || a === "lastPage" && i) && (n += t.getFootHeight(t.columns)), e.pageSize().height - r.y - n;
|
|
1017
|
+
}
|
|
1018
|
+
function H(e, t, i, r, n, a) {
|
|
1019
|
+
n === void 0 && (n = []), a === void 0 && (a = !1), e.applyStyles(e.userStyles), t.settings.showFoot === "everyPage" && !a && t.foot.forEach(function(h) {
|
|
1020
|
+
return S(e, t, h, r, n);
|
|
1021
|
+
}), t.callEndPageHooks(e, r);
|
|
1022
|
+
var s = t.settings.margin;
|
|
1023
|
+
U(e, t, i, r), rt(e), t.pageNumber++, r.x = s.left, r.y = s.top, i.y = s.top, t.callWillDrawPageHooks(e, r), t.settings.showHead === "everyPage" && (t.head.forEach(function(h) {
|
|
1024
|
+
return S(e, t, h, r, n);
|
|
1025
|
+
}), e.applyStyles(e.userStyles));
|
|
1026
|
+
}
|
|
1027
|
+
function rt(e) {
|
|
1028
|
+
var t = e.pageNumber();
|
|
1029
|
+
e.setPage(t + 1);
|
|
1030
|
+
var i = e.pageNumber();
|
|
1031
|
+
return i === t ? (e.addPage(), !0) : !1;
|
|
1032
|
+
}
|
|
1033
|
+
function Ot(e) {
|
|
1034
|
+
e.API.autoTable = function() {
|
|
1035
|
+
for (var t = [], i = 0; i < arguments.length; i++)
|
|
1036
|
+
t[i] = arguments[i];
|
|
1037
|
+
var r = t[0], n = B(this, r), a = L(this, n);
|
|
1038
|
+
return E(this, a), this;
|
|
1039
|
+
}, e.API.lastAutoTable = !1, e.API.autoTableText = function(t, i, r, n) {
|
|
1040
|
+
q(t, i, r, n, this);
|
|
1041
|
+
}, e.API.autoTableSetDefaults = function(t) {
|
|
1042
|
+
return P.setDefaults(t, this), this;
|
|
1043
|
+
}, e.autoTableSetDefaults = function(t, i) {
|
|
1044
|
+
P.setDefaults(t, i);
|
|
1045
|
+
}, e.API.autoTableHtmlToJson = function(t, i) {
|
|
1046
|
+
var r;
|
|
1047
|
+
if (i === void 0 && (i = !1), typeof window > "u")
|
|
1048
|
+
return console.error("Cannot run autoTableHtmlToJson in non browser environment"), null;
|
|
1049
|
+
var n = new P(this), a = Z(n, t, window, i, !1), s = a.head, h = a.body, f = ((r = s[0]) === null || r === void 0 ? void 0 : r.map(function(o) {
|
|
1050
|
+
return o.content;
|
|
1051
|
+
})) || [];
|
|
1052
|
+
return { columns: f, rows: h, data: h };
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
var R;
|
|
1056
|
+
function Yt(e, t) {
|
|
1057
|
+
var i = B(e, t), r = L(e, i);
|
|
1058
|
+
E(e, r);
|
|
1059
|
+
}
|
|
1060
|
+
function It(e, t) {
|
|
1061
|
+
var i = B(e, t);
|
|
1062
|
+
return L(e, i);
|
|
1063
|
+
}
|
|
1064
|
+
function Kt(e, t) {
|
|
1065
|
+
E(e, t);
|
|
1066
|
+
}
|
|
1067
|
+
try {
|
|
1068
|
+
if (typeof window < "u" && window) {
|
|
1069
|
+
var K = window, _ = K.jsPDF || ((R = K.jspdf) === null || R === void 0 ? void 0 : R.jsPDF);
|
|
1070
|
+
_ && Ot(_);
|
|
1071
|
+
}
|
|
1072
|
+
} catch (e) {
|
|
1073
|
+
console.error("Could not apply autoTable plugin", e);
|
|
1074
|
+
}
|
|
1075
|
+
export {
|
|
1076
|
+
tt as Cell,
|
|
1077
|
+
ct as CellHookData,
|
|
1078
|
+
St as Column,
|
|
1079
|
+
A as HookData,
|
|
1080
|
+
V as Row,
|
|
1081
|
+
wt as Table,
|
|
1082
|
+
It as __createTable,
|
|
1083
|
+
Kt as __drawTable,
|
|
1084
|
+
Ot as applyPlugin,
|
|
1085
|
+
Yt as autoTable,
|
|
1086
|
+
Yt as default
|
|
1087
|
+
};
|
|
1088
|
+
//# sourceMappingURL=jspdf.plugin.autotable-CSiDNyPn.js.map
|