@sv-print/plugin-api-image 0.1.0 → 0.1.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 +1 @@
1
- "use strict";var N=(o,e,x)=>new Promise((a,c)=>{var g=s=>{try{v(x.next(s))}catch(f){c(f)}},u=s=>{try{v(x.throw(s))}catch(f){c(f)}},v=s=>s.done?a(s.value):Promise.resolve(s.value).then(g,u);v((x=x.apply(o,e)).next())});const B=require("html-to-image");function H(o){if(o&&o.__esModule)return o;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const x in o)if(x!=="default"){const a=Object.getOwnPropertyDescriptor(o,x);Object.defineProperty(e,x,a.get?a:{enumerable:!0,get:()=>o[x]})}}return e.default=o,Object.freeze(e)}const K=H(B);function A(o,e){const x=q();return A=function(a,c){return a=a-241,x[a]},A(o,e)}(function(o,e){const x=A,a=o();for(;[];)try{if(parseInt(x(311))/1+parseInt(x(257))/2+parseInt(x(282))/3*(parseInt(x(290))/4)+parseInt(x(298))/5*(-parseInt(x(310))/6)+parseInt(x(272))/7+parseInt(x(243))/8*(-parseInt(x(278))/9)+-parseInt(x(302))/10*(parseInt(x(286))/11)===e)break;a.push(a.shift())}catch(c){a.push(a.shift())}})(q,310597);function q(){const o=["image/jpeg","onload","jpg","drawImage","toType","quality","setAttribute","limit","webp","clearRect","toImage percent: ","onProgress","2752520slsSzG","queue","position:fixed","imageSmoothingEnabled","start","body","push","getContext","error","display","type","canvas","removeTempContainer","svg","1211952pjWnxS","png","isDownload","none","resolve",".hiprint-printPanel .hiprint-printPaper","toBlob","createElement","svg2canvas","gif","devicePixelRatio","floor","src","length","toLowerCase","3028354fANDZb","html","replace","base64","getTempContainer","split","9OKopgT","add","IMG","promise","423903ysAAGw","run","then","clear","7073jsgnKA","baseURI","jpeg","http","8EKXJCz","#fff","height","appendChild","find","log","hinnn","tagName","520860jTbyTh",".jpg","printPanels","css","7210mRELdx","url","Deferred","style","toDataURL","blob","forEach","bmp","18NSXnhd","109581xnVhdE","indexOf","pop","toCanvas","createTempContainer","width","extend"];return q=function(){return o},q()}const L=function(o,e){return N(this,null,function*(){const x=A;let a=this,c=globalThis.$[x(304)](),g=!![],u=10,v=(s,f)=>{const h=x,w=Math[h(268)](s/f*100);console[h(295)]("cur",s,"total",f),console[h(295)](h(241),w+"%")};if(this[x(300)][x(270)]){let s=globalThis.$[x(317)]({filter:t=>{const n=x;return t[n(297)]!="IMG"||t[n(297)]==n(280)&&([n(320),n(288),n(258),n(266),n(309),n(326),n(256)].includes(t[n(269)].split(".")[n(313)]()[n(271)]())||t[n(269)]!=t[n(287)]||t[n(269)][n(312)](n(289))>-1&&t[n(269)]!=t.baseURI||t[n(269)].indexOf(n(275))>-1)},backgroundColor:x(291)},e||{}),f=yield this.getHtml(o,e);e&&e[x(259)]!=null&&(g=e[x(259)]),e&&e[x(242)]!=null&&(v=e[x(242)]),e&&e[x(325)]!=null&&(u=e[x(325)]),globalThis.$(f)[x(301)](x(316),"")[x(301)](x(292),""),this[x(315)]();let h=this[x(276)]();this[x(265)](f,s),h[x(273)](f[0]);let w=h[x(294)](x(262))[x(270)];globalThis.$(f)[x(301)](x(245)),this.loadAllImages(f,function(){const t=x;try{let n=[],E=Math.ceil(w/u),W=w%u;const p=document[t(264)](t(254)),k=p[t(250)]("2d"),M=h.width()*globalThis[t(267)];for(let T=0;T<E;T++){k[t(327)](0,0,p.width,p.height);const O=T==E-1;let z=0,G=O?W:u;for(let _=0;_<G;_++){k[t(327)](0,0,p.width,p[t(292)]);const r=T*u+_,y=h[t(294)](t(262))[r];globalThis[t(296)][t(244)][t(279)](function(P){const m=t;K[m(314)](y,s)[m(284)](function(I){const l=m;let b=I[l(250)]("2d");b[l(246)]=![];let j=I[l(306)](l(318),s[l(323)]||.92),i=new Image;i[l(269)]=j,i.onload=function(){const d=l;_===0&&(p[d(316)]=M,p[d(292)]=i[d(292)]*G),z+=i.height,k[d(321)](i,0,z-i.height,M,i.height),v(r+1,w),P()}})})}globalThis[t(296)][t(244)][t(279)](function(_){const r=t;let y=s[r(253)]||r(318),P=s[r(322)]||r(303),m=s.quality||.8;if(g){let I=p[r(306)](y,m),l=new Image;l[r(269)]=I,l[r(319)]=function(){const b=r;n[b(249)]({url:I,start:T*u+1,end:T*u+G}),O&&(globalThis[b(296)][b(244)][b(285)](),a.removeTempContainer(),n[b(308)](j=>{const i=b;let d=document[i(264)]("a"),C=e.name||"download.jpg";C.indexOf(".")==-1&&(C+=i(299));let D=C[i(277)](".")[i(313)](),$=C[i(274)]("."+D,"")+"_"+j[i(247)]+"-"+j.end+"."+D;d[i(305)][i(252)]=i(260),d[i(324)]("download",$),d.setAttribute("href",j.url),document[i(248)][i(293)](d),d.click(),d.remove()})),_()};return}if(P==r(303)){n[r(249)](p[r(306)](y,m)),O&&(globalThis[r(296)][r(244)].clear(),a[r(255)](),c[r(261)](n)),_();return}P==r(307)&&p[r(263)](function(I){const l=r;n.push(I),O&&(globalThis[l(296)].queue.clear(),a[l(255)](),c.resolve(n)),_()},y,m)})}globalThis[t(296)][t(244)][t(283)]()}catch(n){console[t(251)]("toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "),console[t(295)](n)}})}return c[x(281)]()})};function R(){var o=["10691648SshWqB","toImage","add toImage Api","47859RWiGWs","newPrintTemplate","0.3.0","380Zvmnqw","280257PVHSWQ","1238470IzGoiT","1036938rOqJaR","360OChzye","add toImage Api to PrintTemplate","201753Nwglds","206945BFAQaP","114GtnTYb"];return R=function(){return o},R()}function S(o,e){var x=R();return S=function(a,c){a=a-403;var g=x[a];return g},S(o,e)}(function(o,e){for(var x=S,a=o();[];)try{var c=parseInt(x(412))/1+-parseInt(x(413))/2+parseInt(x(408))/3*(-parseInt(x(411))/4)+parseInt(x(403))/5*(parseInt(x(404))/6)+-parseInt(x(414))/7+parseInt(x(405))/8+-parseInt(x(417))/9*(-parseInt(x(415))/10);if(c===e)break;a.push(a.shift())}catch(g){a.push(a.shift())}})(R,927212);function U(o){var e=S;return{name:e(407),description:e(407),hooks:[{hook:e(409),name:e(416),description:e(416),priority:1,run:({template:x,options:a})=>{var c=e;Object.defineProperty(x,c(406),{value:L,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:e(410)}}module.exports=U;
1
+ "use strict";var H=(r,x,e)=>new Promise((a,f)=>{var h=i=>{try{I(e.next(i))}catch(d){f(d)}},u=i=>{try{I(e.throw(i))}catch(d){f(d)}},I=i=>i.done?a(i.value):Promise.resolve(i.value).then(h,u);I((e=e.apply(r,x)).next())});const V=require("html-to-image");function X(r){if(r&&r.__esModule)return r;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(x,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return x.default=r,Object.freeze(x)}const $=X(V);function C(r,x){const e=R();return C=function(a,f){return a=a-474,e[a]},C(r,x)}(function(r,x){const e=C,a=r();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;a.push(a.shift())}catch(f){a.push(a.shift())}})(R,816052);function R(){const r=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return R=function(){return r},R()}const B=function(r,x){return H(this,null,function*(){const e=C;let a=this,f=globalThis.$[e(557)](),h=!![],u=10,I=(i,d)=>{const b=e,y=Math[b(544)](i/d*100);console.log("cur",i,b(497),d),console[b(561)](b(541),y+"%")};if(this[e(552)][e(525)]){let i=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),d=yield this[e(556)](r,x);x&&x[e(563)]!=null&&(h=x.isDownload),x&&x[e(538)]!=null&&(I=x[e(538)]),x&&x[e(523)]!=null&&(u=x.limit),globalThis.$(d).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let b=this[e(551)]();this[e(501)](d,i),b[e(520)](d[0]);let y=b[e(500)](e(506)).length;globalThis.$(d)[e(554)](e(509)),this[e(514)](d,function(){const t=e;try{let n=[],A=Math[t(558)](y/u),L=y%u;const p=document.createElement(t(498)),k=p.getContext("2d"),E=b[t(537)]()*(i.pixelRatio||globalThis[t(494)]);for(let v=0;v<A;v++){k[t(488)](0,0,p[t(537)],p.height);const j=v==A-1;let S=0,N=j?L:u;for(let g=0;g<N;g++){k.clearRect(0,0,p.width,p[t(540)]);const c=v*u+g,w=b[t(500)](t(506))[c];globalThis.hinnn.queue[t(560)](function(q){const T=t;$.toCanvas(w,i)[T(510)](function(_){const s=T;let m=_[s(484)]("2d");m[s(508)]=![];let P=_[s(545)](s(546),i[s(550)]||.92),o=new Image;o[s(477)]=P,o[s(496)]=function(){const l=s;g===0&&(p[l(537)]=E,p[l(540)]=o[l(540)]*N),S+=o[l(540)],k[l(536)](o,0,S-o[l(540)],E,o[l(540)]),I(c+1,y),q()}})})}globalThis[t(511)][t(530)][t(560)](function(g){const c=t;let w=i.type||c(546),q=i[c(542)]||"url",T=i.quality||.8;if(h){let _=p.toDataURL(w,T),s=new Image;s[c(477)]=_,s[c(496)]=function(){const m=c;n[m(492)]({url:_,start:v*u+1,end:v*u+N}),j&&(globalThis[m(511)].queue.clear(),a[m(518)](),n[m(480)](P=>{const o=m;let l=document[o(483)]("a"),O=x[o(481)]||o(502);O.indexOf(".")==-1&&(O+=o(522));let U=O[o(507)](".")[o(524)](),z=O[o(533)]("."+U,"")+"_"+P[o(529)]+"-"+P[o(528)]+"."+U;l[o(534)][o(478)]=o(491),l.setAttribute(o(548),z),l[o(562)]("href",P[o(495)]),document.body[o(516)](l),l[o(513)](),l[o(499)]()})),g()};return}if(q==c(495)){n.push(p.toDataURL(w,T)),j&&(globalThis[c(511)][c(530)][c(547)](),a[c(518)](),f[c(489)](n)),g();return}q==c(564)&&p.toBlob(function(_){const s=c;n[s(492)](_),j&&(globalThis[s(511)].queue[s(547)](),a[s(518)](),f[s(489)](n)),g()},w,T)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return f.promise()})};(function(r,x){for(var e=M,a=r();[];)try{var f=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(f===x)break;a.push(a.shift())}catch(h){a.push(a.shift())}})(D,181429);function D(){var r=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return D=function(){return r},D()}function M(r,x){var e=D();return M=function(a,f){a=a-330;var h=e[a];return h},M(r,x)}function W(r){var x=M;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:a})=>{Object.defineProperty(e,"toImage",{value:B,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}module.exports=W;
package/dist/index.mjs CHANGED
@@ -1,153 +1,152 @@
1
- var M = (s, t, x) => new Promise((a, l) => {
2
- var g = (i) => {
1
+ var L = (s, n, x) => new Promise((o, f) => {
2
+ var h = (r) => {
3
3
  try {
4
- v(x.next(i));
5
- } catch (f) {
6
- l(f);
4
+ I(x.next(r));
5
+ } catch (d) {
6
+ f(d);
7
7
  }
8
- }, h = (i) => {
8
+ }, u = (r) => {
9
9
  try {
10
- v(x.throw(i));
11
- } catch (f) {
12
- l(f);
10
+ I(x.throw(r));
11
+ } catch (d) {
12
+ f(d);
13
13
  }
14
- }, v = (i) => i.done ? a(i.value) : Promise.resolve(i.value).then(g, h);
15
- v((x = x.apply(s, t)).next());
14
+ }, I = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(h, u);
15
+ I((x = x.apply(s, n)).next());
16
16
  });
17
- import * as B from "html-to-image";
18
- function R(s, t) {
19
- const x = q();
20
- return R = function(a, l) {
21
- return a = a - 241, x[a];
22
- }, R(s, t);
17
+ import * as X from "html-to-image";
18
+ function D(s, n) {
19
+ const x = j();
20
+ return D = function(o, f) {
21
+ return o = o - 474, x[o];
22
+ }, D(s, n);
23
23
  }
24
- (function(s, t) {
25
- const x = R, a = s();
24
+ (function(s, n) {
25
+ const x = D, o = s();
26
26
  for (; []; )
27
27
  try {
28
- if (parseInt(x(311)) / 1 + parseInt(x(257)) / 2 + parseInt(x(282)) / 3 * (parseInt(x(290)) / 4) + parseInt(x(298)) / 5 * (-parseInt(x(310)) / 6) + parseInt(x(272)) / 7 + parseInt(x(243)) / 8 * (-parseInt(x(278)) / 9) + -parseInt(x(302)) / 10 * (parseInt(x(286)) / 11) === t)
28
+ if (parseInt(x(503)) / 1 * (parseInt(x(504)) / 2) + parseInt(x(555)) / 3 * (-parseInt(x(487)) / 4) + parseInt(x(535)) / 5 + parseInt(x(526)) / 6 * (-parseInt(x(521)) / 7) + -parseInt(x(475)) / 8 * (parseInt(x(505)) / 9) + -parseInt(x(490)) / 10 + -parseInt(x(493)) / 11 * (-parseInt(x(559)) / 12) === n)
29
29
  break;
30
- a.push(a.shift());
31
- } catch (l) {
32
- a.push(a.shift());
30
+ o.push(o.shift());
31
+ } catch (f) {
32
+ o.push(o.shift());
33
33
  }
34
- })(q, 310597);
35
- function q() {
36
- const s = ["image/jpeg", "onload", "jpg", "drawImage", "toType", "quality", "setAttribute", "limit", "webp", "clearRect", "toImage percent: ", "onProgress", "2752520slsSzG", "queue", "position:fixed", "imageSmoothingEnabled", "start", "body", "push", "getContext", "error", "display", "type", "canvas", "removeTempContainer", "svg", "1211952pjWnxS", "png", "isDownload", "none", "resolve", ".hiprint-printPanel .hiprint-printPaper", "toBlob", "createElement", "svg2canvas", "gif", "devicePixelRatio", "floor", "src", "length", "toLowerCase", "3028354fANDZb", "html", "replace", "base64", "getTempContainer", "split", "9OKopgT", "add", "IMG", "promise", "423903ysAAGw", "run", "then", "clear", "7073jsgnKA", "baseURI", "jpeg", "http", "8EKXJCz", "#fff", "height", "appendChild", "find", "log", "hinnn", "tagName", "520860jTbyTh", ".jpg", "printPanels", "css", "7210mRELdx", "url", "Deferred", "style", "toDataURL", "blob", "forEach", "bmp", "18NSXnhd", "109581xnVhdE", "indexOf", "pop", "toCanvas", "createTempContainer", "width", "extend"];
37
- return q = function() {
34
+ })(j, 816052);
35
+ function j() {
36
+ const s = ["position:fixed", "then", "hinnn", "toLowerCase", "click", "loadAllImages", "indexOf", "appendChild", "jpeg", "removeTempContainer", "run", "html", "3441704qtnwHN", ".jpg", "limit", "pop", "length", "6XyoQTM", "includes", "end", "start", "queue", "baseURI", "http", "replace", "style", "1106880KqPUKf", "drawImage", "width", "onProgress", "jpg", "height", "toImage percent: ", "toType", "IMG", "floor", "toDataURL", "image/jpeg", "clear", "download", "error", "quality", "getTempContainer", "printPanels", "gif", "css", "361308RsofXq", "getHtml", "Deferred", "ceil", "39956604WryTHN", "add", "log", "setAttribute", "isDownload", "blob", "toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ", "2342960qOtRWn", "base64", "src", "display", "bmp", "forEach", "name", "tagName", "createElement", "getContext", "extend", "svg", "40ZTyEhO", "clearRect", "resolve", "5600870NYRqPE", "none", "push", "11IUEizV", "devicePixelRatio", "url", "onload", "total", "canvas", "remove", "find", "svg2canvas", "download.jpg", "38PHPcee", "5622CHoDSb", "18PuPaoM", ".hiprint-printPanel .hiprint-printPaper", "split", "imageSmoothingEnabled"];
37
+ return j = function() {
38
38
  return s;
39
- }, q();
39
+ }, j();
40
40
  }
41
- const H = function(s, t) {
42
- return M(this, null, function* () {
43
- const x = R;
44
- let a = this, l = globalThis.$[x(304)](), g = !![], h = 10, v = (i, f) => {
45
- const u = x, w = Math[u(268)](i / f * 100);
46
- console[u(295)]("cur", i, "total", f), console[u(295)](u(241), w + "%");
41
+ const $ = function(s, n) {
42
+ return L(this, null, function* () {
43
+ const x = D;
44
+ let o = this, f = globalThis.$[x(557)](), h = !![], u = 10, I = (r, d) => {
45
+ const b = x, w = Math[b(544)](r / d * 100);
46
+ console.log("cur", r, b(497), d), console[b(561)](b(541), w + "%");
47
47
  };
48
- if (this[x(300)][x(270)]) {
49
- let i = globalThis.$[x(317)]({ filter: (e) => {
50
- const n = x;
51
- return e[n(297)] != "IMG" || e[n(297)] == n(280) && ([n(320), n(288), n(258), n(266), n(309), n(326), n(256)].includes(e[n(269)].split(".")[n(313)]()[n(271)]()) || e[n(269)] != e[n(287)] || e[n(269)][n(312)](n(289)) > -1 && e[n(269)] != e.baseURI || e[n(269)].indexOf(n(275)) > -1);
52
- }, backgroundColor: x(291) }, t || {}), f = yield this.getHtml(s, t);
53
- t && t[x(259)] != null && (g = t[x(259)]), t && t[x(242)] != null && (v = t[x(242)]), t && t[x(325)] != null && (h = t[x(325)]), globalThis.$(f)[x(301)](x(316), "")[x(301)](x(292), ""), this[x(315)]();
54
- let u = this[x(276)]();
55
- this[x(265)](f, i), u[x(273)](f[0]);
56
- let w = u[x(294)](x(262))[x(270)];
57
- globalThis.$(f)[x(301)](x(245)), this.loadAllImages(f, function() {
48
+ if (this[x(552)][x(525)]) {
49
+ let r = globalThis.$[x(485)]({ filter: (e) => {
50
+ const t = x;
51
+ return e[t(482)] != t(543) || e.tagName == t(543) && ([t(539), t(517), "png", t(553), t(479), "webp", t(486)][t(527)](e[t(477)][t(507)](".").pop()[t(512)]()) || e[t(477)] != e[t(531)] || e.src.indexOf(t(532)) > -1 && e[t(477)] != e[t(531)] || e[t(477)][t(515)](t(476)) > -1);
52
+ }, backgroundColor: "#fff" }, n || {}), d = yield this[x(556)](s, n);
53
+ n && n[x(563)] != null && (h = n.isDownload), n && n[x(538)] != null && (I = n[x(538)]), n && n[x(523)] != null && (u = n.limit), globalThis.$(d).css(x(537), "")[x(554)](x(540), ""), this.createTempContainer();
54
+ let b = this[x(551)]();
55
+ this[x(501)](d, r), b[x(520)](d[0]);
56
+ let w = b[x(500)](x(506)).length;
57
+ globalThis.$(d)[x(554)](x(509)), this[x(514)](d, function() {
58
58
  const e = x;
59
59
  try {
60
- let n = [], S = Math.ceil(w / h), N = w % h;
61
- const p = document[e(264)](e(254)), k = p[e(250)]("2d"), W = u.width() * globalThis[e(267)];
62
- for (let T = 0; T < S; T++) {
63
- k[e(327)](0, 0, p.width, p.height);
64
- const A = T == S - 1;
65
- let z = 0, E = A ? N : h;
66
- for (let _ = 0; _ < E; _++) {
67
- k[e(327)](0, 0, p.width, p[e(292)]);
68
- const o = T * h + _, y = u[e(294)](e(262))[o];
69
- globalThis[e(296)][e(244)][e(279)](function(P) {
70
- const b = e;
71
- B[b(314)](y, i)[b(284)](function(I) {
72
- const c = b;
73
- let m = I[c(250)]("2d");
74
- m[c(246)] = ![];
75
- let C = I[c(306)](c(318), i[c(323)] || 0.92), r = new Image();
76
- r[c(269)] = C, r.onload = function() {
77
- const d = c;
78
- _ === 0 && (p[d(316)] = W, p[d(292)] = r[d(292)] * E), z += r.height, k[d(321)](r, 0, z - r.height, W, r.height), v(o + 1, w), P();
60
+ let t = [], N = Math[e(558)](w / u), S = w % u;
61
+ const p = document.createElement(e(498)), A = p.getContext("2d"), O = b[e(537)]() * (r.pixelRatio || globalThis[e(494)]);
62
+ for (let v = 0; v < N; v++) {
63
+ A[e(488)](0, 0, p[e(537)], p.height);
64
+ const q = v == N - 1;
65
+ let U = 0, E = q ? S : u;
66
+ for (let g = 0; g < E; g++) {
67
+ A.clearRect(0, 0, p.width, p[e(540)]);
68
+ const c = v * u + g, y = b[e(500)](e(506))[c];
69
+ globalThis.hinnn.queue[e(560)](function(C) {
70
+ const T = e;
71
+ X.toCanvas(y, r)[T(510)](function(_) {
72
+ const i = T;
73
+ let m = _[i(484)]("2d");
74
+ m[i(508)] = ![];
75
+ let P = _[i(545)](i(546), r[i(550)] || 0.92), a = new Image();
76
+ a[i(477)] = P, a[i(496)] = function() {
77
+ const l = i;
78
+ g === 0 && (p[l(537)] = O, p[l(540)] = a[l(540)] * E), U += a[l(540)], A[l(536)](a, 0, U - a[l(540)], O, a[l(540)]), I(c + 1, w), C();
79
79
  };
80
80
  });
81
81
  });
82
82
  }
83
- globalThis[e(296)][e(244)][e(279)](function(_) {
84
- const o = e;
85
- let y = i[o(253)] || o(318), P = i[o(322)] || o(303), b = i.quality || 0.8;
86
- if (g) {
87
- let I = p[o(306)](y, b), c = new Image();
88
- c[o(269)] = I, c[o(319)] = function() {
89
- const m = o;
90
- n[m(249)]({ url: I, start: T * h + 1, end: T * h + E }), A && (globalThis[m(296)][m(244)][m(285)](), a.removeTempContainer(), n[m(308)]((C) => {
91
- const r = m;
92
- let d = document[r(264)]("a"), j = t.name || "download.jpg";
93
- j.indexOf(".") == -1 && (j += r(299));
94
- let D = j[r(277)](".")[r(313)](), $ = j[r(274)]("." + D, "") + "_" + C[r(247)] + "-" + C.end + "." + D;
95
- d[r(305)][r(252)] = r(260), d[r(324)]("download", $), d.setAttribute("href", C.url), document[r(248)][r(293)](d), d.click(), d.remove();
96
- })), _();
83
+ globalThis[e(511)][e(530)][e(560)](function(g) {
84
+ const c = e;
85
+ let y = r.type || c(546), C = r[c(542)] || "url", T = r.quality || 0.8;
86
+ if (h) {
87
+ let _ = p.toDataURL(y, T), i = new Image();
88
+ i[c(477)] = _, i[c(496)] = function() {
89
+ const m = c;
90
+ t[m(492)]({ url: _, start: v * u + 1, end: v * u + E }), q && (globalThis[m(511)].queue.clear(), o[m(518)](), t[m(480)]((P) => {
91
+ const a = m;
92
+ let l = document[a(483)]("a"), R = n[a(481)] || a(502);
93
+ R.indexOf(".") == -1 && (R += a(522));
94
+ let H = R[a(507)](".")[a(524)](), V = R[a(533)]("." + H, "") + "_" + P[a(529)] + "-" + P[a(528)] + "." + H;
95
+ l[a(534)][a(478)] = a(491), l.setAttribute(a(548), V), l[a(562)]("href", P[a(495)]), document.body[a(516)](l), l[a(513)](), l[a(499)]();
96
+ })), g();
97
97
  };
98
98
  return;
99
99
  }
100
- if (P == o(303)) {
101
- n[o(249)](p[o(306)](y, b)), A && (globalThis[o(296)][o(244)].clear(), a[o(255)](), l[o(261)](n)), _();
100
+ if (C == c(495)) {
101
+ t.push(p.toDataURL(y, T)), q && (globalThis[c(511)][c(530)][c(547)](), o[c(518)](), f[c(489)](t)), g();
102
102
  return;
103
103
  }
104
- P == o(307) && p[o(263)](function(I) {
105
- const c = o;
106
- n.push(I), A && (globalThis[c(296)].queue.clear(), a[c(255)](), l.resolve(n)), _();
107
- }, y, b);
104
+ C == c(564) && p.toBlob(function(_) {
105
+ const i = c;
106
+ t[i(492)](_), q && (globalThis[i(511)].queue[i(547)](), o[i(518)](), f[i(489)](t)), g();
107
+ }, y, T);
108
108
  });
109
109
  }
110
- globalThis[e(296)][e(244)][e(283)]();
111
- } catch (n) {
112
- console[e(251)]("toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "), console[e(295)](n);
110
+ globalThis.hinnn[e(530)][e(519)]();
111
+ } catch (t) {
112
+ console[e(549)](e(474)), console[e(561)](t);
113
113
  }
114
114
  });
115
115
  }
116
- return l[x(281)]();
116
+ return f.promise();
117
117
  });
118
118
  };
119
- function G() {
120
- var s = ["10691648SshWqB", "toImage", "add toImage Api", "47859RWiGWs", "newPrintTemplate", "0.3.0", "380Zvmnqw", "280257PVHSWQ", "1238470IzGoiT", "1036938rOqJaR", "360OChzye", "add toImage Api to PrintTemplate", "201753Nwglds", "206945BFAQaP", "114GtnTYb"];
121
- return G = function() {
122
- return s;
123
- }, G();
124
- }
125
- function O(s, t) {
126
- var x = G();
127
- return O = function(a, l) {
128
- a = a - 403;
129
- var g = x[a];
130
- return g;
131
- }, O(s, t);
132
- }
133
- (function(s, t) {
134
- for (var x = O, a = s(); []; )
119
+ (function(s, n) {
120
+ for (var x = k, o = s(); []; )
135
121
  try {
136
- var l = parseInt(x(412)) / 1 + -parseInt(x(413)) / 2 + parseInt(x(408)) / 3 * (-parseInt(x(411)) / 4) + parseInt(x(403)) / 5 * (parseInt(x(404)) / 6) + -parseInt(x(414)) / 7 + parseInt(x(405)) / 8 + -parseInt(x(417)) / 9 * (-parseInt(x(415)) / 10);
137
- if (l === t)
122
+ var f = -parseInt(x(334)) / 1 + -parseInt(x(331)) / 2 * (-parseInt(x(344)) / 3) + -parseInt(x(338)) / 4 * (parseInt(x(341)) / 5) + -parseInt(x(332)) / 6 * (-parseInt(x(337)) / 7) + -parseInt(x(339)) / 8 + -parseInt(x(335)) / 9 + parseInt(x(330)) / 10 * (parseInt(x(336)) / 11);
123
+ if (f === n)
138
124
  break;
139
- a.push(a.shift());
140
- } catch (g) {
141
- a.push(a.shift());
125
+ o.push(o.shift());
126
+ } catch (h) {
127
+ o.push(o.shift());
142
128
  }
143
- })(G, 927212);
144
- function L(s) {
145
- var t = O;
146
- return { name: t(407), description: t(407), hooks: [{ hook: t(409), name: t(416), description: t(416), priority: 1, run: ({ template: x, options: a }) => {
147
- var l = t;
148
- Object.defineProperty(x, l(406), { value: H, enumerable: ![], writable: !![], configurable: !![] });
149
- } }], leastHiprintVersion: t(410) };
129
+ })(M, 181429);
130
+ function M() {
131
+ var s = ["1295808WtNBbn", "add toImage Api", "123315SiaLiG", "newPrintTemplate", "add toImage Api to PrintTemplate", "9YVzMTT", "10MvYIXj", "220664DaJysg", "376422ksOobN", "0.3.0", "53520SAQUct", "1388907VBMmzC", "3903009xpjZvF", "7ssnXvg", "32FfDhfS"];
132
+ return M = function() {
133
+ return s;
134
+ }, M();
135
+ }
136
+ function k(s, n) {
137
+ var x = M();
138
+ return k = function(o, f) {
139
+ o = o - 330;
140
+ var h = x[o];
141
+ return h;
142
+ }, k(s, n);
143
+ }
144
+ function B(s) {
145
+ var n = k;
146
+ return { name: n(340), description: "add toImage Api", hooks: [{ hook: n(342), name: n(343), description: n(343), priority: 1, run: ({ template: x, options: o }) => {
147
+ Object.defineProperty(x, "toImage", { value: $, enumerable: ![], writable: !![], configurable: !![] });
148
+ } }], leastHiprintVersion: n(333) };
150
149
  }
151
150
  export {
152
- L as default
151
+ B as default
153
152
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(h,I){typeof exports=="object"&&typeof module!="undefined"?module.exports=I(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],I):(h=typeof globalThis!="undefined"?globalThis:h||self,h.pluginApiImage=I(h.htmlToImage))})(this,function(h){"use strict";var K=(h,I,j)=>new Promise((O,T)=>{var M=d=>{try{g(j.next(d))}catch(a){T(a)}},P=d=>{try{g(j.throw(d))}catch(a){T(a)}},g=d=>d.done?O(d.value):Promise.resolve(d.value).then(M,P);g((j=j.apply(h,I)).next())});function I(a){if(a&&a.__esModule)return a;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const j=I(h);function O(a,x){const e=T();return O=function(o,c){return o=o-241,e[o]},O(a,x)}(function(a,x){const e=O,o=a();for(;[];)try{if(parseInt(e(311))/1+parseInt(e(257))/2+parseInt(e(282))/3*(parseInt(e(290))/4)+parseInt(e(298))/5*(-parseInt(e(310))/6)+parseInt(e(272))/7+parseInt(e(243))/8*(-parseInt(e(278))/9)+-parseInt(e(302))/10*(parseInt(e(286))/11)===x)break;o.push(o.shift())}catch(c){o.push(o.shift())}})(T,310597);function T(){const a=["image/jpeg","onload","jpg","drawImage","toType","quality","setAttribute","limit","webp","clearRect","toImage percent: ","onProgress","2752520slsSzG","queue","position:fixed","imageSmoothingEnabled","start","body","push","getContext","error","display","type","canvas","removeTempContainer","svg","1211952pjWnxS","png","isDownload","none","resolve",".hiprint-printPanel .hiprint-printPaper","toBlob","createElement","svg2canvas","gif","devicePixelRatio","floor","src","length","toLowerCase","3028354fANDZb","html","replace","base64","getTempContainer","split","9OKopgT","add","IMG","promise","423903ysAAGw","run","then","clear","7073jsgnKA","baseURI","jpeg","http","8EKXJCz","#fff","height","appendChild","find","log","hinnn","tagName","520860jTbyTh",".jpg","printPanels","css","7210mRELdx","url","Deferred","style","toDataURL","blob","forEach","bmp","18NSXnhd","109581xnVhdE","indexOf","pop","toCanvas","createTempContainer","width","extend"];return T=function(){return a},T()}const M=function(a,x){return K(this,null,function*(){const e=O;let o=this,c=globalThis.$[e(304)](),A=!![],v=10,N=(p,m)=>{const u=e,q=Math[u(268)](p/m*100);console[u(295)]("cur",p,"total",m),console[u(295)](u(241),q+"%")};if(this[e(300)][e(270)]){let p=globalThis.$[e(317)]({filter:t=>{const n=e;return t[n(297)]!="IMG"||t[n(297)]==n(280)&&([n(320),n(288),n(258),n(266),n(309),n(326),n(256)].includes(t[n(269)].split(".")[n(313)]()[n(271)]())||t[n(269)]!=t[n(287)]||t[n(269)][n(312)](n(289))>-1&&t[n(269)]!=t.baseURI||t[n(269)].indexOf(n(275))>-1)},backgroundColor:e(291)},x||{}),m=yield this.getHtml(a,x);x&&x[e(259)]!=null&&(A=x[e(259)]),x&&x[e(242)]!=null&&(N=x[e(242)]),x&&x[e(325)]!=null&&(v=x[e(325)]),globalThis.$(m)[e(301)](e(316),"")[e(301)](e(292),""),this[e(315)]();let u=this[e(276)]();this[e(265)](m,p),u[e(273)](m[0]);let q=u[e(294)](e(262))[e(270)];globalThis.$(m)[e(301)](e(245)),this.loadAllImages(m,function(){const t=e;try{let n=[],W=Math.ceil(q/v),L=q%v;const f=document[t(264)](t(254)),z=f[t(250)]("2d"),$=u.width()*globalThis[t(267)];for(let C=0;C<W;C++){z[t(327)](0,0,f.width,f.height);const k=C==W-1;let B=0,D=k?L:v;for(let _=0;_<D;_++){z[t(327)](0,0,f.width,f[t(292)]);const i=C*v+_,R=u[t(294)](t(262))[i];globalThis[t(296)][t(244)][t(279)](function(G){const w=t;j[w(314)](R,p)[w(284)](function(y){const s=w;let b=y[s(250)]("2d");b[s(246)]=![];let S=y[s(306)](s(318),p[s(323)]||.92),r=new Image;r[s(269)]=S,r.onload=function(){const l=s;_===0&&(f[l(316)]=$,f[l(292)]=r[l(292)]*D),B+=r.height,z[l(321)](r,0,B-r.height,$,r.height),N(i+1,q),G()}})})}globalThis[t(296)][t(244)][t(279)](function(_){const i=t;let R=p[i(253)]||i(318),G=p[i(322)]||i(303),w=p.quality||.8;if(A){let y=f[i(306)](R,w),s=new Image;s[i(269)]=y,s[i(319)]=function(){const b=i;n[b(249)]({url:y,start:C*v+1,end:C*v+D}),k&&(globalThis[b(296)][b(244)][b(285)](),o.removeTempContainer(),n[b(308)](S=>{const r=b;let l=document[r(264)]("a"),E=x.name||"download.jpg";E.indexOf(".")==-1&&(E+=r(299));let H=E[r(277)](".")[r(313)](),U=E[r(274)]("."+H,"")+"_"+S[r(247)]+"-"+S.end+"."+H;l[r(305)][r(252)]=r(260),l[r(324)]("download",U),l.setAttribute("href",S.url),document[r(248)][r(293)](l),l.click(),l.remove()})),_()};return}if(G==i(303)){n[i(249)](f[i(306)](R,w)),k&&(globalThis[i(296)][i(244)].clear(),o[i(255)](),c[i(261)](n)),_();return}G==i(307)&&f[i(263)](function(y){const s=i;n.push(y),k&&(globalThis[s(296)].queue.clear(),o[s(255)](),c.resolve(n)),_()},R,w)})}globalThis[t(296)][t(244)][t(283)]()}catch(n){console[t(251)]("toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): "),console[t(295)](n)}})}return c[e(281)]()})};function P(){var a=["10691648SshWqB","toImage","add toImage Api","47859RWiGWs","newPrintTemplate","0.3.0","380Zvmnqw","280257PVHSWQ","1238470IzGoiT","1036938rOqJaR","360OChzye","add toImage Api to PrintTemplate","201753Nwglds","206945BFAQaP","114GtnTYb"];return P=function(){return a},P()}function g(a,x){var e=P();return g=function(o,c){o=o-403;var A=e[o];return A},g(a,x)}(function(a,x){for(var e=g,o=a();[];)try{var c=parseInt(e(412))/1+-parseInt(e(413))/2+parseInt(e(408))/3*(-parseInt(e(411))/4)+parseInt(e(403))/5*(parseInt(e(404))/6)+-parseInt(e(414))/7+parseInt(e(405))/8+-parseInt(e(417))/9*(-parseInt(e(415))/10);if(c===x)break;o.push(o.shift())}catch(A){o.push(o.shift())}})(P,927212);function d(a){var x=g;return{name:x(407),description:x(407),hooks:[{hook:x(409),name:x(416),description:x(416),priority:1,run:({template:e,options:o})=>{var c=x;Object.defineProperty(e,c(406),{value:M,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(410)}}return d});
1
+ (function(b,_){typeof exports=="object"&&typeof module!="undefined"?module.exports=_(require("html-to-image")):typeof define=="function"&&define.amd?define(["html-to-image"],_):(b=typeof globalThis!="undefined"?globalThis:b||self,b.pluginApiImage=_(b.htmlToImage))})(this,function(b){"use strict";var $=(b,_,w)=>new Promise((P,I)=>{var E=d=>{try{h(w.next(d))}catch(a){I(a)}},j=d=>{try{h(w.throw(d))}catch(a){I(a)}},h=d=>d.done?P(d.value):Promise.resolve(d.value).then(E,j);h((w=w.apply(b,_)).next())});function _(a){if(a&&a.__esModule)return a;const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,i.get?i:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const w=_(b);function P(a,x){const e=I();return P=function(i,p){return i=i-474,e[i]},P(a,x)}(function(a,x){const e=P,i=a();for(;[];)try{if(parseInt(e(503))/1*(parseInt(e(504))/2)+parseInt(e(555))/3*(-parseInt(e(487))/4)+parseInt(e(535))/5+parseInt(e(526))/6*(-parseInt(e(521))/7)+-parseInt(e(475))/8*(parseInt(e(505))/9)+-parseInt(e(490))/10+-parseInt(e(493))/11*(-parseInt(e(559))/12)===x)break;i.push(i.shift())}catch(p){i.push(i.shift())}})(I,816052);function I(){const a=["position:fixed","then","hinnn","toLowerCase","click","loadAllImages","indexOf","appendChild","jpeg","removeTempContainer","run","html","3441704qtnwHN",".jpg","limit","pop","length","6XyoQTM","includes","end","start","queue","baseURI","http","replace","style","1106880KqPUKf","drawImage","width","onProgress","jpg","height","toImage percent: ","toType","IMG","floor","toDataURL","image/jpeg","clear","download","error","quality","getTempContainer","printPanels","gif","css","361308RsofXq","getHtml","Deferred","ceil","39956604WryTHN","add","log","setAttribute","isDownload","blob","toImage \u5931\u8D25(\u53EF\u80FD\u60A8\u7684\u56FE\u7247\u8D44\u6E90\u65E0\u6CD5\u6B63\u5E38\u52A0\u8F7D): ","2342960qOtRWn","base64","src","display","bmp","forEach","name","tagName","createElement","getContext","extend","svg","40ZTyEhO","clearRect","resolve","5600870NYRqPE","none","push","11IUEizV","devicePixelRatio","url","onload","total","canvas","remove","find","svg2canvas","download.jpg","38PHPcee","5622CHoDSb","18PuPaoM",".hiprint-printPanel .hiprint-printPaper","split","imageSmoothingEnabled"];return I=function(){return a},I()}const E=function(a,x){return $(this,null,function*(){const e=P;let i=this,p=globalThis.$[e(557)](),q=!![],T=10,H=(f,g)=>{const u=e,R=Math[u(544)](f/g*100);console.log("cur",f,u(497),g),console[u(561)](u(541),R+"%")};if(this[e(552)][e(525)]){let f=globalThis.$[e(485)]({filter:t=>{const n=e;return t[n(482)]!=n(543)||t.tagName==n(543)&&([n(539),n(517),"png",n(553),n(479),"webp",n(486)][n(527)](t[n(477)][n(507)](".").pop()[n(512)]())||t[n(477)]!=t[n(531)]||t.src.indexOf(n(532))>-1&&t[n(477)]!=t[n(531)]||t[n(477)][n(515)](n(476))>-1)},backgroundColor:"#fff"},x||{}),g=yield this[e(556)](a,x);x&&x[e(563)]!=null&&(q=x.isDownload),x&&x[e(538)]!=null&&(H=x[e(538)]),x&&x[e(523)]!=null&&(T=x.limit),globalThis.$(g).css(e(537),"")[e(554)](e(540),""),this.createTempContainer();let u=this[e(551)]();this[e(501)](g,f),u[e(520)](g[0]);let R=u[e(500)](e(506)).length;globalThis.$(g)[e(554)](e(509)),this[e(514)](g,function(){const t=e;try{let n=[],L=Math[t(558)](R/T),B=R%T;const l=document.createElement(t(498)),S=l.getContext("2d"),z=u[t(537)]()*(f.pixelRatio||globalThis[t(494)]);for(let O=0;O<L;O++){S[t(488)](0,0,l[t(537)],l.height);const k=O==L-1;let V=0,U=k?B:T;for(let m=0;m<U;m++){S.clearRect(0,0,l.width,l[t(540)]);const s=O*T+m,D=u[t(500)](t(506))[s];globalThis.hinnn.queue[t(560)](function(A){const C=t;w.toCanvas(D,f)[C(510)](function(v){const r=C;let y=v[r(484)]("2d");y[r(508)]=![];let M=v[r(545)](r(546),f[r(550)]||.92),o=new Image;o[r(477)]=M,o[r(496)]=function(){const c=r;m===0&&(l[c(537)]=z,l[c(540)]=o[c(540)]*U),V+=o[c(540)],S[c(536)](o,0,V-o[c(540)],z,o[c(540)]),H(s+1,R),A()}})})}globalThis[t(511)][t(530)][t(560)](function(m){const s=t;let D=f.type||s(546),A=f[s(542)]||"url",C=f.quality||.8;if(q){let v=l.toDataURL(D,C),r=new Image;r[s(477)]=v,r[s(496)]=function(){const y=s;n[y(492)]({url:v,start:O*T+1,end:O*T+U}),k&&(globalThis[y(511)].queue.clear(),i[y(518)](),n[y(480)](M=>{const o=y;let c=document[o(483)]("a"),N=x[o(481)]||o(502);N.indexOf(".")==-1&&(N+=o(522));let X=N[o(507)](".")[o(524)](),W=N[o(533)]("."+X,"")+"_"+M[o(529)]+"-"+M[o(528)]+"."+X;c[o(534)][o(478)]=o(491),c.setAttribute(o(548),W),c[o(562)]("href",M[o(495)]),document.body[o(516)](c),c[o(513)](),c[o(499)]()})),m()};return}if(A==s(495)){n.push(l.toDataURL(D,C)),k&&(globalThis[s(511)][s(530)][s(547)](),i[s(518)](),p[s(489)](n)),m();return}A==s(564)&&l.toBlob(function(v){const r=s;n[r(492)](v),k&&(globalThis[r(511)].queue[r(547)](),i[r(518)](),p[r(489)](n)),m()},D,C)})}globalThis.hinnn[t(530)][t(519)]()}catch(n){console[t(549)](t(474)),console[t(561)](n)}})}return p.promise()})};(function(a,x){for(var e=h,i=a();[];)try{var p=-parseInt(e(334))/1+-parseInt(e(331))/2*(-parseInt(e(344))/3)+-parseInt(e(338))/4*(parseInt(e(341))/5)+-parseInt(e(332))/6*(-parseInt(e(337))/7)+-parseInt(e(339))/8+-parseInt(e(335))/9+parseInt(e(330))/10*(parseInt(e(336))/11);if(p===x)break;i.push(i.shift())}catch(q){i.push(i.shift())}})(j,181429);function j(){var a=["1295808WtNBbn","add toImage Api","123315SiaLiG","newPrintTemplate","add toImage Api to PrintTemplate","9YVzMTT","10MvYIXj","220664DaJysg","376422ksOobN","0.3.0","53520SAQUct","1388907VBMmzC","3903009xpjZvF","7ssnXvg","32FfDhfS"];return j=function(){return a},j()}function h(a,x){var e=j();return h=function(i,p){i=i-330;var q=e[i];return q},h(a,x)}function d(a){var x=h;return{name:x(340),description:"add toImage Api",hooks:[{hook:x(342),name:x(343),description:x(343),priority:1,run:({template:e,options:i})=>{Object.defineProperty(e,"toImage",{value:E,enumerable:![],writable:!![],configurable:!![]})}}],leastHiprintVersion:x(333)}}return d});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sv-print/plugin-api-image",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "add image api to print template",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",