Linux webm002.cluster126.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
/
home
/
a
/
r
/
i
/
ariannadhf
/
www
/
wp-content
/
plugins
/
simple-history
/
build
/
/home/a/r/i/ariannadhf/www/wp-content/plugins/simple-history/build/313.js
"use strict";(globalThis.webpackChunksimple_history=globalThis.webpackChunksimple_history||[]).push([[313],{455:(e,t,i)=>{i.d(t,{a:()=>a});var n=i(887);function r(e){let t=function(e){let t=[],i="",n=0;for(let r=0;r<e.length;r++){let l=e[r];"("===l&&n++,")"===l&&(n=Math.max(0,n-1)),";"===l&&0===n?(t.push(i),i=""):i+=l}return i.trim()&&t.push(i),t.map((e=>e.trim())).filter(Boolean)}(e),i=null,n=null,r=null,l=[];for(let e of t){let t=e.indexOf(":");if(t<0)continue;let a=e.slice(0,t).trim().toLowerCase(),s=e.slice(t+1).trim();"box-shadow"===a?r=s:"filter"===a?i=s:"-webkit-filter"===a?n=s:l.push([a,s])}if(r){let e=function(e){let t=[],i="",n=0;for(let r=0;r<e.length;r++){let l=e[r];"("===l&&n++,")"===l&&(n=Math.max(0,n-1)),","===l&&0===n?(t.push(i.trim()),i=""):i+=l}i.trim()&&t.push(i.trim());let r=[];for(let e of t){if(/\binset\b/i.test(e))continue;let t=e.match(/-?\d+(?:\.\d+)?px/gi)||[],[i="0px",n="0px",l="0px"]=t,a=e.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/gi,"").trim().replace(/\s{2,}/g," "),s=!!a&&","!==a;r.push(`drop-shadow(${i} ${n} ${l}${s?` ${a}`:""})`)}return r.join(" ")}(r);e&&(i=i?`${i} ${e}`:e,n=n?`${n} ${e}`:e)}let a=[...l];return i&&a.push(["filter",i]),n&&a.push(["-webkit-filter",n]),a.map((([e,t])=>`${e}:${t}`)).join(";")}function l(e){if(!(0,n.b)()||!function(e){return"string"==typeof e&&/^data:image\/svg\+xml/i.test(e)}(e))return e;try{let t=function(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}(e);return function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}(function(e){return(e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,((e,t)=>e.replace(t,function(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,((e,t,i)=>`${t}{${r(i)}}`))}(t))))).replace(/style=(['"])([\s\S]*?)\1/gi,((e,t,i)=>`style=${t}${r(i)}${t}`))}(t))}catch{return e}}async function a(e,t){let{width:i,height:n,scale:r=1,dpr:a=1,meta:s={},backgroundColor:o}=t;e=l(e);let u=new Image;u.loading="eager",u.decoding="sync",u.crossOrigin="anonymous",u.src=e,await u.decode();let c,h,m=u.naturalWidth,p=u.naturalHeight,f=Number.isFinite(s.w0)?s.w0:m,d=Number.isFinite(s.h0)?s.h0:p,g=Number.isFinite(i),x=Number.isFinite(n);g&&x?(c=Math.max(1,i),h=Math.max(1,n)):g?(c=i,h=d*(i/Math.max(1,f))):x?(h=n,c=f*(n/Math.max(1,d))):(c=m,h=p),c*=r,h*=r;let $=document.createElement("canvas");$.width=c*a,$.height=h*a,$.style.width=`${c}px`,$.style.height=`${h}px`;let b=$.getContext("2d");return 1!==a&&b.scale(a,a),o&&(b.save(),b.fillStyle=o,b.fillRect(0,0,c,h),b.restore()),b.drawImage(u,0,0,c,h),$}},313:(e,t,i)=>{i.d(t,{toCanvas:()=>n.a});var n=i(455)}}]);