- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2 lines
10 KiB
JavaScript
Executable File
2 lines
10 KiB
JavaScript
Executable File
/*! For license information please see dom-to-image.min.js.LICENSE.txt */
|
|
(()=>{var e={69807:function(e){!function(){"use strict";const t=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n,r;return(n="application/font-woff",r="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:r,jpeg:r,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[t(e).toLowerCase()]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise(function(t){e.toBlob(t)}):function(e){return new Promise(function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r),i=0;i<r;i++)o[i]=n.charCodeAt(i);t(new Blob([o],{type:"image/png"}))})}(e)},resolveUrl:function(e,t){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var o=n.createElement("a");return n.body.appendChild(o),r.href=t,o.href=e,o.href},getAndEncode:function(e){return c.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime()),new Promise(function(t){var n;if(TVE.fetchedExternalLinks[e]&&t(TVE.fetchedExternalLinks[e]),c.impl.options.imagePlaceholder){var r=c.impl.options.imagePlaceholder.split(/,/);r&&r[1]&&(n=r[1])}if(e.includes("spotlightr"))return void t(n);var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status){var r=new FileReader;r.onloadend=function(){var n=r.result.split(/,/)[1];TVE.fetchedExternalLinks&&(TVE.fetchedExternalLinks[e]=n),t(n)},r.readAsDataURL(o.response)}else n?t(n):a("cannot fetch resource: "+e+", status: "+o.status)},o.ontimeout=function(){n?t(n):a("timeout of 30000ms occured while fetching resource: "+e)},o.responseType="blob",o.timeout=3e4,c.impl.options.useCredentials&&(o.withCredentials=!0);let i=window.location.hostname;function a(e){console.warn(e),t("")}"www."===i.substring(0,4)&&(i=i.substring(4)),e.includes(i)||e.includes("gravatar")||e.includes("fonts.gstatic")||(e="//cors-anywhere.herokuapp.com/"+e),o.open("GET",e,!0),o.send()})},uid:(e=0,function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)+e++}),delay:function(e){return function(t){return new Promise(function(n){setTimeout(function(){n(t)},e)})}},asArray:function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return"data:,"===e?Promise.resolve():new Promise(function(t,n){var r=new Image;c.impl.options.useCredentials&&(r.crossOrigin="use-credentials"),r.onload=function(){t(r)},r.onerror=n,r.src=e})},width:function(e){var t=n(e,"border-left-width"),r=n(e,"border-right-width");return e.scrollWidth+t+r},height:function(e){var t=n(e,"border-top-width"),r=n(e,"border-bottom-width");return e.scrollHeight+t+r}};var e;function t(e){var t=/\.([^\.\/]*?)(\?|$)/g.exec(e);return t?t[1]:""}function n(e,t){var n=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(n.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,t,i){return n(e)?Promise.resolve(e).then(r).then(function(n){var r=Promise.resolve(e);return n.forEach(function(e){r=r.then(function(n){return o(n,e,t,i)})}),r}):Promise.resolve(e)},shouldProcess:n,impl:{readUrls:r,inline:o}};function n(t){return-1!==t.search(e)}function r(n){for(var r,o=[];null!==(r=e.exec(n));)o.push(r[1]);return o.filter(function(e){return!t.isDataUrl(e)})}function o(e,n,r,o){return Promise.resolve(n).then(function(e){return r?t.resolveUrl(e,r):e}).then(o||t.getAndEncode).then(function(e){return t.dataAsUrl(e,t.mimeType(n))}).then(function(r){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+t.escape(e)+")(['\"]?\\))","g")}(n),"$1"+r+"$3")})}}(),r=function(){return{resolveAll:function(){return e(document).then(function(e){return Promise.all(e.map(function(e){return e.resolve()}))}).then(function(e){return e.join("\n")})},impl:{readAll:e}};function e(){return Promise.resolve(t.asArray(document.styleSheets)).then(function(e){var n=[];return e.forEach(function(e){if(Object.getPrototypeOf(e).hasOwnProperty("cssRules"))try{t.asArray(e.cssRules||[]).forEach(n.push.bind(n))}catch(t){e.href.includes("google")||console.log("Error while reading CSS rules from "+e.href,t.toString())}}),n}).then(function(e){return e.filter(function(e){return e.type===CSSRule.FONT_FACE_RULE}).filter(function(e){return n.shouldProcess(e.style.getPropertyValue("src"))})}).then(function(t){return t.map(e)});function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function r(o){return o instanceof Element?function(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then(function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))}).then(function(){return e}):Promise.resolve(e)}(o).then(function(){return o instanceof HTMLImageElement?e(o).inline():Promise.all(t.asArray(o.childNodes).map(function(e){return r(e)}))}):Promise.resolve(o)},impl:{newImage:e}};function e(e){return{inline:function(n){return t.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(n||t.getAndEncode).then(function(n){return t.dataAsUrl(n,t.mimeType(e.src))}).then(function(t){return new Promise(function(n,r){e.onload=n,e.onerror=n,e.src=t})})}}}}(),i=void 0,a=!1,u=!1,c={toSvg:s,toPng:function(e,t){return l(e,t||{}).then(function(e){return e.toDataURL()})},toJpeg:function(e,t){return l(e,t=t||{}).then(function(e){return e.toDataURL("image/jpeg",t.quality||1)})},toBlob:function(e,n){return l(e,n||{}).then(t.canvasToBlob)},toPixelData:function(e,n){return l(e,n||{}).then(function(n){return n.getContext("2d").getImageData(0,0,t.width(e),t.height(e)).data})},toCanvas:function(e,t){return l(e,t||{})},impl:{fontFaces:r,images:o,util:t,inliner:n,options:{}}};function s(e,n){return function(e){void 0===e.imagePlaceholder?c.impl.options.imagePlaceholder=i:c.impl.options.imagePlaceholder=e.imagePlaceholder,void 0===e.cacheBust?c.impl.options.cacheBust=a:c.impl.options.cacheBust=e.cacheBust,void 0===e.useCredentials?c.impl.options.useCredentials=u:c.impl.options.useCredentials=e.useCredentials}(n=n||{}),Promise.resolve(e).then(function(e){return f(e,n.filter,!0)}).then(h).then(d).then(function(e){return n.bgcolor&&(e.style.backgroundColor=n.bgcolor),n.width&&(e.style.width=n.width+"px"),n.height&&(e.style.height=n.height+"px"),n.style&&Object.keys(n.style).forEach(function(t){e.style[t]=n.style[t]}),e}).then(function(r){return function(e,n,r){return Promise.resolve(e).then(function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)}).then(t.escapeXhtml).then(function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"}).then(function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+r+'">'+e+"</svg>"}).then(function(e){return"data:image/svg+xml;charset=utf-8,"+e})}(r,n.width||t.width(e),n.height||t.height(e))})}function l(e,n){return s(e,n).then(t.makeImage).then(t.delay(100)).then(function(r){var o="number"!=typeof n.scale?1:n.scale,i=function(e,r){var o=document.createElement("canvas");if(o.width=(n.width||t.width(e))*r,o.height=(n.height||t.height(e))*r,n.bgcolor){var i=o.getContext("2d");i.fillStyle=n.bgcolor,i.fillRect(0,0,o.width,o.height)}return o}(e,o),a=i.getContext("2d");return r&&(a.scale(o,o),a.drawImage(r,0,0)),i})}function f(e,n,r){return r||!n||n(e)?Promise.resolve(e).then(function(e){return e instanceof HTMLCanvasElement?t.makeImage(e.toDataURL()):e.cloneNode(!1)}).then(function(r){return function(e,n,r){var o=e.childNodes;return 0===o.length?Promise.resolve(n):function(e,t,n){var r=Promise.resolve();return t.forEach(function(t){r=r.then(function(){return f(t,n)}).then(function(t){t&&e.appendChild(t)})}),r}(n,t.asArray(o),r).then(function(){return n})}(e,r,n)}).then(function(n){return function(e,n){return["Text","Comment"].includes(n.constructor.name)?n:Promise.resolve().then(function(){e instanceof HTMLIFrameElement||(r=window.getComputedStyle(e),o=n.style,r.cssText?(o.cssText=r.cssText,function(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}(r,o)):function(e,n){t.asArray(e).forEach(function(t){n.setProperty(t,e.getPropertyValue(t),e.getPropertyPriority(t))})}(r,o));var r,o}).then(function(){[":before",":after"].forEach(function(r){!function(r){var o=window.getComputedStyle(e,r),i=o.getPropertyValue("content");if(""!==i&&"none"!==i){var a=t.uid(),u=n.getAttribute("class");u&&n.setAttribute("class",u+" "+a);var c=document.createElement("style");c.appendChild(function(e,n,r){var o="."+e+":"+n,i=r.cssText?a(r):u(r);return document.createTextNode(o+"{"+i+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function u(e){return t.asArray(e).map(n).join("; ")+";";function n(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}(a,r,o)),n.appendChild(c)}}(r)})}).then(function(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}).then(function(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach(function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)}))}).then(function(){return n})}(e,n)}):Promise.resolve()}function h(e){return r.resolveAll().then(function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e})}function d(e){return o.inlineAll(e).then(function(){return e})}"object"==typeof window&&(window.domtoimage=c),e.exports=c}()}},t={};!function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(69807)})(); |