From 371239e16e9ea48214cf13c3c71e08544a36099b Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Thu, 12 May 2022 05:36:53 -0500 Subject: [PATCH] Build 2.10.0 minified file --- dist/dom-to-image-more.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/dom-to-image-more.min.js b/dist/dom-to-image-more.min.js index 2cb6f5f6..92c80682 100644 --- a/dist/dom-to-image-more.min.js +++ b/dist/dom-to-image-more.min.js @@ -1,3 +1,3 @@ -/*! dom-to-image-more 06-12-2021 */ +/*! dom-to-image-more 12-05-2022 */ -!function(e){"use strict";var c={escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){e=t(e).toLowerCase();return function(){var e="application/font-woff",t="image/jpeg";return{woff:e,woff2:e,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:t,jpeg:t,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}()[e]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise(function(e){t.toBlob(e)}):function(i){return new Promise(function(e){for(var t=d(i.toDataURL().split(",")[1]),n=t.length,r=new Uint8Array(n),o=0;oe.toDataURL()).then(c.makeImage):e.cloneNode(!1)}function n(e,t){e=e.childNodes;return 0===e.length?Promise.resolve(t):n(t,c.asArray(e)).then(function(){return t});function n(t,e){var n=Promise.resolve();return e.forEach(function(e){n=n.then(function(){return r(e,o,!1,i)}).then(function(e){e&&t.appendChild(e)})}),n}}function u(r,u,t){return u instanceof Element?Promise.resolve().then(e).then(n).then(o).then(i).then(function(){return u}):u;function e(){function n(e,t){t.font=e.font,t.fontFamily=e.fontFamily,t.fontFeatureSettings=e.fontFeatureSettings,t.fontKerning=e.fontKerning,t.fontSize=e.fontSize,t.fontStretch=e.fontStretch,t.fontStyle=e.fontStyle,t.fontVariant=e.fontVariant,t.fontVariantCaps=e.fontVariantCaps,t.fontVariantEastAsian=e.fontVariantEastAsian,t.fontVariantLigatures=e.fontVariantLigatures,t.fontVariantNumeric=e.fontVariantNumeric,t.fontVariationSettings=e.fontVariationSettings,t.fontWeight=e.fontWeight}function e(e,r){function t(t,n){c.asArray(t).forEach(function(e){n.setProperty(e,t.getPropertyValue(e),t.getPropertyPriority(e))}),a&&(["inset-block","inset-block-start","inset-block-end"].forEach(e=>r.removeProperty(e)),["left","right","top","bottom"].forEach(e=>{r.getPropertyValue(e)&&r.setProperty(e,"0px")}))}e.cssText?(r.cssText=e.cssText,n(e,r)):t(e,r)}e(t?b(r,a):g(r),u.style)}function n(){function t(o){var i,a=g(r,o),e=a.getPropertyValue("content");function t(){var e="."+i+":"+o,t=(a.cssText?n:r)();return document.createTextNode(e+"{"+t+"}");function n(){return a.cssText+" content: "+a.getPropertyValue("content")+";"}function r(){return c.asArray(a).map(e).join("; ")+";";function e(e){return e+": "+a.getPropertyValue(e)+(a.getPropertyPriority(e)?" !important":"")}}}""!==e&&"none"!==e&&(i=c.uid(),(e=u.getAttribute("class"))&&u.setAttribute("class",e+" "+i),(e=document.createElement("style")).appendChild(t()),u.appendChild(e))}[":before",":after"].forEach(function(e){t(e)})}function o(){r instanceof HTMLTextAreaElement&&(u.innerHTML=r.value),r instanceof HTMLInputElement&&u.setAttribute("value",r.value)}function i(){u instanceof SVGElement&&(u.setAttribute("xmlns","http://www.w3.org/2000/svg"),u instanceof SVGRectElement&&["width","height"].forEach(function(e){var t=u.getAttribute(e);t&&u.style.setProperty(e,t)}))}}}(e,o.filter,!0,!o.raster)}).then(P).then(w).then(function(t){o.bgcolor&&(t.style.backgroundColor=o.bgcolor);o.width&&(t.style.width=o.width+"px");o.height&&(t.style.height=o.height+"px");o.style&&Object.keys(o.style).forEach(function(e){t.style[e]=o.style[e]});var e=null;"function"==typeof o.onclone&&(e=o.onclone(t));return Promise.resolve(e).then(function(){return t})}).then(function(e){return e=e,t=o.width||c.width(r),n=o.height||c.height(r),Promise.resolve(e).then(function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)}).then(c.escapeXhtml).then(function(e){return''+e+""}).then(function(e){return''+e+""}).then(function(e){return"data:image/svg+xml;charset=utf-8,"+e});var t,n})}function v(o,i){return y(o,i).then(c.makeImage).then(c.delay(0)).then(function(e){var t="number"!=typeof i.scale?1:i.scale,n=function(e,t){var n=document.createElement("canvas");n.width=(i.width||c.width(e))*t,n.height=(i.height||c.height(e))*t,i.bgcolor&&((t=n.getContext("2d")).fillStyle=i.bgcolor,t.fillRect(0,0,n.width,n.height));return n}(o,t),r=n.getContext("2d");return r.mozImageSmoothingEnabled=!1,r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1,e&&(r.scale(t,t),r.drawImage(e,0,0)),n})}function P(n){return s.resolveAll().then(function(e){var t=document.createElement("style");return n.appendChild(t),t.appendChild(document.createTextNode(e)),n})}function w(e){return f.inlineAll(e).then(function(){return e})}function b(e,t){var n,r=document.createElement(e.tagName).style,o=g(e),i=e.style;for(n of o){var a=o.getPropertyValue(n),u=i.getPropertyValue(n);i.setProperty(n,t?"initial":"unset"),o.getPropertyValue(n)!==a?r.setProperty(n,a):r.removeProperty(n),i.setProperty(n,u)}return r}}(this); \ No newline at end of file +!function(e){"use strict";var s={escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){e=t(e).toLowerCase();return function(){var e="application/font-woff",t="image/jpeg";return{woff:e,woff2:e,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:t,jpeg:t,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}()[e]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise(function(e){t.toBlob(e)}):function(i){return new Promise(function(e){for(var t=g(i.toDataURL().split(",")[1]),n=t.length,r=new Uint8Array(n),o=0;oe.toDataURL()).then(s.makeImage):e.cloneNode(!1)}function n(o,e){var t=o.childNodes;return 0===t.length?Promise.resolve(e):n(e,s.asArray(t)).then(function(){return e});function n(t,e){var n=p(o),r=Promise.resolve();return e.forEach(function(e){r=r.then(function(){return i(e,a,!1,u,n)}).then(function(e){e&&t.appendChild(e)})}),r}}function r(n,u,o){return u instanceof Element?Promise.resolve().then(e).then(t).then(r).then(i).then(function(){return u}):u;function e(){function r(e,t){t.font=e.font,t.fontFamily=e.fontFamily,t.fontFeatureSettings=e.fontFeatureSettings,t.fontKerning=e.fontKerning,t.fontSize=e.fontSize,t.fontStretch=e.fontStretch,t.fontStyle=e.fontStyle,t.fontVariant=e.fontVariant,t.fontVariantCaps=e.fontVariantCaps,t.fontVariantEastAsian=e.fontVariantEastAsian,t.fontVariantLigatures=e.fontVariantLigatures,t.fontVariantNumeric=e.fontVariantNumeric,t.fontVariationSettings=e.fontVariationSettings,t.fontWeight=e.fontWeight}function e(e,t){var n=p(e);n.cssText?(t.style.cssText=n.cssText,r(n,t.style)):(o?b(e,n,t,c):E(n,l,t),c&&(["inset-block","inset-block-start","inset-block-end"].forEach(e=>t.style.removeProperty(e)),["left","right","top","bottom"].forEach(e=>{t.style.getPropertyValue(e)&&t.style.setProperty(e,"0px")})))}e(n,u)}function t(){function t(o){var i,a=p(n,o),e=a.getPropertyValue("content");function t(){var e="."+i+":"+o,t=(a.cssText?n:r)();return document.createTextNode(e+"{"+t+"}");function n(){return a.cssText+" content: "+a.getPropertyValue("content")+";"}function r(){return s.asArray(a).map(e).join("; ")+";";function e(e){return e+": "+a.getPropertyValue(e)+(a.getPropertyPriority(e)?" !important":"")}}}""!==e&&"none"!==e&&(i=s.uid(),(e=u.getAttribute("class"))&&u.setAttribute("class",e+" "+i),(e=document.createElement("style")).appendChild(t()),u.appendChild(e))}[":before",":after"].forEach(function(e){t(e)})}function r(){n instanceof HTMLTextAreaElement&&(u.innerHTML=n.value),n instanceof HTMLInputElement&&u.setAttribute("value",n.value)}function i(){u instanceof SVGElement&&(u.setAttribute("xmlns","http://www.w3.org/2000/svg"),u instanceof SVGRectElement&&["width","height"].forEach(function(e){var t=u.getAttribute(e);t&&u.style.setProperty(e,t)}))}}}(e,o.filter,!0,!o.raster)}).then(P).then(w).then(function(t){o.bgcolor&&(t.style.backgroundColor=o.bgcolor);o.width&&(t.style.width=o.width+"px");o.height&&(t.style.height=o.height+"px");o.style&&Object.keys(o.style).forEach(function(e){t.style[e]=o.style[e]});var e=null;"function"==typeof o.onclone&&(e=o.onclone(t));return Promise.resolve(e).then(function(){return t})}).then(function(e){return e=e,t=o.width||s.width(r),n=o.height||s.height(r),Promise.resolve(e).then(function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)}).then(s.escapeXhtml).then(function(e){return''+e+""}).then(function(e){return''+e+""}).then(function(e){return"data:image/svg+xml;charset=utf-8,"+e});var t,n})}function v(o,i){return y(o,i).then(s.makeImage).then(s.delay(0)).then(function(e){var t="number"!=typeof i.scale?1:i.scale,n=function(e,t){var n=document.createElement("canvas");n.width=(i.width||s.width(e))*t,n.height=(i.height||s.height(e))*t,i.bgcolor&&((t=n.getContext("2d")).fillStyle=i.bgcolor,t.fillRect(0,0,n.width,n.height));return n}(o,t),r=n.getContext("2d");return r.mozImageSmoothingEnabled=!1,r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1,e&&(r.scale(t,t),r.drawImage(e,0,0)),A&&(document.body.removeChild(A),A=null,C&&clearTimeout(C),C=setTimeout(()=>{C=null,x={}},2e4)),n})}function P(n){return c.resolveAll().then(function(e){var t=document.createElement("style");return n.appendChild(t),t.appendChild(document.createTextNode(e)),n})}function w(e){return f.inlineAll(e).then(function(){return e})}function b(e,t,n,r){var o,i=n.style,a=e.style;for(o of t){var u=t.getPropertyValue(o),c=a.getPropertyValue(o);a.setProperty(o,r?"initial":"unset"),t.getPropertyValue(o)!==u?i.setProperty(o,u):i.removeProperty(o),a.setProperty(o,c)}}function E(n,r,e){var o=function(e){if(x[e])return x[e];A||((A=document.createElement("iframe")).style.visibility="hidden",A.style.position="fixed",document.body.appendChild(A),A.contentWindow.document.write('sandbox'));var t=document.createElement(e);A.contentWindow.document.body.appendChild(t),t.textContent=".";var n=A.contentWindow.getComputedStyle(t),r={};return s.asArray(n).forEach(function(e){r[e]="width"===e||"height"===e?"auto":n.getPropertyValue(e)}),A.contentWindow.document.body.removeChild(t),x[e]=r}(e.tagName),i=e.style;s.asArray(n).forEach(function(e){var t=n.getPropertyValue(e);(t!==o[e]||r&&t!==r.getPropertyValue(e))&&i.setProperty(e,t,n.getPropertyPriority(e))})}var C=null,A=null,x={}}(this); \ No newline at end of file