@sv-print/plugin-api-pdf 0.2.0 → 0.2.2

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/index.js CHANGED
@@ -1,39 +1 @@
1
- "use strict";var L=(n,e,a)=>new Promise((x,p)=>{var l=t=>{try{f(a.next(t))}catch(m){p(m)}},I=t=>{try{f(a.throw(t))}catch(m){p(m)}},f=t=>t.done?x(t.value):Promise.resolve(t.value).then(l,I);f((a=a.apply(n,e)).next())});const J=require("@zumer/snapdom"),Q=require("jspdf");(function(n,e){const a=b,x=n();for(;[];)try{if(parseInt(a(150))/1+parseInt(a(169))/2*(parseInt(a(168))/3)+-parseInt(a(174))/4*(parseInt(a(137))/5)+-parseInt(a(139))/6+parseInt(a(140))/7*(-parseInt(a(172))/8)+parseInt(a(151))/9*(-parseInt(a(178))/10)+parseInt(a(165))/11*(parseInt(a(159))/12)===e)break;x.push(x.shift())}catch(p){x.push(x.shift())}})(M,286433);function b(n,e){const a=M();return b=function(x,p){return x=x-122,a[x]},b(n,e)}const U=function(n,e,a){return L(this,null,function*(){const x=b;var p=this,l=globalThis.$.Deferred(),I=!![];let f=(v,P)=>{const c=b,i=Math.floor(v/P*100);console[c(122)](c(124),v,"total",P),console[c(122)]("toPdf percent: ",i+"%")},t=a||{};if(this[x(191)][x(170)]){if(typeof e=="string"){const d=e[x(180)](x(160))>-1?e:e+x(160);t[x(131)]=d}else t=e||{},!t[x(131)]&&(t[x(131)]=x(194)+Date[x(195)]()+x(160));let v=this.printPanels[0][x(183)],P=this.printPanels[0][x(167)];var m=globalThis[x(152)].mm[x(193)](t[x(198)]||v),k=globalThis[x(152)].mm[x(193)](t[x(147)]||P),u=globalThis.$[x(161)]({},t||{});const c=this.printPanels[0].paperType,i=this[x(191)][0][x(199)],O=i&&(i.layoutRowGap>0||i[x(197)]>0),R=c!=null&&c!=""&&c!=x(202);var w=new Q.jsPDF({orientation:this[x(142)](0)==1?x(126):"landscape",unit:"pt",format:R?c[x(158)]():[m,k]}),g=yield this.getHtml(n,t);t&&(t[x(176)]&&(u[x(134)]=t[x(176)],u[x(133)]=t[x(176)]),t[x(181)]!=null&&(I=t[x(181)]),t[x(179)]!=null&&(f=t[x(179)])),globalThis.$(g)[x(148)](x(183),"").css(x(167),""),this[x(175)]();var C=this[x(156)]();if(O&&t.paperWidth&&t.paperHeight){let d=Math[x(130)](t[x(198)]/(v+i[x(141)]/2)),h=Math[x(130)](t[x(147)]/(P+i[x(197)]/2));const _=d*h,T=g.find(x(189)),y=T[x(170)],r=Math[x(157)](y/_);let o=globalThis.$(x(144));i.layoutType==x(171)?o.append(x(127)+(Number(i[x(141)])||0)/2+x(184)+(Number(i[x(197)])||0)/2+`mm;
2
- }
3
- .hiprint-printTemplate .hiprint-printPanel-small {
4
- display:inline-block;
5
- padding: `+(Number(i[x(141)])||0)/2+x(163)+(Number(i.layoutColumnGap)||0)/2+x(185)):o[x(129)](`<style>
6
- .hiprint-printPanel-small{
7
- box-sizing: border-box;
8
- border: 0px;
9
- }
10
- .hiprint-printPaper-small{
11
- position: relative;
12
- padding: 0;
13
- }
14
- .hiprint-printTemplate .hiprint-printPaper{
15
- display: flex;
16
- flex-wrap: wrap;
17
- flex-direction: column;
18
- align-content: flex-start;
19
- margin: -`+(Number(i[x(141)])||0)/2+x(184)+(Number(i.layoutColumnGap)||0)/2+`mm;
20
- }
21
- .hiprint-printTemplate .hiprint-printPanel-small {
22
- display:inline-block;
23
- padding: `+(Number(i.layoutRowGap)||0)/2+x(163)+(Number(i[x(197)])||0)/2+`mm;
24
- }
25
- </style>`);for(let s=0;s<r;s++){const q=globalThis.$(x(143)+t.paperWidth+"mm;height:"+t[x(147)]+x(192)),$=s*_,H=Math.min((s+1)*_,y);for(let G=$;G<H;G++){const D=T.eq(G)[x(136)]();D[x(138)](x(186)),D[x(173)]("hiprint-printPaper-small start-"+G);const z=globalThis.$(x(145));z[x(129)](D),q[x(149)](x(132))[x(129)](z)}o[x(129)](q)}this.svg2canvas(o,u),C[x(200)](o[0]),globalThis.$(o).css(x(164))}else this[x(123)](g,u),C[x(200)](g[0]),globalThis.$(g)[x(148)](x(164));let j=C[x(149)](x(189)).length;this.loadAllImages(g,function(){const d=x;try{C[d(149)](".hiprint-printPanel .hiprint-printPaper").each(function(h,_){const T=d;globalThis.hinnn.queue.add(function(y){const r=b;J.snapdom[r(135)](_,u).then(function(o){const s=r;var q=o[s(153)]("2d");q.imageSmoothingEnabled=![];var $=o[s(162)](s(146),u[s(196)]||.92);w.addImage($,"JPEG",0,0,m,k),h<j-1&&w[s(177)](),f(h+1,j),y()})[r(125)](o=>{const s=r;throw new Error(o[s(190)])})}),h==j-1&&(globalThis.hinnn.queue.add(function(y){const r=b;if(I)p[r(155)](),w[r(166)](t.name);else{p[r(155)]();let o=t[r(128)]||"blob",s=w[r(182)](o);l.resolve(s)}globalThis[r(152)][r(201)][r(188)]()}),globalThis[T(152)][T(201)].run())})}catch(h){console.error(d(154)),console[d(122)](h)}})}return l[x(187)]()})};function M(){const n=["mm -",`mm;
26
- }
27
- </style>`,"hiprint-printPaper","promise","clear",".hiprint-printPanel .hiprint-printPaper","message","printPanels",`mm;"></div>
28
- </div>`,"toPt","sv-print-","now","quality","layoutColumnGap","paperWidth","panelLayoutOptions","html","queue","\u81EA\u5B9A\u4E49","log","svg2canvas","cur","catch","portrait",`<style>
29
- .hiprint-printPanel-small{
30
- box-sizing: border-box;
31
- border: 0px;
32
- }
33
- .hiprint-printPaper-small{
34
- position: relative;
35
- padding: 0;
36
- }
37
- .hiprint-printTemplate .hiprint-printPaper{
38
- margin: -`,"type","append","floor","name",".hiprint-printPaper","scale","dpr","toCanvas","clone","77065jTGfOx","removeClass","931212VmjolX","3493qiKaXV","layoutRowGap","getOrient",`<div class="hiprint-printPanel">
39
- <div class="hiprint-printPaper" style="width:`,'<div class="hiprint-printTemplate"></div>','<div class="hiprint-printPanel-small"></div>',"image/jpeg","paperHeight","css","find","496410JphQqu","225bzKKfo","hinnn","getContext","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","removeTempContainer","getTempContainer","ceil","toLocaleLowerCase","8150280QDxloM",".pdf","extend","toDataURL","mm ","position:fixed","11KwWWQW","save","height","20217frWypB","106MoILUW","length","row","6224LxddCb","addClass","80Jstxgz","createTempContainer","pixelRatio","addPage","157860aXheQJ","onProgress","indexOf","isDownload","output","width"];return M=function(){return n},M()}(function(n,e){for(var a=W,x=n();[];)try{var p=-parseInt(a(372))/1*(-parseInt(a(378))/2)+-parseInt(a(384))/3*(parseInt(a(382))/4)+-parseInt(a(373))/5*(parseInt(a(385))/6)+parseInt(a(377))/7*(parseInt(a(383))/8)+-parseInt(a(368))/9*(parseInt(a(369))/10)+parseInt(a(374))/11*(parseInt(a(370))/12)+parseInt(a(371))/13;if(p===e)break;x.push(x.shift())}catch(l){x.push(x.shift())}})(N,481406);function N(){var n=["27MOEhSM","2658680YUaTMa","5557548stYncn","16497676NlNbli","11923zUbcJC","37975mfUsZp","11xDpdlH","toPdf","add toPdf Api to PrintTemplate","173243Bcupwv","64wscRfe","newPrintTemplate","defineProperty","add toPdf Api","1557396BomoGG","104eqxYYo","3QWpgdj","606hmxlWr"];return N=function(){return n},N()}function W(n,e){var a=N();return W=function(x,p){x=x-368;var l=a[x];return l},W(n,e)}function A(n){var e=W;return{name:e(381),description:e(381),hooks:[{hook:e(379),name:"add toPdf Api to PrintTemplate",description:e(376),priority:1,run:({template:a,options:x})=>{var p=e;Object[p(380)](a,p(375),{value:U,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}module.exports=A;
1
+ "use strict";var S=(a,n,x)=>new Promise((e,o)=>{var d=t=>{try{p(x.next(t))}catch(f){o(f)}},m=t=>{try{p(x.throw(t))}catch(f){o(f)}},p=t=>t.done?e(t.value):Promise.resolve(t.value).then(d,m);p((x=x.apply(a,n)).next())});const U=require("@zumer/snapdom"),W=require("jspdf");(function(a,n){const x=y,e=a();for(;;)try{if(-parseInt(x(181))/1*(-parseInt(x(219))/2)+parseInt(x(213))/3+-parseInt(x(220))/4*(parseInt(x(212))/5)+-parseInt(x(200))/6*(parseInt(x(182))/7)+parseInt(x(227))/8+parseInt(x(203))/9+-parseInt(x(184))/10===n)break;e.push(e.shift())}catch(o){e.push(e.shift())}})(w,998909);function w(){const a=["3358983pLJjpl","paperHeight","pixelRatio","Deferred","extend","each","108cpHUHk","152tMUSqg","getOrient","addImage","createTempContainer","JPEG","printPanels","height","2738168EjIhWV","getHtml","add","#fff","自定义","name","paperWidth",".pdf","toPdf percent: ","floor",".hiprint-printPanel .hiprint-printPaper","resolve","hinnn","output","position:fixed","image/jpeg","message","indexOf","blob","toPdf 失败(可能您的图片资源无法正常加载): ","toCanvas","portrait","removeTempContainer","25766FaCiRS","455518znuvMt","clear","29328650AEjNPL","promise","queue","error","toLocaleLowerCase","toDataURL","length","catch","quality","onProgress","css","width","paperType","isDownload","find","then","12OdchtS","loadAllImages","html","11243232ZnkyFS","scale","run","toPt","imageSmoothingEnabled","now","log","svg2canvas","landscape","5345BKGGqa"];return w=function(){return a},w()}const F=function(a,n,x){return S(this,null,function*(){const e=y;var o=this,d=globalThis.$[e(216)](),m=!0;let p=(I,T)=>{const l=e,b=Math[l(236)](I/T*100);console[l(209)]("cur",I,"total",T),console.log(l(235),b+"%")},t=x||{};if(this[e(225)].length){if(typeof n=="string"){const s=n[e(175)](e(234))>-1?n:n+e(234);t[e(232)]=s}else t=n||{},!t.name&&(t.name="sv-print-"+Date[e(208)]()+e(234));let I=this[e(225)][0][e(195)],T=this[e(225)][0][e(226)];const l=t[e(233)]&&t[e(214)];var f=globalThis.hinnn.mm[e(206)](t[e(233)]||I),q=globalThis.hinnn.mm[e(206)](t[e(214)]||T),u=globalThis.$[e(217)]({backgroundColor:e(230)},t||{});const b=this[e(225)][0][e(196)],D=b!=null&&b!=""&&b!=e(231),O=this[e(221)](0)==1||l?e(179):e(211),E=D&&!l?b[e(188)]():[f,q];var v=new W.jsPDF({orientation:O,unit:"pt",format:E}),_=yield this[e(228)](a,t);t&&(t[e(215)]&&(u.dpr=t[e(215)],u[e(204)]=t.pixelRatio),t.isDownload!=null&&(m=t[e(197)]),t[e(193)]!=null&&(p=t[e(193)])),globalThis.$(_).css(e(195),"")[e(194)](e(226),""),this[e(223)]();var P=this.getTempContainer();this[e(210)](_,u),P[e(202)](_[0]),globalThis.$(_).css(e(241));let j=P[e(198)](e(237))[e(190)];this[e(201)](P,function(){const s=e;try{P[s(198)](s(237))[s(218)](function(g,H){const c=s;globalThis[c(239)].queue.add(function(A){const r=c;U.snapdom[r(178)](H,u)[r(199)](function(h){const i=r;var L=h.getContext("2d");L[i(207)]=!1;var R=h[i(189)](i(242),u[i(192)]||.92);v[i(222)](R,i(224),0,0,f,q),g<j-1&&v.addPage(),p(g+1,j),A()})[r(191)](h=>{const i=r;throw new Error(h[i(243)])})}),g==j-1&&(globalThis[c(239)][c(186)][c(229)](function(A){const r=c;if(m)o[r(180)](),v.save(t[r(232)]);else{o[r(180)]();let h=t.type||r(176),i=v[r(240)](h);d[r(238)](i)}globalThis.hinnn[r(186)][r(183)]()}),globalThis[c(239)][c(186)][c(205)]())})}catch(g){console[s(187)](s(177)),console[s(209)](g)}})}return d[e(185)]()})};function y(a,n){const x=w();return y=function(e,o){return e=e-175,x[e]},y(a,n)}(function(a,n){for(var x=k,e=a();;)try{var o=parseInt(x(110))/1+-parseInt(x(108))/2*(parseInt(x(113))/3)+parseInt(x(115))/4*(-parseInt(x(114))/5)+-parseInt(x(112))/6+parseInt(x(109))/7+-parseInt(x(111))/8*(parseInt(x(119))/9)+parseInt(x(121))/10;if(o===n)break;e.push(e.shift())}catch(d){e.push(e.shift())}})(C,452171);function k(a,n){var x=C();return k=function(e,o){e=e-107;var d=x[e];return d},k(a,n)}function J(a){var n=k;return{name:n(120),description:"add toPdf Api",hooks:[{hook:"newPrintTemplate",name:"add toPdf Api to PrintTemplate",description:n(118),priority:1,run:({template:x,options:e})=>{var o=n;Object[o(107)](x,o(116),{value:F,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:n(117)}}function C(){var a=["add toPdf Api","9333550RwXQdP","defineProperty","312718ZVTmse","539938NUAttv","824089SpfuXz","40TnvvPr","1473846SJXJZg","6WFTWOY","161065QkcmVK","44xZTOUo","toPdf","0.3.0","add toPdf Api to PrintTemplate","845469rygPpW"];return C=function(){return a},C()}module.exports=J;
package/dist/index.mjs CHANGED
@@ -1,190 +1,132 @@
1
- var O = (e, n, a) => new Promise((x, p) => {
2
- var l = (t) => {
1
+ var D = (a, n, x) => new Promise((e, o) => {
2
+ var d = (t) => {
3
3
  try {
4
- f(a.next(t));
5
- } catch (m) {
6
- p(m);
4
+ f(x.next(t));
5
+ } catch (p) {
6
+ o(p);
7
7
  }
8
- }, I = (t) => {
8
+ }, m = (t) => {
9
9
  try {
10
- f(a.throw(t));
11
- } catch (m) {
12
- p(m);
10
+ f(x.throw(t));
11
+ } catch (p) {
12
+ o(p);
13
13
  }
14
- }, f = (t) => t.done ? x(t.value) : Promise.resolve(t.value).then(l, I);
15
- f((a = a.apply(e, n)).next());
14
+ }, f = (t) => t.done ? e(t.value) : Promise.resolve(t.value).then(d, m);
15
+ f((x = x.apply(a, n)).next());
16
16
  });
17
- import { snapdom as J } from "@zumer/snapdom";
18
- import { jsPDF as Q } from "jspdf";
19
- (function(e, n) {
20
- const a = b, x = e();
21
- for (; []; )
17
+ import { snapdom as U } from "@zumer/snapdom";
18
+ import { jsPDF as W } from "jspdf";
19
+ (function(a, n) {
20
+ const x = y, e = a();
21
+ for (; ; )
22
22
  try {
23
- if (parseInt(a(150)) / 1 + parseInt(a(169)) / 2 * (parseInt(a(168)) / 3) + -parseInt(a(174)) / 4 * (parseInt(a(137)) / 5) + -parseInt(a(139)) / 6 + parseInt(a(140)) / 7 * (-parseInt(a(172)) / 8) + parseInt(a(151)) / 9 * (-parseInt(a(178)) / 10) + parseInt(a(165)) / 11 * (parseInt(a(159)) / 12) === n)
24
- break;
25
- x.push(x.shift());
26
- } catch (p) {
27
- x.push(x.shift());
23
+ if (-parseInt(x(181)) / 1 * (-parseInt(x(219)) / 2) + parseInt(x(213)) / 3 + -parseInt(x(220)) / 4 * (parseInt(x(212)) / 5) + -parseInt(x(200)) / 6 * (parseInt(x(182)) / 7) + parseInt(x(227)) / 8 + parseInt(x(203)) / 9 + -parseInt(x(184)) / 10 === n) break;
24
+ e.push(e.shift());
25
+ } catch (o) {
26
+ e.push(e.shift());
28
27
  }
29
- })(N, 286433);
30
- function b(e, n) {
31
- const a = N();
32
- return b = function(x, p) {
33
- return x = x - 122, a[x];
34
- }, b(e, n);
28
+ })(w, 998909);
29
+ function w() {
30
+ const a = ["3358983pLJjpl", "paperHeight", "pixelRatio", "Deferred", "extend", "each", "108cpHUHk", "152tMUSqg", "getOrient", "addImage", "createTempContainer", "JPEG", "printPanels", "height", "2738168EjIhWV", "getHtml", "add", "#fff", "自定义", "name", "paperWidth", ".pdf", "toPdf percent: ", "floor", ".hiprint-printPanel .hiprint-printPaper", "resolve", "hinnn", "output", "position:fixed", "image/jpeg", "message", "indexOf", "blob", "toPdf 失败(可能您的图片资源无法正常加载): ", "toCanvas", "portrait", "removeTempContainer", "25766FaCiRS", "455518znuvMt", "clear", "29328650AEjNPL", "promise", "queue", "error", "toLocaleLowerCase", "toDataURL", "length", "catch", "quality", "onProgress", "css", "width", "paperType", "isDownload", "find", "then", "12OdchtS", "loadAllImages", "html", "11243232ZnkyFS", "scale", "run", "toPt", "imageSmoothingEnabled", "now", "log", "svg2canvas", "landscape", "5345BKGGqa"];
31
+ return w = function() {
32
+ return a;
33
+ }, w();
35
34
  }
36
- const U = function(e, n, a) {
37
- return O(this, null, function* () {
38
- const x = b;
39
- var p = this, l = globalThis.$.Deferred(), I = !![];
40
- let f = (v, P) => {
41
- const c = b, i = Math.floor(v / P * 100);
42
- console[c(122)](c(124), v, "total", P), console[c(122)]("toPdf percent: ", i + "%");
43
- }, t = a || {};
44
- if (this[x(191)][x(170)]) {
35
+ const F = function(a, n, x) {
36
+ return D(this, null, function* () {
37
+ const e = y;
38
+ var o = this, d = globalThis.$[e(216)](), m = !0;
39
+ let f = (I, T) => {
40
+ const l = e, b = Math[l(236)](I / T * 100);
41
+ console[l(209)]("cur", I, "total", T), console.log(l(235), b + "%");
42
+ }, t = x || {};
43
+ if (this[e(225)].length) {
45
44
  if (typeof n == "string") {
46
- const d = n[x(180)](x(160)) > -1 ? n : n + x(160);
47
- t[x(131)] = d;
48
- } else
49
- t = n || {}, !t[x(131)] && (t[x(131)] = x(194) + Date[x(195)]() + x(160));
50
- let v = this.printPanels[0][x(183)], P = this.printPanels[0][x(167)];
51
- var m = globalThis[x(152)].mm[x(193)](t[x(198)] || v), k = globalThis[x(152)].mm[x(193)](t[x(147)] || P), u = globalThis.$[x(161)]({}, t || {});
52
- const c = this.printPanels[0].paperType, i = this[x(191)][0][x(199)], R = i && (i.layoutRowGap > 0 || i[x(197)] > 0), z = c != null && c != "" && c != x(202);
53
- var w = new Q({ orientation: this[x(142)](0) == 1 ? x(126) : "landscape", unit: "pt", format: z ? c[x(158)]() : [m, k] }), g = yield this.getHtml(e, t);
54
- t && (t[x(176)] && (u[x(134)] = t[x(176)], u[x(133)] = t[x(176)]), t[x(181)] != null && (I = t[x(181)]), t[x(179)] != null && (f = t[x(179)])), globalThis.$(g)[x(148)](x(183), "").css(x(167), ""), this[x(175)]();
55
- var C = this[x(156)]();
56
- if (R && t.paperWidth && t.paperHeight) {
57
- let d = Math[x(130)](t[x(198)] / (v + i[x(141)] / 2)), h = Math[x(130)](t[x(147)] / (P + i[x(197)] / 2));
58
- const _ = d * h, T = g.find(x(189)), y = T[x(170)], r = Math[x(157)](y / _);
59
- let s = globalThis.$(x(144));
60
- i.layoutType == x(171) ? s.append(x(127) + (Number(i[x(141)]) || 0) / 2 + x(184) + (Number(i[x(197)]) || 0) / 2 + `mm;
61
- }
62
- .hiprint-printTemplate .hiprint-printPanel-small {
63
- display:inline-block;
64
- padding: ` + (Number(i[x(141)]) || 0) / 2 + x(163) + (Number(i.layoutColumnGap) || 0) / 2 + x(185)) : s[x(129)](`<style>
65
- .hiprint-printPanel-small{
66
- box-sizing: border-box;
67
- border: 0px;
68
- }
69
- .hiprint-printPaper-small{
70
- position: relative;
71
- padding: 0;
72
- }
73
- .hiprint-printTemplate .hiprint-printPaper{
74
- display: flex;
75
- flex-wrap: wrap;
76
- flex-direction: column;
77
- align-content: flex-start;
78
- margin: -` + (Number(i[x(141)]) || 0) / 2 + x(184) + (Number(i.layoutColumnGap) || 0) / 2 + `mm;
79
- }
80
- .hiprint-printTemplate .hiprint-printPanel-small {
81
- display:inline-block;
82
- padding: ` + (Number(i.layoutRowGap) || 0) / 2 + x(163) + (Number(i[x(197)]) || 0) / 2 + `mm;
83
- }
84
- </style>`);
85
- for (let o = 0; o < r; o++) {
86
- const G = globalThis.$(x(143) + t.paperWidth + "mm;height:" + t[x(147)] + x(192)), D = o * _, H = Math.min((o + 1) * _, y);
87
- for (let M = D; M < H; M++) {
88
- const j = T.eq(M)[x(136)]();
89
- j[x(138)](x(186)), j[x(173)]("hiprint-printPaper-small start-" + M);
90
- const L = globalThis.$(x(145));
91
- L[x(129)](j), G[x(149)](x(132))[x(129)](L);
92
- }
93
- s[x(129)](G);
94
- }
95
- this.svg2canvas(s, u), C[x(200)](s[0]), globalThis.$(s).css(x(164));
96
- } else
97
- this[x(123)](g, u), C[x(200)](g[0]), globalThis.$(g)[x(148)](x(164));
98
- let $ = C[x(149)](x(189)).length;
99
- this.loadAllImages(g, function() {
100
- const d = x;
45
+ const s = n[e(175)](e(234)) > -1 ? n : n + e(234);
46
+ t[e(232)] = s;
47
+ } else t = n || {}, !t.name && (t.name = "sv-print-" + Date[e(208)]() + e(234));
48
+ let I = this[e(225)][0][e(195)], T = this[e(225)][0][e(226)];
49
+ const l = t[e(233)] && t[e(214)];
50
+ var p = globalThis.hinnn.mm[e(206)](t[e(233)] || I), S = globalThis.hinnn.mm[e(206)](t[e(214)] || T), u = globalThis.$[e(217)]({ backgroundColor: e(230) }, t || {});
51
+ const b = this[e(225)][0][e(196)], O = b != null && b != "" && b != e(231), q = this[e(221)](0) == 1 || l ? e(179) : e(211), E = O && !l ? b[e(188)]() : [p, S];
52
+ var v = new W({ orientation: q, unit: "pt", format: E }), _ = yield this[e(228)](a, t);
53
+ t && (t[e(215)] && (u.dpr = t[e(215)], u[e(204)] = t.pixelRatio), t.isDownload != null && (m = t[e(197)]), t[e(193)] != null && (f = t[e(193)])), globalThis.$(_).css(e(195), "")[e(194)](e(226), ""), this[e(223)]();
54
+ var P = this.getTempContainer();
55
+ this[e(210)](_, u), P[e(202)](_[0]), globalThis.$(_).css(e(241));
56
+ let A = P[e(198)](e(237))[e(190)];
57
+ this[e(201)](P, function() {
58
+ const s = e;
101
59
  try {
102
- C[d(149)](".hiprint-printPanel .hiprint-printPaper").each(function(h, _) {
103
- const T = d;
104
- globalThis.hinnn.queue.add(function(y) {
105
- const r = b;
106
- J[r(135)](_, u).then(function(s) {
107
- const o = r;
108
- var G = s[o(153)]("2d");
109
- G.imageSmoothingEnabled = ![];
110
- var D = s[o(162)](o(146), u[o(196)] || 0.92);
111
- w.addImage(D, "JPEG", 0, 0, m, k), h < $ - 1 && w[o(177)](), f(h + 1, $), y();
112
- })[r(125)]((s) => {
113
- const o = r;
114
- throw new Error(s[o(190)]);
60
+ P[s(198)](s(237))[s(218)](function(g, H) {
61
+ const c = s;
62
+ globalThis[c(239)].queue.add(function(j) {
63
+ const r = c;
64
+ U[r(178)](H, u)[r(199)](function(h) {
65
+ const i = r;
66
+ var L = h.getContext("2d");
67
+ L[i(207)] = !1;
68
+ var R = h[i(189)](i(242), u[i(192)] || 0.92);
69
+ v[i(222)](R, i(224), 0, 0, p, S), g < A - 1 && v.addPage(), f(g + 1, A), j();
70
+ })[r(191)]((h) => {
71
+ const i = r;
72
+ throw new Error(h[i(243)]);
115
73
  });
116
- }), h == $ - 1 && (globalThis.hinnn.queue.add(function(y) {
117
- const r = b;
118
- if (I)
119
- p[r(155)](), w[r(166)](t.name);
74
+ }), g == A - 1 && (globalThis[c(239)][c(186)][c(229)](function(j) {
75
+ const r = c;
76
+ if (m) o[r(180)](), v.save(t[r(232)]);
120
77
  else {
121
- p[r(155)]();
122
- let s = t[r(128)] || "blob", o = w[r(182)](s);
123
- l.resolve(o);
78
+ o[r(180)]();
79
+ let h = t.type || r(176), i = v[r(240)](h);
80
+ d[r(238)](i);
124
81
  }
125
- globalThis[r(152)][r(201)][r(188)]();
126
- }), globalThis[T(152)][T(201)].run());
82
+ globalThis.hinnn[r(186)][r(183)]();
83
+ }), globalThis[c(239)][c(186)][c(205)]());
127
84
  });
128
- } catch (h) {
129
- console.error(d(154)), console[d(122)](h);
85
+ } catch (g) {
86
+ console[s(187)](s(177)), console[s(209)](g);
130
87
  }
131
88
  });
132
89
  }
133
- return l[x(187)]();
90
+ return d[e(185)]();
134
91
  });
135
92
  };
136
- function N() {
137
- const e = ["mm -", `mm;
138
- }
139
- </style>`, "hiprint-printPaper", "promise", "clear", ".hiprint-printPanel .hiprint-printPaper", "message", "printPanels", `mm;"></div>
140
- </div>`, "toPt", "sv-print-", "now", "quality", "layoutColumnGap", "paperWidth", "panelLayoutOptions", "html", "queue", "\u81EA\u5B9A\u4E49", "log", "svg2canvas", "cur", "catch", "portrait", `<style>
141
- .hiprint-printPanel-small{
142
- box-sizing: border-box;
143
- border: 0px;
144
- }
145
- .hiprint-printPaper-small{
146
- position: relative;
147
- padding: 0;
148
- }
149
- .hiprint-printTemplate .hiprint-printPaper{
150
- margin: -`, "type", "append", "floor", "name", ".hiprint-printPaper", "scale", "dpr", "toCanvas", "clone", "77065jTGfOx", "removeClass", "931212VmjolX", "3493qiKaXV", "layoutRowGap", "getOrient", `<div class="hiprint-printPanel">
151
- <div class="hiprint-printPaper" style="width:`, '<div class="hiprint-printTemplate"></div>', '<div class="hiprint-printPanel-small"></div>', "image/jpeg", "paperHeight", "css", "find", "496410JphQqu", "225bzKKfo", "hinnn", "getContext", "toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "removeTempContainer", "getTempContainer", "ceil", "toLocaleLowerCase", "8150280QDxloM", ".pdf", "extend", "toDataURL", "mm ", "position:fixed", "11KwWWQW", "save", "height", "20217frWypB", "106MoILUW", "length", "row", "6224LxddCb", "addClass", "80Jstxgz", "createTempContainer", "pixelRatio", "addPage", "157860aXheQJ", "onProgress", "indexOf", "isDownload", "output", "width"];
152
- return N = function() {
153
- return e;
154
- }, N();
93
+ function y(a, n) {
94
+ const x = w();
95
+ return y = function(e, o) {
96
+ return e = e - 175, x[e];
97
+ }, y(a, n);
155
98
  }
156
- (function(e, n) {
157
- for (var a = q, x = e(); []; )
99
+ (function(a, n) {
100
+ for (var x = k, e = a(); ; )
158
101
  try {
159
- var p = -parseInt(a(372)) / 1 * (-parseInt(a(378)) / 2) + -parseInt(a(384)) / 3 * (parseInt(a(382)) / 4) + -parseInt(a(373)) / 5 * (parseInt(a(385)) / 6) + parseInt(a(377)) / 7 * (parseInt(a(383)) / 8) + -parseInt(a(368)) / 9 * (parseInt(a(369)) / 10) + parseInt(a(374)) / 11 * (parseInt(a(370)) / 12) + parseInt(a(371)) / 13;
160
- if (p === n)
161
- break;
162
- x.push(x.shift());
163
- } catch (l) {
164
- x.push(x.shift());
102
+ var o = parseInt(x(110)) / 1 + -parseInt(x(108)) / 2 * (parseInt(x(113)) / 3) + parseInt(x(115)) / 4 * (-parseInt(x(114)) / 5) + -parseInt(x(112)) / 6 + parseInt(x(109)) / 7 + -parseInt(x(111)) / 8 * (parseInt(x(119)) / 9) + parseInt(x(121)) / 10;
103
+ if (o === n) break;
104
+ e.push(e.shift());
105
+ } catch (d) {
106
+ e.push(e.shift());
165
107
  }
166
- })(W, 481406);
167
- function W() {
168
- var e = ["27MOEhSM", "2658680YUaTMa", "5557548stYncn", "16497676NlNbli", "11923zUbcJC", "37975mfUsZp", "11xDpdlH", "toPdf", "add toPdf Api to PrintTemplate", "173243Bcupwv", "64wscRfe", "newPrintTemplate", "defineProperty", "add toPdf Api", "1557396BomoGG", "104eqxYYo", "3QWpgdj", "606hmxlWr"];
169
- return W = function() {
170
- return e;
171
- }, W();
108
+ })(C, 452171);
109
+ function k(a, n) {
110
+ var x = C();
111
+ return k = function(e, o) {
112
+ e = e - 107;
113
+ var d = x[e];
114
+ return d;
115
+ }, k(a, n);
172
116
  }
173
- function q(e, n) {
174
- var a = W();
175
- return q = function(x, p) {
176
- x = x - 368;
177
- var l = a[x];
178
- return l;
179
- }, q(e, n);
117
+ function $(a) {
118
+ var n = k;
119
+ return { name: n(120), description: "add toPdf Api", hooks: [{ hook: "newPrintTemplate", name: "add toPdf Api to PrintTemplate", description: n(118), priority: 1, run: ({ template: x, options: e }) => {
120
+ var o = n;
121
+ Object[o(107)](x, o(116), { value: F, enumerable: !1, writable: !0, configurable: !0 });
122
+ } }], leastHiprintVersion: n(117) };
180
123
  }
181
- function Y(e) {
182
- var n = q;
183
- return { name: n(381), description: n(381), hooks: [{ hook: n(379), name: "add toPdf Api to PrintTemplate", description: n(376), priority: 1, run: ({ template: a, options: x }) => {
184
- var p = n;
185
- Object[p(380)](a, p(375), { value: U, enumerable: ![], writable: !![], configurable: !![] });
186
- } }], leastHiprintVersion: "0.3.0" };
124
+ function C() {
125
+ var a = ["add toPdf Api", "9333550RwXQdP", "defineProperty", "312718ZVTmse", "539938NUAttv", "824089SpfuXz", "40TnvvPr", "1473846SJXJZg", "6WFTWOY", "161065QkcmVK", "44xZTOUo", "toPdf", "0.3.0", "add toPdf Api to PrintTemplate", "845469rygPpW"];
126
+ return C = function() {
127
+ return a;
128
+ }, C();
187
129
  }
188
130
  export {
189
- Y as default
131
+ $ as default
190
132
  };
package/dist/index.umd.js CHANGED
@@ -1,39 +1 @@
1
- (function(d,f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],f):(d=typeof globalThis!="undefined"?globalThis:d||self,d.pluginApiPdf=f(d.snapdom,d.jspdf))})(this,function(d,f){"use strict";var H=(d,f,o)=>new Promise((W,b)=>{var u=n=>{try{T(o.next(n))}catch(e){b(e)}},g=n=>{try{T(o.throw(n))}catch(e){b(e)}},T=n=>n.done?W(n.value):Promise.resolve(n.value).then(u,g);T((o=o.apply(d,f)).next())});(function(n,e){const t=o,x=n();for(;[];)try{if(parseInt(t(150))/1+parseInt(t(169))/2*(parseInt(t(168))/3)+-parseInt(t(174))/4*(parseInt(t(137))/5)+-parseInt(t(139))/6+parseInt(t(140))/7*(-parseInt(t(172))/8)+parseInt(t(151))/9*(-parseInt(t(178))/10)+parseInt(t(165))/11*(parseInt(t(159))/12)===e)break;x.push(x.shift())}catch(l){x.push(x.shift())}})(b,286433);function o(n,e){const t=b();return o=function(x,l){return x=x-122,t[x]},o(n,e)}const W=function(n,e,t){return H(this,null,function*(){const x=o;var l=this,P=globalThis.$.Deferred(),k=!![];let L=(y,I)=>{const c=o,i=Math.floor(y/I*100);console[c(122)](c(124),y,"total",I),console[c(122)]("toPdf percent: ",i+"%")},a=t||{};if(this[x(191)][x(170)]){if(typeof e=="string"){const h=e[x(180)](x(160))>-1?e:e+x(160);a[x(131)]=h}else a=e||{},!a[x(131)]&&(a[x(131)]=x(194)+Date[x(195)]()+x(160));let y=this.printPanels[0][x(183)],I=this.printPanels[0][x(167)];var O=globalThis[x(152)].mm[x(193)](a[x(198)]||y),R=globalThis[x(152)].mm[x(193)](a[x(147)]||I),v=globalThis.$[x(161)]({},a||{});const c=this.printPanels[0].paperType,i=this[x(191)][0][x(199)],J=i&&(i.layoutRowGap>0||i[x(197)]>0),Q=c!=null&&c!=""&&c!=x(202);var q=new f.jsPDF({orientation:this[x(142)](0)==1?x(126):"landscape",unit:"pt",format:Q?c[x(158)]():[O,R]}),_=yield this.getHtml(n,a);a&&(a[x(176)]&&(v[x(134)]=a[x(176)],v[x(133)]=a[x(176)]),a[x(181)]!=null&&(k=a[x(181)]),a[x(179)]!=null&&(L=a[x(179)])),globalThis.$(_)[x(148)](x(183),"").css(x(167),""),this[x(175)]();var G=this[x(156)]();if(J&&a.paperWidth&&a.paperHeight){let h=Math[x(130)](a[x(198)]/(y+i[x(141)]/2)),m=Math[x(130)](a[x(147)]/(I+i[x(197)]/2));const w=h*m,C=_.find(x(189)),j=C[x(170)],r=Math[x(157)](j/w);let s=globalThis.$(x(144));i.layoutType==x(171)?s.append(x(127)+(Number(i[x(141)])||0)/2+x(184)+(Number(i[x(197)])||0)/2+`mm;
2
- }
3
- .hiprint-printTemplate .hiprint-printPanel-small {
4
- display:inline-block;
5
- padding: `+(Number(i[x(141)])||0)/2+x(163)+(Number(i.layoutColumnGap)||0)/2+x(185)):s[x(129)](`<style>
6
- .hiprint-printPanel-small{
7
- box-sizing: border-box;
8
- border: 0px;
9
- }
10
- .hiprint-printPaper-small{
11
- position: relative;
12
- padding: 0;
13
- }
14
- .hiprint-printTemplate .hiprint-printPaper{
15
- display: flex;
16
- flex-wrap: wrap;
17
- flex-direction: column;
18
- align-content: flex-start;
19
- margin: -`+(Number(i[x(141)])||0)/2+x(184)+(Number(i.layoutColumnGap)||0)/2+`mm;
20
- }
21
- .hiprint-printTemplate .hiprint-printPanel-small {
22
- display:inline-block;
23
- padding: `+(Number(i.layoutRowGap)||0)/2+x(163)+(Number(i[x(197)])||0)/2+`mm;
24
- }
25
- </style>`);for(let p=0;p<r;p++){const M=globalThis.$(x(143)+a.paperWidth+"mm;height:"+a[x(147)]+x(192)),z=p*w,U=Math.min((p+1)*w,j);for(let N=z;N<U;N++){const D=C.eq(N)[x(136)]();D[x(138)](x(186)),D[x(173)]("hiprint-printPaper-small start-"+N);const A=globalThis.$(x(145));A[x(129)](D),M[x(149)](x(132))[x(129)](A)}s[x(129)](M)}this.svg2canvas(s,v),G[x(200)](s[0]),globalThis.$(s).css(x(164))}else this[x(123)](_,v),G[x(200)](_[0]),globalThis.$(_)[x(148)](x(164));let $=G[x(149)](x(189)).length;this.loadAllImages(_,function(){const h=x;try{G[h(149)](".hiprint-printPanel .hiprint-printPaper").each(function(m,w){const C=h;globalThis.hinnn.queue.add(function(j){const r=o;d.snapdom[r(135)](w,v).then(function(s){const p=r;var M=s[p(153)]("2d");M.imageSmoothingEnabled=![];var z=s[p(162)](p(146),v[p(196)]||.92);q.addImage(z,"JPEG",0,0,O,R),m<$-1&&q[p(177)](),L(m+1,$),j()})[r(125)](s=>{const p=r;throw new Error(s[p(190)])})}),m==$-1&&(globalThis.hinnn.queue.add(function(j){const r=o;if(k)l[r(155)](),q[r(166)](a.name);else{l[r(155)]();let s=a[r(128)]||"blob",p=q[r(182)](s);P.resolve(p)}globalThis[r(152)][r(201)][r(188)]()}),globalThis[C(152)][C(201)].run())})}catch(m){console.error(h(154)),console[h(122)](m)}})}return P[x(187)]()})};function b(){const n=["mm -",`mm;
26
- }
27
- </style>`,"hiprint-printPaper","promise","clear",".hiprint-printPanel .hiprint-printPaper","message","printPanels",`mm;"></div>
28
- </div>`,"toPt","sv-print-","now","quality","layoutColumnGap","paperWidth","panelLayoutOptions","html","queue","\u81EA\u5B9A\u4E49","log","svg2canvas","cur","catch","portrait",`<style>
29
- .hiprint-printPanel-small{
30
- box-sizing: border-box;
31
- border: 0px;
32
- }
33
- .hiprint-printPaper-small{
34
- position: relative;
35
- padding: 0;
36
- }
37
- .hiprint-printTemplate .hiprint-printPaper{
38
- margin: -`,"type","append","floor","name",".hiprint-printPaper","scale","dpr","toCanvas","clone","77065jTGfOx","removeClass","931212VmjolX","3493qiKaXV","layoutRowGap","getOrient",`<div class="hiprint-printPanel">
39
- <div class="hiprint-printPaper" style="width:`,'<div class="hiprint-printTemplate"></div>','<div class="hiprint-printPanel-small"></div>',"image/jpeg","paperHeight","css","find","496410JphQqu","225bzKKfo","hinnn","getContext","toPdf \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","removeTempContainer","getTempContainer","ceil","toLocaleLowerCase","8150280QDxloM",".pdf","extend","toDataURL","mm ","position:fixed","11KwWWQW","save","height","20217frWypB","106MoILUW","length","row","6224LxddCb","addClass","80Jstxgz","createTempContainer","pixelRatio","addPage","157860aXheQJ","onProgress","indexOf","isDownload","output","width"];return b=function(){return n},b()}(function(n,e){for(var t=g,x=n();[];)try{var l=-parseInt(t(372))/1*(-parseInt(t(378))/2)+-parseInt(t(384))/3*(parseInt(t(382))/4)+-parseInt(t(373))/5*(parseInt(t(385))/6)+parseInt(t(377))/7*(parseInt(t(383))/8)+-parseInt(t(368))/9*(parseInt(t(369))/10)+parseInt(t(374))/11*(parseInt(t(370))/12)+parseInt(t(371))/13;if(l===e)break;x.push(x.shift())}catch(P){x.push(x.shift())}})(u,481406);function u(){var n=["27MOEhSM","2658680YUaTMa","5557548stYncn","16497676NlNbli","11923zUbcJC","37975mfUsZp","11xDpdlH","toPdf","add toPdf Api to PrintTemplate","173243Bcupwv","64wscRfe","newPrintTemplate","defineProperty","add toPdf Api","1557396BomoGG","104eqxYYo","3QWpgdj","606hmxlWr"];return u=function(){return n},u()}function g(n,e){var t=u();return g=function(x,l){x=x-368;var P=t[x];return P},g(n,e)}function T(n){var e=g;return{name:e(381),description:e(381),hooks:[{hook:e(379),name:"add toPdf Api to PrintTemplate",description:e(376),priority:1,run:({template:t,options:x})=>{var l=e;Object[l(380)](t,l(375),{value:W,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:"0.3.0"}}return T});
1
+ (function(s,l){typeof exports=="object"&&typeof module!="undefined"?module.exports=l(require("@zumer/snapdom"),require("jspdf")):typeof define=="function"&&define.amd?define(["@zumer/snapdom","jspdf"],l):(s=typeof globalThis!="undefined"?globalThis:s||self,s.pluginApiPdf=l(s.window,s.jspdf))})(this,function(s,l){"use strict";var H=(s,l,c)=>new Promise((k,u)=>{var b=t=>{try{p(c.next(t))}catch(n){u(n)}},A=t=>{try{p(c.throw(t))}catch(n){u(n)}},p=t=>t.done?k(t.value):Promise.resolve(t.value).then(b,A);p((c=c.apply(s,l)).next())});(function(t,n){const x=u,e=t();for(;;)try{if(-parseInt(x(181))/1*(-parseInt(x(219))/2)+parseInt(x(213))/3+-parseInt(x(220))/4*(parseInt(x(212))/5)+-parseInt(x(200))/6*(parseInt(x(182))/7)+parseInt(x(227))/8+parseInt(x(203))/9+-parseInt(x(184))/10===n)break;e.push(e.shift())}catch(i){e.push(e.shift())}})(c,998909);function c(){const t=["3358983pLJjpl","paperHeight","pixelRatio","Deferred","extend","each","108cpHUHk","152tMUSqg","getOrient","addImage","createTempContainer","JPEG","printPanels","height","2738168EjIhWV","getHtml","add","#fff","自定义","name","paperWidth",".pdf","toPdf percent: ","floor",".hiprint-printPanel .hiprint-printPaper","resolve","hinnn","output","position:fixed","image/jpeg","message","indexOf","blob","toPdf 失败(可能您的图片资源无法正常加载): ","toCanvas","portrait","removeTempContainer","25766FaCiRS","455518znuvMt","clear","29328650AEjNPL","promise","queue","error","toLocaleLowerCase","toDataURL","length","catch","quality","onProgress","css","width","paperType","isDownload","find","then","12OdchtS","loadAllImages","html","11243232ZnkyFS","scale","run","toPt","imageSmoothingEnabled","now","log","svg2canvas","landscape","5345BKGGqa"];return c=function(){return t},c()}const k=function(t,n,x){return H(this,null,function*(){const e=u;var i=this,h=globalThis.$[e(216)](),q=!0;let S=(y,j)=>{const m=e,g=Math[m(236)](y/j*100);console[m(209)]("cur",y,"total",j),console.log(m(235),g+"%")},a=x||{};if(this[e(225)].length){if(typeof n=="string"){const d=n[e(175)](e(234))>-1?n:n+e(234);a[e(232)]=d}else a=n||{},!a.name&&(a.name="sv-print-"+Date[e(208)]()+e(234));let y=this[e(225)][0][e(195)],j=this[e(225)][0][e(226)];const m=a[e(233)]&&a[e(214)];var D=globalThis.hinnn.mm[e(206)](a[e(233)]||y),O=globalThis.hinnn.mm[e(206)](a[e(214)]||j),_=globalThis.$[e(217)]({backgroundColor:e(230)},a||{});const g=this[e(225)][0][e(196)],L=g!=null&&g!=""&&g!=e(231),R=this[e(221)](0)==1||m?e(179):e(211),U=L&&!m?g[e(188)]():[D,O];var I=new l.jsPDF({orientation:R,unit:"pt",format:U}),T=yield this[e(228)](t,a);a&&(a[e(215)]&&(_.dpr=a[e(215)],_[e(204)]=a.pixelRatio),a.isDownload!=null&&(q=a[e(197)]),a[e(193)]!=null&&(S=a[e(193)])),globalThis.$(T).css(e(195),"")[e(194)](e(226),""),this[e(223)]();var w=this.getTempContainer();this[e(210)](T,_),w[e(202)](T[0]),globalThis.$(T).css(e(241));let C=w[e(198)](e(237))[e(190)];this[e(201)](w,function(){const d=e;try{w[d(198)](d(237))[d(218)](function(P,W){const f=d;globalThis[f(239)].queue.add(function(E){const o=f;s.snapdom[o(178)](W,_)[o(199)](function(v){const r=o;var z=v.getContext("2d");z[r(207)]=!1;var F=v[r(189)](r(242),_[r(192)]||.92);I[r(222)](F,r(224),0,0,D,O),P<C-1&&I.addPage(),S(P+1,C),E()})[o(191)](v=>{const r=o;throw new Error(v[r(243)])})}),P==C-1&&(globalThis[f(239)][f(186)][f(229)](function(E){const o=f;if(q)i[o(180)](),I.save(a[o(232)]);else{i[o(180)]();let v=a.type||o(176),r=I[o(240)](v);h[o(238)](r)}globalThis.hinnn[o(186)][o(183)]()}),globalThis[f(239)][f(186)][f(205)]())})}catch(P){console[d(187)](d(177)),console[d(209)](P)}})}return h[e(185)]()})};function u(t,n){const x=c();return u=function(e,i){return e=e-175,x[e]},u(t,n)}(function(t,n){for(var x=b,e=t();;)try{var i=parseInt(x(110))/1+-parseInt(x(108))/2*(parseInt(x(113))/3)+parseInt(x(115))/4*(-parseInt(x(114))/5)+-parseInt(x(112))/6+parseInt(x(109))/7+-parseInt(x(111))/8*(parseInt(x(119))/9)+parseInt(x(121))/10;if(i===n)break;e.push(e.shift())}catch(h){e.push(e.shift())}})(p,452171);function b(t,n){var x=p();return b=function(e,i){e=e-107;var h=x[e];return h},b(t,n)}function A(t){var n=b;return{name:n(120),description:"add toPdf Api",hooks:[{hook:"newPrintTemplate",name:"add toPdf Api to PrintTemplate",description:n(118),priority:1,run:({template:x,options:e})=>{var i=n;Object[i(107)](x,i(116),{value:k,enumerable:!1,writable:!0,configurable:!0})}}],leastHiprintVersion:n(117)}}function p(){var t=["add toPdf Api","9333550RwXQdP","defineProperty","312718ZVTmse","539938NUAttv","824089SpfuXz","40TnvvPr","1473846SJXJZg","6WFTWOY","161065QkcmVK","44xZTOUo","toPdf","0.3.0","add toPdf Api to PrintTemplate","845469rygPpW"];return p=function(){return t},p()}return A});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-pdf",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "add pdf api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",